From 12d666bfdfbf11d8918105ae4cac7ba05674df4a Mon Sep 17 00:00:00 2001 From: Louis Singer <41042567+louisinger@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:38:04 +0100 Subject: [PATCH] Move redeem transactions creation client-side (#388) * move OOR transaction creation client-side * robust redeem tx checks * optimize GetVtxos db call * rename CompleteAsyncPayment --> SubmitRedeemTx * fix permissions.go --- .../swagger/ark/v1/service.swagger.json | 106 +- api-spec/protobuf/ark/v1/service.proto | 31 +- api-spec/protobuf/gen/ark/v1/service.pb.go | 1435 +++++++---------- api-spec/protobuf/gen/ark/v1/service.pb.gw.go | 109 +- .../protobuf/gen/ark/v1/service_grpc.pb.go | 64 +- common/bitcointree/pending.go | 80 + common/fees.go | 31 +- common/types.go | 13 + pkg/client-sdk/Makefile | 7 +- pkg/client-sdk/client/client.go | 13 +- pkg/client-sdk/client/grpc/client.go | 23 +- pkg/client-sdk/client/grpc/types.go | 17 - pkg/client-sdk/client/rest/client.go | 56 +- .../ark_service_claim_payment_parameters.go | 150 -- .../ark_service_claim_payment_responses.go | 185 --- .../ark_service/ark_service_client.go | 117 +- ...ark_service_complete_payment_parameters.go | 150 -- .../ark_service_complete_payment_responses.go | 185 --- .../ark_service_create_payment_parameters.go | 150 -- .../ark_service_create_payment_responses.go | 187 --- ...ark_service_finalize_payment_parameters.go | 150 -- .../ark_service_finalize_payment_responses.go | 185 --- ...ark_service_register_payment_parameters.go | 150 -- .../ark_service_register_payment_responses.go | 187 --- ...ark_service_send_tree_nonces_parameters.go | 150 -- .../ark_service_send_tree_nonces_responses.go | 185 --- ...service_send_tree_signatures_parameters.go | 150 -- ..._service_send_tree_signatures_responses.go | 185 --- ...ark_service_submit_redeem_tx_parameters.go | 150 ++ .../ark_service_submit_redeem_tx_responses.go | 187 +++ ..._signed_forfeit_transactions_parameters.go | 150 -- ...t_signed_forfeit_transactions_responses.go | 185 --- .../service/models/v1_async_payment_input.go | 112 -- .../rest/service/models/v1_boarding_input.go | 56 - .../models/v1_claim_payment_request.go | 124 -- .../models/v1_claim_payment_response.go | 11 - .../models/v1_complete_payment_response.go | 11 - .../models/v1_create_payment_request.go | 183 --- .../models/v1_create_payment_response.go | 50 - .../models/v1_finalize_payment_request.go | 53 - .../models/v1_finalize_payment_response.go | 11 - .../service/models/v1_get_info_response.go | 64 +- .../rest/service/models/v1_market_hour.go | 100 ++ .../rest/service/models/v1_pending_payment.go | 50 - .../models/v1_register_payment_request.go | 124 -- .../models/v1_register_payment_response.go | 50 - .../models/v1_send_tree_nonces_request.go | 56 - .../models/v1_send_tree_nonces_response.go | 11 - .../models/v1_send_tree_signatures_request.go | 56 - .../v1_send_tree_signatures_response.go | 11 - .../models/v1_submit_redeem_tx_request.go | 50 + ...est.go => v1_submit_redeem_tx_response.go} | 20 +- ...mit_signed_forfeit_transactions_request.go | 53 - ...it_signed_forfeit_transactions_response.go | 11 - .../rest/service/models/v1_vtxo_input.go | 53 - pkg/client-sdk/covenant_client.go | 2 +- pkg/client-sdk/covenantless_client.go | 147 +- server/internal/core/application/covenant.go | 6 +- .../internal/core/application/covenantless.go | 423 ++--- server/internal/core/application/types.go | 16 +- server/internal/core/ports/tx_builder.go | 6 - server/internal/core/ports/wallet.go | 2 +- .../tx-builder/covenant/builder.go | 11 +- .../tx-builder/covenantless/builder.go | 171 +- .../interface/grpc/handlers/arkservice.go | 59 +- .../interface/grpc/handlers/parser.go | 28 - .../interface/grpc/permissions/permissions.go | 6 +- 67 files changed, 1772 insertions(+), 5548 deletions(-) create mode 100644 common/bitcointree/pending.go create mode 100644 common/types.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_responses.go create mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_parameters.go create mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_parameters.go delete mode 100644 pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_responses.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_async_payment_input.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_boarding_input.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_claim_payment_request.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_claim_payment_response.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_complete_payment_response.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_create_payment_request.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_create_payment_response.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_finalize_payment_request.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_finalize_payment_response.go create mode 100644 pkg/client-sdk/client/rest/service/models/v1_market_hour.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_pending_payment.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_register_payment_request.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_register_payment_response.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_request.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_response.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_request.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_response.go create mode 100644 pkg/client-sdk/client/rest/service/models/v1_submit_redeem_tx_request.go rename pkg/client-sdk/client/rest/service/models/{v1_complete_payment_request.go => v1_submit_redeem_tx_response.go} (54%) delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_request.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_response.go delete mode 100644 pkg/client-sdk/client/rest/service/models/v1_vtxo_input.go diff --git a/api-spec/openapi/swagger/ark/v1/service.swagger.json b/api-spec/openapi/swagger/ark/v1/service.swagger.json index 67e8b3f..4e0ad2e 100644 --- a/api-spec/openapi/swagger/ark/v1/service.swagger.json +++ b/api-spec/openapi/swagger/ark/v1/service.swagger.json @@ -101,14 +101,14 @@ ] } }, - "/v1/payment": { + "/v1/redeem-tx": { "post": { - "operationId": "ArkService_CreatePayment", + "operationId": "ArkService_SubmitRedeemTx", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreatePaymentResponse" + "$ref": "#/definitions/v1SubmitRedeemTxResponse" } }, "default": { @@ -124,39 +124,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreatePaymentRequest" - } - } - ], - "tags": [ - "ArkService" - ] - } - }, - "/v1/payment/complete": { - "post": { - "operationId": "ArkService_CompletePayment", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1CompletePaymentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1CompletePaymentRequest" + "$ref": "#/definitions/v1SubmitRedeemTxRequest" } } ], @@ -570,56 +538,6 @@ } } }, - "v1AsyncPaymentInput": { - "type": "object", - "properties": { - "input": { - "$ref": "#/definitions/v1Input" - }, - "forfeitLeafHash": { - "type": "string" - } - } - }, - "v1CompletePaymentRequest": { - "type": "object", - "properties": { - "signedRedeemTx": { - "type": "string" - } - } - }, - "v1CompletePaymentResponse": { - "type": "object" - }, - "v1CreatePaymentRequest": { - "type": "object", - "properties": { - "inputs": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1AsyncPaymentInput" - } - }, - "outputs": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Output" - } - } - } - }, - "v1CreatePaymentResponse": { - "type": "object", - "properties": { - "signedRedeemTx": { - "type": "string", - "title": "signed only by the ASP" - } - } - }, "v1DeleteNostrRecipientRequest": { "type": "object", "properties": { @@ -1112,6 +1030,22 @@ } } }, + "v1SubmitRedeemTxRequest": { + "type": "object", + "properties": { + "redeemTx": { + "type": "string" + } + } + }, + "v1SubmitRedeemTxResponse": { + "type": "object", + "properties": { + "signedRedeemTx": { + "type": "string" + } + } + }, "v1SubmitSignedForfeitTxsRequest": { "type": "object", "properties": { diff --git a/api-spec/protobuf/ark/v1/service.proto b/api-spec/protobuf/ark/v1/service.proto index 33c52ea..9b1c42c 100755 --- a/api-spec/protobuf/ark/v1/service.proto +++ b/api-spec/protobuf/ark/v1/service.proto @@ -62,17 +62,9 @@ service ArkService { }; }; - /* Async Payment APIs */ - - rpc CreatePayment(CreatePaymentRequest) returns (CreatePaymentResponse) { + rpc SubmitRedeemTx(SubmitRedeemTxRequest) returns (SubmitRedeemTxResponse) { option (google.api.http) = { - post: "/v1/payment" - body: "*" - }; - } - rpc CompletePayment(CompletePaymentRequest) returns (CompletePaymentResponse) { - option (google.api.http) = { - post: "/v1/payment/complete" + post: "/v1/redeem-tx" body: "*" }; } @@ -200,25 +192,12 @@ message PingRequest { } message PingResponse {} -/* Async Payment API messages */ - -message AsyncPaymentInput { - Input input = 1; - string forfeit_leaf_hash = 2; +message SubmitRedeemTxRequest { + string redeem_tx = 1; } - -message CreatePaymentRequest { - repeated AsyncPaymentInput inputs = 1; - repeated Output outputs = 2; -} -message CreatePaymentResponse { - string signed_redeem_tx = 1; // signed only by the ASP -} - -message CompletePaymentRequest { +message SubmitRedeemTxResponse { string signed_redeem_tx = 1; } -message CompletePaymentResponse {} /* Explorer-like API messages */ diff --git a/api-spec/protobuf/gen/ark/v1/service.pb.go b/api-spec/protobuf/gen/ark/v1/service.pb.go index 1feb47b..b165c52 100644 --- a/api-spec/protobuf/gen/ark/v1/service.pb.go +++ b/api-spec/protobuf/gen/ark/v1/service.pb.go @@ -1120,17 +1120,16 @@ func (*PingResponse) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{17} } -type AsyncPaymentInput struct { +type SubmitRedeemTxRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Input *Input `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - ForfeitLeafHash string `protobuf:"bytes,2,opt,name=forfeit_leaf_hash,json=forfeitLeafHash,proto3" json:"forfeit_leaf_hash,omitempty"` + RedeemTx string `protobuf:"bytes,1,opt,name=redeem_tx,json=redeemTx,proto3" json:"redeem_tx,omitempty"` } -func (x *AsyncPaymentInput) Reset() { - *x = AsyncPaymentInput{} +func (x *SubmitRedeemTxRequest) Reset() { + *x = SubmitRedeemTxRequest{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1138,13 +1137,13 @@ func (x *AsyncPaymentInput) Reset() { } } -func (x *AsyncPaymentInput) String() string { +func (x *SubmitRedeemTxRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AsyncPaymentInput) ProtoMessage() {} +func (*SubmitRedeemTxRequest) ProtoMessage() {} -func (x *AsyncPaymentInput) ProtoReflect() protoreflect.Message { +func (x *SubmitRedeemTxRequest) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1156,36 +1155,28 @@ func (x *AsyncPaymentInput) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AsyncPaymentInput.ProtoReflect.Descriptor instead. -func (*AsyncPaymentInput) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitRedeemTxRequest.ProtoReflect.Descriptor instead. +func (*SubmitRedeemTxRequest) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{18} } -func (x *AsyncPaymentInput) GetInput() *Input { +func (x *SubmitRedeemTxRequest) GetRedeemTx() string { if x != nil { - return x.Input - } - return nil -} - -func (x *AsyncPaymentInput) GetForfeitLeafHash() string { - if x != nil { - return x.ForfeitLeafHash + return x.RedeemTx } return "" } -type CreatePaymentRequest struct { +type SubmitRedeemTxResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Inputs []*AsyncPaymentInput `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` - Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` + SignedRedeemTx string `protobuf:"bytes,1,opt,name=signed_redeem_tx,json=signedRedeemTx,proto3" json:"signed_redeem_tx,omitempty"` } -func (x *CreatePaymentRequest) Reset() { - *x = CreatePaymentRequest{} +func (x *SubmitRedeemTxResponse) Reset() { + *x = SubmitRedeemTxResponse{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1193,13 +1184,13 @@ func (x *CreatePaymentRequest) Reset() { } } -func (x *CreatePaymentRequest) String() string { +func (x *SubmitRedeemTxResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatePaymentRequest) ProtoMessage() {} +func (*SubmitRedeemTxResponse) ProtoMessage() {} -func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message { +func (x *SubmitRedeemTxResponse) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1211,157 +1202,18 @@ func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatePaymentRequest.ProtoReflect.Descriptor instead. -func (*CreatePaymentRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitRedeemTxResponse.ProtoReflect.Descriptor instead. +func (*SubmitRedeemTxResponse) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{19} } -func (x *CreatePaymentRequest) GetInputs() []*AsyncPaymentInput { - if x != nil { - return x.Inputs - } - return nil -} - -func (x *CreatePaymentRequest) GetOutputs() []*Output { - if x != nil { - return x.Outputs - } - return nil -} - -type CreatePaymentResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SignedRedeemTx string `protobuf:"bytes,1,opt,name=signed_redeem_tx,json=signedRedeemTx,proto3" json:"signed_redeem_tx,omitempty"` // signed only by the ASP -} - -func (x *CreatePaymentResponse) Reset() { - *x = CreatePaymentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePaymentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePaymentResponse) ProtoMessage() {} - -func (x *CreatePaymentResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePaymentResponse.ProtoReflect.Descriptor instead. -func (*CreatePaymentResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{20} -} - -func (x *CreatePaymentResponse) GetSignedRedeemTx() string { +func (x *SubmitRedeemTxResponse) GetSignedRedeemTx() string { if x != nil { return x.SignedRedeemTx } return "" } -type CompletePaymentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SignedRedeemTx string `protobuf:"bytes,1,opt,name=signed_redeem_tx,json=signedRedeemTx,proto3" json:"signed_redeem_tx,omitempty"` -} - -func (x *CompletePaymentRequest) Reset() { - *x = CompletePaymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompletePaymentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompletePaymentRequest) ProtoMessage() {} - -func (x *CompletePaymentRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompletePaymentRequest.ProtoReflect.Descriptor instead. -func (*CompletePaymentRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{21} -} - -func (x *CompletePaymentRequest) GetSignedRedeemTx() string { - if x != nil { - return x.SignedRedeemTx - } - return "" -} - -type CompletePaymentResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CompletePaymentResponse) Reset() { - *x = CompletePaymentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompletePaymentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompletePaymentResponse) ProtoMessage() {} - -func (x *CompletePaymentResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CompletePaymentResponse.ProtoReflect.Descriptor instead. -func (*CompletePaymentResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{22} -} - type GetRoundRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1373,7 +1225,7 @@ type GetRoundRequest struct { func (x *GetRoundRequest) Reset() { *x = GetRoundRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[23] + mi := &file_ark_v1_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1386,7 +1238,7 @@ func (x *GetRoundRequest) String() string { func (*GetRoundRequest) ProtoMessage() {} func (x *GetRoundRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[23] + mi := &file_ark_v1_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1399,7 +1251,7 @@ func (x *GetRoundRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRoundRequest.ProtoReflect.Descriptor instead. func (*GetRoundRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{23} + return file_ark_v1_service_proto_rawDescGZIP(), []int{20} } func (x *GetRoundRequest) GetTxid() string { @@ -1420,7 +1272,7 @@ type GetRoundResponse struct { func (x *GetRoundResponse) Reset() { *x = GetRoundResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[24] + mi := &file_ark_v1_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1433,7 +1285,7 @@ func (x *GetRoundResponse) String() string { func (*GetRoundResponse) ProtoMessage() {} func (x *GetRoundResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[24] + mi := &file_ark_v1_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1446,7 +1298,7 @@ func (x *GetRoundResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRoundResponse.ProtoReflect.Descriptor instead. func (*GetRoundResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{24} + return file_ark_v1_service_proto_rawDescGZIP(), []int{21} } func (x *GetRoundResponse) GetRound() *Round { @@ -1467,7 +1319,7 @@ type GetRoundByIdRequest struct { func (x *GetRoundByIdRequest) Reset() { *x = GetRoundByIdRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[25] + mi := &file_ark_v1_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1480,7 +1332,7 @@ func (x *GetRoundByIdRequest) String() string { func (*GetRoundByIdRequest) ProtoMessage() {} func (x *GetRoundByIdRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[25] + mi := &file_ark_v1_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1493,7 +1345,7 @@ func (x *GetRoundByIdRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRoundByIdRequest.ProtoReflect.Descriptor instead. func (*GetRoundByIdRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{25} + return file_ark_v1_service_proto_rawDescGZIP(), []int{22} } func (x *GetRoundByIdRequest) GetId() string { @@ -1514,7 +1366,7 @@ type GetRoundByIdResponse struct { func (x *GetRoundByIdResponse) Reset() { *x = GetRoundByIdResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[26] + mi := &file_ark_v1_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1527,7 +1379,7 @@ func (x *GetRoundByIdResponse) String() string { func (*GetRoundByIdResponse) ProtoMessage() {} func (x *GetRoundByIdResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[26] + mi := &file_ark_v1_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1540,7 +1392,7 @@ func (x *GetRoundByIdResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRoundByIdResponse.ProtoReflect.Descriptor instead. func (*GetRoundByIdResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{26} + return file_ark_v1_service_proto_rawDescGZIP(), []int{23} } func (x *GetRoundByIdResponse) GetRound() *Round { @@ -1561,7 +1413,7 @@ type ListVtxosRequest struct { func (x *ListVtxosRequest) Reset() { *x = ListVtxosRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[27] + mi := &file_ark_v1_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1574,7 +1426,7 @@ func (x *ListVtxosRequest) String() string { func (*ListVtxosRequest) ProtoMessage() {} func (x *ListVtxosRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[27] + mi := &file_ark_v1_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1587,7 +1439,7 @@ func (x *ListVtxosRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListVtxosRequest.ProtoReflect.Descriptor instead. func (*ListVtxosRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{27} + return file_ark_v1_service_proto_rawDescGZIP(), []int{24} } func (x *ListVtxosRequest) GetAddress() string { @@ -1609,7 +1461,7 @@ type ListVtxosResponse struct { func (x *ListVtxosResponse) Reset() { *x = ListVtxosResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[28] + mi := &file_ark_v1_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1622,7 +1474,7 @@ func (x *ListVtxosResponse) String() string { func (*ListVtxosResponse) ProtoMessage() {} func (x *ListVtxosResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[28] + mi := &file_ark_v1_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1635,7 +1487,7 @@ func (x *ListVtxosResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListVtxosResponse.ProtoReflect.Descriptor instead. func (*ListVtxosResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{28} + return file_ark_v1_service_proto_rawDescGZIP(), []int{25} } func (x *ListVtxosResponse) GetSpendableVtxos() []*Vtxo { @@ -1667,7 +1519,7 @@ type RoundFinalizationEvent struct { func (x *RoundFinalizationEvent) Reset() { *x = RoundFinalizationEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[29] + mi := &file_ark_v1_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1680,7 +1532,7 @@ func (x *RoundFinalizationEvent) String() string { func (*RoundFinalizationEvent) ProtoMessage() {} func (x *RoundFinalizationEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[29] + mi := &file_ark_v1_service_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1693,7 +1545,7 @@ func (x *RoundFinalizationEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use RoundFinalizationEvent.ProtoReflect.Descriptor instead. func (*RoundFinalizationEvent) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{29} + return file_ark_v1_service_proto_rawDescGZIP(), []int{26} } func (x *RoundFinalizationEvent) GetId() string { @@ -1743,7 +1595,7 @@ type RoundFinalizedEvent struct { func (x *RoundFinalizedEvent) Reset() { *x = RoundFinalizedEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[30] + mi := &file_ark_v1_service_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1756,7 +1608,7 @@ func (x *RoundFinalizedEvent) String() string { func (*RoundFinalizedEvent) ProtoMessage() {} func (x *RoundFinalizedEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[30] + mi := &file_ark_v1_service_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1769,7 +1621,7 @@ func (x *RoundFinalizedEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use RoundFinalizedEvent.ProtoReflect.Descriptor instead. func (*RoundFinalizedEvent) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{30} + return file_ark_v1_service_proto_rawDescGZIP(), []int{27} } func (x *RoundFinalizedEvent) GetId() string { @@ -1798,7 +1650,7 @@ type RoundFailed struct { func (x *RoundFailed) Reset() { *x = RoundFailed{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[31] + mi := &file_ark_v1_service_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1811,7 +1663,7 @@ func (x *RoundFailed) String() string { func (*RoundFailed) ProtoMessage() {} func (x *RoundFailed) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[31] + mi := &file_ark_v1_service_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1824,7 +1676,7 @@ func (x *RoundFailed) ProtoReflect() protoreflect.Message { // Deprecated: Use RoundFailed.ProtoReflect.Descriptor instead. func (*RoundFailed) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{31} + return file_ark_v1_service_proto_rawDescGZIP(), []int{28} } func (x *RoundFailed) GetId() string { @@ -1855,7 +1707,7 @@ type RoundSigningEvent struct { func (x *RoundSigningEvent) Reset() { *x = RoundSigningEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[32] + mi := &file_ark_v1_service_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1868,7 +1720,7 @@ func (x *RoundSigningEvent) String() string { func (*RoundSigningEvent) ProtoMessage() {} func (x *RoundSigningEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[32] + mi := &file_ark_v1_service_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1881,7 +1733,7 @@ func (x *RoundSigningEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use RoundSigningEvent.ProtoReflect.Descriptor instead. func (*RoundSigningEvent) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{32} + return file_ark_v1_service_proto_rawDescGZIP(), []int{29} } func (x *RoundSigningEvent) GetId() string { @@ -1924,7 +1776,7 @@ type RoundSigningNoncesGeneratedEvent struct { func (x *RoundSigningNoncesGeneratedEvent) Reset() { *x = RoundSigningNoncesGeneratedEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[33] + mi := &file_ark_v1_service_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1937,7 +1789,7 @@ func (x *RoundSigningNoncesGeneratedEvent) String() string { func (*RoundSigningNoncesGeneratedEvent) ProtoMessage() {} func (x *RoundSigningNoncesGeneratedEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[33] + mi := &file_ark_v1_service_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1950,7 +1802,7 @@ func (x *RoundSigningNoncesGeneratedEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use RoundSigningNoncesGeneratedEvent.ProtoReflect.Descriptor instead. func (*RoundSigningNoncesGeneratedEvent) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{33} + return file_ark_v1_service_proto_rawDescGZIP(), []int{30} } func (x *RoundSigningNoncesGeneratedEvent) GetId() string { @@ -1985,7 +1837,7 @@ type Round struct { func (x *Round) Reset() { *x = Round{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[34] + mi := &file_ark_v1_service_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1998,7 +1850,7 @@ func (x *Round) String() string { func (*Round) ProtoMessage() {} func (x *Round) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[34] + mi := &file_ark_v1_service_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2011,7 +1863,7 @@ func (x *Round) ProtoReflect() protoreflect.Message { // Deprecated: Use Round.ProtoReflect.Descriptor instead. func (*Round) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{34} + return file_ark_v1_service_proto_rawDescGZIP(), []int{31} } func (x *Round) GetId() string { @@ -2082,7 +1934,7 @@ type Outpoint struct { func (x *Outpoint) Reset() { *x = Outpoint{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[35] + mi := &file_ark_v1_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2095,7 +1947,7 @@ func (x *Outpoint) String() string { func (*Outpoint) ProtoMessage() {} func (x *Outpoint) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[35] + mi := &file_ark_v1_service_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2108,7 +1960,7 @@ func (x *Outpoint) ProtoReflect() protoreflect.Message { // Deprecated: Use Outpoint.ProtoReflect.Descriptor instead. func (*Outpoint) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{35} + return file_ark_v1_service_proto_rawDescGZIP(), []int{32} } func (x *Outpoint) GetTxid() string { @@ -2141,7 +1993,7 @@ type Input struct { func (x *Input) Reset() { *x = Input{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[36] + mi := &file_ark_v1_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2154,7 +2006,7 @@ func (x *Input) String() string { func (*Input) ProtoMessage() {} func (x *Input) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[36] + mi := &file_ark_v1_service_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2167,7 +2019,7 @@ func (x *Input) ProtoReflect() protoreflect.Message { // Deprecated: Use Input.ProtoReflect.Descriptor instead. func (*Input) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{36} + return file_ark_v1_service_proto_rawDescGZIP(), []int{33} } func (x *Input) GetOutpoint() *Outpoint { @@ -2226,7 +2078,7 @@ type Output struct { func (x *Output) Reset() { *x = Output{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[37] + mi := &file_ark_v1_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2239,7 +2091,7 @@ func (x *Output) String() string { func (*Output) ProtoMessage() {} func (x *Output) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[37] + mi := &file_ark_v1_service_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2252,7 +2104,7 @@ func (x *Output) ProtoReflect() protoreflect.Message { // Deprecated: Use Output.ProtoReflect.Descriptor instead. func (*Output) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{37} + return file_ark_v1_service_proto_rawDescGZIP(), []int{34} } func (x *Output) GetAddress() string { @@ -2280,7 +2132,7 @@ type Tree struct { func (x *Tree) Reset() { *x = Tree{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[38] + mi := &file_ark_v1_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2293,7 +2145,7 @@ func (x *Tree) String() string { func (*Tree) ProtoMessage() {} func (x *Tree) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[38] + mi := &file_ark_v1_service_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2306,7 +2158,7 @@ func (x *Tree) ProtoReflect() protoreflect.Message { // Deprecated: Use Tree.ProtoReflect.Descriptor instead. func (*Tree) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{38} + return file_ark_v1_service_proto_rawDescGZIP(), []int{35} } func (x *Tree) GetLevels() []*TreeLevel { @@ -2327,7 +2179,7 @@ type TreeLevel struct { func (x *TreeLevel) Reset() { *x = TreeLevel{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[39] + mi := &file_ark_v1_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2340,7 +2192,7 @@ func (x *TreeLevel) String() string { func (*TreeLevel) ProtoMessage() {} func (x *TreeLevel) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[39] + mi := &file_ark_v1_service_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2353,7 +2205,7 @@ func (x *TreeLevel) ProtoReflect() protoreflect.Message { // Deprecated: Use TreeLevel.ProtoReflect.Descriptor instead. func (*TreeLevel) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{39} + return file_ark_v1_service_proto_rawDescGZIP(), []int{36} } func (x *TreeLevel) GetNodes() []*Node { @@ -2376,7 +2228,7 @@ type Node struct { func (x *Node) Reset() { *x = Node{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[40] + mi := &file_ark_v1_service_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2389,7 +2241,7 @@ func (x *Node) String() string { func (*Node) ProtoMessage() {} func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[40] + mi := &file_ark_v1_service_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2402,7 +2254,7 @@ func (x *Node) ProtoReflect() protoreflect.Message { // Deprecated: Use Node.ProtoReflect.Descriptor instead. func (*Node) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{40} + return file_ark_v1_service_proto_rawDescGZIP(), []int{37} } func (x *Node) GetTxid() string { @@ -2447,7 +2299,7 @@ type Vtxo struct { func (x *Vtxo) Reset() { *x = Vtxo{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[41] + mi := &file_ark_v1_service_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2460,7 +2312,7 @@ func (x *Vtxo) String() string { func (*Vtxo) ProtoMessage() {} func (x *Vtxo) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[41] + mi := &file_ark_v1_service_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2473,7 +2325,7 @@ func (x *Vtxo) ProtoReflect() protoreflect.Message { // Deprecated: Use Vtxo.ProtoReflect.Descriptor instead. func (*Vtxo) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{41} + return file_ark_v1_service_proto_rawDescGZIP(), []int{38} } func (x *Vtxo) GetOutpoint() *Outpoint { @@ -2562,7 +2414,7 @@ type GetTransactionsStreamRequest struct { func (x *GetTransactionsStreamRequest) Reset() { *x = GetTransactionsStreamRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[42] + mi := &file_ark_v1_service_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2575,7 +2427,7 @@ func (x *GetTransactionsStreamRequest) String() string { func (*GetTransactionsStreamRequest) ProtoMessage() {} func (x *GetTransactionsStreamRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[42] + mi := &file_ark_v1_service_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2588,7 +2440,7 @@ func (x *GetTransactionsStreamRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionsStreamRequest.ProtoReflect.Descriptor instead. func (*GetTransactionsStreamRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{42} + return file_ark_v1_service_proto_rawDescGZIP(), []int{39} } type GetTransactionsStreamResponse struct { @@ -2606,7 +2458,7 @@ type GetTransactionsStreamResponse struct { func (x *GetTransactionsStreamResponse) Reset() { *x = GetTransactionsStreamResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[43] + mi := &file_ark_v1_service_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2619,7 +2471,7 @@ func (x *GetTransactionsStreamResponse) String() string { func (*GetTransactionsStreamResponse) ProtoMessage() {} func (x *GetTransactionsStreamResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[43] + mi := &file_ark_v1_service_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2632,7 +2484,7 @@ func (x *GetTransactionsStreamResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTransactionsStreamResponse.ProtoReflect.Descriptor instead. func (*GetTransactionsStreamResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{43} + return file_ark_v1_service_proto_rawDescGZIP(), []int{40} } func (m *GetTransactionsStreamResponse) GetTx() isGetTransactionsStreamResponse_Tx { @@ -2686,7 +2538,7 @@ type RoundTransaction struct { func (x *RoundTransaction) Reset() { *x = RoundTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[44] + mi := &file_ark_v1_service_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2699,7 +2551,7 @@ func (x *RoundTransaction) String() string { func (*RoundTransaction) ProtoMessage() {} func (x *RoundTransaction) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[44] + mi := &file_ark_v1_service_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2712,7 +2564,7 @@ func (x *RoundTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use RoundTransaction.ProtoReflect.Descriptor instead. func (*RoundTransaction) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{44} + return file_ark_v1_service_proto_rawDescGZIP(), []int{41} } func (x *RoundTransaction) GetTxid() string { @@ -2756,7 +2608,7 @@ type RedeemTransaction struct { func (x *RedeemTransaction) Reset() { *x = RedeemTransaction{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[45] + mi := &file_ark_v1_service_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2769,7 +2621,7 @@ func (x *RedeemTransaction) String() string { func (*RedeemTransaction) ProtoMessage() {} func (x *RedeemTransaction) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[45] + mi := &file_ark_v1_service_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2782,7 +2634,7 @@ func (x *RedeemTransaction) ProtoReflect() protoreflect.Message { // Deprecated: Use RedeemTransaction.ProtoReflect.Descriptor instead. func (*RedeemTransaction) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{45} + return file_ark_v1_service_proto_rawDescGZIP(), []int{42} } func (x *RedeemTransaction) GetTxid() string { @@ -2820,7 +2672,7 @@ type OwnershipProof struct { func (x *OwnershipProof) Reset() { *x = OwnershipProof{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[46] + mi := &file_ark_v1_service_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2833,7 +2685,7 @@ func (x *OwnershipProof) String() string { func (*OwnershipProof) ProtoMessage() {} func (x *OwnershipProof) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[46] + mi := &file_ark_v1_service_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2846,7 +2698,7 @@ func (x *OwnershipProof) ProtoReflect() protoreflect.Message { // Deprecated: Use OwnershipProof.ProtoReflect.Descriptor instead. func (*OwnershipProof) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{46} + return file_ark_v1_service_proto_rawDescGZIP(), []int{43} } func (x *OwnershipProof) GetControlBlock() string { @@ -2882,7 +2734,7 @@ type SignedVtxoOutpoint struct { func (x *SignedVtxoOutpoint) Reset() { *x = SignedVtxoOutpoint{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[47] + mi := &file_ark_v1_service_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2895,7 +2747,7 @@ func (x *SignedVtxoOutpoint) String() string { func (*SignedVtxoOutpoint) ProtoMessage() {} func (x *SignedVtxoOutpoint) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[47] + mi := &file_ark_v1_service_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2908,7 +2760,7 @@ func (x *SignedVtxoOutpoint) ProtoReflect() protoreflect.Message { // Deprecated: Use SignedVtxoOutpoint.ProtoReflect.Descriptor instead. func (*SignedVtxoOutpoint) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{47} + return file_ark_v1_service_proto_rawDescGZIP(), []int{44} } func (x *SignedVtxoOutpoint) GetOutpoint() *Outpoint { @@ -2937,7 +2789,7 @@ type SetNostrRecipientRequest struct { func (x *SetNostrRecipientRequest) Reset() { *x = SetNostrRecipientRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[48] + mi := &file_ark_v1_service_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2950,7 +2802,7 @@ func (x *SetNostrRecipientRequest) String() string { func (*SetNostrRecipientRequest) ProtoMessage() {} func (x *SetNostrRecipientRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[48] + mi := &file_ark_v1_service_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2963,7 +2815,7 @@ func (x *SetNostrRecipientRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetNostrRecipientRequest.ProtoReflect.Descriptor instead. func (*SetNostrRecipientRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{48} + return file_ark_v1_service_proto_rawDescGZIP(), []int{45} } func (x *SetNostrRecipientRequest) GetNostrRecipient() string { @@ -2989,7 +2841,7 @@ type SetNostrRecipientResponse struct { func (x *SetNostrRecipientResponse) Reset() { *x = SetNostrRecipientResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[49] + mi := &file_ark_v1_service_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3002,7 +2854,7 @@ func (x *SetNostrRecipientResponse) String() string { func (*SetNostrRecipientResponse) ProtoMessage() {} func (x *SetNostrRecipientResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[49] + mi := &file_ark_v1_service_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3015,7 +2867,7 @@ func (x *SetNostrRecipientResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetNostrRecipientResponse.ProtoReflect.Descriptor instead. func (*SetNostrRecipientResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{49} + return file_ark_v1_service_proto_rawDescGZIP(), []int{46} } type DeleteNostrRecipientRequest struct { @@ -3029,7 +2881,7 @@ type DeleteNostrRecipientRequest struct { func (x *DeleteNostrRecipientRequest) Reset() { *x = DeleteNostrRecipientRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[50] + mi := &file_ark_v1_service_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3042,7 +2894,7 @@ func (x *DeleteNostrRecipientRequest) String() string { func (*DeleteNostrRecipientRequest) ProtoMessage() {} func (x *DeleteNostrRecipientRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[50] + mi := &file_ark_v1_service_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3055,7 +2907,7 @@ func (x *DeleteNostrRecipientRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteNostrRecipientRequest.ProtoReflect.Descriptor instead. func (*DeleteNostrRecipientRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{50} + return file_ark_v1_service_proto_rawDescGZIP(), []int{47} } func (x *DeleteNostrRecipientRequest) GetVtxos() []*SignedVtxoOutpoint { @@ -3074,7 +2926,7 @@ type DeleteNostrRecipientResponse struct { func (x *DeleteNostrRecipientResponse) Reset() { *x = DeleteNostrRecipientResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[51] + mi := &file_ark_v1_service_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3087,7 +2939,7 @@ func (x *DeleteNostrRecipientResponse) String() string { func (*DeleteNostrRecipientResponse) ProtoMessage() {} func (x *DeleteNostrRecipientResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[51] + mi := &file_ark_v1_service_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3100,7 +2952,7 @@ func (x *DeleteNostrRecipientResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteNostrRecipientResponse.ProtoReflect.Descriptor instead. func (*DeleteNostrRecipientResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{51} + return file_ark_v1_service_proto_rawDescGZIP(), []int{48} } type Tapscripts struct { @@ -3114,7 +2966,7 @@ type Tapscripts struct { func (x *Tapscripts) Reset() { *x = Tapscripts{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[52] + mi := &file_ark_v1_service_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3127,7 +2979,7 @@ func (x *Tapscripts) String() string { func (*Tapscripts) ProtoMessage() {} func (x *Tapscripts) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[52] + mi := &file_ark_v1_service_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3140,7 +2992,7 @@ func (x *Tapscripts) ProtoReflect() protoreflect.Message { // Deprecated: Use Tapscripts.ProtoReflect.Descriptor instead. func (*Tapscripts) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{52} + return file_ark_v1_service_proto_rawDescGZIP(), []int{49} } func (x *Tapscripts) GetScripts() []string { @@ -3164,7 +3016,7 @@ type MarketHour struct { func (x *MarketHour) Reset() { *x = MarketHour{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[53] + mi := &file_ark_v1_service_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3177,7 +3029,7 @@ func (x *MarketHour) String() string { func (*MarketHour) ProtoMessage() {} func (x *MarketHour) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[53] + mi := &file_ark_v1_service_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3190,7 +3042,7 @@ func (x *MarketHour) ProtoReflect() protoreflect.Message { // Deprecated: Use MarketHour.ProtoReflect.Descriptor instead. func (*MarketHour) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{53} + return file_ark_v1_service_proto_rawDescGZIP(), []int{50} } func (x *MarketHour) GetNextStartTime() *timestamppb.Timestamp { @@ -3357,383 +3209,360 @@ var file_ark_v1_service_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x0e, 0x0a, 0x0c, - 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x11, - 0x41, 0x73, 0x79, 0x6e, 0x63, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x12, 0x23, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, - 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, - 0x74, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x4c, 0x65, 0x61, 0x66, 0x48, 0x61, - 0x73, 0x68, 0x22, 0x73, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x72, 0x6b, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x28, 0x0a, - 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x07, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x28, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x65, - 0x6d, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x22, 0x42, 0x0a, 0x16, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, - 0x65, 0x64, 0x65, 0x65, 0x6d, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x22, 0x19, - 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, - 0x22, 0x37, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, - 0x6e, 0x64, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x3b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x2c, 0x0a, - 0x10, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x79, 0x0a, 0x11, 0x4c, - 0x69, 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x35, 0x0a, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x74, - 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, - 0x6c, 0x65, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x74, - 0x5f, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, - 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x16, 0x52, 0x6f, 0x75, 0x6e, 0x64, - 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x29, 0x0a, 0x09, - 0x76, 0x74, 0x78, 0x6f, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x76, - 0x74, 0x78, 0x6f, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x72, - 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x65, 0x65, - 0x52, 0x61, 0x74, 0x65, 0x22, 0x44, 0x0a, 0x13, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x69, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x50, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x73, 0x12, 0x3a, 0x0a, 0x12, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x5f, 0x76, 0x74, 0x78, 0x6f, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x10, - 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x74, 0x78, 0x6f, 0x54, 0x72, 0x65, 0x65, - 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x22, 0x53, 0x0a, 0x20, - 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x6e, 0x63, - 0x65, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, - 0x65, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x29, - 0x0a, 0x09, 0x76, 0x74, 0x78, 0x6f, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, - 0x08, 0x76, 0x74, 0x78, 0x6f, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6f, 0x72, - 0x66, 0x65, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x72, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x67, 0x65, 0x22, 0x32, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x78, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x04, 0x76, 0x6f, 0x75, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x05, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, - 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x20, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x61, - 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x74, 0x61, 0x70, 0x72, - 0x6f, 0x6f, 0x74, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x22, 0x3a, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x31, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x06, - 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, - 0x06, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x22, 0x2f, 0x0a, 0x09, 0x54, 0x72, 0x65, 0x65, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x22, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x78, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x74, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, - 0x78, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x54, 0x78, 0x69, 0x64, 0x22, 0xc2, 0x02, 0x0a, 0x04, 0x56, 0x74, 0x78, 0x6f, 0x12, 0x2c, - 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x70, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x70, 0x65, - 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x69, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x09, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x77, 0x65, - 0x70, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x77, 0x65, 0x70, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1b, - 0x0a, 0x09, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x5f, 0x74, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x1d, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x72, - 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x33, - 0x0a, 0x06, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x64, - 0x65, 0x65, 0x6d, 0x42, 0x04, 0x0a, 0x02, 0x74, 0x78, 0x22, 0xd8, 0x01, 0x0a, 0x10, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, - 0x69, 0x64, 0x12, 0x31, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x74, 0x78, 0x6f, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x74, - 0x56, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x35, 0x0a, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0e, 0x73, 0x70, - 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x46, 0x0a, 0x16, - 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x14, - 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x55, - 0x74, 0x78, 0x6f, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x31, - 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x56, 0x74, 0x78, 0x6f, - 0x73, 0x12, 0x35, 0x0a, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, - 0x74, 0x78, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, - 0x62, 0x6c, 0x65, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x6b, 0x0a, 0x0e, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x70, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, - 0x74, 0x78, 0x6f, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x6f, + 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x0a, 0x15, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x5f, + 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, + 0x54, 0x78, 0x22, 0x42, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x64, 0x65, + 0x65, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x5f, 0x74, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x65, + 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x22, 0x37, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, + 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x2c, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x79, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x56, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x74, 0x78, 0x6f, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x56, + 0x74, 0x78, 0x6f, 0x73, 0x12, 0x2d, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x74, + 0x78, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x56, 0x74, + 0x78, 0x6f, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x16, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x29, 0x0a, 0x09, 0x76, 0x74, 0x78, + 0x6f, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, + 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x76, 0x74, 0x78, 0x6f, + 0x54, 0x72, 0x65, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x6c, 0x61, + 0x79, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x22, 0x44, 0x0a, 0x13, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x54, 0x78, 0x69, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xb8, + 0x01, 0x0a, 0x11, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x10, 0x63, 0x6f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x73, 0x12, 0x3a, 0x0a, 0x12, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x74, + 0x78, 0x6f, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x10, 0x75, 0x6e, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x74, 0x78, 0x6f, 0x54, 0x72, 0x65, 0x65, 0x12, 0x2a, 0x0a, + 0x11, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x22, 0x53, 0x0a, 0x20, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xf0, + 0x01, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x29, 0x0a, 0x09, 0x76, + 0x74, 0x78, 0x6f, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x76, 0x74, + 0x78, 0x6f, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, + 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x6f, 0x72, + 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x22, 0x32, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x04, 0x76, 0x6f, 0x75, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, + 0x2c, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x20, 0x0a, + 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, + 0x34, 0x0a, 0x0a, 0x74, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x70, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x61, 0x70, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x6f, 0x74, + 0x5f, 0x74, 0x72, 0x65, 0x65, 0x22, 0x3a, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x31, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x06, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x73, 0x22, 0x2f, 0x0a, 0x09, 0x54, 0x72, 0x65, 0x65, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x22, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, + 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x78, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x78, + 0x69, 0x64, 0x22, 0xc2, 0x02, 0x0a, 0x04, 0x56, 0x74, 0x78, 0x6f, 0x12, 0x2c, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x75, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4e, 0x6f, - 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x6f, 0x73, 0x74, 0x72, 0x5f, 0x72, 0x65, 0x63, - 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x6f, - 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x05, - 0x76, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x72, - 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x74, 0x78, 0x6f, 0x4f, - 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x1b, - 0x0a, 0x19, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x1b, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x74, - 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x74, 0x78, 0x6f, 0x4f, 0x75, 0x74, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x1e, 0x0a, 0x1c, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x0a, - 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, - 0x6f, 0x75, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, - 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, - 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x40, 0x0a, 0x0e, 0x72, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2a, 0x98, 0x01, 0x0a, - 0x0a, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x52, - 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x4f, 0x55, 0x4e, - 0x44, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, - 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x54, - 0x41, 0x47, 0x45, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03, 0x12, - 0x16, 0x0a, 0x12, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x32, 0xe0, 0x0f, 0x0a, 0x0a, 0x41, 0x72, 0x6b, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x16, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x72, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, - 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x74, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x61, 0x72, 0x64, - 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x72, 0x6b, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, - 0x31, 0x2f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x98, 0x01, 0x0a, 0x1a, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, - 0x4e, 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x29, 0x2e, 0x61, 0x72, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, - 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, 0x78, 0x74, - 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x2a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, - 0x72, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2b, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, 0x78, - 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x73, 0x12, 0x7d, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, - 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x72, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, - 0x63, 0x65, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, - 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, - 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x74, 0x72, - 0x65, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x12, 0x25, - 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, - 0x69, 0x74, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, - 0x75, 0x6e, 0x64, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, - 0x74, 0x54, 0x78, 0x73, 0x12, 0x65, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, - 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x04, 0x50, - 0x69, 0x6e, 0x67, 0x12, 0x13, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x7d, 0x12, 0x64, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x73, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x57, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x17, 0x2e, 0x61, 0x72, 0x6b, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x2f, 0x7b, 0x74, 0x78, 0x69, 0x64, 0x7d, 0x12, 0x64, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x5d, 0x0a, - 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x72, 0x6b, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x74, 0x78, - 0x6f, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x80, 0x01, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x24, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x30, 0x01, 0x12, - 0x73, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x74, 0x78, 0x6f, 0x2f, 0x6e, - 0x6f, 0x73, 0x74, 0x72, 0x12, 0x83, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, - 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e, - 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x73, - 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x69, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x77, 0x65, 0x70, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x77, 0x65, 0x70, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x69, 0x73, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x69, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x64, 0x65, 0x65, 0x6d, 0x5f, 0x74, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x33, 0x0a, 0x06, 0x72, + 0x65, 0x64, 0x65, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x72, + 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, + 0x42, 0x04, 0x0a, 0x02, 0x74, 0x78, 0x22, 0xd8, 0x01, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, + 0x31, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, + 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x56, 0x74, 0x78, + 0x6f, 0x73, 0x12, 0x35, 0x0a, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x76, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, + 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, + 0x61, 0x62, 0x6c, 0x65, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x46, 0x0a, 0x16, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x74, + 0x78, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x14, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x65, 0x64, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x55, 0x74, 0x78, 0x6f, + 0x73, 0x22, 0x91, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x0b, 0x73, + 0x70, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x35, + 0x0a, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x74, 0x78, 0x6f, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x74, 0x78, 0x6f, 0x52, 0x0e, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, + 0x56, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x6b, 0x0a, 0x0e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x22, 0x70, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x74, 0x78, 0x6f, + 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, + 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x52, 0x05, 0x70, + 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x75, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x73, 0x74, 0x72, + 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x6f, 0x73, 0x74, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x6f, 0x73, 0x74, 0x72, + 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x74, 0x78, + 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x74, 0x78, 0x6f, 0x4f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x53, + 0x65, 0x74, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, - 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x74, 0x78, 0x6f, 0x2f, 0x6e, 0x6f, - 0x73, 0x74, 0x72, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x92, 0x01, 0x0a, 0x0a, 0x63, - 0x6f, 0x6d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x6b, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2f, 0x61, 0x72, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2d, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x72, 0x6b, 0x2f, - 0x76, 0x31, 0x3b, 0x61, 0x72, 0x6b, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, - 0x06, 0x41, 0x72, 0x6b, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x41, 0x72, 0x6b, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x12, 0x41, 0x72, 0x6b, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x41, 0x72, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x74, 0x78, 0x6f, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x74, 0x78, 0x6f, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x05, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x0a, 0x54, 0x61, 0x70, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x73, 0x22, 0x85, 0x02, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x48, 0x6f, 0x75, 0x72, + 0x12, 0x42, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x6e, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x40, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2a, 0x98, 0x01, 0x0a, 0x0a, 0x52, 0x6f, + 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x52, 0x4f, 0x55, 0x4e, + 0x44, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, + 0x54, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, + 0x47, 0x45, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x02, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, + 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, + 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x10, 0x04, 0x32, 0xf0, 0x0e, 0x0a, 0x0a, 0x41, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, + 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x66, + 0x6f, 0x12, 0x74, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x98, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, 0x78, + 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x29, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, + 0x72, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, 0x78, 0x74, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x1b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x12, 0x2a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, + 0x78, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x73, 0x12, 0x7d, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x4e, + 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x74, + 0x72, 0x65, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, + 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, + 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, + 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, + 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x8e, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x12, 0x25, 0x2e, 0x61, 0x72, + 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, + 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, + 0x73, 0x12, 0x65, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, + 0x12, 0x13, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x70, + 0x69, 0x6e, 0x67, 0x2f, 0x7b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, + 0x12, 0x69, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, + 0x54, 0x78, 0x12, 0x1d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, + 0x31, 0x2f, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x2d, 0x74, 0x78, 0x12, 0x57, 0x0a, 0x08, 0x47, + 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x17, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x7b, 0x74, + 0x78, 0x69, 0x64, 0x7d, 0x12, 0x64, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x42, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, + 0x75, 0x6e, 0x64, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x5d, 0x0a, 0x09, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, + 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x74, 0x78, 0x6f, 0x73, 0x2f, + 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x24, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x72, 0x6b, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x30, 0x01, 0x12, 0x73, 0x0a, 0x11, + 0x53, 0x65, 0x74, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x12, 0x20, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4e, 0x6f, + 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, + 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, + 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x74, 0x78, 0x6f, 0x2f, 0x6e, 0x6f, 0x73, 0x74, + 0x72, 0x12, 0x83, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x73, 0x74, + 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x6f, 0x73, 0x74, 0x72, 0x52, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, + 0x6f, 0x73, 0x74, 0x72, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, + 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x74, 0x78, 0x6f, 0x2f, 0x6e, 0x6f, 0x73, 0x74, 0x72, + 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x92, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x6b, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, + 0x72, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2d, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x3b, + 0x61, 0x72, 0x6b, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x41, 0x72, + 0x6b, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x41, 0x72, 0x6b, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, + 0x41, 0x72, 0x6b, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x07, 0x41, 0x72, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3749,7 +3578,7 @@ func file_ark_v1_service_proto_rawDescGZIP() []byte { } var file_ark_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ark_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 54) +var file_ark_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 51) var file_ark_v1_service_proto_goTypes = []interface{}{ (RoundStage)(0), // 0: ark.v1.RoundStage (*GetInfoRequest)(nil), // 1: ark.v1.GetInfoRequest @@ -3770,125 +3599,117 @@ var file_ark_v1_service_proto_goTypes = []interface{}{ (*GetEventStreamResponse)(nil), // 16: ark.v1.GetEventStreamResponse (*PingRequest)(nil), // 17: ark.v1.PingRequest (*PingResponse)(nil), // 18: ark.v1.PingResponse - (*AsyncPaymentInput)(nil), // 19: ark.v1.AsyncPaymentInput - (*CreatePaymentRequest)(nil), // 20: ark.v1.CreatePaymentRequest - (*CreatePaymentResponse)(nil), // 21: ark.v1.CreatePaymentResponse - (*CompletePaymentRequest)(nil), // 22: ark.v1.CompletePaymentRequest - (*CompletePaymentResponse)(nil), // 23: ark.v1.CompletePaymentResponse - (*GetRoundRequest)(nil), // 24: ark.v1.GetRoundRequest - (*GetRoundResponse)(nil), // 25: ark.v1.GetRoundResponse - (*GetRoundByIdRequest)(nil), // 26: ark.v1.GetRoundByIdRequest - (*GetRoundByIdResponse)(nil), // 27: ark.v1.GetRoundByIdResponse - (*ListVtxosRequest)(nil), // 28: ark.v1.ListVtxosRequest - (*ListVtxosResponse)(nil), // 29: ark.v1.ListVtxosResponse - (*RoundFinalizationEvent)(nil), // 30: ark.v1.RoundFinalizationEvent - (*RoundFinalizedEvent)(nil), // 31: ark.v1.RoundFinalizedEvent - (*RoundFailed)(nil), // 32: ark.v1.RoundFailed - (*RoundSigningEvent)(nil), // 33: ark.v1.RoundSigningEvent - (*RoundSigningNoncesGeneratedEvent)(nil), // 34: ark.v1.RoundSigningNoncesGeneratedEvent - (*Round)(nil), // 35: ark.v1.Round - (*Outpoint)(nil), // 36: ark.v1.Outpoint - (*Input)(nil), // 37: ark.v1.Input - (*Output)(nil), // 38: ark.v1.Output - (*Tree)(nil), // 39: ark.v1.Tree - (*TreeLevel)(nil), // 40: ark.v1.TreeLevel - (*Node)(nil), // 41: ark.v1.Node - (*Vtxo)(nil), // 42: ark.v1.Vtxo - (*GetTransactionsStreamRequest)(nil), // 43: ark.v1.GetTransactionsStreamRequest - (*GetTransactionsStreamResponse)(nil), // 44: ark.v1.GetTransactionsStreamResponse - (*RoundTransaction)(nil), // 45: ark.v1.RoundTransaction - (*RedeemTransaction)(nil), // 46: ark.v1.RedeemTransaction - (*OwnershipProof)(nil), // 47: ark.v1.OwnershipProof - (*SignedVtxoOutpoint)(nil), // 48: ark.v1.SignedVtxoOutpoint - (*SetNostrRecipientRequest)(nil), // 49: ark.v1.SetNostrRecipientRequest - (*SetNostrRecipientResponse)(nil), // 50: ark.v1.SetNostrRecipientResponse - (*DeleteNostrRecipientRequest)(nil), // 51: ark.v1.DeleteNostrRecipientRequest - (*DeleteNostrRecipientResponse)(nil), // 52: ark.v1.DeleteNostrRecipientResponse - (*Tapscripts)(nil), // 53: ark.v1.Tapscripts - (*MarketHour)(nil), // 54: ark.v1.MarketHour - (*timestamppb.Timestamp)(nil), // 55: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 56: google.protobuf.Duration + (*SubmitRedeemTxRequest)(nil), // 19: ark.v1.SubmitRedeemTxRequest + (*SubmitRedeemTxResponse)(nil), // 20: ark.v1.SubmitRedeemTxResponse + (*GetRoundRequest)(nil), // 21: ark.v1.GetRoundRequest + (*GetRoundResponse)(nil), // 22: ark.v1.GetRoundResponse + (*GetRoundByIdRequest)(nil), // 23: ark.v1.GetRoundByIdRequest + (*GetRoundByIdResponse)(nil), // 24: ark.v1.GetRoundByIdResponse + (*ListVtxosRequest)(nil), // 25: ark.v1.ListVtxosRequest + (*ListVtxosResponse)(nil), // 26: ark.v1.ListVtxosResponse + (*RoundFinalizationEvent)(nil), // 27: ark.v1.RoundFinalizationEvent + (*RoundFinalizedEvent)(nil), // 28: ark.v1.RoundFinalizedEvent + (*RoundFailed)(nil), // 29: ark.v1.RoundFailed + (*RoundSigningEvent)(nil), // 30: ark.v1.RoundSigningEvent + (*RoundSigningNoncesGeneratedEvent)(nil), // 31: ark.v1.RoundSigningNoncesGeneratedEvent + (*Round)(nil), // 32: ark.v1.Round + (*Outpoint)(nil), // 33: ark.v1.Outpoint + (*Input)(nil), // 34: ark.v1.Input + (*Output)(nil), // 35: ark.v1.Output + (*Tree)(nil), // 36: ark.v1.Tree + (*TreeLevel)(nil), // 37: ark.v1.TreeLevel + (*Node)(nil), // 38: ark.v1.Node + (*Vtxo)(nil), // 39: ark.v1.Vtxo + (*GetTransactionsStreamRequest)(nil), // 40: ark.v1.GetTransactionsStreamRequest + (*GetTransactionsStreamResponse)(nil), // 41: ark.v1.GetTransactionsStreamResponse + (*RoundTransaction)(nil), // 42: ark.v1.RoundTransaction + (*RedeemTransaction)(nil), // 43: ark.v1.RedeemTransaction + (*OwnershipProof)(nil), // 44: ark.v1.OwnershipProof + (*SignedVtxoOutpoint)(nil), // 45: ark.v1.SignedVtxoOutpoint + (*SetNostrRecipientRequest)(nil), // 46: ark.v1.SetNostrRecipientRequest + (*SetNostrRecipientResponse)(nil), // 47: ark.v1.SetNostrRecipientResponse + (*DeleteNostrRecipientRequest)(nil), // 48: ark.v1.DeleteNostrRecipientRequest + (*DeleteNostrRecipientResponse)(nil), // 49: ark.v1.DeleteNostrRecipientResponse + (*Tapscripts)(nil), // 50: ark.v1.Tapscripts + (*MarketHour)(nil), // 51: ark.v1.MarketHour + (*timestamppb.Timestamp)(nil), // 52: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 53: google.protobuf.Duration } var file_ark_v1_service_proto_depIdxs = []int32{ - 54, // 0: ark.v1.GetInfoResponse.market_hour:type_name -> ark.v1.MarketHour - 53, // 1: ark.v1.GetBoardingAddressResponse.tapscripts:type_name -> ark.v1.Tapscripts - 37, // 2: ark.v1.RegisterInputsForNextRoundRequest.inputs:type_name -> ark.v1.Input - 38, // 3: ark.v1.RegisterOutputsForNextRoundRequest.outputs:type_name -> ark.v1.Output - 30, // 4: ark.v1.GetEventStreamResponse.round_finalization:type_name -> ark.v1.RoundFinalizationEvent - 31, // 5: ark.v1.GetEventStreamResponse.round_finalized:type_name -> ark.v1.RoundFinalizedEvent - 32, // 6: ark.v1.GetEventStreamResponse.round_failed:type_name -> ark.v1.RoundFailed - 33, // 7: ark.v1.GetEventStreamResponse.round_signing:type_name -> ark.v1.RoundSigningEvent - 34, // 8: ark.v1.GetEventStreamResponse.round_signing_nonces_generated:type_name -> ark.v1.RoundSigningNoncesGeneratedEvent - 37, // 9: ark.v1.AsyncPaymentInput.input:type_name -> ark.v1.Input - 19, // 10: ark.v1.CreatePaymentRequest.inputs:type_name -> ark.v1.AsyncPaymentInput - 38, // 11: ark.v1.CreatePaymentRequest.outputs:type_name -> ark.v1.Output - 35, // 12: ark.v1.GetRoundResponse.round:type_name -> ark.v1.Round - 35, // 13: ark.v1.GetRoundByIdResponse.round:type_name -> ark.v1.Round - 42, // 14: ark.v1.ListVtxosResponse.spendable_vtxos:type_name -> ark.v1.Vtxo - 42, // 15: ark.v1.ListVtxosResponse.spent_vtxos:type_name -> ark.v1.Vtxo - 39, // 16: ark.v1.RoundFinalizationEvent.vtxo_tree:type_name -> ark.v1.Tree - 39, // 17: ark.v1.RoundSigningEvent.unsigned_vtxo_tree:type_name -> ark.v1.Tree - 39, // 18: ark.v1.Round.vtxo_tree:type_name -> ark.v1.Tree - 0, // 19: ark.v1.Round.stage:type_name -> ark.v1.RoundStage - 36, // 20: ark.v1.Input.outpoint:type_name -> ark.v1.Outpoint - 53, // 21: ark.v1.Input.tapscripts:type_name -> ark.v1.Tapscripts - 40, // 22: ark.v1.Tree.levels:type_name -> ark.v1.TreeLevel - 41, // 23: ark.v1.TreeLevel.nodes:type_name -> ark.v1.Node - 36, // 24: ark.v1.Vtxo.outpoint:type_name -> ark.v1.Outpoint - 45, // 25: ark.v1.GetTransactionsStreamResponse.round:type_name -> ark.v1.RoundTransaction - 46, // 26: ark.v1.GetTransactionsStreamResponse.redeem:type_name -> ark.v1.RedeemTransaction - 36, // 27: ark.v1.RoundTransaction.spent_vtxos:type_name -> ark.v1.Outpoint - 42, // 28: ark.v1.RoundTransaction.spendable_vtxos:type_name -> ark.v1.Vtxo - 36, // 29: ark.v1.RoundTransaction.claimed_boarding_utxos:type_name -> ark.v1.Outpoint - 36, // 30: ark.v1.RedeemTransaction.spent_vtxos:type_name -> ark.v1.Outpoint - 42, // 31: ark.v1.RedeemTransaction.spendable_vtxos:type_name -> ark.v1.Vtxo - 36, // 32: ark.v1.SignedVtxoOutpoint.outpoint:type_name -> ark.v1.Outpoint - 47, // 33: ark.v1.SignedVtxoOutpoint.proof:type_name -> ark.v1.OwnershipProof - 48, // 34: ark.v1.SetNostrRecipientRequest.vtxos:type_name -> ark.v1.SignedVtxoOutpoint - 48, // 35: ark.v1.DeleteNostrRecipientRequest.vtxos:type_name -> ark.v1.SignedVtxoOutpoint - 55, // 36: ark.v1.MarketHour.next_start_time:type_name -> google.protobuf.Timestamp - 55, // 37: ark.v1.MarketHour.next_end_time:type_name -> google.protobuf.Timestamp - 56, // 38: ark.v1.MarketHour.period:type_name -> google.protobuf.Duration - 56, // 39: ark.v1.MarketHour.round_interval:type_name -> google.protobuf.Duration - 1, // 40: ark.v1.ArkService.GetInfo:input_type -> ark.v1.GetInfoRequest - 3, // 41: ark.v1.ArkService.GetBoardingAddress:input_type -> ark.v1.GetBoardingAddressRequest - 5, // 42: ark.v1.ArkService.RegisterInputsForNextRound:input_type -> ark.v1.RegisterInputsForNextRoundRequest - 7, // 43: ark.v1.ArkService.RegisterOutputsForNextRound:input_type -> ark.v1.RegisterOutputsForNextRoundRequest - 9, // 44: ark.v1.ArkService.SubmitTreeNonces:input_type -> ark.v1.SubmitTreeNoncesRequest - 11, // 45: ark.v1.ArkService.SubmitTreeSignatures:input_type -> ark.v1.SubmitTreeSignaturesRequest - 13, // 46: ark.v1.ArkService.SubmitSignedForfeitTxs:input_type -> ark.v1.SubmitSignedForfeitTxsRequest - 15, // 47: ark.v1.ArkService.GetEventStream:input_type -> ark.v1.GetEventStreamRequest - 17, // 48: ark.v1.ArkService.Ping:input_type -> ark.v1.PingRequest - 20, // 49: ark.v1.ArkService.CreatePayment:input_type -> ark.v1.CreatePaymentRequest - 22, // 50: ark.v1.ArkService.CompletePayment:input_type -> ark.v1.CompletePaymentRequest - 24, // 51: ark.v1.ArkService.GetRound:input_type -> ark.v1.GetRoundRequest - 26, // 52: ark.v1.ArkService.GetRoundById:input_type -> ark.v1.GetRoundByIdRequest - 28, // 53: ark.v1.ArkService.ListVtxos:input_type -> ark.v1.ListVtxosRequest - 43, // 54: ark.v1.ArkService.GetTransactionsStream:input_type -> ark.v1.GetTransactionsStreamRequest - 49, // 55: ark.v1.ArkService.SetNostrRecipient:input_type -> ark.v1.SetNostrRecipientRequest - 51, // 56: ark.v1.ArkService.DeleteNostrRecipient:input_type -> ark.v1.DeleteNostrRecipientRequest - 2, // 57: ark.v1.ArkService.GetInfo:output_type -> ark.v1.GetInfoResponse - 4, // 58: ark.v1.ArkService.GetBoardingAddress:output_type -> ark.v1.GetBoardingAddressResponse - 6, // 59: ark.v1.ArkService.RegisterInputsForNextRound:output_type -> ark.v1.RegisterInputsForNextRoundResponse - 8, // 60: ark.v1.ArkService.RegisterOutputsForNextRound:output_type -> ark.v1.RegisterOutputsForNextRoundResponse - 10, // 61: ark.v1.ArkService.SubmitTreeNonces:output_type -> ark.v1.SubmitTreeNoncesResponse - 12, // 62: ark.v1.ArkService.SubmitTreeSignatures:output_type -> ark.v1.SubmitTreeSignaturesResponse - 14, // 63: ark.v1.ArkService.SubmitSignedForfeitTxs:output_type -> ark.v1.SubmitSignedForfeitTxsResponse - 16, // 64: ark.v1.ArkService.GetEventStream:output_type -> ark.v1.GetEventStreamResponse - 18, // 65: ark.v1.ArkService.Ping:output_type -> ark.v1.PingResponse - 21, // 66: ark.v1.ArkService.CreatePayment:output_type -> ark.v1.CreatePaymentResponse - 23, // 67: ark.v1.ArkService.CompletePayment:output_type -> ark.v1.CompletePaymentResponse - 25, // 68: ark.v1.ArkService.GetRound:output_type -> ark.v1.GetRoundResponse - 27, // 69: ark.v1.ArkService.GetRoundById:output_type -> ark.v1.GetRoundByIdResponse - 29, // 70: ark.v1.ArkService.ListVtxos:output_type -> ark.v1.ListVtxosResponse - 44, // 71: ark.v1.ArkService.GetTransactionsStream:output_type -> ark.v1.GetTransactionsStreamResponse - 50, // 72: ark.v1.ArkService.SetNostrRecipient:output_type -> ark.v1.SetNostrRecipientResponse - 52, // 73: ark.v1.ArkService.DeleteNostrRecipient:output_type -> ark.v1.DeleteNostrRecipientResponse - 57, // [57:74] is the sub-list for method output_type - 40, // [40:57] is the sub-list for method input_type - 40, // [40:40] is the sub-list for extension type_name - 40, // [40:40] is the sub-list for extension extendee - 0, // [0:40] is the sub-list for field type_name + 51, // 0: ark.v1.GetInfoResponse.market_hour:type_name -> ark.v1.MarketHour + 50, // 1: ark.v1.GetBoardingAddressResponse.tapscripts:type_name -> ark.v1.Tapscripts + 34, // 2: ark.v1.RegisterInputsForNextRoundRequest.inputs:type_name -> ark.v1.Input + 35, // 3: ark.v1.RegisterOutputsForNextRoundRequest.outputs:type_name -> ark.v1.Output + 27, // 4: ark.v1.GetEventStreamResponse.round_finalization:type_name -> ark.v1.RoundFinalizationEvent + 28, // 5: ark.v1.GetEventStreamResponse.round_finalized:type_name -> ark.v1.RoundFinalizedEvent + 29, // 6: ark.v1.GetEventStreamResponse.round_failed:type_name -> ark.v1.RoundFailed + 30, // 7: ark.v1.GetEventStreamResponse.round_signing:type_name -> ark.v1.RoundSigningEvent + 31, // 8: ark.v1.GetEventStreamResponse.round_signing_nonces_generated:type_name -> ark.v1.RoundSigningNoncesGeneratedEvent + 32, // 9: ark.v1.GetRoundResponse.round:type_name -> ark.v1.Round + 32, // 10: ark.v1.GetRoundByIdResponse.round:type_name -> ark.v1.Round + 39, // 11: ark.v1.ListVtxosResponse.spendable_vtxos:type_name -> ark.v1.Vtxo + 39, // 12: ark.v1.ListVtxosResponse.spent_vtxos:type_name -> ark.v1.Vtxo + 36, // 13: ark.v1.RoundFinalizationEvent.vtxo_tree:type_name -> ark.v1.Tree + 36, // 14: ark.v1.RoundSigningEvent.unsigned_vtxo_tree:type_name -> ark.v1.Tree + 36, // 15: ark.v1.Round.vtxo_tree:type_name -> ark.v1.Tree + 0, // 16: ark.v1.Round.stage:type_name -> ark.v1.RoundStage + 33, // 17: ark.v1.Input.outpoint:type_name -> ark.v1.Outpoint + 50, // 18: ark.v1.Input.tapscripts:type_name -> ark.v1.Tapscripts + 37, // 19: ark.v1.Tree.levels:type_name -> ark.v1.TreeLevel + 38, // 20: ark.v1.TreeLevel.nodes:type_name -> ark.v1.Node + 33, // 21: ark.v1.Vtxo.outpoint:type_name -> ark.v1.Outpoint + 42, // 22: ark.v1.GetTransactionsStreamResponse.round:type_name -> ark.v1.RoundTransaction + 43, // 23: ark.v1.GetTransactionsStreamResponse.redeem:type_name -> ark.v1.RedeemTransaction + 33, // 24: ark.v1.RoundTransaction.spent_vtxos:type_name -> ark.v1.Outpoint + 39, // 25: ark.v1.RoundTransaction.spendable_vtxos:type_name -> ark.v1.Vtxo + 33, // 26: ark.v1.RoundTransaction.claimed_boarding_utxos:type_name -> ark.v1.Outpoint + 33, // 27: ark.v1.RedeemTransaction.spent_vtxos:type_name -> ark.v1.Outpoint + 39, // 28: ark.v1.RedeemTransaction.spendable_vtxos:type_name -> ark.v1.Vtxo + 33, // 29: ark.v1.SignedVtxoOutpoint.outpoint:type_name -> ark.v1.Outpoint + 44, // 30: ark.v1.SignedVtxoOutpoint.proof:type_name -> ark.v1.OwnershipProof + 45, // 31: ark.v1.SetNostrRecipientRequest.vtxos:type_name -> ark.v1.SignedVtxoOutpoint + 45, // 32: ark.v1.DeleteNostrRecipientRequest.vtxos:type_name -> ark.v1.SignedVtxoOutpoint + 52, // 33: ark.v1.MarketHour.next_start_time:type_name -> google.protobuf.Timestamp + 52, // 34: ark.v1.MarketHour.next_end_time:type_name -> google.protobuf.Timestamp + 53, // 35: ark.v1.MarketHour.period:type_name -> google.protobuf.Duration + 53, // 36: ark.v1.MarketHour.round_interval:type_name -> google.protobuf.Duration + 1, // 37: ark.v1.ArkService.GetInfo:input_type -> ark.v1.GetInfoRequest + 3, // 38: ark.v1.ArkService.GetBoardingAddress:input_type -> ark.v1.GetBoardingAddressRequest + 5, // 39: ark.v1.ArkService.RegisterInputsForNextRound:input_type -> ark.v1.RegisterInputsForNextRoundRequest + 7, // 40: ark.v1.ArkService.RegisterOutputsForNextRound:input_type -> ark.v1.RegisterOutputsForNextRoundRequest + 9, // 41: ark.v1.ArkService.SubmitTreeNonces:input_type -> ark.v1.SubmitTreeNoncesRequest + 11, // 42: ark.v1.ArkService.SubmitTreeSignatures:input_type -> ark.v1.SubmitTreeSignaturesRequest + 13, // 43: ark.v1.ArkService.SubmitSignedForfeitTxs:input_type -> ark.v1.SubmitSignedForfeitTxsRequest + 15, // 44: ark.v1.ArkService.GetEventStream:input_type -> ark.v1.GetEventStreamRequest + 17, // 45: ark.v1.ArkService.Ping:input_type -> ark.v1.PingRequest + 19, // 46: ark.v1.ArkService.SubmitRedeemTx:input_type -> ark.v1.SubmitRedeemTxRequest + 21, // 47: ark.v1.ArkService.GetRound:input_type -> ark.v1.GetRoundRequest + 23, // 48: ark.v1.ArkService.GetRoundById:input_type -> ark.v1.GetRoundByIdRequest + 25, // 49: ark.v1.ArkService.ListVtxos:input_type -> ark.v1.ListVtxosRequest + 40, // 50: ark.v1.ArkService.GetTransactionsStream:input_type -> ark.v1.GetTransactionsStreamRequest + 46, // 51: ark.v1.ArkService.SetNostrRecipient:input_type -> ark.v1.SetNostrRecipientRequest + 48, // 52: ark.v1.ArkService.DeleteNostrRecipient:input_type -> ark.v1.DeleteNostrRecipientRequest + 2, // 53: ark.v1.ArkService.GetInfo:output_type -> ark.v1.GetInfoResponse + 4, // 54: ark.v1.ArkService.GetBoardingAddress:output_type -> ark.v1.GetBoardingAddressResponse + 6, // 55: ark.v1.ArkService.RegisterInputsForNextRound:output_type -> ark.v1.RegisterInputsForNextRoundResponse + 8, // 56: ark.v1.ArkService.RegisterOutputsForNextRound:output_type -> ark.v1.RegisterOutputsForNextRoundResponse + 10, // 57: ark.v1.ArkService.SubmitTreeNonces:output_type -> ark.v1.SubmitTreeNoncesResponse + 12, // 58: ark.v1.ArkService.SubmitTreeSignatures:output_type -> ark.v1.SubmitTreeSignaturesResponse + 14, // 59: ark.v1.ArkService.SubmitSignedForfeitTxs:output_type -> ark.v1.SubmitSignedForfeitTxsResponse + 16, // 60: ark.v1.ArkService.GetEventStream:output_type -> ark.v1.GetEventStreamResponse + 18, // 61: ark.v1.ArkService.Ping:output_type -> ark.v1.PingResponse + 20, // 62: ark.v1.ArkService.SubmitRedeemTx:output_type -> ark.v1.SubmitRedeemTxResponse + 22, // 63: ark.v1.ArkService.GetRound:output_type -> ark.v1.GetRoundResponse + 24, // 64: ark.v1.ArkService.GetRoundById:output_type -> ark.v1.GetRoundByIdResponse + 26, // 65: ark.v1.ArkService.ListVtxos:output_type -> ark.v1.ListVtxosResponse + 41, // 66: ark.v1.ArkService.GetTransactionsStream:output_type -> ark.v1.GetTransactionsStreamResponse + 47, // 67: ark.v1.ArkService.SetNostrRecipient:output_type -> ark.v1.SetNostrRecipientResponse + 49, // 68: ark.v1.ArkService.DeleteNostrRecipient:output_type -> ark.v1.DeleteNostrRecipientResponse + 53, // [53:69] is the sub-list for method output_type + 37, // [37:53] is the sub-list for method input_type + 37, // [37:37] is the sub-list for extension type_name + 37, // [37:37] is the sub-list for extension extendee + 0, // [0:37] is the sub-list for field type_name } func init() { file_ark_v1_service_proto_init() } @@ -4114,7 +3935,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AsyncPaymentInput); i { + switch v := v.(*SubmitRedeemTxRequest); i { case 0: return &v.state case 1: @@ -4126,7 +3947,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePaymentRequest); i { + switch v := v.(*SubmitRedeemTxResponse); i { case 0: return &v.state case 1: @@ -4138,42 +3959,6 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePaymentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ark_v1_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompletePaymentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ark_v1_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompletePaymentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ark_v1_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRoundRequest); i { case 0: return &v.state @@ -4185,7 +3970,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRoundResponse); i { case 0: return &v.state @@ -4197,7 +3982,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRoundByIdRequest); i { case 0: return &v.state @@ -4209,7 +3994,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRoundByIdResponse); i { case 0: return &v.state @@ -4221,7 +4006,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListVtxosRequest); i { case 0: return &v.state @@ -4233,7 +4018,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListVtxosResponse); i { case 0: return &v.state @@ -4245,7 +4030,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoundFinalizationEvent); i { case 0: return &v.state @@ -4257,7 +4042,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoundFinalizedEvent); i { case 0: return &v.state @@ -4269,7 +4054,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoundFailed); i { case 0: return &v.state @@ -4281,7 +4066,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoundSigningEvent); i { case 0: return &v.state @@ -4293,7 +4078,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoundSigningNoncesGeneratedEvent); i { case 0: return &v.state @@ -4305,7 +4090,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Round); i { case 0: return &v.state @@ -4317,7 +4102,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Outpoint); i { case 0: return &v.state @@ -4329,7 +4114,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Input); i { case 0: return &v.state @@ -4341,7 +4126,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Output); i { case 0: return &v.state @@ -4353,7 +4138,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Tree); i { case 0: return &v.state @@ -4365,7 +4150,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TreeLevel); i { case 0: return &v.state @@ -4377,7 +4162,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Node); i { case 0: return &v.state @@ -4389,7 +4174,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Vtxo); i { case 0: return &v.state @@ -4401,7 +4186,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTransactionsStreamRequest); i { case 0: return &v.state @@ -4413,7 +4198,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTransactionsStreamResponse); i { case 0: return &v.state @@ -4425,7 +4210,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RoundTransaction); i { case 0: return &v.state @@ -4437,7 +4222,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RedeemTransaction); i { case 0: return &v.state @@ -4449,7 +4234,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OwnershipProof); i { case 0: return &v.state @@ -4461,7 +4246,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignedVtxoOutpoint); i { case 0: return &v.state @@ -4473,7 +4258,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetNostrRecipientRequest); i { case 0: return &v.state @@ -4485,7 +4270,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetNostrRecipientResponse); i { case 0: return &v.state @@ -4497,7 +4282,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteNostrRecipientRequest); i { case 0: return &v.state @@ -4509,7 +4294,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteNostrRecipientResponse); i { case 0: return &v.state @@ -4521,7 +4306,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Tapscripts); i { case 0: return &v.state @@ -4533,7 +4318,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MarketHour); i { case 0: return &v.state @@ -4559,11 +4344,11 @@ func file_ark_v1_service_proto_init() { (*GetEventStreamResponse_RoundSigning)(nil), (*GetEventStreamResponse_RoundSigningNoncesGenerated)(nil), } - file_ark_v1_service_proto_msgTypes[36].OneofWrappers = []interface{}{ + file_ark_v1_service_proto_msgTypes[33].OneofWrappers = []interface{}{ (*Input_Descriptor_)(nil), (*Input_Tapscripts)(nil), } - file_ark_v1_service_proto_msgTypes[43].OneofWrappers = []interface{}{ + file_ark_v1_service_proto_msgTypes[40].OneofWrappers = []interface{}{ (*GetTransactionsStreamResponse_Round)(nil), (*GetTransactionsStreamResponse_Redeem)(nil), } @@ -4573,7 +4358,7 @@ func file_ark_v1_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ark_v1_service_proto_rawDesc, NumEnums: 1, - NumMessages: 54, + NumMessages: 51, NumExtensions: 0, NumServices: 1, }, diff --git a/api-spec/protobuf/gen/ark/v1/service.pb.gw.go b/api-spec/protobuf/gen/ark/v1/service.pb.gw.go index 865901e..5f203ac 100644 --- a/api-spec/protobuf/gen/ark/v1/service.pb.gw.go +++ b/api-spec/protobuf/gen/ark/v1/service.pb.gw.go @@ -274,54 +274,28 @@ func local_request_ArkService_Ping_0(ctx context.Context, marshaler runtime.Mars } -func request_ArkService_CreatePayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePaymentRequest +func request_ArkService_SubmitRedeemTx_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitRedeemTxRequest var metadata runtime.ServerMetadata if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreatePayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SubmitRedeemTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_ArkService_CreatePayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePaymentRequest +func local_request_ArkService_SubmitRedeemTx_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitRedeemTxRequest var metadata runtime.ServerMetadata if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePayment(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ArkService_CompletePayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CompletePaymentRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CompletePayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ArkService_CompletePayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CompletePaymentRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CompletePayment(ctx, &protoReq) + msg, err := server.SubmitRedeemTx(ctx, &protoReq) return msg, metadata, err } @@ -765,7 +739,7 @@ func RegisterArkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) - mux.Handle("POST", pattern_ArkService_CreatePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ArkService_SubmitRedeemTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -773,12 +747,12 @@ func RegisterArkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/CreatePayment", runtime.WithHTTPPathPattern("/v1/payment")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/SubmitRedeemTx", runtime.WithHTTPPathPattern("/v1/redeem-tx")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ArkService_CreatePayment_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ArkService_SubmitRedeemTx_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -786,32 +760,7 @@ func RegisterArkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, return } - forward_ArkService_CreatePayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_CompletePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/CompletePayment", runtime.WithHTTPPathPattern("/v1/payment/complete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_CompletePayment_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ArkService_CompletePayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ArkService_SubmitRedeemTx_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1186,47 +1135,25 @@ func RegisterArkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) - mux.Handle("POST", pattern_ArkService_CreatePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ArkService_SubmitRedeemTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/CreatePayment", runtime.WithHTTPPathPattern("/v1/payment")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/SubmitRedeemTx", runtime.WithHTTPPathPattern("/v1/redeem-tx")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ArkService_CreatePayment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ArkService_SubmitRedeemTx_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ArkService_CreatePayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_CompletePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/CompletePayment", runtime.WithHTTPPathPattern("/v1/payment/complete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_CompletePayment_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ArkService_CompletePayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ArkService_SubmitRedeemTx_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1384,9 +1311,7 @@ var ( pattern_ArkService_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "round", "ping", "payment_id"}, "")) - pattern_ArkService_CreatePayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "payment"}, "")) - - pattern_ArkService_CompletePayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "complete"}, "")) + pattern_ArkService_SubmitRedeemTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "redeem-tx"}, "")) pattern_ArkService_GetRound_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "round", "txid"}, "")) @@ -1420,9 +1345,7 @@ var ( forward_ArkService_Ping_0 = runtime.ForwardResponseMessage - forward_ArkService_CreatePayment_0 = runtime.ForwardResponseMessage - - forward_ArkService_CompletePayment_0 = runtime.ForwardResponseMessage + forward_ArkService_SubmitRedeemTx_0 = runtime.ForwardResponseMessage forward_ArkService_GetRound_0 = runtime.ForwardResponseMessage diff --git a/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go b/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go index 4eb368b..d105805 100644 --- a/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go +++ b/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go @@ -27,8 +27,7 @@ type ArkServiceClient interface { SubmitSignedForfeitTxs(ctx context.Context, in *SubmitSignedForfeitTxsRequest, opts ...grpc.CallOption) (*SubmitSignedForfeitTxsResponse, error) GetEventStream(ctx context.Context, in *GetEventStreamRequest, opts ...grpc.CallOption) (ArkService_GetEventStreamClient, error) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) - CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*CreatePaymentResponse, error) - CompletePayment(ctx context.Context, in *CompletePaymentRequest, opts ...grpc.CallOption) (*CompletePaymentResponse, error) + SubmitRedeemTx(ctx context.Context, in *SubmitRedeemTxRequest, opts ...grpc.CallOption) (*SubmitRedeemTxResponse, error) GetRound(ctx context.Context, in *GetRoundRequest, opts ...grpc.CallOption) (*GetRoundResponse, error) GetRoundById(ctx context.Context, in *GetRoundByIdRequest, opts ...grpc.CallOption) (*GetRoundByIdResponse, error) ListVtxos(ctx context.Context, in *ListVtxosRequest, opts ...grpc.CallOption) (*ListVtxosResponse, error) @@ -149,18 +148,9 @@ func (c *arkServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...gr return out, nil } -func (c *arkServiceClient) CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*CreatePaymentResponse, error) { - out := new(CreatePaymentResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/CreatePayment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arkServiceClient) CompletePayment(ctx context.Context, in *CompletePaymentRequest, opts ...grpc.CallOption) (*CompletePaymentResponse, error) { - out := new(CompletePaymentResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/CompletePayment", in, out, opts...) +func (c *arkServiceClient) SubmitRedeemTx(ctx context.Context, in *SubmitRedeemTxRequest, opts ...grpc.CallOption) (*SubmitRedeemTxResponse, error) { + out := new(SubmitRedeemTxResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/SubmitRedeemTx", in, out, opts...) if err != nil { return nil, err } @@ -257,8 +247,7 @@ type ArkServiceServer interface { SubmitSignedForfeitTxs(context.Context, *SubmitSignedForfeitTxsRequest) (*SubmitSignedForfeitTxsResponse, error) GetEventStream(*GetEventStreamRequest, ArkService_GetEventStreamServer) error Ping(context.Context, *PingRequest) (*PingResponse, error) - CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error) - CompletePayment(context.Context, *CompletePaymentRequest) (*CompletePaymentResponse, error) + SubmitRedeemTx(context.Context, *SubmitRedeemTxRequest) (*SubmitRedeemTxResponse, error) GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) GetRoundById(context.Context, *GetRoundByIdRequest) (*GetRoundByIdResponse, error) ListVtxos(context.Context, *ListVtxosRequest) (*ListVtxosResponse, error) @@ -298,11 +287,8 @@ func (UnimplementedArkServiceServer) GetEventStream(*GetEventStreamRequest, ArkS func (UnimplementedArkServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") } -func (UnimplementedArkServiceServer) CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePayment not implemented") -} -func (UnimplementedArkServiceServer) CompletePayment(context.Context, *CompletePaymentRequest) (*CompletePaymentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompletePayment not implemented") +func (UnimplementedArkServiceServer) SubmitRedeemTx(context.Context, *SubmitRedeemTxRequest) (*SubmitRedeemTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitRedeemTx not implemented") } func (UnimplementedArkServiceServer) GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRound not implemented") @@ -499,38 +485,20 @@ func _ArkService_Ping_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _ArkService_CreatePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePaymentRequest) +func _ArkService_SubmitRedeemTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitRedeemTxRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).CreatePayment(ctx, in) + return srv.(ArkServiceServer).SubmitRedeemTx(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/CreatePayment", + FullMethod: "/ark.v1.ArkService/SubmitRedeemTx", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).CreatePayment(ctx, req.(*CreatePaymentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArkService_CompletePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CompletePaymentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArkServiceServer).CompletePayment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ark.v1.ArkService/CompletePayment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).CompletePayment(ctx, req.(*CompletePaymentRequest)) + return srv.(ArkServiceServer).SubmitRedeemTx(ctx, req.(*SubmitRedeemTxRequest)) } return interceptor(ctx, in, info, handler) } @@ -686,12 +654,8 @@ var ArkService_ServiceDesc = grpc.ServiceDesc{ Handler: _ArkService_Ping_Handler, }, { - MethodName: "CreatePayment", - Handler: _ArkService_CreatePayment_Handler, - }, - { - MethodName: "CompletePayment", - Handler: _ArkService_CompletePayment_Handler, + MethodName: "SubmitRedeemTx", + Handler: _ArkService_SubmitRedeemTx_Handler, }, { MethodName: "GetRound", diff --git a/common/bitcointree/pending.go b/common/bitcointree/pending.go new file mode 100644 index 0000000..72a63d9 --- /dev/null +++ b/common/bitcointree/pending.go @@ -0,0 +1,80 @@ +package bitcointree + +import ( + "fmt" + + "github.com/ark-network/ark/common" + "github.com/btcsuite/btcd/btcutil/psbt" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" +) + +func BuildRedeemTx( + vtxos []common.VtxoInput, + outputs []*wire.TxOut, + feeAmount int64, +) (string, error) { + if len(vtxos) <= 0 { + return "", fmt.Errorf("missing vtxos") + } + + ins := make([]*wire.OutPoint, 0, len(vtxos)) + witnessUtxos := make(map[int]*wire.TxOut) + tapscripts := make(map[int]*psbt.TaprootTapLeafScript) + + for index, vtxo := range vtxos { + rootHash := vtxo.Tapscript.ControlBlock.RootHash(vtxo.Tapscript.RevealedScript) + taprootKey := txscript.ComputeTaprootOutputKey(UnspendableKey(), rootHash) + + vtxoOutputScript, err := common.P2TRScript(taprootKey) + if err != nil { + return "", err + } + + witnessUtxos[index] = &wire.TxOut{ + Value: vtxo.Amount, + PkScript: vtxoOutputScript, + } + + ctrlBlockBytes, err := vtxo.Tapscript.ControlBlock.ToBytes() + if err != nil { + return "", err + } + + tapscripts[index] = &psbt.TaprootTapLeafScript{ + ControlBlock: ctrlBlockBytes, + Script: vtxo.Tapscript.RevealedScript, + LeafVersion: txscript.BaseLeafVersion, + } + + ins = append(ins, vtxo.Outpoint) + } + + if feeAmount >= outputs[len(outputs)-1].Value { + return "", fmt.Errorf("redeem tx fee is higher than the amount of the change receiver") + } + + sequences := make([]uint32, len(ins)) + for i := range sequences { + sequences[i] = wire.MaxTxInSequenceNum + } + + redeemPtx, err := psbt.New( + ins, outputs, 2, 0, sequences, + ) + if err != nil { + return "", err + } + + for i := range redeemPtx.Inputs { + redeemPtx.Inputs[i].WitnessUtxo = witnessUtxos[i] + redeemPtx.Inputs[i].TaprootLeafScript = []*psbt.TaprootTapLeafScript{tapscripts[i]} + } + + redeemTx, err := redeemPtx.B64Encode() + if err != nil { + return "", err + } + + return redeemTx, nil +} diff --git a/common/fees.go b/common/fees.go index cb530b0..777086c 100644 --- a/common/fees.go +++ b/common/fees.go @@ -26,7 +26,7 @@ var ConnectorTxSize = (&input.TxWeightEstimator{}). AddP2TROutput(). VSize() -func ComputeForfeitMinRelayFee( +func ComputeForfeitTxFee( feeRate chainfee.SatPerKVByte, tapscript *waddrmgr.Tapscript, witnessSize int, @@ -57,3 +57,32 @@ func ComputeForfeitMinRelayFee( return uint64(feeRate.FeeForVSize(lntypes.VByte(txWeightEstimator.VSize())).ToUnit(btcutil.AmountSatoshi)), nil } + +func ComputeRedeemTxFee( + feeRate chainfee.SatPerKVByte, + vtxos []VtxoInput, + numOutputs int, +) (int64, error) { + if len(vtxos) <= 0 { + return 0, fmt.Errorf("missing vtxos") + } + + redeemTxWeightEstimator := &input.TxWeightEstimator{} + + // Estimate inputs + for _, vtxo := range vtxos { + if vtxo.Tapscript == nil { + txid := vtxo.Outpoint.Hash.String() + return 0, fmt.Errorf("missing tapscript for vtxo %s", txid) + } + + redeemTxWeightEstimator.AddTapscriptInput(lntypes.WeightUnit(vtxo.WitnessSize), vtxo.Tapscript) + } + + // Estimate outputs + for i := 0; i < numOutputs; i++ { + redeemTxWeightEstimator.AddP2TROutput() + } + + return int64(feeRate.FeeForVSize(lntypes.VByte(redeemTxWeightEstimator.VSize())).ToUnit(btcutil.AmountSatoshi)), nil +} diff --git a/common/types.go b/common/types.go new file mode 100644 index 0000000..9191be0 --- /dev/null +++ b/common/types.go @@ -0,0 +1,13 @@ +package common + +import ( + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/waddrmgr" +) + +type VtxoInput struct { + Outpoint *wire.OutPoint + Amount int64 + Tapscript *waddrmgr.Tapscript + WitnessSize int +} diff --git a/pkg/client-sdk/Makefile b/pkg/client-sdk/Makefile index 890d2bb..9fffec7 100644 --- a/pkg/client-sdk/Makefile +++ b/pkg/client-sdk/Makefile @@ -1,9 +1,14 @@ .PHONY: genrest test vet lint prepare-wasm-test +REST_DIR = $(PWD)/client/rest/service + ## genrest: compiles rest client from stub with https://github.com/go-swagger/go-swagger genrest: + @echo "Cleaning existing files..." + @rm -rf $(REST_DIR) @echo "Generating rest client from stub..." - @swagger generate client -f ../../api-spec/openapi/swagger/ark/v1/service.swagger.json -t ./client/rest/service --client-package=arkservice + @mkdir -p $(REST_DIR) + @swagger generate client -f ../../api-spec/openapi/swagger/ark/v1/service.swagger.json -t $(REST_DIR) --client-package=arkservice ## test: runs unit tests test: diff --git a/pkg/client-sdk/client/client.go b/pkg/client-sdk/client/client.go index c8e2273..21612fc 100644 --- a/pkg/client-sdk/client/client.go +++ b/pkg/client-sdk/client/client.go @@ -9,7 +9,6 @@ import ( "github.com/ark-network/ark/common/bitcointree" "github.com/ark-network/ark/common/tree" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) @@ -47,12 +46,9 @@ type ASPClient interface { ctx context.Context, paymentID string, ) (<-chan RoundEventChannel, func(), error) Ping(ctx context.Context, paymentID string) error - CreatePayment( - ctx context.Context, inputs []AsyncPaymentInput, outputs []Output, - ) (string, error) - CompletePayment( + SubmitRedeemTx( ctx context.Context, signedRedeemTx string, - ) error + ) (string, error) ListVtxos(ctx context.Context, addr string) ([]Vtxo, []Vtxo, error) GetRound(ctx context.Context, txID string) (*Round, error) GetRoundByID(ctx context.Context, roundID string) (*Round, error) @@ -92,11 +88,6 @@ type Input struct { Tapscripts []string } -type AsyncPaymentInput struct { - Input - ForfeitLeafHash chainhash.Hash -} - type Vtxo struct { Outpoint Pubkey string diff --git a/pkg/client-sdk/client/grpc/client.go b/pkg/client-sdk/client/grpc/client.go index f4a3714..f8b4481 100644 --- a/pkg/client-sdk/client/grpc/client.go +++ b/pkg/client-sdk/client/grpc/client.go @@ -245,28 +245,19 @@ func (a *grpcClient) Ping( return err } -func (a *grpcClient) CreatePayment( - ctx context.Context, inputs []client.AsyncPaymentInput, outputs []client.Output, +func (a *grpcClient) SubmitRedeemTx( + ctx context.Context, redeemTx string, ) (string, error) { - req := &arkv1.CreatePaymentRequest{ - Inputs: asyncIns(inputs).toProto(), - Outputs: outs(outputs).toProto(), + req := &arkv1.SubmitRedeemTxRequest{ + RedeemTx: redeemTx, } - resp, err := a.svc.CreatePayment(ctx, req) + + resp, err := a.svc.SubmitRedeemTx(ctx, req) if err != nil { return "", err } - return resp.SignedRedeemTx, nil -} -func (a *grpcClient) CompletePayment( - ctx context.Context, redeemTx string, -) error { - req := &arkv1.CompletePaymentRequest{ - SignedRedeemTx: redeemTx, - } - _, err := a.svc.CompletePayment(ctx, req) - return err + return resp.GetSignedRedeemTx(), nil } func (a *grpcClient) GetRound( diff --git a/pkg/client-sdk/client/grpc/types.go b/pkg/client-sdk/client/grpc/types.go index 5dc7073..bf61c1c 100644 --- a/pkg/client-sdk/client/grpc/types.go +++ b/pkg/client-sdk/client/grpc/types.go @@ -152,23 +152,6 @@ func toProtoInput(i client.Input) *arkv1.Input { } } -func toAsyncProtoInput(i client.AsyncPaymentInput) *arkv1.AsyncPaymentInput { - return &arkv1.AsyncPaymentInput{ - Input: toProtoInput(i.Input), - ForfeitLeafHash: i.ForfeitLeafHash.String(), - } -} - -type asyncIns []client.AsyncPaymentInput - -func (i asyncIns) toProto() []*arkv1.AsyncPaymentInput { - list := make([]*arkv1.AsyncPaymentInput, 0, len(i)) - for _, ii := range i { - list = append(list, toAsyncProtoInput(ii)) - } - return list -} - type ins []client.Input func (i ins) toProto() []*arkv1.Input { diff --git a/pkg/client-sdk/client/rest/client.go b/pkg/client-sdk/client/rest/client.go index 8592c61..f9212be 100644 --- a/pkg/client-sdk/client/rest/client.go +++ b/pkg/client-sdk/client/rest/client.go @@ -14,7 +14,6 @@ import ( "strings" "time" - arkv1 "github.com/ark-network/ark/api-spec/protobuf/gen/ark/v1" "github.com/ark-network/ark/common/bitcointree" "github.com/ark-network/ark/common/tree" "github.com/ark-network/ark/pkg/client-sdk/client" @@ -393,57 +392,16 @@ func (a *restClient) Ping( return err } -func (a *restClient) CreatePayment( - ctx context.Context, inputs []client.AsyncPaymentInput, outputs []client.Output, +func (a *restClient) SubmitRedeemTx( + ctx context.Context, redeemTx string, ) (string, error) { - ins := make([]*models.V1AsyncPaymentInput, 0, len(inputs)) - for _, i := range inputs { - ins = append(ins, &models.V1AsyncPaymentInput{ - Input: &models.V1Input{ - Outpoint: &models.V1Outpoint{ - Txid: i.Input.Txid, - Vout: int64(i.VOut), - }, - Tapscripts: &models.V1Tapscripts{ - Scripts: i.Input.Tapscripts, - }, - }, - ForfeitLeafHash: i.ForfeitLeafHash.String(), - }) + req := &models.V1SubmitRedeemTxRequest{ + RedeemTx: redeemTx, } - outs := make([]*models.V1Output, 0, len(outputs)) - for _, o := range outputs { - outs = append(outs, &models.V1Output{ - Address: o.Address, - Amount: strconv.Itoa(int(o.Amount)), - }) - } - body := models.V1CreatePaymentRequest{ - Inputs: ins, - Outputs: outs, - } - resp, err := a.svc.ArkServiceCreatePayment( - ark_service.NewArkServiceCreatePaymentParams().WithBody(&body), + resp, err := a.svc.ArkServiceSubmitRedeemTx( + ark_service.NewArkServiceSubmitRedeemTxParams().WithBody(req), ) - if err != nil { - return "", err - } - return resp.GetPayload().SignedRedeemTx, nil -} - -func (a *restClient) CompletePayment( - ctx context.Context, signedRedeemTx string, -) error { - req := &arkv1.CompletePaymentRequest{ - SignedRedeemTx: signedRedeemTx, - } - body := models.V1CompletePaymentRequest{ - SignedRedeemTx: req.GetSignedRedeemTx(), - } - _, err := a.svc.ArkServiceCompletePayment( - ark_service.NewArkServiceCompletePaymentParams().WithBody(&body), - ) - return err + return resp.Payload.SignedRedeemTx, err } func (a *restClient) GetRound( diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_parameters.go deleted file mode 100644 index bab6013..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceClaimPaymentParams creates a new ArkServiceClaimPaymentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceClaimPaymentParams() *ArkServiceClaimPaymentParams { - return &ArkServiceClaimPaymentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceClaimPaymentParamsWithTimeout creates a new ArkServiceClaimPaymentParams object -// with the ability to set a timeout on a request. -func NewArkServiceClaimPaymentParamsWithTimeout(timeout time.Duration) *ArkServiceClaimPaymentParams { - return &ArkServiceClaimPaymentParams{ - timeout: timeout, - } -} - -// NewArkServiceClaimPaymentParamsWithContext creates a new ArkServiceClaimPaymentParams object -// with the ability to set a context for a request. -func NewArkServiceClaimPaymentParamsWithContext(ctx context.Context) *ArkServiceClaimPaymentParams { - return &ArkServiceClaimPaymentParams{ - Context: ctx, - } -} - -// NewArkServiceClaimPaymentParamsWithHTTPClient creates a new ArkServiceClaimPaymentParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceClaimPaymentParamsWithHTTPClient(client *http.Client) *ArkServiceClaimPaymentParams { - return &ArkServiceClaimPaymentParams{ - HTTPClient: client, - } -} - -/* -ArkServiceClaimPaymentParams contains all the parameters to send to the API endpoint - - for the ark service claim payment operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceClaimPaymentParams struct { - - // Body. - Body *models.V1ClaimPaymentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service claim payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceClaimPaymentParams) WithDefaults() *ArkServiceClaimPaymentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service claim payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceClaimPaymentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) WithTimeout(timeout time.Duration) *ArkServiceClaimPaymentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) WithContext(ctx context.Context) *ArkServiceClaimPaymentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) WithHTTPClient(client *http.Client) *ArkServiceClaimPaymentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) WithBody(body *models.V1ClaimPaymentRequest) *ArkServiceClaimPaymentParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service claim payment params -func (o *ArkServiceClaimPaymentParams) SetBody(body *models.V1ClaimPaymentRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceClaimPaymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_responses.go deleted file mode 100644 index ab3015e..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_claim_payment_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceClaimPaymentReader is a Reader for the ArkServiceClaimPayment structure. -type ArkServiceClaimPaymentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceClaimPaymentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceClaimPaymentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceClaimPaymentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceClaimPaymentOK creates a ArkServiceClaimPaymentOK with default headers values -func NewArkServiceClaimPaymentOK() *ArkServiceClaimPaymentOK { - return &ArkServiceClaimPaymentOK{} -} - -/* -ArkServiceClaimPaymentOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceClaimPaymentOK struct { - Payload models.V1ClaimPaymentResponse -} - -// IsSuccess returns true when this ark service claim payment o k response has a 2xx status code -func (o *ArkServiceClaimPaymentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service claim payment o k response has a 3xx status code -func (o *ArkServiceClaimPaymentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service claim payment o k response has a 4xx status code -func (o *ArkServiceClaimPaymentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service claim payment o k response has a 5xx status code -func (o *ArkServiceClaimPaymentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service claim payment o k response a status code equal to that given -func (o *ArkServiceClaimPaymentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service claim payment o k response -func (o *ArkServiceClaimPaymentOK) Code() int { - return 200 -} - -func (o *ArkServiceClaimPaymentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/claim][%d] arkServiceClaimPaymentOK %s", 200, payload) -} - -func (o *ArkServiceClaimPaymentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/claim][%d] arkServiceClaimPaymentOK %s", 200, payload) -} - -func (o *ArkServiceClaimPaymentOK) GetPayload() models.V1ClaimPaymentResponse { - return o.Payload -} - -func (o *ArkServiceClaimPaymentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceClaimPaymentDefault creates a ArkServiceClaimPaymentDefault with default headers values -func NewArkServiceClaimPaymentDefault(code int) *ArkServiceClaimPaymentDefault { - return &ArkServiceClaimPaymentDefault{ - _statusCode: code, - } -} - -/* -ArkServiceClaimPaymentDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceClaimPaymentDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service claim payment default response has a 2xx status code -func (o *ArkServiceClaimPaymentDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service claim payment default response has a 3xx status code -func (o *ArkServiceClaimPaymentDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service claim payment default response has a 4xx status code -func (o *ArkServiceClaimPaymentDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service claim payment default response has a 5xx status code -func (o *ArkServiceClaimPaymentDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service claim payment default response a status code equal to that given -func (o *ArkServiceClaimPaymentDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service claim payment default response -func (o *ArkServiceClaimPaymentDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceClaimPaymentDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/claim][%d] ArkService_ClaimPayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceClaimPaymentDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/claim][%d] ArkService_ClaimPayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceClaimPaymentDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceClaimPaymentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_client.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_client.go index 3e720ee..6f0dce3 100644 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_client.go +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_client.go @@ -54,10 +54,6 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - ArkServiceCompletePayment(params *ArkServiceCompletePaymentParams, opts ...ClientOption) (*ArkServiceCompletePaymentOK, error) - - ArkServiceCreatePayment(params *ArkServiceCreatePaymentParams, opts ...ClientOption) (*ArkServiceCreatePaymentOK, error) - ArkServiceDeleteNostrRecipient(params *ArkServiceDeleteNostrRecipientParams, opts ...ClientOption) (*ArkServiceDeleteNostrRecipientOK, error) ArkServiceGetBoardingAddress(params *ArkServiceGetBoardingAddressParams, opts ...ClientOption) (*ArkServiceGetBoardingAddressOK, error) @@ -82,6 +78,8 @@ type ClientService interface { ArkServiceSetNostrRecipient(params *ArkServiceSetNostrRecipientParams, opts ...ClientOption) (*ArkServiceSetNostrRecipientOK, error) + ArkServiceSubmitRedeemTx(params *ArkServiceSubmitRedeemTxParams, opts ...ClientOption) (*ArkServiceSubmitRedeemTxOK, error) + ArkServiceSubmitSignedForfeitTxs(params *ArkServiceSubmitSignedForfeitTxsParams, opts ...ClientOption) (*ArkServiceSubmitSignedForfeitTxsOK, error) ArkServiceSubmitTreeNonces(params *ArkServiceSubmitTreeNoncesParams, opts ...ClientOption) (*ArkServiceSubmitTreeNoncesOK, error) @@ -91,80 +89,6 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } -/* -ArkServiceCompletePayment ark service complete payment API -*/ -func (a *Client) ArkServiceCompletePayment(params *ArkServiceCompletePaymentParams, opts ...ClientOption) (*ArkServiceCompletePaymentOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewArkServiceCompletePaymentParams() - } - op := &runtime.ClientOperation{ - ID: "ArkService_CompletePayment", - Method: "POST", - PathPattern: "/v1/payment/complete", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ArkServiceCompletePaymentReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ArkServiceCompletePaymentOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ArkServiceCompletePaymentDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ArkServiceCreatePayment ark service create payment API -*/ -func (a *Client) ArkServiceCreatePayment(params *ArkServiceCreatePaymentParams, opts ...ClientOption) (*ArkServiceCreatePaymentOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewArkServiceCreatePaymentParams() - } - op := &runtime.ClientOperation{ - ID: "ArkService_CreatePayment", - Method: "POST", - PathPattern: "/v1/payment", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ArkServiceCreatePaymentReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ArkServiceCreatePaymentOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ArkServiceCreatePaymentDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* ArkServiceDeleteNostrRecipient ark service delete nostr recipient API */ @@ -609,6 +533,43 @@ func (a *Client) ArkServiceSetNostrRecipient(params *ArkServiceSetNostrRecipient return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ArkServiceSubmitRedeemTx ark service submit redeem tx API +*/ +func (a *Client) ArkServiceSubmitRedeemTx(params *ArkServiceSubmitRedeemTxParams, opts ...ClientOption) (*ArkServiceSubmitRedeemTxOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewArkServiceSubmitRedeemTxParams() + } + op := &runtime.ClientOperation{ + ID: "ArkService_SubmitRedeemTx", + Method: "POST", + PathPattern: "/v1/redeem-tx", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ArkServiceSubmitRedeemTxReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ArkServiceSubmitRedeemTxOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ArkServiceSubmitRedeemTxDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ArkServiceSubmitSignedForfeitTxs ark service submit signed forfeit txs API */ diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_parameters.go deleted file mode 100644 index 6e723d4..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceCompletePaymentParams creates a new ArkServiceCompletePaymentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceCompletePaymentParams() *ArkServiceCompletePaymentParams { - return &ArkServiceCompletePaymentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceCompletePaymentParamsWithTimeout creates a new ArkServiceCompletePaymentParams object -// with the ability to set a timeout on a request. -func NewArkServiceCompletePaymentParamsWithTimeout(timeout time.Duration) *ArkServiceCompletePaymentParams { - return &ArkServiceCompletePaymentParams{ - timeout: timeout, - } -} - -// NewArkServiceCompletePaymentParamsWithContext creates a new ArkServiceCompletePaymentParams object -// with the ability to set a context for a request. -func NewArkServiceCompletePaymentParamsWithContext(ctx context.Context) *ArkServiceCompletePaymentParams { - return &ArkServiceCompletePaymentParams{ - Context: ctx, - } -} - -// NewArkServiceCompletePaymentParamsWithHTTPClient creates a new ArkServiceCompletePaymentParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceCompletePaymentParamsWithHTTPClient(client *http.Client) *ArkServiceCompletePaymentParams { - return &ArkServiceCompletePaymentParams{ - HTTPClient: client, - } -} - -/* -ArkServiceCompletePaymentParams contains all the parameters to send to the API endpoint - - for the ark service complete payment operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceCompletePaymentParams struct { - - // Body. - Body *models.V1CompletePaymentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service complete payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceCompletePaymentParams) WithDefaults() *ArkServiceCompletePaymentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service complete payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceCompletePaymentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) WithTimeout(timeout time.Duration) *ArkServiceCompletePaymentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) WithContext(ctx context.Context) *ArkServiceCompletePaymentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) WithHTTPClient(client *http.Client) *ArkServiceCompletePaymentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) WithBody(body *models.V1CompletePaymentRequest) *ArkServiceCompletePaymentParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service complete payment params -func (o *ArkServiceCompletePaymentParams) SetBody(body *models.V1CompletePaymentRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceCompletePaymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_responses.go deleted file mode 100644 index 87a4fc4..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_complete_payment_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceCompletePaymentReader is a Reader for the ArkServiceCompletePayment structure. -type ArkServiceCompletePaymentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceCompletePaymentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceCompletePaymentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceCompletePaymentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceCompletePaymentOK creates a ArkServiceCompletePaymentOK with default headers values -func NewArkServiceCompletePaymentOK() *ArkServiceCompletePaymentOK { - return &ArkServiceCompletePaymentOK{} -} - -/* -ArkServiceCompletePaymentOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceCompletePaymentOK struct { - Payload models.V1CompletePaymentResponse -} - -// IsSuccess returns true when this ark service complete payment o k response has a 2xx status code -func (o *ArkServiceCompletePaymentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service complete payment o k response has a 3xx status code -func (o *ArkServiceCompletePaymentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service complete payment o k response has a 4xx status code -func (o *ArkServiceCompletePaymentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service complete payment o k response has a 5xx status code -func (o *ArkServiceCompletePaymentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service complete payment o k response a status code equal to that given -func (o *ArkServiceCompletePaymentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service complete payment o k response -func (o *ArkServiceCompletePaymentOK) Code() int { - return 200 -} - -func (o *ArkServiceCompletePaymentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/complete][%d] arkServiceCompletePaymentOK %s", 200, payload) -} - -func (o *ArkServiceCompletePaymentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/complete][%d] arkServiceCompletePaymentOK %s", 200, payload) -} - -func (o *ArkServiceCompletePaymentOK) GetPayload() models.V1CompletePaymentResponse { - return o.Payload -} - -func (o *ArkServiceCompletePaymentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceCompletePaymentDefault creates a ArkServiceCompletePaymentDefault with default headers values -func NewArkServiceCompletePaymentDefault(code int) *ArkServiceCompletePaymentDefault { - return &ArkServiceCompletePaymentDefault{ - _statusCode: code, - } -} - -/* -ArkServiceCompletePaymentDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceCompletePaymentDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service complete payment default response has a 2xx status code -func (o *ArkServiceCompletePaymentDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service complete payment default response has a 3xx status code -func (o *ArkServiceCompletePaymentDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service complete payment default response has a 4xx status code -func (o *ArkServiceCompletePaymentDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service complete payment default response has a 5xx status code -func (o *ArkServiceCompletePaymentDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service complete payment default response a status code equal to that given -func (o *ArkServiceCompletePaymentDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service complete payment default response -func (o *ArkServiceCompletePaymentDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceCompletePaymentDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/complete][%d] ArkService_CompletePayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceCompletePaymentDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/complete][%d] ArkService_CompletePayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceCompletePaymentDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceCompletePaymentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_parameters.go deleted file mode 100644 index fba9d2e..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceCreatePaymentParams creates a new ArkServiceCreatePaymentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceCreatePaymentParams() *ArkServiceCreatePaymentParams { - return &ArkServiceCreatePaymentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceCreatePaymentParamsWithTimeout creates a new ArkServiceCreatePaymentParams object -// with the ability to set a timeout on a request. -func NewArkServiceCreatePaymentParamsWithTimeout(timeout time.Duration) *ArkServiceCreatePaymentParams { - return &ArkServiceCreatePaymentParams{ - timeout: timeout, - } -} - -// NewArkServiceCreatePaymentParamsWithContext creates a new ArkServiceCreatePaymentParams object -// with the ability to set a context for a request. -func NewArkServiceCreatePaymentParamsWithContext(ctx context.Context) *ArkServiceCreatePaymentParams { - return &ArkServiceCreatePaymentParams{ - Context: ctx, - } -} - -// NewArkServiceCreatePaymentParamsWithHTTPClient creates a new ArkServiceCreatePaymentParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceCreatePaymentParamsWithHTTPClient(client *http.Client) *ArkServiceCreatePaymentParams { - return &ArkServiceCreatePaymentParams{ - HTTPClient: client, - } -} - -/* -ArkServiceCreatePaymentParams contains all the parameters to send to the API endpoint - - for the ark service create payment operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceCreatePaymentParams struct { - - // Body. - Body *models.V1CreatePaymentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service create payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceCreatePaymentParams) WithDefaults() *ArkServiceCreatePaymentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service create payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceCreatePaymentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) WithTimeout(timeout time.Duration) *ArkServiceCreatePaymentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) WithContext(ctx context.Context) *ArkServiceCreatePaymentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) WithHTTPClient(client *http.Client) *ArkServiceCreatePaymentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) WithBody(body *models.V1CreatePaymentRequest) *ArkServiceCreatePaymentParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service create payment params -func (o *ArkServiceCreatePaymentParams) SetBody(body *models.V1CreatePaymentRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceCreatePaymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_responses.go deleted file mode 100644 index d7fb17b..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_create_payment_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceCreatePaymentReader is a Reader for the ArkServiceCreatePayment structure. -type ArkServiceCreatePaymentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceCreatePaymentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceCreatePaymentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceCreatePaymentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceCreatePaymentOK creates a ArkServiceCreatePaymentOK with default headers values -func NewArkServiceCreatePaymentOK() *ArkServiceCreatePaymentOK { - return &ArkServiceCreatePaymentOK{} -} - -/* -ArkServiceCreatePaymentOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceCreatePaymentOK struct { - Payload *models.V1CreatePaymentResponse -} - -// IsSuccess returns true when this ark service create payment o k response has a 2xx status code -func (o *ArkServiceCreatePaymentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service create payment o k response has a 3xx status code -func (o *ArkServiceCreatePaymentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service create payment o k response has a 4xx status code -func (o *ArkServiceCreatePaymentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service create payment o k response has a 5xx status code -func (o *ArkServiceCreatePaymentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service create payment o k response a status code equal to that given -func (o *ArkServiceCreatePaymentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service create payment o k response -func (o *ArkServiceCreatePaymentOK) Code() int { - return 200 -} - -func (o *ArkServiceCreatePaymentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment][%d] arkServiceCreatePaymentOK %s", 200, payload) -} - -func (o *ArkServiceCreatePaymentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment][%d] arkServiceCreatePaymentOK %s", 200, payload) -} - -func (o *ArkServiceCreatePaymentOK) GetPayload() *models.V1CreatePaymentResponse { - return o.Payload -} - -func (o *ArkServiceCreatePaymentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.V1CreatePaymentResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceCreatePaymentDefault creates a ArkServiceCreatePaymentDefault with default headers values -func NewArkServiceCreatePaymentDefault(code int) *ArkServiceCreatePaymentDefault { - return &ArkServiceCreatePaymentDefault{ - _statusCode: code, - } -} - -/* -ArkServiceCreatePaymentDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceCreatePaymentDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service create payment default response has a 2xx status code -func (o *ArkServiceCreatePaymentDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service create payment default response has a 3xx status code -func (o *ArkServiceCreatePaymentDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service create payment default response has a 4xx status code -func (o *ArkServiceCreatePaymentDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service create payment default response has a 5xx status code -func (o *ArkServiceCreatePaymentDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service create payment default response a status code equal to that given -func (o *ArkServiceCreatePaymentDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service create payment default response -func (o *ArkServiceCreatePaymentDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceCreatePaymentDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment][%d] ArkService_CreatePayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceCreatePaymentDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment][%d] ArkService_CreatePayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceCreatePaymentDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceCreatePaymentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_parameters.go deleted file mode 100644 index 150380a..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceFinalizePaymentParams creates a new ArkServiceFinalizePaymentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceFinalizePaymentParams() *ArkServiceFinalizePaymentParams { - return &ArkServiceFinalizePaymentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceFinalizePaymentParamsWithTimeout creates a new ArkServiceFinalizePaymentParams object -// with the ability to set a timeout on a request. -func NewArkServiceFinalizePaymentParamsWithTimeout(timeout time.Duration) *ArkServiceFinalizePaymentParams { - return &ArkServiceFinalizePaymentParams{ - timeout: timeout, - } -} - -// NewArkServiceFinalizePaymentParamsWithContext creates a new ArkServiceFinalizePaymentParams object -// with the ability to set a context for a request. -func NewArkServiceFinalizePaymentParamsWithContext(ctx context.Context) *ArkServiceFinalizePaymentParams { - return &ArkServiceFinalizePaymentParams{ - Context: ctx, - } -} - -// NewArkServiceFinalizePaymentParamsWithHTTPClient creates a new ArkServiceFinalizePaymentParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceFinalizePaymentParamsWithHTTPClient(client *http.Client) *ArkServiceFinalizePaymentParams { - return &ArkServiceFinalizePaymentParams{ - HTTPClient: client, - } -} - -/* -ArkServiceFinalizePaymentParams contains all the parameters to send to the API endpoint - - for the ark service finalize payment operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceFinalizePaymentParams struct { - - // Body. - Body *models.V1FinalizePaymentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service finalize payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceFinalizePaymentParams) WithDefaults() *ArkServiceFinalizePaymentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service finalize payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceFinalizePaymentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) WithTimeout(timeout time.Duration) *ArkServiceFinalizePaymentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) WithContext(ctx context.Context) *ArkServiceFinalizePaymentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) WithHTTPClient(client *http.Client) *ArkServiceFinalizePaymentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) WithBody(body *models.V1FinalizePaymentRequest) *ArkServiceFinalizePaymentParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service finalize payment params -func (o *ArkServiceFinalizePaymentParams) SetBody(body *models.V1FinalizePaymentRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceFinalizePaymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_responses.go deleted file mode 100644 index 223c1c6..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_finalize_payment_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceFinalizePaymentReader is a Reader for the ArkServiceFinalizePayment structure. -type ArkServiceFinalizePaymentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceFinalizePaymentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceFinalizePaymentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceFinalizePaymentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceFinalizePaymentOK creates a ArkServiceFinalizePaymentOK with default headers values -func NewArkServiceFinalizePaymentOK() *ArkServiceFinalizePaymentOK { - return &ArkServiceFinalizePaymentOK{} -} - -/* -ArkServiceFinalizePaymentOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceFinalizePaymentOK struct { - Payload models.V1FinalizePaymentResponse -} - -// IsSuccess returns true when this ark service finalize payment o k response has a 2xx status code -func (o *ArkServiceFinalizePaymentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service finalize payment o k response has a 3xx status code -func (o *ArkServiceFinalizePaymentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service finalize payment o k response has a 4xx status code -func (o *ArkServiceFinalizePaymentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service finalize payment o k response has a 5xx status code -func (o *ArkServiceFinalizePaymentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service finalize payment o k response a status code equal to that given -func (o *ArkServiceFinalizePaymentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service finalize payment o k response -func (o *ArkServiceFinalizePaymentOK) Code() int { - return 200 -} - -func (o *ArkServiceFinalizePaymentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/finalize][%d] arkServiceFinalizePaymentOK %s", 200, payload) -} - -func (o *ArkServiceFinalizePaymentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/finalize][%d] arkServiceFinalizePaymentOK %s", 200, payload) -} - -func (o *ArkServiceFinalizePaymentOK) GetPayload() models.V1FinalizePaymentResponse { - return o.Payload -} - -func (o *ArkServiceFinalizePaymentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceFinalizePaymentDefault creates a ArkServiceFinalizePaymentDefault with default headers values -func NewArkServiceFinalizePaymentDefault(code int) *ArkServiceFinalizePaymentDefault { - return &ArkServiceFinalizePaymentDefault{ - _statusCode: code, - } -} - -/* -ArkServiceFinalizePaymentDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceFinalizePaymentDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service finalize payment default response has a 2xx status code -func (o *ArkServiceFinalizePaymentDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service finalize payment default response has a 3xx status code -func (o *ArkServiceFinalizePaymentDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service finalize payment default response has a 4xx status code -func (o *ArkServiceFinalizePaymentDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service finalize payment default response has a 5xx status code -func (o *ArkServiceFinalizePaymentDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service finalize payment default response a status code equal to that given -func (o *ArkServiceFinalizePaymentDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service finalize payment default response -func (o *ArkServiceFinalizePaymentDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceFinalizePaymentDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/finalize][%d] ArkService_FinalizePayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceFinalizePaymentDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/finalize][%d] ArkService_FinalizePayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceFinalizePaymentDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceFinalizePaymentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_parameters.go deleted file mode 100644 index 220532e..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceRegisterPaymentParams creates a new ArkServiceRegisterPaymentParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceRegisterPaymentParams() *ArkServiceRegisterPaymentParams { - return &ArkServiceRegisterPaymentParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceRegisterPaymentParamsWithTimeout creates a new ArkServiceRegisterPaymentParams object -// with the ability to set a timeout on a request. -func NewArkServiceRegisterPaymentParamsWithTimeout(timeout time.Duration) *ArkServiceRegisterPaymentParams { - return &ArkServiceRegisterPaymentParams{ - timeout: timeout, - } -} - -// NewArkServiceRegisterPaymentParamsWithContext creates a new ArkServiceRegisterPaymentParams object -// with the ability to set a context for a request. -func NewArkServiceRegisterPaymentParamsWithContext(ctx context.Context) *ArkServiceRegisterPaymentParams { - return &ArkServiceRegisterPaymentParams{ - Context: ctx, - } -} - -// NewArkServiceRegisterPaymentParamsWithHTTPClient creates a new ArkServiceRegisterPaymentParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceRegisterPaymentParamsWithHTTPClient(client *http.Client) *ArkServiceRegisterPaymentParams { - return &ArkServiceRegisterPaymentParams{ - HTTPClient: client, - } -} - -/* -ArkServiceRegisterPaymentParams contains all the parameters to send to the API endpoint - - for the ark service register payment operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceRegisterPaymentParams struct { - - // Body. - Body *models.V1RegisterPaymentRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service register payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceRegisterPaymentParams) WithDefaults() *ArkServiceRegisterPaymentParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service register payment params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceRegisterPaymentParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) WithTimeout(timeout time.Duration) *ArkServiceRegisterPaymentParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) WithContext(ctx context.Context) *ArkServiceRegisterPaymentParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) WithHTTPClient(client *http.Client) *ArkServiceRegisterPaymentParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) WithBody(body *models.V1RegisterPaymentRequest) *ArkServiceRegisterPaymentParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service register payment params -func (o *ArkServiceRegisterPaymentParams) SetBody(body *models.V1RegisterPaymentRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceRegisterPaymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_responses.go deleted file mode 100644 index 4d29872..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_payment_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceRegisterPaymentReader is a Reader for the ArkServiceRegisterPayment structure. -type ArkServiceRegisterPaymentReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceRegisterPaymentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceRegisterPaymentOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceRegisterPaymentDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceRegisterPaymentOK creates a ArkServiceRegisterPaymentOK with default headers values -func NewArkServiceRegisterPaymentOK() *ArkServiceRegisterPaymentOK { - return &ArkServiceRegisterPaymentOK{} -} - -/* -ArkServiceRegisterPaymentOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceRegisterPaymentOK struct { - Payload *models.V1RegisterPaymentResponse -} - -// IsSuccess returns true when this ark service register payment o k response has a 2xx status code -func (o *ArkServiceRegisterPaymentOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service register payment o k response has a 3xx status code -func (o *ArkServiceRegisterPaymentOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service register payment o k response has a 4xx status code -func (o *ArkServiceRegisterPaymentOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service register payment o k response has a 5xx status code -func (o *ArkServiceRegisterPaymentOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service register payment o k response a status code equal to that given -func (o *ArkServiceRegisterPaymentOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service register payment o k response -func (o *ArkServiceRegisterPaymentOK) Code() int { - return 200 -} - -func (o *ArkServiceRegisterPaymentOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/register][%d] arkServiceRegisterPaymentOK %s", 200, payload) -} - -func (o *ArkServiceRegisterPaymentOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/register][%d] arkServiceRegisterPaymentOK %s", 200, payload) -} - -func (o *ArkServiceRegisterPaymentOK) GetPayload() *models.V1RegisterPaymentResponse { - return o.Payload -} - -func (o *ArkServiceRegisterPaymentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.V1RegisterPaymentResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceRegisterPaymentDefault creates a ArkServiceRegisterPaymentDefault with default headers values -func NewArkServiceRegisterPaymentDefault(code int) *ArkServiceRegisterPaymentDefault { - return &ArkServiceRegisterPaymentDefault{ - _statusCode: code, - } -} - -/* -ArkServiceRegisterPaymentDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceRegisterPaymentDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service register payment default response has a 2xx status code -func (o *ArkServiceRegisterPaymentDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service register payment default response has a 3xx status code -func (o *ArkServiceRegisterPaymentDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service register payment default response has a 4xx status code -func (o *ArkServiceRegisterPaymentDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service register payment default response has a 5xx status code -func (o *ArkServiceRegisterPaymentDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service register payment default response a status code equal to that given -func (o *ArkServiceRegisterPaymentDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service register payment default response -func (o *ArkServiceRegisterPaymentDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceRegisterPaymentDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/register][%d] ArkService_RegisterPayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceRegisterPaymentDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/register][%d] ArkService_RegisterPayment default %s", o._statusCode, payload) -} - -func (o *ArkServiceRegisterPaymentDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceRegisterPaymentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_parameters.go deleted file mode 100644 index abb95c5..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceSendTreeNoncesParams creates a new ArkServiceSendTreeNoncesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceSendTreeNoncesParams() *ArkServiceSendTreeNoncesParams { - return &ArkServiceSendTreeNoncesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceSendTreeNoncesParamsWithTimeout creates a new ArkServiceSendTreeNoncesParams object -// with the ability to set a timeout on a request. -func NewArkServiceSendTreeNoncesParamsWithTimeout(timeout time.Duration) *ArkServiceSendTreeNoncesParams { - return &ArkServiceSendTreeNoncesParams{ - timeout: timeout, - } -} - -// NewArkServiceSendTreeNoncesParamsWithContext creates a new ArkServiceSendTreeNoncesParams object -// with the ability to set a context for a request. -func NewArkServiceSendTreeNoncesParamsWithContext(ctx context.Context) *ArkServiceSendTreeNoncesParams { - return &ArkServiceSendTreeNoncesParams{ - Context: ctx, - } -} - -// NewArkServiceSendTreeNoncesParamsWithHTTPClient creates a new ArkServiceSendTreeNoncesParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceSendTreeNoncesParamsWithHTTPClient(client *http.Client) *ArkServiceSendTreeNoncesParams { - return &ArkServiceSendTreeNoncesParams{ - HTTPClient: client, - } -} - -/* -ArkServiceSendTreeNoncesParams contains all the parameters to send to the API endpoint - - for the ark service send tree nonces operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceSendTreeNoncesParams struct { - - // Body. - Body *models.V1SendTreeNoncesRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service send tree nonces params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceSendTreeNoncesParams) WithDefaults() *ArkServiceSendTreeNoncesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service send tree nonces params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceSendTreeNoncesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) WithTimeout(timeout time.Duration) *ArkServiceSendTreeNoncesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) WithContext(ctx context.Context) *ArkServiceSendTreeNoncesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) WithHTTPClient(client *http.Client) *ArkServiceSendTreeNoncesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) WithBody(body *models.V1SendTreeNoncesRequest) *ArkServiceSendTreeNoncesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service send tree nonces params -func (o *ArkServiceSendTreeNoncesParams) SetBody(body *models.V1SendTreeNoncesRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceSendTreeNoncesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_responses.go deleted file mode 100644 index 3e26786..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_nonces_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceSendTreeNoncesReader is a Reader for the ArkServiceSendTreeNonces structure. -type ArkServiceSendTreeNoncesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceSendTreeNoncesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceSendTreeNoncesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceSendTreeNoncesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceSendTreeNoncesOK creates a ArkServiceSendTreeNoncesOK with default headers values -func NewArkServiceSendTreeNoncesOK() *ArkServiceSendTreeNoncesOK { - return &ArkServiceSendTreeNoncesOK{} -} - -/* -ArkServiceSendTreeNoncesOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceSendTreeNoncesOK struct { - Payload models.V1SendTreeNoncesResponse -} - -// IsSuccess returns true when this ark service send tree nonces o k response has a 2xx status code -func (o *ArkServiceSendTreeNoncesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service send tree nonces o k response has a 3xx status code -func (o *ArkServiceSendTreeNoncesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service send tree nonces o k response has a 4xx status code -func (o *ArkServiceSendTreeNoncesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service send tree nonces o k response has a 5xx status code -func (o *ArkServiceSendTreeNoncesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service send tree nonces o k response a status code equal to that given -func (o *ArkServiceSendTreeNoncesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service send tree nonces o k response -func (o *ArkServiceSendTreeNoncesOK) Code() int { - return 200 -} - -func (o *ArkServiceSendTreeNoncesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/nonces][%d] arkServiceSendTreeNoncesOK %s", 200, payload) -} - -func (o *ArkServiceSendTreeNoncesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/nonces][%d] arkServiceSendTreeNoncesOK %s", 200, payload) -} - -func (o *ArkServiceSendTreeNoncesOK) GetPayload() models.V1SendTreeNoncesResponse { - return o.Payload -} - -func (o *ArkServiceSendTreeNoncesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceSendTreeNoncesDefault creates a ArkServiceSendTreeNoncesDefault with default headers values -func NewArkServiceSendTreeNoncesDefault(code int) *ArkServiceSendTreeNoncesDefault { - return &ArkServiceSendTreeNoncesDefault{ - _statusCode: code, - } -} - -/* -ArkServiceSendTreeNoncesDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceSendTreeNoncesDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service send tree nonces default response has a 2xx status code -func (o *ArkServiceSendTreeNoncesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service send tree nonces default response has a 3xx status code -func (o *ArkServiceSendTreeNoncesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service send tree nonces default response has a 4xx status code -func (o *ArkServiceSendTreeNoncesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service send tree nonces default response has a 5xx status code -func (o *ArkServiceSendTreeNoncesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service send tree nonces default response a status code equal to that given -func (o *ArkServiceSendTreeNoncesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service send tree nonces default response -func (o *ArkServiceSendTreeNoncesDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceSendTreeNoncesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/nonces][%d] ArkService_SendTreeNonces default %s", o._statusCode, payload) -} - -func (o *ArkServiceSendTreeNoncesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/nonces][%d] ArkService_SendTreeNonces default %s", o._statusCode, payload) -} - -func (o *ArkServiceSendTreeNoncesDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceSendTreeNoncesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_parameters.go deleted file mode 100644 index a0207a3..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceSendTreeSignaturesParams creates a new ArkServiceSendTreeSignaturesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceSendTreeSignaturesParams() *ArkServiceSendTreeSignaturesParams { - return &ArkServiceSendTreeSignaturesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceSendTreeSignaturesParamsWithTimeout creates a new ArkServiceSendTreeSignaturesParams object -// with the ability to set a timeout on a request. -func NewArkServiceSendTreeSignaturesParamsWithTimeout(timeout time.Duration) *ArkServiceSendTreeSignaturesParams { - return &ArkServiceSendTreeSignaturesParams{ - timeout: timeout, - } -} - -// NewArkServiceSendTreeSignaturesParamsWithContext creates a new ArkServiceSendTreeSignaturesParams object -// with the ability to set a context for a request. -func NewArkServiceSendTreeSignaturesParamsWithContext(ctx context.Context) *ArkServiceSendTreeSignaturesParams { - return &ArkServiceSendTreeSignaturesParams{ - Context: ctx, - } -} - -// NewArkServiceSendTreeSignaturesParamsWithHTTPClient creates a new ArkServiceSendTreeSignaturesParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceSendTreeSignaturesParamsWithHTTPClient(client *http.Client) *ArkServiceSendTreeSignaturesParams { - return &ArkServiceSendTreeSignaturesParams{ - HTTPClient: client, - } -} - -/* -ArkServiceSendTreeSignaturesParams contains all the parameters to send to the API endpoint - - for the ark service send tree signatures operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceSendTreeSignaturesParams struct { - - // Body. - Body *models.V1SendTreeSignaturesRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service send tree signatures params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceSendTreeSignaturesParams) WithDefaults() *ArkServiceSendTreeSignaturesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service send tree signatures params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceSendTreeSignaturesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) WithTimeout(timeout time.Duration) *ArkServiceSendTreeSignaturesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) WithContext(ctx context.Context) *ArkServiceSendTreeSignaturesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) WithHTTPClient(client *http.Client) *ArkServiceSendTreeSignaturesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) WithBody(body *models.V1SendTreeSignaturesRequest) *ArkServiceSendTreeSignaturesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service send tree signatures params -func (o *ArkServiceSendTreeSignaturesParams) SetBody(body *models.V1SendTreeSignaturesRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceSendTreeSignaturesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_responses.go deleted file mode 100644 index 402b481..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_send_tree_signatures_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceSendTreeSignaturesReader is a Reader for the ArkServiceSendTreeSignatures structure. -type ArkServiceSendTreeSignaturesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceSendTreeSignaturesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceSendTreeSignaturesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceSendTreeSignaturesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceSendTreeSignaturesOK creates a ArkServiceSendTreeSignaturesOK with default headers values -func NewArkServiceSendTreeSignaturesOK() *ArkServiceSendTreeSignaturesOK { - return &ArkServiceSendTreeSignaturesOK{} -} - -/* -ArkServiceSendTreeSignaturesOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceSendTreeSignaturesOK struct { - Payload models.V1SendTreeSignaturesResponse -} - -// IsSuccess returns true when this ark service send tree signatures o k response has a 2xx status code -func (o *ArkServiceSendTreeSignaturesOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service send tree signatures o k response has a 3xx status code -func (o *ArkServiceSendTreeSignaturesOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service send tree signatures o k response has a 4xx status code -func (o *ArkServiceSendTreeSignaturesOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service send tree signatures o k response has a 5xx status code -func (o *ArkServiceSendTreeSignaturesOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service send tree signatures o k response a status code equal to that given -func (o *ArkServiceSendTreeSignaturesOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service send tree signatures o k response -func (o *ArkServiceSendTreeSignaturesOK) Code() int { - return 200 -} - -func (o *ArkServiceSendTreeSignaturesOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/signatures][%d] arkServiceSendTreeSignaturesOK %s", 200, payload) -} - -func (o *ArkServiceSendTreeSignaturesOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/signatures][%d] arkServiceSendTreeSignaturesOK %s", 200, payload) -} - -func (o *ArkServiceSendTreeSignaturesOK) GetPayload() models.V1SendTreeSignaturesResponse { - return o.Payload -} - -func (o *ArkServiceSendTreeSignaturesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceSendTreeSignaturesDefault creates a ArkServiceSendTreeSignaturesDefault with default headers values -func NewArkServiceSendTreeSignaturesDefault(code int) *ArkServiceSendTreeSignaturesDefault { - return &ArkServiceSendTreeSignaturesDefault{ - _statusCode: code, - } -} - -/* -ArkServiceSendTreeSignaturesDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceSendTreeSignaturesDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service send tree signatures default response has a 2xx status code -func (o *ArkServiceSendTreeSignaturesDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service send tree signatures default response has a 3xx status code -func (o *ArkServiceSendTreeSignaturesDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service send tree signatures default response has a 4xx status code -func (o *ArkServiceSendTreeSignaturesDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service send tree signatures default response has a 5xx status code -func (o *ArkServiceSendTreeSignaturesDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service send tree signatures default response a status code equal to that given -func (o *ArkServiceSendTreeSignaturesDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service send tree signatures default response -func (o *ArkServiceSendTreeSignaturesDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceSendTreeSignaturesDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/signatures][%d] ArkService_SendTreeSignatures default %s", o._statusCode, payload) -} - -func (o *ArkServiceSendTreeSignaturesDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/payment/tree/signatures][%d] ArkService_SendTreeSignatures default %s", o._statusCode, payload) -} - -func (o *ArkServiceSendTreeSignaturesDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceSendTreeSignaturesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_parameters.go new file mode 100644 index 0000000..401e64d --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ark_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" +) + +// NewArkServiceSubmitRedeemTxParams creates a new ArkServiceSubmitRedeemTxParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewArkServiceSubmitRedeemTxParams() *ArkServiceSubmitRedeemTxParams { + return &ArkServiceSubmitRedeemTxParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArkServiceSubmitRedeemTxParamsWithTimeout creates a new ArkServiceSubmitRedeemTxParams object +// with the ability to set a timeout on a request. +func NewArkServiceSubmitRedeemTxParamsWithTimeout(timeout time.Duration) *ArkServiceSubmitRedeemTxParams { + return &ArkServiceSubmitRedeemTxParams{ + timeout: timeout, + } +} + +// NewArkServiceSubmitRedeemTxParamsWithContext creates a new ArkServiceSubmitRedeemTxParams object +// with the ability to set a context for a request. +func NewArkServiceSubmitRedeemTxParamsWithContext(ctx context.Context) *ArkServiceSubmitRedeemTxParams { + return &ArkServiceSubmitRedeemTxParams{ + Context: ctx, + } +} + +// NewArkServiceSubmitRedeemTxParamsWithHTTPClient creates a new ArkServiceSubmitRedeemTxParams object +// with the ability to set a custom HTTPClient for a request. +func NewArkServiceSubmitRedeemTxParamsWithHTTPClient(client *http.Client) *ArkServiceSubmitRedeemTxParams { + return &ArkServiceSubmitRedeemTxParams{ + HTTPClient: client, + } +} + +/* +ArkServiceSubmitRedeemTxParams contains all the parameters to send to the API endpoint + + for the ark service submit redeem tx operation. + + Typically these are written to a http.Request. +*/ +type ArkServiceSubmitRedeemTxParams struct { + + // Body. + Body *models.V1SubmitRedeemTxRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ark service submit redeem tx params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitRedeemTxParams) WithDefaults() *ArkServiceSubmitRedeemTxParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ark service submit redeem tx params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitRedeemTxParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) WithTimeout(timeout time.Duration) *ArkServiceSubmitRedeemTxParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) WithContext(ctx context.Context) *ArkServiceSubmitRedeemTxParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) WithHTTPClient(client *http.Client) *ArkServiceSubmitRedeemTxParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) WithBody(body *models.V1SubmitRedeemTxRequest) *ArkServiceSubmitRedeemTxParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the ark service submit redeem tx params +func (o *ArkServiceSubmitRedeemTxParams) SetBody(body *models.V1SubmitRedeemTxRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ArkServiceSubmitRedeemTxParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_responses.go new file mode 100644 index 0000000..7b887a7 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_redeem_tx_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package ark_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" +) + +// ArkServiceSubmitRedeemTxReader is a Reader for the ArkServiceSubmitRedeemTx structure. +type ArkServiceSubmitRedeemTxReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArkServiceSubmitRedeemTxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArkServiceSubmitRedeemTxOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewArkServiceSubmitRedeemTxDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewArkServiceSubmitRedeemTxOK creates a ArkServiceSubmitRedeemTxOK with default headers values +func NewArkServiceSubmitRedeemTxOK() *ArkServiceSubmitRedeemTxOK { + return &ArkServiceSubmitRedeemTxOK{} +} + +/* +ArkServiceSubmitRedeemTxOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ArkServiceSubmitRedeemTxOK struct { + Payload *models.V1SubmitRedeemTxResponse +} + +// IsSuccess returns true when this ark service submit redeem tx o k response has a 2xx status code +func (o *ArkServiceSubmitRedeemTxOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ark service submit redeem tx o k response has a 3xx status code +func (o *ArkServiceSubmitRedeemTxOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ark service submit redeem tx o k response has a 4xx status code +func (o *ArkServiceSubmitRedeemTxOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ark service submit redeem tx o k response has a 5xx status code +func (o *ArkServiceSubmitRedeemTxOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ark service submit redeem tx o k response a status code equal to that given +func (o *ArkServiceSubmitRedeemTxOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the ark service submit redeem tx o k response +func (o *ArkServiceSubmitRedeemTxOK) Code() int { + return 200 +} + +func (o *ArkServiceSubmitRedeemTxOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/redeem-tx][%d] arkServiceSubmitRedeemTxOK %s", 200, payload) +} + +func (o *ArkServiceSubmitRedeemTxOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/redeem-tx][%d] arkServiceSubmitRedeemTxOK %s", 200, payload) +} + +func (o *ArkServiceSubmitRedeemTxOK) GetPayload() *models.V1SubmitRedeemTxResponse { + return o.Payload +} + +func (o *ArkServiceSubmitRedeemTxOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SubmitRedeemTxResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArkServiceSubmitRedeemTxDefault creates a ArkServiceSubmitRedeemTxDefault with default headers values +func NewArkServiceSubmitRedeemTxDefault(code int) *ArkServiceSubmitRedeemTxDefault { + return &ArkServiceSubmitRedeemTxDefault{ + _statusCode: code, + } +} + +/* +ArkServiceSubmitRedeemTxDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ArkServiceSubmitRedeemTxDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this ark service submit redeem tx default response has a 2xx status code +func (o *ArkServiceSubmitRedeemTxDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this ark service submit redeem tx default response has a 3xx status code +func (o *ArkServiceSubmitRedeemTxDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this ark service submit redeem tx default response has a 4xx status code +func (o *ArkServiceSubmitRedeemTxDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this ark service submit redeem tx default response has a 5xx status code +func (o *ArkServiceSubmitRedeemTxDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this ark service submit redeem tx default response a status code equal to that given +func (o *ArkServiceSubmitRedeemTxDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the ark service submit redeem tx default response +func (o *ArkServiceSubmitRedeemTxDefault) Code() int { + return o._statusCode +} + +func (o *ArkServiceSubmitRedeemTxDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/redeem-tx][%d] ArkService_SubmitRedeemTx default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitRedeemTxDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/redeem-tx][%d] ArkService_SubmitRedeemTx default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitRedeemTxDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ArkServiceSubmitRedeemTxDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_parameters.go deleted file mode 100644 index 70c25a8..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// NewArkServiceSubmitSignedForfeitTransactionsParams creates a new ArkServiceSubmitSignedForfeitTransactionsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewArkServiceSubmitSignedForfeitTransactionsParams() *ArkServiceSubmitSignedForfeitTransactionsParams { - return &ArkServiceSubmitSignedForfeitTransactionsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewArkServiceSubmitSignedForfeitTransactionsParamsWithTimeout creates a new ArkServiceSubmitSignedForfeitTransactionsParams object -// with the ability to set a timeout on a request. -func NewArkServiceSubmitSignedForfeitTransactionsParamsWithTimeout(timeout time.Duration) *ArkServiceSubmitSignedForfeitTransactionsParams { - return &ArkServiceSubmitSignedForfeitTransactionsParams{ - timeout: timeout, - } -} - -// NewArkServiceSubmitSignedForfeitTransactionsParamsWithContext creates a new ArkServiceSubmitSignedForfeitTransactionsParams object -// with the ability to set a context for a request. -func NewArkServiceSubmitSignedForfeitTransactionsParamsWithContext(ctx context.Context) *ArkServiceSubmitSignedForfeitTransactionsParams { - return &ArkServiceSubmitSignedForfeitTransactionsParams{ - Context: ctx, - } -} - -// NewArkServiceSubmitSignedForfeitTransactionsParamsWithHTTPClient creates a new ArkServiceSubmitSignedForfeitTransactionsParams object -// with the ability to set a custom HTTPClient for a request. -func NewArkServiceSubmitSignedForfeitTransactionsParamsWithHTTPClient(client *http.Client) *ArkServiceSubmitSignedForfeitTransactionsParams { - return &ArkServiceSubmitSignedForfeitTransactionsParams{ - HTTPClient: client, - } -} - -/* -ArkServiceSubmitSignedForfeitTransactionsParams contains all the parameters to send to the API endpoint - - for the ark service submit signed forfeit transactions operation. - - Typically these are written to a http.Request. -*/ -type ArkServiceSubmitSignedForfeitTransactionsParams struct { - - // Body. - Body *models.V1SubmitSignedForfeitTransactionsRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the ark service submit signed forfeit transactions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) WithDefaults() *ArkServiceSubmitSignedForfeitTransactionsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the ark service submit signed forfeit transactions params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) WithTimeout(timeout time.Duration) *ArkServiceSubmitSignedForfeitTransactionsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) WithContext(ctx context.Context) *ArkServiceSubmitSignedForfeitTransactionsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) WithHTTPClient(client *http.Client) *ArkServiceSubmitSignedForfeitTransactionsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) WithBody(body *models.V1SubmitSignedForfeitTransactionsRequest) *ArkServiceSubmitSignedForfeitTransactionsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the ark service submit signed forfeit transactions params -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) SetBody(body *models.V1SubmitSignedForfeitTransactionsRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ArkServiceSubmitSignedForfeitTransactionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_responses.go deleted file mode 100644 index 6c5b3ff..0000000 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_responses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ark_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/ark-network/ark/pkg/client-sdk/client/rest/service/models" -) - -// ArkServiceSubmitSignedForfeitTransactionsReader is a Reader for the ArkServiceSubmitSignedForfeitTransactions structure. -type ArkServiceSubmitSignedForfeitTransactionsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ArkServiceSubmitSignedForfeitTransactionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewArkServiceSubmitSignedForfeitTransactionsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewArkServiceSubmitSignedForfeitTransactionsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewArkServiceSubmitSignedForfeitTransactionsOK creates a ArkServiceSubmitSignedForfeitTransactionsOK with default headers values -func NewArkServiceSubmitSignedForfeitTransactionsOK() *ArkServiceSubmitSignedForfeitTransactionsOK { - return &ArkServiceSubmitSignedForfeitTransactionsOK{} -} - -/* -ArkServiceSubmitSignedForfeitTransactionsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ArkServiceSubmitSignedForfeitTransactionsOK struct { - Payload models.V1SubmitSignedForfeitTransactionsResponse -} - -// IsSuccess returns true when this ark service submit signed forfeit transactions o k response has a 2xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this ark service submit signed forfeit transactions o k response has a 3xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this ark service submit signed forfeit transactions o k response has a 4xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this ark service submit signed forfeit transactions o k response has a 5xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this ark service submit signed forfeit transactions o k response a status code equal to that given -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the ark service submit signed forfeit transactions o k response -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) Code() int { - return 200 -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] arkServiceSubmitSignedForfeitTransactionsOK %s", 200, payload) -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] arkServiceSubmitSignedForfeitTransactionsOK %s", 200, payload) -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) GetPayload() models.V1SubmitSignedForfeitTransactionsResponse { - return o.Payload -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewArkServiceSubmitSignedForfeitTransactionsDefault creates a ArkServiceSubmitSignedForfeitTransactionsDefault with default headers values -func NewArkServiceSubmitSignedForfeitTransactionsDefault(code int) *ArkServiceSubmitSignedForfeitTransactionsDefault { - return &ArkServiceSubmitSignedForfeitTransactionsDefault{ - _statusCode: code, - } -} - -/* -ArkServiceSubmitSignedForfeitTransactionsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ArkServiceSubmitSignedForfeitTransactionsDefault struct { - _statusCode int - - Payload *models.RPCStatus -} - -// IsSuccess returns true when this ark service submit signed forfeit transactions default response has a 2xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this ark service submit signed forfeit transactions default response has a 3xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this ark service submit signed forfeit transactions default response has a 4xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this ark service submit signed forfeit transactions default response has a 5xx status code -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this ark service submit signed forfeit transactions default response a status code equal to that given -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the ark service submit signed forfeit transactions default response -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) Code() int { - return o._statusCode -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] ArkService_SubmitSignedForfeitTransactions default %s", o._statusCode, payload) -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] ArkService_SubmitSignedForfeitTransactions default %s", o._statusCode, payload) -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) GetPayload() *models.RPCStatus { - return o.Payload -} - -func (o *ArkServiceSubmitSignedForfeitTransactionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RPCStatus) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_async_payment_input.go b/pkg/client-sdk/client/rest/service/models/v1_async_payment_input.go deleted file mode 100644 index 8912ef8..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_async_payment_input.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1AsyncPaymentInput v1 async payment input -// -// swagger:model v1AsyncPaymentInput -type V1AsyncPaymentInput struct { - - // forfeit leaf hash - ForfeitLeafHash string `json:"forfeitLeafHash,omitempty"` - - // input - Input *V1Input `json:"input,omitempty"` -} - -// Validate validates this v1 async payment input -func (m *V1AsyncPaymentInput) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInput(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1AsyncPaymentInput) validateInput(formats strfmt.Registry) error { - if swag.IsZero(m.Input) { // not required - return nil - } - - if m.Input != nil { - if err := m.Input.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("input") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("input") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1 async payment input based on the context it is used -func (m *V1AsyncPaymentInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInput(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1AsyncPaymentInput) contextValidateInput(ctx context.Context, formats strfmt.Registry) error { - - if m.Input != nil { - - if swag.IsZero(m.Input) { // not required - return nil - } - - if err := m.Input.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("input") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("input") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1AsyncPaymentInput) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1AsyncPaymentInput) UnmarshalBinary(b []byte) error { - var res V1AsyncPaymentInput - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_boarding_input.go b/pkg/client-sdk/client/rest/service/models/v1_boarding_input.go deleted file mode 100644 index 14c4f7e..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_boarding_input.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1BoardingInput v1 boarding input -// -// swagger:model v1BoardingInput -type V1BoardingInput struct { - - // descriptor - Descriptor string `json:"descriptor,omitempty"` - - // txid - Txid string `json:"txid,omitempty"` - - // vout - Vout int64 `json:"vout,omitempty"` -} - -// Validate validates this v1 boarding input -func (m *V1BoardingInput) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 boarding input based on context it is used -func (m *V1BoardingInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1BoardingInput) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1BoardingInput) UnmarshalBinary(b []byte) error { - var res V1BoardingInput - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_claim_payment_request.go b/pkg/client-sdk/client/rest/service/models/v1_claim_payment_request.go deleted file mode 100644 index e41e42e..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_claim_payment_request.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1ClaimPaymentRequest v1 claim payment request -// -// swagger:model v1ClaimPaymentRequest -type V1ClaimPaymentRequest struct { - - // Mocks wabisabi's credentials. - ID string `json:"id,omitempty"` - - // List of receivers for a registered payment. - Outputs []*V1Output `json:"outputs"` -} - -// Validate validates this v1 claim payment request -func (m *V1ClaimPaymentRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOutputs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ClaimPaymentRequest) validateOutputs(formats strfmt.Registry) error { - if swag.IsZero(m.Outputs) { // not required - return nil - } - - for i := 0; i < len(m.Outputs); i++ { - if swag.IsZero(m.Outputs[i]) { // not required - continue - } - - if m.Outputs[i] != nil { - if err := m.Outputs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1 claim payment request based on the context it is used -func (m *V1ClaimPaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOutputs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ClaimPaymentRequest) contextValidateOutputs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Outputs); i++ { - - if m.Outputs[i] != nil { - - if swag.IsZero(m.Outputs[i]) { // not required - return nil - } - - if err := m.Outputs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1ClaimPaymentRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1ClaimPaymentRequest) UnmarshalBinary(b []byte) error { - var res V1ClaimPaymentRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_claim_payment_response.go b/pkg/client-sdk/client/rest/service/models/v1_claim_payment_response.go deleted file mode 100644 index ffe306b..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_claim_payment_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// V1ClaimPaymentResponse v1 claim payment response -// -// swagger:model v1ClaimPaymentResponse -type V1ClaimPaymentResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_complete_payment_response.go b/pkg/client-sdk/client/rest/service/models/v1_complete_payment_response.go deleted file mode 100644 index c2ebdf2..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_complete_payment_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// V1CompletePaymentResponse v1 complete payment response -// -// swagger:model v1CompletePaymentResponse -type V1CompletePaymentResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_create_payment_request.go b/pkg/client-sdk/client/rest/service/models/v1_create_payment_request.go deleted file mode 100644 index 8587e80..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_create_payment_request.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1CreatePaymentRequest v1 create payment request -// -// swagger:model v1CreatePaymentRequest -type V1CreatePaymentRequest struct { - - // inputs - Inputs []*V1AsyncPaymentInput `json:"inputs"` - - // outputs - Outputs []*V1Output `json:"outputs"` -} - -// Validate validates this v1 create payment request -func (m *V1CreatePaymentRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInputs(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOutputs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CreatePaymentRequest) validateInputs(formats strfmt.Registry) error { - if swag.IsZero(m.Inputs) { // not required - return nil - } - - for i := 0; i < len(m.Inputs); i++ { - if swag.IsZero(m.Inputs[i]) { // not required - continue - } - - if m.Inputs[i] != nil { - if err := m.Inputs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1CreatePaymentRequest) validateOutputs(formats strfmt.Registry) error { - if swag.IsZero(m.Outputs) { // not required - return nil - } - - for i := 0; i < len(m.Outputs); i++ { - if swag.IsZero(m.Outputs[i]) { // not required - continue - } - - if m.Outputs[i] != nil { - if err := m.Outputs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1 create payment request based on the context it is used -func (m *V1CreatePaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInputs(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOutputs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1CreatePaymentRequest) contextValidateInputs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Inputs); i++ { - - if m.Inputs[i] != nil { - - if swag.IsZero(m.Inputs[i]) { // not required - return nil - } - - if err := m.Inputs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1CreatePaymentRequest) contextValidateOutputs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Outputs); i++ { - - if m.Outputs[i] != nil { - - if swag.IsZero(m.Outputs[i]) { // not required - return nil - } - - if err := m.Outputs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("outputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("outputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1CreatePaymentRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1CreatePaymentRequest) UnmarshalBinary(b []byte) error { - var res V1CreatePaymentRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_create_payment_response.go b/pkg/client-sdk/client/rest/service/models/v1_create_payment_response.go deleted file mode 100644 index 1519005..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_create_payment_response.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1CreatePaymentResponse v1 create payment response -// -// swagger:model v1CreatePaymentResponse -type V1CreatePaymentResponse struct { - - // signed only by the ASP - SignedRedeemTx string `json:"signedRedeemTx,omitempty"` -} - -// Validate validates this v1 create payment response -func (m *V1CreatePaymentResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 create payment response based on context it is used -func (m *V1CreatePaymentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1CreatePaymentResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1CreatePaymentResponse) UnmarshalBinary(b []byte) error { - var res V1CreatePaymentResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_finalize_payment_request.go b/pkg/client-sdk/client/rest/service/models/v1_finalize_payment_request.go deleted file mode 100644 index 2095746..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_finalize_payment_request.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1FinalizePaymentRequest v1 finalize payment request -// -// swagger:model v1FinalizePaymentRequest -type V1FinalizePaymentRequest struct { - - // Forfeit txs signed by the user. - SignedForfeitTxs []string `json:"signedForfeitTxs"` - - // If payment has boarding input, the user must sign the associated inputs. - SignedRoundTx string `json:"signedRoundTx,omitempty"` -} - -// Validate validates this v1 finalize payment request -func (m *V1FinalizePaymentRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 finalize payment request based on context it is used -func (m *V1FinalizePaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1FinalizePaymentRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1FinalizePaymentRequest) UnmarshalBinary(b []byte) error { - var res V1FinalizePaymentRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_finalize_payment_response.go b/pkg/client-sdk/client/rest/service/models/v1_finalize_payment_response.go deleted file mode 100644 index f5083ff..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_finalize_payment_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// V1FinalizePaymentResponse v1 finalize payment response -// -// swagger:model v1FinalizePaymentResponse -type V1FinalizePaymentResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_get_info_response.go b/pkg/client-sdk/client/rest/service/models/v1_get_info_response.go index ff01142..04aa39f 100644 --- a/pkg/client-sdk/client/rest/service/models/v1_get_info_response.go +++ b/pkg/client-sdk/client/rest/service/models/v1_get_info_response.go @@ -8,6 +8,7 @@ package models import ( "context" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -26,6 +27,9 @@ type V1GetInfoResponse struct { // forfeit address ForfeitAddress string `json:"forfeitAddress,omitempty"` + // market hour + MarketHour *V1MarketHour `json:"marketHour,omitempty"` + // network Network string `json:"network,omitempty"` @@ -47,11 +51,69 @@ type V1GetInfoResponse struct { // Validate validates this v1 get info response func (m *V1GetInfoResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMarketHour(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } return nil } -// ContextValidate validates this v1 get info response based on context it is used +func (m *V1GetInfoResponse) validateMarketHour(formats strfmt.Registry) error { + if swag.IsZero(m.MarketHour) { // not required + return nil + } + + if m.MarketHour != nil { + if err := m.MarketHour.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("marketHour") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("marketHour") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 get info response based on the context it is used func (m *V1GetInfoResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMarketHour(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GetInfoResponse) contextValidateMarketHour(ctx context.Context, formats strfmt.Registry) error { + + if m.MarketHour != nil { + + if swag.IsZero(m.MarketHour) { // not required + return nil + } + + if err := m.MarketHour.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("marketHour") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("marketHour") + } + return err + } + } + return nil } diff --git a/pkg/client-sdk/client/rest/service/models/v1_market_hour.go b/pkg/client-sdk/client/rest/service/models/v1_market_hour.go new file mode 100644 index 0000000..0bf6d29 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_market_hour.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MarketHour v1 market hour +// +// swagger:model v1MarketHour +type V1MarketHour struct { + + // next end time + // Format: date-time + NextEndTime strfmt.DateTime `json:"nextEndTime,omitempty"` + + // next start time + // Format: date-time + NextStartTime strfmt.DateTime `json:"nextStartTime,omitempty"` + + // period + Period string `json:"period,omitempty"` + + // round interval + RoundInterval string `json:"roundInterval,omitempty"` +} + +// Validate validates this v1 market hour +func (m *V1MarketHour) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNextEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNextStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MarketHour) validateNextEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.NextEndTime) { // not required + return nil + } + + if err := validate.FormatOf("nextEndTime", "body", "date-time", m.NextEndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1MarketHour) validateNextStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.NextStartTime) { // not required + return nil + } + + if err := validate.FormatOf("nextStartTime", "body", "date-time", m.NextStartTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1 market hour based on context it is used +func (m *V1MarketHour) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MarketHour) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MarketHour) UnmarshalBinary(b []byte) error { + var res V1MarketHour + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/client-sdk/client/rest/service/models/v1_pending_payment.go b/pkg/client-sdk/client/rest/service/models/v1_pending_payment.go deleted file mode 100644 index fba89e3..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_pending_payment.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1PendingPayment v1 pending payment -// -// swagger:model v1PendingPayment -type V1PendingPayment struct { - - // redeem tx - RedeemTx string `json:"redeemTx,omitempty"` -} - -// Validate validates this v1 pending payment -func (m *V1PendingPayment) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 pending payment based on context it is used -func (m *V1PendingPayment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1PendingPayment) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1PendingPayment) UnmarshalBinary(b []byte) error { - var res V1PendingPayment - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_register_payment_request.go b/pkg/client-sdk/client/rest/service/models/v1_register_payment_request.go deleted file mode 100644 index 70ee637..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_register_payment_request.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1RegisterPaymentRequest v1 register payment request -// -// swagger:model v1RegisterPaymentRequest -type V1RegisterPaymentRequest struct { - - // ephemeral pubkey - EphemeralPubkey string `json:"ephemeralPubkey,omitempty"` - - // inputs - Inputs []*V1Input `json:"inputs"` -} - -// Validate validates this v1 register payment request -func (m *V1RegisterPaymentRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInputs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1RegisterPaymentRequest) validateInputs(formats strfmt.Registry) error { - if swag.IsZero(m.Inputs) { // not required - return nil - } - - for i := 0; i < len(m.Inputs); i++ { - if swag.IsZero(m.Inputs[i]) { // not required - continue - } - - if m.Inputs[i] != nil { - if err := m.Inputs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1 register payment request based on the context it is used -func (m *V1RegisterPaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInputs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1RegisterPaymentRequest) contextValidateInputs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Inputs); i++ { - - if m.Inputs[i] != nil { - - if swag.IsZero(m.Inputs[i]) { // not required - return nil - } - - if err := m.Inputs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("inputs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("inputs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1RegisterPaymentRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1RegisterPaymentRequest) UnmarshalBinary(b []byte) error { - var res V1RegisterPaymentRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_register_payment_response.go b/pkg/client-sdk/client/rest/service/models/v1_register_payment_response.go deleted file mode 100644 index 15340c3..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_register_payment_response.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1RegisterPaymentResponse v1 register payment response -// -// swagger:model v1RegisterPaymentResponse -type V1RegisterPaymentResponse struct { - - // Mocks wabisabi's credentials. - ID string `json:"id,omitempty"` -} - -// Validate validates this v1 register payment response -func (m *V1RegisterPaymentResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 register payment response based on context it is used -func (m *V1RegisterPaymentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1RegisterPaymentResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1RegisterPaymentResponse) UnmarshalBinary(b []byte) error { - var res V1RegisterPaymentResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_request.go b/pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_request.go deleted file mode 100644 index d2b9386..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_request.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1SendTreeNoncesRequest v1 send tree nonces request -// -// swagger:model v1SendTreeNoncesRequest -type V1SendTreeNoncesRequest struct { - - // public key - PublicKey string `json:"publicKey,omitempty"` - - // round Id - RoundID string `json:"roundId,omitempty"` - - // tree nonces - TreeNonces string `json:"treeNonces,omitempty"` -} - -// Validate validates this v1 send tree nonces request -func (m *V1SendTreeNoncesRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 send tree nonces request based on context it is used -func (m *V1SendTreeNoncesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1SendTreeNoncesRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1SendTreeNoncesRequest) UnmarshalBinary(b []byte) error { - var res V1SendTreeNoncesRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_response.go b/pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_response.go deleted file mode 100644 index 734b54c..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_send_tree_nonces_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// V1SendTreeNoncesResponse v1 send tree nonces response -// -// swagger:model v1SendTreeNoncesResponse -type V1SendTreeNoncesResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_request.go b/pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_request.go deleted file mode 100644 index c08ecf9..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_request.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1SendTreeSignaturesRequest v1 send tree signatures request -// -// swagger:model v1SendTreeSignaturesRequest -type V1SendTreeSignaturesRequest struct { - - // public key - PublicKey string `json:"publicKey,omitempty"` - - // round Id - RoundID string `json:"roundId,omitempty"` - - // tree signatures - TreeSignatures string `json:"treeSignatures,omitempty"` -} - -// Validate validates this v1 send tree signatures request -func (m *V1SendTreeSignaturesRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 send tree signatures request based on context it is used -func (m *V1SendTreeSignaturesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1SendTreeSignaturesRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1SendTreeSignaturesRequest) UnmarshalBinary(b []byte) error { - var res V1SendTreeSignaturesRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_response.go b/pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_response.go deleted file mode 100644 index a299076..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_send_tree_signatures_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// V1SendTreeSignaturesResponse v1 send tree signatures response -// -// swagger:model v1SendTreeSignaturesResponse -type V1SendTreeSignaturesResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_submit_redeem_tx_request.go b/pkg/client-sdk/client/rest/service/models/v1_submit_redeem_tx_request.go new file mode 100644 index 0000000..298bd9c --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_redeem_tx_request.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SubmitRedeemTxRequest v1 submit redeem tx request +// +// swagger:model v1SubmitRedeemTxRequest +type V1SubmitRedeemTxRequest struct { + + // redeem tx + RedeemTx string `json:"redeemTx,omitempty"` +} + +// Validate validates this v1 submit redeem tx request +func (m *V1SubmitRedeemTxRequest) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 submit redeem tx request based on context it is used +func (m *V1SubmitRedeemTxRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SubmitRedeemTxRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SubmitRedeemTxRequest) UnmarshalBinary(b []byte) error { + var res V1SubmitRedeemTxRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/client-sdk/client/rest/service/models/v1_complete_payment_request.go b/pkg/client-sdk/client/rest/service/models/v1_submit_redeem_tx_response.go similarity index 54% rename from pkg/client-sdk/client/rest/service/models/v1_complete_payment_request.go rename to pkg/client-sdk/client/rest/service/models/v1_submit_redeem_tx_response.go index a907f63..78968f1 100644 --- a/pkg/client-sdk/client/rest/service/models/v1_complete_payment_request.go +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_redeem_tx_response.go @@ -12,27 +12,27 @@ import ( "github.com/go-openapi/swag" ) -// V1CompletePaymentRequest v1 complete payment request +// V1SubmitRedeemTxResponse v1 submit redeem tx response // -// swagger:model v1CompletePaymentRequest -type V1CompletePaymentRequest struct { +// swagger:model v1SubmitRedeemTxResponse +type V1SubmitRedeemTxResponse struct { // signed redeem tx SignedRedeemTx string `json:"signedRedeemTx,omitempty"` } -// Validate validates this v1 complete payment request -func (m *V1CompletePaymentRequest) Validate(formats strfmt.Registry) error { +// Validate validates this v1 submit redeem tx response +func (m *V1SubmitRedeemTxResponse) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this v1 complete payment request based on context it is used -func (m *V1CompletePaymentRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this v1 submit redeem tx response based on context it is used +func (m *V1SubmitRedeemTxResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *V1CompletePaymentRequest) MarshalBinary() ([]byte, error) { +func (m *V1SubmitRedeemTxResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -40,8 +40,8 @@ func (m *V1CompletePaymentRequest) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *V1CompletePaymentRequest) UnmarshalBinary(b []byte) error { - var res V1CompletePaymentRequest +func (m *V1SubmitRedeemTxResponse) UnmarshalBinary(b []byte) error { + var res V1SubmitRedeemTxResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_request.go b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_request.go deleted file mode 100644 index 3016adb..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_request.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1SubmitSignedForfeitTransactionsRequest v1 submit signed forfeit transactions request -// -// swagger:model v1SubmitSignedForfeitTransactionsRequest -type V1SubmitSignedForfeitTransactionsRequest struct { - - // Forfeit txs signed by the user. - SignedForfeitTxs []string `json:"signedForfeitTxs"` - - // If payment has boarding input, the user must sign the associated inputs. - SignedRoundTx string `json:"signedRoundTx,omitempty"` -} - -// Validate validates this v1 submit signed forfeit transactions request -func (m *V1SubmitSignedForfeitTransactionsRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 submit signed forfeit transactions request based on context it is used -func (m *V1SubmitSignedForfeitTransactionsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1SubmitSignedForfeitTransactionsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1SubmitSignedForfeitTransactionsRequest) UnmarshalBinary(b []byte) error { - var res V1SubmitSignedForfeitTransactionsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_response.go b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_response.go deleted file mode 100644 index 7e8f9d6..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// V1SubmitSignedForfeitTransactionsResponse v1 submit signed forfeit transactions response -// -// swagger:model v1SubmitSignedForfeitTransactionsResponse -type V1SubmitSignedForfeitTransactionsResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_vtxo_input.go b/pkg/client-sdk/client/rest/service/models/v1_vtxo_input.go deleted file mode 100644 index d579cf7..0000000 --- a/pkg/client-sdk/client/rest/service/models/v1_vtxo_input.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1VtxoInput v1 vtxo input -// -// swagger:model v1VtxoInput -type V1VtxoInput struct { - - // txid - Txid string `json:"txid,omitempty"` - - // vout - Vout int64 `json:"vout,omitempty"` -} - -// Validate validates this v1 vtxo input -func (m *V1VtxoInput) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 vtxo input based on context it is used -func (m *V1VtxoInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1VtxoInput) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1VtxoInput) UnmarshalBinary(b []byte) error { - var res V1VtxoInput - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/client-sdk/covenant_client.go b/pkg/client-sdk/covenant_client.go index e27c382..395fce8 100644 --- a/pkg/client-sdk/covenant_client.go +++ b/pkg/client-sdk/covenant_client.go @@ -1467,7 +1467,7 @@ func (a *covenantArkClient) createAndSignForfeits( ControlBlock: *ctrlBlock, } - feeAmount, err := common.ComputeForfeitMinRelayFee( + feeAmount, err := common.ComputeForfeitTxFee( feeRate, &waddrmgr.Tapscript{ RevealedScript: leafProof.Script, diff --git a/pkg/client-sdk/covenantless_client.go b/pkg/client-sdk/covenantless_client.go index 10a5301..79c0fac 100644 --- a/pkg/client-sdk/covenantless_client.go +++ b/pkg/client-sdk/covenantless_client.go @@ -978,7 +978,6 @@ func (a *covenantlessArkClient) SendAsync( expectedAspPubKey := schnorr.SerializePubKey(a.AspPubkey) - receiversOutput := make([]client.Output, 0) sumOfReceivers := uint64(0) for _, receiver := range receivers { @@ -997,10 +996,6 @@ func (a *covenantlessArkClient) SendAsync( return "", fmt.Errorf("invalid amount (%d), must be greater than dust %d", receiver.Amount(), a.Dust) } - receiversOutput = append(receiversOutput, client.Output{ - Address: receiver.To(), - Amount: receiver.Amount(), - }) sumOfReceivers += receiver.Amount() } @@ -1038,14 +1033,10 @@ func (a *covenantlessArkClient) SendAsync( } if changeAmount > 0 { - changeReceiver := client.Output{ - Address: offchainAddrs[0].Address, - Amount: changeAmount, - } - receiversOutput = append(receiversOutput, changeReceiver) + receivers = append(receivers, NewBitcoinReceiver(offchainAddrs[0].Address, changeAmount)) } - inputs := make([]client.AsyncPaymentInput, 0, len(selectedCoins)) + inputs := make([]redeemTxInput, 0, len(selectedCoins)) for _, coin := range selectedCoins { vtxoScript, err := bitcointree.ParseVtxoScript(coin.Tapscripts) @@ -1062,33 +1053,25 @@ func (a *covenantlessArkClient) SendAsync( forfeitLeaf := txscript.NewBaseTapLeaf(forfeitScript) - inputs = append(inputs, client.AsyncPaymentInput{ - Input: client.Input{ - Outpoint: client.Outpoint{ - Txid: coin.Txid, - VOut: coin.VOut, - }, - Tapscripts: coin.Tapscripts, - }, - ForfeitLeafHash: forfeitLeaf.TapHash(), + inputs = append(inputs, redeemTxInput{ + coin, + forfeitLeaf.TapHash(), }) } - redeemTx, err := a.client.CreatePayment(ctx, inputs, receiversOutput) + feeRate := chainfee.FeePerKwFloor + redeemTx, err := buildRedeemTx(inputs, receivers, feeRate.FeePerVByte()) if err != nil { return "", err } - // TODO verify the redeem tx signature - signedRedeemTx, err := a.wallet.SignTransaction(ctx, a.explorer, redeemTx) if err != nil { return "", err } - if err = a.client.CompletePayment( - ctx, signedRedeemTx, - ); err != nil { + signedRedeemTx, err = a.client.SubmitRedeemTx(ctx, signedRedeemTx) + if err != nil { return "", err } @@ -2119,7 +2102,7 @@ func (a *covenantlessArkClient) createAndSignForfeits( return nil, err } - feeAmount, err := common.ComputeForfeitMinRelayFee( + feeAmount, err := common.ComputeForfeitTxFee( feeRate, &waddrmgr.Tapscript{ RevealedScript: leafProof.Script, @@ -2605,3 +2588,113 @@ func vtxosToTxsCovenantless( return txs, nil } + +type redeemTxInput struct { + client.TapscriptsVtxo + ForfeitLeafHash chainhash.Hash +} + +func buildRedeemTx( + vtxos []redeemTxInput, + receivers []Receiver, + feeRate chainfee.SatPerVByte, +) (string, error) { + if len(vtxos) <= 0 { + return "", fmt.Errorf("missing vtxos") + } + + ins := make([]common.VtxoInput, 0, len(vtxos)) + + for _, vtxo := range vtxos { + if len(vtxo.Tapscripts) <= 0 { + return "", fmt.Errorf("missing tapscripts for vtxo %s", vtxo.Vtxo.Txid) + } + + vtxoTxID, err := chainhash.NewHashFromStr(vtxo.Txid) + if err != nil { + return "", err + } + + vtxoOutpoint := &wire.OutPoint{ + Hash: *vtxoTxID, + Index: vtxo.VOut, + } + + vtxoScript, err := bitcointree.ParseVtxoScript(vtxo.Tapscripts) + if err != nil { + return "", err + } + + _, vtxoTree, err := vtxoScript.TapTree() + if err != nil { + return "", err + } + + leafProof, err := vtxoTree.GetTaprootMerkleProof(vtxo.ForfeitLeafHash) + if err != nil { + return "", err + } + + ctrlBlock, err := txscript.ParseControlBlock(leafProof.ControlBlock) + if err != nil { + return "", err + } + + closure, err := tree.DecodeClosure(leafProof.Script) + if err != nil { + return "", err + } + + tapscript := &waddrmgr.Tapscript{ + RevealedScript: leafProof.Script, + ControlBlock: ctrlBlock, + } + + ins = append(ins, common.VtxoInput{ + Outpoint: vtxoOutpoint, + Tapscript: tapscript, + Amount: int64(vtxo.Amount), + WitnessSize: closure.WitnessSize(), + }) + } + + fees, err := common.ComputeRedeemTxFee(feeRate.FeePerKVByte(), ins, len(receivers)) + if err != nil { + return "", err + } + + if fees >= int64(receivers[len(receivers)-1].Amount()) { + return "", fmt.Errorf("redeem tx fee is higher than the amount of the change receiver") + } + + outs := make([]*wire.TxOut, 0, len(receivers)) + + for i, receiver := range receivers { + if receiver.IsOnchain() { + return "", fmt.Errorf("receiver %d is onchain", i) + } + + addr, err := common.DecodeAddress(receiver.To()) + if err != nil { + return "", err + } + + newVtxoScript, err := common.P2TRScript(addr.VtxoTapKey) + if err != nil { + return "", err + } + + // Deduct the min relay fee from the very last receiver which is supposed + // to be the change in case it's not a send-all. + value := receiver.Amount() + if i == len(receivers)-1 { + value -= uint64(fees) + } + outs = append(outs, &wire.TxOut{ + Value: int64(value), + PkScript: newVtxoScript, + }) + } + + return bitcointree.BuildRedeemTx(ins, outs, fees) +} diff --git a/server/internal/core/application/covenant.go b/server/internal/core/application/covenant.go index ea4304b..452a7de 100644 --- a/server/internal/core/application/covenant.go +++ b/server/internal/core/application/covenant.go @@ -370,11 +370,7 @@ func (s *covenantService) UpdatePaymentStatus(_ context.Context, id string) erro return s.paymentRequests.updatePingTimestamp(id) } -func (s *covenantService) CompleteAsyncPayment(ctx context.Context, redeemTx string) error { - return fmt.Errorf("unimplemented") -} - -func (s *covenantService) CreateAsyncPayment(_ context.Context, _ []AsyncPaymentInput, _ []domain.Receiver) (string, error) { +func (s *covenantService) SubmitRedeemTx(context.Context, string) (string, error) { return "", fmt.Errorf("unimplemented") } diff --git a/server/internal/core/application/covenantless.go b/server/internal/core/application/covenantless.go index 32e3b7e..d5488d5 100644 --- a/server/internal/core/application/covenantless.go +++ b/server/internal/core/application/covenantless.go @@ -22,7 +22,9 @@ import ( "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/waddrmgr" "github.com/decred/dcrd/dcrec/secp256k1/v4" + "github.com/lightningnetwork/lnd/lnwallet/chainfee" log "github.com/sirupsen/logrus" ) @@ -55,7 +57,6 @@ type covenantlessService struct { currentRoundLock sync.Mutex currentRound *domain.Round treeSigningSessions map[string]*musigSigningSession - asyncPaymentsCache map[string]asyncPaymentData } func NewCovenantlessService( @@ -103,7 +104,6 @@ func NewCovenantlessService( eventsCh: make(chan domain.RoundEvent), transactionEventsCh: make(chan TransactionEvent), currentRoundLock: sync.Mutex{}, - asyncPaymentsCache: make(map[string]asyncPaymentData), treeSigningSessions: make(map[string]*musigSigningSession), boardingExitDelay: boardingExitDelay, nostrDefaultRelays: nostrDefaultRelays, @@ -168,245 +168,274 @@ func (s *covenantlessService) Stop() { close(s.eventsCh) } -func (s *covenantlessService) CompleteAsyncPayment( +func (s *covenantlessService) SubmitRedeemTx( ctx context.Context, redeemTx string, -) error { +) (string, error) { redeemPtx, err := psbt.NewFromRawBytes(strings.NewReader(redeemTx), true) if err != nil { - return fmt.Errorf("failed to parse redeem tx: %s", err) - } - redeemTxid := redeemPtx.UnsignedTx.TxID() - - asyncPayData, ok := s.asyncPaymentsCache[redeemTxid] - if !ok { - return fmt.Errorf("async payment not found") + return "", fmt.Errorf("failed to parse redeem tx: %s", err) } vtxoRepo := s.repoManager.Vtxos() - for _, tx := range []string{redeemTx} { - ptx, err := psbt.NewFromRawBytes(strings.NewReader(tx), true) - if err != nil { - return fmt.Errorf("failed to parse tx: %s", err) - } + expiration := int64(0) + roundTxid := "" - for inputIndex, input := range ptx.Inputs { - if input.WitnessUtxo == nil { - return fmt.Errorf("missing witness utxo") - } + ins := make([]common.VtxoInput, 0) - if len(input.TaprootLeafScript) == 0 { - return fmt.Errorf("missing tapscript leaf") - } - - if len(input.TaprootScriptSpendSig) == 0 { - return fmt.Errorf("missing tapscript spend sig") - } - - vtxoOutpoint := ptx.UnsignedTx.TxIn[inputIndex].PreviousOutPoint - - // verify that the vtxo is spendable - - vtxos, err := vtxoRepo.GetVtxos(ctx, []domain.VtxoKey{{Txid: vtxoOutpoint.Hash.String(), VOut: vtxoOutpoint.Index}}) - if err != nil { - return fmt.Errorf("failed to get vtxo: %s", err) - } - - if len(vtxos) == 0 { - return fmt.Errorf("vtxo not found") - } - - vtxo := vtxos[0] - if vtxo.Spent { - return fmt.Errorf("vtxo already spent") - } - - if vtxo.Redeemed { - return fmt.Errorf("vtxo already redeemed") - } - - if vtxo.Swept { - return fmt.Errorf("vtxo already swept") - } - - // verify that the user signs a forfeit closure - var userPubKey *secp256k1.PublicKey - - aspXOnlyPubKey := schnorr.SerializePubKey(s.pubkey) - - for _, sig := range input.TaprootScriptSpendSig { - if !bytes.Equal(sig.XOnlyPubKey, aspXOnlyPubKey) { - parsed, err := schnorr.ParsePubKey(sig.XOnlyPubKey) - if err != nil { - return fmt.Errorf("failed to parse pubkey: %s", err) - } - userPubKey = parsed - break - } - } - - if userPubKey == nil { - return fmt.Errorf("redeem transaction is not signed") - } - - vtxoPublicKeyBytes, err := hex.DecodeString(vtxo.Pubkey) - if err != nil { - return fmt.Errorf("failed to decode vtxo pubkey: %s", err) - } - - vtxoTapKey, err := schnorr.ParsePubKey(vtxoPublicKeyBytes) - if err != nil { - return fmt.Errorf("failed to parse vtxo pubkey: %s", err) - } - - // verify witness utxo - pkscript, err := common.P2TRScript(vtxoTapKey) - if err != nil { - return fmt.Errorf("failed to get pkscript: %s", err) - } - - if !bytes.Equal(input.WitnessUtxo.PkScript, pkscript) { - return fmt.Errorf("witness utxo script mismatch") - } - - if input.WitnessUtxo.Value != int64(vtxo.Amount) { - return fmt.Errorf("witness utxo value mismatch") - } - } - - // verify the tapscript signatures - if valid, err := s.builder.VerifyTapscriptPartialSigs(tx); err != nil || !valid { - return fmt.Errorf("invalid tx signature: %s", err) - } + ptx, err := psbt.NewFromRawBytes(strings.NewReader(redeemTx), true) + if err != nil { + return "", fmt.Errorf("failed to parse redeem tx: %s", err) } - spentVtxos := make([]domain.VtxoKey, 0) - for _, in := range redeemPtx.UnsignedTx.TxIn { - spentVtxos = append(spentVtxos, domain.VtxoKey{ - Txid: in.PreviousOutPoint.Hash.String(), - VOut: in.PreviousOutPoint.Index, + spentVtxoKeys := make([]domain.VtxoKey, 0, len(ptx.Inputs)) + for _, input := range ptx.UnsignedTx.TxIn { + spentVtxoKeys = append(spentVtxoKeys, domain.VtxoKey{ + Txid: input.PreviousOutPoint.Hash.String(), + VOut: input.PreviousOutPoint.Index, }) } - vtxos := make([]domain.Vtxo, 0, len(asyncPayData.receivers)) + spentVtxos, err := vtxoRepo.GetVtxos(ctx, spentVtxoKeys) + if err != nil { + return "", fmt.Errorf("failed to get vtxos: %s", err) + } - for outIndex, out := range redeemPtx.UnsignedTx.TxOut { + if len(spentVtxos) != len(spentVtxoKeys) { + return "", fmt.Errorf("some vtxos not found") + } + + vtxoMap := make(map[wire.OutPoint]domain.Vtxo) + for _, vtxo := range spentVtxos { + hash, err := chainhash.NewHashFromStr(vtxo.Txid) + if err != nil { + return "", fmt.Errorf("failed to parse vtxo txid: %s", err) + } + vtxoMap[wire.OutPoint{Hash: *hash, Index: vtxo.VOut}] = vtxo + } + + sumOfInputs := int64(0) + for inputIndex, input := range ptx.Inputs { + if input.WitnessUtxo == nil { + return "", fmt.Errorf("missing witness utxo") + } + + if len(input.TaprootLeafScript) == 0 { + return "", fmt.Errorf("missing tapscript leaf") + } + + tapscript := input.TaprootLeafScript[0] + + if len(input.TaprootScriptSpendSig) == 0 { + return "", fmt.Errorf("missing tapscript spend sig") + } + + outpoint := ptx.UnsignedTx.TxIn[inputIndex].PreviousOutPoint + + vtxo, exists := vtxoMap[outpoint] + if !exists { + return "", fmt.Errorf("vtxo not found") + } + + // make sure we don't use the same vtxo twice + delete(vtxoMap, outpoint) + + if vtxo.Spent { + return "", fmt.Errorf("vtxo already spent") + } + + if vtxo.Redeemed { + return "", fmt.Errorf("vtxo already redeemed") + } + + if vtxo.Swept { + return "", fmt.Errorf("vtxo already swept") + } + + sumOfInputs += input.WitnessUtxo.Value + + if inputIndex == 0 || vtxo.ExpireAt < expiration { + roundTxid = vtxo.RoundTxid + expiration = vtxo.ExpireAt + } + + // verify that the user signs a forfeit closure + var userPubKey *secp256k1.PublicKey + + aspXOnlyPubKey := schnorr.SerializePubKey(s.pubkey) + + for _, sig := range input.TaprootScriptSpendSig { + if !bytes.Equal(sig.XOnlyPubKey, aspXOnlyPubKey) { + parsed, err := schnorr.ParsePubKey(sig.XOnlyPubKey) + if err != nil { + return "", fmt.Errorf("failed to parse pubkey: %s", err) + } + userPubKey = parsed + break + } + } + + if userPubKey == nil { + return "", fmt.Errorf("redeem transaction is not signed") + } + + vtxoPublicKeyBytes, err := hex.DecodeString(vtxo.Pubkey) + if err != nil { + return "", fmt.Errorf("failed to decode vtxo pubkey: %s", err) + } + + vtxoTapKey, err := schnorr.ParsePubKey(vtxoPublicKeyBytes) + if err != nil { + return "", fmt.Errorf("failed to parse vtxo pubkey: %s", err) + } + + // verify witness utxo + pkscript, err := common.P2TRScript(vtxoTapKey) + if err != nil { + return "", fmt.Errorf("failed to get pkscript: %s", err) + } + + if !bytes.Equal(input.WitnessUtxo.PkScript, pkscript) { + return "", fmt.Errorf("witness utxo script mismatch") + } + + if input.WitnessUtxo.Value != int64(vtxo.Amount) { + return "", fmt.Errorf("witness utxo value mismatch") + } + + ctrlBlock, err := txscript.ParseControlBlock(tapscript.ControlBlock) + if err != nil { + return "", fmt.Errorf("failed to parse control block: %s", err) + } + + ins = append(ins, common.VtxoInput{ + Outpoint: &outpoint, + Tapscript: &waddrmgr.Tapscript{ + ControlBlock: ctrlBlock, + RevealedScript: tapscript.Script, + }, + }) + } + + dust, err := s.wallet.GetDustAmount(ctx) + if err != nil { + return "", fmt.Errorf("failed to get dust threshold: %s", err) + } + + outputs := ptx.UnsignedTx.TxOut + + sumOfOutputs := int64(0) + for _, out := range outputs { + sumOfOutputs += out.Value + if out.Value < int64(dust) { + return "", fmt.Errorf("output value is less than dust threshold") + } + } + + fees := sumOfInputs - sumOfOutputs + if fees < 0 { + return "", fmt.Errorf("invalid fees, inputs are less than outputs") + } + + minFeeRate := s.wallet.MinRelayFeeRate(ctx) + + minFees, err := common.ComputeRedeemTxFee(chainfee.SatPerKVByte(minFeeRate), ins, len(outputs)) + if err != nil { + return "", fmt.Errorf("failed to compute min fees: %s", err) + } + + if fees < minFees { + return "", fmt.Errorf("min relay fee not met, %d < %d", fees, minFees) + } + + // recompute redeem tx + rebuiltRedeemTx, err := bitcointree.BuildRedeemTx(ins, outputs, fees) + if err != nil { + return "", fmt.Errorf("failed to rebuild redeem tx: %s", err) + } + + rebuiltPtx, err := psbt.NewFromRawBytes(strings.NewReader(rebuiltRedeemTx), true) + if err != nil { + return "", fmt.Errorf("failed to parse rebuilt redeem tx: %s", err) + } + + rebuiltTxid := rebuiltPtx.UnsignedTx.TxID() + redeemTxid := redeemPtx.UnsignedTx.TxID() + if rebuiltTxid != redeemTxid { + return "", fmt.Errorf("invalid redeem tx") + } + + // verify the tapscript signatures + if valid, err := s.builder.VerifyTapscriptPartialSigs(redeemTx); err != nil || !valid { + return "", fmt.Errorf("invalid tx signature: %s", err) + } + + if expiration == 0 { + return "", fmt.Errorf("no valid vtxo found") + } + + if roundTxid == "" { + return "", fmt.Errorf("no valid vtxo found") + } + + newVtxos := make([]domain.Vtxo, 0, len(redeemPtx.UnsignedTx.TxOut)) + + for outIndex, out := range outputs { vtxoTapKey, err := schnorr.ParsePubKey(out.PkScript[2:]) if err != nil { - return fmt.Errorf("failed to parse vtxo taproot key: %s", err) + return "", fmt.Errorf("failed to parse vtxo taproot key: %s", err) } vtxoPubkey := hex.EncodeToString(schnorr.SerializePubKey(vtxoTapKey)) - vtxos = append(vtxos, domain.Vtxo{ + newVtxos = append(newVtxos, domain.Vtxo{ VtxoKey: domain.VtxoKey{ Txid: redeemTxid, VOut: uint32(outIndex), }, Pubkey: vtxoPubkey, Amount: uint64(out.Value), - ExpireAt: asyncPayData.expireAt, - RoundTxid: asyncPayData.roundTxid, + ExpireAt: expiration, + RoundTxid: roundTxid, RedeemTx: redeemTx, CreatedAt: time.Now().Unix(), }) } - if err := s.repoManager.Vtxos().AddVtxos(ctx, vtxos); err != nil { - return fmt.Errorf("failed to add vtxos: %s", err) + // sign the redeem tx + + signedRedeemTx, err := s.wallet.SignTransactionTapscript(ctx, redeemTx, nil) + if err != nil { + return "", fmt.Errorf("failed to sign redeem tx: %s", err) } - log.Infof("added %d vtxos", len(vtxos)) - if err := s.startWatchingVtxos(vtxos); err != nil { + + // create new vtxos, update spent vtxos state + + if err := s.repoManager.Vtxos().AddVtxos(ctx, newVtxos); err != nil { + return "", fmt.Errorf("failed to add vtxos: %s", err) + } + log.Infof("added %d vtxos", len(newVtxos)) + if err := s.startWatchingVtxos(newVtxos); err != nil { log.WithError(err).Warn( "failed to start watching vtxos", ) } - log.Debugf("started watching %d vtxos", len(vtxos)) + log.Debugf("started watching %d vtxos", len(newVtxos)) - if err := s.repoManager.Vtxos().SpendVtxos(ctx, spentVtxos, redeemTxid); err != nil { - return fmt.Errorf("failed to spend vtxo: %s", err) + if err := s.repoManager.Vtxos().SpendVtxos(ctx, spentVtxoKeys, redeemTxid); err != nil { + return "", fmt.Errorf("failed to spend vtxo: %s", err) } log.Infof("spent %d vtxos", len(spentVtxos)) - delete(s.asyncPaymentsCache, redeemTxid) - go func() { s.transactionEventsCh <- RedeemTransactionEvent{ AsyncTxID: redeemTxid, - SpentVtxos: spentVtxos, - SpendableVtxos: vtxos, + SpentVtxos: spentVtxoKeys, + SpendableVtxos: newVtxos, } }() - return nil -} - -func (s *covenantlessService) CreateAsyncPayment( - ctx context.Context, inputs []AsyncPaymentInput, receivers []domain.Receiver, -) (string, error) { - vtxosKeys := make([]domain.VtxoKey, 0, len(inputs)) - scripts := make(map[domain.VtxoKey][]string) - forfeitLeaves := make(map[domain.VtxoKey]chainhash.Hash) - - for _, in := range inputs { - vtxosKeys = append(vtxosKeys, in.VtxoKey) - scripts[in.VtxoKey] = in.Tapscripts - forfeitLeaves[in.VtxoKey] = in.ForfeitLeafHash - } - - vtxos, err := s.repoManager.Vtxos().GetVtxos(ctx, vtxosKeys) - if err != nil { - return "", err - } - if len(vtxos) <= 0 { - return "", fmt.Errorf("vtxos not found") - } - - vtxosInputs := make([]domain.Vtxo, 0, len(inputs)) - - expiration := vtxos[0].ExpireAt - roundTxid := vtxos[0].RoundTxid - - for _, vtxo := range vtxos { - if vtxo.Spent { - return "", fmt.Errorf("all vtxos must be unspent") - } - - if vtxo.Redeemed { - return "", fmt.Errorf("all vtxos must be redeemed") - } - - if vtxo.Swept { - return "", fmt.Errorf("all vtxos must be swept") - } - - if vtxo.ExpireAt < expiration { - roundTxid = vtxo.RoundTxid - expiration = vtxo.ExpireAt - } - - vtxosInputs = append(vtxosInputs, vtxo) - } - - redeemTx, err := s.builder.BuildAsyncPaymentTransactions( - vtxosInputs, scripts, forfeitLeaves, receivers, - ) - if err != nil { - return "", fmt.Errorf("failed to build async payment txs: %s", err) - } - - redeemPtx, err := psbt.NewFromRawBytes(strings.NewReader(redeemTx), true) - if err != nil { - return "", fmt.Errorf("failed to parse redeem tx: %s", err) - } - - s.asyncPaymentsCache[redeemPtx.UnsignedTx.TxID()] = asyncPaymentData{ - receivers: receivers, - expireAt: expiration, - roundTxid: roundTxid, - } - - return redeemTx, nil + return signedRedeemTx, nil } func (s *covenantlessService) GetBoardingAddress( @@ -1798,12 +1827,6 @@ func findForfeitTxBitcoin( return "", fmt.Errorf("forfeit tx not found") } -type asyncPaymentData struct { - receivers []domain.Receiver - expireAt int64 - roundTxid string -} - // musigSigningSession holds the state of ephemeral nonces and signatures in order to coordinate the signing of the tree type musigSigningSession struct { lock sync.Mutex diff --git a/server/internal/core/application/types.go b/server/internal/core/application/types.go index e3f6a61..c8d7b0a 100644 --- a/server/internal/core/application/types.go +++ b/server/internal/core/application/types.go @@ -7,7 +7,6 @@ import ( "github.com/ark-network/ark/common/note" "github.com/ark-network/ark/server/internal/core/domain" "github.com/ark-network/ark/server/internal/core/ports" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec/secp256k1/v4" ) @@ -15,11 +14,6 @@ var ( paymentsThreshold = int64(128) ) -type AsyncPaymentInput struct { - ports.Input - ForfeitLeafHash chainhash.Hash -} - type Service interface { Start() error Stop() @@ -37,13 +31,7 @@ type Service interface { ctx context.Context, address string, ) (spendableVtxos, spentVtxos []domain.Vtxo, err error) GetInfo(ctx context.Context) (*ServiceInfo, error) - // Async payments - CreateAsyncPayment( - ctx context.Context, inputs []AsyncPaymentInput, receivers []domain.Receiver, - ) (string, error) - CompleteAsyncPayment( - ctx context.Context, redeemTx string, - ) error + SubmitRedeemTx(ctx context.Context, redeemTx string) (string, error) GetBoardingAddress( ctx context.Context, userPubkey *secp256k1.PublicKey, ) (address string, scripts []string, err error) @@ -72,7 +60,7 @@ type ServiceInfo struct { Network string Dust uint64 ForfeitAddress string - NextMarketHour *NextMarketHour + NextMarketHour *NextMarketHour } type NextMarketHour struct { diff --git a/server/internal/core/ports/tx_builder.go b/server/internal/core/ports/tx_builder.go index 53c195a..9df3bcb 100644 --- a/server/internal/core/ports/tx_builder.go +++ b/server/internal/core/ports/tx_builder.go @@ -52,12 +52,6 @@ type TxBuilder interface { VerifyTapscriptPartialSigs(tx string) (valid bool, err error) // FindLeaves returns all the leaves txs that are reachable from the given outpoint FindLeaves(congestionTree tree.CongestionTree, fromtxid string, vout uint32) (leaves []tree.Node, err error) - BuildAsyncPaymentTransactions( - vtxosToSpend []domain.Vtxo, - scripts map[domain.VtxoKey][]string, - forfeitsLeaves map[domain.VtxoKey]chainhash.Hash, - receivers []domain.Receiver, - ) (string, error) VerifyAndCombinePartialTx(dest string, src string) (string, error) GetTxID(tx string) (string, error) } diff --git a/server/internal/core/ports/wallet.go b/server/internal/core/ports/wallet.go index 17babcb..afa761d 100644 --- a/server/internal/core/ports/wallet.go +++ b/server/internal/core/ports/wallet.go @@ -27,7 +27,7 @@ type WalletService interface { SignTransaction( ctx context.Context, partialTx string, extractRawTx bool, ) (string, error) - SignTransactionTapscript(ctx context.Context, pset string, inputIndexes []int) (string, error) // inputIndexes == nil means sign all inputs + SignTransactionTapscript(ctx context.Context, partialTx string, inputIndexes []int) (string, error) // inputIndexes == nil means sign all inputs SelectUtxos(ctx context.Context, asset string, amount uint64) ([]TxInput, uint64, error) BroadcastTransaction(ctx context.Context, txHex string) (string, error) WaitForSync(ctx context.Context, txid string) error diff --git a/server/internal/infrastructure/tx-builder/covenant/builder.go b/server/internal/infrastructure/tx-builder/covenant/builder.go index 909d25a..996eaca 100644 --- a/server/internal/infrastructure/tx-builder/covenant/builder.go +++ b/server/internal/infrastructure/tx-builder/covenant/builder.go @@ -202,7 +202,7 @@ func (b *txBuilder) VerifyForfeitTxs(vtxos []domain.Vtxo, connectors []string, f vtxoTapscript := firstForfeit.Inputs[1].TapLeafScript[0] - minFee, err := common.ComputeForfeitMinRelayFee( + minFee, err := common.ComputeForfeitTxFee( minRate, &waddrmgr.Tapscript{ RevealedScript: vtxoTapscript.Script, @@ -669,15 +669,6 @@ func (b *txBuilder) FindLeaves( return foundLeaves, nil } -func (b *txBuilder) BuildAsyncPaymentTransactions( - _ []domain.Vtxo, - _ map[domain.VtxoKey][]string, - _ map[domain.VtxoKey]chainhash.Hash, - _ []domain.Receiver, -) (string, error) { - return "", fmt.Errorf("not implemented") -} - func (b *txBuilder) createPoolTx( sharedOutputAmount uint64, sharedOutputScript []byte, diff --git a/server/internal/infrastructure/tx-builder/covenantless/builder.go b/server/internal/infrastructure/tx-builder/covenantless/builder.go index e8c9db1..6cc3a99 100644 --- a/server/internal/infrastructure/tx-builder/covenantless/builder.go +++ b/server/internal/infrastructure/tx-builder/covenantless/builder.go @@ -22,8 +22,6 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcwallet/waddrmgr" "github.com/decred/dcrd/dcrec/secp256k1/v4" - "github.com/lightningnetwork/lnd/input" - "github.com/lightningnetwork/lnd/lntypes" ) type txBuilder struct { @@ -366,7 +364,7 @@ func (b *txBuilder) VerifyForfeitTxs(vtxos []domain.Vtxo, connectors []string, f return nil, err } - minFee, err := common.ComputeForfeitMinRelayFee( + minFee, err := common.ComputeForfeitTxFee( minRate, &waddrmgr.Tapscript{ RevealedScript: vtxoTapscript.Script, @@ -645,173 +643,6 @@ func (b *txBuilder) FindLeaves(congestionTree tree.CongestionTree, fromtxid stri return foundLeaves, nil } -func (b *txBuilder) BuildAsyncPaymentTransactions( - vtxos []domain.Vtxo, - scripts map[domain.VtxoKey][]string, - forfeitsLeaves map[domain.VtxoKey]chainhash.Hash, - receivers []domain.Receiver, -) (string, error) { - if len(vtxos) <= 0 { - return "", fmt.Errorf("missing vtxos") - } - - ins := make([]*wire.OutPoint, 0, len(vtxos)) - outs := make([]*wire.TxOut, 0, len(receivers)) - witnessUtxos := make(map[int]*wire.TxOut) - tapscripts := make(map[int]*psbt.TaprootTapLeafScript) - - redeemTxWeightEstimator := &input.TxWeightEstimator{} - for index, vtxo := range vtxos { - vtxoTapscripts, ok := scripts[vtxo.VtxoKey] - if !ok { - return "", fmt.Errorf("missing scripts for vtxo %s", vtxo.VtxoKey) - } - - forfeitLeafHash, ok := forfeitsLeaves[vtxo.VtxoKey] - if !ok { - return "", fmt.Errorf("missing forfeit leaf hash for vtxo %s", vtxo.VtxoKey) - } - - if vtxo.Spent || vtxo.Redeemed || vtxo.Swept { - return "", fmt.Errorf("all vtxos must be unspent") - } - - vtxoTxID, err := chainhash.NewHashFromStr(vtxo.Txid) - if err != nil { - return "", err - } - - vtxoOutpoint := &wire.OutPoint{ - Hash: *vtxoTxID, - Index: vtxo.VOut, - } - - vtxoScript, err := bitcointree.ParseVtxoScript(vtxoTapscripts) - if err != nil { - return "", err - } - - vtxoTapKey, vtxoTree, err := vtxoScript.TapTree() - if err != nil { - return "", err - } - - vtxoOutputScript, err := common.P2TRScript(vtxoTapKey) - if err != nil { - return "", err - } - - witnessUtxos[index] = &wire.TxOut{ - Value: int64(vtxo.Amount), - PkScript: vtxoOutputScript, - } - - leafProof, err := vtxoTree.GetTaprootMerkleProof(forfeitLeafHash) - if err != nil { - return "", err - } - - tapscripts[index] = &psbt.TaprootTapLeafScript{ - ControlBlock: leafProof.ControlBlock, - Script: leafProof.Script, - LeafVersion: txscript.BaseLeafVersion, - } - - ctrlBlock, err := txscript.ParseControlBlock(leafProof.ControlBlock) - if err != nil { - return "", err - } - - closure, err := tree.DecodeClosure(leafProof.Script) - if err != nil { - return "", err - } - - redeemTxWeightEstimator.AddTapscriptInput(lntypes.WeightUnit(closure.WitnessSize()), &waddrmgr.Tapscript{ - RevealedScript: leafProof.Script, - ControlBlock: ctrlBlock, - }) - - ins = append(ins, vtxoOutpoint) - } - - for range receivers { - redeemTxWeightEstimator.AddP2TROutput() - } - - redeemTxMinRelayFee, err := b.wallet.MinRelayFee(context.Background(), uint64(redeemTxWeightEstimator.VSize())) - if err != nil { - return "", err - } - - if redeemTxMinRelayFee >= receivers[len(receivers)-1].Amount { - return "", fmt.Errorf("redeem tx fee is higher than the amount of the change receiver") - } - - for i, receiver := range receivers { - if receiver.IsOnchain() { - return "", fmt.Errorf("receiver %d is onchain", i) - } - - pubkeyBytes, err := hex.DecodeString(receiver.Pubkey) - if err != nil { - return "", err - } - - pubkey, err := schnorr.ParsePubKey(pubkeyBytes) - if err != nil { - return "", err - } - - newVtxoScript, err := common.P2TRScript(pubkey) - if err != nil { - return "", err - } - - // Deduct the min relay fee from the very last receiver which is supposed - // to be the change in case it's not a send-all. - value := receiver.Amount - if i == len(receivers)-1 { - value -= redeemTxMinRelayFee - } - outs = append(outs, &wire.TxOut{ - Value: int64(value), - PkScript: newVtxoScript, - }) - } - - sequences := make([]uint32, len(ins)) - for i := range sequences { - sequences[i] = wire.MaxTxInSequenceNum - } - - redeemPtx, err := psbt.New( - ins, outs, 2, 0, sequences, - ) - if err != nil { - return "", err - } - - for i := range redeemPtx.Inputs { - redeemPtx.Inputs[i].WitnessUtxo = witnessUtxos[i] - redeemPtx.Inputs[i].TaprootLeafScript = []*psbt.TaprootTapLeafScript{tapscripts[i]} - } - - redeemTx, err := redeemPtx.B64Encode() - if err != nil { - return "", err - } - - signedRedeemTx, err := b.wallet.SignTransactionTapscript( - context.Background(), redeemTx, nil, - ) - if err != nil { - return "", err - } - - return signedRedeemTx, nil -} - // TODO use lnd CoinSelect to craft the pool tx func (b *txBuilder) createRoundTx( sharedOutputAmount int64, diff --git a/server/internal/interface/grpc/handlers/arkservice.go b/server/internal/interface/grpc/handlers/arkservice.go index a79d385..ae2a01e 100644 --- a/server/internal/interface/grpc/handlers/arkservice.go +++ b/server/internal/interface/grpc/handlers/arkservice.go @@ -3,11 +3,12 @@ package handlers import ( "context" "encoding/hex" - "google.golang.org/protobuf/types/known/durationpb" - "google.golang.org/protobuf/types/known/timestamppb" "fmt" "sync" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/timestamppb" + arkv1 "github.com/ark-network/ark/api-spec/protobuf/gen/ark/v1" "github.com/ark-network/ark/common/bitcointree" "github.com/ark-network/ark/common/descriptor" @@ -309,61 +310,25 @@ func (h *handler) Ping( return &arkv1.PingResponse{}, nil } -func (h *handler) CreatePayment( - ctx context.Context, req *arkv1.CreatePaymentRequest, -) (*arkv1.CreatePaymentResponse, error) { - inputs, err := parseAsyncPaymentInputs(req.GetInputs()) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) +func (h *handler) SubmitRedeemTx( + ctx context.Context, req *arkv1.SubmitRedeemTxRequest, +) (*arkv1.SubmitRedeemTxResponse, error) { + if req.GetRedeemTx() == "" { + return nil, status.Error(codes.InvalidArgument, "missing redeem tx") } - receivers, err := parseReceivers(req.GetOutputs()) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - for _, receiver := range receivers { - if receiver.Amount <= 0 { - return nil, status.Error(codes.InvalidArgument, "output amount must be greater than 0") - } - - if len(receiver.OnchainAddress) <= 0 && len(receiver.Pubkey) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing address") - } - - if receiver.IsOnchain() { - return nil, status.Error(codes.InvalidArgument, "onchain outputs are not supported as async payment destination") - } - } - - redeemTx, err := h.svc.CreateAsyncPayment( - ctx, inputs, receivers, + signedRedeemTx, err := h.svc.SubmitRedeemTx( + ctx, req.GetRedeemTx(), ) if err != nil { return nil, err } - return &arkv1.CreatePaymentResponse{ - SignedRedeemTx: redeemTx, + return &arkv1.SubmitRedeemTxResponse{ + SignedRedeemTx: signedRedeemTx, }, nil } -func (h *handler) CompletePayment( - ctx context.Context, req *arkv1.CompletePaymentRequest, -) (*arkv1.CompletePaymentResponse, error) { - if req.GetSignedRedeemTx() == "" { - return nil, status.Error(codes.InvalidArgument, "missing signed redeem tx") - } - - if err := h.svc.CompleteAsyncPayment( - ctx, req.GetSignedRedeemTx(), - ); err != nil { - return nil, err - } - - return &arkv1.CompletePaymentResponse{}, nil -} - func (h *handler) GetRound( ctx context.Context, req *arkv1.GetRoundRequest, ) (*arkv1.GetRoundResponse, error) { diff --git a/server/internal/interface/grpc/handlers/parser.go b/server/internal/interface/grpc/handlers/parser.go index e3231c8..246536c 100644 --- a/server/internal/interface/grpc/handlers/parser.go +++ b/server/internal/interface/grpc/handlers/parser.go @@ -12,7 +12,6 @@ import ( "github.com/ark-network/ark/server/internal/core/domain" "github.com/ark-network/ark/server/internal/core/ports" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" ) @@ -25,33 +24,6 @@ func parseAddress(addr string) (*common.Address, error) { return common.DecodeAddress(addr) } -func parseAsyncPaymentInputs(ins []*arkv1.AsyncPaymentInput) ([]application.AsyncPaymentInput, error) { - if len(ins) <= 0 { - return nil, fmt.Errorf("missing inputs") - } - - inputs := make([]application.AsyncPaymentInput, 0, len(ins)) - for _, input := range ins { - forfeitLeafHash, err := chainhash.NewHashFromStr(input.GetForfeitLeafHash()) - if err != nil { - return nil, fmt.Errorf("invalid forfeit leaf hash: %s", err) - } - - inputs = append(inputs, application.AsyncPaymentInput{ - Input: ports.Input{ - VtxoKey: domain.VtxoKey{ - Txid: input.GetInput().GetOutpoint().GetTxid(), - VOut: input.GetInput().GetOutpoint().GetVout(), - }, - Tapscripts: input.GetInput().GetTapscripts().GetScripts(), - }, - ForfeitLeafHash: *forfeitLeafHash, - }) - } - - return inputs, nil -} - func parseNotes(notes []string) ([]note.Note, error) { if len(notes) <= 0 { return nil, fmt.Errorf("missing notes") diff --git a/server/internal/interface/grpc/permissions/permissions.go b/server/internal/interface/grpc/permissions/permissions.go index ffd256f..a59b7f4 100644 --- a/server/internal/interface/grpc/permissions/permissions.go +++ b/server/internal/interface/grpc/permissions/permissions.go @@ -145,11 +145,7 @@ func Whitelist() map[string][]bakery.Op { Entity: EntityArk, Action: "read", }}, - fmt.Sprintf("/%s/CreatePayment", arkv1.ArkService_ServiceDesc.ServiceName): {{ - Entity: EntityArk, - Action: "write", - }}, - fmt.Sprintf("/%s/CompletePayment", arkv1.ArkService_ServiceDesc.ServiceName): {{ + fmt.Sprintf("/%s/SubmitRedeemTx", arkv1.ArkService_ServiceDesc.ServiceName): {{ Entity: EntityArk, Action: "write", }},