wip
This commit is contained in:
parent
4f550a937f
commit
f39025df53
39 changed files with 7571 additions and 1892 deletions
2
proto/CODEGEN.md
Normal file
2
proto/CODEGEN.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
create lnd classes: `npx protoc -I ./others --ts_out=./lnd others/*`
|
||||
create server classes: `npx protoc -I ./service --pub_out=. service/*`
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
([]*main.Method) (len=11 cap=16) {
|
||||
(*main.Method)(0xc0002b6730)({
|
||||
(*main.Method)(0xc0002886e0)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=5) "Empty",
|
||||
hasZeroFields: (bool) true
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
name: (string) (len=5) "Empty",
|
||||
hasZeroFields: (bool) true
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2480)({
|
||||
authType: (*main.supportedAuth)(0xc0003c3dd0)({
|
||||
opts: (*main.methodOptions)(0xc0003cc420)({
|
||||
authType: (*main.supportedAuth)(0xc000379fb0)({
|
||||
id: (string) (len=5) "guest",
|
||||
name: (string) (len=5) "Guest",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6780)({
|
||||
(*main.Method)(0xc000288730)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=25) "EncryptionExchangeRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -35,8 +35,8 @@
|
|||
name: (string) (len=5) "Empty",
|
||||
hasZeroFields: (bool) true
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2600)({
|
||||
authType: (*main.supportedAuth)(0xc0003c3ec0)({
|
||||
opts: (*main.methodOptions)(0xc0003cc5a0)({
|
||||
authType: (*main.supportedAuth)(0xc0003d60c0)({
|
||||
id: (string) (len=5) "guest",
|
||||
name: (string) (len=5) "Guest",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b67d0)({
|
||||
(*main.Method)(0xc000288780)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=17) "LndGetInfoRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -61,8 +61,8 @@
|
|||
name: (string) (len=18) "LndGetInfoResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2780)({
|
||||
authType: (*main.supportedAuth)(0xc0003c3f80)({
|
||||
opts: (*main.methodOptions)(0xc0003cc720)({
|
||||
authType: (*main.supportedAuth)(0xc0003d6180)({
|
||||
id: (string) (len=5) "admin",
|
||||
name: (string) (len=5) "Admin",
|
||||
encrypted: (bool) true,
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6820)({
|
||||
(*main.Method)(0xc0002887d0)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=14) "AddUserRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -88,8 +88,8 @@
|
|||
name: (string) (len=15) "AddUserResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2900)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe060)({
|
||||
opts: (*main.methodOptions)(0xc0003cc8a0)({
|
||||
authType: (*main.supportedAuth)(0xc0003d6240)({
|
||||
id: (string) (len=5) "guest",
|
||||
name: (string) (len=5) "Guest",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6870)({
|
||||
(*main.Method)(0xc000288820)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=15) "AuthUserRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -114,8 +114,8 @@
|
|||
name: (string) (len=16) "AuthUserResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2a80)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe120)({
|
||||
opts: (*main.methodOptions)(0xc0003cca20)({
|
||||
authType: (*main.supportedAuth)(0xc0003d6300)({
|
||||
id: (string) (len=5) "guest",
|
||||
name: (string) (len=5) "Guest",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -130,18 +130,18 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6910)({
|
||||
(*main.Method)(0xc0002888c0)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=5) "Empty",
|
||||
hasZeroFields: (bool) true
|
||||
name: (string) (len=17) "NewAddressRequest",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
name: (string) (len=10) "NewAddress",
|
||||
out: (main.MethodMessage) {
|
||||
name: (string) (len=18) "NewAddressResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2c00)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe1e0)({
|
||||
opts: (*main.methodOptions)(0xc0003ccba0)({
|
||||
authType: (*main.supportedAuth)(0xc0003d63c0)({
|
||||
id: (string) (len=4) "user",
|
||||
name: (string) (len=4) "User",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b69b0)({
|
||||
(*main.Method)(0xc000288960)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=17) "PayAddressRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -167,8 +167,8 @@
|
|||
name: (string) (len=18) "PayAddressResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2d80)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe2a0)({
|
||||
opts: (*main.methodOptions)(0xc0003ccd20)({
|
||||
authType: (*main.supportedAuth)(0xc0003d6480)({
|
||||
id: (string) (len=4) "user",
|
||||
name: (string) (len=4) "User",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -184,7 +184,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6a50)({
|
||||
(*main.Method)(0xc000288a00)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=17) "NewInvoiceRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -194,8 +194,8 @@
|
|||
name: (string) (len=18) "NewInvoiceResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f2f00)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe360)({
|
||||
opts: (*main.methodOptions)(0xc0003ccea0)({
|
||||
authType: (*main.supportedAuth)(0xc0003d6540)({
|
||||
id: (string) (len=4) "user",
|
||||
name: (string) (len=4) "User",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6af0)({
|
||||
(*main.Method)(0xc000288aa0)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=17) "PayInvoiceRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -221,8 +221,8 @@
|
|||
name: (string) (len=18) "PayInvoiceResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f3080)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe420)({
|
||||
opts: (*main.methodOptions)(0xc0003cd020)({
|
||||
authType: (*main.supportedAuth)(0xc0003d6600)({
|
||||
id: (string) (len=4) "user",
|
||||
name: (string) (len=4) "User",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6b90)({
|
||||
(*main.Method)(0xc000288b40)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=18) "OpenChannelRequest",
|
||||
hasZeroFields: (bool) false
|
||||
|
|
@ -248,8 +248,8 @@
|
|||
name: (string) (len=19) "OpenChannelResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f3200)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe4e0)({
|
||||
opts: (*main.methodOptions)(0xc0003cd1a0)({
|
||||
authType: (*main.supportedAuth)(0xc0003d66c0)({
|
||||
id: (string) (len=4) "user",
|
||||
name: (string) (len=4) "User",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -265,7 +265,7 @@
|
|||
query: ([]string) <nil>
|
||||
})
|
||||
}),
|
||||
(*main.Method)(0xc0002b6be0)({
|
||||
(*main.Method)(0xc000288b90)({
|
||||
in: (main.MethodMessage) {
|
||||
name: (string) (len=5) "Empty",
|
||||
hasZeroFields: (bool) true
|
||||
|
|
@ -275,8 +275,8 @@
|
|||
name: (string) (len=27) "GetOpenChannelLNURLResponse",
|
||||
hasZeroFields: (bool) false
|
||||
},
|
||||
opts: (*main.methodOptions)(0xc0003f3380)({
|
||||
authType: (*main.supportedAuth)(0xc0003fe5a0)({
|
||||
opts: (*main.methodOptions)(0xc0003cd320)({
|
||||
authType: (*main.supportedAuth)(0xc0003d6780)({
|
||||
id: (string) (len=4) "user",
|
||||
name: (string) (len=4) "User",
|
||||
encrypted: (bool) false,
|
||||
|
|
@ -294,83 +294,32 @@
|
|||
})
|
||||
}
|
||||
|
||||
([]*main.Enum) <nil>
|
||||
([]*main.Enum) (len=1 cap=1) {
|
||||
(*main.Enum)(0xc000379860)({
|
||||
name: (string) (len=11) "AddressType",
|
||||
values: ([]main.EnumValue) (len=3 cap=4) {
|
||||
(main.EnumValue) {
|
||||
number: (int64) 0,
|
||||
name: (string) (len=19) "WITNESS_PUBKEY_HASH"
|
||||
},
|
||||
(main.EnumValue) {
|
||||
number: (int64) 1,
|
||||
name: (string) (len=18) "NESTED_PUBKEY_HASH"
|
||||
},
|
||||
(main.EnumValue) {
|
||||
number: (int64) 2,
|
||||
name: (string) (len=14) "TAPROOT_PUBKEY"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
(map[string]*main.Message) (len=18) {
|
||||
(string) (len=18) "LndGetInfoResponse": (*main.Message)(0xc0002470c0)({
|
||||
fullName: (string) (len=18) "LndGetInfoResponse",
|
||||
name: (string) (len=18) "LndGetInfoResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c3260)({
|
||||
name: (string) (len=5) "alias",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=18) "NewInvoiceResponse": (*main.Message)(0xc000247200)({
|
||||
fullName: (string) (len=18) "NewInvoiceResponse",
|
||||
name: (string) (len=18) "NewInvoiceResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c3380)({
|
||||
name: (string) (len=7) "invoice",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=17) "PayInvoiceRequest": (*main.Message)(0xc000247240)({
|
||||
fullName: (string) (len=17) "PayInvoiceRequest",
|
||||
name: (string) (len=17) "PayInvoiceRequest",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c33b0)({
|
||||
name: (string) (len=6) "invoce",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=25) "EncryptionExchangeRequest": (*main.Message)(0xc000247040)({
|
||||
fullName: (string) (len=25) "EncryptionExchangeRequest",
|
||||
name: (string) (len=25) "EncryptionExchangeRequest",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003c31d0)({
|
||||
name: (string) (len=10) "public_key",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c3200)({
|
||||
name: (string) (len=9) "device_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=17) "LndGetInfoRequest": (*main.Message)(0xc000247080)({
|
||||
(map[string]*main.Message) (len=19) {
|
||||
(string) (len=17) "LndGetInfoRequest": (*main.Message)(0xc000215140)({
|
||||
fullName: (string) (len=17) "LndGetInfoRequest",
|
||||
name: (string) (len=17) "LndGetInfoRequest",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c3230)({
|
||||
(*main.Field)(0xc000379320)({
|
||||
name: (string) (len=7) "node_id",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
|
|
@ -381,12 +330,12 @@
|
|||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=18) "NewAddressResponse": (*main.Message)(0xc000247100)({
|
||||
fullName: (string) (len=18) "NewAddressResponse",
|
||||
name: (string) (len=18) "NewAddressResponse",
|
||||
(string) (len=18) "LndGetInfoResponse": (*main.Message)(0xc000215180)({
|
||||
fullName: (string) (len=18) "LndGetInfoResponse",
|
||||
name: (string) (len=18) "LndGetInfoResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c3290)({
|
||||
name: (string) (len=7) "address",
|
||||
(*main.Field)(0xc000379350)({
|
||||
name: (string) (len=5) "alias",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
|
|
@ -396,11 +345,26 @@
|
|||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=17) "NewInvoiceRequest": (*main.Message)(0xc0002471c0)({
|
||||
(string) (len=17) "NewAddressRequest": (*main.Message)(0xc0002151c0)({
|
||||
fullName: (string) (len=17) "NewAddressRequest",
|
||||
name: (string) (len=17) "NewAddressRequest",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc000379380)({
|
||||
name: (string) (len=12) "address_type",
|
||||
kind: (string) (len=11) "AddressType",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) true,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=17) "NewInvoiceRequest": (*main.Message)(0xc0002152c0)({
|
||||
fullName: (string) (len=17) "NewInvoiceRequest",
|
||||
name: (string) (len=17) "NewInvoiceRequest",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c3350)({
|
||||
(*main.Field)(0xc000379470)({
|
||||
name: (string) (len=11) "amount_sats",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
|
|
@ -411,169 +375,11 @@
|
|||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=18) "OpenChannelRequest": (*main.Message)(0xc0002472c0)({
|
||||
fullName: (string) (len=18) "OpenChannelRequest",
|
||||
name: (string) (len=18) "OpenChannelRequest",
|
||||
fields: ([]*main.Field) (len=3 cap=4) {
|
||||
(*main.Field)(0xc0003c3410)({
|
||||
name: (string) (len=11) "destination",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c3440)({
|
||||
name: (string) (len=15) "channel_balance",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c3470)({
|
||||
name: (string) (len=11) "push_amount",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=14) "AddUserRequest": (*main.Message)(0xc000247380)({
|
||||
fullName: (string) (len=14) "AddUserRequest",
|
||||
name: (string) (len=14) "AddUserRequest",
|
||||
fields: ([]*main.Field) (len=3 cap=4) {
|
||||
(*main.Field)(0xc0003c3500)({
|
||||
name: (string) (len=12) "callback_url",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c3530)({
|
||||
name: (string) (len=4) "name",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c3560)({
|
||||
name: (string) (len=6) "secret",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=15) "AuthUserRequest": (*main.Message)(0xc000247400)({
|
||||
fullName: (string) (len=15) "AuthUserRequest",
|
||||
name: (string) (len=15) "AuthUserRequest",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003c35f0)({
|
||||
name: (string) (len=4) "name",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c3620)({
|
||||
name: (string) (len=6) "secret",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=17) "PayAddressRequest": (*main.Message)(0xc000247140)({
|
||||
fullName: (string) (len=17) "PayAddressRequest",
|
||||
name: (string) (len=17) "PayAddressRequest",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003c32c0)({
|
||||
name: (string) (len=7) "address",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c32f0)({
|
||||
name: (string) (len=10) "amout_sats",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=18) "PayAddressResponse": (*main.Message)(0xc000247180)({
|
||||
fullName: (string) (len=18) "PayAddressResponse",
|
||||
name: (string) (len=18) "PayAddressResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c3320)({
|
||||
name: (string) (len=5) "tx_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=16) "AuthUserResponse": (*main.Message)(0xc000247440)({
|
||||
fullName: (string) (len=16) "AuthUserResponse",
|
||||
name: (string) (len=16) "AuthUserResponse",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003c3650)({
|
||||
name: (string) (len=7) "user_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c3680)({
|
||||
name: (string) (len=10) "auth_token",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=5) "Empty": (*main.Message)(0xc000247000)({
|
||||
fullName: (string) (len=5) "Empty",
|
||||
name: (string) (len=5) "Empty",
|
||||
fields: ([]*main.Field) <nil>
|
||||
}),
|
||||
(string) (len=18) "PayInvoiceResponse": (*main.Message)(0xc000247280)({
|
||||
(string) (len=18) "PayInvoiceResponse": (*main.Message)(0xc000215380)({
|
||||
fullName: (string) (len=18) "PayInvoiceResponse",
|
||||
name: (string) (len=18) "PayInvoiceResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c33e0)({
|
||||
(*main.Field)(0xc000379530)({
|
||||
name: (string) (len=8) "preimage",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
|
|
@ -584,11 +390,11 @@
|
|||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=19) "OpenChannelResponse": (*main.Message)(0xc000247300)({
|
||||
(string) (len=19) "OpenChannelResponse": (*main.Message)(0xc000215400)({
|
||||
fullName: (string) (len=19) "OpenChannelResponse",
|
||||
name: (string) (len=19) "OpenChannelResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c34a0)({
|
||||
(*main.Field)(0xc000379620)({
|
||||
name: (string) (len=10) "channel_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
|
|
@ -599,11 +405,89 @@
|
|||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=27) "GetOpenChannelLNURLResponse": (*main.Message)(0xc000247340)({
|
||||
(string) (len=18) "PayAddressResponse": (*main.Message)(0xc000215280)({
|
||||
fullName: (string) (len=18) "PayAddressResponse",
|
||||
name: (string) (len=18) "PayAddressResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc000379440)({
|
||||
name: (string) (len=5) "tx_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=17) "PayInvoiceRequest": (*main.Message)(0xc000215340)({
|
||||
fullName: (string) (len=17) "PayInvoiceRequest",
|
||||
name: (string) (len=17) "PayInvoiceRequest",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003794d0)({
|
||||
name: (string) (len=7) "invoice",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc000379500)({
|
||||
name: (string) (len=6) "amount",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=25) "EncryptionExchangeRequest": (*main.Message)(0xc000215100)({
|
||||
fullName: (string) (len=25) "EncryptionExchangeRequest",
|
||||
name: (string) (len=25) "EncryptionExchangeRequest",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003792c0)({
|
||||
name: (string) (len=10) "public_key",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003792f0)({
|
||||
name: (string) (len=9) "device_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=18) "NewAddressResponse": (*main.Message)(0xc000215200)({
|
||||
fullName: (string) (len=18) "NewAddressResponse",
|
||||
name: (string) (len=18) "NewAddressResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003793b0)({
|
||||
name: (string) (len=7) "address",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=27) "GetOpenChannelLNURLResponse": (*main.Message)(0xc000215440)({
|
||||
fullName: (string) (len=27) "GetOpenChannelLNURLResponse",
|
||||
name: (string) (len=27) "GetOpenChannelLNURLResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003c34d0)({
|
||||
(*main.Field)(0xc000379650)({
|
||||
name: (string) (len=5) "lnurl",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
|
|
@ -614,11 +498,44 @@
|
|||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=15) "AddUserResponse": (*main.Message)(0xc0002473c0)({
|
||||
(string) (len=14) "AddUserRequest": (*main.Message)(0xc000215480)({
|
||||
fullName: (string) (len=14) "AddUserRequest",
|
||||
name: (string) (len=14) "AddUserRequest",
|
||||
fields: ([]*main.Field) (len=3 cap=4) {
|
||||
(*main.Field)(0xc000379680)({
|
||||
name: (string) (len=12) "callback_url",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003796b0)({
|
||||
name: (string) (len=4) "name",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003796e0)({
|
||||
name: (string) (len=6) "secret",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=15) "AddUserResponse": (*main.Message)(0xc0002154c0)({
|
||||
fullName: (string) (len=15) "AddUserResponse",
|
||||
name: (string) (len=15) "AddUserResponse",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003c3590)({
|
||||
(*main.Field)(0xc000379710)({
|
||||
name: (string) (len=7) "user_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
|
|
@ -627,7 +544,7 @@
|
|||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003c35c0)({
|
||||
(*main.Field)(0xc000379740)({
|
||||
name: (string) (len=10) "auth_token",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
|
|
@ -637,10 +554,144 @@
|
|||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=15) "AuthUserRequest": (*main.Message)(0xc000215500)({
|
||||
fullName: (string) (len=15) "AuthUserRequest",
|
||||
name: (string) (len=15) "AuthUserRequest",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc000379770)({
|
||||
name: (string) (len=4) "name",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003797a0)({
|
||||
name: (string) (len=6) "secret",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=16) "AuthUserResponse": (*main.Message)(0xc000215540)({
|
||||
fullName: (string) (len=16) "AuthUserResponse",
|
||||
name: (string) (len=16) "AuthUserResponse",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003797d0)({
|
||||
name: (string) (len=7) "user_id",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc000379800)({
|
||||
name: (string) (len=10) "auth_token",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=5) "Empty": (*main.Message)(0xc0002150c0)({
|
||||
fullName: (string) (len=5) "Empty",
|
||||
name: (string) (len=5) "Empty",
|
||||
fields: ([]*main.Field) <nil>
|
||||
}),
|
||||
(string) (len=17) "PayAddressRequest": (*main.Message)(0xc000215240)({
|
||||
fullName: (string) (len=17) "PayAddressRequest",
|
||||
name: (string) (len=17) "PayAddressRequest",
|
||||
fields: ([]*main.Field) (len=2 cap=2) {
|
||||
(*main.Field)(0xc0003793e0)({
|
||||
name: (string) (len=7) "address",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc000379410)({
|
||||
name: (string) (len=10) "amout_sats",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=18) "NewInvoiceResponse": (*main.Message)(0xc000215300)({
|
||||
fullName: (string) (len=18) "NewInvoiceResponse",
|
||||
name: (string) (len=18) "NewInvoiceResponse",
|
||||
fields: ([]*main.Field) (len=1 cap=1) {
|
||||
(*main.Field)(0xc0003794a0)({
|
||||
name: (string) (len=7) "invoice",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
}),
|
||||
(string) (len=18) "OpenChannelRequest": (*main.Message)(0xc0002153c0)({
|
||||
fullName: (string) (len=18) "OpenChannelRequest",
|
||||
name: (string) (len=18) "OpenChannelRequest",
|
||||
fields: ([]*main.Field) (len=4 cap=4) {
|
||||
(*main.Field)(0xc000379560)({
|
||||
name: (string) (len=11) "destination",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc000379590)({
|
||||
name: (string) (len=14) "funding_amount",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003795c0)({
|
||||
name: (string) (len=11) "push_amount",
|
||||
kind: (string) (len=5) "int64",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
}),
|
||||
(*main.Field)(0xc0003795f0)({
|
||||
name: (string) (len=13) "close_address",
|
||||
kind: (string) (len=6) "string",
|
||||
isMap: (bool) false,
|
||||
isArray: (bool) false,
|
||||
isEnum: (bool) false,
|
||||
isMessage: (bool) false,
|
||||
isOptional: (bool) false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
parsing file: structs 18
|
||||
parsing file: structs 19
|
||||
parsing file: methods 2
|
||||
-> [{guest Guest false map[]} {user User false map[user_id:string]} {admin Admin true map[admin_id:string]}]
|
||||
|
||||
|
|
|
|||
|
|
@ -99,9 +99,12 @@ export default (methods: Types.ServerMethods, opts: ServerOptions) => {
|
|||
try {
|
||||
if (!methods.NewAddress) throw new Error('method: NewAddress is not implemented')
|
||||
const authContext = await opts.UserAuthGuard(req.headers['authorization'])
|
||||
const request = req.body
|
||||
const error = Types.NewAddressRequestValidate(request)
|
||||
if (error !== null) return logErrorAndReturnResponse(error, 'invalid request body', res, logger)
|
||||
const query = req.query
|
||||
const params = req.params
|
||||
const response = await methods.NewAddress({ ...authContext, ...query, ...params })
|
||||
const response = await methods.NewAddress({ ...authContext, ...query, ...params }, request)
|
||||
res.json({status: 'OK', result: response})
|
||||
} catch (ex) { const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger); if (opts.throwErrors) throw e }
|
||||
})
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@ export default (params: ClientParams) => ({
|
|||
}
|
||||
return { status: 'ERROR', reason: 'invalid response' }
|
||||
},
|
||||
NewAddress: async (): Promise<ResultError | { status: 'OK', result: Types.NewAddressResponse }> => {
|
||||
NewAddress: async (request: Types.NewAddressRequest): Promise<ResultError | { status: 'OK', result: Types.NewAddressResponse }> => {
|
||||
const auth = await params.retrieveUserAuth()
|
||||
if (auth === null) throw new Error('retrieveUserAuth() returned null')
|
||||
let finalRoute = '/api/user/chain/new'
|
||||
const { data } = await axios.post(params.baseUrl + finalRoute, {}, { headers: { 'authorization': auth } })
|
||||
const { data } = await axios.post(params.baseUrl + finalRoute, request, { headers: { 'authorization': auth } })
|
||||
if (data.status === 'ERROR' && typeof data.reason === 'string') return data
|
||||
if (data.status === 'OK') {
|
||||
const result = data.result
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ export type ServerMethods = {
|
|||
LndGetInfo?: (ctx: LndGetInfo_Context, req: LndGetInfoRequest) => Promise<LndGetInfoResponse>
|
||||
AddUser?: (ctx: AddUser_Context, req: AddUserRequest) => Promise<AddUserResponse>
|
||||
AuthUser?: (ctx: AuthUser_Context, req: AuthUserRequest) => Promise<AuthUserResponse>
|
||||
NewAddress?: (ctx: NewAddress_Context) => Promise<NewAddressResponse>
|
||||
NewAddress?: (ctx: NewAddress_Context, req: NewAddressRequest) => Promise<NewAddressResponse>
|
||||
PayAddress?: (ctx: PayAddress_Context, req: PayAddressRequest) => Promise<PayAddressResponse>
|
||||
NewInvoice?: (ctx: NewInvoice_Context, req: NewInvoiceRequest) => Promise<NewInvoiceResponse>
|
||||
PayInvoice?: (ctx: PayInvoice_Context, req: PayInvoiceRequest) => Promise<PayInvoiceResponse>
|
||||
|
|
@ -79,31 +79,30 @@ export type ServerMethods = {
|
|||
GetOpenChannelLNURL?: (ctx: GetOpenChannelLNURL_Context) => Promise<GetOpenChannelLNURLResponse>
|
||||
}
|
||||
|
||||
export enum AddressType {
|
||||
WITNESS_PUBKEY_HASH = 'WITNESS_PUBKEY_HASH',
|
||||
NESTED_PUBKEY_HASH = 'NESTED_PUBKEY_HASH',
|
||||
TAPROOT_PUBKEY = 'TAPROOT_PUBKEY',
|
||||
}
|
||||
const enumCheckAddressType = (e?: AddressType): boolean => {
|
||||
for (const v in AddressType) if (e === v) return true
|
||||
return false
|
||||
}
|
||||
|
||||
export type OptionsBaseMessage = {
|
||||
allOptionalsAreSet?: true
|
||||
}
|
||||
|
||||
export type AuthUserResponse = {
|
||||
user_id: string
|
||||
auth_token: string
|
||||
export type Empty = {
|
||||
}
|
||||
export const AuthUserResponseOptionalFields: [] = []
|
||||
export type AuthUserResponseOptions = OptionsBaseMessage & {
|
||||
export const EmptyOptionalFields: [] = []
|
||||
export type EmptyOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
user_id_CustomCheck?: (v: string) => boolean
|
||||
auth_token_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const AuthUserResponseValidate = (o?: AuthUserResponse, opts: AuthUserResponseOptions = {}, path: string = 'AuthUserResponse::root.'): Error | null => {
|
||||
export const EmptyValidate = (o?: Empty, opts: EmptyOptions = {}, path: string = 'Empty::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.user_id !== 'string') return new Error(`${path}.user_id: is not a string`)
|
||||
if (opts.user_id_CustomCheck && !opts.user_id_CustomCheck(o.user_id)) return new Error(`${path}.user_id: custom check failed`)
|
||||
|
||||
if (typeof o.auth_token !== 'string') return new Error(`${path}.auth_token: is not a string`)
|
||||
if (opts.auth_token_CustomCheck && !opts.auth_token_CustomCheck(o.auth_token)) return new Error(`${path}.auth_token: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
@ -130,20 +129,53 @@ export const PayAddressRequestValidate = (o?: PayAddressRequest, opts: PayAddres
|
|||
return null
|
||||
}
|
||||
|
||||
export type PayAddressResponse = {
|
||||
tx_id: string
|
||||
export type NewInvoiceResponse = {
|
||||
invoice: string
|
||||
}
|
||||
export const PayAddressResponseOptionalFields: [] = []
|
||||
export type PayAddressResponseOptions = OptionsBaseMessage & {
|
||||
export const NewInvoiceResponseOptionalFields: [] = []
|
||||
export type NewInvoiceResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
tx_id_CustomCheck?: (v: string) => boolean
|
||||
invoice_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const PayAddressResponseValidate = (o?: PayAddressResponse, opts: PayAddressResponseOptions = {}, path: string = 'PayAddressResponse::root.'): Error | null => {
|
||||
export const NewInvoiceResponseValidate = (o?: NewInvoiceResponse, opts: NewInvoiceResponseOptions = {}, path: string = 'NewInvoiceResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.tx_id !== 'string') return new Error(`${path}.tx_id: is not a string`)
|
||||
if (opts.tx_id_CustomCheck && !opts.tx_id_CustomCheck(o.tx_id)) return new Error(`${path}.tx_id: custom check failed`)
|
||||
if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`)
|
||||
if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type OpenChannelRequest = {
|
||||
destination: string
|
||||
funding_amount: number
|
||||
push_amount: number
|
||||
close_address: string
|
||||
}
|
||||
export const OpenChannelRequestOptionalFields: [] = []
|
||||
export type OpenChannelRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
destination_CustomCheck?: (v: string) => boolean
|
||||
funding_amount_CustomCheck?: (v: number) => boolean
|
||||
push_amount_CustomCheck?: (v: number) => boolean
|
||||
close_address_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const OpenChannelRequestValidate = (o?: OpenChannelRequest, opts: OpenChannelRequestOptions = {}, path: string = 'OpenChannelRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.destination !== 'string') return new Error(`${path}.destination: is not a string`)
|
||||
if (opts.destination_CustomCheck && !opts.destination_CustomCheck(o.destination)) return new Error(`${path}.destination: custom check failed`)
|
||||
|
||||
if (typeof o.funding_amount !== 'number') return new Error(`${path}.funding_amount: is not a number`)
|
||||
if (opts.funding_amount_CustomCheck && !opts.funding_amount_CustomCheck(o.funding_amount)) return new Error(`${path}.funding_amount: custom check failed`)
|
||||
|
||||
if (typeof o.push_amount !== 'number') return new Error(`${path}.push_amount: is not a number`)
|
||||
if (opts.push_amount_CustomCheck && !opts.push_amount_CustomCheck(o.push_amount)) return new Error(`${path}.push_amount: custom check failed`)
|
||||
|
||||
if (typeof o.close_address !== 'string') return new Error(`${path}.close_address: is not a string`)
|
||||
if (opts.close_address_CustomCheck && !opts.close_address_CustomCheck(o.close_address)) return new Error(`${path}.close_address: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
|
@ -166,92 +198,20 @@ export const OpenChannelResponseValidate = (o?: OpenChannelResponse, opts: OpenC
|
|||
return null
|
||||
}
|
||||
|
||||
export type GetOpenChannelLNURLResponse = {
|
||||
lnurl: string
|
||||
export type LndGetInfoRequest = {
|
||||
node_id: number
|
||||
}
|
||||
export const GetOpenChannelLNURLResponseOptionalFields: [] = []
|
||||
export type GetOpenChannelLNURLResponseOptions = OptionsBaseMessage & {
|
||||
export const LndGetInfoRequestOptionalFields: [] = []
|
||||
export type LndGetInfoRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
lnurl_CustomCheck?: (v: string) => boolean
|
||||
node_id_CustomCheck?: (v: number) => boolean
|
||||
}
|
||||
export const GetOpenChannelLNURLResponseValidate = (o?: GetOpenChannelLNURLResponse, opts: GetOpenChannelLNURLResponseOptions = {}, path: string = 'GetOpenChannelLNURLResponse::root.'): Error | null => {
|
||||
export const LndGetInfoRequestValidate = (o?: LndGetInfoRequest, opts: LndGetInfoRequestOptions = {}, path: string = 'LndGetInfoRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.lnurl !== 'string') return new Error(`${path}.lnurl: is not a string`)
|
||||
if (opts.lnurl_CustomCheck && !opts.lnurl_CustomCheck(o.lnurl)) return new Error(`${path}.lnurl: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type AddUserResponse = {
|
||||
user_id: string
|
||||
auth_token: string
|
||||
}
|
||||
export const AddUserResponseOptionalFields: [] = []
|
||||
export type AddUserResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
user_id_CustomCheck?: (v: string) => boolean
|
||||
auth_token_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const AddUserResponseValidate = (o?: AddUserResponse, opts: AddUserResponseOptions = {}, path: string = 'AddUserResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.user_id !== 'string') return new Error(`${path}.user_id: is not a string`)
|
||||
if (opts.user_id_CustomCheck && !opts.user_id_CustomCheck(o.user_id)) return new Error(`${path}.user_id: custom check failed`)
|
||||
|
||||
if (typeof o.auth_token !== 'string') return new Error(`${path}.auth_token: is not a string`)
|
||||
if (opts.auth_token_CustomCheck && !opts.auth_token_CustomCheck(o.auth_token)) return new Error(`${path}.auth_token: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type Empty = {
|
||||
}
|
||||
export const EmptyOptionalFields: [] = []
|
||||
export type EmptyOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
}
|
||||
export const EmptyValidate = (o?: Empty, opts: EmptyOptions = {}, path: string = 'Empty::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type PayInvoiceResponse = {
|
||||
preimage: string
|
||||
}
|
||||
export const PayInvoiceResponseOptionalFields: [] = []
|
||||
export type PayInvoiceResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
preimage_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const PayInvoiceResponseValidate = (o?: PayInvoiceResponse, opts: PayInvoiceResponseOptions = {}, path: string = 'PayInvoiceResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.preimage !== 'string') return new Error(`${path}.preimage: is not a string`)
|
||||
if (opts.preimage_CustomCheck && !opts.preimage_CustomCheck(o.preimage)) return new Error(`${path}.preimage: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type PayInvoiceRequest = {
|
||||
invoce: string
|
||||
}
|
||||
export const PayInvoiceRequestOptionalFields: [] = []
|
||||
export type PayInvoiceRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
invoce_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const PayInvoiceRequestValidate = (o?: PayInvoiceRequest, opts: PayInvoiceRequestOptions = {}, path: string = 'PayInvoiceRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.invoce !== 'string') return new Error(`${path}.invoce: is not a string`)
|
||||
if (opts.invoce_CustomCheck && !opts.invoce_CustomCheck(o.invoce)) return new Error(`${path}.invoce: custom check failed`)
|
||||
if (typeof o.node_id !== 'number') return new Error(`${path}.node_id: is not a number`)
|
||||
if (opts.node_id_CustomCheck && !opts.node_id_CustomCheck(o.node_id)) return new Error(`${path}.node_id: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
|
@ -274,38 +234,20 @@ export const LndGetInfoResponseValidate = (o?: LndGetInfoResponse, opts: LndGetI
|
|||
return null
|
||||
}
|
||||
|
||||
export type NewInvoiceResponse = {
|
||||
invoice: string
|
||||
export type NewAddressRequest = {
|
||||
address_type: AddressType
|
||||
}
|
||||
export const NewInvoiceResponseOptionalFields: [] = []
|
||||
export type NewInvoiceResponseOptions = OptionsBaseMessage & {
|
||||
export const NewAddressRequestOptionalFields: [] = []
|
||||
export type NewAddressRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
invoice_CustomCheck?: (v: string) => boolean
|
||||
address_type_CustomCheck?: (v: AddressType) => boolean
|
||||
}
|
||||
export const NewInvoiceResponseValidate = (o?: NewInvoiceResponse, opts: NewInvoiceResponseOptions = {}, path: string = 'NewInvoiceResponse::root.'): Error | null => {
|
||||
export const NewAddressRequestValidate = (o?: NewAddressRequest, opts: NewAddressRequestOptions = {}, path: string = 'NewAddressRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`)
|
||||
if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type NewAddressResponse = {
|
||||
address: string
|
||||
}
|
||||
export const NewAddressResponseOptionalFields: [] = []
|
||||
export type NewAddressResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
address_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const NewAddressResponseValidate = (o?: NewAddressResponse, opts: NewAddressResponseOptions = {}, path: string = 'NewAddressResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.address !== 'string') return new Error(`${path}.address: is not a string`)
|
||||
if (opts.address_CustomCheck && !opts.address_CustomCheck(o.address)) return new Error(`${path}.address: custom check failed`)
|
||||
if (!enumCheckAddressType(o.address_type)) return new Error(`${path}.address_type: is not a valid AddressType`)
|
||||
if (opts.address_type_CustomCheck && !opts.address_type_CustomCheck(o.address_type)) return new Error(`${path}.address_type: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
|
@ -328,30 +270,166 @@ export const NewInvoiceRequestValidate = (o?: NewInvoiceRequest, opts: NewInvoic
|
|||
return null
|
||||
}
|
||||
|
||||
export type OpenChannelRequest = {
|
||||
destination: string
|
||||
channel_balance: number
|
||||
push_amount: number
|
||||
export type PayInvoiceResponse = {
|
||||
preimage: string
|
||||
}
|
||||
export const OpenChannelRequestOptionalFields: [] = []
|
||||
export type OpenChannelRequestOptions = OptionsBaseMessage & {
|
||||
export const PayInvoiceResponseOptionalFields: [] = []
|
||||
export type PayInvoiceResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
destination_CustomCheck?: (v: string) => boolean
|
||||
channel_balance_CustomCheck?: (v: number) => boolean
|
||||
push_amount_CustomCheck?: (v: number) => boolean
|
||||
preimage_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const OpenChannelRequestValidate = (o?: OpenChannelRequest, opts: OpenChannelRequestOptions = {}, path: string = 'OpenChannelRequest::root.'): Error | null => {
|
||||
export const PayInvoiceResponseValidate = (o?: PayInvoiceResponse, opts: PayInvoiceResponseOptions = {}, path: string = 'PayInvoiceResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.destination !== 'string') return new Error(`${path}.destination: is not a string`)
|
||||
if (opts.destination_CustomCheck && !opts.destination_CustomCheck(o.destination)) return new Error(`${path}.destination: custom check failed`)
|
||||
if (typeof o.preimage !== 'string') return new Error(`${path}.preimage: is not a string`)
|
||||
if (opts.preimage_CustomCheck && !opts.preimage_CustomCheck(o.preimage)) return new Error(`${path}.preimage: custom check failed`)
|
||||
|
||||
if (typeof o.channel_balance !== 'number') return new Error(`${path}.channel_balance: is not a number`)
|
||||
if (opts.channel_balance_CustomCheck && !opts.channel_balance_CustomCheck(o.channel_balance)) return new Error(`${path}.channel_balance: custom check failed`)
|
||||
return null
|
||||
}
|
||||
|
||||
if (typeof o.push_amount !== 'number') return new Error(`${path}.push_amount: is not a number`)
|
||||
if (opts.push_amount_CustomCheck && !opts.push_amount_CustomCheck(o.push_amount)) return new Error(`${path}.push_amount: custom check failed`)
|
||||
export type PayAddressResponse = {
|
||||
tx_id: string
|
||||
}
|
||||
export const PayAddressResponseOptionalFields: [] = []
|
||||
export type PayAddressResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
tx_id_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const PayAddressResponseValidate = (o?: PayAddressResponse, opts: PayAddressResponseOptions = {}, path: string = 'PayAddressResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.tx_id !== 'string') return new Error(`${path}.tx_id: is not a string`)
|
||||
if (opts.tx_id_CustomCheck && !opts.tx_id_CustomCheck(o.tx_id)) return new Error(`${path}.tx_id: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type PayInvoiceRequest = {
|
||||
invoice: string
|
||||
amount: number
|
||||
}
|
||||
export const PayInvoiceRequestOptionalFields: [] = []
|
||||
export type PayInvoiceRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
invoice_CustomCheck?: (v: string) => boolean
|
||||
amount_CustomCheck?: (v: number) => boolean
|
||||
}
|
||||
export const PayInvoiceRequestValidate = (o?: PayInvoiceRequest, opts: PayInvoiceRequestOptions = {}, path: string = 'PayInvoiceRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`)
|
||||
if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`)
|
||||
|
||||
if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`)
|
||||
if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type AuthUserRequest = {
|
||||
name: string
|
||||
secret: string
|
||||
}
|
||||
export const AuthUserRequestOptionalFields: [] = []
|
||||
export type AuthUserRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
name_CustomCheck?: (v: string) => boolean
|
||||
secret_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const AuthUserRequestValidate = (o?: AuthUserRequest, opts: AuthUserRequestOptions = {}, path: string = 'AuthUserRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`)
|
||||
if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`)
|
||||
|
||||
if (typeof o.secret !== 'string') return new Error(`${path}.secret: is not a string`)
|
||||
if (opts.secret_CustomCheck && !opts.secret_CustomCheck(o.secret)) return new Error(`${path}.secret: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type AuthUserResponse = {
|
||||
user_id: string
|
||||
auth_token: string
|
||||
}
|
||||
export const AuthUserResponseOptionalFields: [] = []
|
||||
export type AuthUserResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
user_id_CustomCheck?: (v: string) => boolean
|
||||
auth_token_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const AuthUserResponseValidate = (o?: AuthUserResponse, opts: AuthUserResponseOptions = {}, path: string = 'AuthUserResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.user_id !== 'string') return new Error(`${path}.user_id: is not a string`)
|
||||
if (opts.user_id_CustomCheck && !opts.user_id_CustomCheck(o.user_id)) return new Error(`${path}.user_id: custom check failed`)
|
||||
|
||||
if (typeof o.auth_token !== 'string') return new Error(`${path}.auth_token: is not a string`)
|
||||
if (opts.auth_token_CustomCheck && !opts.auth_token_CustomCheck(o.auth_token)) return new Error(`${path}.auth_token: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type EncryptionExchangeRequest = {
|
||||
public_key: string
|
||||
device_id: string
|
||||
}
|
||||
export const EncryptionExchangeRequestOptionalFields: [] = []
|
||||
export type EncryptionExchangeRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
public_key_CustomCheck?: (v: string) => boolean
|
||||
device_id_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const EncryptionExchangeRequestValidate = (o?: EncryptionExchangeRequest, opts: EncryptionExchangeRequestOptions = {}, path: string = 'EncryptionExchangeRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.public_key !== 'string') return new Error(`${path}.public_key: is not a string`)
|
||||
if (opts.public_key_CustomCheck && !opts.public_key_CustomCheck(o.public_key)) return new Error(`${path}.public_key: custom check failed`)
|
||||
|
||||
if (typeof o.device_id !== 'string') return new Error(`${path}.device_id: is not a string`)
|
||||
if (opts.device_id_CustomCheck && !opts.device_id_CustomCheck(o.device_id)) return new Error(`${path}.device_id: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type NewAddressResponse = {
|
||||
address: string
|
||||
}
|
||||
export const NewAddressResponseOptionalFields: [] = []
|
||||
export type NewAddressResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
address_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const NewAddressResponseValidate = (o?: NewAddressResponse, opts: NewAddressResponseOptions = {}, path: string = 'NewAddressResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.address !== 'string') return new Error(`${path}.address: is not a string`)
|
||||
if (opts.address_CustomCheck && !opts.address_CustomCheck(o.address)) return new Error(`${path}.address: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type GetOpenChannelLNURLResponse = {
|
||||
lnurl: string
|
||||
}
|
||||
export const GetOpenChannelLNURLResponseOptionalFields: [] = []
|
||||
export type GetOpenChannelLNURLResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
lnurl_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const GetOpenChannelLNURLResponseValidate = (o?: GetOpenChannelLNURLResponse, opts: GetOpenChannelLNURLResponseOptions = {}, path: string = 'GetOpenChannelLNURLResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.lnurl !== 'string') return new Error(`${path}.lnurl: is not a string`)
|
||||
if (opts.lnurl_CustomCheck && !opts.lnurl_CustomCheck(o.lnurl)) return new Error(`${path}.lnurl: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
|
@ -384,66 +462,25 @@ export const AddUserRequestValidate = (o?: AddUserRequest, opts: AddUserRequestO
|
|||
return null
|
||||
}
|
||||
|
||||
export type AuthUserRequest = {
|
||||
name: string
|
||||
secret: string
|
||||
export type AddUserResponse = {
|
||||
user_id: string
|
||||
auth_token: string
|
||||
}
|
||||
export const AuthUserRequestOptionalFields: [] = []
|
||||
export type AuthUserRequestOptions = OptionsBaseMessage & {
|
||||
export const AddUserResponseOptionalFields: [] = []
|
||||
export type AddUserResponseOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
name_CustomCheck?: (v: string) => boolean
|
||||
secret_CustomCheck?: (v: string) => boolean
|
||||
user_id_CustomCheck?: (v: string) => boolean
|
||||
auth_token_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const AuthUserRequestValidate = (o?: AuthUserRequest, opts: AuthUserRequestOptions = {}, path: string = 'AuthUserRequest::root.'): Error | null => {
|
||||
export const AddUserResponseValidate = (o?: AddUserResponse, opts: AddUserResponseOptions = {}, path: string = 'AddUserResponse::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`)
|
||||
if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`)
|
||||
if (typeof o.user_id !== 'string') return new Error(`${path}.user_id: is not a string`)
|
||||
if (opts.user_id_CustomCheck && !opts.user_id_CustomCheck(o.user_id)) return new Error(`${path}.user_id: custom check failed`)
|
||||
|
||||
if (typeof o.secret !== 'string') return new Error(`${path}.secret: is not a string`)
|
||||
if (opts.secret_CustomCheck && !opts.secret_CustomCheck(o.secret)) return new Error(`${path}.secret: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type EncryptionExchangeRequest = {
|
||||
public_key: string
|
||||
device_id: string
|
||||
}
|
||||
export const EncryptionExchangeRequestOptionalFields: [] = []
|
||||
export type EncryptionExchangeRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
public_key_CustomCheck?: (v: string) => boolean
|
||||
device_id_CustomCheck?: (v: string) => boolean
|
||||
}
|
||||
export const EncryptionExchangeRequestValidate = (o?: EncryptionExchangeRequest, opts: EncryptionExchangeRequestOptions = {}, path: string = 'EncryptionExchangeRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.public_key !== 'string') return new Error(`${path}.public_key: is not a string`)
|
||||
if (opts.public_key_CustomCheck && !opts.public_key_CustomCheck(o.public_key)) return new Error(`${path}.public_key: custom check failed`)
|
||||
|
||||
if (typeof o.device_id !== 'string') return new Error(`${path}.device_id: is not a string`)
|
||||
if (opts.device_id_CustomCheck && !opts.device_id_CustomCheck(o.device_id)) return new Error(`${path}.device_id: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export type LndGetInfoRequest = {
|
||||
node_id: number
|
||||
}
|
||||
export const LndGetInfoRequestOptionalFields: [] = []
|
||||
export type LndGetInfoRequestOptions = OptionsBaseMessage & {
|
||||
checkOptionalsAreSet?: []
|
||||
node_id_CustomCheck?: (v: number) => boolean
|
||||
}
|
||||
export const LndGetInfoRequestValidate = (o?: LndGetInfoRequest, opts: LndGetInfoRequestOptions = {}, path: string = 'LndGetInfoRequest::root.'): Error | null => {
|
||||
if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message')
|
||||
if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null')
|
||||
|
||||
if (typeof o.node_id !== 'number') return new Error(`${path}.node_id: is not a number`)
|
||||
if (opts.node_id_CustomCheck && !opts.node_id_CustomCheck(o.node_id)) return new Error(`${path}.node_id: custom check failed`)
|
||||
if (typeof o.auth_token !== 'string') return new Error(`${path}.auth_token: is not a string`)
|
||||
if (opts.auth_token_CustomCheck && !opts.auth_token_CustomCheck(o.auth_token)) return new Error(`${path}.auth_token: custom check failed`)
|
||||
|
||||
return null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// @generated by protobuf-ts 2.5.0 with parameter long_type_string
|
||||
// @generated by protobuf-ts 2.5.0
|
||||
// @generated from protobuf file "invoices.proto" (package "invoicesrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { Invoices } from "./invoices";
|
||||
import type { LookupInvoiceMsg } from "./invoices";
|
||||
import type { SettleInvoiceResp } from "./invoices";
|
||||
import type { SettleInvoiceMsg } from "./invoices";
|
||||
import type { AddHoldInvoiceResp } from "./invoices";
|
||||
|
|
@ -12,7 +13,7 @@ import type { CancelInvoiceResp } from "./invoices";
|
|||
import type { CancelInvoiceMsg } from "./invoices";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { Invoice } from "./rpc";
|
||||
import type { Invoice } from "./lightning";
|
||||
import type { SubscribeSingleInvoiceRequest } from "./invoices";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
|
|
@ -57,6 +58,14 @@ export interface IInvoicesClient {
|
|||
* @generated from protobuf rpc: SettleInvoice(invoicesrpc.SettleInvoiceMsg) returns (invoicesrpc.SettleInvoiceResp);
|
||||
*/
|
||||
settleInvoice(input: SettleInvoiceMsg, options?: RpcOptions): UnaryCall<SettleInvoiceMsg, SettleInvoiceResp>;
|
||||
/**
|
||||
*
|
||||
* LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
* using either its payment hash, payment address, or set ID.
|
||||
*
|
||||
* @generated from protobuf rpc: LookupInvoiceV2(invoicesrpc.LookupInvoiceMsg) returns (lnrpc.Invoice);
|
||||
*/
|
||||
lookupInvoiceV2(input: LookupInvoiceMsg, options?: RpcOptions): UnaryCall<LookupInvoiceMsg, Invoice>;
|
||||
}
|
||||
/**
|
||||
* Invoices is a service that can be used to create, accept, settle and cancel
|
||||
|
|
@ -116,4 +125,15 @@ export class InvoicesClient implements IInvoicesClient, ServiceInfo {
|
|||
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SettleInvoiceMsg, SettleInvoiceResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
* using either its payment hash, payment address, or set ID.
|
||||
*
|
||||
* @generated from protobuf rpc: LookupInvoiceV2(invoicesrpc.LookupInvoiceMsg) returns (lnrpc.Invoice);
|
||||
*/
|
||||
lookupInvoiceV2(input: LookupInvoiceMsg, options?: RpcOptions): UnaryCall<LookupInvoiceMsg, Invoice> {
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<LookupInvoiceMsg, Invoice>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// @generated by protobuf-ts 2.5.0 with parameter long_type_string
|
||||
// @generated by protobuf-ts 2.5.0
|
||||
// @generated from protobuf file "invoices.proto" (package "invoicesrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import { Invoice } from "./rpc";
|
||||
import { Invoice } from "./lightning";
|
||||
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||
|
|
@ -13,13 +13,14 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
|||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { RouteHint } from "./rpc";
|
||||
import { RouteHint } from "./lightning";
|
||||
/**
|
||||
* @generated from protobuf message invoicesrpc.CancelInvoiceMsg
|
||||
*/
|
||||
export interface CancelInvoiceMsg {
|
||||
/**
|
||||
* Hash corresponding to the (hold) invoice to cancel.
|
||||
* Hash corresponding to the (hold) invoice to cancel. When using
|
||||
* REST, this field must be encoded as base64.
|
||||
*
|
||||
* @generated from protobuf field: bytes payment_hash = 1;
|
||||
*/
|
||||
|
|
@ -58,7 +59,7 @@ export interface AddHoldInvoiceRequest {
|
|||
*
|
||||
* @generated from protobuf field: int64 value = 3;
|
||||
*/
|
||||
value: string;
|
||||
value: bigint;
|
||||
/**
|
||||
*
|
||||
* The value of this invoice in millisatoshis
|
||||
|
|
@ -67,7 +68,7 @@ export interface AddHoldInvoiceRequest {
|
|||
*
|
||||
* @generated from protobuf field: int64 value_msat = 10;
|
||||
*/
|
||||
valueMsat: string;
|
||||
valueMsat: bigint;
|
||||
/**
|
||||
*
|
||||
* Hash (SHA-256) of a description of the payment. Used if the description of
|
||||
|
|
@ -82,7 +83,7 @@ export interface AddHoldInvoiceRequest {
|
|||
*
|
||||
* @generated from protobuf field: int64 expiry = 5;
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: bigint;
|
||||
/**
|
||||
* Fallback on-chain address.
|
||||
*
|
||||
|
|
@ -94,7 +95,7 @@ export interface AddHoldInvoiceRequest {
|
|||
*
|
||||
* @generated from protobuf field: uint64 cltv_expiry = 7;
|
||||
*/
|
||||
cltvExpiry: string;
|
||||
cltvExpiry: bigint;
|
||||
/**
|
||||
*
|
||||
* Route hints that can each be individually used to assist in reaching the
|
||||
|
|
@ -116,13 +117,32 @@ export interface AddHoldInvoiceRequest {
|
|||
export interface AddHoldInvoiceResp {
|
||||
/**
|
||||
*
|
||||
* A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
* A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
* details of the invoice, the sender has all the data necessary to send a
|
||||
* payment to the recipient.
|
||||
*
|
||||
* @generated from protobuf field: string payment_request = 1;
|
||||
*/
|
||||
paymentRequest: string;
|
||||
/**
|
||||
*
|
||||
* The "add" index of this invoice. Each newly created invoice will increment
|
||||
* this index making it monotonically increasing. Callers to the
|
||||
* SubscribeInvoices call can use this to instantly get notified of all added
|
||||
* invoices with an add_index greater than this one.
|
||||
*
|
||||
* @generated from protobuf field: uint64 add_index = 2;
|
||||
*/
|
||||
addIndex: bigint;
|
||||
/**
|
||||
*
|
||||
* The payment address of the generated invoice. This value should be used
|
||||
* in all payments for this invoice as we require it for end to end
|
||||
* security.
|
||||
*
|
||||
* @generated from protobuf field: bytes payment_addr = 3;
|
||||
*/
|
||||
paymentAddr: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message invoicesrpc.SettleInvoiceMsg
|
||||
|
|
@ -146,12 +166,77 @@ export interface SettleInvoiceResp {
|
|||
*/
|
||||
export interface SubscribeSingleInvoiceRequest {
|
||||
/**
|
||||
* Hash corresponding to the (hold) invoice to subscribe to.
|
||||
* Hash corresponding to the (hold) invoice to subscribe to. When using
|
||||
* REST, this field must be encoded as base64url.
|
||||
*
|
||||
* @generated from protobuf field: bytes r_hash = 2;
|
||||
*/
|
||||
rHash: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message invoicesrpc.LookupInvoiceMsg
|
||||
*/
|
||||
export interface LookupInvoiceMsg {
|
||||
/**
|
||||
* @generated from protobuf oneof: invoice_ref
|
||||
*/
|
||||
invoiceRef: {
|
||||
oneofKind: "paymentHash";
|
||||
/**
|
||||
* When using REST, this field must be encoded as base64.
|
||||
*
|
||||
* @generated from protobuf field: bytes payment_hash = 1;
|
||||
*/
|
||||
paymentHash: Uint8Array;
|
||||
} | {
|
||||
oneofKind: "paymentAddr";
|
||||
/**
|
||||
* @generated from protobuf field: bytes payment_addr = 2;
|
||||
*/
|
||||
paymentAddr: Uint8Array;
|
||||
} | {
|
||||
oneofKind: "setId";
|
||||
/**
|
||||
* @generated from protobuf field: bytes set_id = 3;
|
||||
*/
|
||||
setId: Uint8Array;
|
||||
} | {
|
||||
oneofKind: undefined;
|
||||
};
|
||||
/**
|
||||
* @generated from protobuf field: invoicesrpc.LookupModifier lookup_modifier = 4;
|
||||
*/
|
||||
lookupModifier: LookupModifier;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf enum invoicesrpc.LookupModifier
|
||||
*/
|
||||
export enum LookupModifier {
|
||||
/**
|
||||
* The default look up modifier, no look up behavior is changed.
|
||||
*
|
||||
* @generated from protobuf enum value: DEFAULT = 0;
|
||||
*/
|
||||
DEFAULT = 0,
|
||||
/**
|
||||
*
|
||||
* Indicates that when a look up is done based on a set_id, then only that set
|
||||
* of HTLCs related to that set ID should be returned.
|
||||
*
|
||||
* @generated from protobuf enum value: HTLC_SET_ONLY = 1;
|
||||
*/
|
||||
HTLC_SET_ONLY = 1,
|
||||
/**
|
||||
*
|
||||
* Indicates that when a look up is done using a payment_addr, then no HTLCs
|
||||
* related to the payment_addr should be returned. This is useful when one
|
||||
* wants to be able to obtain the set of associated setIDs with a given
|
||||
* invoice, then look up the sub-invoices "projected" by that set ID.
|
||||
*
|
||||
* @generated from protobuf enum value: HTLC_SET_BLANK = 2;
|
||||
*/
|
||||
HTLC_SET_BLANK = 2
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class CancelInvoiceMsg$Type extends MessageType<CancelInvoiceMsg> {
|
||||
constructor() {
|
||||
|
|
@ -231,18 +316,18 @@ class AddHoldInvoiceRequest$Type extends MessageType<AddHoldInvoiceRequest> {
|
|||
super("invoicesrpc.AddHoldInvoiceRequest", [
|
||||
{ no: 1, name: "memo", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 3, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
|
||||
{ no: 10, name: "value_msat", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
|
||||
{ no: 3, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 10, name: "value_msat", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 4, name: "description_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 5, name: "expiry", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
|
||||
{ no: 5, name: "expiry", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 6, name: "fallback_addr", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 7, name: "cltv_expiry", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
||||
{ no: 7, name: "cltv_expiry", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 8, name: "route_hints", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => RouteHint },
|
||||
{ no: 9, name: "private", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<AddHoldInvoiceRequest>): AddHoldInvoiceRequest {
|
||||
const message = { memo: "", hash: new Uint8Array(0), value: "0", valueMsat: "0", descriptionHash: new Uint8Array(0), expiry: "0", fallbackAddr: "", cltvExpiry: "0", routeHints: [], private: false };
|
||||
const message = { memo: "", hash: new Uint8Array(0), value: 0n, valueMsat: 0n, descriptionHash: new Uint8Array(0), expiry: 0n, fallbackAddr: "", cltvExpiry: 0n, routeHints: [], private: false };
|
||||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AddHoldInvoiceRequest>(this, message, value);
|
||||
|
|
@ -260,22 +345,22 @@ class AddHoldInvoiceRequest$Type extends MessageType<AddHoldInvoiceRequest> {
|
|||
message.hash = reader.bytes();
|
||||
break;
|
||||
case /* int64 value */ 3:
|
||||
message.value = reader.int64().toString();
|
||||
message.value = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* int64 value_msat */ 10:
|
||||
message.valueMsat = reader.int64().toString();
|
||||
message.valueMsat = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* bytes description_hash */ 4:
|
||||
message.descriptionHash = reader.bytes();
|
||||
break;
|
||||
case /* int64 expiry */ 5:
|
||||
message.expiry = reader.int64().toString();
|
||||
message.expiry = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* string fallback_addr */ 6:
|
||||
message.fallbackAddr = reader.string();
|
||||
break;
|
||||
case /* uint64 cltv_expiry */ 7:
|
||||
message.cltvExpiry = reader.uint64().toString();
|
||||
message.cltvExpiry = reader.uint64().toBigInt();
|
||||
break;
|
||||
case /* repeated lnrpc.RouteHint route_hints */ 8:
|
||||
message.routeHints.push(RouteHint.internalBinaryRead(reader, reader.uint32(), options));
|
||||
|
|
@ -302,22 +387,22 @@ class AddHoldInvoiceRequest$Type extends MessageType<AddHoldInvoiceRequest> {
|
|||
if (message.hash.length)
|
||||
writer.tag(2, WireType.LengthDelimited).bytes(message.hash);
|
||||
/* int64 value = 3; */
|
||||
if (message.value !== "0")
|
||||
if (message.value !== 0n)
|
||||
writer.tag(3, WireType.Varint).int64(message.value);
|
||||
/* int64 value_msat = 10; */
|
||||
if (message.valueMsat !== "0")
|
||||
if (message.valueMsat !== 0n)
|
||||
writer.tag(10, WireType.Varint).int64(message.valueMsat);
|
||||
/* bytes description_hash = 4; */
|
||||
if (message.descriptionHash.length)
|
||||
writer.tag(4, WireType.LengthDelimited).bytes(message.descriptionHash);
|
||||
/* int64 expiry = 5; */
|
||||
if (message.expiry !== "0")
|
||||
if (message.expiry !== 0n)
|
||||
writer.tag(5, WireType.Varint).int64(message.expiry);
|
||||
/* string fallback_addr = 6; */
|
||||
if (message.fallbackAddr !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.fallbackAddr);
|
||||
/* uint64 cltv_expiry = 7; */
|
||||
if (message.cltvExpiry !== "0")
|
||||
if (message.cltvExpiry !== 0n)
|
||||
writer.tag(7, WireType.Varint).uint64(message.cltvExpiry);
|
||||
/* repeated lnrpc.RouteHint route_hints = 8; */
|
||||
for (let i = 0; i < message.routeHints.length; i++)
|
||||
|
|
@ -339,11 +424,13 @@ export const AddHoldInvoiceRequest = new AddHoldInvoiceRequest$Type();
|
|||
class AddHoldInvoiceResp$Type extends MessageType<AddHoldInvoiceResp> {
|
||||
constructor() {
|
||||
super("invoicesrpc.AddHoldInvoiceResp", [
|
||||
{ no: 1, name: "payment_request", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
||||
{ no: 1, name: "payment_request", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 2, name: "add_index", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 3, name: "payment_addr", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<AddHoldInvoiceResp>): AddHoldInvoiceResp {
|
||||
const message = { paymentRequest: "" };
|
||||
const message = { paymentRequest: "", addIndex: 0n, paymentAddr: new Uint8Array(0) };
|
||||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AddHoldInvoiceResp>(this, message, value);
|
||||
|
|
@ -357,6 +444,12 @@ class AddHoldInvoiceResp$Type extends MessageType<AddHoldInvoiceResp> {
|
|||
case /* string payment_request */ 1:
|
||||
message.paymentRequest = reader.string();
|
||||
break;
|
||||
case /* uint64 add_index */ 2:
|
||||
message.addIndex = reader.uint64().toBigInt();
|
||||
break;
|
||||
case /* bytes payment_addr */ 3:
|
||||
message.paymentAddr = reader.bytes();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
|
|
@ -372,6 +465,12 @@ class AddHoldInvoiceResp$Type extends MessageType<AddHoldInvoiceResp> {
|
|||
/* string payment_request = 1; */
|
||||
if (message.paymentRequest !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.paymentRequest);
|
||||
/* uint64 add_index = 2; */
|
||||
if (message.addIndex !== 0n)
|
||||
writer.tag(2, WireType.Varint).uint64(message.addIndex);
|
||||
/* bytes payment_addr = 3; */
|
||||
if (message.paymentAddr.length)
|
||||
writer.tag(3, WireType.LengthDelimited).bytes(message.paymentAddr);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
|
|
@ -502,6 +601,83 @@ class SubscribeSingleInvoiceRequest$Type extends MessageType<SubscribeSingleInvo
|
|||
* @generated MessageType for protobuf message invoicesrpc.SubscribeSingleInvoiceRequest
|
||||
*/
|
||||
export const SubscribeSingleInvoiceRequest = new SubscribeSingleInvoiceRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class LookupInvoiceMsg$Type extends MessageType<LookupInvoiceMsg> {
|
||||
constructor() {
|
||||
super("invoicesrpc.LookupInvoiceMsg", [
|
||||
{ no: 1, name: "payment_hash", kind: "scalar", oneof: "invoiceRef", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 2, name: "payment_addr", kind: "scalar", oneof: "invoiceRef", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 3, name: "set_id", kind: "scalar", oneof: "invoiceRef", T: 12 /*ScalarType.BYTES*/ },
|
||||
{ no: 4, name: "lookup_modifier", kind: "enum", T: () => ["invoicesrpc.LookupModifier", LookupModifier] }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<LookupInvoiceMsg>): LookupInvoiceMsg {
|
||||
const message = { invoiceRef: { oneofKind: undefined }, lookupModifier: 0 };
|
||||
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<LookupInvoiceMsg>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LookupInvoiceMsg): LookupInvoiceMsg {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* bytes payment_hash */ 1:
|
||||
message.invoiceRef = {
|
||||
oneofKind: "paymentHash",
|
||||
paymentHash: reader.bytes()
|
||||
};
|
||||
break;
|
||||
case /* bytes payment_addr */ 2:
|
||||
message.invoiceRef = {
|
||||
oneofKind: "paymentAddr",
|
||||
paymentAddr: reader.bytes()
|
||||
};
|
||||
break;
|
||||
case /* bytes set_id */ 3:
|
||||
message.invoiceRef = {
|
||||
oneofKind: "setId",
|
||||
setId: reader.bytes()
|
||||
};
|
||||
break;
|
||||
case /* invoicesrpc.LookupModifier lookup_modifier */ 4:
|
||||
message.lookupModifier = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
||||
let d = reader.skip(wireType);
|
||||
if (u !== false)
|
||||
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: LookupInvoiceMsg, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* bytes payment_hash = 1; */
|
||||
if (message.invoiceRef.oneofKind === "paymentHash")
|
||||
writer.tag(1, WireType.LengthDelimited).bytes(message.invoiceRef.paymentHash);
|
||||
/* bytes payment_addr = 2; */
|
||||
if (message.invoiceRef.oneofKind === "paymentAddr")
|
||||
writer.tag(2, WireType.LengthDelimited).bytes(message.invoiceRef.paymentAddr);
|
||||
/* bytes set_id = 3; */
|
||||
if (message.invoiceRef.oneofKind === "setId")
|
||||
writer.tag(3, WireType.LengthDelimited).bytes(message.invoiceRef.setId);
|
||||
/* invoicesrpc.LookupModifier lookup_modifier = 4; */
|
||||
if (message.lookupModifier !== 0)
|
||||
writer.tag(4, WireType.Varint).int32(message.lookupModifier);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message invoicesrpc.LookupInvoiceMsg
|
||||
*/
|
||||
export const LookupInvoiceMsg = new LookupInvoiceMsg$Type();
|
||||
/**
|
||||
* @generated ServiceType for protobuf service invoicesrpc.Invoices
|
||||
*/
|
||||
|
|
@ -509,5 +685,6 @@ export const Invoices = new ServiceType("invoicesrpc.Invoices", [
|
|||
{ name: "SubscribeSingleInvoice", serverStreaming: true, options: {}, I: SubscribeSingleInvoiceRequest, O: Invoice },
|
||||
{ name: "CancelInvoice", options: {}, I: CancelInvoiceMsg, O: CancelInvoiceResp },
|
||||
{ name: "AddHoldInvoice", options: {}, I: AddHoldInvoiceRequest, O: AddHoldInvoiceResp },
|
||||
{ name: "SettleInvoice", options: {}, I: SettleInvoiceMsg, O: SettleInvoiceResp }
|
||||
{ name: "SettleInvoice", options: {}, I: SettleInvoiceMsg, O: SettleInvoiceResp },
|
||||
{ name: "LookupInvoiceV2", options: {}, I: LookupInvoiceMsg, O: Invoice }
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -1,119 +1,135 @@
|
|||
// @generated by protobuf-ts 2.5.0 with parameter long_type_string
|
||||
// @generated from protobuf file "rpc.proto" (package "lnrpc", syntax proto3)
|
||||
// @generated by protobuf-ts 2.5.0
|
||||
// @generated from protobuf file "lightning.proto" (package "lnrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { Lightning } from "./rpc";
|
||||
import type { ListPermissionsResponse } from "./rpc";
|
||||
import type { ListPermissionsRequest } from "./rpc";
|
||||
import type { DeleteMacaroonIDResponse } from "./rpc";
|
||||
import type { DeleteMacaroonIDRequest } from "./rpc";
|
||||
import type { ListMacaroonIDsResponse } from "./rpc";
|
||||
import type { ListMacaroonIDsRequest } from "./rpc";
|
||||
import type { BakeMacaroonResponse } from "./rpc";
|
||||
import type { BakeMacaroonRequest } from "./rpc";
|
||||
import type { ChannelBackupSubscription } from "./rpc";
|
||||
import type { RestoreBackupResponse } from "./rpc";
|
||||
import type { RestoreChanBackupRequest } from "./rpc";
|
||||
import type { VerifyChanBackupResponse } from "./rpc";
|
||||
import type { ChanBackupSnapshot } from "./rpc";
|
||||
import type { ChanBackupExportRequest } from "./rpc";
|
||||
import type { ChannelBackup } from "./rpc";
|
||||
import type { ExportChannelBackupRequest } from "./rpc";
|
||||
import type { ForwardingHistoryResponse } from "./rpc";
|
||||
import type { ForwardingHistoryRequest } from "./rpc";
|
||||
import type { PolicyUpdateResponse } from "./rpc";
|
||||
import type { PolicyUpdateRequest } from "./rpc";
|
||||
import type { FeeReportResponse } from "./rpc";
|
||||
import type { FeeReportRequest } from "./rpc";
|
||||
import type { DebugLevelResponse } from "./rpc";
|
||||
import type { DebugLevelRequest } from "./rpc";
|
||||
import type { GraphTopologyUpdate } from "./rpc";
|
||||
import type { GraphTopologySubscription } from "./rpc";
|
||||
import type { StopResponse } from "./rpc";
|
||||
import type { StopRequest } from "./rpc";
|
||||
import type { NetworkInfo } from "./rpc";
|
||||
import type { NetworkInfoRequest } from "./rpc";
|
||||
import type { QueryRoutesResponse } from "./rpc";
|
||||
import type { QueryRoutesRequest } from "./rpc";
|
||||
import type { NodeInfo } from "./rpc";
|
||||
import type { NodeInfoRequest } from "./rpc";
|
||||
import type { ChannelEdge } from "./rpc";
|
||||
import type { ChanInfoRequest } from "./rpc";
|
||||
import type { NodeMetricsResponse } from "./rpc";
|
||||
import type { NodeMetricsRequest } from "./rpc";
|
||||
import type { ChannelGraph } from "./rpc";
|
||||
import type { ChannelGraphRequest } from "./rpc";
|
||||
import type { DeleteAllPaymentsResponse } from "./rpc";
|
||||
import type { DeleteAllPaymentsRequest } from "./rpc";
|
||||
import type { ListPaymentsResponse } from "./rpc";
|
||||
import type { ListPaymentsRequest } from "./rpc";
|
||||
import type { PayReq } from "./rpc";
|
||||
import type { PayReqString } from "./rpc";
|
||||
import type { InvoiceSubscription } from "./rpc";
|
||||
import type { PaymentHash } from "./rpc";
|
||||
import type { ListInvoiceResponse } from "./rpc";
|
||||
import type { ListInvoiceRequest } from "./rpc";
|
||||
import type { AddInvoiceResponse } from "./rpc";
|
||||
import type { Invoice } from "./rpc";
|
||||
import type { SendToRouteRequest } from "./rpc";
|
||||
import type { SendResponse } from "./rpc";
|
||||
import type { SendRequest } from "./rpc";
|
||||
import type { AbandonChannelResponse } from "./rpc";
|
||||
import type { AbandonChannelRequest } from "./rpc";
|
||||
import type { CloseStatusUpdate } from "./rpc";
|
||||
import type { CloseChannelRequest } from "./rpc";
|
||||
import type { ChannelAcceptRequest } from "./rpc";
|
||||
import type { ChannelAcceptResponse } from "./rpc";
|
||||
import { Lightning } from "./lightning";
|
||||
import type { LookupHtlcResponse } from "./lightning";
|
||||
import type { LookupHtlcRequest } from "./lightning";
|
||||
import type { ListAliasesResponse } from "./lightning";
|
||||
import type { ListAliasesRequest } from "./lightning";
|
||||
import type { CustomMessage } from "./lightning";
|
||||
import type { SubscribeCustomMessagesRequest } from "./lightning";
|
||||
import type { SendCustomMessageResponse } from "./lightning";
|
||||
import type { SendCustomMessageRequest } from "./lightning";
|
||||
import type { RPCMiddlewareRequest } from "./lightning";
|
||||
import type { RPCMiddlewareResponse } from "./lightning";
|
||||
import type { CheckMacPermResponse } from "./lightning";
|
||||
import type { CheckMacPermRequest } from "./lightning";
|
||||
import type { ListPermissionsResponse } from "./lightning";
|
||||
import type { ListPermissionsRequest } from "./lightning";
|
||||
import type { DeleteMacaroonIDResponse } from "./lightning";
|
||||
import type { DeleteMacaroonIDRequest } from "./lightning";
|
||||
import type { ListMacaroonIDsResponse } from "./lightning";
|
||||
import type { ListMacaroonIDsRequest } from "./lightning";
|
||||
import type { BakeMacaroonResponse } from "./lightning";
|
||||
import type { BakeMacaroonRequest } from "./lightning";
|
||||
import type { ChannelBackupSubscription } from "./lightning";
|
||||
import type { RestoreBackupResponse } from "./lightning";
|
||||
import type { RestoreChanBackupRequest } from "./lightning";
|
||||
import type { VerifyChanBackupResponse } from "./lightning";
|
||||
import type { ChanBackupSnapshot } from "./lightning";
|
||||
import type { ChanBackupExportRequest } from "./lightning";
|
||||
import type { ChannelBackup } from "./lightning";
|
||||
import type { ExportChannelBackupRequest } from "./lightning";
|
||||
import type { ForwardingHistoryResponse } from "./lightning";
|
||||
import type { ForwardingHistoryRequest } from "./lightning";
|
||||
import type { PolicyUpdateResponse } from "./lightning";
|
||||
import type { PolicyUpdateRequest } from "./lightning";
|
||||
import type { FeeReportResponse } from "./lightning";
|
||||
import type { FeeReportRequest } from "./lightning";
|
||||
import type { DebugLevelResponse } from "./lightning";
|
||||
import type { DebugLevelRequest } from "./lightning";
|
||||
import type { GraphTopologyUpdate } from "./lightning";
|
||||
import type { GraphTopologySubscription } from "./lightning";
|
||||
import type { StopResponse } from "./lightning";
|
||||
import type { StopRequest } from "./lightning";
|
||||
import type { NetworkInfo } from "./lightning";
|
||||
import type { NetworkInfoRequest } from "./lightning";
|
||||
import type { QueryRoutesResponse } from "./lightning";
|
||||
import type { QueryRoutesRequest } from "./lightning";
|
||||
import type { NodeInfo } from "./lightning";
|
||||
import type { NodeInfoRequest } from "./lightning";
|
||||
import type { ChannelEdge } from "./lightning";
|
||||
import type { ChanInfoRequest } from "./lightning";
|
||||
import type { NodeMetricsResponse } from "./lightning";
|
||||
import type { NodeMetricsRequest } from "./lightning";
|
||||
import type { ChannelGraph } from "./lightning";
|
||||
import type { ChannelGraphRequest } from "./lightning";
|
||||
import type { DeleteAllPaymentsResponse } from "./lightning";
|
||||
import type { DeleteAllPaymentsRequest } from "./lightning";
|
||||
import type { DeletePaymentResponse } from "./lightning";
|
||||
import type { DeletePaymentRequest } from "./lightning";
|
||||
import type { ListPaymentsResponse } from "./lightning";
|
||||
import type { ListPaymentsRequest } from "./lightning";
|
||||
import type { PayReq } from "./lightning";
|
||||
import type { PayReqString } from "./lightning";
|
||||
import type { InvoiceSubscription } from "./lightning";
|
||||
import type { PaymentHash } from "./lightning";
|
||||
import type { ListInvoiceResponse } from "./lightning";
|
||||
import type { ListInvoiceRequest } from "./lightning";
|
||||
import type { AddInvoiceResponse } from "./lightning";
|
||||
import type { Invoice } from "./lightning";
|
||||
import type { SendToRouteRequest } from "./lightning";
|
||||
import type { SendResponse } from "./lightning";
|
||||
import type { SendRequest } from "./lightning";
|
||||
import type { AbandonChannelResponse } from "./lightning";
|
||||
import type { AbandonChannelRequest } from "./lightning";
|
||||
import type { CloseStatusUpdate } from "./lightning";
|
||||
import type { CloseChannelRequest } from "./lightning";
|
||||
import type { ChannelAcceptRequest } from "./lightning";
|
||||
import type { ChannelAcceptResponse } from "./lightning";
|
||||
import type { DuplexStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { FundingStateStepResp } from "./rpc";
|
||||
import type { FundingTransitionMsg } from "./rpc";
|
||||
import type { OpenStatusUpdate } from "./rpc";
|
||||
import type { ChannelPoint } from "./rpc";
|
||||
import type { OpenChannelRequest } from "./rpc";
|
||||
import type { ClosedChannelsResponse } from "./rpc";
|
||||
import type { ClosedChannelsRequest } from "./rpc";
|
||||
import type { ChannelEventUpdate } from "./rpc";
|
||||
import type { ChannelEventSubscription } from "./rpc";
|
||||
import type { ListChannelsResponse } from "./rpc";
|
||||
import type { ListChannelsRequest } from "./rpc";
|
||||
import type { PendingChannelsResponse } from "./rpc";
|
||||
import type { PendingChannelsRequest } from "./rpc";
|
||||
import type { GetRecoveryInfoResponse } from "./rpc";
|
||||
import type { GetRecoveryInfoRequest } from "./rpc";
|
||||
import type { GetInfoResponse } from "./rpc";
|
||||
import type { GetInfoRequest } from "./rpc";
|
||||
import type { PeerEvent } from "./rpc";
|
||||
import type { PeerEventSubscription } from "./rpc";
|
||||
import type { ListPeersResponse } from "./rpc";
|
||||
import type { ListPeersRequest } from "./rpc";
|
||||
import type { DisconnectPeerResponse } from "./rpc";
|
||||
import type { DisconnectPeerRequest } from "./rpc";
|
||||
import type { ConnectPeerResponse } from "./rpc";
|
||||
import type { ConnectPeerRequest } from "./rpc";
|
||||
import type { VerifyMessageResponse } from "./rpc";
|
||||
import type { VerifyMessageRequest } from "./rpc";
|
||||
import type { SignMessageResponse } from "./rpc";
|
||||
import type { SignMessageRequest } from "./rpc";
|
||||
import type { NewAddressResponse } from "./rpc";
|
||||
import type { NewAddressRequest } from "./rpc";
|
||||
import type { SendManyResponse } from "./rpc";
|
||||
import type { SendManyRequest } from "./rpc";
|
||||
import type { Transaction } from "./rpc";
|
||||
import type { FundingStateStepResp } from "./lightning";
|
||||
import type { FundingTransitionMsg } from "./lightning";
|
||||
import type { BatchOpenChannelResponse } from "./lightning";
|
||||
import type { BatchOpenChannelRequest } from "./lightning";
|
||||
import type { OpenStatusUpdate } from "./lightning";
|
||||
import type { ChannelPoint } from "./lightning";
|
||||
import type { OpenChannelRequest } from "./lightning";
|
||||
import type { ClosedChannelsResponse } from "./lightning";
|
||||
import type { ClosedChannelsRequest } from "./lightning";
|
||||
import type { ChannelEventUpdate } from "./lightning";
|
||||
import type { ChannelEventSubscription } from "./lightning";
|
||||
import type { ListChannelsResponse } from "./lightning";
|
||||
import type { ListChannelsRequest } from "./lightning";
|
||||
import type { PendingChannelsResponse } from "./lightning";
|
||||
import type { PendingChannelsRequest } from "./lightning";
|
||||
import type { GetRecoveryInfoResponse } from "./lightning";
|
||||
import type { GetRecoveryInfoRequest } from "./lightning";
|
||||
import type { GetInfoResponse } from "./lightning";
|
||||
import type { GetInfoRequest } from "./lightning";
|
||||
import type { PeerEvent } from "./lightning";
|
||||
import type { PeerEventSubscription } from "./lightning";
|
||||
import type { ListPeersResponse } from "./lightning";
|
||||
import type { ListPeersRequest } from "./lightning";
|
||||
import type { DisconnectPeerResponse } from "./lightning";
|
||||
import type { DisconnectPeerRequest } from "./lightning";
|
||||
import type { ConnectPeerResponse } from "./lightning";
|
||||
import type { ConnectPeerRequest } from "./lightning";
|
||||
import type { VerifyMessageResponse } from "./lightning";
|
||||
import type { VerifyMessageRequest } from "./lightning";
|
||||
import type { SignMessageResponse } from "./lightning";
|
||||
import type { SignMessageRequest } from "./lightning";
|
||||
import type { NewAddressResponse } from "./lightning";
|
||||
import type { NewAddressRequest } from "./lightning";
|
||||
import type { SendManyResponse } from "./lightning";
|
||||
import type { SendManyRequest } from "./lightning";
|
||||
import type { Transaction } from "./lightning";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ListUnspentResponse } from "./rpc";
|
||||
import type { ListUnspentRequest } from "./rpc";
|
||||
import type { SendCoinsResponse } from "./rpc";
|
||||
import type { SendCoinsRequest } from "./rpc";
|
||||
import type { EstimateFeeResponse } from "./rpc";
|
||||
import type { EstimateFeeRequest } from "./rpc";
|
||||
import type { TransactionDetails } from "./rpc";
|
||||
import type { GetTransactionsRequest } from "./rpc";
|
||||
import type { ChannelBalanceResponse } from "./rpc";
|
||||
import type { ChannelBalanceRequest } from "./rpc";
|
||||
import type { ListUnspentResponse } from "./lightning";
|
||||
import type { ListUnspentRequest } from "./lightning";
|
||||
import type { SendCoinsResponse } from "./lightning";
|
||||
import type { SendCoinsRequest } from "./lightning";
|
||||
import type { EstimateFeeResponse } from "./lightning";
|
||||
import type { EstimateFeeRequest } from "./lightning";
|
||||
import type { TransactionDetails } from "./lightning";
|
||||
import type { GetTransactionsRequest } from "./lightning";
|
||||
import type { ChannelBalanceResponse } from "./lightning";
|
||||
import type { ChannelBalanceRequest } from "./lightning";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { WalletBalanceResponse } from "./rpc";
|
||||
import type { WalletBalanceRequest } from "./rpc";
|
||||
import type { WalletBalanceResponse } from "./lightning";
|
||||
import type { WalletBalanceRequest } from "./lightning";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
//
|
||||
|
|
@ -358,6 +374,17 @@ export interface ILightningClient {
|
|||
* @generated from protobuf rpc: OpenChannel(lnrpc.OpenChannelRequest) returns (stream lnrpc.OpenStatusUpdate);
|
||||
*/
|
||||
openChannel(input: OpenChannelRequest, options?: RpcOptions): ServerStreamingCall<OpenChannelRequest, OpenStatusUpdate>;
|
||||
/**
|
||||
* lncli: `batchopenchannel`
|
||||
* BatchOpenChannel attempts to open multiple single-funded channels in a
|
||||
* single transaction in an atomic way. This means either all channel open
|
||||
* requests succeed at once or all attempts are aborted if any of them fail.
|
||||
* This is the safer variant of using PSBTs to manually fund a batch of
|
||||
* channels through the OpenChannel RPC.
|
||||
*
|
||||
* @generated from protobuf rpc: BatchOpenChannel(lnrpc.BatchOpenChannelRequest) returns (lnrpc.BatchOpenChannelResponse);
|
||||
*/
|
||||
batchOpenChannel(input: BatchOpenChannelRequest, options?: RpcOptions): UnaryCall<BatchOpenChannelRequest, BatchOpenChannelResponse>;
|
||||
/**
|
||||
*
|
||||
* FundingStateStep is an advanced funding related call that allows the caller
|
||||
|
|
@ -514,7 +541,16 @@ export interface ILightningClient {
|
|||
listPayments(input: ListPaymentsRequest, options?: RpcOptions): UnaryCall<ListPaymentsRequest, ListPaymentsResponse>;
|
||||
/**
|
||||
*
|
||||
* DeleteAllPayments deletes all outgoing payments from DB.
|
||||
* DeletePayment deletes an outgoing payment from DB. Note that it will not
|
||||
* attempt to delete an In-Flight payment, since that would be unsafe.
|
||||
*
|
||||
* @generated from protobuf rpc: DeletePayment(lnrpc.DeletePaymentRequest) returns (lnrpc.DeletePaymentResponse);
|
||||
*/
|
||||
deletePayment(input: DeletePaymentRequest, options?: RpcOptions): UnaryCall<DeletePaymentRequest, DeletePaymentResponse>;
|
||||
/**
|
||||
*
|
||||
* DeleteAllPayments deletes all outgoing payments from DB. Note that it will
|
||||
* not attempt to delete In-Flight payments, since that would be unsafe.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllPayments(lnrpc.DeleteAllPaymentsRequest) returns (lnrpc.DeleteAllPaymentsResponse);
|
||||
*/
|
||||
|
|
@ -631,8 +667,9 @@ export interface ILightningClient {
|
|||
* lncli: `fwdinghistory`
|
||||
* ForwardingHistory allows the caller to query the htlcswitch for a record of
|
||||
* all HTLCs forwarded within the target time range, and integer offset
|
||||
* within that time range. If no time-range is specified, then the first chunk
|
||||
* of the past 24 hrs of forwarding history are returned.
|
||||
* within that time range, for a maximum number of events. If no maximum number
|
||||
* of events is specified, up to 100 events will be returned. If no time-range
|
||||
* is specified, then events will be returned in the order that they occured.
|
||||
*
|
||||
* A list of forwarding events are returned. The size of each forwarding event
|
||||
* is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
|
||||
|
|
@ -730,6 +767,61 @@ export interface ILightningClient {
|
|||
* @generated from protobuf rpc: ListPermissions(lnrpc.ListPermissionsRequest) returns (lnrpc.ListPermissionsResponse);
|
||||
*/
|
||||
listPermissions(input: ListPermissionsRequest, options?: RpcOptions): UnaryCall<ListPermissionsRequest, ListPermissionsResponse>;
|
||||
/**
|
||||
*
|
||||
* CheckMacaroonPermissions checks whether a request follows the constraints
|
||||
* imposed on the macaroon and that the macaroon is authorized to follow the
|
||||
* provided permissions.
|
||||
*
|
||||
* @generated from protobuf rpc: CheckMacaroonPermissions(lnrpc.CheckMacPermRequest) returns (lnrpc.CheckMacPermResponse);
|
||||
*/
|
||||
checkMacaroonPermissions(input: CheckMacPermRequest, options?: RpcOptions): UnaryCall<CheckMacPermRequest, CheckMacPermResponse>;
|
||||
/**
|
||||
*
|
||||
* RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A
|
||||
* gRPC middleware is software component external to lnd that aims to add
|
||||
* additional business logic to lnd by observing/intercepting/validating
|
||||
* incoming gRPC client requests and (if needed) replacing/overwriting outgoing
|
||||
* messages before they're sent to the client. When registering the middleware
|
||||
* must identify itself and indicate what custom macaroon caveats it wants to
|
||||
* be responsible for. Only requests that contain a macaroon with that specific
|
||||
* custom caveat are then sent to the middleware for inspection. The other
|
||||
* option is to register for the read-only mode in which all requests/responses
|
||||
* are forwarded for interception to the middleware but the middleware is not
|
||||
* allowed to modify any responses. As a security measure, _no_ middleware can
|
||||
* modify responses for requests made with _unencumbered_ macaroons!
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterRPCMiddleware(stream lnrpc.RPCMiddlewareResponse) returns (stream lnrpc.RPCMiddlewareRequest);
|
||||
*/
|
||||
registerRPCMiddleware(options?: RpcOptions): DuplexStreamingCall<RPCMiddlewareResponse, RPCMiddlewareRequest>;
|
||||
/**
|
||||
* lncli: `sendcustom`
|
||||
* SendCustomMessage sends a custom peer message.
|
||||
*
|
||||
* @generated from protobuf rpc: SendCustomMessage(lnrpc.SendCustomMessageRequest) returns (lnrpc.SendCustomMessageResponse);
|
||||
*/
|
||||
sendCustomMessage(input: SendCustomMessageRequest, options?: RpcOptions): UnaryCall<SendCustomMessageRequest, SendCustomMessageResponse>;
|
||||
/**
|
||||
* lncli: `subscribecustom`
|
||||
* SubscribeCustomMessages subscribes to a stream of incoming custom peer
|
||||
* messages.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeCustomMessages(lnrpc.SubscribeCustomMessagesRequest) returns (stream lnrpc.CustomMessage);
|
||||
*/
|
||||
subscribeCustomMessages(input: SubscribeCustomMessagesRequest, options?: RpcOptions): ServerStreamingCall<SubscribeCustomMessagesRequest, CustomMessage>;
|
||||
/**
|
||||
* lncli: `listaliases`
|
||||
* ListAliases returns the set of all aliases that have ever existed with
|
||||
* their confirmed SCID (if it exists) and/or the base SCID (in the case of
|
||||
* zero conf).
|
||||
*
|
||||
* @generated from protobuf rpc: ListAliases(lnrpc.ListAliasesRequest) returns (lnrpc.ListAliasesResponse);
|
||||
*/
|
||||
listAliases(input: ListAliasesRequest, options?: RpcOptions): UnaryCall<ListAliasesRequest, ListAliasesResponse>;
|
||||
/**
|
||||
* @generated from protobuf rpc: LookupHtlc(lnrpc.LookupHtlcRequest) returns (lnrpc.LookupHtlcResponse);
|
||||
*/
|
||||
lookupHtlc(input: LookupHtlcRequest, options?: RpcOptions): UnaryCall<LookupHtlcRequest, LookupHtlcResponse>;
|
||||
}
|
||||
//
|
||||
// Comments in this file will be directly parsed into the API
|
||||
|
|
@ -1047,6 +1139,20 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
const method = this.methods[22], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<OpenChannelRequest, OpenStatusUpdate>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* lncli: `batchopenchannel`
|
||||
* BatchOpenChannel attempts to open multiple single-funded channels in a
|
||||
* single transaction in an atomic way. This means either all channel open
|
||||
* requests succeed at once or all attempts are aborted if any of them fail.
|
||||
* This is the safer variant of using PSBTs to manually fund a batch of
|
||||
* channels through the OpenChannel RPC.
|
||||
*
|
||||
* @generated from protobuf rpc: BatchOpenChannel(lnrpc.BatchOpenChannelRequest) returns (lnrpc.BatchOpenChannelResponse);
|
||||
*/
|
||||
batchOpenChannel(input: BatchOpenChannelRequest, options?: RpcOptions): UnaryCall<BatchOpenChannelRequest, BatchOpenChannelResponse> {
|
||||
const method = this.methods[23], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<BatchOpenChannelRequest, BatchOpenChannelResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* FundingStateStep is an advanced funding related call that allows the caller
|
||||
|
|
@ -1061,7 +1167,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: FundingStateStep(lnrpc.FundingTransitionMsg) returns (lnrpc.FundingStateStepResp);
|
||||
*/
|
||||
fundingStateStep(input: FundingTransitionMsg, options?: RpcOptions): UnaryCall<FundingTransitionMsg, FundingStateStepResp> {
|
||||
const method = this.methods[23], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[24], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<FundingTransitionMsg, FundingStateStepResp>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1075,7 +1181,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ChannelAcceptor(stream lnrpc.ChannelAcceptResponse) returns (stream lnrpc.ChannelAcceptRequest);
|
||||
*/
|
||||
channelAcceptor(options?: RpcOptions): DuplexStreamingCall<ChannelAcceptResponse, ChannelAcceptRequest> {
|
||||
const method = this.methods[24], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[25], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ChannelAcceptResponse, ChannelAcceptRequest>("duplex", this._transport, method, opt);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1091,7 +1197,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: CloseChannel(lnrpc.CloseChannelRequest) returns (stream lnrpc.CloseStatusUpdate);
|
||||
*/
|
||||
closeChannel(input: CloseChannelRequest, options?: RpcOptions): ServerStreamingCall<CloseChannelRequest, CloseStatusUpdate> {
|
||||
const method = this.methods[25], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[26], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<CloseChannelRequest, CloseStatusUpdate>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1106,7 +1212,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: AbandonChannel(lnrpc.AbandonChannelRequest) returns (lnrpc.AbandonChannelResponse);
|
||||
*/
|
||||
abandonChannel(input: AbandonChannelRequest, options?: RpcOptions): UnaryCall<AbandonChannelRequest, AbandonChannelResponse> {
|
||||
const method = this.methods[26], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[27], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<AbandonChannelRequest, AbandonChannelResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1121,7 +1227,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SendPayment(stream lnrpc.SendRequest) returns (stream lnrpc.SendResponse);
|
||||
*/
|
||||
sendPayment(options?: RpcOptions): DuplexStreamingCall<SendRequest, SendResponse> {
|
||||
const method = this.methods[27], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[28], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendRequest, SendResponse>("duplex", this._transport, method, opt);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1134,7 +1240,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SendPaymentSync(lnrpc.SendRequest) returns (lnrpc.SendResponse);
|
||||
*/
|
||||
sendPaymentSync(input: SendRequest, options?: RpcOptions): UnaryCall<SendRequest, SendResponse> {
|
||||
const method = this.methods[28], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[29], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendRequest, SendResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1149,7 +1255,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SendToRoute(stream lnrpc.SendToRouteRequest) returns (stream lnrpc.SendResponse);
|
||||
*/
|
||||
sendToRoute(options?: RpcOptions): DuplexStreamingCall<SendToRouteRequest, SendResponse> {
|
||||
const method = this.methods[29], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[30], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, SendResponse>("duplex", this._transport, method, opt);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1160,7 +1266,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SendToRouteSync(lnrpc.SendToRouteRequest) returns (lnrpc.SendResponse);
|
||||
*/
|
||||
sendToRouteSync(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, SendResponse> {
|
||||
const method = this.methods[30], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[31], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, SendResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1172,7 +1278,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: AddInvoice(lnrpc.Invoice) returns (lnrpc.AddInvoiceResponse);
|
||||
*/
|
||||
addInvoice(input: Invoice, options?: RpcOptions): UnaryCall<Invoice, AddInvoiceResponse> {
|
||||
const method = this.methods[31], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[32], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<Invoice, AddInvoiceResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1188,7 +1294,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ListInvoices(lnrpc.ListInvoiceRequest) returns (lnrpc.ListInvoiceResponse);
|
||||
*/
|
||||
listInvoices(input: ListInvoiceRequest, options?: RpcOptions): UnaryCall<ListInvoiceRequest, ListInvoiceResponse> {
|
||||
const method = this.methods[32], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[33], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ListInvoiceRequest, ListInvoiceResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1200,7 +1306,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: LookupInvoice(lnrpc.PaymentHash) returns (lnrpc.Invoice);
|
||||
*/
|
||||
lookupInvoice(input: PaymentHash, options?: RpcOptions): UnaryCall<PaymentHash, Invoice> {
|
||||
const method = this.methods[33], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[34], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<PaymentHash, Invoice>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1218,7 +1324,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SubscribeInvoices(lnrpc.InvoiceSubscription) returns (stream lnrpc.Invoice);
|
||||
*/
|
||||
subscribeInvoices(input: InvoiceSubscription, options?: RpcOptions): ServerStreamingCall<InvoiceSubscription, Invoice> {
|
||||
const method = this.methods[34], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[35], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<InvoiceSubscription, Invoice>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1230,7 +1336,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: DecodePayReq(lnrpc.PayReqString) returns (lnrpc.PayReq);
|
||||
*/
|
||||
decodePayReq(input: PayReqString, options?: RpcOptions): UnaryCall<PayReqString, PayReq> {
|
||||
const method = this.methods[35], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[36], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<PayReqString, PayReq>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1240,17 +1346,29 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ListPayments(lnrpc.ListPaymentsRequest) returns (lnrpc.ListPaymentsResponse);
|
||||
*/
|
||||
listPayments(input: ListPaymentsRequest, options?: RpcOptions): UnaryCall<ListPaymentsRequest, ListPaymentsResponse> {
|
||||
const method = this.methods[36], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[37], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ListPaymentsRequest, ListPaymentsResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* DeleteAllPayments deletes all outgoing payments from DB.
|
||||
* DeletePayment deletes an outgoing payment from DB. Note that it will not
|
||||
* attempt to delete an In-Flight payment, since that would be unsafe.
|
||||
*
|
||||
* @generated from protobuf rpc: DeletePayment(lnrpc.DeletePaymentRequest) returns (lnrpc.DeletePaymentResponse);
|
||||
*/
|
||||
deletePayment(input: DeletePaymentRequest, options?: RpcOptions): UnaryCall<DeletePaymentRequest, DeletePaymentResponse> {
|
||||
const method = this.methods[38], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<DeletePaymentRequest, DeletePaymentResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* DeleteAllPayments deletes all outgoing payments from DB. Note that it will
|
||||
* not attempt to delete In-Flight payments, since that would be unsafe.
|
||||
*
|
||||
* @generated from protobuf rpc: DeleteAllPayments(lnrpc.DeleteAllPaymentsRequest) returns (lnrpc.DeleteAllPaymentsResponse);
|
||||
*/
|
||||
deleteAllPayments(input: DeleteAllPaymentsRequest, options?: RpcOptions): UnaryCall<DeleteAllPaymentsRequest, DeleteAllPaymentsResponse> {
|
||||
const method = this.methods[37], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[39], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<DeleteAllPaymentsRequest, DeleteAllPaymentsResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1265,7 +1383,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: DescribeGraph(lnrpc.ChannelGraphRequest) returns (lnrpc.ChannelGraph);
|
||||
*/
|
||||
describeGraph(input: ChannelGraphRequest, options?: RpcOptions): UnaryCall<ChannelGraphRequest, ChannelGraph> {
|
||||
const method = this.methods[38], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[40], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ChannelGraphRequest, ChannelGraph>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1276,7 +1394,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: GetNodeMetrics(lnrpc.NodeMetricsRequest) returns (lnrpc.NodeMetricsResponse);
|
||||
*/
|
||||
getNodeMetrics(input: NodeMetricsRequest, options?: RpcOptions): UnaryCall<NodeMetricsRequest, NodeMetricsResponse> {
|
||||
const method = this.methods[39], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[41], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<NodeMetricsRequest, NodeMetricsResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1289,7 +1407,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: GetChanInfo(lnrpc.ChanInfoRequest) returns (lnrpc.ChannelEdge);
|
||||
*/
|
||||
getChanInfo(input: ChanInfoRequest, options?: RpcOptions): UnaryCall<ChanInfoRequest, ChannelEdge> {
|
||||
const method = this.methods[40], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[42], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ChanInfoRequest, ChannelEdge>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1300,7 +1418,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: GetNodeInfo(lnrpc.NodeInfoRequest) returns (lnrpc.NodeInfo);
|
||||
*/
|
||||
getNodeInfo(input: NodeInfoRequest, options?: RpcOptions): UnaryCall<NodeInfoRequest, NodeInfo> {
|
||||
const method = this.methods[41], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[43], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<NodeInfoRequest, NodeInfo>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1319,7 +1437,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: QueryRoutes(lnrpc.QueryRoutesRequest) returns (lnrpc.QueryRoutesResponse);
|
||||
*/
|
||||
queryRoutes(input: QueryRoutesRequest, options?: RpcOptions): UnaryCall<QueryRoutesRequest, QueryRoutesResponse> {
|
||||
const method = this.methods[42], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[44], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<QueryRoutesRequest, QueryRoutesResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1330,7 +1448,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: GetNetworkInfo(lnrpc.NetworkInfoRequest) returns (lnrpc.NetworkInfo);
|
||||
*/
|
||||
getNetworkInfo(input: NetworkInfoRequest, options?: RpcOptions): UnaryCall<NetworkInfoRequest, NetworkInfo> {
|
||||
const method = this.methods[43], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[45], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<NetworkInfoRequest, NetworkInfo>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1341,7 +1459,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: StopDaemon(lnrpc.StopRequest) returns (lnrpc.StopResponse);
|
||||
*/
|
||||
stopDaemon(input: StopRequest, options?: RpcOptions): UnaryCall<StopRequest, StopResponse> {
|
||||
const method = this.methods[44], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[46], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<StopRequest, StopResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1356,7 +1474,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SubscribeChannelGraph(lnrpc.GraphTopologySubscription) returns (stream lnrpc.GraphTopologyUpdate);
|
||||
*/
|
||||
subscribeChannelGraph(input: GraphTopologySubscription, options?: RpcOptions): ServerStreamingCall<GraphTopologySubscription, GraphTopologyUpdate> {
|
||||
const method = this.methods[45], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[47], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<GraphTopologySubscription, GraphTopologyUpdate>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1369,7 +1487,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: DebugLevel(lnrpc.DebugLevelRequest) returns (lnrpc.DebugLevelResponse);
|
||||
*/
|
||||
debugLevel(input: DebugLevelRequest, options?: RpcOptions): UnaryCall<DebugLevelRequest, DebugLevelResponse> {
|
||||
const method = this.methods[46], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[48], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<DebugLevelRequest, DebugLevelResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1380,7 +1498,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: FeeReport(lnrpc.FeeReportRequest) returns (lnrpc.FeeReportResponse);
|
||||
*/
|
||||
feeReport(input: FeeReportRequest, options?: RpcOptions): UnaryCall<FeeReportRequest, FeeReportResponse> {
|
||||
const method = this.methods[47], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[49], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<FeeReportRequest, FeeReportResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1391,15 +1509,16 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: UpdateChannelPolicy(lnrpc.PolicyUpdateRequest) returns (lnrpc.PolicyUpdateResponse);
|
||||
*/
|
||||
updateChannelPolicy(input: PolicyUpdateRequest, options?: RpcOptions): UnaryCall<PolicyUpdateRequest, PolicyUpdateResponse> {
|
||||
const method = this.methods[48], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[50], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<PolicyUpdateRequest, PolicyUpdateResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* lncli: `fwdinghistory`
|
||||
* ForwardingHistory allows the caller to query the htlcswitch for a record of
|
||||
* all HTLCs forwarded within the target time range, and integer offset
|
||||
* within that time range. If no time-range is specified, then the first chunk
|
||||
* of the past 24 hrs of forwarding history are returned.
|
||||
* within that time range, for a maximum number of events. If no maximum number
|
||||
* of events is specified, up to 100 events will be returned. If no time-range
|
||||
* is specified, then events will be returned in the order that they occured.
|
||||
*
|
||||
* A list of forwarding events are returned. The size of each forwarding event
|
||||
* is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
|
||||
|
|
@ -1410,7 +1529,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ForwardingHistory(lnrpc.ForwardingHistoryRequest) returns (lnrpc.ForwardingHistoryResponse);
|
||||
*/
|
||||
forwardingHistory(input: ForwardingHistoryRequest, options?: RpcOptions): UnaryCall<ForwardingHistoryRequest, ForwardingHistoryResponse> {
|
||||
const method = this.methods[49], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[51], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ForwardingHistoryRequest, ForwardingHistoryResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1425,7 +1544,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ExportChannelBackup(lnrpc.ExportChannelBackupRequest) returns (lnrpc.ChannelBackup);
|
||||
*/
|
||||
exportChannelBackup(input: ExportChannelBackupRequest, options?: RpcOptions): UnaryCall<ExportChannelBackupRequest, ChannelBackup> {
|
||||
const method = this.methods[50], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[52], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ExportChannelBackupRequest, ChannelBackup>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1439,7 +1558,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ExportAllChannelBackups(lnrpc.ChanBackupExportRequest) returns (lnrpc.ChanBackupSnapshot);
|
||||
*/
|
||||
exportAllChannelBackups(input: ChanBackupExportRequest, options?: RpcOptions): UnaryCall<ChanBackupExportRequest, ChanBackupSnapshot> {
|
||||
const method = this.methods[51], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[53], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ChanBackupExportRequest, ChanBackupSnapshot>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1451,7 +1570,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: VerifyChanBackup(lnrpc.ChanBackupSnapshot) returns (lnrpc.VerifyChanBackupResponse);
|
||||
*/
|
||||
verifyChanBackup(input: ChanBackupSnapshot, options?: RpcOptions): UnaryCall<ChanBackupSnapshot, VerifyChanBackupResponse> {
|
||||
const method = this.methods[52], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[54], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ChanBackupSnapshot, VerifyChanBackupResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1464,7 +1583,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: RestoreChannelBackups(lnrpc.RestoreChanBackupRequest) returns (lnrpc.RestoreBackupResponse);
|
||||
*/
|
||||
restoreChannelBackups(input: RestoreChanBackupRequest, options?: RpcOptions): UnaryCall<RestoreChanBackupRequest, RestoreBackupResponse> {
|
||||
const method = this.methods[53], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[55], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<RestoreChanBackupRequest, RestoreBackupResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1480,7 +1599,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SubscribeChannelBackups(lnrpc.ChannelBackupSubscription) returns (stream lnrpc.ChanBackupSnapshot);
|
||||
*/
|
||||
subscribeChannelBackups(input: ChannelBackupSubscription, options?: RpcOptions): ServerStreamingCall<ChannelBackupSubscription, ChanBackupSnapshot> {
|
||||
const method = this.methods[54], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[56], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ChannelBackupSubscription, ChanBackupSnapshot>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1492,7 +1611,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: BakeMacaroon(lnrpc.BakeMacaroonRequest) returns (lnrpc.BakeMacaroonResponse);
|
||||
*/
|
||||
bakeMacaroon(input: BakeMacaroonRequest, options?: RpcOptions): UnaryCall<BakeMacaroonRequest, BakeMacaroonResponse> {
|
||||
const method = this.methods[55], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[57], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<BakeMacaroonRequest, BakeMacaroonResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1502,7 +1621,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ListMacaroonIDs(lnrpc.ListMacaroonIDsRequest) returns (lnrpc.ListMacaroonIDsResponse);
|
||||
*/
|
||||
listMacaroonIDs(input: ListMacaroonIDsRequest, options?: RpcOptions): UnaryCall<ListMacaroonIDsRequest, ListMacaroonIDsResponse> {
|
||||
const method = this.methods[56], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[58], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ListMacaroonIDsRequest, ListMacaroonIDsResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1513,7 +1632,7 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: DeleteMacaroonID(lnrpc.DeleteMacaroonIDRequest) returns (lnrpc.DeleteMacaroonIDResponse);
|
||||
*/
|
||||
deleteMacaroonID(input: DeleteMacaroonIDRequest, options?: RpcOptions): UnaryCall<DeleteMacaroonIDRequest, DeleteMacaroonIDResponse> {
|
||||
const method = this.methods[57], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[59], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<DeleteMacaroonIDRequest, DeleteMacaroonIDResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -1524,7 +1643,80 @@ export class LightningClient implements ILightningClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ListPermissions(lnrpc.ListPermissionsRequest) returns (lnrpc.ListPermissionsResponse);
|
||||
*/
|
||||
listPermissions(input: ListPermissionsRequest, options?: RpcOptions): UnaryCall<ListPermissionsRequest, ListPermissionsResponse> {
|
||||
const method = this.methods[58], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[60], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ListPermissionsRequest, ListPermissionsResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* CheckMacaroonPermissions checks whether a request follows the constraints
|
||||
* imposed on the macaroon and that the macaroon is authorized to follow the
|
||||
* provided permissions.
|
||||
*
|
||||
* @generated from protobuf rpc: CheckMacaroonPermissions(lnrpc.CheckMacPermRequest) returns (lnrpc.CheckMacPermResponse);
|
||||
*/
|
||||
checkMacaroonPermissions(input: CheckMacPermRequest, options?: RpcOptions): UnaryCall<CheckMacPermRequest, CheckMacPermResponse> {
|
||||
const method = this.methods[61], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<CheckMacPermRequest, CheckMacPermResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A
|
||||
* gRPC middleware is software component external to lnd that aims to add
|
||||
* additional business logic to lnd by observing/intercepting/validating
|
||||
* incoming gRPC client requests and (if needed) replacing/overwriting outgoing
|
||||
* messages before they're sent to the client. When registering the middleware
|
||||
* must identify itself and indicate what custom macaroon caveats it wants to
|
||||
* be responsible for. Only requests that contain a macaroon with that specific
|
||||
* custom caveat are then sent to the middleware for inspection. The other
|
||||
* option is to register for the read-only mode in which all requests/responses
|
||||
* are forwarded for interception to the middleware but the middleware is not
|
||||
* allowed to modify any responses. As a security measure, _no_ middleware can
|
||||
* modify responses for requests made with _unencumbered_ macaroons!
|
||||
*
|
||||
* @generated from protobuf rpc: RegisterRPCMiddleware(stream lnrpc.RPCMiddlewareResponse) returns (stream lnrpc.RPCMiddlewareRequest);
|
||||
*/
|
||||
registerRPCMiddleware(options?: RpcOptions): DuplexStreamingCall<RPCMiddlewareResponse, RPCMiddlewareRequest> {
|
||||
const method = this.methods[62], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<RPCMiddlewareResponse, RPCMiddlewareRequest>("duplex", this._transport, method, opt);
|
||||
}
|
||||
/**
|
||||
* lncli: `sendcustom`
|
||||
* SendCustomMessage sends a custom peer message.
|
||||
*
|
||||
* @generated from protobuf rpc: SendCustomMessage(lnrpc.SendCustomMessageRequest) returns (lnrpc.SendCustomMessageResponse);
|
||||
*/
|
||||
sendCustomMessage(input: SendCustomMessageRequest, options?: RpcOptions): UnaryCall<SendCustomMessageRequest, SendCustomMessageResponse> {
|
||||
const method = this.methods[63], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendCustomMessageRequest, SendCustomMessageResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* lncli: `subscribecustom`
|
||||
* SubscribeCustomMessages subscribes to a stream of incoming custom peer
|
||||
* messages.
|
||||
*
|
||||
* @generated from protobuf rpc: SubscribeCustomMessages(lnrpc.SubscribeCustomMessagesRequest) returns (stream lnrpc.CustomMessage);
|
||||
*/
|
||||
subscribeCustomMessages(input: SubscribeCustomMessagesRequest, options?: RpcOptions): ServerStreamingCall<SubscribeCustomMessagesRequest, CustomMessage> {
|
||||
const method = this.methods[64], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SubscribeCustomMessagesRequest, CustomMessage>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* lncli: `listaliases`
|
||||
* ListAliases returns the set of all aliases that have ever existed with
|
||||
* their confirmed SCID (if it exists) and/or the base SCID (in the case of
|
||||
* zero conf).
|
||||
*
|
||||
* @generated from protobuf rpc: ListAliases(lnrpc.ListAliasesRequest) returns (lnrpc.ListAliasesResponse);
|
||||
*/
|
||||
listAliases(input: ListAliasesRequest, options?: RpcOptions): UnaryCall<ListAliasesRequest, ListAliasesResponse> {
|
||||
const method = this.methods[65], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ListAliasesRequest, ListAliasesResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: LookupHtlc(lnrpc.LookupHtlcRequest) returns (lnrpc.LookupHtlcResponse);
|
||||
*/
|
||||
lookupHtlc(input: LookupHtlcRequest, options?: RpcOptions): UnaryCall<LookupHtlcRequest, LookupHtlcResponse> {
|
||||
const method = this.methods[66], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<LookupHtlcRequest, LookupHtlcResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
|||
// @generated by protobuf-ts 2.5.0 with parameter long_type_string
|
||||
// @generated by protobuf-ts 2.5.0
|
||||
// @generated from protobuf file "router.proto" (package "routerrpc", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
|
|
@ -26,15 +26,16 @@ import type { QueryMissionControlResponse } from "./router";
|
|||
import type { QueryMissionControlRequest } from "./router";
|
||||
import type { ResetMissionControlResponse } from "./router";
|
||||
import type { ResetMissionControlRequest } from "./router";
|
||||
import type { HTLCAttempt } from "./rpc";
|
||||
import type { HTLCAttempt } from "./lightning";
|
||||
import type { SendToRouteResponse } from "./router";
|
||||
import type { SendToRouteRequest } from "./router";
|
||||
import type { RouteFeeResponse } from "./router";
|
||||
import type { RouteFeeRequest } from "./router";
|
||||
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { TrackPaymentsRequest } from "./router";
|
||||
import type { TrackPaymentRequest } from "./router";
|
||||
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
||||
import type { Payment } from "./rpc";
|
||||
import type { Payment } from "./lightning";
|
||||
import type { SendPaymentRequest } from "./router";
|
||||
import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
|
||||
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
||||
|
|
@ -62,6 +63,18 @@ export interface IRouterClient {
|
|||
* @generated from protobuf rpc: TrackPaymentV2(routerrpc.TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPaymentV2(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* TrackPayments returns an update stream for every payment that is not in a
|
||||
* terminal state. Note that if payments are in-flight while starting a new
|
||||
* subscription, the start of the payment stream could produce out-of-order
|
||||
* and/or duplicate events. In order to get updates for every in-flight
|
||||
* payment attempt make sure to subscribe to this method before initiating any
|
||||
* payments.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPayments(routerrpc.TrackPaymentsRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPayments(input: TrackPaymentsRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentsRequest, Payment>;
|
||||
/**
|
||||
*
|
||||
* EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
|
|
@ -234,6 +247,21 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* TrackPayments returns an update stream for every payment that is not in a
|
||||
* terminal state. Note that if payments are in-flight while starting a new
|
||||
* subscription, the start of the payment stream could produce out-of-order
|
||||
* and/or duplicate events. In order to get updates for every in-flight
|
||||
* payment attempt make sure to subscribe to this method before initiating any
|
||||
* payments.
|
||||
*
|
||||
* @generated from protobuf rpc: TrackPayments(routerrpc.TrackPaymentsRequest) returns (stream lnrpc.Payment);
|
||||
*/
|
||||
trackPayments(input: TrackPaymentsRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentsRequest, Payment> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentsRequest, Payment>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
|
|
@ -242,7 +270,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: EstimateRouteFee(routerrpc.RouteFeeRequest) returns (routerrpc.RouteFeeResponse);
|
||||
*/
|
||||
estimateRouteFee(input: RouteFeeRequest, options?: RpcOptions): UnaryCall<RouteFeeRequest, RouteFeeResponse> {
|
||||
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<RouteFeeRequest, RouteFeeResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -257,7 +285,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SendToRoute(routerrpc.SendToRouteRequest) returns (routerrpc.SendToRouteResponse);
|
||||
*/
|
||||
sendToRoute(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, SendToRouteResponse> {
|
||||
const method = this.methods[3], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, SendToRouteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -270,7 +298,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SendToRouteV2(routerrpc.SendToRouteRequest) returns (lnrpc.HTLCAttempt);
|
||||
*/
|
||||
sendToRouteV2(input: SendToRouteRequest, options?: RpcOptions): UnaryCall<SendToRouteRequest, HTLCAttempt> {
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendToRouteRequest, HTLCAttempt>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -281,7 +309,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: ResetMissionControl(routerrpc.ResetMissionControlRequest) returns (routerrpc.ResetMissionControlResponse);
|
||||
*/
|
||||
resetMissionControl(input: ResetMissionControlRequest, options?: RpcOptions): UnaryCall<ResetMissionControlRequest, ResetMissionControlResponse> {
|
||||
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ResetMissionControlRequest, ResetMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -292,7 +320,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: QueryMissionControl(routerrpc.QueryMissionControlRequest) returns (routerrpc.QueryMissionControlResponse);
|
||||
*/
|
||||
queryMissionControl(input: QueryMissionControlRequest, options?: RpcOptions): UnaryCall<QueryMissionControlRequest, QueryMissionControlResponse> {
|
||||
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<QueryMissionControlRequest, QueryMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -305,7 +333,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: XImportMissionControl(routerrpc.XImportMissionControlRequest) returns (routerrpc.XImportMissionControlResponse);
|
||||
*/
|
||||
xImportMissionControl(input: XImportMissionControlRequest, options?: RpcOptions): UnaryCall<XImportMissionControlRequest, XImportMissionControlResponse> {
|
||||
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<XImportMissionControlRequest, XImportMissionControlResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -315,7 +343,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: GetMissionControlConfig(routerrpc.GetMissionControlConfigRequest) returns (routerrpc.GetMissionControlConfigResponse);
|
||||
*/
|
||||
getMissionControlConfig(input: GetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<GetMissionControlConfigRequest, GetMissionControlConfigResponse> {
|
||||
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<GetMissionControlConfigRequest, GetMissionControlConfigResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -326,7 +354,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SetMissionControlConfig(routerrpc.SetMissionControlConfigRequest) returns (routerrpc.SetMissionControlConfigResponse);
|
||||
*/
|
||||
setMissionControlConfig(input: SetMissionControlConfigRequest, options?: RpcOptions): UnaryCall<SetMissionControlConfigRequest, SetMissionControlConfigResponse> {
|
||||
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SetMissionControlConfigRequest, SetMissionControlConfigResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -337,7 +365,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: QueryProbability(routerrpc.QueryProbabilityRequest) returns (routerrpc.QueryProbabilityResponse);
|
||||
*/
|
||||
queryProbability(input: QueryProbabilityRequest, options?: RpcOptions): UnaryCall<QueryProbabilityRequest, QueryProbabilityResponse> {
|
||||
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[11], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<QueryProbabilityRequest, QueryProbabilityResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -349,7 +377,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: BuildRoute(routerrpc.BuildRouteRequest) returns (routerrpc.BuildRouteResponse);
|
||||
*/
|
||||
buildRoute(input: BuildRouteRequest, options?: RpcOptions): UnaryCall<BuildRouteRequest, BuildRouteResponse> {
|
||||
const method = this.methods[11], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[12], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<BuildRouteRequest, BuildRouteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -360,7 +388,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SubscribeHtlcEvents(routerrpc.SubscribeHtlcEventsRequest) returns (stream routerrpc.HtlcEvent);
|
||||
*/
|
||||
subscribeHtlcEvents(input: SubscribeHtlcEventsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeHtlcEventsRequest, HtlcEvent> {
|
||||
const method = this.methods[12], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[13], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SubscribeHtlcEventsRequest, HtlcEvent>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -373,7 +401,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: SendPayment(routerrpc.SendPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
sendPayment(input: SendPaymentRequest, options?: RpcOptions): ServerStreamingCall<SendPaymentRequest, PaymentStatus> {
|
||||
const method = this.methods[13], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[14], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<SendPaymentRequest, PaymentStatus>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -385,7 +413,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: TrackPayment(routerrpc.TrackPaymentRequest) returns (stream routerrpc.PaymentStatus);
|
||||
*/
|
||||
trackPayment(input: TrackPaymentRequest, options?: RpcOptions): ServerStreamingCall<TrackPaymentRequest, PaymentStatus> {
|
||||
const method = this.methods[14], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[15], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<TrackPaymentRequest, PaymentStatus>("serverStreaming", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
|
|
@ -399,7 +427,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: HtlcInterceptor(stream routerrpc.ForwardHtlcInterceptResponse) returns (stream routerrpc.ForwardHtlcInterceptRequest);
|
||||
*/
|
||||
htlcInterceptor(options?: RpcOptions): DuplexStreamingCall<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest> {
|
||||
const method = this.methods[15], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[16], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ForwardHtlcInterceptResponse, ForwardHtlcInterceptRequest>("duplex", this._transport, method, opt);
|
||||
}
|
||||
/**
|
||||
|
|
@ -412,7 +440,7 @@ export class RouterClient implements IRouterClient, ServiceInfo {
|
|||
* @generated from protobuf rpc: UpdateChanStatus(routerrpc.UpdateChanStatusRequest) returns (routerrpc.UpdateChanStatusResponse);
|
||||
*/
|
||||
updateChanStatus(input: UpdateChanStatusRequest, options?: RpcOptions): UnaryCall<UpdateChanStatusRequest, UpdateChanStatusResponse> {
|
||||
const method = this.methods[16], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[17], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<UpdateChanStatusRequest, UpdateChanStatusResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
syntax = "proto3";
|
||||
|
||||
import "rpc.proto";
|
||||
import "lightning.proto";
|
||||
|
||||
package invoicesrpc;
|
||||
|
||||
|
|
@ -35,10 +35,17 @@ service Invoices {
|
|||
settled, this call will succeed.
|
||||
*/
|
||||
rpc SettleInvoice (SettleInvoiceMsg) returns (SettleInvoiceResp);
|
||||
|
||||
/*
|
||||
LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
|
||||
using either its payment hash, payment address, or set ID.
|
||||
*/
|
||||
rpc LookupInvoiceV2 (LookupInvoiceMsg) returns (lnrpc.Invoice);
|
||||
}
|
||||
|
||||
message CancelInvoiceMsg {
|
||||
// Hash corresponding to the (hold) invoice to cancel.
|
||||
// Hash corresponding to the (hold) invoice to cancel. When using
|
||||
// REST, this field must be encoded as base64.
|
||||
bytes payment_hash = 1;
|
||||
}
|
||||
message CancelInvoiceResp {
|
||||
|
|
@ -98,11 +105,26 @@ message AddHoldInvoiceRequest {
|
|||
|
||||
message AddHoldInvoiceResp {
|
||||
/*
|
||||
A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
details of the invoice, the sender has all the data necessary to send a
|
||||
payment to the recipient.
|
||||
*/
|
||||
string payment_request = 1;
|
||||
|
||||
/*
|
||||
The "add" index of this invoice. Each newly created invoice will increment
|
||||
this index making it monotonically increasing. Callers to the
|
||||
SubscribeInvoices call can use this to instantly get notified of all added
|
||||
invoices with an add_index greater than this one.
|
||||
*/
|
||||
uint64 add_index = 2;
|
||||
|
||||
/*
|
||||
The payment address of the generated invoice. This value should be used
|
||||
in all payments for this invoice as we require it for end to end
|
||||
security.
|
||||
*/
|
||||
bytes payment_addr = 3;
|
||||
}
|
||||
|
||||
message SettleInvoiceMsg {
|
||||
|
|
@ -117,6 +139,37 @@ message SettleInvoiceResp {
|
|||
message SubscribeSingleInvoiceRequest {
|
||||
reserved 1;
|
||||
|
||||
// Hash corresponding to the (hold) invoice to subscribe to.
|
||||
// Hash corresponding to the (hold) invoice to subscribe to. When using
|
||||
// REST, this field must be encoded as base64url.
|
||||
bytes r_hash = 2;
|
||||
}
|
||||
|
||||
enum LookupModifier {
|
||||
// The default look up modifier, no look up behavior is changed.
|
||||
DEFAULT = 0;
|
||||
|
||||
/*
|
||||
Indicates that when a look up is done based on a set_id, then only that set
|
||||
of HTLCs related to that set ID should be returned.
|
||||
*/
|
||||
HTLC_SET_ONLY = 1;
|
||||
|
||||
/*
|
||||
Indicates that when a look up is done using a payment_addr, then no HTLCs
|
||||
related to the payment_addr should be returned. This is useful when one
|
||||
wants to be able to obtain the set of associated setIDs with a given
|
||||
invoice, then look up the sub-invoices "projected" by that set ID.
|
||||
*/
|
||||
HTLC_SET_BLANK = 2;
|
||||
}
|
||||
|
||||
message LookupInvoiceMsg {
|
||||
oneof invoice_ref {
|
||||
// When using REST, this field must be encoded as base64.
|
||||
bytes payment_hash = 1;
|
||||
bytes payment_addr = 2;
|
||||
bytes set_id = 3;
|
||||
}
|
||||
|
||||
LookupModifier lookup_modifier = 4;
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
syntax = "proto3";
|
||||
|
||||
import "rpc.proto";
|
||||
import "lightning.proto";
|
||||
|
||||
package routerrpc;
|
||||
|
||||
|
|
@ -22,6 +22,16 @@ service Router {
|
|||
*/
|
||||
rpc TrackPaymentV2 (TrackPaymentRequest) returns (stream lnrpc.Payment);
|
||||
|
||||
/*
|
||||
TrackPayments returns an update stream for every payment that is not in a
|
||||
terminal state. Note that if payments are in-flight while starting a new
|
||||
subscription, the start of the payment stream could produce out-of-order
|
||||
and/or duplicate events. In order to get updates for every in-flight
|
||||
payment attempt make sure to subscribe to this method before initiating any
|
||||
payments.
|
||||
*/
|
||||
rpc TrackPayments (TrackPaymentsRequest) returns (stream lnrpc.Payment);
|
||||
|
||||
/*
|
||||
EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
|
||||
may cost to send an HTLC to the target end destination.
|
||||
|
|
@ -284,6 +294,12 @@ message SendPaymentRequest {
|
|||
If set, an AMP-payment will be attempted.
|
||||
*/
|
||||
bool amp = 22;
|
||||
|
||||
/*
|
||||
The time preference for this payment. Set to -1 to optimize for fees
|
||||
only, to 1 to optimize for reliability only or a value inbetween for a mix.
|
||||
*/
|
||||
double time_pref = 23;
|
||||
}
|
||||
|
||||
message TrackPaymentRequest {
|
||||
|
|
@ -297,6 +313,14 @@ message TrackPaymentRequest {
|
|||
bool no_inflight_updates = 2;
|
||||
}
|
||||
|
||||
message TrackPaymentsRequest {
|
||||
/*
|
||||
If set, only the final payment updates are streamed back. Intermediate
|
||||
updates that show which htlcs are still in flight are suppressed.
|
||||
*/
|
||||
bool no_inflight_updates = 1;
|
||||
}
|
||||
|
||||
message RouteFeeRequest {
|
||||
/*
|
||||
The destination once wishes to obtain a routing fee quote to.
|
||||
|
|
@ -330,6 +354,14 @@ message SendToRouteRequest {
|
|||
|
||||
// Route that should be used to attempt to complete the payment.
|
||||
lnrpc.Route route = 2;
|
||||
|
||||
/*
|
||||
Whether the payment should be marked as failed when a temporary error is
|
||||
returned from the given route. Set it to true so the payment won't be
|
||||
failed unless a terminal error is occurred, such as payment timeout, no
|
||||
routes, incorrect payment details, or insufficient funds.
|
||||
*/
|
||||
bool skip_temp_err = 3;
|
||||
}
|
||||
|
||||
message SendToRouteResponse {
|
||||
|
|
@ -360,6 +392,11 @@ message QueryMissionControlResponse {
|
|||
message XImportMissionControlRequest {
|
||||
// Node pair-level mission control state to be imported.
|
||||
repeated PairHistory pairs = 1;
|
||||
|
||||
// Whether to force override MC pair history. Note that even with force
|
||||
// override the failure pair is imported before the success pair and both
|
||||
// still clamp existing failure/success amounts.
|
||||
bool force = 2;
|
||||
}
|
||||
|
||||
message XImportMissionControlResponse {
|
||||
|
|
@ -581,6 +618,8 @@ message HtlcEvent {
|
|||
ForwardFailEvent forward_fail_event = 8;
|
||||
SettleEvent settle_event = 9;
|
||||
LinkFailEvent link_fail_event = 10;
|
||||
SubscribedEvent subscribed_event = 11;
|
||||
FinalHtlcEvent final_htlc_event = 12;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -607,6 +646,16 @@ message ForwardFailEvent {
|
|||
}
|
||||
|
||||
message SettleEvent {
|
||||
// The revealed preimage.
|
||||
bytes preimage = 1;
|
||||
}
|
||||
|
||||
message FinalHtlcEvent {
|
||||
bool settled = 1;
|
||||
bool offchain = 2;
|
||||
}
|
||||
|
||||
message SubscribedEvent {
|
||||
}
|
||||
|
||||
message LinkFailEvent {
|
||||
|
|
@ -676,7 +725,7 @@ enum PaymentState {
|
|||
FAILED_NO_ROUTE = 3;
|
||||
|
||||
/*
|
||||
A non-recoverable error has occured.
|
||||
A non-recoverable error has occurred.
|
||||
*/
|
||||
FAILED_ERROR = 4;
|
||||
|
||||
|
|
@ -753,6 +802,10 @@ message ForwardHtlcInterceptRequest {
|
|||
|
||||
// The onion blob for the next hop
|
||||
bytes onion_blob = 9;
|
||||
|
||||
// The block height at which this htlc will be auto-failed to prevent the
|
||||
// channel from force-closing.
|
||||
int32 auto_fail_height = 10;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -774,6 +827,21 @@ message ForwardHtlcInterceptResponse {
|
|||
|
||||
// The preimage in case the resolve action is Settle.
|
||||
bytes preimage = 3;
|
||||
|
||||
// Encrypted failure message in case the resolve action is Fail.
|
||||
//
|
||||
// If failure_message is specified, the failure_code field must be set
|
||||
// to zero.
|
||||
bytes failure_message = 4;
|
||||
|
||||
// Return the specified failure code in case the resolve action is Fail. The
|
||||
// message data fields are populated automatically.
|
||||
//
|
||||
// If a non-zero failure_code is specified, failure_message must not be set.
|
||||
//
|
||||
// For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the
|
||||
// default value for this field.
|
||||
lnrpc.Failure.FailureCode failure_code = 5;
|
||||
}
|
||||
|
||||
enum ResolveHoldForwardAction {
|
||||
|
|
@ -795,4 +863,4 @@ enum ChanStatusAction {
|
|||
}
|
||||
|
||||
message UpdateChanStatusResponse {
|
||||
}
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ service LightningPub {
|
|||
option (http_route) = "/api/user/auth";
|
||||
}
|
||||
// USER
|
||||
rpc NewAddress(structs.Empty) returns (structs.NewAddressResponse) {
|
||||
rpc NewAddress(structs.NewAddressRequest) returns (structs.NewAddressResponse) {
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/user/chain/new";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,14 @@ message LndGetInfoRequest {
|
|||
message LndGetInfoResponse {
|
||||
string alias = 1;
|
||||
}
|
||||
|
||||
enum AddressType {
|
||||
WITNESS_PUBKEY_HASH = 0;
|
||||
NESTED_PUBKEY_HASH = 1;
|
||||
TAPROOT_PUBKEY = 2;
|
||||
}
|
||||
message NewAddressRequest {
|
||||
AddressType address_type = 1;
|
||||
}
|
||||
message NewAddressResponse{
|
||||
string address = 1;
|
||||
}
|
||||
|
|
@ -41,7 +48,8 @@ message NewInvoiceResponse{
|
|||
}
|
||||
|
||||
message PayInvoiceRequest{
|
||||
string invoce = 1;
|
||||
string invoice = 1;
|
||||
int64 amount = 2;
|
||||
}
|
||||
|
||||
message PayInvoiceResponse{
|
||||
|
|
@ -50,8 +58,9 @@ message PayInvoiceResponse{
|
|||
|
||||
message OpenChannelRequest{
|
||||
string destination = 1;
|
||||
int64 channel_balance = 2;
|
||||
int64 funding_amount = 2;
|
||||
int64 push_amount = 3;
|
||||
string close_address = 4;
|
||||
}
|
||||
|
||||
message OpenChannelResponse{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue