mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
staticaddr: separate file for rpc service
This commit is contained in:
parent
439d178b96
commit
781d3a0cb4
4 changed files with 570 additions and 3790 deletions
3555
looprpc/client.pb.go
3555
looprpc/client.pb.go
File diff suppressed because it is too large
Load diff
|
|
@ -254,17 +254,6 @@
|
|||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "deposit_outpoints",
|
||||
"description": "Static address deposit outpoints that will be quoted for. This option only\npertains to loop in swaps. Either this or the amt parameter can be set at\nthe same time.",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "multi"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
|
|
@ -415,17 +404,6 @@
|
|||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "deposit_outpoints",
|
||||
"description": "Static address deposit outpoints that will be quoted for. This option only\npertains to loop in swaps. Either this or the amt parameter can be set at\nthe same time.",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "multi"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
|
|
@ -663,57 +641,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"looprpcDeposit": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "The identifier of the deposit."
|
||||
},
|
||||
"state": {
|
||||
"$ref": "#/definitions/looprpcDepositState",
|
||||
"description": "The state of the deposit."
|
||||
},
|
||||
"outpoint": {
|
||||
"type": "string",
|
||||
"description": "The outpoint of the deposit in format txid:index."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The value of the deposit in satoshis."
|
||||
},
|
||||
"confirmation_height": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The block height at which the deposit was confirmed."
|
||||
},
|
||||
"blocks_until_expiry": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The number of blocks that are left until the deposit cannot be used for a\nloop-in swap anymore."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcDepositState": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"UNKNOWN_STATE",
|
||||
"DEPOSITED",
|
||||
"WITHDRAWING",
|
||||
"WITHDRAWN",
|
||||
"LOOPING_IN",
|
||||
"LOOPED_IN",
|
||||
"SWEEP_HTLC_TIMEOUT",
|
||||
"HTLC_TIMEOUT_SWEPT",
|
||||
"PUBLISH_EXPIRED",
|
||||
"WAIT_FOR_EXPIRY_SWEEP",
|
||||
"EXPIRED"
|
||||
],
|
||||
"default": "UNKNOWN_STATE",
|
||||
"description": " - UNKNOWN_STATE: UNKNOWN_STATE is the default state of a deposit.\n - DEPOSITED: DEPOSITED indicates that the deposit has been sufficiently confirmed on\nchain.\n - WITHDRAWING: WITHDRAWING indicates that the deposit is currently being withdrawn. It\nflips to WITHDRAWN once the withdrawal transaction has been sufficiently\nconfirmed.\n - WITHDRAWN: WITHDRAWN indicates that the deposit has been withdrawn.\n - LOOPING_IN: LOOPING_IN indicates that the deposit is currently being used in a static\naddress loop-in swap.\n - LOOPED_IN: LOOPED_IN indicates that the deposit was used in a static address loop-in\nswap.\n - SWEEP_HTLC_TIMEOUT: SWEEP_HTLC_TIMEOUT indicates that the deposit is part of an active loop-in\nof which the respective htlc was published by the server and the timeout\npath has opened up for the client to sweep.\n - HTLC_TIMEOUT_SWEPT: HTLC_TIMEOUT_SWEPT indicates that the timeout path of the htlc has been\nswept by the client.\n - PUBLISH_EXPIRED: PUBLISH_EXPIRED indicates that the deposit has expired and the sweep\ntransaction has been published.\n - WAIT_FOR_EXPIRY_SWEEP: WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep\ntransaction has not yet been sufficiently confirmed.\n - EXPIRED: EXPIRED indicates that the deposit has expired and the sweep transaction\nhas been sufficiently confirmed."
|
||||
},
|
||||
"looprpcDisqualified": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -1157,30 +1084,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"looprpcListStaticAddressDepositsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"filtered_deposits": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/looprpcDeposit"
|
||||
},
|
||||
"description": "A list of all deposits that match the filtered state."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcListStaticAddressSwapsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"swaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/looprpcStaticAddressLoopInSwap"
|
||||
},
|
||||
"description": "A list of all swaps known static address loop-in swaps."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcListSwapsFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -1223,18 +1126,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"looprpcListUnspentDepositsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"utxos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/looprpcUtxo"
|
||||
},
|
||||
"description": "A list of utxos behind the static address."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcLoopInRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -1418,39 +1309,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"looprpcNewStaticAddressResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string",
|
||||
"description": "The taproot static address."
|
||||
},
|
||||
"expiry": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "The CSV expiry of the static address."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcOutPoint": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"txid_bytes": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Raw bytes representing the transaction id."
|
||||
},
|
||||
"txid_str": {
|
||||
"type": "string",
|
||||
"description": "Reversed, hex-encoded string representing the transaction id."
|
||||
},
|
||||
"output_index": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "The index of the output on the transaction."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcOutQuoteResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -1538,172 +1396,6 @@
|
|||
"looprpcSetLiquidityParamsResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"looprpcStaticAddressLoopInResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"swap_hash": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "The swap hash that identifies this swap."
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "The state the swap is in."
|
||||
},
|
||||
"amount": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "The amount of the swap."
|
||||
},
|
||||
"htlc_cltv": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "The htlc cltv expiry height of the swap."
|
||||
},
|
||||
"quoted_swap_fee_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The quoted swap fee in satoshis."
|
||||
},
|
||||
"max_swap_fee_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The maximum total swap fee the client is willing to pay for the swap."
|
||||
},
|
||||
"initiation_height": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "The block height at which the swap was initiated."
|
||||
},
|
||||
"protocol_version": {
|
||||
"type": "string",
|
||||
"description": "The static address protocol version."
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "An optional label for this swap."
|
||||
},
|
||||
"initiator": {
|
||||
"type": "string",
|
||||
"description": "An optional identification string that will be appended to the user agent\nstring sent to the server to give information about the usage of loop. This\ninitiator part is meant for user interfaces to add their name to give the\nfull picture of the binary used (loopd, LiT) and the method used for\ntriggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI)."
|
||||
},
|
||||
"payment_timeout_seconds": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "The swap payment timeout allows the user to specify an upper limit for the\namount of time the server is allowed to take to fulfill the off-chain swap\npayment. If the timeout is reached the swap will be aborted on the server\nside and the client can retry the swap with different parameters."
|
||||
}
|
||||
}
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"looprpcStaticAddressLoopInSwap": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"swap_hash": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "The swap hash of the swap. It represents the unique identifier of the swap."
|
||||
},
|
||||
"deposit_outpoints": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"state": {
|
||||
"$ref": "#/definitions/looprpcStaticAddressLoopInSwapState"
|
||||
},
|
||||
"swap_amount_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The swap amount of the swap. It is the sum of the values of the deposit\noutpoints that were used for this swap."
|
||||
},
|
||||
"payment_request_amount_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The invoiced swap amount. It is the swap amount minus the quoted server\nfees."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcStaticAddressLoopInSwapState": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"UNKNOWN_STATIC_ADDRESS_SWAP_STATE",
|
||||
"INIT_HTLC",
|
||||
"SIGN_HTLC_TX",
|
||||
"MONITOR_INVOICE_HTLC_TX",
|
||||
"PAYMENT_RECEIVED",
|
||||
"SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT",
|
||||
"MONITOR_HTLC_TIMEOUT_SWEEP",
|
||||
"HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT",
|
||||
"FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX",
|
||||
"SUCCEEDED",
|
||||
"SUCCEEDED_SWEEPLESS_SIG_FAILED",
|
||||
"UNLOCK_DEPOSITS",
|
||||
"FAILED_STATIC_ADDRESS_SWAP"
|
||||
],
|
||||
"default": "UNKNOWN_STATIC_ADDRESS_SWAP_STATE"
|
||||
},
|
||||
>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps)
|
||||
"looprpcStaticAddressSummaryResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"static_address": {
|
||||
"type": "string",
|
||||
"description": "The static address of the client."
|
||||
},
|
||||
"relative_expiry_blocks": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "The CSV expiry of the static address."
|
||||
},
|
||||
"total_num_deposits": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "The total number of deposits."
|
||||
},
|
||||
"value_unconfirmed_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The total value of unconfirmed deposits."
|
||||
},
|
||||
"value_deposited_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The total value of confirmed deposits."
|
||||
},
|
||||
"value_expired_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The total value of all expired deposits."
|
||||
},
|
||||
"value_withdrawn_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The total value of all deposits that have been withdrawn."
|
||||
},
|
||||
"value_looped_in_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The total value of all loop-ins that have been finalized."
|
||||
},
|
||||
"value_htlc_timeout_sweeps_satoshis": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The total value of all htlc timeout sweeps that the client swept."
|
||||
<<<<<<< HEAD
|
||||
},
|
||||
"filtered_deposits": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/looprpcDeposit"
|
||||
},
|
||||
"description": "A list of all deposits that match the filtered state."
|
||||
=======
|
||||
>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps)
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcSuggestSwapsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -1879,42 +1571,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"looprpcUtxo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"static_address": {
|
||||
"type": "string",
|
||||
"description": "The static address of the utxo."
|
||||
},
|
||||
"amount_sat": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The value of the unspent coin in satoshis."
|
||||
},
|
||||
"outpoint": {
|
||||
"type": "string",
|
||||
"description": "The outpoint in the form txid:index."
|
||||
},
|
||||
"confirmations": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The number of confirmations for the Utxo."
|
||||
}
|
||||
}
|
||||
},
|
||||
"looprpcWithdrawDepositsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"withdrawal_tx_hash": {
|
||||
"type": "string",
|
||||
"description": "The transaction hash of the withdrawal transaction."
|
||||
},
|
||||
"pk_script": {
|
||||
"type": "string",
|
||||
"description": "The pkscript of the withdrawal transaction."
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -106,30 +106,6 @@ type SwapClientClient interface {
|
|||
// ListInstantOuts returns a list of all currently known instant out swaps and
|
||||
// their current status.
|
||||
ListInstantOuts(ctx context.Context, in *ListInstantOutsRequest, opts ...grpc.CallOption) (*ListInstantOutsResponse, error)
|
||||
// loop: `static newstaticaddress`
|
||||
// NewStaticAddress requests a new static address for loop-ins from the server.
|
||||
NewStaticAddress(ctx context.Context, in *NewStaticAddressRequest, opts ...grpc.CallOption) (*NewStaticAddressResponse, error)
|
||||
// loop: `static listunspentdeposits`
|
||||
// ListUnspentDeposits returns a list of utxos deposited at a static address.
|
||||
ListUnspentDeposits(ctx context.Context, in *ListUnspentDepositsRequest, opts ...grpc.CallOption) (*ListUnspentDepositsResponse, error)
|
||||
// loop:`static withdraw`
|
||||
// WithdrawDeposits withdraws a selection or all deposits of a static address.
|
||||
WithdrawDeposits(ctx context.Context, in *WithdrawDepositsRequest, opts ...grpc.CallOption) (*WithdrawDepositsResponse, error)
|
||||
// loop:`listdeposits`
|
||||
// ListStaticAddressDeposits returns a list of filtered static address
|
||||
// deposits.
|
||||
ListStaticAddressDeposits(ctx context.Context, in *ListStaticAddressDepositsRequest, opts ...grpc.CallOption) (*ListStaticAddressDepositsResponse, error)
|
||||
// loop:`listswaps`
|
||||
// ListStaticAddressSwaps returns a list of filtered static address
|
||||
// swaps.
|
||||
ListStaticAddressSwaps(ctx context.Context, in *ListStaticAddressSwapsRequest, opts ...grpc.CallOption) (*ListStaticAddressSwapsResponse, error)
|
||||
// loop:`static summary`
|
||||
// GetStaticAddressSummary returns a summary of static address related
|
||||
// statistics.
|
||||
GetStaticAddressSummary(ctx context.Context, in *StaticAddressSummaryRequest, opts ...grpc.CallOption) (*StaticAddressSummaryResponse, error)
|
||||
// loop:`static`
|
||||
// StaticAddressLoopIn initiates a static address loop-in swap.
|
||||
StaticAddressLoopIn(ctx context.Context, in *StaticAddressLoopInRequest, opts ...grpc.CallOption) (*StaticAddressLoopInResponse, error)
|
||||
}
|
||||
|
||||
type swapClientClient struct {
|
||||
|
|
@ -361,69 +337,6 @@ func (c *swapClientClient) ListInstantOuts(ctx context.Context, in *ListInstantO
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) NewStaticAddress(ctx context.Context, in *NewStaticAddressRequest, opts ...grpc.CallOption) (*NewStaticAddressResponse, error) {
|
||||
out := new(NewStaticAddressResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/NewStaticAddress", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) ListUnspentDeposits(ctx context.Context, in *ListUnspentDepositsRequest, opts ...grpc.CallOption) (*ListUnspentDepositsResponse, error) {
|
||||
out := new(ListUnspentDepositsResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListUnspentDeposits", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) WithdrawDeposits(ctx context.Context, in *WithdrawDepositsRequest, opts ...grpc.CallOption) (*WithdrawDepositsResponse, error) {
|
||||
out := new(WithdrawDepositsResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/WithdrawDeposits", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) ListStaticAddressDeposits(ctx context.Context, in *ListStaticAddressDepositsRequest, opts ...grpc.CallOption) (*ListStaticAddressDepositsResponse, error) {
|
||||
out := new(ListStaticAddressDepositsResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListStaticAddressDeposits", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) ListStaticAddressSwaps(ctx context.Context, in *ListStaticAddressSwapsRequest, opts ...grpc.CallOption) (*ListStaticAddressSwapsResponse, error) {
|
||||
out := new(ListStaticAddressSwapsResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListStaticAddressSwaps", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) GetStaticAddressSummary(ctx context.Context, in *StaticAddressSummaryRequest, opts ...grpc.CallOption) (*StaticAddressSummaryResponse, error) {
|
||||
out := new(StaticAddressSummaryResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetStaticAddressSummary", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *swapClientClient) StaticAddressLoopIn(ctx context.Context, in *StaticAddressLoopInRequest, opts ...grpc.CallOption) (*StaticAddressLoopInResponse, error) {
|
||||
out := new(StaticAddressLoopInResponse)
|
||||
err := c.cc.Invoke(ctx, "/looprpc.SwapClient/StaticAddressLoopIn", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SwapClientServer is the server API for SwapClient service.
|
||||
// All implementations must embed UnimplementedSwapClientServer
|
||||
// for forward compatibility
|
||||
|
|
@ -516,30 +429,6 @@ type SwapClientServer interface {
|
|||
// ListInstantOuts returns a list of all currently known instant out swaps and
|
||||
// their current status.
|
||||
ListInstantOuts(context.Context, *ListInstantOutsRequest) (*ListInstantOutsResponse, error)
|
||||
// loop: `static newstaticaddress`
|
||||
// NewStaticAddress requests a new static address for loop-ins from the server.
|
||||
NewStaticAddress(context.Context, *NewStaticAddressRequest) (*NewStaticAddressResponse, error)
|
||||
// loop: `static listunspentdeposits`
|
||||
// ListUnspentDeposits returns a list of utxos deposited at a static address.
|
||||
ListUnspentDeposits(context.Context, *ListUnspentDepositsRequest) (*ListUnspentDepositsResponse, error)
|
||||
// loop:`static withdraw`
|
||||
// WithdrawDeposits withdraws a selection or all deposits of a static address.
|
||||
WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error)
|
||||
// loop:`listdeposits`
|
||||
// ListStaticAddressDeposits returns a list of filtered static address
|
||||
// deposits.
|
||||
ListStaticAddressDeposits(context.Context, *ListStaticAddressDepositsRequest) (*ListStaticAddressDepositsResponse, error)
|
||||
// loop:`listswaps`
|
||||
// ListStaticAddressSwaps returns a list of filtered static address
|
||||
// swaps.
|
||||
ListStaticAddressSwaps(context.Context, *ListStaticAddressSwapsRequest) (*ListStaticAddressSwapsResponse, error)
|
||||
// loop:`static summary`
|
||||
// GetStaticAddressSummary returns a summary of static address related
|
||||
// statistics.
|
||||
GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error)
|
||||
// loop:`static`
|
||||
// StaticAddressLoopIn initiates a static address loop-in swap.
|
||||
StaticAddressLoopIn(context.Context, *StaticAddressLoopInRequest) (*StaticAddressLoopInResponse, error)
|
||||
mustEmbedUnimplementedSwapClientServer()
|
||||
}
|
||||
|
||||
|
|
@ -613,27 +502,6 @@ func (UnimplementedSwapClientServer) InstantOutQuote(context.Context, *InstantOu
|
|||
func (UnimplementedSwapClientServer) ListInstantOuts(context.Context, *ListInstantOutsRequest) (*ListInstantOutsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListInstantOuts not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) NewStaticAddress(context.Context, *NewStaticAddressRequest) (*NewStaticAddressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NewStaticAddress not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) ListUnspentDeposits(context.Context, *ListUnspentDepositsRequest) (*ListUnspentDepositsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListUnspentDeposits not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WithdrawDeposits not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) ListStaticAddressDeposits(context.Context, *ListStaticAddressDepositsRequest) (*ListStaticAddressDepositsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListStaticAddressDeposits not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) ListStaticAddressSwaps(context.Context, *ListStaticAddressSwapsRequest) (*ListStaticAddressSwapsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListStaticAddressSwaps not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetStaticAddressSummary not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) StaticAddressLoopIn(context.Context, *StaticAddressLoopInRequest) (*StaticAddressLoopInResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method StaticAddressLoopIn not implemented")
|
||||
}
|
||||
func (UnimplementedSwapClientServer) mustEmbedUnimplementedSwapClientServer() {}
|
||||
|
||||
// UnsafeSwapClientServer may be embedded to opt out of forward compatibility for this service.
|
||||
|
|
@ -1046,132 +914,6 @@ func _SwapClient_ListInstantOuts_Handler(srv interface{}, ctx context.Context, d
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_NewStaticAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NewStaticAddressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).NewStaticAddress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/NewStaticAddress",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).NewStaticAddress(ctx, req.(*NewStaticAddressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_ListUnspentDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListUnspentDepositsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).ListUnspentDeposits(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/ListUnspentDeposits",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).ListUnspentDeposits(ctx, req.(*ListUnspentDepositsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_WithdrawDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WithdrawDepositsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).WithdrawDeposits(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/WithdrawDeposits",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).WithdrawDeposits(ctx, req.(*WithdrawDepositsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_ListStaticAddressDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListStaticAddressDepositsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).ListStaticAddressDeposits(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/ListStaticAddressDeposits",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).ListStaticAddressDeposits(ctx, req.(*ListStaticAddressDepositsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_ListStaticAddressSwaps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListStaticAddressSwapsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).ListStaticAddressSwaps(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/ListStaticAddressSwaps",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).ListStaticAddressSwaps(ctx, req.(*ListStaticAddressSwapsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_GetStaticAddressSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StaticAddressSummaryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).GetStaticAddressSummary(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/GetStaticAddressSummary",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).GetStaticAddressSummary(ctx, req.(*StaticAddressSummaryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SwapClient_StaticAddressLoopIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StaticAddressLoopInRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SwapClientServer).StaticAddressLoopIn(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/looprpc.SwapClient/StaticAddressLoopIn",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SwapClientServer).StaticAddressLoopIn(ctx, req.(*StaticAddressLoopInRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SwapClient_ServiceDesc is the grpc.ServiceDesc for SwapClient service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
|
|
@ -1263,34 +1005,6 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "ListInstantOuts",
|
||||
Handler: _SwapClient_ListInstantOuts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NewStaticAddress",
|
||||
Handler: _SwapClient_NewStaticAddress_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListUnspentDeposits",
|
||||
Handler: _SwapClient_ListUnspentDeposits_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WithdrawDeposits",
|
||||
Handler: _SwapClient_WithdrawDeposits_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListStaticAddressDeposits",
|
||||
Handler: _SwapClient_ListStaticAddressDeposits_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListStaticAddressSwaps",
|
||||
Handler: _SwapClient_ListStaticAddressSwaps_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetStaticAddressSummary",
|
||||
Handler: _SwapClient_GetStaticAddressSummary_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "StaticAddressLoopIn",
|
||||
Handler: _SwapClient_StaticAddressLoopIn_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
|
|
|||
|
|
@ -587,179 +587,4 @@ func RegisterSwapClientJSONCallbacks(registry map[string]func(ctx context.Contex
|
|||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["looprpc.SwapClient.NewStaticAddress"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &NewStaticAddressRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewSwapClientClient(conn)
|
||||
resp, err := client.NewStaticAddress(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["looprpc.SwapClient.ListUnspentDeposits"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &ListUnspentDepositsRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewSwapClientClient(conn)
|
||||
resp, err := client.ListUnspentDeposits(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["looprpc.SwapClient.WithdrawDeposits"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &WithdrawDepositsRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewSwapClientClient(conn)
|
||||
resp, err := client.WithdrawDeposits(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["looprpc.SwapClient.ListStaticAddressDeposits"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &ListStaticAddressDepositsRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewSwapClientClient(conn)
|
||||
resp, err := client.ListStaticAddressDeposits(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["looprpc.SwapClient.ListStaticAddressSwaps"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &ListStaticAddressSwapsRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewSwapClientClient(conn)
|
||||
resp, err := client.ListStaticAddressSwaps(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["looprpc.SwapClient.GetStaticAddressSummary"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &StaticAddressSummaryRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewSwapClientClient(conn)
|
||||
resp, err := client.GetStaticAddressSummary(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
|
||||
registry["looprpc.SwapClient.StaticAddressLoopIn"] = func(ctx context.Context,
|
||||
conn *grpc.ClientConn, reqJSON string, callback func(string, error)) {
|
||||
|
||||
req := &StaticAddressLoopInRequest{}
|
||||
err := marshaler.Unmarshal([]byte(reqJSON), req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := NewSwapClientClient(conn)
|
||||
resp, err := client.StaticAddressLoopIn(ctx, req)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
|
||||
respBytes, err := marshaler.Marshal(resp)
|
||||
if err != nil {
|
||||
callback("", err)
|
||||
return
|
||||
}
|
||||
callback(string(respBytes), nil)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue