2023-11-09 19:04:59 +01:00
|
|
|
-- name: AllStaticAddresses :many
|
2026-07-10 11:58:03 +02:00
|
|
|
SELECT * FROM static_addresses
|
|
|
|
|
ORDER BY id ASC;
|
2023-11-09 19:04:59 +01:00
|
|
|
|
|
|
|
|
-- name: GetStaticAddress :one
|
|
|
|
|
SELECT * FROM static_addresses
|
|
|
|
|
WHERE pkscript=$1;
|
|
|
|
|
|
2026-07-10 11:58:03 +02:00
|
|
|
-- name: GetStaticAddressID :one
|
|
|
|
|
SELECT id FROM static_addresses
|
|
|
|
|
WHERE pkscript=$1;
|
|
|
|
|
|
2023-11-09 19:04:59 +01:00
|
|
|
-- name: CreateStaticAddress :exec
|
|
|
|
|
INSERT INTO static_addresses (
|
|
|
|
|
client_pubkey,
|
|
|
|
|
server_pubkey,
|
|
|
|
|
expiry,
|
|
|
|
|
client_key_family,
|
|
|
|
|
client_key_index,
|
|
|
|
|
pkscript,
|
2024-12-09 13:55:29 +01:00
|
|
|
protocol_version,
|
|
|
|
|
initiation_height
|
2023-11-09 19:04:59 +01:00
|
|
|
) VALUES (
|
|
|
|
|
$1,
|
|
|
|
|
$2,
|
|
|
|
|
$3,
|
|
|
|
|
$4,
|
|
|
|
|
$5,
|
|
|
|
|
$6,
|
2024-12-09 13:55:29 +01:00
|
|
|
$7,
|
|
|
|
|
$8
|
2026-07-10 11:58:03 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
-- name: GetLegacyAddress :one
|
|
|
|
|
SELECT * FROM static_addresses
|
|
|
|
|
ORDER BY id ASC
|
|
|
|
|
LIMIT 1;
|