diff --git a/api-spec/openapi/swagger/ark/v1/service.swagger.json b/api-spec/openapi/swagger/ark/v1/service.swagger.json index d30026e..f65d2db 100644 --- a/api-spec/openapi/swagger/ark/v1/service.swagger.json +++ b/api-spec/openapi/swagger/ark/v1/service.swagger.json @@ -48,37 +48,6 @@ ] } }, - "/v1/events": { - "get": { - "operationId": "ArkService_GetEventStream", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/v1GetEventStreamResponse" - }, - "error": { - "$ref": "#/definitions/rpcStatus" - } - }, - "title": "Stream result of v1GetEventStreamResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "ArkService" - ] - } - }, "/v1/info": { "get": { "operationId": "ArkService_GetInfo", @@ -133,38 +102,6 @@ ] } }, - "/v1/payment/claim": { - "post": { - "operationId": "ArkService_ClaimPayment", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ClaimPaymentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ClaimPaymentRequest" - } - } - ], - "tags": [ - "ArkService" - ] - } - }, "/v1/payment/complete": { "post": { "operationId": "ArkService_CompletePayment", @@ -197,14 +134,45 @@ ] } }, - "/v1/payment/finalize": { - "post": { - "operationId": "ArkService_FinalizePayment", + "/v1/round/events": { + "get": { + "operationId": "ArkService_GetEventStream", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1GetEventStreamResponse" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1GetEventStreamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "ArkService" + ] + } + }, + "/v1/round/id/{id}": { + "get": { + "operationId": "ArkService_GetRoundById", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1FinalizePaymentResponse" + "$ref": "#/definitions/v1GetRoundByIdResponse" } }, "default": { @@ -216,12 +184,10 @@ }, "parameters": [ { - "name": "body", - "in": "body", + "name": "id", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/v1FinalizePaymentRequest" - } + "type": "string" } ], "tags": [ @@ -229,103 +195,7 @@ ] } }, - "/v1/payment/register": { - "post": { - "operationId": "ArkService_RegisterPayment", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1RegisterPaymentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1RegisterPaymentRequest" - } - } - ], - "tags": [ - "ArkService" - ] - } - }, - "/v1/payment/tree/nonces": { - "post": { - "operationId": "ArkService_SendTreeNonces", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1SendTreeNoncesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1SendTreeNoncesRequest" - } - } - ], - "tags": [ - "ArkService" - ] - } - }, - "/v1/payment/tree/signatures": { - "post": { - "operationId": "ArkService_SendTreeSignatures", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1SendTreeSignaturesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1SendTreeSignaturesRequest" - } - } - ], - "tags": [ - "ArkService" - ] - } - }, - "/v1/ping/{paymentId}": { + "/v1/round/ping/{paymentId}": { "get": { "operationId": "ArkService_Ping", "responses": { @@ -355,14 +225,14 @@ ] } }, - "/v1/round/id/{id}": { - "get": { - "operationId": "ArkService_GetRoundById", + "/v1/round/registerInputs": { + "post": { + "operationId": "ArkService_RegisterInputsForNextRound", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetRoundByIdResponse" + "$ref": "#/definitions/v1RegisterInputsForNextRoundResponse" } }, "default": { @@ -374,10 +244,140 @@ }, "parameters": [ { - "name": "id", - "in": "path", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/v1RegisterInputsForNextRoundRequest" + } + } + ], + "tags": [ + "ArkService" + ] + } + }, + "/v1/round/registerOutputs": { + "post": { + "operationId": "ArkService_RegisterOutputsForNextRound", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RegisterOutputsForNextRoundResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RegisterOutputsForNextRoundRequest" + } + } + ], + "tags": [ + "ArkService" + ] + } + }, + "/v1/round/submitForfeitTxs": { + "post": { + "operationId": "ArkService_SubmitSignedForfeitTxs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SubmitSignedForfeitTxsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SubmitSignedForfeitTxsRequest" + } + } + ], + "tags": [ + "ArkService" + ] + } + }, + "/v1/round/tree/submitNonces": { + "post": { + "operationId": "ArkService_SubmitTreeNonces", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SubmitTreeNoncesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SubmitTreeNoncesRequest" + } + } + ], + "tags": [ + "ArkService" + ] + } + }, + "/v1/round/tree/submitSignatures": { + "post": { + "operationId": "ArkService_SubmitTreeSignatures", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SubmitTreeSignaturesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SubmitTreeSignaturesRequest" + } } ], "tags": [ @@ -475,26 +475,6 @@ } } }, - "v1ClaimPaymentRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Mocks wabisabi's credentials." - }, - "outputs": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Output" - }, - "description": "List of receivers for a registered payment." - } - } - }, - "v1ClaimPaymentResponse": { - "type": "object" - }, "v1CompletePaymentRequest": { "type": "object", "properties": { @@ -546,25 +526,6 @@ } } }, - "v1FinalizePaymentRequest": { - "type": "object", - "properties": { - "signedForfeitTxs": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Forfeit txs signed by the user." - }, - "signedRoundTx": { - "type": "string", - "description": "If payment has boarding input, the user must sign the associated inputs." - } - } - }, - "v1FinalizePaymentResponse": { - "type": "object" - }, "v1GetBoardingAddressRequest": { "type": "object", "properties": { @@ -632,6 +593,12 @@ "boardingDescriptorTemplate": { "type": "string" }, + "vtxoDescriptorTemplates": { + "type": "array", + "items": { + "type": "string" + } + }, "forfeitAddress": { "type": "string" } @@ -714,16 +681,15 @@ "properties": { "address": { "type": "string", - "title": "onchain" - }, - "descriptor": { - "type": "string", - "title": "offchain" + "title": "onchain or off-chain" }, "amount": { "type": "string", "format": "uint64", "description": "Amount to send in satoshis." + }, + "descriptor": { + "type": "string" } } }, @@ -761,7 +727,7 @@ } } }, - "v1RegisterPaymentRequest": { + "v1RegisterInputsForNextRoundRequest": { "type": "object", "properties": { "inputs": { @@ -776,15 +742,35 @@ } } }, - "v1RegisterPaymentResponse": { + "v1RegisterInputsForNextRoundResponse": { "type": "object", "properties": { "id": { "type": "string", - "description": "Mocks wabisabi's credentials." + "description": "Mocks wabisabi's blinded credentials." } } }, + "v1RegisterOutputsForNextRoundRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Mocks wabisabi's blinded credentials." + }, + "outputs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Output" + }, + "description": "List of receivers for a registered payment." + } + } + }, + "v1RegisterOutputsForNextRoundResponse": { + "type": "object" + }, "v1Round": { "type": "object", "properties": { @@ -910,7 +896,26 @@ ], "default": "ROUND_STAGE_UNSPECIFIED" }, - "v1SendTreeNoncesRequest": { + "v1SubmitSignedForfeitTxsRequest": { + "type": "object", + "properties": { + "signedForfeitTxs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Forfeit txs signed by the user." + }, + "signedRoundTx": { + "type": "string", + "description": "If payment has boarding input, the user must sign the associated inputs." + } + } + }, + "v1SubmitSignedForfeitTxsResponse": { + "type": "object" + }, + "v1SubmitTreeNoncesRequest": { "type": "object", "properties": { "roundId": { @@ -924,10 +929,10 @@ } } }, - "v1SendTreeNoncesResponse": { + "v1SubmitTreeNoncesResponse": { "type": "object" }, - "v1SendTreeSignaturesRequest": { + "v1SubmitTreeSignaturesRequest": { "type": "object", "properties": { "roundId": { @@ -941,7 +946,7 @@ } } }, - "v1SendTreeSignaturesResponse": { + "v1SubmitTreeSignaturesResponse": { "type": "object" }, "v1Tree": { diff --git a/api-spec/protobuf/ark/v1/service.proto b/api-spec/protobuf/ark/v1/service.proto index 4eac4bf..a37c205 100755 --- a/api-spec/protobuf/ark/v1/service.proto +++ b/api-spec/protobuf/ark/v1/service.proto @@ -5,61 +5,6 @@ package ark.v1; import "google/api/annotations.proto"; service ArkService { - rpc RegisterPayment(RegisterPaymentRequest) returns (RegisterPaymentResponse) { - option (google.api.http) = { - post: "/v1/payment/register" - body: "*" - }; - }; - rpc ClaimPayment(ClaimPaymentRequest) returns (ClaimPaymentResponse) { - option (google.api.http) = { - post: "/v1/payment/claim" - body: "*" - }; - }; - rpc SendTreeNonces(SendTreeNoncesRequest) returns (SendTreeNoncesResponse) { - option (google.api.http) = { - post: "/v1/payment/tree/nonces" - body: "*" - }; - } - rpc SendTreeSignatures(SendTreeSignaturesRequest) returns (SendTreeSignaturesResponse) { - option (google.api.http) = { - post: "/v1/payment/tree/signatures" - body: "*" - }; - } - rpc FinalizePayment(FinalizePaymentRequest) returns (FinalizePaymentResponse) { - option (google.api.http) = { - post: "/v1/payment/finalize" - body: "*" - }; - }; - rpc GetRound(GetRoundRequest) returns (GetRoundResponse) { - option (google.api.http) = { - get: "/v1/round/{txid}" - }; - }; - rpc GetRoundById(GetRoundByIdRequest) returns (GetRoundByIdResponse) { - option (google.api.http) = { - get: "/v1/round/id/{id}" - }; - }; - rpc GetEventStream(GetEventStreamRequest) returns (stream GetEventStreamResponse) { - option (google.api.http) = { - get: "/v1/events" - }; - }; - rpc Ping(PingRequest) returns (PingResponse) { - option (google.api.http) = { - get: "/v1/ping/{payment_id}" - }; - }; - rpc ListVtxos(ListVtxosRequest) returns (ListVtxosResponse) { - option (google.api.http) = { - get: "/v1/vtxos/{address}" - }; - } rpc GetInfo(GetInfoRequest) returns (GetInfoResponse) { option (google.api.http) = { get: "/v1/info" @@ -71,6 +16,52 @@ service ArkService { body: "*" }; }; + + /* In-Round Payment APIs */ + + rpc RegisterInputsForNextRound(RegisterInputsForNextRoundRequest) returns (RegisterInputsForNextRoundResponse) { + option (google.api.http) = { + post: "/v1/round/registerInputs" + body: "*" + }; + }; + rpc RegisterOutputsForNextRound(RegisterOutputsForNextRoundRequest) returns (RegisterOutputsForNextRoundResponse) { + option (google.api.http) = { + post: "/v1/round/registerOutputs" + body: "*" + }; + }; + rpc SubmitTreeNonces(SubmitTreeNoncesRequest) returns (SubmitTreeNoncesResponse) { + option (google.api.http) = { + post: "/v1/round/tree/submitNonces" + body: "*" + }; + } + rpc SubmitTreeSignatures(SubmitTreeSignaturesRequest) returns (SubmitTreeSignaturesResponse) { + option (google.api.http) = { + post: "/v1/round/tree/submitSignatures" + body: "*" + }; + } + rpc SubmitSignedForfeitTxs(SubmitSignedForfeitTxsRequest) returns (SubmitSignedForfeitTxsResponse) { + option (google.api.http) = { + post: "/v1/round/submitForfeitTxs" + body: "*" + }; + }; + rpc GetEventStream(GetEventStreamRequest) returns (stream GetEventStreamResponse) { + option (google.api.http) = { + get: "/v1/round/events" + }; + }; + rpc Ping(PingRequest) returns (PingResponse) { + option (google.api.http) = { + get: "/v1/round/ping/{payment_id}" + }; + }; + + /* Async Payment APIs */ + rpc CreatePayment(CreatePaymentRequest) returns (CreatePaymentResponse) { option (google.api.http) = { post: "/v1/payment" @@ -83,70 +74,87 @@ service ArkService { body: "*" }; } + + /* Explorer-like APIs */ + + rpc GetRound(GetRoundRequest) returns (GetRoundResponse) { + option (google.api.http) = { + get: "/v1/round/{txid}" + }; + }; + rpc GetRoundById(GetRoundByIdRequest) returns (GetRoundByIdResponse) { + option (google.api.http) = { + get: "/v1/round/id/{id}" + }; + }; + rpc ListVtxos(ListVtxosRequest) returns (ListVtxosResponse) { + option (google.api.http) = { + get: "/v1/vtxos/{address}" + }; + } } -message CreatePaymentRequest { - repeated Input inputs = 1; - repeated Output outputs = 2; +message GetInfoRequest {} +message GetInfoResponse { + string pubkey = 1; + int64 round_lifetime = 2; + int64 unilateral_exit_delay = 3; + int64 round_interval = 4; + string network = 5; + int64 dust = 6; + string boarding_descriptor_template = 7; + repeated string vtxo_descriptor_templates = 8; + string forfeit_address = 9; } -message CreatePaymentResponse { - string signed_redeem_tx = 1; // signed only by the ASP - repeated string usigned_unconditional_forfeit_txs = 2; -} - -message CompletePaymentRequest { - string signed_redeem_tx = 1; - repeated string signed_unconditional_forfeit_txs = 2; -} -message CompletePaymentResponse {} message GetBoardingAddressRequest { string pubkey = 1; } - message GetBoardingAddressResponse { string address = 1; string descriptor = 2; } -message RegisterPaymentRequest { +/* In-Round Payment API messages */ + +message RegisterInputsForNextRoundRequest { repeated Input inputs = 1; optional string ephemeral_pubkey = 2; } -message RegisterPaymentResponse { - // Mocks wabisabi's credentials. +message RegisterInputsForNextRoundResponse { + // Mocks wabisabi's blinded credentials. string id = 1; } -message ClaimPaymentRequest { - // Mocks wabisabi's credentials. +message RegisterOutputsForNextRoundRequest { + // Mocks wabisabi's blinded credentials. string id = 1; // List of receivers for a registered payment. repeated Output outputs = 2; } -message ClaimPaymentResponse {} +message RegisterOutputsForNextRoundResponse {} -message FinalizePaymentRequest { +message SubmitTreeNoncesRequest { + string round_id = 1; + string public_key = 2; + string tree_nonces = 3; +} +message SubmitTreeNoncesResponse {} + +message SubmitTreeSignaturesRequest { + string round_id = 1; + string public_key = 2; + string tree_signatures = 3; +} +message SubmitTreeSignaturesResponse {} + +message SubmitSignedForfeitTxsRequest { // Forfeit txs signed by the user. repeated string signed_forfeit_txs = 1; // If payment has boarding input, the user must sign the associated inputs. optional string signed_round_tx = 2; } -message FinalizePaymentResponse {} - -message GetRoundRequest { - string txid = 1; -} -message GetRoundResponse { - Round round = 1; -} - -message GetRoundByIdRequest { - string id = 1; -} -message GetRoundByIdResponse { - Round round = 1; -} +message SubmitSignedForfeitTxsResponse {} message GetEventStreamRequest {} message GetEventStreamResponse { @@ -172,6 +180,39 @@ message PingResponse { } } +/* Async Payment API messages */ + +message CreatePaymentRequest { + repeated Input inputs = 1; + repeated Output outputs = 2; +} +message CreatePaymentResponse { + string signed_redeem_tx = 1; // signed only by the ASP + repeated string usigned_unconditional_forfeit_txs = 2; +} + +message CompletePaymentRequest { + string signed_redeem_tx = 1; + repeated string signed_unconditional_forfeit_txs = 2; +} +message CompletePaymentResponse {} + +/* Explorer-like API messages */ + +message GetRoundRequest { + string txid = 1; +} +message GetRoundResponse { + Round round = 1; +} + +message GetRoundByIdRequest { + string id = 1; +} +message GetRoundByIdResponse { + Round round = 1; +} + message ListVtxosRequest { string address = 1; } @@ -180,19 +221,7 @@ message ListVtxosResponse { repeated Vtxo spent_vtxos = 2; } -message GetInfoRequest {} -message GetInfoResponse { - string pubkey = 1; - int64 round_lifetime = 2; - int64 unilateral_exit_delay = 3; - int64 round_interval = 4; - string network = 5; - int64 dust = 6; - string boarding_descriptor_template = 7; - string forfeit_address = 8; -} - -// EVENT TYPES +/* Events */ message RoundFinalizationEvent { string id = 1; @@ -224,7 +253,7 @@ message RoundSigningNoncesGeneratedEvent { string tree_nonces = 2; } -// TYPES +/* Types */ enum RoundStage { ROUND_STAGE_UNSPECIFIED = 0; @@ -256,12 +285,9 @@ message Input { } message Output { - oneof destination { - string address = 1; // onchain - string descriptor = 2; // offchain - } - // Amount to send in satoshis. - uint64 amount = 3; + string address = 1; // onchain or off-chain + uint64 amount = 2; // Amount to send in satoshis. + string descriptor = 3; } message Tree { @@ -295,19 +321,3 @@ message PendingPayment { string redeem_tx = 1; repeated string unconditional_forfeit_txs =2; } - -message SendTreeNoncesRequest { - string round_id = 1; - string public_key = 2; - string tree_nonces = 3; -} - -message SendTreeNoncesResponse {} - -message SendTreeSignaturesRequest { - string round_id = 1; - string public_key = 2; - string tree_signatures = 3; -} - -message SendTreeSignaturesResponse {} \ No newline at end of file diff --git a/api-spec/protobuf/gen/ark/v1/service.pb.go b/api-spec/protobuf/gen/ark/v1/service.pb.go index e5e10e7..6d3a80a 100644 --- a/api-spec/protobuf/gen/ark/v1/service.pb.go +++ b/api-spec/protobuf/gen/ark/v1/service.pb.go @@ -76,17 +76,14 @@ func (RoundStage) EnumDescriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{0} } -type CreatePaymentRequest struct { +type GetInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Inputs []*Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` - Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` } -func (x *CreatePaymentRequest) Reset() { - *x = CreatePaymentRequest{} +func (x *GetInfoRequest) Reset() { + *x = GetInfoRequest{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -94,13 +91,13 @@ func (x *CreatePaymentRequest) Reset() { } } -func (x *CreatePaymentRequest) String() string { +func (x *GetInfoRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatePaymentRequest) ProtoMessage() {} +func (*GetInfoRequest) ProtoMessage() {} -func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message { +func (x *GetInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -112,36 +109,29 @@ func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatePaymentRequest.ProtoReflect.Descriptor instead. -func (*CreatePaymentRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead. +func (*GetInfoRequest) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{0} } -func (x *CreatePaymentRequest) GetInputs() []*Input { - if x != nil { - return x.Inputs - } - return nil -} - -func (x *CreatePaymentRequest) GetOutputs() []*Output { - if x != nil { - return x.Outputs - } - return nil -} - -type CreatePaymentResponse struct { +type GetInfoResponse 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 - UsignedUnconditionalForfeitTxs []string `protobuf:"bytes,2,rep,name=usigned_unconditional_forfeit_txs,json=usignedUnconditionalForfeitTxs,proto3" json:"usigned_unconditional_forfeit_txs,omitempty"` + Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + RoundLifetime int64 `protobuf:"varint,2,opt,name=round_lifetime,json=roundLifetime,proto3" json:"round_lifetime,omitempty"` + UnilateralExitDelay int64 `protobuf:"varint,3,opt,name=unilateral_exit_delay,json=unilateralExitDelay,proto3" json:"unilateral_exit_delay,omitempty"` + RoundInterval int64 `protobuf:"varint,4,opt,name=round_interval,json=roundInterval,proto3" json:"round_interval,omitempty"` + Network string `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"` + Dust int64 `protobuf:"varint,6,opt,name=dust,proto3" json:"dust,omitempty"` + BoardingDescriptorTemplate string `protobuf:"bytes,7,opt,name=boarding_descriptor_template,json=boardingDescriptorTemplate,proto3" json:"boarding_descriptor_template,omitempty"` + VtxoDescriptorTemplates []string `protobuf:"bytes,8,rep,name=vtxo_descriptor_templates,json=vtxoDescriptorTemplates,proto3" json:"vtxo_descriptor_templates,omitempty"` + ForfeitAddress string `protobuf:"bytes,9,opt,name=forfeit_address,json=forfeitAddress,proto3" json:"forfeit_address,omitempty"` } -func (x *CreatePaymentResponse) Reset() { - *x = CreatePaymentResponse{} +func (x *GetInfoResponse) Reset() { + *x = GetInfoResponse{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -149,13 +139,13 @@ func (x *CreatePaymentResponse) Reset() { } } -func (x *CreatePaymentResponse) String() string { +func (x *GetInfoResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatePaymentResponse) ProtoMessage() {} +func (*GetInfoResponse) ProtoMessage() {} -func (x *CreatePaymentResponse) ProtoReflect() protoreflect.Message { +func (x *GetInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -167,116 +157,72 @@ func (x *CreatePaymentResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatePaymentResponse.ProtoReflect.Descriptor instead. -func (*CreatePaymentResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead. +func (*GetInfoResponse) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{1} } -func (x *CreatePaymentResponse) GetSignedRedeemTx() string { +func (x *GetInfoResponse) GetPubkey() string { if x != nil { - return x.SignedRedeemTx + return x.Pubkey } return "" } -func (x *CreatePaymentResponse) GetUsignedUnconditionalForfeitTxs() []string { +func (x *GetInfoResponse) GetRoundLifetime() int64 { if x != nil { - return x.UsignedUnconditionalForfeitTxs + return x.RoundLifetime } - return nil + return 0 } -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"` - SignedUnconditionalForfeitTxs []string `protobuf:"bytes,2,rep,name=signed_unconditional_forfeit_txs,json=signedUnconditionalForfeitTxs,proto3" json:"signed_unconditional_forfeit_txs,omitempty"` -} - -func (x *CompletePaymentRequest) Reset() { - *x = CompletePaymentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[2] - 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[2] - 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{2} -} - -func (x *CompletePaymentRequest) GetSignedRedeemTx() string { +func (x *GetInfoResponse) GetUnilateralExitDelay() int64 { if x != nil { - return x.SignedRedeemTx + return x.UnilateralExitDelay + } + return 0 +} + +func (x *GetInfoResponse) GetRoundInterval() int64 { + if x != nil { + return x.RoundInterval + } + return 0 +} + +func (x *GetInfoResponse) GetNetwork() string { + if x != nil { + return x.Network } return "" } -func (x *CompletePaymentRequest) GetSignedUnconditionalForfeitTxs() []string { +func (x *GetInfoResponse) GetDust() int64 { if x != nil { - return x.SignedUnconditionalForfeitTxs + return x.Dust + } + return 0 +} + +func (x *GetInfoResponse) GetBoardingDescriptorTemplate() string { + if x != nil { + return x.BoardingDescriptorTemplate + } + return "" +} + +func (x *GetInfoResponse) GetVtxoDescriptorTemplates() []string { + if x != nil { + return x.VtxoDescriptorTemplates } return nil } -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[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *GetInfoResponse) GetForfeitAddress() string { + if x != nil { + return x.ForfeitAddress } -} - -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[3] - 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{3} + return "" } type GetBoardingAddressRequest struct { @@ -290,7 +236,7 @@ type GetBoardingAddressRequest struct { func (x *GetBoardingAddressRequest) Reset() { *x = GetBoardingAddressRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[4] + mi := &file_ark_v1_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -303,7 +249,7 @@ func (x *GetBoardingAddressRequest) String() string { func (*GetBoardingAddressRequest) ProtoMessage() {} func (x *GetBoardingAddressRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[4] + mi := &file_ark_v1_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -316,7 +262,7 @@ func (x *GetBoardingAddressRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBoardingAddressRequest.ProtoReflect.Descriptor instead. func (*GetBoardingAddressRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{4} + return file_ark_v1_service_proto_rawDescGZIP(), []int{2} } func (x *GetBoardingAddressRequest) GetPubkey() string { @@ -338,7 +284,7 @@ type GetBoardingAddressResponse struct { func (x *GetBoardingAddressResponse) Reset() { *x = GetBoardingAddressResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[5] + mi := &file_ark_v1_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -351,7 +297,7 @@ func (x *GetBoardingAddressResponse) String() string { func (*GetBoardingAddressResponse) ProtoMessage() {} func (x *GetBoardingAddressResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[5] + mi := &file_ark_v1_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -364,7 +310,7 @@ func (x *GetBoardingAddressResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBoardingAddressResponse.ProtoReflect.Descriptor instead. func (*GetBoardingAddressResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{5} + return file_ark_v1_service_proto_rawDescGZIP(), []int{3} } func (x *GetBoardingAddressResponse) GetAddress() string { @@ -381,7 +327,7 @@ func (x *GetBoardingAddressResponse) GetDescriptor_() string { return "" } -type RegisterPaymentRequest struct { +type RegisterInputsForNextRoundRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -390,8 +336,113 @@ type RegisterPaymentRequest struct { EphemeralPubkey *string `protobuf:"bytes,2,opt,name=ephemeral_pubkey,json=ephemeralPubkey,proto3,oneof" json:"ephemeral_pubkey,omitempty"` } -func (x *RegisterPaymentRequest) Reset() { - *x = RegisterPaymentRequest{} +func (x *RegisterInputsForNextRoundRequest) Reset() { + *x = RegisterInputsForNextRoundRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterInputsForNextRoundRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterInputsForNextRoundRequest) ProtoMessage() {} + +func (x *RegisterInputsForNextRoundRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[4] + 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 RegisterInputsForNextRoundRequest.ProtoReflect.Descriptor instead. +func (*RegisterInputsForNextRoundRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *RegisterInputsForNextRoundRequest) GetInputs() []*Input { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *RegisterInputsForNextRoundRequest) GetEphemeralPubkey() string { + if x != nil && x.EphemeralPubkey != nil { + return *x.EphemeralPubkey + } + return "" +} + +type RegisterInputsForNextRoundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mocks wabisabi's blinded credentials. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *RegisterInputsForNextRoundResponse) Reset() { + *x = RegisterInputsForNextRoundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterInputsForNextRoundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterInputsForNextRoundResponse) ProtoMessage() {} + +func (x *RegisterInputsForNextRoundResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[5] + 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 RegisterInputsForNextRoundResponse.ProtoReflect.Descriptor instead. +func (*RegisterInputsForNextRoundResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *RegisterInputsForNextRoundResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type RegisterOutputsForNextRoundRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mocks wabisabi's blinded credentials. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // List of receivers for a registered payment. + Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` +} + +func (x *RegisterOutputsForNextRoundRequest) Reset() { + *x = RegisterOutputsForNextRoundRequest{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -399,13 +450,13 @@ func (x *RegisterPaymentRequest) Reset() { } } -func (x *RegisterPaymentRequest) String() string { +func (x *RegisterOutputsForNextRoundRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RegisterPaymentRequest) ProtoMessage() {} +func (*RegisterOutputsForNextRoundRequest) ProtoMessage() {} -func (x *RegisterPaymentRequest) ProtoReflect() protoreflect.Message { +func (x *RegisterOutputsForNextRoundRequest) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -417,36 +468,33 @@ func (x *RegisterPaymentRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RegisterPaymentRequest.ProtoReflect.Descriptor instead. -func (*RegisterPaymentRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use RegisterOutputsForNextRoundRequest.ProtoReflect.Descriptor instead. +func (*RegisterOutputsForNextRoundRequest) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{6} } -func (x *RegisterPaymentRequest) GetInputs() []*Input { +func (x *RegisterOutputsForNextRoundRequest) GetId() string { if x != nil { - return x.Inputs - } - return nil -} - -func (x *RegisterPaymentRequest) GetEphemeralPubkey() string { - if x != nil && x.EphemeralPubkey != nil { - return *x.EphemeralPubkey + return x.Id } return "" } -type RegisterPaymentResponse struct { +func (x *RegisterOutputsForNextRoundRequest) GetOutputs() []*Output { + if x != nil { + return x.Outputs + } + return nil +} + +type RegisterOutputsForNextRoundResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // Mocks wabisabi's credentials. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *RegisterPaymentResponse) Reset() { - *x = RegisterPaymentResponse{} +func (x *RegisterOutputsForNextRoundResponse) Reset() { + *x = RegisterOutputsForNextRoundResponse{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -454,13 +502,13 @@ func (x *RegisterPaymentResponse) Reset() { } } -func (x *RegisterPaymentResponse) String() string { +func (x *RegisterOutputsForNextRoundResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RegisterPaymentResponse) ProtoMessage() {} +func (*RegisterOutputsForNextRoundResponse) ProtoMessage() {} -func (x *RegisterPaymentResponse) ProtoReflect() protoreflect.Message { +func (x *RegisterOutputsForNextRoundResponse) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -472,31 +520,23 @@ func (x *RegisterPaymentResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RegisterPaymentResponse.ProtoReflect.Descriptor instead. -func (*RegisterPaymentResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use RegisterOutputsForNextRoundResponse.ProtoReflect.Descriptor instead. +func (*RegisterOutputsForNextRoundResponse) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{7} } -func (x *RegisterPaymentResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ClaimPaymentRequest struct { +type SubmitTreeNoncesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Mocks wabisabi's credentials. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // List of receivers for a registered payment. - Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` + RoundId string `protobuf:"bytes,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + TreeNonces string `protobuf:"bytes,3,opt,name=tree_nonces,json=treeNonces,proto3" json:"tree_nonces,omitempty"` } -func (x *ClaimPaymentRequest) Reset() { - *x = ClaimPaymentRequest{} +func (x *SubmitTreeNoncesRequest) Reset() { + *x = SubmitTreeNoncesRequest{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -504,13 +544,13 @@ func (x *ClaimPaymentRequest) Reset() { } } -func (x *ClaimPaymentRequest) String() string { +func (x *SubmitTreeNoncesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ClaimPaymentRequest) ProtoMessage() {} +func (*SubmitTreeNoncesRequest) ProtoMessage() {} -func (x *ClaimPaymentRequest) ProtoReflect() protoreflect.Message { +func (x *SubmitTreeNoncesRequest) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -522,33 +562,40 @@ func (x *ClaimPaymentRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ClaimPaymentRequest.ProtoReflect.Descriptor instead. -func (*ClaimPaymentRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitTreeNoncesRequest.ProtoReflect.Descriptor instead. +func (*SubmitTreeNoncesRequest) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{8} } -func (x *ClaimPaymentRequest) GetId() string { +func (x *SubmitTreeNoncesRequest) GetRoundId() string { if x != nil { - return x.Id + return x.RoundId } return "" } -func (x *ClaimPaymentRequest) GetOutputs() []*Output { +func (x *SubmitTreeNoncesRequest) GetPublicKey() string { if x != nil { - return x.Outputs + return x.PublicKey } - return nil + return "" } -type ClaimPaymentResponse struct { +func (x *SubmitTreeNoncesRequest) GetTreeNonces() string { + if x != nil { + return x.TreeNonces + } + return "" +} + +type SubmitTreeNoncesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *ClaimPaymentResponse) Reset() { - *x = ClaimPaymentResponse{} +func (x *SubmitTreeNoncesResponse) Reset() { + *x = SubmitTreeNoncesResponse{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -556,13 +603,13 @@ func (x *ClaimPaymentResponse) Reset() { } } -func (x *ClaimPaymentResponse) String() string { +func (x *SubmitTreeNoncesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ClaimPaymentResponse) ProtoMessage() {} +func (*SubmitTreeNoncesResponse) ProtoMessage() {} -func (x *ClaimPaymentResponse) ProtoReflect() protoreflect.Message { +func (x *SubmitTreeNoncesResponse) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -574,24 +621,23 @@ func (x *ClaimPaymentResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ClaimPaymentResponse.ProtoReflect.Descriptor instead. -func (*ClaimPaymentResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitTreeNoncesResponse.ProtoReflect.Descriptor instead. +func (*SubmitTreeNoncesResponse) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{9} } -type FinalizePaymentRequest struct { +type SubmitTreeSignaturesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Forfeit txs signed by the user. - SignedForfeitTxs []string `protobuf:"bytes,1,rep,name=signed_forfeit_txs,json=signedForfeitTxs,proto3" json:"signed_forfeit_txs,omitempty"` - // If payment has boarding input, the user must sign the associated inputs. - SignedRoundTx *string `protobuf:"bytes,2,opt,name=signed_round_tx,json=signedRoundTx,proto3,oneof" json:"signed_round_tx,omitempty"` + RoundId string `protobuf:"bytes,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + TreeSignatures string `protobuf:"bytes,3,opt,name=tree_signatures,json=treeSignatures,proto3" json:"tree_signatures,omitempty"` } -func (x *FinalizePaymentRequest) Reset() { - *x = FinalizePaymentRequest{} +func (x *SubmitTreeSignaturesRequest) Reset() { + *x = SubmitTreeSignaturesRequest{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -599,13 +645,13 @@ func (x *FinalizePaymentRequest) Reset() { } } -func (x *FinalizePaymentRequest) String() string { +func (x *SubmitTreeSignaturesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FinalizePaymentRequest) ProtoMessage() {} +func (*SubmitTreeSignaturesRequest) ProtoMessage() {} -func (x *FinalizePaymentRequest) ProtoReflect() protoreflect.Message { +func (x *SubmitTreeSignaturesRequest) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -617,33 +663,40 @@ func (x *FinalizePaymentRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FinalizePaymentRequest.ProtoReflect.Descriptor instead. -func (*FinalizePaymentRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitTreeSignaturesRequest.ProtoReflect.Descriptor instead. +func (*SubmitTreeSignaturesRequest) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{10} } -func (x *FinalizePaymentRequest) GetSignedForfeitTxs() []string { +func (x *SubmitTreeSignaturesRequest) GetRoundId() string { if x != nil { - return x.SignedForfeitTxs - } - return nil -} - -func (x *FinalizePaymentRequest) GetSignedRoundTx() string { - if x != nil && x.SignedRoundTx != nil { - return *x.SignedRoundTx + return x.RoundId } return "" } -type FinalizePaymentResponse struct { +func (x *SubmitTreeSignaturesRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *SubmitTreeSignaturesRequest) GetTreeSignatures() string { + if x != nil { + return x.TreeSignatures + } + return "" +} + +type SubmitTreeSignaturesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *FinalizePaymentResponse) Reset() { - *x = FinalizePaymentResponse{} +func (x *SubmitTreeSignaturesResponse) Reset() { + *x = SubmitTreeSignaturesResponse{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -651,13 +704,13 @@ func (x *FinalizePaymentResponse) Reset() { } } -func (x *FinalizePaymentResponse) String() string { +func (x *SubmitTreeSignaturesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FinalizePaymentResponse) ProtoMessage() {} +func (*SubmitTreeSignaturesResponse) ProtoMessage() {} -func (x *FinalizePaymentResponse) ProtoReflect() protoreflect.Message { +func (x *SubmitTreeSignaturesResponse) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -669,21 +722,24 @@ func (x *FinalizePaymentResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FinalizePaymentResponse.ProtoReflect.Descriptor instead. -func (*FinalizePaymentResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitTreeSignaturesResponse.ProtoReflect.Descriptor instead. +func (*SubmitTreeSignaturesResponse) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{11} } -type GetRoundRequest struct { +type SubmitSignedForfeitTxsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` + // Forfeit txs signed by the user. + SignedForfeitTxs []string `protobuf:"bytes,1,rep,name=signed_forfeit_txs,json=signedForfeitTxs,proto3" json:"signed_forfeit_txs,omitempty"` + // If payment has boarding input, the user must sign the associated inputs. + SignedRoundTx *string `protobuf:"bytes,2,opt,name=signed_round_tx,json=signedRoundTx,proto3,oneof" json:"signed_round_tx,omitempty"` } -func (x *GetRoundRequest) Reset() { - *x = GetRoundRequest{} +func (x *SubmitSignedForfeitTxsRequest) Reset() { + *x = SubmitSignedForfeitTxsRequest{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -691,13 +747,13 @@ func (x *GetRoundRequest) Reset() { } } -func (x *GetRoundRequest) String() string { +func (x *SubmitSignedForfeitTxsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetRoundRequest) ProtoMessage() {} +func (*SubmitSignedForfeitTxsRequest) ProtoMessage() {} -func (x *GetRoundRequest) ProtoReflect() protoreflect.Message { +func (x *SubmitSignedForfeitTxsRequest) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -709,28 +765,33 @@ func (x *GetRoundRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetRoundRequest.ProtoReflect.Descriptor instead. -func (*GetRoundRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitSignedForfeitTxsRequest.ProtoReflect.Descriptor instead. +func (*SubmitSignedForfeitTxsRequest) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{12} } -func (x *GetRoundRequest) GetTxid() string { +func (x *SubmitSignedForfeitTxsRequest) GetSignedForfeitTxs() []string { if x != nil { - return x.Txid + return x.SignedForfeitTxs + } + return nil +} + +func (x *SubmitSignedForfeitTxsRequest) GetSignedRoundTx() string { + if x != nil && x.SignedRoundTx != nil { + return *x.SignedRoundTx } return "" } -type GetRoundResponse struct { +type SubmitSignedForfeitTxsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Round *Round `protobuf:"bytes,1,opt,name=round,proto3" json:"round,omitempty"` } -func (x *GetRoundResponse) Reset() { - *x = GetRoundResponse{} +func (x *SubmitSignedForfeitTxsResponse) Reset() { + *x = SubmitSignedForfeitTxsResponse{} if protoimpl.UnsafeEnabled { mi := &file_ark_v1_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -738,13 +799,13 @@ func (x *GetRoundResponse) Reset() { } } -func (x *GetRoundResponse) String() string { +func (x *SubmitSignedForfeitTxsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetRoundResponse) ProtoMessage() {} +func (*SubmitSignedForfeitTxsResponse) ProtoMessage() {} -func (x *GetRoundResponse) ProtoReflect() protoreflect.Message { +func (x *SubmitSignedForfeitTxsResponse) ProtoReflect() protoreflect.Message { mi := &file_ark_v1_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -756,112 +817,11 @@ func (x *GetRoundResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetRoundResponse.ProtoReflect.Descriptor instead. -func (*GetRoundResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SubmitSignedForfeitTxsResponse.ProtoReflect.Descriptor instead. +func (*SubmitSignedForfeitTxsResponse) Descriptor() ([]byte, []int) { return file_ark_v1_service_proto_rawDescGZIP(), []int{13} } -func (x *GetRoundResponse) GetRound() *Round { - if x != nil { - return x.Round - } - return nil -} - -type GetRoundByIdRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetRoundByIdRequest) Reset() { - *x = GetRoundByIdRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRoundByIdRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRoundByIdRequest) ProtoMessage() {} - -func (x *GetRoundByIdRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[14] - 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 GetRoundByIdRequest.ProtoReflect.Descriptor instead. -func (*GetRoundByIdRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{14} -} - -func (x *GetRoundByIdRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetRoundByIdResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Round *Round `protobuf:"bytes,1,opt,name=round,proto3" json:"round,omitempty"` -} - -func (x *GetRoundByIdResponse) Reset() { - *x = GetRoundByIdResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRoundByIdResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRoundByIdResponse) ProtoMessage() {} - -func (x *GetRoundByIdResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[15] - 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 GetRoundByIdResponse.ProtoReflect.Descriptor instead. -func (*GetRoundByIdResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{15} -} - -func (x *GetRoundByIdResponse) GetRound() *Round { - if x != nil { - return x.Round - } - return nil -} - type GetEventStreamRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -871,7 +831,7 @@ type GetEventStreamRequest struct { func (x *GetEventStreamRequest) Reset() { *x = GetEventStreamRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[16] + mi := &file_ark_v1_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -884,7 +844,7 @@ func (x *GetEventStreamRequest) String() string { func (*GetEventStreamRequest) ProtoMessage() {} func (x *GetEventStreamRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[16] + mi := &file_ark_v1_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -897,7 +857,7 @@ func (x *GetEventStreamRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEventStreamRequest.ProtoReflect.Descriptor instead. func (*GetEventStreamRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{16} + return file_ark_v1_service_proto_rawDescGZIP(), []int{14} } type GetEventStreamResponse struct { @@ -918,7 +878,7 @@ type GetEventStreamResponse struct { func (x *GetEventStreamResponse) Reset() { *x = GetEventStreamResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[17] + mi := &file_ark_v1_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -931,7 +891,7 @@ func (x *GetEventStreamResponse) String() string { func (*GetEventStreamResponse) ProtoMessage() {} func (x *GetEventStreamResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[17] + mi := &file_ark_v1_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -944,7 +904,7 @@ func (x *GetEventStreamResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetEventStreamResponse.ProtoReflect.Descriptor instead. func (*GetEventStreamResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{17} + return file_ark_v1_service_proto_rawDescGZIP(), []int{15} } func (m *GetEventStreamResponse) GetEvent() isGetEventStreamResponse_Event { @@ -1034,7 +994,7 @@ type PingRequest struct { func (x *PingRequest) Reset() { *x = PingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[18] + mi := &file_ark_v1_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1047,7 +1007,7 @@ func (x *PingRequest) String() string { func (*PingRequest) ProtoMessage() {} func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[18] + mi := &file_ark_v1_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1060,7 +1020,7 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. func (*PingRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{18} + return file_ark_v1_service_proto_rawDescGZIP(), []int{16} } func (x *PingRequest) GetPaymentId() string { @@ -1088,7 +1048,7 @@ type PingResponse struct { func (x *PingResponse) Reset() { *x = PingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[19] + mi := &file_ark_v1_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1101,7 +1061,7 @@ func (x *PingResponse) String() string { func (*PingResponse) ProtoMessage() {} func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[19] + mi := &file_ark_v1_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1114,7 +1074,7 @@ func (x *PingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. func (*PingResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{19} + return file_ark_v1_service_proto_rawDescGZIP(), []int{17} } func (m *PingResponse) GetEvent() isPingResponse_Event { @@ -1193,6 +1153,397 @@ func (*PingResponse_RoundSigning) isPingResponse_Event() {} func (*PingResponse_RoundSigningNoncesGenerated) isPingResponse_Event() {} +type CreatePaymentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Inputs []*Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` + Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` +} + +func (x *CreatePaymentRequest) Reset() { + *x = CreatePaymentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatePaymentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePaymentRequest) ProtoMessage() {} + +func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[18] + 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 CreatePaymentRequest.ProtoReflect.Descriptor instead. +func (*CreatePaymentRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{18} +} + +func (x *CreatePaymentRequest) GetInputs() []*Input { + 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 + UsignedUnconditionalForfeitTxs []string `protobuf:"bytes,2,rep,name=usigned_unconditional_forfeit_txs,json=usignedUnconditionalForfeitTxs,proto3" json:"usigned_unconditional_forfeit_txs,omitempty"` +} + +func (x *CreatePaymentResponse) Reset() { + *x = CreatePaymentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[19] + 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[19] + 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{19} +} + +func (x *CreatePaymentResponse) GetSignedRedeemTx() string { + if x != nil { + return x.SignedRedeemTx + } + return "" +} + +func (x *CreatePaymentResponse) GetUsignedUnconditionalForfeitTxs() []string { + if x != nil { + return x.UsignedUnconditionalForfeitTxs + } + return nil +} + +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"` + SignedUnconditionalForfeitTxs []string `protobuf:"bytes,2,rep,name=signed_unconditional_forfeit_txs,json=signedUnconditionalForfeitTxs,proto3" json:"signed_unconditional_forfeit_txs,omitempty"` +} + +func (x *CompletePaymentRequest) Reset() { + *x = CompletePaymentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[20] + 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[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 CompletePaymentRequest.ProtoReflect.Descriptor instead. +func (*CompletePaymentRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{20} +} + +func (x *CompletePaymentRequest) GetSignedRedeemTx() string { + if x != nil { + return x.SignedRedeemTx + } + return "" +} + +func (x *CompletePaymentRequest) GetSignedUnconditionalForfeitTxs() []string { + if x != nil { + return x.SignedUnconditionalForfeitTxs + } + return nil +} + +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[21] + 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[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 CompletePaymentResponse.ProtoReflect.Descriptor instead. +func (*CompletePaymentResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{21} +} + +type GetRoundRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` +} + +func (x *GetRoundRequest) Reset() { + *x = GetRoundRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRoundRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRoundRequest) ProtoMessage() {} + +func (x *GetRoundRequest) 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 GetRoundRequest.ProtoReflect.Descriptor instead. +func (*GetRoundRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{22} +} + +func (x *GetRoundRequest) GetTxid() string { + if x != nil { + return x.Txid + } + return "" +} + +type GetRoundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Round *Round `protobuf:"bytes,1,opt,name=round,proto3" json:"round,omitempty"` +} + +func (x *GetRoundResponse) Reset() { + *x = GetRoundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRoundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRoundResponse) ProtoMessage() {} + +func (x *GetRoundResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[23] + 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 GetRoundResponse.ProtoReflect.Descriptor instead. +func (*GetRoundResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{23} +} + +func (x *GetRoundResponse) GetRound() *Round { + if x != nil { + return x.Round + } + return nil +} + +type GetRoundByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetRoundByIdRequest) Reset() { + *x = GetRoundByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRoundByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRoundByIdRequest) ProtoMessage() {} + +func (x *GetRoundByIdRequest) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[24] + 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 GetRoundByIdRequest.ProtoReflect.Descriptor instead. +func (*GetRoundByIdRequest) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{24} +} + +func (x *GetRoundByIdRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetRoundByIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Round *Round `protobuf:"bytes,1,opt,name=round,proto3" json:"round,omitempty"` +} + +func (x *GetRoundByIdResponse) Reset() { + *x = GetRoundByIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ark_v1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRoundByIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRoundByIdResponse) ProtoMessage() {} + +func (x *GetRoundByIdResponse) ProtoReflect() protoreflect.Message { + mi := &file_ark_v1_service_proto_msgTypes[25] + 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 GetRoundByIdResponse.ProtoReflect.Descriptor instead. +func (*GetRoundByIdResponse) Descriptor() ([]byte, []int) { + return file_ark_v1_service_proto_rawDescGZIP(), []int{25} +} + +func (x *GetRoundByIdResponse) GetRound() *Round { + if x != nil { + return x.Round + } + return nil +} + type ListVtxosRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1204,7 +1555,7 @@ type ListVtxosRequest struct { func (x *ListVtxosRequest) Reset() { *x = ListVtxosRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[20] + mi := &file_ark_v1_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1217,7 +1568,7 @@ func (x *ListVtxosRequest) String() string { func (*ListVtxosRequest) ProtoMessage() {} func (x *ListVtxosRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[20] + mi := &file_ark_v1_service_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1230,7 +1581,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{20} + return file_ark_v1_service_proto_rawDescGZIP(), []int{26} } func (x *ListVtxosRequest) GetAddress() string { @@ -1252,7 +1603,7 @@ type ListVtxosResponse struct { func (x *ListVtxosResponse) Reset() { *x = ListVtxosResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[21] + mi := &file_ark_v1_service_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1265,7 +1616,7 @@ func (x *ListVtxosResponse) String() string { func (*ListVtxosResponse) ProtoMessage() {} func (x *ListVtxosResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[21] + mi := &file_ark_v1_service_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1278,7 +1629,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{21} + return file_ark_v1_service_proto_rawDescGZIP(), []int{27} } func (x *ListVtxosResponse) GetSpendableVtxos() []*Vtxo { @@ -1295,147 +1646,6 @@ func (x *ListVtxosResponse) GetSpentVtxos() []*Vtxo { return nil } -type GetInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetInfoRequest) Reset() { - *x = GetInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInfoRequest) ProtoMessage() {} - -func (x *GetInfoRequest) 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 GetInfoRequest.ProtoReflect.Descriptor instead. -func (*GetInfoRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{22} -} - -type GetInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - RoundLifetime int64 `protobuf:"varint,2,opt,name=round_lifetime,json=roundLifetime,proto3" json:"round_lifetime,omitempty"` - UnilateralExitDelay int64 `protobuf:"varint,3,opt,name=unilateral_exit_delay,json=unilateralExitDelay,proto3" json:"unilateral_exit_delay,omitempty"` - RoundInterval int64 `protobuf:"varint,4,opt,name=round_interval,json=roundInterval,proto3" json:"round_interval,omitempty"` - Network string `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"` - Dust int64 `protobuf:"varint,6,opt,name=dust,proto3" json:"dust,omitempty"` - BoardingDescriptorTemplate string `protobuf:"bytes,7,opt,name=boarding_descriptor_template,json=boardingDescriptorTemplate,proto3" json:"boarding_descriptor_template,omitempty"` - ForfeitAddress string `protobuf:"bytes,8,opt,name=forfeit_address,json=forfeitAddress,proto3" json:"forfeit_address,omitempty"` -} - -func (x *GetInfoResponse) Reset() { - *x = GetInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetInfoResponse) ProtoMessage() {} - -func (x *GetInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[23] - 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 GetInfoResponse.ProtoReflect.Descriptor instead. -func (*GetInfoResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{23} -} - -func (x *GetInfoResponse) GetPubkey() string { - if x != nil { - return x.Pubkey - } - return "" -} - -func (x *GetInfoResponse) GetRoundLifetime() int64 { - if x != nil { - return x.RoundLifetime - } - return 0 -} - -func (x *GetInfoResponse) GetUnilateralExitDelay() int64 { - if x != nil { - return x.UnilateralExitDelay - } - return 0 -} - -func (x *GetInfoResponse) GetRoundInterval() int64 { - if x != nil { - return x.RoundInterval - } - return 0 -} - -func (x *GetInfoResponse) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *GetInfoResponse) GetDust() int64 { - if x != nil { - return x.Dust - } - return 0 -} - -func (x *GetInfoResponse) GetBoardingDescriptorTemplate() string { - if x != nil { - return x.BoardingDescriptorTemplate - } - return "" -} - -func (x *GetInfoResponse) GetForfeitAddress() string { - if x != nil { - return x.ForfeitAddress - } - return "" -} - type RoundFinalizationEvent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1451,7 +1661,7 @@ type RoundFinalizationEvent struct { func (x *RoundFinalizationEvent) Reset() { *x = RoundFinalizationEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[24] + mi := &file_ark_v1_service_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1464,7 +1674,7 @@ func (x *RoundFinalizationEvent) String() string { func (*RoundFinalizationEvent) ProtoMessage() {} func (x *RoundFinalizationEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[24] + mi := &file_ark_v1_service_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1477,7 +1687,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{24} + return file_ark_v1_service_proto_rawDescGZIP(), []int{28} } func (x *RoundFinalizationEvent) GetId() string { @@ -1527,7 +1737,7 @@ type RoundFinalizedEvent struct { func (x *RoundFinalizedEvent) Reset() { *x = RoundFinalizedEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[25] + mi := &file_ark_v1_service_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1540,7 +1750,7 @@ func (x *RoundFinalizedEvent) String() string { func (*RoundFinalizedEvent) ProtoMessage() {} func (x *RoundFinalizedEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[25] + mi := &file_ark_v1_service_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1553,7 +1763,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{25} + return file_ark_v1_service_proto_rawDescGZIP(), []int{29} } func (x *RoundFinalizedEvent) GetId() string { @@ -1582,7 +1792,7 @@ type RoundFailed struct { func (x *RoundFailed) Reset() { *x = RoundFailed{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[26] + mi := &file_ark_v1_service_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1595,7 +1805,7 @@ func (x *RoundFailed) String() string { func (*RoundFailed) ProtoMessage() {} func (x *RoundFailed) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[26] + mi := &file_ark_v1_service_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1608,7 +1818,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{26} + return file_ark_v1_service_proto_rawDescGZIP(), []int{30} } func (x *RoundFailed) GetId() string { @@ -1639,7 +1849,7 @@ type RoundSigningEvent struct { func (x *RoundSigningEvent) Reset() { *x = RoundSigningEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[27] + mi := &file_ark_v1_service_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1652,7 +1862,7 @@ func (x *RoundSigningEvent) String() string { func (*RoundSigningEvent) ProtoMessage() {} func (x *RoundSigningEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[27] + mi := &file_ark_v1_service_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1665,7 +1875,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{27} + return file_ark_v1_service_proto_rawDescGZIP(), []int{31} } func (x *RoundSigningEvent) GetId() string { @@ -1708,7 +1918,7 @@ type RoundSigningNoncesGeneratedEvent struct { func (x *RoundSigningNoncesGeneratedEvent) Reset() { *x = RoundSigningNoncesGeneratedEvent{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[28] + mi := &file_ark_v1_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1721,7 +1931,7 @@ func (x *RoundSigningNoncesGeneratedEvent) String() string { func (*RoundSigningNoncesGeneratedEvent) ProtoMessage() {} func (x *RoundSigningNoncesGeneratedEvent) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[28] + mi := &file_ark_v1_service_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1734,7 +1944,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{28} + return file_ark_v1_service_proto_rawDescGZIP(), []int{32} } func (x *RoundSigningNoncesGeneratedEvent) GetId() string { @@ -1769,7 +1979,7 @@ type Round struct { func (x *Round) Reset() { *x = Round{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[29] + mi := &file_ark_v1_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1782,7 +1992,7 @@ func (x *Round) String() string { func (*Round) ProtoMessage() {} func (x *Round) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[29] + mi := &file_ark_v1_service_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1795,7 +2005,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{29} + return file_ark_v1_service_proto_rawDescGZIP(), []int{33} } func (x *Round) GetId() string { @@ -1866,7 +2076,7 @@ type Outpoint struct { func (x *Outpoint) Reset() { *x = Outpoint{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[30] + mi := &file_ark_v1_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1879,7 +2089,7 @@ func (x *Outpoint) String() string { func (*Outpoint) ProtoMessage() {} func (x *Outpoint) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[30] + mi := &file_ark_v1_service_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1892,7 +2102,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{30} + return file_ark_v1_service_proto_rawDescGZIP(), []int{34} } func (x *Outpoint) GetTxid() string { @@ -1921,7 +2131,7 @@ type Input struct { func (x *Input) Reset() { *x = Input{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[31] + mi := &file_ark_v1_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1934,7 +2144,7 @@ func (x *Input) String() string { func (*Input) ProtoMessage() {} func (x *Input) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[31] + mi := &file_ark_v1_service_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1947,7 +2157,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{31} + return file_ark_v1_service_proto_rawDescGZIP(), []int{35} } func (x *Input) GetOutpoint() *Outpoint { @@ -1969,19 +2179,15 @@ type Output struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to Destination: - // - // *Output_Address - // *Output_Descriptor_ - Destination isOutput_Destination `protobuf_oneof:"destination"` - // Amount to send in satoshis. - Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // onchain or off-chain + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` // Amount to send in satoshis. + Descriptor_ string `protobuf:"bytes,3,opt,name=descriptor,proto3" json:"descriptor,omitempty"` } func (x *Output) Reset() { *x = Output{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[32] + mi := &file_ark_v1_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1994,7 +2200,7 @@ func (x *Output) String() string { func (*Output) ProtoMessage() {} func (x *Output) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[32] + mi := &file_ark_v1_service_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2007,30 +2213,16 @@ 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{32} -} - -func (m *Output) GetDestination() isOutput_Destination { - if m != nil { - return m.Destination - } - return nil + return file_ark_v1_service_proto_rawDescGZIP(), []int{36} } func (x *Output) GetAddress() string { - if x, ok := x.GetDestination().(*Output_Address); ok { + if x != nil { return x.Address } return "" } -func (x *Output) GetDescriptor_() string { - if x, ok := x.GetDestination().(*Output_Descriptor_); ok { - return x.Descriptor_ - } - return "" -} - func (x *Output) GetAmount() uint64 { if x != nil { return x.Amount @@ -2038,22 +2230,13 @@ func (x *Output) GetAmount() uint64 { return 0 } -type isOutput_Destination interface { - isOutput_Destination() +func (x *Output) GetDescriptor_() string { + if x != nil { + return x.Descriptor_ + } + return "" } -type Output_Address struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3,oneof"` // onchain -} - -type Output_Descriptor_ struct { - Descriptor_ string `protobuf:"bytes,2,opt,name=descriptor,proto3,oneof"` // offchain -} - -func (*Output_Address) isOutput_Destination() {} - -func (*Output_Descriptor_) isOutput_Destination() {} - type Tree struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2065,7 +2248,7 @@ type Tree struct { func (x *Tree) Reset() { *x = Tree{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[33] + mi := &file_ark_v1_service_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2078,7 +2261,7 @@ func (x *Tree) String() string { func (*Tree) ProtoMessage() {} func (x *Tree) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[33] + mi := &file_ark_v1_service_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2091,7 +2274,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{33} + return file_ark_v1_service_proto_rawDescGZIP(), []int{37} } func (x *Tree) GetLevels() []*TreeLevel { @@ -2112,7 +2295,7 @@ type TreeLevel struct { func (x *TreeLevel) Reset() { *x = TreeLevel{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[34] + mi := &file_ark_v1_service_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2125,7 +2308,7 @@ func (x *TreeLevel) String() string { func (*TreeLevel) ProtoMessage() {} func (x *TreeLevel) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[34] + mi := &file_ark_v1_service_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2138,7 +2321,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{34} + return file_ark_v1_service_proto_rawDescGZIP(), []int{38} } func (x *TreeLevel) GetNodes() []*Node { @@ -2161,7 +2344,7 @@ type Node struct { func (x *Node) Reset() { *x = Node{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[35] + mi := &file_ark_v1_service_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2174,7 +2357,7 @@ func (x *Node) String() string { func (*Node) ProtoMessage() {} func (x *Node) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[35] + mi := &file_ark_v1_service_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2187,7 +2370,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{35} + return file_ark_v1_service_proto_rawDescGZIP(), []int{39} } func (x *Node) GetTxid() string { @@ -2231,7 +2414,7 @@ type Vtxo struct { func (x *Vtxo) Reset() { *x = Vtxo{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[36] + mi := &file_ark_v1_service_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2244,7 +2427,7 @@ func (x *Vtxo) String() string { func (*Vtxo) ProtoMessage() {} func (x *Vtxo) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[36] + mi := &file_ark_v1_service_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2257,7 +2440,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{36} + return file_ark_v1_service_proto_rawDescGZIP(), []int{40} } func (x *Vtxo) GetOutpoint() *Outpoint { @@ -2342,7 +2525,7 @@ type PendingPayment struct { func (x *PendingPayment) Reset() { *x = PendingPayment{} if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[37] + mi := &file_ark_v1_service_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2355,7 +2538,7 @@ func (x *PendingPayment) String() string { func (*PendingPayment) ProtoMessage() {} func (x *PendingPayment) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[37] + mi := &file_ark_v1_service_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2368,7 +2551,7 @@ func (x *PendingPayment) ProtoReflect() protoreflect.Message { // Deprecated: Use PendingPayment.ProtoReflect.Descriptor instead. func (*PendingPayment) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{37} + return file_ark_v1_service_proto_rawDescGZIP(), []int{41} } func (x *PendingPayment) GetRedeemTx() string { @@ -2385,448 +2568,272 @@ func (x *PendingPayment) GetUnconditionalForfeitTxs() []string { return nil } -type SendTreeNoncesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RoundId string `protobuf:"bytes,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - TreeNonces string `protobuf:"bytes,3,opt,name=tree_nonces,json=treeNonces,proto3" json:"tree_nonces,omitempty"` -} - -func (x *SendTreeNoncesRequest) Reset() { - *x = SendTreeNoncesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendTreeNoncesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendTreeNoncesRequest) ProtoMessage() {} - -func (x *SendTreeNoncesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[38] - 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 SendTreeNoncesRequest.ProtoReflect.Descriptor instead. -func (*SendTreeNoncesRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{38} -} - -func (x *SendTreeNoncesRequest) GetRoundId() string { - if x != nil { - return x.RoundId - } - return "" -} - -func (x *SendTreeNoncesRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *SendTreeNoncesRequest) GetTreeNonces() string { - if x != nil { - return x.TreeNonces - } - return "" -} - -type SendTreeNoncesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SendTreeNoncesResponse) Reset() { - *x = SendTreeNoncesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendTreeNoncesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendTreeNoncesResponse) ProtoMessage() {} - -func (x *SendTreeNoncesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[39] - 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 SendTreeNoncesResponse.ProtoReflect.Descriptor instead. -func (*SendTreeNoncesResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{39} -} - -type SendTreeSignaturesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RoundId string `protobuf:"bytes,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - TreeSignatures string `protobuf:"bytes,3,opt,name=tree_signatures,json=treeSignatures,proto3" json:"tree_signatures,omitempty"` -} - -func (x *SendTreeSignaturesRequest) Reset() { - *x = SendTreeSignaturesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendTreeSignaturesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendTreeSignaturesRequest) ProtoMessage() {} - -func (x *SendTreeSignaturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[40] - 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 SendTreeSignaturesRequest.ProtoReflect.Descriptor instead. -func (*SendTreeSignaturesRequest) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{40} -} - -func (x *SendTreeSignaturesRequest) GetRoundId() string { - if x != nil { - return x.RoundId - } - return "" -} - -func (x *SendTreeSignaturesRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *SendTreeSignaturesRequest) GetTreeSignatures() string { - if x != nil { - return x.TreeSignatures - } - return "" -} - -type SendTreeSignaturesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SendTreeSignaturesResponse) Reset() { - *x = SendTreeSignaturesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ark_v1_service_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendTreeSignaturesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendTreeSignaturesResponse) ProtoMessage() {} - -func (x *SendTreeSignaturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ark_v1_service_proto_msgTypes[41] - 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 SendTreeSignaturesResponse.ProtoReflect.Descriptor instead. -func (*SendTreeSignaturesResponse) Descriptor() ([]byte, []int) { - return file_ark_v1_service_proto_rawDescGZIP(), []int{41} -} - var File_ark_v1_service_proto protoreflect.FileDescriptor var file_ark_v1_service_proto_rawDesc = []byte{ 0x0a, 0x14, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x14, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x80, + 0x03, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x32, 0x0a, 0x15, 0x75, 0x6e, 0x69, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, + 0x65, 0x78, 0x69, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x45, 0x78, 0x69, 0x74, + 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x75, 0x73, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x75, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x1c, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x1a, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x19, + 0x76, 0x74, 0x78, 0x6f, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x17, 0x76, 0x74, 0x78, 0x6f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x6f, 0x72, 0x66, + 0x65, 0x69, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x33, 0x0a, 0x19, 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, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0x56, 0x0a, 0x1a, 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, 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, 0x1e, + 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x22, 0x8f, + 0x01, 0x0a, 0x21, 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, 0x12, 0x25, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 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, 0x8c, 0x01, 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, 0x12, 0x49, 0x0a, 0x21, 0x75, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, 0x75, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x6e, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, - 0x74, 0x54, 0x78, 0x73, 0x22, 0x8b, 0x01, 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, 0x12, 0x47, 0x0a, 0x20, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x1d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, - 0x78, 0x73, 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, 0x33, 0x0a, - 0x19, 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, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x22, 0x56, 0x0a, 0x1a, 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, - 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, 0x1e, 0x0a, 0x0a, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x16, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x10, + 0x70, 0x75, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x10, 0x65, + 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, + 0x61, 0x6c, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, - 0x72, 0x61, 0x6c, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, - 0x5f, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x22, 0x29, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x13, - 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 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, 0x16, 0x0a, - 0x14, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x66, 0x65, - 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x12, 0x2b, - 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, - 0x19, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 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, 0x17, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa7, 0x03, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x11, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x6f, 0x0a, 0x1e, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 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, 0x48, 0x00, 0x52, 0x1b, 0x72, 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, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x22, 0x2c, 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, - 0x9d, 0x03, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4f, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x46, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x72, 0x6b, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x61, - 0x69, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x72, 0x6b, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x6f, 0x0a, 0x1e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x5f, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 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, 0x48, 0x00, 0x52, 0x1b, 0x72, 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, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 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, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc4, 0x02, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x32, 0x0a, - 0x15, 0x75, 0x6e, 0x69, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x69, 0x74, - 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x75, 0x6e, - 0x69, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x45, 0x78, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x61, - 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x75, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x64, 0x75, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x1c, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x6f, 0x72, 0x66, - 0x65, 0x69, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0xc5, 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, 0x17, 0x0a, 0x07, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x6f, 0x6f, 0x6c, 0x54, 0x78, 0x12, 0x35, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, - 0x69, 0x6f, 0x6e, 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, 0x0e, 0x63, 0x6f, - 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 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, 0x42, 0x0a, 0x13, 0x52, 0x6f, 0x75, + 0x22, 0x34, 0x0a, 0x22, 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, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5e, 0x0a, 0x22, 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, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, 0x25, 0x0a, 0x23, 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, 0x74, 0x0a, + 0x17, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, + 0x63, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 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, + 0x80, 0x01, 0x0a, 0x1b, 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, 0x12, + 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x65, + 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 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, 0x8e, 0x01, 0x0a, 0x1d, 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, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x66, + 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, + 0x78, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0d, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x88, 0x01, 0x01, 0x42, + 0x12, 0x0a, 0x10, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x74, 0x78, 0x22, 0x20, 0x0a, 0x1e, 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, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa7, + 0x03, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0f, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 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, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6f, 0x6c, 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, 0xaf, 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, 0x31, 0x0a, 0x0d, 0x75, 0x6e, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 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, 0x0c, 0x75, 0x6e, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 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, 0xfa, 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, 0x17, 0x0a, - 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x6f, 0x6f, 0x6c, 0x54, 0x78, 0x12, 0x35, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, - 0x74, 0x69, 0x6f, 0x6e, 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, 0x0e, 0x63, - 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 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, 0x55, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x22, 0x6d, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1a, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x31, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x6c, 0x65, + 0x48, 0x00, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x12, 0x38, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, + 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0d, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0c, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x6f, + 0x0a, 0x1e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 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, + 0x48, 0x00, 0x52, 0x1b, 0x72, 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, 0x42, + 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x2c, 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, 0x9d, 0x03, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, + 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x12, 0x38, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, + 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x6f, 0x0a, 0x1e, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x73, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 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, 0x48, 0x00, + 0x52, 0x1b, 0x72, 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, 0x42, 0x07, 0x0a, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x67, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, + 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 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, + 0x8c, 0x01, 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, 0x12, 0x49, 0x0a, 0x21, 0x75, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, + 0x6e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, + 0x66, 0x65, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, + 0x75, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 0x22, 0x8b, + 0x01, 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, 0x12, 0x47, 0x0a, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x6e, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x66, + 0x65, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x54, 0x78, 0x73, 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, 0xc5, 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, + 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x54, 0x78, 0x12, 0x35, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 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, + 0x0e, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 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, 0x42, 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, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x78, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6f, 0x6c, 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, 0xaf, 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, 0x31, 0x0a, 0x0d, 0x75, 0x6e, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 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, + 0x0c, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 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, 0xfa, + 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, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x54, 0x78, 0x12, 0x35, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, + 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 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, 0x0e, 0x63, 0x6f, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 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, + 0x55, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x22, 0x5a, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 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, @@ -2864,138 +2871,129 @@ var file_ark_v1_service_proto_rawDesc = []byte{ 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, 0x5f, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x6f, 0x72, 0x66, 0x65, 0x69, 0x74, - 0x54, 0x78, 0x73, 0x22, 0x72, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, - 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x6e, - 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x65, - 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x54, - 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x7e, 0x0a, 0x19, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x65, 0x65, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x74, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0xd0, 0x0b, 0x0a, 0x0a, 0x41, - 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, - 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 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, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x67, - 0x0a, 0x0c, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, - 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x72, - 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x2f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x73, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x54, - 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x83, 0x01, 0x0a, - 0x12, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, - 0x64, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 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, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 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, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 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, 0x66, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 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, 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, 0x50, 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, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x69, - 0x6e, 0x67, 0x2f, 0x7b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 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, 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, + 0x54, 0x78, 0x73, 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, 0xe8, + 0x0c, 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, 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, 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, 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, + 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, 0x6b, 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, 0x18, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 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, 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 ( @@ -3013,106 +3011,106 @@ 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, 42) var file_ark_v1_service_proto_goTypes = []interface{}{ - (RoundStage)(0), // 0: ark.v1.RoundStage - (*CreatePaymentRequest)(nil), // 1: ark.v1.CreatePaymentRequest - (*CreatePaymentResponse)(nil), // 2: ark.v1.CreatePaymentResponse - (*CompletePaymentRequest)(nil), // 3: ark.v1.CompletePaymentRequest - (*CompletePaymentResponse)(nil), // 4: ark.v1.CompletePaymentResponse - (*GetBoardingAddressRequest)(nil), // 5: ark.v1.GetBoardingAddressRequest - (*GetBoardingAddressResponse)(nil), // 6: ark.v1.GetBoardingAddressResponse - (*RegisterPaymentRequest)(nil), // 7: ark.v1.RegisterPaymentRequest - (*RegisterPaymentResponse)(nil), // 8: ark.v1.RegisterPaymentResponse - (*ClaimPaymentRequest)(nil), // 9: ark.v1.ClaimPaymentRequest - (*ClaimPaymentResponse)(nil), // 10: ark.v1.ClaimPaymentResponse - (*FinalizePaymentRequest)(nil), // 11: ark.v1.FinalizePaymentRequest - (*FinalizePaymentResponse)(nil), // 12: ark.v1.FinalizePaymentResponse - (*GetRoundRequest)(nil), // 13: ark.v1.GetRoundRequest - (*GetRoundResponse)(nil), // 14: ark.v1.GetRoundResponse - (*GetRoundByIdRequest)(nil), // 15: ark.v1.GetRoundByIdRequest - (*GetRoundByIdResponse)(nil), // 16: ark.v1.GetRoundByIdResponse - (*GetEventStreamRequest)(nil), // 17: ark.v1.GetEventStreamRequest - (*GetEventStreamResponse)(nil), // 18: ark.v1.GetEventStreamResponse - (*PingRequest)(nil), // 19: ark.v1.PingRequest - (*PingResponse)(nil), // 20: ark.v1.PingResponse - (*ListVtxosRequest)(nil), // 21: ark.v1.ListVtxosRequest - (*ListVtxosResponse)(nil), // 22: ark.v1.ListVtxosResponse - (*GetInfoRequest)(nil), // 23: ark.v1.GetInfoRequest - (*GetInfoResponse)(nil), // 24: ark.v1.GetInfoResponse - (*RoundFinalizationEvent)(nil), // 25: ark.v1.RoundFinalizationEvent - (*RoundFinalizedEvent)(nil), // 26: ark.v1.RoundFinalizedEvent - (*RoundFailed)(nil), // 27: ark.v1.RoundFailed - (*RoundSigningEvent)(nil), // 28: ark.v1.RoundSigningEvent - (*RoundSigningNoncesGeneratedEvent)(nil), // 29: ark.v1.RoundSigningNoncesGeneratedEvent - (*Round)(nil), // 30: ark.v1.Round - (*Outpoint)(nil), // 31: ark.v1.Outpoint - (*Input)(nil), // 32: ark.v1.Input - (*Output)(nil), // 33: ark.v1.Output - (*Tree)(nil), // 34: ark.v1.Tree - (*TreeLevel)(nil), // 35: ark.v1.TreeLevel - (*Node)(nil), // 36: ark.v1.Node - (*Vtxo)(nil), // 37: ark.v1.Vtxo - (*PendingPayment)(nil), // 38: ark.v1.PendingPayment - (*SendTreeNoncesRequest)(nil), // 39: ark.v1.SendTreeNoncesRequest - (*SendTreeNoncesResponse)(nil), // 40: ark.v1.SendTreeNoncesResponse - (*SendTreeSignaturesRequest)(nil), // 41: ark.v1.SendTreeSignaturesRequest - (*SendTreeSignaturesResponse)(nil), // 42: ark.v1.SendTreeSignaturesResponse + (RoundStage)(0), // 0: ark.v1.RoundStage + (*GetInfoRequest)(nil), // 1: ark.v1.GetInfoRequest + (*GetInfoResponse)(nil), // 2: ark.v1.GetInfoResponse + (*GetBoardingAddressRequest)(nil), // 3: ark.v1.GetBoardingAddressRequest + (*GetBoardingAddressResponse)(nil), // 4: ark.v1.GetBoardingAddressResponse + (*RegisterInputsForNextRoundRequest)(nil), // 5: ark.v1.RegisterInputsForNextRoundRequest + (*RegisterInputsForNextRoundResponse)(nil), // 6: ark.v1.RegisterInputsForNextRoundResponse + (*RegisterOutputsForNextRoundRequest)(nil), // 7: ark.v1.RegisterOutputsForNextRoundRequest + (*RegisterOutputsForNextRoundResponse)(nil), // 8: ark.v1.RegisterOutputsForNextRoundResponse + (*SubmitTreeNoncesRequest)(nil), // 9: ark.v1.SubmitTreeNoncesRequest + (*SubmitTreeNoncesResponse)(nil), // 10: ark.v1.SubmitTreeNoncesResponse + (*SubmitTreeSignaturesRequest)(nil), // 11: ark.v1.SubmitTreeSignaturesRequest + (*SubmitTreeSignaturesResponse)(nil), // 12: ark.v1.SubmitTreeSignaturesResponse + (*SubmitSignedForfeitTxsRequest)(nil), // 13: ark.v1.SubmitSignedForfeitTxsRequest + (*SubmitSignedForfeitTxsResponse)(nil), // 14: ark.v1.SubmitSignedForfeitTxsResponse + (*GetEventStreamRequest)(nil), // 15: ark.v1.GetEventStreamRequest + (*GetEventStreamResponse)(nil), // 16: ark.v1.GetEventStreamResponse + (*PingRequest)(nil), // 17: ark.v1.PingRequest + (*PingResponse)(nil), // 18: ark.v1.PingResponse + (*CreatePaymentRequest)(nil), // 19: ark.v1.CreatePaymentRequest + (*CreatePaymentResponse)(nil), // 20: ark.v1.CreatePaymentResponse + (*CompletePaymentRequest)(nil), // 21: ark.v1.CompletePaymentRequest + (*CompletePaymentResponse)(nil), // 22: ark.v1.CompletePaymentResponse + (*GetRoundRequest)(nil), // 23: ark.v1.GetRoundRequest + (*GetRoundResponse)(nil), // 24: ark.v1.GetRoundResponse + (*GetRoundByIdRequest)(nil), // 25: ark.v1.GetRoundByIdRequest + (*GetRoundByIdResponse)(nil), // 26: ark.v1.GetRoundByIdResponse + (*ListVtxosRequest)(nil), // 27: ark.v1.ListVtxosRequest + (*ListVtxosResponse)(nil), // 28: ark.v1.ListVtxosResponse + (*RoundFinalizationEvent)(nil), // 29: ark.v1.RoundFinalizationEvent + (*RoundFinalizedEvent)(nil), // 30: ark.v1.RoundFinalizedEvent + (*RoundFailed)(nil), // 31: ark.v1.RoundFailed + (*RoundSigningEvent)(nil), // 32: ark.v1.RoundSigningEvent + (*RoundSigningNoncesGeneratedEvent)(nil), // 33: ark.v1.RoundSigningNoncesGeneratedEvent + (*Round)(nil), // 34: ark.v1.Round + (*Outpoint)(nil), // 35: ark.v1.Outpoint + (*Input)(nil), // 36: ark.v1.Input + (*Output)(nil), // 37: ark.v1.Output + (*Tree)(nil), // 38: ark.v1.Tree + (*TreeLevel)(nil), // 39: ark.v1.TreeLevel + (*Node)(nil), // 40: ark.v1.Node + (*Vtxo)(nil), // 41: ark.v1.Vtxo + (*PendingPayment)(nil), // 42: ark.v1.PendingPayment } var file_ark_v1_service_proto_depIdxs = []int32{ - 32, // 0: ark.v1.CreatePaymentRequest.inputs:type_name -> ark.v1.Input - 33, // 1: ark.v1.CreatePaymentRequest.outputs:type_name -> ark.v1.Output - 32, // 2: ark.v1.RegisterPaymentRequest.inputs:type_name -> ark.v1.Input - 33, // 3: ark.v1.ClaimPaymentRequest.outputs:type_name -> ark.v1.Output - 30, // 4: ark.v1.GetRoundResponse.round:type_name -> ark.v1.Round - 30, // 5: ark.v1.GetRoundByIdResponse.round:type_name -> ark.v1.Round - 25, // 6: ark.v1.GetEventStreamResponse.round_finalization:type_name -> ark.v1.RoundFinalizationEvent - 26, // 7: ark.v1.GetEventStreamResponse.round_finalized:type_name -> ark.v1.RoundFinalizedEvent - 27, // 8: ark.v1.GetEventStreamResponse.round_failed:type_name -> ark.v1.RoundFailed - 28, // 9: ark.v1.GetEventStreamResponse.round_signing:type_name -> ark.v1.RoundSigningEvent - 29, // 10: ark.v1.GetEventStreamResponse.round_signing_nonces_generated:type_name -> ark.v1.RoundSigningNoncesGeneratedEvent - 25, // 11: ark.v1.PingResponse.round_finalization:type_name -> ark.v1.RoundFinalizationEvent - 26, // 12: ark.v1.PingResponse.round_finalized:type_name -> ark.v1.RoundFinalizedEvent - 27, // 13: ark.v1.PingResponse.round_failed:type_name -> ark.v1.RoundFailed - 28, // 14: ark.v1.PingResponse.round_signing:type_name -> ark.v1.RoundSigningEvent - 29, // 15: ark.v1.PingResponse.round_signing_nonces_generated:type_name -> ark.v1.RoundSigningNoncesGeneratedEvent - 37, // 16: ark.v1.ListVtxosResponse.spendable_vtxos:type_name -> ark.v1.Vtxo - 37, // 17: ark.v1.ListVtxosResponse.spent_vtxos:type_name -> ark.v1.Vtxo - 34, // 18: ark.v1.RoundFinalizationEvent.congestion_tree:type_name -> ark.v1.Tree - 34, // 19: ark.v1.RoundSigningEvent.unsigned_tree:type_name -> ark.v1.Tree - 34, // 20: ark.v1.Round.congestion_tree:type_name -> ark.v1.Tree + 36, // 0: ark.v1.RegisterInputsForNextRoundRequest.inputs:type_name -> ark.v1.Input + 37, // 1: ark.v1.RegisterOutputsForNextRoundRequest.outputs:type_name -> ark.v1.Output + 29, // 2: ark.v1.GetEventStreamResponse.round_finalization:type_name -> ark.v1.RoundFinalizationEvent + 30, // 3: ark.v1.GetEventStreamResponse.round_finalized:type_name -> ark.v1.RoundFinalizedEvent + 31, // 4: ark.v1.GetEventStreamResponse.round_failed:type_name -> ark.v1.RoundFailed + 32, // 5: ark.v1.GetEventStreamResponse.round_signing:type_name -> ark.v1.RoundSigningEvent + 33, // 6: ark.v1.GetEventStreamResponse.round_signing_nonces_generated:type_name -> ark.v1.RoundSigningNoncesGeneratedEvent + 29, // 7: ark.v1.PingResponse.round_finalization:type_name -> ark.v1.RoundFinalizationEvent + 30, // 8: ark.v1.PingResponse.round_finalized:type_name -> ark.v1.RoundFinalizedEvent + 31, // 9: ark.v1.PingResponse.round_failed:type_name -> ark.v1.RoundFailed + 32, // 10: ark.v1.PingResponse.round_signing:type_name -> ark.v1.RoundSigningEvent + 33, // 11: ark.v1.PingResponse.round_signing_nonces_generated:type_name -> ark.v1.RoundSigningNoncesGeneratedEvent + 36, // 12: ark.v1.CreatePaymentRequest.inputs:type_name -> ark.v1.Input + 37, // 13: ark.v1.CreatePaymentRequest.outputs:type_name -> ark.v1.Output + 34, // 14: ark.v1.GetRoundResponse.round:type_name -> ark.v1.Round + 34, // 15: ark.v1.GetRoundByIdResponse.round:type_name -> ark.v1.Round + 41, // 16: ark.v1.ListVtxosResponse.spendable_vtxos:type_name -> ark.v1.Vtxo + 41, // 17: ark.v1.ListVtxosResponse.spent_vtxos:type_name -> ark.v1.Vtxo + 38, // 18: ark.v1.RoundFinalizationEvent.congestion_tree:type_name -> ark.v1.Tree + 38, // 19: ark.v1.RoundSigningEvent.unsigned_tree:type_name -> ark.v1.Tree + 38, // 20: ark.v1.Round.congestion_tree:type_name -> ark.v1.Tree 0, // 21: ark.v1.Round.stage:type_name -> ark.v1.RoundStage - 31, // 22: ark.v1.Input.outpoint:type_name -> ark.v1.Outpoint - 35, // 23: ark.v1.Tree.levels:type_name -> ark.v1.TreeLevel - 36, // 24: ark.v1.TreeLevel.nodes:type_name -> ark.v1.Node - 31, // 25: ark.v1.Vtxo.outpoint:type_name -> ark.v1.Outpoint - 38, // 26: ark.v1.Vtxo.pending_data:type_name -> ark.v1.PendingPayment - 7, // 27: ark.v1.ArkService.RegisterPayment:input_type -> ark.v1.RegisterPaymentRequest - 9, // 28: ark.v1.ArkService.ClaimPayment:input_type -> ark.v1.ClaimPaymentRequest - 39, // 29: ark.v1.ArkService.SendTreeNonces:input_type -> ark.v1.SendTreeNoncesRequest - 41, // 30: ark.v1.ArkService.SendTreeSignatures:input_type -> ark.v1.SendTreeSignaturesRequest - 11, // 31: ark.v1.ArkService.FinalizePayment:input_type -> ark.v1.FinalizePaymentRequest - 13, // 32: ark.v1.ArkService.GetRound:input_type -> ark.v1.GetRoundRequest - 15, // 33: ark.v1.ArkService.GetRoundById:input_type -> ark.v1.GetRoundByIdRequest - 17, // 34: ark.v1.ArkService.GetEventStream:input_type -> ark.v1.GetEventStreamRequest - 19, // 35: ark.v1.ArkService.Ping:input_type -> ark.v1.PingRequest - 21, // 36: ark.v1.ArkService.ListVtxos:input_type -> ark.v1.ListVtxosRequest - 23, // 37: ark.v1.ArkService.GetInfo:input_type -> ark.v1.GetInfoRequest - 5, // 38: ark.v1.ArkService.GetBoardingAddress:input_type -> ark.v1.GetBoardingAddressRequest - 1, // 39: ark.v1.ArkService.CreatePayment:input_type -> ark.v1.CreatePaymentRequest - 3, // 40: ark.v1.ArkService.CompletePayment:input_type -> ark.v1.CompletePaymentRequest - 8, // 41: ark.v1.ArkService.RegisterPayment:output_type -> ark.v1.RegisterPaymentResponse - 10, // 42: ark.v1.ArkService.ClaimPayment:output_type -> ark.v1.ClaimPaymentResponse - 40, // 43: ark.v1.ArkService.SendTreeNonces:output_type -> ark.v1.SendTreeNoncesResponse - 42, // 44: ark.v1.ArkService.SendTreeSignatures:output_type -> ark.v1.SendTreeSignaturesResponse - 12, // 45: ark.v1.ArkService.FinalizePayment:output_type -> ark.v1.FinalizePaymentResponse - 14, // 46: ark.v1.ArkService.GetRound:output_type -> ark.v1.GetRoundResponse - 16, // 47: ark.v1.ArkService.GetRoundById:output_type -> ark.v1.GetRoundByIdResponse - 18, // 48: ark.v1.ArkService.GetEventStream:output_type -> ark.v1.GetEventStreamResponse - 20, // 49: ark.v1.ArkService.Ping:output_type -> ark.v1.PingResponse - 22, // 50: ark.v1.ArkService.ListVtxos:output_type -> ark.v1.ListVtxosResponse - 24, // 51: ark.v1.ArkService.GetInfo:output_type -> ark.v1.GetInfoResponse - 6, // 52: ark.v1.ArkService.GetBoardingAddress:output_type -> ark.v1.GetBoardingAddressResponse - 2, // 53: ark.v1.ArkService.CreatePayment:output_type -> ark.v1.CreatePaymentResponse - 4, // 54: ark.v1.ArkService.CompletePayment:output_type -> ark.v1.CompletePaymentResponse + 35, // 22: ark.v1.Input.outpoint:type_name -> ark.v1.Outpoint + 39, // 23: ark.v1.Tree.levels:type_name -> ark.v1.TreeLevel + 40, // 24: ark.v1.TreeLevel.nodes:type_name -> ark.v1.Node + 35, // 25: ark.v1.Vtxo.outpoint:type_name -> ark.v1.Outpoint + 42, // 26: ark.v1.Vtxo.pending_data:type_name -> ark.v1.PendingPayment + 1, // 27: ark.v1.ArkService.GetInfo:input_type -> ark.v1.GetInfoRequest + 3, // 28: ark.v1.ArkService.GetBoardingAddress:input_type -> ark.v1.GetBoardingAddressRequest + 5, // 29: ark.v1.ArkService.RegisterInputsForNextRound:input_type -> ark.v1.RegisterInputsForNextRoundRequest + 7, // 30: ark.v1.ArkService.RegisterOutputsForNextRound:input_type -> ark.v1.RegisterOutputsForNextRoundRequest + 9, // 31: ark.v1.ArkService.SubmitTreeNonces:input_type -> ark.v1.SubmitTreeNoncesRequest + 11, // 32: ark.v1.ArkService.SubmitTreeSignatures:input_type -> ark.v1.SubmitTreeSignaturesRequest + 13, // 33: ark.v1.ArkService.SubmitSignedForfeitTxs:input_type -> ark.v1.SubmitSignedForfeitTxsRequest + 15, // 34: ark.v1.ArkService.GetEventStream:input_type -> ark.v1.GetEventStreamRequest + 17, // 35: ark.v1.ArkService.Ping:input_type -> ark.v1.PingRequest + 19, // 36: ark.v1.ArkService.CreatePayment:input_type -> ark.v1.CreatePaymentRequest + 21, // 37: ark.v1.ArkService.CompletePayment:input_type -> ark.v1.CompletePaymentRequest + 23, // 38: ark.v1.ArkService.GetRound:input_type -> ark.v1.GetRoundRequest + 25, // 39: ark.v1.ArkService.GetRoundById:input_type -> ark.v1.GetRoundByIdRequest + 27, // 40: ark.v1.ArkService.ListVtxos:input_type -> ark.v1.ListVtxosRequest + 2, // 41: ark.v1.ArkService.GetInfo:output_type -> ark.v1.GetInfoResponse + 4, // 42: ark.v1.ArkService.GetBoardingAddress:output_type -> ark.v1.GetBoardingAddressResponse + 6, // 43: ark.v1.ArkService.RegisterInputsForNextRound:output_type -> ark.v1.RegisterInputsForNextRoundResponse + 8, // 44: ark.v1.ArkService.RegisterOutputsForNextRound:output_type -> ark.v1.RegisterOutputsForNextRoundResponse + 10, // 45: ark.v1.ArkService.SubmitTreeNonces:output_type -> ark.v1.SubmitTreeNoncesResponse + 12, // 46: ark.v1.ArkService.SubmitTreeSignatures:output_type -> ark.v1.SubmitTreeSignaturesResponse + 14, // 47: ark.v1.ArkService.SubmitSignedForfeitTxs:output_type -> ark.v1.SubmitSignedForfeitTxsResponse + 16, // 48: ark.v1.ArkService.GetEventStream:output_type -> ark.v1.GetEventStreamResponse + 18, // 49: ark.v1.ArkService.Ping:output_type -> ark.v1.PingResponse + 20, // 50: ark.v1.ArkService.CreatePayment:output_type -> ark.v1.CreatePaymentResponse + 22, // 51: ark.v1.ArkService.CompletePayment:output_type -> ark.v1.CompletePaymentResponse + 24, // 52: ark.v1.ArkService.GetRound:output_type -> ark.v1.GetRoundResponse + 26, // 53: ark.v1.ArkService.GetRoundById:output_type -> ark.v1.GetRoundByIdResponse + 28, // 54: ark.v1.ArkService.ListVtxos:output_type -> ark.v1.ListVtxosResponse 41, // [41:55] is the sub-list for method output_type 27, // [27:41] is the sub-list for method input_type 27, // [27:27] is the sub-list for extension type_name @@ -3127,270 +3125,6 @@ func file_ark_v1_service_proto_init() { } if !protoimpl.UnsafeEnabled { file_ark_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePaymentRequest); 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[1].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[2].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[3].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[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBoardingAddressRequest); 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[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBoardingAddressResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterPaymentRequest); 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[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterPaymentResponse); 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[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimPaymentRequest); 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[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimPaymentResponse); 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[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FinalizePaymentRequest); 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[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FinalizePaymentResponse); 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[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRoundRequest); 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[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRoundResponse); 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[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRoundByIdRequest); 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[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRoundByIdResponse); 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[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventStreamRequest); 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[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventStreamResponse); 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[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); 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[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); 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[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListVtxosRequest); 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.(*ListVtxosResponse); 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.(*GetInfoRequest); i { case 0: return &v.state @@ -3402,7 +3136,7 @@ func file_ark_v1_service_proto_init() { return nil } } - file_ark_v1_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_ark_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetInfoResponse); i { case 0: return &v.state @@ -3414,8 +3148,272 @@ func file_ark_v1_service_proto_init() { return nil } } + file_ark_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBoardingAddressRequest); 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[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBoardingAddressResponse); 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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterInputsForNextRoundRequest); 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[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterInputsForNextRoundResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterOutputsForNextRoundRequest); 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[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterOutputsForNextRoundResponse); 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[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitTreeNoncesRequest); 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[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitTreeNoncesResponse); 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[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitTreeSignaturesRequest); 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[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitTreeSignaturesResponse); 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[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitSignedForfeitTxsRequest); 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[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubmitSignedForfeitTxsResponse); 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[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEventStreamRequest); 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[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEventStreamResponse); 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[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingRequest); 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[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PingResponse); 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[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreatePaymentRequest); 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[19].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[20].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[21].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[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRoundRequest); 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.(*GetRoundResponse); 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[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoundFinalizationEvent); i { + switch v := v.(*GetRoundByIdRequest); i { case 0: return &v.state case 1: @@ -3427,7 +3425,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoundFinalizedEvent); i { + switch v := v.(*GetRoundByIdResponse); i { case 0: return &v.state case 1: @@ -3439,7 +3437,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoundFailed); i { + switch v := v.(*ListVtxosRequest); i { case 0: return &v.state case 1: @@ -3451,7 +3449,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoundSigningEvent); i { + switch v := v.(*ListVtxosResponse); i { case 0: return &v.state case 1: @@ -3463,7 +3461,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoundSigningNoncesGeneratedEvent); i { + switch v := v.(*RoundFinalizationEvent); i { case 0: return &v.state case 1: @@ -3475,7 +3473,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Round); i { + switch v := v.(*RoundFinalizedEvent); i { case 0: return &v.state case 1: @@ -3487,7 +3485,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Outpoint); i { + switch v := v.(*RoundFailed); i { case 0: return &v.state case 1: @@ -3499,7 +3497,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Input); i { + switch v := v.(*RoundSigningEvent); i { case 0: return &v.state case 1: @@ -3511,7 +3509,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Output); i { + switch v := v.(*RoundSigningNoncesGeneratedEvent); i { case 0: return &v.state case 1: @@ -3523,7 +3521,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tree); i { + switch v := v.(*Round); i { case 0: return &v.state case 1: @@ -3535,7 +3533,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TreeLevel); i { + switch v := v.(*Outpoint); i { case 0: return &v.state case 1: @@ -3547,7 +3545,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Node); i { + switch v := v.(*Input); i { case 0: return &v.state case 1: @@ -3559,7 +3557,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vtxo); i { + switch v := v.(*Output); i { case 0: return &v.state case 1: @@ -3571,7 +3569,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingPayment); i { + switch v := v.(*Tree); i { case 0: return &v.state case 1: @@ -3583,7 +3581,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendTreeNoncesRequest); i { + switch v := v.(*TreeLevel); i { case 0: return &v.state case 1: @@ -3595,7 +3593,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendTreeNoncesResponse); i { + switch v := v.(*Node); i { case 0: return &v.state case 1: @@ -3607,7 +3605,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendTreeSignaturesRequest); i { + switch v := v.(*Vtxo); i { case 0: return &v.state case 1: @@ -3619,7 +3617,7 @@ func file_ark_v1_service_proto_init() { } } file_ark_v1_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendTreeSignaturesResponse); i { + switch v := v.(*PendingPayment); i { case 0: return &v.state case 1: @@ -3631,26 +3629,22 @@ func file_ark_v1_service_proto_init() { } } } - file_ark_v1_service_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_ark_v1_service_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_ark_v1_service_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_ark_v1_service_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_ark_v1_service_proto_msgTypes[12].OneofWrappers = []interface{}{} + file_ark_v1_service_proto_msgTypes[15].OneofWrappers = []interface{}{ (*GetEventStreamResponse_RoundFinalization)(nil), (*GetEventStreamResponse_RoundFinalized)(nil), (*GetEventStreamResponse_RoundFailed)(nil), (*GetEventStreamResponse_RoundSigning)(nil), (*GetEventStreamResponse_RoundSigningNoncesGenerated)(nil), } - file_ark_v1_service_proto_msgTypes[19].OneofWrappers = []interface{}{ + file_ark_v1_service_proto_msgTypes[17].OneofWrappers = []interface{}{ (*PingResponse_RoundFinalization)(nil), (*PingResponse_RoundFinalized)(nil), (*PingResponse_RoundFailed)(nil), (*PingResponse_RoundSigning)(nil), (*PingResponse_RoundSigningNoncesGenerated)(nil), } - file_ark_v1_service_proto_msgTypes[32].OneofWrappers = []interface{}{ - (*Output_Address)(nil), - (*Output_Descriptor_)(nil), - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ 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 3d47396..2aae451 100644 --- a/api-spec/protobuf/gen/ark/v1/service.pb.gw.go +++ b/api-spec/protobuf/gen/ark/v1/service.pb.gw.go @@ -31,132 +31,297 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_ArkService_RegisterPayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RegisterPaymentRequest +func request_ArkService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetInfoRequest 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.RegisterPayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_ArkService_RegisterPayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RegisterPaymentRequest +func local_request_ArkService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetInfoRequest 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.RegisterPayment(ctx, &protoReq) + msg, err := server.GetInfo(ctx, &protoReq) return msg, metadata, err } -func request_ArkService_ClaimPayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ClaimPaymentRequest +func request_ArkService_GetBoardingAddress_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBoardingAddressRequest 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.ClaimPayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetBoardingAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_ArkService_ClaimPayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ClaimPaymentRequest +func local_request_ArkService_GetBoardingAddress_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBoardingAddressRequest 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.ClaimPayment(ctx, &protoReq) + msg, err := server.GetBoardingAddress(ctx, &protoReq) return msg, metadata, err } -func request_ArkService_SendTreeNonces_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SendTreeNoncesRequest +func request_ArkService_RegisterInputsForNextRound_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterInputsForNextRoundRequest 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.SendTreeNonces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.RegisterInputsForNextRound(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_ArkService_SendTreeNonces_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SendTreeNoncesRequest +func local_request_ArkService_RegisterInputsForNextRound_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterInputsForNextRoundRequest 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.SendTreeNonces(ctx, &protoReq) + msg, err := server.RegisterInputsForNextRound(ctx, &protoReq) return msg, metadata, err } -func request_ArkService_SendTreeSignatures_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SendTreeSignaturesRequest +func request_ArkService_RegisterOutputsForNextRound_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterOutputsForNextRoundRequest 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.SendTreeSignatures(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.RegisterOutputsForNextRound(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_ArkService_SendTreeSignatures_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SendTreeSignaturesRequest +func local_request_ArkService_RegisterOutputsForNextRound_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterOutputsForNextRoundRequest 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.SendTreeSignatures(ctx, &protoReq) + msg, err := server.RegisterOutputsForNextRound(ctx, &protoReq) return msg, metadata, err } -func request_ArkService_FinalizePayment_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq FinalizePaymentRequest +func request_ArkService_SubmitTreeNonces_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitTreeNoncesRequest 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.FinalizePayment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SubmitTreeNonces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_ArkService_FinalizePayment_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq FinalizePaymentRequest +func local_request_ArkService_SubmitTreeNonces_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitTreeNoncesRequest 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.FinalizePayment(ctx, &protoReq) + msg, err := server.SubmitTreeNonces(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ArkService_SubmitTreeSignatures_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitTreeSignaturesRequest + 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.SubmitTreeSignatures(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_SubmitTreeSignatures_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitTreeSignaturesRequest + 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.SubmitTreeSignatures(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ArkService_SubmitSignedForfeitTxs_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitSignedForfeitTxsRequest + 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.SubmitSignedForfeitTxs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_SubmitSignedForfeitTxs_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SubmitSignedForfeitTxsRequest + 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.SubmitSignedForfeitTxs(ctx, &protoReq) + return msg, metadata, err + +} + +func request_ArkService_GetEventStream_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (ArkService_GetEventStreamClient, runtime.ServerMetadata, error) { + var protoReq GetEventStreamRequest + var metadata runtime.ServerMetadata + + stream, err := client.GetEventStream(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_ArkService_Ping_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["payment_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payment_id") + } + + protoReq.PaymentId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payment_id", err) + } + + msg, err := client.Ping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ArkService_Ping_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["payment_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payment_id") + } + + protoReq.PaymentId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payment_id", err) + } + + msg, err := server.Ping(ctx, &protoReq) + return msg, metadata, err + +} + +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 + 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)) + 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 + 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) return msg, metadata, err } @@ -265,75 +430,6 @@ func local_request_ArkService_GetRoundById_0(ctx context.Context, marshaler runt } -func request_ArkService_GetEventStream_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (ArkService_GetEventStreamClient, runtime.ServerMetadata, error) { - var protoReq GetEventStreamRequest - var metadata runtime.ServerMetadata - - stream, err := client.GetEventStream(ctx, &protoReq) - if err != nil { - return nil, metadata, err - } - header, err := stream.Header() - if err != nil { - return nil, metadata, err - } - metadata.HeaderMD = header - return stream, metadata, nil - -} - -func request_ArkService_Ping_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PingRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["payment_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payment_id") - } - - protoReq.PaymentId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payment_id", err) - } - - msg, err := client.Ping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ArkService_Ping_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PingRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["payment_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payment_id") - } - - protoReq.PaymentId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payment_id", err) - } - - msg, err := server.Ping(ctx, &protoReq) - return msg, metadata, err - -} - func request_ArkService_ListVtxos_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListVtxosRequest var metadata runtime.ServerMetadata @@ -386,102 +482,6 @@ func local_request_ArkService_ListVtxos_0(ctx context.Context, marshaler runtime } -func request_ArkService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetInfoRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ArkService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetInfoRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetInfo(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ArkService_GetBoardingAddress_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBoardingAddressRequest - 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.GetBoardingAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ArkService_GetBoardingAddress_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBoardingAddressRequest - 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.GetBoardingAddress(ctx, &protoReq) - return msg, metadata, err - -} - -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 - 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)) - 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 - 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) - return msg, metadata, err - -} - // RegisterArkServiceHandlerServer registers the http handlers for service ArkService to "mux". // UnaryRPC :call ArkServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -489,238 +489,6 @@ func local_request_ArkService_CompletePayment_0(ctx context.Context, marshaler r // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterArkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ArkServiceServer) error { - mux.Handle("POST", pattern_ArkService_RegisterPayment_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/RegisterPayment", runtime.WithHTTPPathPattern("/v1/payment/register")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_RegisterPayment_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_RegisterPayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_ClaimPayment_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/ClaimPayment", runtime.WithHTTPPathPattern("/v1/payment/claim")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_ClaimPayment_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_ClaimPayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_SendTreeNonces_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/SendTreeNonces", runtime.WithHTTPPathPattern("/v1/payment/tree/nonces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_SendTreeNonces_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_SendTreeNonces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_SendTreeSignatures_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/SendTreeSignatures", runtime.WithHTTPPathPattern("/v1/payment/tree/signatures")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_SendTreeSignatures_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_SendTreeSignatures_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_FinalizePayment_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/FinalizePayment", runtime.WithHTTPPathPattern("/v1/payment/finalize")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_FinalizePayment_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_FinalizePayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_GetRound_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/GetRound", runtime.WithHTTPPathPattern("/v1/round/{txid}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_GetRound_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_GetRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_GetRoundById_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/GetRoundById", runtime.WithHTTPPathPattern("/v1/round/id/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_GetRoundById_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_GetRoundById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_GetEventStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") - _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - }) - - mux.Handle("GET", pattern_ArkService_Ping_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/Ping", runtime.WithHTTPPathPattern("/v1/ping/{payment_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_Ping_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_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_ListVtxos_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/ListVtxos", runtime.WithHTTPPathPattern("/v1/vtxos/{address}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ArkService_ListVtxos_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_ListVtxos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_ArkService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -771,6 +539,163 @@ func RegisterArkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_ArkService_RegisterInputsForNextRound_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/RegisterInputsForNextRound", runtime.WithHTTPPathPattern("/v1/round/registerInputs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_RegisterInputsForNextRound_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_RegisterInputsForNextRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_RegisterOutputsForNextRound_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/RegisterOutputsForNextRound", runtime.WithHTTPPathPattern("/v1/round/registerOutputs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_RegisterOutputsForNextRound_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_RegisterOutputsForNextRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_SubmitTreeNonces_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/SubmitTreeNonces", runtime.WithHTTPPathPattern("/v1/round/tree/submitNonces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_SubmitTreeNonces_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_SubmitTreeNonces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_SubmitTreeSignatures_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/SubmitTreeSignatures", runtime.WithHTTPPathPattern("/v1/round/tree/submitSignatures")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_SubmitTreeSignatures_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_SubmitTreeSignatures_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_SubmitSignedForfeitTxs_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/SubmitSignedForfeitTxs", runtime.WithHTTPPathPattern("/v1/round/submitForfeitTxs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_SubmitSignedForfeitTxs_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_SubmitSignedForfeitTxs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_GetEventStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("GET", pattern_ArkService_Ping_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/Ping", runtime.WithHTTPPathPattern("/v1/round/ping/{payment_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_Ping_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_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_ArkService_CreatePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -821,6 +746,81 @@ func RegisterArkServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("GET", pattern_ArkService_GetRound_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/GetRound", runtime.WithHTTPPathPattern("/v1/round/{txid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_GetRound_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_GetRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_GetRoundById_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/GetRoundById", runtime.WithHTTPPathPattern("/v1/round/id/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_GetRoundById_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_GetRoundById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_ListVtxos_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/ListVtxos", runtime.WithHTTPPathPattern("/v1/vtxos/{address}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ArkService_ListVtxos_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_ListVtxos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -862,226 +862,6 @@ func RegisterArkServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // "ArkServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterArkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ArkServiceClient) error { - mux.Handle("POST", pattern_ArkService_RegisterPayment_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/RegisterPayment", runtime.WithHTTPPathPattern("/v1/payment/register")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_RegisterPayment_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_RegisterPayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_ClaimPayment_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/ClaimPayment", runtime.WithHTTPPathPattern("/v1/payment/claim")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_ClaimPayment_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_ClaimPayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_SendTreeNonces_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/SendTreeNonces", runtime.WithHTTPPathPattern("/v1/payment/tree/nonces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_SendTreeNonces_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_SendTreeNonces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_SendTreeSignatures_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/SendTreeSignatures", runtime.WithHTTPPathPattern("/v1/payment/tree/signatures")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_SendTreeSignatures_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_SendTreeSignatures_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ArkService_FinalizePayment_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/FinalizePayment", runtime.WithHTTPPathPattern("/v1/payment/finalize")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_FinalizePayment_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_FinalizePayment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_GetRound_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/GetRound", runtime.WithHTTPPathPattern("/v1/round/{txid}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_GetRound_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_GetRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_GetRoundById_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/GetRoundById", runtime.WithHTTPPathPattern("/v1/round/id/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_GetRoundById_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_GetRoundById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_GetEventStream_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/GetEventStream", runtime.WithHTTPPathPattern("/v1/events")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_GetEventStream_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_GetEventStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_Ping_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/Ping", runtime.WithHTTPPathPattern("/v1/ping/{payment_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_Ping_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_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ArkService_ListVtxos_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/ListVtxos", runtime.WithHTTPPathPattern("/v1/vtxos/{address}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ArkService_ListVtxos_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_ListVtxos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_ArkService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1126,6 +906,160 @@ func RegisterArkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_ArkService_RegisterInputsForNextRound_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/RegisterInputsForNextRound", runtime.WithHTTPPathPattern("/v1/round/registerInputs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_RegisterInputsForNextRound_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_RegisterInputsForNextRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_RegisterOutputsForNextRound_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/RegisterOutputsForNextRound", runtime.WithHTTPPathPattern("/v1/round/registerOutputs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_RegisterOutputsForNextRound_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_RegisterOutputsForNextRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_SubmitTreeNonces_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/SubmitTreeNonces", runtime.WithHTTPPathPattern("/v1/round/tree/submitNonces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_SubmitTreeNonces_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_SubmitTreeNonces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_SubmitTreeSignatures_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/SubmitTreeSignatures", runtime.WithHTTPPathPattern("/v1/round/tree/submitSignatures")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_SubmitTreeSignatures_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_SubmitTreeSignatures_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ArkService_SubmitSignedForfeitTxs_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/SubmitSignedForfeitTxs", runtime.WithHTTPPathPattern("/v1/round/submitForfeitTxs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_SubmitSignedForfeitTxs_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_SubmitSignedForfeitTxs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_GetEventStream_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/GetEventStream", runtime.WithHTTPPathPattern("/v1/round/events")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_GetEventStream_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_GetEventStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_Ping_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/Ping", runtime.WithHTTPPathPattern("/v1/round/ping/{payment_id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_Ping_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_Ping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_ArkService_CreatePayment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1170,65 +1104,131 @@ func RegisterArkServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("GET", pattern_ArkService_GetRound_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/GetRound", runtime.WithHTTPPathPattern("/v1/round/{txid}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_GetRound_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_GetRound_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_GetRoundById_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/GetRoundById", runtime.WithHTTPPathPattern("/v1/round/id/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_GetRoundById_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_GetRoundById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ArkService_ListVtxos_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/ListVtxos", runtime.WithHTTPPathPattern("/v1/vtxos/{address}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ArkService_ListVtxos_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_ListVtxos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( - pattern_ArkService_RegisterPayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "register"}, "")) + pattern_ArkService_GetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "info"}, "")) - pattern_ArkService_ClaimPayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "claim"}, "")) + pattern_ArkService_GetBoardingAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "boarding"}, "")) - pattern_ArkService_SendTreeNonces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "payment", "tree", "nonces"}, "")) + pattern_ArkService_RegisterInputsForNextRound_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "round", "registerInputs"}, "")) - pattern_ArkService_SendTreeSignatures_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "payment", "tree", "signatures"}, "")) + pattern_ArkService_RegisterOutputsForNextRound_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "round", "registerOutputs"}, "")) - pattern_ArkService_FinalizePayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "finalize"}, "")) + pattern_ArkService_SubmitTreeNonces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "round", "tree", "submitNonces"}, "")) + + pattern_ArkService_SubmitTreeSignatures_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "round", "tree", "submitSignatures"}, "")) + + pattern_ArkService_SubmitSignedForfeitTxs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "round", "submitForfeitTxs"}, "")) + + pattern_ArkService_GetEventStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "round", "events"}, "")) + + 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_GetRound_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "round", "txid"}, "")) pattern_ArkService_GetRoundById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 2}, []string{"v1", "round", "id"}, "")) - pattern_ArkService_GetEventStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "events"}, "")) - - pattern_ArkService_Ping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "ping", "payment_id"}, "")) - pattern_ArkService_ListVtxos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "vtxos", "address"}, "")) - - pattern_ArkService_GetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "info"}, "")) - - pattern_ArkService_GetBoardingAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "boarding"}, "")) - - 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"}, "")) ) var ( - forward_ArkService_RegisterPayment_0 = runtime.ForwardResponseMessage + forward_ArkService_GetInfo_0 = runtime.ForwardResponseMessage - forward_ArkService_ClaimPayment_0 = runtime.ForwardResponseMessage + forward_ArkService_GetBoardingAddress_0 = runtime.ForwardResponseMessage - forward_ArkService_SendTreeNonces_0 = runtime.ForwardResponseMessage + forward_ArkService_RegisterInputsForNextRound_0 = runtime.ForwardResponseMessage - forward_ArkService_SendTreeSignatures_0 = runtime.ForwardResponseMessage + forward_ArkService_RegisterOutputsForNextRound_0 = runtime.ForwardResponseMessage - forward_ArkService_FinalizePayment_0 = runtime.ForwardResponseMessage + forward_ArkService_SubmitTreeNonces_0 = runtime.ForwardResponseMessage - forward_ArkService_GetRound_0 = runtime.ForwardResponseMessage + forward_ArkService_SubmitTreeSignatures_0 = runtime.ForwardResponseMessage - forward_ArkService_GetRoundById_0 = runtime.ForwardResponseMessage + forward_ArkService_SubmitSignedForfeitTxs_0 = runtime.ForwardResponseMessage forward_ArkService_GetEventStream_0 = runtime.ForwardResponseStream forward_ArkService_Ping_0 = runtime.ForwardResponseMessage - forward_ArkService_ListVtxos_0 = runtime.ForwardResponseMessage - - forward_ArkService_GetInfo_0 = runtime.ForwardResponseMessage - - forward_ArkService_GetBoardingAddress_0 = runtime.ForwardResponseMessage - forward_ArkService_CreatePayment_0 = runtime.ForwardResponseMessage forward_ArkService_CompletePayment_0 = runtime.ForwardResponseMessage + + forward_ArkService_GetRound_0 = runtime.ForwardResponseMessage + + forward_ArkService_GetRoundById_0 = runtime.ForwardResponseMessage + + forward_ArkService_ListVtxos_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 05314c0..98c7404 100644 --- a/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go +++ b/api-spec/protobuf/gen/ark/v1/service_grpc.pb.go @@ -18,20 +18,20 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ArkServiceClient interface { - RegisterPayment(ctx context.Context, in *RegisterPaymentRequest, opts ...grpc.CallOption) (*RegisterPaymentResponse, error) - ClaimPayment(ctx context.Context, in *ClaimPaymentRequest, opts ...grpc.CallOption) (*ClaimPaymentResponse, error) - SendTreeNonces(ctx context.Context, in *SendTreeNoncesRequest, opts ...grpc.CallOption) (*SendTreeNoncesResponse, error) - SendTreeSignatures(ctx context.Context, in *SendTreeSignaturesRequest, opts ...grpc.CallOption) (*SendTreeSignaturesResponse, error) - FinalizePayment(ctx context.Context, in *FinalizePaymentRequest, opts ...grpc.CallOption) (*FinalizePaymentResponse, error) - GetRound(ctx context.Context, in *GetRoundRequest, opts ...grpc.CallOption) (*GetRoundResponse, error) - GetRoundById(ctx context.Context, in *GetRoundByIdRequest, opts ...grpc.CallOption) (*GetRoundByIdResponse, error) - GetEventStream(ctx context.Context, in *GetEventStreamRequest, opts ...grpc.CallOption) (ArkService_GetEventStreamClient, error) - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) - ListVtxos(ctx context.Context, in *ListVtxosRequest, opts ...grpc.CallOption) (*ListVtxosResponse, error) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) GetBoardingAddress(ctx context.Context, in *GetBoardingAddressRequest, opts ...grpc.CallOption) (*GetBoardingAddressResponse, error) + RegisterInputsForNextRound(ctx context.Context, in *RegisterInputsForNextRoundRequest, opts ...grpc.CallOption) (*RegisterInputsForNextRoundResponse, error) + RegisterOutputsForNextRound(ctx context.Context, in *RegisterOutputsForNextRoundRequest, opts ...grpc.CallOption) (*RegisterOutputsForNextRoundResponse, error) + SubmitTreeNonces(ctx context.Context, in *SubmitTreeNoncesRequest, opts ...grpc.CallOption) (*SubmitTreeNoncesResponse, error) + SubmitTreeSignatures(ctx context.Context, in *SubmitTreeSignaturesRequest, opts ...grpc.CallOption) (*SubmitTreeSignaturesResponse, error) + 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) + 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) } type arkServiceClient struct { @@ -42,63 +42,63 @@ func NewArkServiceClient(cc grpc.ClientConnInterface) ArkServiceClient { return &arkServiceClient{cc} } -func (c *arkServiceClient) RegisterPayment(ctx context.Context, in *RegisterPaymentRequest, opts ...grpc.CallOption) (*RegisterPaymentResponse, error) { - out := new(RegisterPaymentResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/RegisterPayment", in, out, opts...) +func (c *arkServiceClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) { + out := new(GetInfoResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetInfo", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *arkServiceClient) ClaimPayment(ctx context.Context, in *ClaimPaymentRequest, opts ...grpc.CallOption) (*ClaimPaymentResponse, error) { - out := new(ClaimPaymentResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/ClaimPayment", in, out, opts...) +func (c *arkServiceClient) GetBoardingAddress(ctx context.Context, in *GetBoardingAddressRequest, opts ...grpc.CallOption) (*GetBoardingAddressResponse, error) { + out := new(GetBoardingAddressResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetBoardingAddress", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *arkServiceClient) SendTreeNonces(ctx context.Context, in *SendTreeNoncesRequest, opts ...grpc.CallOption) (*SendTreeNoncesResponse, error) { - out := new(SendTreeNoncesResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/SendTreeNonces", in, out, opts...) +func (c *arkServiceClient) RegisterInputsForNextRound(ctx context.Context, in *RegisterInputsForNextRoundRequest, opts ...grpc.CallOption) (*RegisterInputsForNextRoundResponse, error) { + out := new(RegisterInputsForNextRoundResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/RegisterInputsForNextRound", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *arkServiceClient) SendTreeSignatures(ctx context.Context, in *SendTreeSignaturesRequest, opts ...grpc.CallOption) (*SendTreeSignaturesResponse, error) { - out := new(SendTreeSignaturesResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/SendTreeSignatures", in, out, opts...) +func (c *arkServiceClient) RegisterOutputsForNextRound(ctx context.Context, in *RegisterOutputsForNextRoundRequest, opts ...grpc.CallOption) (*RegisterOutputsForNextRoundResponse, error) { + out := new(RegisterOutputsForNextRoundResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/RegisterOutputsForNextRound", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *arkServiceClient) FinalizePayment(ctx context.Context, in *FinalizePaymentRequest, opts ...grpc.CallOption) (*FinalizePaymentResponse, error) { - out := new(FinalizePaymentResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/FinalizePayment", in, out, opts...) +func (c *arkServiceClient) SubmitTreeNonces(ctx context.Context, in *SubmitTreeNoncesRequest, opts ...grpc.CallOption) (*SubmitTreeNoncesResponse, error) { + out := new(SubmitTreeNoncesResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/SubmitTreeNonces", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *arkServiceClient) GetRound(ctx context.Context, in *GetRoundRequest, opts ...grpc.CallOption) (*GetRoundResponse, error) { - out := new(GetRoundResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetRound", in, out, opts...) +func (c *arkServiceClient) SubmitTreeSignatures(ctx context.Context, in *SubmitTreeSignaturesRequest, opts ...grpc.CallOption) (*SubmitTreeSignaturesResponse, error) { + out := new(SubmitTreeSignaturesResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/SubmitTreeSignatures", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *arkServiceClient) GetRoundById(ctx context.Context, in *GetRoundByIdRequest, opts ...grpc.CallOption) (*GetRoundByIdResponse, error) { - out := new(GetRoundByIdResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetRoundById", in, out, opts...) +func (c *arkServiceClient) SubmitSignedForfeitTxs(ctx context.Context, in *SubmitSignedForfeitTxsRequest, opts ...grpc.CallOption) (*SubmitSignedForfeitTxsResponse, error) { + out := new(SubmitSignedForfeitTxsResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/SubmitSignedForfeitTxs", in, out, opts...) if err != nil { return nil, err } @@ -146,33 +146,6 @@ func (c *arkServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...gr return out, nil } -func (c *arkServiceClient) ListVtxos(ctx context.Context, in *ListVtxosRequest, opts ...grpc.CallOption) (*ListVtxosResponse, error) { - out := new(ListVtxosResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/ListVtxos", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arkServiceClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) { - out := new(GetInfoResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *arkServiceClient) GetBoardingAddress(ctx context.Context, in *GetBoardingAddressRequest, opts ...grpc.CallOption) (*GetBoardingAddressResponse, error) { - out := new(GetBoardingAddressResponse) - err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetBoardingAddress", in, out, opts...) - if err != nil { - return nil, err - } - 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...) @@ -191,50 +164,77 @@ func (c *arkServiceClient) CompletePayment(ctx context.Context, in *CompletePaym return out, nil } +func (c *arkServiceClient) GetRound(ctx context.Context, in *GetRoundRequest, opts ...grpc.CallOption) (*GetRoundResponse, error) { + out := new(GetRoundResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetRound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arkServiceClient) GetRoundById(ctx context.Context, in *GetRoundByIdRequest, opts ...grpc.CallOption) (*GetRoundByIdResponse, error) { + out := new(GetRoundByIdResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/GetRoundById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *arkServiceClient) ListVtxos(ctx context.Context, in *ListVtxosRequest, opts ...grpc.CallOption) (*ListVtxosResponse, error) { + out := new(ListVtxosResponse) + err := c.cc.Invoke(ctx, "/ark.v1.ArkService/ListVtxos", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ArkServiceServer is the server API for ArkService service. // All implementations should embed UnimplementedArkServiceServer // for forward compatibility type ArkServiceServer interface { - RegisterPayment(context.Context, *RegisterPaymentRequest) (*RegisterPaymentResponse, error) - ClaimPayment(context.Context, *ClaimPaymentRequest) (*ClaimPaymentResponse, error) - SendTreeNonces(context.Context, *SendTreeNoncesRequest) (*SendTreeNoncesResponse, error) - SendTreeSignatures(context.Context, *SendTreeSignaturesRequest) (*SendTreeSignaturesResponse, error) - FinalizePayment(context.Context, *FinalizePaymentRequest) (*FinalizePaymentResponse, error) - GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) - GetRoundById(context.Context, *GetRoundByIdRequest) (*GetRoundByIdResponse, error) - GetEventStream(*GetEventStreamRequest, ArkService_GetEventStreamServer) error - Ping(context.Context, *PingRequest) (*PingResponse, error) - ListVtxos(context.Context, *ListVtxosRequest) (*ListVtxosResponse, error) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) GetBoardingAddress(context.Context, *GetBoardingAddressRequest) (*GetBoardingAddressResponse, error) + RegisterInputsForNextRound(context.Context, *RegisterInputsForNextRoundRequest) (*RegisterInputsForNextRoundResponse, error) + RegisterOutputsForNextRound(context.Context, *RegisterOutputsForNextRoundRequest) (*RegisterOutputsForNextRoundResponse, error) + SubmitTreeNonces(context.Context, *SubmitTreeNoncesRequest) (*SubmitTreeNoncesResponse, error) + SubmitTreeSignatures(context.Context, *SubmitTreeSignaturesRequest) (*SubmitTreeSignaturesResponse, error) + 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) + GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) + GetRoundById(context.Context, *GetRoundByIdRequest) (*GetRoundByIdResponse, error) + ListVtxos(context.Context, *ListVtxosRequest) (*ListVtxosResponse, error) } // UnimplementedArkServiceServer should be embedded to have forward compatible implementations. type UnimplementedArkServiceServer struct { } -func (UnimplementedArkServiceServer) RegisterPayment(context.Context, *RegisterPaymentRequest) (*RegisterPaymentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterPayment not implemented") +func (UnimplementedArkServiceServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") } -func (UnimplementedArkServiceServer) ClaimPayment(context.Context, *ClaimPaymentRequest) (*ClaimPaymentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimPayment not implemented") +func (UnimplementedArkServiceServer) GetBoardingAddress(context.Context, *GetBoardingAddressRequest) (*GetBoardingAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBoardingAddress not implemented") } -func (UnimplementedArkServiceServer) SendTreeNonces(context.Context, *SendTreeNoncesRequest) (*SendTreeNoncesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendTreeNonces not implemented") +func (UnimplementedArkServiceServer) RegisterInputsForNextRound(context.Context, *RegisterInputsForNextRoundRequest) (*RegisterInputsForNextRoundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterInputsForNextRound not implemented") } -func (UnimplementedArkServiceServer) SendTreeSignatures(context.Context, *SendTreeSignaturesRequest) (*SendTreeSignaturesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendTreeSignatures not implemented") +func (UnimplementedArkServiceServer) RegisterOutputsForNextRound(context.Context, *RegisterOutputsForNextRoundRequest) (*RegisterOutputsForNextRoundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterOutputsForNextRound not implemented") } -func (UnimplementedArkServiceServer) FinalizePayment(context.Context, *FinalizePaymentRequest) (*FinalizePaymentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FinalizePayment not implemented") +func (UnimplementedArkServiceServer) SubmitTreeNonces(context.Context, *SubmitTreeNoncesRequest) (*SubmitTreeNoncesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitTreeNonces not implemented") } -func (UnimplementedArkServiceServer) GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRound not implemented") +func (UnimplementedArkServiceServer) SubmitTreeSignatures(context.Context, *SubmitTreeSignaturesRequest) (*SubmitTreeSignaturesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitTreeSignatures not implemented") } -func (UnimplementedArkServiceServer) GetRoundById(context.Context, *GetRoundByIdRequest) (*GetRoundByIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRoundById not implemented") +func (UnimplementedArkServiceServer) SubmitSignedForfeitTxs(context.Context, *SubmitSignedForfeitTxsRequest) (*SubmitSignedForfeitTxsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitSignedForfeitTxs not implemented") } func (UnimplementedArkServiceServer) GetEventStream(*GetEventStreamRequest, ArkService_GetEventStreamServer) error { return status.Errorf(codes.Unimplemented, "method GetEventStream not implemented") @@ -242,21 +242,21 @@ 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) ListVtxos(context.Context, *ListVtxosRequest) (*ListVtxosResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListVtxos not implemented") -} -func (UnimplementedArkServiceServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") -} -func (UnimplementedArkServiceServer) GetBoardingAddress(context.Context, *GetBoardingAddressRequest) (*GetBoardingAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBoardingAddress 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) GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRound not implemented") +} +func (UnimplementedArkServiceServer) GetRoundById(context.Context, *GetRoundByIdRequest) (*GetRoundByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRoundById not implemented") +} +func (UnimplementedArkServiceServer) ListVtxos(context.Context, *ListVtxosRequest) (*ListVtxosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListVtxos not implemented") +} // UnsafeArkServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ArkServiceServer will @@ -269,128 +269,128 @@ func RegisterArkServiceServer(s grpc.ServiceRegistrar, srv ArkServiceServer) { s.RegisterService(&ArkService_ServiceDesc, srv) } -func _ArkService_RegisterPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterPaymentRequest) +func _ArkService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).RegisterPayment(ctx, in) + return srv.(ArkServiceServer).GetInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/RegisterPayment", + FullMethod: "/ark.v1.ArkService/GetInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).RegisterPayment(ctx, req.(*RegisterPaymentRequest)) + return srv.(ArkServiceServer).GetInfo(ctx, req.(*GetInfoRequest)) } return interceptor(ctx, in, info, handler) } -func _ArkService_ClaimPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClaimPaymentRequest) +func _ArkService_GetBoardingAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBoardingAddressRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).ClaimPayment(ctx, in) + return srv.(ArkServiceServer).GetBoardingAddress(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/ClaimPayment", + FullMethod: "/ark.v1.ArkService/GetBoardingAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).ClaimPayment(ctx, req.(*ClaimPaymentRequest)) + return srv.(ArkServiceServer).GetBoardingAddress(ctx, req.(*GetBoardingAddressRequest)) } return interceptor(ctx, in, info, handler) } -func _ArkService_SendTreeNonces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendTreeNoncesRequest) +func _ArkService_RegisterInputsForNextRound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterInputsForNextRoundRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).SendTreeNonces(ctx, in) + return srv.(ArkServiceServer).RegisterInputsForNextRound(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/SendTreeNonces", + FullMethod: "/ark.v1.ArkService/RegisterInputsForNextRound", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).SendTreeNonces(ctx, req.(*SendTreeNoncesRequest)) + return srv.(ArkServiceServer).RegisterInputsForNextRound(ctx, req.(*RegisterInputsForNextRoundRequest)) } return interceptor(ctx, in, info, handler) } -func _ArkService_SendTreeSignatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendTreeSignaturesRequest) +func _ArkService_RegisterOutputsForNextRound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterOutputsForNextRoundRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).SendTreeSignatures(ctx, in) + return srv.(ArkServiceServer).RegisterOutputsForNextRound(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/SendTreeSignatures", + FullMethod: "/ark.v1.ArkService/RegisterOutputsForNextRound", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).SendTreeSignatures(ctx, req.(*SendTreeSignaturesRequest)) + return srv.(ArkServiceServer).RegisterOutputsForNextRound(ctx, req.(*RegisterOutputsForNextRoundRequest)) } return interceptor(ctx, in, info, handler) } -func _ArkService_FinalizePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FinalizePaymentRequest) +func _ArkService_SubmitTreeNonces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitTreeNoncesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).FinalizePayment(ctx, in) + return srv.(ArkServiceServer).SubmitTreeNonces(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/FinalizePayment", + FullMethod: "/ark.v1.ArkService/SubmitTreeNonces", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).FinalizePayment(ctx, req.(*FinalizePaymentRequest)) + return srv.(ArkServiceServer).SubmitTreeNonces(ctx, req.(*SubmitTreeNoncesRequest)) } return interceptor(ctx, in, info, handler) } -func _ArkService_GetRound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRoundRequest) +func _ArkService_SubmitTreeSignatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitTreeSignaturesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).GetRound(ctx, in) + return srv.(ArkServiceServer).SubmitTreeSignatures(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/GetRound", + FullMethod: "/ark.v1.ArkService/SubmitTreeSignatures", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).GetRound(ctx, req.(*GetRoundRequest)) + return srv.(ArkServiceServer).SubmitTreeSignatures(ctx, req.(*SubmitTreeSignaturesRequest)) } return interceptor(ctx, in, info, handler) } -func _ArkService_GetRoundById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRoundByIdRequest) +func _ArkService_SubmitSignedForfeitTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SubmitSignedForfeitTxsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ArkServiceServer).GetRoundById(ctx, in) + return srv.(ArkServiceServer).SubmitSignedForfeitTxs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ark.v1.ArkService/GetRoundById", + FullMethod: "/ark.v1.ArkService/SubmitSignedForfeitTxs", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).GetRoundById(ctx, req.(*GetRoundByIdRequest)) + return srv.(ArkServiceServer).SubmitSignedForfeitTxs(ctx, req.(*SubmitSignedForfeitTxsRequest)) } return interceptor(ctx, in, info, handler) } @@ -434,60 +434,6 @@ func _ArkService_Ping_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _ArkService_ListVtxos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListVtxosRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArkServiceServer).ListVtxos(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ark.v1.ArkService/ListVtxos", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).ListVtxos(ctx, req.(*ListVtxosRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArkService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArkServiceServer).GetInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ark.v1.ArkService/GetInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).GetInfo(ctx, req.(*GetInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ArkService_GetBoardingAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBoardingAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ArkServiceServer).GetBoardingAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ark.v1.ArkService/GetBoardingAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArkServiceServer).GetBoardingAddress(ctx, req.(*GetBoardingAddressRequest)) - } - 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) if err := dec(in); err != nil { @@ -524,6 +470,60 @@ func _ArkService_CompletePayment_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _ArkService_GetRound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRoundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).GetRound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/GetRound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).GetRound(ctx, req.(*GetRoundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArkService_GetRoundById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRoundByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).GetRoundById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/GetRoundById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).GetRoundById(ctx, req.(*GetRoundByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArkService_ListVtxos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListVtxosRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArkServiceServer).ListVtxos(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ark.v1.ArkService/ListVtxos", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArkServiceServer).ListVtxos(ctx, req.(*ListVtxosRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ArkService_ServiceDesc is the grpc.ServiceDesc for ArkService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -532,24 +532,44 @@ var ArkService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*ArkServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "RegisterPayment", - Handler: _ArkService_RegisterPayment_Handler, + MethodName: "GetInfo", + Handler: _ArkService_GetInfo_Handler, }, { - MethodName: "ClaimPayment", - Handler: _ArkService_ClaimPayment_Handler, + MethodName: "GetBoardingAddress", + Handler: _ArkService_GetBoardingAddress_Handler, }, { - MethodName: "SendTreeNonces", - Handler: _ArkService_SendTreeNonces_Handler, + MethodName: "RegisterInputsForNextRound", + Handler: _ArkService_RegisterInputsForNextRound_Handler, }, { - MethodName: "SendTreeSignatures", - Handler: _ArkService_SendTreeSignatures_Handler, + MethodName: "RegisterOutputsForNextRound", + Handler: _ArkService_RegisterOutputsForNextRound_Handler, }, { - MethodName: "FinalizePayment", - Handler: _ArkService_FinalizePayment_Handler, + MethodName: "SubmitTreeNonces", + Handler: _ArkService_SubmitTreeNonces_Handler, + }, + { + MethodName: "SubmitTreeSignatures", + Handler: _ArkService_SubmitTreeSignatures_Handler, + }, + { + MethodName: "SubmitSignedForfeitTxs", + Handler: _ArkService_SubmitSignedForfeitTxs_Handler, + }, + { + MethodName: "Ping", + Handler: _ArkService_Ping_Handler, + }, + { + MethodName: "CreatePayment", + Handler: _ArkService_CreatePayment_Handler, + }, + { + MethodName: "CompletePayment", + Handler: _ArkService_CompletePayment_Handler, }, { MethodName: "GetRound", @@ -559,30 +579,10 @@ var ArkService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetRoundById", Handler: _ArkService_GetRoundById_Handler, }, - { - MethodName: "Ping", - Handler: _ArkService_Ping_Handler, - }, { MethodName: "ListVtxos", Handler: _ArkService_ListVtxos_Handler, }, - { - MethodName: "GetInfo", - Handler: _ArkService_GetInfo_Handler, - }, - { - MethodName: "GetBoardingAddress", - Handler: _ArkService_GetBoardingAddress_Handler, - }, - { - MethodName: "CreatePayment", - Handler: _ArkService_CreatePayment_Handler, - }, - { - MethodName: "CompletePayment", - Handler: _ArkService_CompletePayment_Handler, - }, }, Streams: []grpc.StreamDesc{ { diff --git a/pkg/client-sdk/client/client.go b/pkg/client-sdk/client/client.go index 350ddcb..05776aa 100644 --- a/pkg/client-sdk/client/client.go +++ b/pkg/client-sdk/client/client.go @@ -21,35 +21,34 @@ type RoundEvent interface { type ASPClient interface { GetInfo(ctx context.Context) (*Info, 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) - RegisterPayment( + RegisterInputsForNextRound( ctx context.Context, inputs []Input, ephemeralKey string, ) (string, error) - ClaimPayment( + RegisterOutputsForNextRound( ctx context.Context, paymentID string, outputs []Output, ) error + SubmitTreeNonces( + ctx context.Context, roundID, cosignerPubkey string, nonces bitcointree.TreeNonces, + ) error + SubmitTreeSignatures( + ctx context.Context, roundID, cosignerPubkey string, signatures bitcointree.TreePartialSigs, + ) error + SubmitSignedForfeitTxs( + ctx context.Context, signedForfeitTxs []string, signedRoundTx string, + ) error GetEventStream( ctx context.Context, paymentID string, ) (<-chan RoundEventChannel, func(), error) Ping(ctx context.Context, paymentID string) (RoundEvent, error) - FinalizePayment( - ctx context.Context, signedForfeitTxs []string, signedRoundTx string, - ) error CreatePayment( ctx context.Context, inputs []Input, outputs []Output, ) (string, []string, error) CompletePayment( ctx context.Context, signedRedeemTx string, signedUnconditionalForfeitTxs []string, ) error - GetBoardingAddress(ctx context.Context, userPubkey string) (string, error) - SendTreeNonces( - ctx context.Context, roundID, cosignerPubkey string, nonces bitcointree.TreeNonces, - ) error - SendTreeSignatures( - ctx context.Context, roundID, cosignerPubkey string, signatures bitcointree.TreePartialSigs, - ) 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) Close() } diff --git a/pkg/client-sdk/client/grpc/client.go b/pkg/client-sdk/client/grpc/client.go index 0c38b77..1bf0b4d 100644 --- a/pkg/client-sdk/client/grpc/client.go +++ b/pkg/client-sdk/client/grpc/client.go @@ -13,8 +13,6 @@ import ( "github.com/ark-network/ark/common/tree" "github.com/ark-network/ark/pkg/client-sdk/client" "github.com/ark-network/ark/pkg/client-sdk/internal/utils" - "github.com/decred/dcrd/dcrec/secp256k1/v4" - "github.com/lightningnetwork/lnd/lnwallet/chainfee" "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/credentials" @@ -53,9 +51,126 @@ func NewClient(aspUrl string) (client.ASPClient, error) { return &grpcClient{conn, svc, treeCache}, nil } -func (c *grpcClient) Close() { - //nolint:all - c.conn.Close() +func (a *grpcClient) GetInfo(ctx context.Context) (*client.Info, error) { + req := &arkv1.GetInfoRequest{} + resp, err := a.svc.GetInfo(ctx, req) + if err != nil { + return nil, err + } + return &client.Info{ + Pubkey: resp.GetPubkey(), + RoundLifetime: resp.GetRoundLifetime(), + UnilateralExitDelay: resp.GetUnilateralExitDelay(), + RoundInterval: resp.GetRoundInterval(), + Network: resp.GetNetwork(), + Dust: uint64(resp.GetDust()), + BoardingDescriptorTemplate: resp.GetBoardingDescriptorTemplate(), + ForfeitAddress: resp.GetForfeitAddress(), + }, nil +} + +func (a *grpcClient) GetBoardingAddress( + ctx context.Context, userPubkey string, +) (string, error) { + req := &arkv1.GetBoardingAddressRequest{ + Pubkey: userPubkey, + } + resp, err := a.svc.GetBoardingAddress(ctx, req) + if err != nil { + return "", err + } + return resp.GetAddress(), nil +} + +func (a *grpcClient) RegisterInputsForNextRound( + ctx context.Context, inputs []client.Input, ephemeralPublicKey string, +) (string, error) { + req := &arkv1.RegisterInputsForNextRoundRequest{ + Inputs: ins(inputs).toProto(), + } + if len(ephemeralPublicKey) > 0 { + req.EphemeralPubkey = &ephemeralPublicKey + } + + resp, err := a.svc.RegisterInputsForNextRound(ctx, req) + if err != nil { + return "", err + } + return resp.GetId(), nil +} + +func (a *grpcClient) RegisterOutputsForNextRound( + ctx context.Context, paymentID string, outputs []client.Output, +) error { + req := &arkv1.RegisterOutputsForNextRoundRequest{ + Id: paymentID, + Outputs: outs(outputs).toProto(), + } + _, err := a.svc.RegisterOutputsForNextRound(ctx, req) + return err +} + +func (a *grpcClient) SubmitTreeNonces( + ctx context.Context, roundID, cosignerPubkey string, nonces bitcointree.TreeNonces, +) error { + var nonceBuffer bytes.Buffer + + if err := nonces.Encode(&nonceBuffer); err != nil { + return err + } + + serializedNonces := hex.EncodeToString(nonceBuffer.Bytes()) + + req := &arkv1.SubmitTreeNoncesRequest{ + RoundId: roundID, + PublicKey: cosignerPubkey, + TreeNonces: serializedNonces, + } + + if _, err := a.svc.SubmitTreeNonces(ctx, req); err != nil { + return err + } + + return nil +} + +func (a *grpcClient) SubmitTreeSignatures( + ctx context.Context, roundID, cosignerPubkey string, signatures bitcointree.TreePartialSigs, +) error { + var sigsBuffer bytes.Buffer + + if err := signatures.Encode(&sigsBuffer); err != nil { + return err + } + + serializedSigs := hex.EncodeToString(sigsBuffer.Bytes()) + + req := &arkv1.SubmitTreeSignaturesRequest{ + RoundId: roundID, + PublicKey: cosignerPubkey, + TreeSignatures: serializedSigs, + } + + if _, err := a.svc.SubmitTreeSignatures(ctx, req); err != nil { + return err + } + + return nil +} + +func (a *grpcClient) SubmitSignedForfeitTxs( + ctx context.Context, signedForfeitTxs []string, signedRoundTx string, +) error { + req := &arkv1.SubmitSignedForfeitTxsRequest{ + SignedForfeitTxs: signedForfeitTxs, + } + + if len(signedRoundTx) > 0 { + req.SignedRoundTx = &signedRoundTx + } + + _, err := a.svc.SubmitSignedForfeitTxs(ctx, req) + return err } func (a *grpcClient) GetEventStream( @@ -103,32 +218,47 @@ func (a *grpcClient) GetEventStream( return eventsCh, closeFn, nil } -func (a *grpcClient) GetInfo(ctx context.Context) (*client.Info, error) { - req := &arkv1.GetInfoRequest{} - resp, err := a.svc.GetInfo(ctx, req) +func (a *grpcClient) Ping( + ctx context.Context, paymentID string, +) (client.RoundEvent, error) { + req := &arkv1.PingRequest{ + PaymentId: paymentID, + } + resp, err := a.svc.Ping(ctx, req) if err != nil { return nil, err } - return &client.Info{ - Pubkey: resp.GetPubkey(), - RoundLifetime: resp.GetRoundLifetime(), - UnilateralExitDelay: resp.GetUnilateralExitDelay(), - RoundInterval: resp.GetRoundInterval(), - Network: resp.GetNetwork(), - Dust: uint64(resp.GetDust()), - BoardingDescriptorTemplate: resp.GetBoardingDescriptorTemplate(), - ForfeitAddress: resp.GetForfeitAddress(), - }, nil + + if resp.GetEvent() == nil { + return nil, nil + } + + return event{resp}.toRoundEvent() } -func (a *grpcClient) ListVtxos( - ctx context.Context, addr string, -) ([]client.Vtxo, []client.Vtxo, error) { - resp, err := a.svc.ListVtxos(ctx, &arkv1.ListVtxosRequest{Address: addr}) - if err != nil { - return nil, nil, err +func (a *grpcClient) CreatePayment( + ctx context.Context, inputs []client.Input, outputs []client.Output, +) (string, []string, error) { + req := &arkv1.CreatePaymentRequest{ + Inputs: ins(inputs).toProto(), + Outputs: outs(outputs).toProto(), } - return vtxos(resp.GetSpendableVtxos()).toVtxos(), vtxos(resp.GetSpentVtxos()).toVtxos(), nil + resp, err := a.svc.CreatePayment(ctx, req) + if err != nil { + return "", nil, err + } + return resp.SignedRedeemTx, resp.UsignedUnconditionalForfeitTxs, nil +} + +func (a *grpcClient) CompletePayment( + ctx context.Context, redeemTx string, signedForfeitTxs []string, +) error { + req := &arkv1.CompletePaymentRequest{ + SignedRedeemTx: redeemTx, + SignedUnconditionalForfeitTxs: signedForfeitTxs, + } + _, err := a.svc.CompletePayment(ctx, req) + return err } func (a *grpcClient) GetRound( @@ -158,92 +288,6 @@ func (a *grpcClient) GetRound( }, nil } -func (a *grpcClient) RegisterPayment( - ctx context.Context, inputs []client.Input, ephemeralPublicKey string, -) (string, error) { - req := &arkv1.RegisterPaymentRequest{ - Inputs: ins(inputs).toProto(), - } - if len(ephemeralPublicKey) > 0 { - req.EphemeralPubkey = &ephemeralPublicKey - } - - resp, err := a.svc.RegisterPayment(ctx, req) - if err != nil { - return "", err - } - return resp.GetId(), nil -} - -func (a *grpcClient) ClaimPayment( - ctx context.Context, paymentID string, outputs []client.Output, -) error { - req := &arkv1.ClaimPaymentRequest{ - Id: paymentID, - Outputs: outs(outputs).toProto(), - } - _, err := a.svc.ClaimPayment(ctx, req) - return err -} - -func (a *grpcClient) Ping( - ctx context.Context, paymentID string, -) (client.RoundEvent, error) { - req := &arkv1.PingRequest{ - PaymentId: paymentID, - } - resp, err := a.svc.Ping(ctx, req) - if err != nil { - return nil, err - } - - if resp.GetEvent() == nil { - return nil, nil - } - - return event{resp}.toRoundEvent() -} - -func (a *grpcClient) FinalizePayment( - ctx context.Context, signedForfeitTxs []string, signedRoundTx string, -) error { - req := &arkv1.FinalizePaymentRequest{ - SignedForfeitTxs: signedForfeitTxs, - } - - if len(signedRoundTx) > 0 { - req.SignedRoundTx = &signedRoundTx - } - - _, err := a.svc.FinalizePayment(ctx, req) - return err -} - -func (a *grpcClient) CreatePayment( - ctx context.Context, inputs []client.Input, outputs []client.Output, -) (string, []string, error) { - req := &arkv1.CreatePaymentRequest{ - Inputs: ins(inputs).toProto(), - Outputs: outs(outputs).toProto(), - } - resp, err := a.svc.CreatePayment(ctx, req) - if err != nil { - return "", nil, err - } - return resp.SignedRedeemTx, resp.UsignedUnconditionalForfeitTxs, nil -} - -func (a *grpcClient) CompletePayment( - ctx context.Context, redeemTx string, signedForfeitTxs []string, -) error { - req := &arkv1.CompletePaymentRequest{ - SignedRedeemTx: redeemTx, - SignedUnconditionalForfeitTxs: signedForfeitTxs, - } - _, err := a.svc.CompletePayment(ctx, req) - return err -} - func (a *grpcClient) GetRoundByID( ctx context.Context, roundID string, ) (*client.Round, error) { @@ -272,266 +316,17 @@ func (a *grpcClient) GetRoundByID( }, nil } -func (a *grpcClient) GetBoardingAddress( - ctx context.Context, userPubkey string, -) (string, error) { - req := &arkv1.GetBoardingAddressRequest{ - Pubkey: userPubkey, - } - resp, err := a.svc.GetBoardingAddress(ctx, req) +func (a *grpcClient) ListVtxos( + ctx context.Context, addr string, +) ([]client.Vtxo, []client.Vtxo, error) { + resp, err := a.svc.ListVtxos(ctx, &arkv1.ListVtxosRequest{Address: addr}) if err != nil { - return "", err + return nil, nil, err } - return resp.GetAddress(), nil + return vtxos(resp.GetSpendableVtxos()).toVtxos(), vtxos(resp.GetSpentVtxos()).toVtxos(), nil } -func (a *grpcClient) SendTreeNonces( - ctx context.Context, roundID, cosignerPubkey string, nonces bitcointree.TreeNonces, -) error { - var nonceBuffer bytes.Buffer - - if err := nonces.Encode(&nonceBuffer); err != nil { - return err - } - - serializedNonces := hex.EncodeToString(nonceBuffer.Bytes()) - - req := &arkv1.SendTreeNoncesRequest{ - RoundId: roundID, - PublicKey: cosignerPubkey, - TreeNonces: serializedNonces, - } - - if _, err := a.svc.SendTreeNonces(ctx, req); err != nil { - return err - } - - return nil -} - -func (a *grpcClient) SendTreeSignatures( - ctx context.Context, roundID, cosignerPubkey string, signatures bitcointree.TreePartialSigs, -) error { - var sigsBuffer bytes.Buffer - - if err := signatures.Encode(&sigsBuffer); err != nil { - return err - } - - serializedSigs := hex.EncodeToString(sigsBuffer.Bytes()) - - req := &arkv1.SendTreeSignaturesRequest{ - RoundId: roundID, - PublicKey: cosignerPubkey, - TreeSignatures: serializedSigs, - } - - if _, err := a.svc.SendTreeSignatures(ctx, req); err != nil { - return err - } - - return nil -} - -type out client.Output - -func (o out) toProto() *arkv1.Output { - if len(o.Address) > 0 { - return &arkv1.Output{ - Destination: &arkv1.Output_Address{ - Address: o.Address, - }, - Amount: o.Amount, - } - } - - return &arkv1.Output{ - Destination: &arkv1.Output_Descriptor_{ - Descriptor_: o.Descriptor, - }, - Amount: o.Amount, - } -} - -type outs []client.Output - -func (o outs) toProto() []*arkv1.Output { - list := make([]*arkv1.Output, 0, len(o)) - for _, oo := range o { - list = append(list, out(oo).toProto()) - } - return list -} - -// wrapper for GetEventStreamResponse and PingResponse -type eventResponse interface { - GetRoundFailed() *arkv1.RoundFailed - GetRoundFinalization() *arkv1.RoundFinalizationEvent - GetRoundFinalized() *arkv1.RoundFinalizedEvent - GetRoundSigning() *arkv1.RoundSigningEvent - GetRoundSigningNoncesGenerated() *arkv1.RoundSigningNoncesGeneratedEvent -} - -type event struct { - eventResponse -} - -func (e event) toRoundEvent() (client.RoundEvent, error) { - if ee := e.GetRoundFailed(); ee != nil { - return client.RoundFailedEvent{ - ID: ee.GetId(), - Reason: ee.GetReason(), - }, nil - } - if ee := e.GetRoundFinalization(); ee != nil { - tree := treeFromProto{ee.GetCongestionTree()}.parse() - return client.RoundFinalizationEvent{ - ID: ee.GetId(), - Tx: ee.GetPoolTx(), - Tree: tree, - Connectors: ee.GetConnectors(), - MinRelayFeeRate: chainfee.SatPerKVByte(ee.MinRelayFeeRate), - }, nil - } - - if ee := e.GetRoundFinalized(); ee != nil { - return client.RoundFinalizedEvent{ - ID: ee.GetId(), - Txid: ee.GetPoolTxid(), - }, nil - } - - if ee := e.GetRoundSigning(); ee != nil { - pubkeys := make([]*secp256k1.PublicKey, 0, len(ee.GetCosignersPubkeys())) - for _, pubkey := range ee.GetCosignersPubkeys() { - p, err := hex.DecodeString(pubkey) - if err != nil { - return nil, err - } - pk, err := secp256k1.ParsePubKey(p) - if err != nil { - return nil, err - } - pubkeys = append(pubkeys, pk) - } - - return client.RoundSigningStartedEvent{ - ID: ee.GetId(), - UnsignedTree: treeFromProto{ee.GetUnsignedTree()}.parse(), - CosignersPublicKeys: pubkeys, - UnsignedRoundTx: ee.GetUnsignedRoundTx(), - }, nil - } - - if ee := e.GetRoundSigningNoncesGenerated(); ee != nil { - nonces, err := bitcointree.DecodeNonces(hex.NewDecoder(strings.NewReader(ee.GetTreeNonces()))) - if err != nil { - return nil, err - } - return client.RoundSigningNoncesGeneratedEvent{ - ID: ee.GetId(), - Nonces: nonces, - }, nil - } - - return nil, fmt.Errorf("unknown event") -} - -type vtxo struct { - *arkv1.Vtxo -} - -func (v vtxo) toVtxo() client.Vtxo { - var expiresAt *time.Time - if v.GetExpireAt() > 0 { - t := time.Unix(v.GetExpireAt(), 0) - expiresAt = &t - } - var redeemTx string - var uncondForfeitTxs []string - if v.GetPendingData() != nil { - redeemTx = v.GetPendingData().GetRedeemTx() - uncondForfeitTxs = v.GetPendingData().GetUnconditionalForfeitTxs() - } - return client.Vtxo{ - Outpoint: client.Outpoint{ - Txid: v.GetOutpoint().GetTxid(), - VOut: v.GetOutpoint().GetVout(), - }, - Amount: v.GetAmount(), - RoundTxid: v.GetPoolTxid(), - ExpiresAt: expiresAt, - Pending: v.GetPending(), - RedeemTx: redeemTx, - UnconditionalForfeitTxs: uncondForfeitTxs, - SpentBy: v.GetSpentBy(), - Descriptor: v.GetDescriptor_(), - } -} - -type vtxos []*arkv1.Vtxo - -func (v vtxos) toVtxos() []client.Vtxo { - list := make([]client.Vtxo, 0, len(v)) - for _, vv := range v { - list = append(list, vtxo{vv}.toVtxo()) - } - return list -} - -func toProtoInput(i client.Input) *arkv1.Input { - return &arkv1.Input{ - Outpoint: &arkv1.Outpoint{ - Txid: i.Txid, - Vout: i.VOut, - }, - Descriptor_: i.Descriptor, - } -} - -type ins []client.Input - -func (i ins) toProto() []*arkv1.Input { - list := make([]*arkv1.Input, 0, len(i)) - for _, ii := range i { - list = append(list, toProtoInput(ii)) - } - return list -} - -type treeFromProto struct { - *arkv1.Tree -} - -func (t treeFromProto) parse() tree.CongestionTree { - levels := make(tree.CongestionTree, 0, len(t.GetLevels())) - - for _, level := range t.GetLevels() { - nodes := make([]tree.Node, 0, len(level.Nodes)) - - for _, node := range level.Nodes { - nodes = append(nodes, tree.Node{ - Txid: node.Txid, - Tx: node.Tx, - ParentTxid: node.ParentTxid, - }) - } - - levels = append(levels, nodes) - } - - for j, treeLvl := range levels { - for i, node := range treeLvl { - if len(levels.Children(node.Txid)) == 0 { - levels[j][i] = tree.Node{ - Txid: node.Txid, - Tx: node.Tx, - ParentTxid: node.ParentTxid, - Leaf: true, - } - } - } - } - - return levels +func (c *grpcClient) Close() { + //nolint:all + c.conn.Close() } diff --git a/pkg/client-sdk/client/grpc/types.go b/pkg/client-sdk/client/grpc/types.go new file mode 100644 index 0000000..073b6b5 --- /dev/null +++ b/pkg/client-sdk/client/grpc/types.go @@ -0,0 +1,208 @@ +package grpcclient + +import ( + "encoding/hex" + "fmt" + "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" + "github.com/decred/dcrd/dcrec/secp256k1/v4" + "github.com/lightningnetwork/lnd/lnwallet/chainfee" +) + +type out client.Output + +func (o out) toProto() *arkv1.Output { + return &arkv1.Output{ + Address: o.Address, + Descriptor_: o.Descriptor, + Amount: o.Amount, + } +} + +type outs []client.Output + +func (o outs) toProto() []*arkv1.Output { + list := make([]*arkv1.Output, 0, len(o)) + for _, oo := range o { + list = append(list, out(oo).toProto()) + } + return list +} + +// wrapper for GetEventStreamResponse and PingResponse +type eventResponse interface { + GetRoundFailed() *arkv1.RoundFailed + GetRoundFinalization() *arkv1.RoundFinalizationEvent + GetRoundFinalized() *arkv1.RoundFinalizedEvent + GetRoundSigning() *arkv1.RoundSigningEvent + GetRoundSigningNoncesGenerated() *arkv1.RoundSigningNoncesGeneratedEvent +} + +type event struct { + eventResponse +} + +func (e event) toRoundEvent() (client.RoundEvent, error) { + if ee := e.GetRoundFailed(); ee != nil { + return client.RoundFailedEvent{ + ID: ee.GetId(), + Reason: ee.GetReason(), + }, nil + } + if ee := e.GetRoundFinalization(); ee != nil { + tree := treeFromProto{ee.GetCongestionTree()}.parse() + return client.RoundFinalizationEvent{ + ID: ee.GetId(), + Tx: ee.GetPoolTx(), + Tree: tree, + Connectors: ee.GetConnectors(), + MinRelayFeeRate: chainfee.SatPerKVByte(ee.MinRelayFeeRate), + }, nil + } + + if ee := e.GetRoundFinalized(); ee != nil { + return client.RoundFinalizedEvent{ + ID: ee.GetId(), + Txid: ee.GetPoolTxid(), + }, nil + } + + if ee := e.GetRoundSigning(); ee != nil { + pubkeys := make([]*secp256k1.PublicKey, 0, len(ee.GetCosignersPubkeys())) + for _, pubkey := range ee.GetCosignersPubkeys() { + p, err := hex.DecodeString(pubkey) + if err != nil { + return nil, err + } + pk, err := secp256k1.ParsePubKey(p) + if err != nil { + return nil, err + } + pubkeys = append(pubkeys, pk) + } + + return client.RoundSigningStartedEvent{ + ID: ee.GetId(), + UnsignedTree: treeFromProto{ee.GetUnsignedTree()}.parse(), + CosignersPublicKeys: pubkeys, + UnsignedRoundTx: ee.GetUnsignedRoundTx(), + }, nil + } + + if ee := e.GetRoundSigningNoncesGenerated(); ee != nil { + nonces, err := bitcointree.DecodeNonces(hex.NewDecoder(strings.NewReader(ee.GetTreeNonces()))) + if err != nil { + return nil, err + } + return client.RoundSigningNoncesGeneratedEvent{ + ID: ee.GetId(), + Nonces: nonces, + }, nil + } + + return nil, fmt.Errorf("unknown event") +} + +type vtxo struct { + *arkv1.Vtxo +} + +func (v vtxo) toVtxo() client.Vtxo { + var expiresAt *time.Time + if v.GetExpireAt() > 0 { + t := time.Unix(v.GetExpireAt(), 0) + expiresAt = &t + } + var redeemTx string + var uncondForfeitTxs []string + if v.GetPendingData() != nil { + redeemTx = v.GetPendingData().GetRedeemTx() + uncondForfeitTxs = v.GetPendingData().GetUnconditionalForfeitTxs() + } + return client.Vtxo{ + Outpoint: client.Outpoint{ + Txid: v.GetOutpoint().GetTxid(), + VOut: v.GetOutpoint().GetVout(), + }, + Amount: v.GetAmount(), + RoundTxid: v.GetPoolTxid(), + ExpiresAt: expiresAt, + Pending: v.GetPending(), + RedeemTx: redeemTx, + UnconditionalForfeitTxs: uncondForfeitTxs, + SpentBy: v.GetSpentBy(), + Descriptor: v.GetDescriptor_(), + } +} + +type vtxos []*arkv1.Vtxo + +func (v vtxos) toVtxos() []client.Vtxo { + list := make([]client.Vtxo, 0, len(v)) + for _, vv := range v { + list = append(list, vtxo{vv}.toVtxo()) + } + return list +} + +func toProtoInput(i client.Input) *arkv1.Input { + return &arkv1.Input{ + Outpoint: &arkv1.Outpoint{ + Txid: i.Txid, + Vout: i.VOut, + }, + Descriptor_: i.Descriptor, + } +} + +type ins []client.Input + +func (i ins) toProto() []*arkv1.Input { + list := make([]*arkv1.Input, 0, len(i)) + for _, ii := range i { + list = append(list, toProtoInput(ii)) + } + return list +} + +type treeFromProto struct { + *arkv1.Tree +} + +func (t treeFromProto) parse() tree.CongestionTree { + levels := make(tree.CongestionTree, 0, len(t.GetLevels())) + + for _, level := range t.GetLevels() { + nodes := make([]tree.Node, 0, len(level.Nodes)) + + for _, node := range level.Nodes { + nodes = append(nodes, tree.Node{ + Txid: node.Txid, + Tx: node.Tx, + ParentTxid: node.ParentTxid, + }) + } + + levels = append(levels, nodes) + } + + for j, treeLvl := range levels { + for i, node := range treeLvl { + if len(levels.Children(node.Txid)) == 0 { + levels[j][i] = tree.Node{ + Txid: node.Txid, + Tx: node.Tx, + ParentTxid: node.ParentTxid, + Leaf: true, + } + } + } + } + + return levels +} diff --git a/pkg/client-sdk/client/rest/client.go b/pkg/client-sdk/client/rest/client.go index cb34d23..ded0d78 100644 --- a/pkg/client-sdk/client/rest/client.go +++ b/pkg/client-sdk/client/rest/client.go @@ -44,7 +44,181 @@ func NewClient(aspUrl string) (client.ASPClient, error) { return &restClient{svc, reqTimeout, treeCache}, nil } -func (c *restClient) Close() {} +func (a *restClient) GetInfo( + ctx context.Context, +) (*client.Info, error) { + resp, err := a.svc.ArkServiceGetInfo(ark_service.NewArkServiceGetInfoParams()) + if err != nil { + return nil, err + } + + roundLifetime, err := strconv.Atoi(resp.Payload.RoundLifetime) + if err != nil { + return nil, err + } + + unilateralExitDelay, err := strconv.Atoi(resp.Payload.UnilateralExitDelay) + if err != nil { + return nil, err + } + + roundInterval, err := strconv.Atoi(resp.Payload.RoundInterval) + if err != nil { + return nil, err + } + + dust, err := strconv.Atoi(resp.Payload.Dust) + if err != nil { + return nil, err + } + + return &client.Info{ + Pubkey: resp.Payload.Pubkey, + RoundLifetime: int64(roundLifetime), + UnilateralExitDelay: int64(unilateralExitDelay), + RoundInterval: int64(roundInterval), + Network: resp.Payload.Network, + Dust: uint64(dust), + BoardingDescriptorTemplate: resp.Payload.BoardingDescriptorTemplate, + ForfeitAddress: resp.Payload.ForfeitAddress, + }, nil +} + +func (a *restClient) GetBoardingAddress( + ctx context.Context, pubkey string, +) (string, error) { + body := models.V1GetBoardingAddressRequest{ + Pubkey: pubkey, + } + + resp, err := a.svc.ArkServiceGetBoardingAddress( + ark_service.NewArkServiceGetBoardingAddressParams().WithBody(&body), + ) + if err != nil { + return "", + err + } + return resp.Payload.Address, nil +} + +func (a *restClient) RegisterInputsForNextRound( + ctx context.Context, inputs []client.Input, ephemeralPublicKey string, +) (string, error) { + ins := make([]*models.V1Input, 0, len(inputs)) + for _, i := range inputs { + ins = append(ins, &models.V1Input{ + Outpoint: &models.V1Outpoint{ + Txid: i.Txid, + Vout: int64(i.VOut), + }, + Descriptor: i.Descriptor, + }) + } + body := &models.V1RegisterInputsForNextRoundRequest{ + Inputs: ins, + } + if len(ephemeralPublicKey) > 0 { + body.EphemeralPubkey = ephemeralPublicKey + } + + resp, err := a.svc.ArkServiceRegisterInputsForNextRound( + ark_service.NewArkServiceRegisterInputsForNextRoundParams().WithBody(body), + ) + if err != nil { + return "", err + } + + return resp.Payload.ID, nil +} + +func (a *restClient) RegisterOutputsForNextRound( + ctx context.Context, paymentID string, outputs []client.Output, +) error { + outs := make([]*models.V1Output, 0, len(outputs)) + for _, o := range outputs { + outs = append(outs, &models.V1Output{ + Address: o.Address, + Descriptor: o.Descriptor, + Amount: strconv.Itoa(int(o.Amount)), + }) + } + body := models.V1RegisterOutputsForNextRoundRequest{ + ID: paymentID, + Outputs: outs, + } + + _, err := a.svc.ArkServiceRegisterOutputsForNextRound( + ark_service.NewArkServiceRegisterOutputsForNextRoundParams().WithBody(&body), + ) + return err +} + +func (a *restClient) SubmitTreeNonces( + ctx context.Context, roundID, cosignerPubkey string, + nonces bitcointree.TreeNonces, +) error { + var nonceBuffer bytes.Buffer + + if err := nonces.Encode(&nonceBuffer); err != nil { + return err + } + + serializedNonces := hex.EncodeToString(nonceBuffer.Bytes()) + + body := &models.V1SubmitTreeNoncesRequest{ + RoundID: roundID, + PublicKey: cosignerPubkey, + TreeNonces: serializedNonces, + } + + if _, err := a.svc.ArkServiceSubmitTreeNonces( + ark_service.NewArkServiceSubmitTreeNoncesParams().WithBody(body), + ); err != nil { + return err + } + + return nil +} + +func (a *restClient) SubmitTreeSignatures( + ctx context.Context, roundID, cosignerPubkey string, + signatures bitcointree.TreePartialSigs, +) error { + var sigsBuffer bytes.Buffer + + if err := signatures.Encode(&sigsBuffer); err != nil { + return err + } + + serializedSigs := hex.EncodeToString(sigsBuffer.Bytes()) + + body := &models.V1SubmitTreeSignaturesRequest{ + RoundID: roundID, + PublicKey: cosignerPubkey, + TreeSignatures: serializedSigs, + } + + if _, err := a.svc.ArkServiceSubmitTreeSignatures( + ark_service.NewArkServiceSubmitTreeSignaturesParams().WithBody(body), + ); err != nil { + return err + } + + return nil +} + +func (a *restClient) SubmitSignedForfeitTxs( + ctx context.Context, signedForfeitTxs []string, signedRoundTx string, +) error { + body := models.V1SubmitSignedForfeitTxsRequest{ + SignedForfeitTxs: signedForfeitTxs, + SignedRoundTx: signedRoundTx, + } + _, err := a.svc.ArkServiceSubmitSignedForfeitTxs( + ark_service.NewArkServiceSubmitSignedForfeitTxsParams().WithBody(&body), + ) + return err +} func (a *restClient) GetEventStream( ctx context.Context, paymentID string, @@ -94,43 +268,211 @@ func (a *restClient) GetEventStream( return eventsCh, close, nil } -func (a *restClient) GetInfo( - ctx context.Context, -) (*client.Info, error) { - resp, err := a.svc.ArkServiceGetInfo(ark_service.NewArkServiceGetInfoParams()) +func (a *restClient) Ping( + ctx context.Context, paymentID string, +) (client.RoundEvent, error) { + r := ark_service.NewArkServicePingParams() + r.SetPaymentID(paymentID) + resp, err := a.svc.ArkServicePing(r) if err != nil { return nil, err } - roundLifetime, err := strconv.Atoi(resp.Payload.RoundLifetime) + payload := resp.Payload + + if e := payload.RoundFailed; e != nil { + return client.RoundFailedEvent{ + ID: e.ID, + Reason: e.Reason, + }, nil + } + if e := payload.RoundFinalization; e != nil { + tree := treeFromProto{e.CongestionTree}.parse() + + minRelayFeeRate, err := strconv.Atoi(e.MinRelayFeeRate) + if err != nil { + return nil, err + } + + return client.RoundFinalizationEvent{ + ID: e.ID, + Tx: e.PoolTx, + Tree: tree, + Connectors: e.Connectors, + MinRelayFeeRate: chainfee.SatPerKVByte(minRelayFeeRate), + }, nil + } + + if e := payload.RoundFinalized; e != nil { + return client.RoundFinalizedEvent{ + ID: e.ID, + Txid: e.PoolTxid, + }, nil + } + + if e := payload.RoundSigning; e != nil { + pubkeys := make([]*secp256k1.PublicKey, 0, len(e.CosignersPubkeys)) + for _, pubkey := range e.CosignersPubkeys { + p, err := hex.DecodeString(pubkey) + if err != nil { + return nil, err + } + pk, err := secp256k1.ParsePubKey(p) + if err != nil { + return nil, err + } + pubkeys = append(pubkeys, pk) + } + + return client.RoundSigningStartedEvent{ + ID: e.ID, + UnsignedTree: treeFromProto{e.UnsignedTree}.parse(), + CosignersPublicKeys: pubkeys, + UnsignedRoundTx: e.UnsignedRoundTx, + }, nil + } + + if e := payload.RoundSigningNoncesGenerated; e != nil { + reader := hex.NewDecoder(strings.NewReader(e.TreeNonces)) + nonces, err := bitcointree.DecodeNonces(reader) + if err != nil { + return nil, err + } + return client.RoundSigningNoncesGeneratedEvent{ + ID: e.ID, + Nonces: nonces, + }, nil + } + + return nil, nil +} + +func (a *restClient) CreatePayment( + ctx context.Context, inputs []client.Input, outputs []client.Output, +) (string, []string, error) { + ins := make([]*models.V1Input, 0, len(inputs)) + for _, i := range inputs { + ins = append(ins, &models.V1Input{ + Outpoint: &models.V1Outpoint{ + Txid: i.Txid, + Vout: int64(i.VOut), + }, + Descriptor: i.Descriptor, + }) + } + 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)), + Descriptor: o.Descriptor, + }) + } + body := models.V1CreatePaymentRequest{ + Inputs: ins, + Outputs: outs, + } + resp, err := a.svc.ArkServiceCreatePayment( + ark_service.NewArkServiceCreatePaymentParams().WithBody(&body), + ) + if err != nil { + return "", nil, err + } + return resp.GetPayload().SignedRedeemTx, resp.GetPayload().UsignedUnconditionalForfeitTxs, nil +} + +func (a *restClient) CompletePayment( + ctx context.Context, signedRedeemTx string, signedUncondForfeitTxs []string, +) error { + req := &arkv1.CompletePaymentRequest{ + SignedRedeemTx: signedRedeemTx, + SignedUnconditionalForfeitTxs: signedUncondForfeitTxs, + } + body := models.V1CompletePaymentRequest{ + SignedRedeemTx: req.GetSignedRedeemTx(), + SignedUnconditionalForfeitTxs: req.GetSignedUnconditionalForfeitTxs(), + } + _, err := a.svc.ArkServiceCompletePayment( + ark_service.NewArkServiceCompletePaymentParams().WithBody(&body), + ) + return err +} + +func (a *restClient) GetRound( + ctx context.Context, txID string, +) (*client.Round, error) { + resp, err := a.svc.ArkServiceGetRound( + ark_service.NewArkServiceGetRoundParams().WithTxid(txID), + ) if err != nil { return nil, err } - unilateralExitDelay, err := strconv.Atoi(resp.Payload.UnilateralExitDelay) + start, err := strconv.Atoi(resp.Payload.Round.Start) if err != nil { return nil, err } - roundInterval, err := strconv.Atoi(resp.Payload.RoundInterval) + end, err := strconv.Atoi(resp.Payload.Round.End) if err != nil { return nil, err } - dust, err := strconv.Atoi(resp.Payload.Dust) + startedAt := time.Unix(int64(start), 0) + var endedAt *time.Time + if end > 0 { + t := time.Unix(int64(end), 0) + endedAt = &t + } + + return &client.Round{ + ID: resp.Payload.Round.ID, + StartedAt: &startedAt, + EndedAt: endedAt, + Tx: resp.Payload.Round.PoolTx, + Tree: treeFromProto{resp.Payload.Round.CongestionTree}.parse(), + ForfeitTxs: resp.Payload.Round.ForfeitTxs, + Connectors: resp.Payload.Round.Connectors, + Stage: toRoundStage(*resp.Payload.Round.Stage), + }, nil +} + +func (a *restClient) GetRoundByID( + ctx context.Context, roundID string, +) (*client.Round, error) { + resp, err := a.svc.ArkServiceGetRoundByID( + ark_service.NewArkServiceGetRoundByIDParams().WithID(roundID), + ) if err != nil { return nil, err } - return &client.Info{ - Pubkey: resp.Payload.Pubkey, - RoundLifetime: int64(roundLifetime), - UnilateralExitDelay: int64(unilateralExitDelay), - RoundInterval: int64(roundInterval), - Network: resp.Payload.Network, - Dust: uint64(dust), - BoardingDescriptorTemplate: resp.Payload.BoardingDescriptorTemplate, - ForfeitAddress: resp.Payload.ForfeitAddress, + start, err := strconv.Atoi(resp.Payload.Round.Start) + if err != nil { + return nil, err + } + + end, err := strconv.Atoi(resp.Payload.Round.End) + if err != nil { + return nil, err + } + + startedAt := time.Unix(int64(start), 0) + var endedAt *time.Time + if end > 0 { + t := time.Unix(int64(end), 0) + endedAt = &t + } + + return &client.Round{ + ID: resp.Payload.Round.ID, + StartedAt: &startedAt, + EndedAt: endedAt, + Tx: resp.Payload.Round.PoolTx, + Tree: treeFromProto{resp.Payload.Round.CongestionTree}.parse(), + ForfeitTxs: resp.Payload.Round.ForfeitTxs, + Connectors: resp.Payload.Round.Connectors, + Stage: toRoundStage(*resp.Payload.Round.Stage), }, nil } @@ -217,345 +559,7 @@ func (a *restClient) ListVtxos( return spendableVtxos, spentVtxos, nil } -func (a *restClient) GetRound( - ctx context.Context, txID string, -) (*client.Round, error) { - resp, err := a.svc.ArkServiceGetRound( - ark_service.NewArkServiceGetRoundParams().WithTxid(txID), - ) - if err != nil { - return nil, err - } - - start, err := strconv.Atoi(resp.Payload.Round.Start) - if err != nil { - return nil, err - } - - end, err := strconv.Atoi(resp.Payload.Round.End) - if err != nil { - return nil, err - } - - startedAt := time.Unix(int64(start), 0) - var endedAt *time.Time - if end > 0 { - t := time.Unix(int64(end), 0) - endedAt = &t - } - - return &client.Round{ - ID: resp.Payload.Round.ID, - StartedAt: &startedAt, - EndedAt: endedAt, - Tx: resp.Payload.Round.PoolTx, - Tree: treeFromProto{resp.Payload.Round.CongestionTree}.parse(), - ForfeitTxs: resp.Payload.Round.ForfeitTxs, - Connectors: resp.Payload.Round.Connectors, - Stage: toRoundStage(*resp.Payload.Round.Stage), - }, nil -} - -func (a *restClient) RegisterPayment( - ctx context.Context, inputs []client.Input, ephemeralPublicKey string, -) (string, error) { - ins := make([]*models.V1Input, 0, len(inputs)) - for _, i := range inputs { - ins = append(ins, &models.V1Input{ - Outpoint: &models.V1Outpoint{ - Txid: i.Txid, - Vout: int64(i.VOut), - }, - Descriptor: i.Descriptor, - }) - } - body := &models.V1RegisterPaymentRequest{ - Inputs: ins, - } - if len(ephemeralPublicKey) > 0 { - body.EphemeralPubkey = ephemeralPublicKey - } - - resp, err := a.svc.ArkServiceRegisterPayment( - ark_service.NewArkServiceRegisterPaymentParams().WithBody(body), - ) - if err != nil { - return "", err - } - - return resp.Payload.ID, nil -} - -func (a *restClient) ClaimPayment( - ctx context.Context, paymentID string, outputs []client.Output, -) error { - 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.V1ClaimPaymentRequest{ - ID: paymentID, - Outputs: outs, - } - - _, err := a.svc.ArkServiceClaimPayment( - ark_service.NewArkServiceClaimPaymentParams().WithBody(&body), - ) - return err -} - -func (a *restClient) Ping( - ctx context.Context, paymentID string, -) (client.RoundEvent, error) { - r := ark_service.NewArkServicePingParams() - r.SetPaymentID(paymentID) - resp, err := a.svc.ArkServicePing(r) - if err != nil { - return nil, err - } - - payload := resp.Payload - - if e := payload.RoundFailed; e != nil { - return client.RoundFailedEvent{ - ID: e.ID, - Reason: e.Reason, - }, nil - } - if e := payload.RoundFinalization; e != nil { - tree := treeFromProto{e.CongestionTree}.parse() - - minRelayFeeRate, err := strconv.Atoi(e.MinRelayFeeRate) - if err != nil { - return nil, err - } - - return client.RoundFinalizationEvent{ - ID: e.ID, - Tx: e.PoolTx, - Tree: tree, - Connectors: e.Connectors, - MinRelayFeeRate: chainfee.SatPerKVByte(minRelayFeeRate), - }, nil - } - - if e := payload.RoundFinalized; e != nil { - return client.RoundFinalizedEvent{ - ID: e.ID, - Txid: e.PoolTxid, - }, nil - } - - if e := payload.RoundSigning; e != nil { - pubkeys := make([]*secp256k1.PublicKey, 0, len(e.CosignersPubkeys)) - for _, pubkey := range e.CosignersPubkeys { - p, err := hex.DecodeString(pubkey) - if err != nil { - return nil, err - } - pk, err := secp256k1.ParsePubKey(p) - if err != nil { - return nil, err - } - pubkeys = append(pubkeys, pk) - } - - return client.RoundSigningStartedEvent{ - ID: e.ID, - UnsignedTree: treeFromProto{e.UnsignedTree}.parse(), - CosignersPublicKeys: pubkeys, - UnsignedRoundTx: e.UnsignedRoundTx, - }, nil - } - - if e := payload.RoundSigningNoncesGenerated; e != nil { - nonces, err := bitcointree.DecodeNonces(hex.NewDecoder(strings.NewReader(e.TreeNonces))) - if err != nil { - return nil, err - } - return client.RoundSigningNoncesGeneratedEvent{ - ID: e.ID, - Nonces: nonces, - }, nil - } - - return nil, nil -} - -func (a *restClient) FinalizePayment( - ctx context.Context, signedForfeitTxs []string, signedRoundTx string, -) error { - body := models.V1FinalizePaymentRequest{ - SignedForfeitTxs: signedForfeitTxs, - SignedRoundTx: signedRoundTx, - } - _, err := a.svc.ArkServiceFinalizePayment( - ark_service.NewArkServiceFinalizePaymentParams().WithBody(&body), - ) - return err -} - -func (a *restClient) CreatePayment( - ctx context.Context, inputs []client.Input, outputs []client.Output, -) (string, []string, error) { - ins := make([]*models.V1Input, 0, len(inputs)) - for _, i := range inputs { - ins = append(ins, &models.V1Input{ - Outpoint: &models.V1Outpoint{ - Txid: i.Txid, - Vout: int64(i.VOut), - }, - Descriptor: i.Descriptor, - }) - } - 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)), - Descriptor: o.Descriptor, - }) - } - body := models.V1CreatePaymentRequest{ - Inputs: ins, - Outputs: outs, - } - resp, err := a.svc.ArkServiceCreatePayment( - ark_service.NewArkServiceCreatePaymentParams().WithBody(&body), - ) - if err != nil { - return "", nil, err - } - return resp.GetPayload().SignedRedeemTx, resp.GetPayload().UsignedUnconditionalForfeitTxs, nil -} - -func (a *restClient) CompletePayment( - ctx context.Context, signedRedeemTx string, signedUnconditionalForfeitTxs []string, -) error { - req := &arkv1.CompletePaymentRequest{ - SignedRedeemTx: signedRedeemTx, - SignedUnconditionalForfeitTxs: signedUnconditionalForfeitTxs, - } - body := models.V1CompletePaymentRequest{ - SignedRedeemTx: req.GetSignedRedeemTx(), - SignedUnconditionalForfeitTxs: req.GetSignedUnconditionalForfeitTxs(), - } - _, err := a.svc.ArkServiceCompletePayment( - ark_service.NewArkServiceCompletePaymentParams().WithBody(&body), - ) - return err -} - -func (a *restClient) GetRoundByID( - ctx context.Context, roundID string, -) (*client.Round, error) { - resp, err := a.svc.ArkServiceGetRoundByID( - ark_service.NewArkServiceGetRoundByIDParams().WithID(roundID), - ) - if err != nil { - return nil, err - } - - start, err := strconv.Atoi(resp.Payload.Round.Start) - if err != nil { - return nil, err - } - - end, err := strconv.Atoi(resp.Payload.Round.End) - if err != nil { - return nil, err - } - - startedAt := time.Unix(int64(start), 0) - var endedAt *time.Time - if end > 0 { - t := time.Unix(int64(end), 0) - endedAt = &t - } - - return &client.Round{ - ID: resp.Payload.Round.ID, - StartedAt: &startedAt, - EndedAt: endedAt, - Tx: resp.Payload.Round.PoolTx, - Tree: treeFromProto{resp.Payload.Round.CongestionTree}.parse(), - ForfeitTxs: resp.Payload.Round.ForfeitTxs, - Connectors: resp.Payload.Round.Connectors, - Stage: toRoundStage(*resp.Payload.Round.Stage), - }, nil -} - -func (a *restClient) GetBoardingAddress( - ctx context.Context, pubkey string, -) (string, error) { - body := models.V1GetBoardingAddressRequest{ - Pubkey: pubkey, - } - - resp, err := a.svc.ArkServiceGetBoardingAddress( - ark_service.NewArkServiceGetBoardingAddressParams().WithBody(&body), - ) - if err != nil { - return "", - err - } - return resp.Payload.Address, nil -} - -func (a *restClient) SendTreeNonces( - ctx context.Context, roundID, cosignerPubkey string, nonces bitcointree.TreeNonces, -) error { - var nonceBuffer bytes.Buffer - - if err := nonces.Encode(&nonceBuffer); err != nil { - return err - } - - serializedNonces := hex.EncodeToString(nonceBuffer.Bytes()) - - body := &models.V1SendTreeNoncesRequest{ - RoundID: roundID, - PublicKey: cosignerPubkey, - TreeNonces: serializedNonces, - } - - if _, err := a.svc.ArkServiceSendTreeNonces( - ark_service.NewArkServiceSendTreeNoncesParams().WithBody(body), - ); err != nil { - return err - } - - return nil -} - -func (a *restClient) SendTreeSignatures( - ctx context.Context, roundID, cosignerPubkey string, signatures bitcointree.TreePartialSigs, -) error { - var sigsBuffer bytes.Buffer - - if err := signatures.Encode(&sigsBuffer); err != nil { - return err - } - - serializedSigs := hex.EncodeToString(sigsBuffer.Bytes()) - - body := &models.V1SendTreeSignaturesRequest{ - RoundID: roundID, - PublicKey: cosignerPubkey, - TreeSignatures: serializedSigs, - } - - if _, err := a.svc.ArkServiceSendTreeSignatures( - ark_service.NewArkServiceSendTreeSignaturesParams().WithBody(body), - ); err != nil { - return err - } - - return nil -} +func (c *restClient) Close() {} func newRestClient( serviceURL string, 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 dc1745f..43503ac 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,14 +54,10 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - ArkServiceClaimPayment(params *ArkServiceClaimPaymentParams, opts ...ClientOption) (*ArkServiceClaimPaymentOK, error) - ArkServiceCompletePayment(params *ArkServiceCompletePaymentParams, opts ...ClientOption) (*ArkServiceCompletePaymentOK, error) ArkServiceCreatePayment(params *ArkServiceCreatePaymentParams, opts ...ClientOption) (*ArkServiceCreatePaymentOK, error) - ArkServiceFinalizePayment(params *ArkServiceFinalizePaymentParams, opts ...ClientOption) (*ArkServiceFinalizePaymentOK, error) - ArkServiceGetBoardingAddress(params *ArkServiceGetBoardingAddressParams, opts ...ClientOption) (*ArkServiceGetBoardingAddressOK, error) ArkServiceGetEventStream(params *ArkServiceGetEventStreamParams, opts ...ClientOption) (*ArkServiceGetEventStreamOK, error) @@ -76,52 +72,19 @@ type ClientService interface { ArkServicePing(params *ArkServicePingParams, opts ...ClientOption) (*ArkServicePingOK, error) - ArkServiceRegisterPayment(params *ArkServiceRegisterPaymentParams, opts ...ClientOption) (*ArkServiceRegisterPaymentOK, error) + ArkServiceRegisterInputsForNextRound(params *ArkServiceRegisterInputsForNextRoundParams, opts ...ClientOption) (*ArkServiceRegisterInputsForNextRoundOK, error) - ArkServiceSendTreeNonces(params *ArkServiceSendTreeNoncesParams, opts ...ClientOption) (*ArkServiceSendTreeNoncesOK, error) + ArkServiceRegisterOutputsForNextRound(params *ArkServiceRegisterOutputsForNextRoundParams, opts ...ClientOption) (*ArkServiceRegisterOutputsForNextRoundOK, error) - ArkServiceSendTreeSignatures(params *ArkServiceSendTreeSignaturesParams, opts ...ClientOption) (*ArkServiceSendTreeSignaturesOK, error) + ArkServiceSubmitSignedForfeitTxs(params *ArkServiceSubmitSignedForfeitTxsParams, opts ...ClientOption) (*ArkServiceSubmitSignedForfeitTxsOK, error) + + ArkServiceSubmitTreeNonces(params *ArkServiceSubmitTreeNoncesParams, opts ...ClientOption) (*ArkServiceSubmitTreeNoncesOK, error) + + ArkServiceSubmitTreeSignatures(params *ArkServiceSubmitTreeSignaturesParams, opts ...ClientOption) (*ArkServiceSubmitTreeSignaturesOK, error) SetTransport(transport runtime.ClientTransport) } -/* -ArkServiceClaimPayment ark service claim payment API -*/ -func (a *Client) ArkServiceClaimPayment(params *ArkServiceClaimPaymentParams, opts ...ClientOption) (*ArkServiceClaimPaymentOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewArkServiceClaimPaymentParams() - } - op := &runtime.ClientOperation{ - ID: "ArkService_ClaimPayment", - Method: "POST", - PathPattern: "/v1/payment/claim", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ArkServiceClaimPaymentReader{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.(*ArkServiceClaimPaymentOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ArkServiceClaimPaymentDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* ArkServiceCompletePayment ark service complete payment API */ @@ -196,43 +159,6 @@ func (a *Client) ArkServiceCreatePayment(params *ArkServiceCreatePaymentParams, return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -ArkServiceFinalizePayment ark service finalize payment API -*/ -func (a *Client) ArkServiceFinalizePayment(params *ArkServiceFinalizePaymentParams, opts ...ClientOption) (*ArkServiceFinalizePaymentOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewArkServiceFinalizePaymentParams() - } - op := &runtime.ClientOperation{ - ID: "ArkService_FinalizePayment", - Method: "POST", - PathPattern: "/v1/payment/finalize", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ArkServiceFinalizePaymentReader{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.(*ArkServiceFinalizePaymentOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ArkServiceFinalizePaymentDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* ArkServiceGetBoardingAddress ark service get boarding address API */ @@ -281,7 +207,7 @@ func (a *Client) ArkServiceGetEventStream(params *ArkServiceGetEventStreamParams op := &runtime.ClientOperation{ ID: "ArkService_GetEventStream", Method: "GET", - PathPattern: "/v1/events", + PathPattern: "/v1/round/events", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -466,7 +392,7 @@ func (a *Client) ArkServicePing(params *ArkServicePingParams, opts ...ClientOpti op := &runtime.ClientOperation{ ID: "ArkService_Ping", Method: "GET", - PathPattern: "/v1/ping/{paymentId}", + PathPattern: "/v1/round/ping/{paymentId}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, @@ -493,22 +419,22 @@ func (a *Client) ArkServicePing(params *ArkServicePingParams, opts ...ClientOpti } /* -ArkServiceRegisterPayment ark service register payment API +ArkServiceRegisterInputsForNextRound ark service register inputs for next round API */ -func (a *Client) ArkServiceRegisterPayment(params *ArkServiceRegisterPaymentParams, opts ...ClientOption) (*ArkServiceRegisterPaymentOK, error) { +func (a *Client) ArkServiceRegisterInputsForNextRound(params *ArkServiceRegisterInputsForNextRoundParams, opts ...ClientOption) (*ArkServiceRegisterInputsForNextRoundOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewArkServiceRegisterPaymentParams() + params = NewArkServiceRegisterInputsForNextRoundParams() } op := &runtime.ClientOperation{ - ID: "ArkService_RegisterPayment", + ID: "ArkService_RegisterInputsForNextRound", Method: "POST", - PathPattern: "/v1/payment/register", + PathPattern: "/v1/round/registerInputs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &ArkServiceRegisterPaymentReader{formats: a.formats}, + Reader: &ArkServiceRegisterInputsForNextRoundReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -520,32 +446,32 @@ func (a *Client) ArkServiceRegisterPayment(params *ArkServiceRegisterPaymentPara if err != nil { return nil, err } - success, ok := result.(*ArkServiceRegisterPaymentOK) + success, ok := result.(*ArkServiceRegisterInputsForNextRoundOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ArkServiceRegisterPaymentDefault) + unexpectedSuccess := result.(*ArkServiceRegisterInputsForNextRoundDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ArkServiceSendTreeNonces ark service send tree nonces API +ArkServiceRegisterOutputsForNextRound ark service register outputs for next round API */ -func (a *Client) ArkServiceSendTreeNonces(params *ArkServiceSendTreeNoncesParams, opts ...ClientOption) (*ArkServiceSendTreeNoncesOK, error) { +func (a *Client) ArkServiceRegisterOutputsForNextRound(params *ArkServiceRegisterOutputsForNextRoundParams, opts ...ClientOption) (*ArkServiceRegisterOutputsForNextRoundOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewArkServiceSendTreeNoncesParams() + params = NewArkServiceRegisterOutputsForNextRoundParams() } op := &runtime.ClientOperation{ - ID: "ArkService_SendTreeNonces", + ID: "ArkService_RegisterOutputsForNextRound", Method: "POST", - PathPattern: "/v1/payment/tree/nonces", + PathPattern: "/v1/round/registerOutputs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &ArkServiceSendTreeNoncesReader{formats: a.formats}, + Reader: &ArkServiceRegisterOutputsForNextRoundReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -557,32 +483,32 @@ func (a *Client) ArkServiceSendTreeNonces(params *ArkServiceSendTreeNoncesParams if err != nil { return nil, err } - success, ok := result.(*ArkServiceSendTreeNoncesOK) + success, ok := result.(*ArkServiceRegisterOutputsForNextRoundOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ArkServiceSendTreeNoncesDefault) + unexpectedSuccess := result.(*ArkServiceRegisterOutputsForNextRoundDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ArkServiceSendTreeSignatures ark service send tree signatures API +ArkServiceSubmitSignedForfeitTxs ark service submit signed forfeit txs API */ -func (a *Client) ArkServiceSendTreeSignatures(params *ArkServiceSendTreeSignaturesParams, opts ...ClientOption) (*ArkServiceSendTreeSignaturesOK, error) { +func (a *Client) ArkServiceSubmitSignedForfeitTxs(params *ArkServiceSubmitSignedForfeitTxsParams, opts ...ClientOption) (*ArkServiceSubmitSignedForfeitTxsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewArkServiceSendTreeSignaturesParams() + params = NewArkServiceSubmitSignedForfeitTxsParams() } op := &runtime.ClientOperation{ - ID: "ArkService_SendTreeSignatures", + ID: "ArkService_SubmitSignedForfeitTxs", Method: "POST", - PathPattern: "/v1/payment/tree/signatures", + PathPattern: "/v1/round/submitForfeitTxs", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &ArkServiceSendTreeSignaturesReader{formats: a.formats}, + Reader: &ArkServiceSubmitSignedForfeitTxsReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -594,12 +520,86 @@ func (a *Client) ArkServiceSendTreeSignatures(params *ArkServiceSendTreeSignatur if err != nil { return nil, err } - success, ok := result.(*ArkServiceSendTreeSignaturesOK) + success, ok := result.(*ArkServiceSubmitSignedForfeitTxsOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ArkServiceSendTreeSignaturesDefault) + unexpectedSuccess := result.(*ArkServiceSubmitSignedForfeitTxsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ArkServiceSubmitTreeNonces ark service submit tree nonces API +*/ +func (a *Client) ArkServiceSubmitTreeNonces(params *ArkServiceSubmitTreeNoncesParams, opts ...ClientOption) (*ArkServiceSubmitTreeNoncesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewArkServiceSubmitTreeNoncesParams() + } + op := &runtime.ClientOperation{ + ID: "ArkService_SubmitTreeNonces", + Method: "POST", + PathPattern: "/v1/round/tree/submitNonces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ArkServiceSubmitTreeNoncesReader{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.(*ArkServiceSubmitTreeNoncesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ArkServiceSubmitTreeNoncesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ArkServiceSubmitTreeSignatures ark service submit tree signatures API +*/ +func (a *Client) ArkServiceSubmitTreeSignatures(params *ArkServiceSubmitTreeSignaturesParams, opts ...ClientOption) (*ArkServiceSubmitTreeSignaturesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewArkServiceSubmitTreeSignaturesParams() + } + op := &runtime.ClientOperation{ + ID: "ArkService_SubmitTreeSignatures", + Method: "POST", + PathPattern: "/v1/round/tree/submitSignatures", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ArkServiceSubmitTreeSignaturesReader{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.(*ArkServiceSubmitTreeSignaturesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ArkServiceSubmitTreeSignaturesDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_get_event_stream_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_get_event_stream_responses.go index 60f0cb3..6d7dfd6 100644 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_get_event_stream_responses.go +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_get_event_stream_responses.go @@ -91,12 +91,12 @@ func (o *ArkServiceGetEventStreamOK) Code() int { func (o *ArkServiceGetEventStreamOK) Error() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/events][%d] arkServiceGetEventStreamOK %s", 200, payload) + return fmt.Sprintf("[GET /v1/round/events][%d] arkServiceGetEventStreamOK %s", 200, payload) } func (o *ArkServiceGetEventStreamOK) String() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/events][%d] arkServiceGetEventStreamOK %s", 200, payload) + return fmt.Sprintf("[GET /v1/round/events][%d] arkServiceGetEventStreamOK %s", 200, payload) } func (o *ArkServiceGetEventStreamOK) GetPayload() *ArkServiceGetEventStreamOKBody { @@ -165,12 +165,12 @@ func (o *ArkServiceGetEventStreamDefault) Code() int { func (o *ArkServiceGetEventStreamDefault) Error() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/events][%d] ArkService_GetEventStream default %s", o._statusCode, payload) + return fmt.Sprintf("[GET /v1/round/events][%d] ArkService_GetEventStream default %s", o._statusCode, payload) } func (o *ArkServiceGetEventStreamDefault) String() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/events][%d] ArkService_GetEventStream default %s", o._statusCode, payload) + return fmt.Sprintf("[GET /v1/round/events][%d] ArkService_GetEventStream default %s", o._statusCode, payload) } func (o *ArkServiceGetEventStreamDefault) GetPayload() *models.RPCStatus { diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_ping_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_ping_responses.go index 82e3a8c..9bdc986 100644 --- a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_ping_responses.go +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_ping_responses.go @@ -88,12 +88,12 @@ func (o *ArkServicePingOK) Code() int { func (o *ArkServicePingOK) Error() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/ping/{paymentId}][%d] arkServicePingOK %s", 200, payload) + return fmt.Sprintf("[GET /v1/round/ping/{paymentId}][%d] arkServicePingOK %s", 200, payload) } func (o *ArkServicePingOK) String() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/ping/{paymentId}][%d] arkServicePingOK %s", 200, payload) + return fmt.Sprintf("[GET /v1/round/ping/{paymentId}][%d] arkServicePingOK %s", 200, payload) } func (o *ArkServicePingOK) GetPayload() *models.V1PingResponse { @@ -162,12 +162,12 @@ func (o *ArkServicePingDefault) Code() int { func (o *ArkServicePingDefault) Error() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/ping/{paymentId}][%d] ArkService_Ping default %s", o._statusCode, payload) + return fmt.Sprintf("[GET /v1/round/ping/{paymentId}][%d] ArkService_Ping default %s", o._statusCode, payload) } func (o *ArkServicePingDefault) String() string { payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[GET /v1/ping/{paymentId}][%d] ArkService_Ping default %s", o._statusCode, payload) + return fmt.Sprintf("[GET /v1/round/ping/{paymentId}][%d] ArkService_Ping default %s", o._statusCode, payload) } func (o *ArkServicePingDefault) GetPayload() *models.RPCStatus { diff --git a/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_inputs_for_next_round_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_inputs_for_next_round_parameters.go new file mode 100644 index 0000000..4a48e77 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_inputs_for_next_round_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" +) + +// NewArkServiceRegisterInputsForNextRoundParams creates a new ArkServiceRegisterInputsForNextRoundParams 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 NewArkServiceRegisterInputsForNextRoundParams() *ArkServiceRegisterInputsForNextRoundParams { + return &ArkServiceRegisterInputsForNextRoundParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArkServiceRegisterInputsForNextRoundParamsWithTimeout creates a new ArkServiceRegisterInputsForNextRoundParams object +// with the ability to set a timeout on a request. +func NewArkServiceRegisterInputsForNextRoundParamsWithTimeout(timeout time.Duration) *ArkServiceRegisterInputsForNextRoundParams { + return &ArkServiceRegisterInputsForNextRoundParams{ + timeout: timeout, + } +} + +// NewArkServiceRegisterInputsForNextRoundParamsWithContext creates a new ArkServiceRegisterInputsForNextRoundParams object +// with the ability to set a context for a request. +func NewArkServiceRegisterInputsForNextRoundParamsWithContext(ctx context.Context) *ArkServiceRegisterInputsForNextRoundParams { + return &ArkServiceRegisterInputsForNextRoundParams{ + Context: ctx, + } +} + +// NewArkServiceRegisterInputsForNextRoundParamsWithHTTPClient creates a new ArkServiceRegisterInputsForNextRoundParams object +// with the ability to set a custom HTTPClient for a request. +func NewArkServiceRegisterInputsForNextRoundParamsWithHTTPClient(client *http.Client) *ArkServiceRegisterInputsForNextRoundParams { + return &ArkServiceRegisterInputsForNextRoundParams{ + HTTPClient: client, + } +} + +/* +ArkServiceRegisterInputsForNextRoundParams contains all the parameters to send to the API endpoint + + for the ark service register inputs for next round operation. + + Typically these are written to a http.Request. +*/ +type ArkServiceRegisterInputsForNextRoundParams struct { + + // Body. + Body *models.V1RegisterInputsForNextRoundRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ark service register inputs for next round params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceRegisterInputsForNextRoundParams) WithDefaults() *ArkServiceRegisterInputsForNextRoundParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ark service register inputs for next round params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceRegisterInputsForNextRoundParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) WithTimeout(timeout time.Duration) *ArkServiceRegisterInputsForNextRoundParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) WithContext(ctx context.Context) *ArkServiceRegisterInputsForNextRoundParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) WithHTTPClient(client *http.Client) *ArkServiceRegisterInputsForNextRoundParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) WithBody(body *models.V1RegisterInputsForNextRoundRequest) *ArkServiceRegisterInputsForNextRoundParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the ark service register inputs for next round params +func (o *ArkServiceRegisterInputsForNextRoundParams) SetBody(body *models.V1RegisterInputsForNextRoundRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ArkServiceRegisterInputsForNextRoundParams) 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_inputs_for_next_round_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_inputs_for_next_round_responses.go new file mode 100644 index 0000000..eec6992 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_inputs_for_next_round_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" +) + +// ArkServiceRegisterInputsForNextRoundReader is a Reader for the ArkServiceRegisterInputsForNextRound structure. +type ArkServiceRegisterInputsForNextRoundReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArkServiceRegisterInputsForNextRoundReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArkServiceRegisterInputsForNextRoundOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewArkServiceRegisterInputsForNextRoundDefault(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 + } +} + +// NewArkServiceRegisterInputsForNextRoundOK creates a ArkServiceRegisterInputsForNextRoundOK with default headers values +func NewArkServiceRegisterInputsForNextRoundOK() *ArkServiceRegisterInputsForNextRoundOK { + return &ArkServiceRegisterInputsForNextRoundOK{} +} + +/* +ArkServiceRegisterInputsForNextRoundOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ArkServiceRegisterInputsForNextRoundOK struct { + Payload *models.V1RegisterInputsForNextRoundResponse +} + +// IsSuccess returns true when this ark service register inputs for next round o k response has a 2xx status code +func (o *ArkServiceRegisterInputsForNextRoundOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ark service register inputs for next round o k response has a 3xx status code +func (o *ArkServiceRegisterInputsForNextRoundOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ark service register inputs for next round o k response has a 4xx status code +func (o *ArkServiceRegisterInputsForNextRoundOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ark service register inputs for next round o k response has a 5xx status code +func (o *ArkServiceRegisterInputsForNextRoundOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ark service register inputs for next round o k response a status code equal to that given +func (o *ArkServiceRegisterInputsForNextRoundOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the ark service register inputs for next round o k response +func (o *ArkServiceRegisterInputsForNextRoundOK) Code() int { + return 200 +} + +func (o *ArkServiceRegisterInputsForNextRoundOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerInputs][%d] arkServiceRegisterInputsForNextRoundOK %s", 200, payload) +} + +func (o *ArkServiceRegisterInputsForNextRoundOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerInputs][%d] arkServiceRegisterInputsForNextRoundOK %s", 200, payload) +} + +func (o *ArkServiceRegisterInputsForNextRoundOK) GetPayload() *models.V1RegisterInputsForNextRoundResponse { + return o.Payload +} + +func (o *ArkServiceRegisterInputsForNextRoundOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RegisterInputsForNextRoundResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewArkServiceRegisterInputsForNextRoundDefault creates a ArkServiceRegisterInputsForNextRoundDefault with default headers values +func NewArkServiceRegisterInputsForNextRoundDefault(code int) *ArkServiceRegisterInputsForNextRoundDefault { + return &ArkServiceRegisterInputsForNextRoundDefault{ + _statusCode: code, + } +} + +/* +ArkServiceRegisterInputsForNextRoundDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ArkServiceRegisterInputsForNextRoundDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this ark service register inputs for next round default response has a 2xx status code +func (o *ArkServiceRegisterInputsForNextRoundDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this ark service register inputs for next round default response has a 3xx status code +func (o *ArkServiceRegisterInputsForNextRoundDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this ark service register inputs for next round default response has a 4xx status code +func (o *ArkServiceRegisterInputsForNextRoundDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this ark service register inputs for next round default response has a 5xx status code +func (o *ArkServiceRegisterInputsForNextRoundDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this ark service register inputs for next round default response a status code equal to that given +func (o *ArkServiceRegisterInputsForNextRoundDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the ark service register inputs for next round default response +func (o *ArkServiceRegisterInputsForNextRoundDefault) Code() int { + return o._statusCode +} + +func (o *ArkServiceRegisterInputsForNextRoundDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerInputs][%d] ArkService_RegisterInputsForNextRound default %s", o._statusCode, payload) +} + +func (o *ArkServiceRegisterInputsForNextRoundDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerInputs][%d] ArkService_RegisterInputsForNextRound default %s", o._statusCode, payload) +} + +func (o *ArkServiceRegisterInputsForNextRoundDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ArkServiceRegisterInputsForNextRoundDefault) 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_outputs_for_next_round_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_outputs_for_next_round_parameters.go new file mode 100644 index 0000000..9ef25bf --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_outputs_for_next_round_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" +) + +// NewArkServiceRegisterOutputsForNextRoundParams creates a new ArkServiceRegisterOutputsForNextRoundParams 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 NewArkServiceRegisterOutputsForNextRoundParams() *ArkServiceRegisterOutputsForNextRoundParams { + return &ArkServiceRegisterOutputsForNextRoundParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArkServiceRegisterOutputsForNextRoundParamsWithTimeout creates a new ArkServiceRegisterOutputsForNextRoundParams object +// with the ability to set a timeout on a request. +func NewArkServiceRegisterOutputsForNextRoundParamsWithTimeout(timeout time.Duration) *ArkServiceRegisterOutputsForNextRoundParams { + return &ArkServiceRegisterOutputsForNextRoundParams{ + timeout: timeout, + } +} + +// NewArkServiceRegisterOutputsForNextRoundParamsWithContext creates a new ArkServiceRegisterOutputsForNextRoundParams object +// with the ability to set a context for a request. +func NewArkServiceRegisterOutputsForNextRoundParamsWithContext(ctx context.Context) *ArkServiceRegisterOutputsForNextRoundParams { + return &ArkServiceRegisterOutputsForNextRoundParams{ + Context: ctx, + } +} + +// NewArkServiceRegisterOutputsForNextRoundParamsWithHTTPClient creates a new ArkServiceRegisterOutputsForNextRoundParams object +// with the ability to set a custom HTTPClient for a request. +func NewArkServiceRegisterOutputsForNextRoundParamsWithHTTPClient(client *http.Client) *ArkServiceRegisterOutputsForNextRoundParams { + return &ArkServiceRegisterOutputsForNextRoundParams{ + HTTPClient: client, + } +} + +/* +ArkServiceRegisterOutputsForNextRoundParams contains all the parameters to send to the API endpoint + + for the ark service register outputs for next round operation. + + Typically these are written to a http.Request. +*/ +type ArkServiceRegisterOutputsForNextRoundParams struct { + + // Body. + Body *models.V1RegisterOutputsForNextRoundRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ark service register outputs for next round params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceRegisterOutputsForNextRoundParams) WithDefaults() *ArkServiceRegisterOutputsForNextRoundParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ark service register outputs for next round params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceRegisterOutputsForNextRoundParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) WithTimeout(timeout time.Duration) *ArkServiceRegisterOutputsForNextRoundParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) WithContext(ctx context.Context) *ArkServiceRegisterOutputsForNextRoundParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) WithHTTPClient(client *http.Client) *ArkServiceRegisterOutputsForNextRoundParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) WithBody(body *models.V1RegisterOutputsForNextRoundRequest) *ArkServiceRegisterOutputsForNextRoundParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the ark service register outputs for next round params +func (o *ArkServiceRegisterOutputsForNextRoundParams) SetBody(body *models.V1RegisterOutputsForNextRoundRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ArkServiceRegisterOutputsForNextRoundParams) 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_outputs_for_next_round_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_outputs_for_next_round_responses.go new file mode 100644 index 0000000..726371e --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_register_outputs_for_next_round_responses.go @@ -0,0 +1,185 @@ +// 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" +) + +// ArkServiceRegisterOutputsForNextRoundReader is a Reader for the ArkServiceRegisterOutputsForNextRound structure. +type ArkServiceRegisterOutputsForNextRoundReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArkServiceRegisterOutputsForNextRoundReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArkServiceRegisterOutputsForNextRoundOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewArkServiceRegisterOutputsForNextRoundDefault(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 + } +} + +// NewArkServiceRegisterOutputsForNextRoundOK creates a ArkServiceRegisterOutputsForNextRoundOK with default headers values +func NewArkServiceRegisterOutputsForNextRoundOK() *ArkServiceRegisterOutputsForNextRoundOK { + return &ArkServiceRegisterOutputsForNextRoundOK{} +} + +/* +ArkServiceRegisterOutputsForNextRoundOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ArkServiceRegisterOutputsForNextRoundOK struct { + Payload models.V1RegisterOutputsForNextRoundResponse +} + +// IsSuccess returns true when this ark service register outputs for next round o k response has a 2xx status code +func (o *ArkServiceRegisterOutputsForNextRoundOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ark service register outputs for next round o k response has a 3xx status code +func (o *ArkServiceRegisterOutputsForNextRoundOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ark service register outputs for next round o k response has a 4xx status code +func (o *ArkServiceRegisterOutputsForNextRoundOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ark service register outputs for next round o k response has a 5xx status code +func (o *ArkServiceRegisterOutputsForNextRoundOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ark service register outputs for next round o k response a status code equal to that given +func (o *ArkServiceRegisterOutputsForNextRoundOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the ark service register outputs for next round o k response +func (o *ArkServiceRegisterOutputsForNextRoundOK) Code() int { + return 200 +} + +func (o *ArkServiceRegisterOutputsForNextRoundOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerOutputs][%d] arkServiceRegisterOutputsForNextRoundOK %s", 200, payload) +} + +func (o *ArkServiceRegisterOutputsForNextRoundOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerOutputs][%d] arkServiceRegisterOutputsForNextRoundOK %s", 200, payload) +} + +func (o *ArkServiceRegisterOutputsForNextRoundOK) GetPayload() models.V1RegisterOutputsForNextRoundResponse { + return o.Payload +} + +func (o *ArkServiceRegisterOutputsForNextRoundOK) 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 +} + +// NewArkServiceRegisterOutputsForNextRoundDefault creates a ArkServiceRegisterOutputsForNextRoundDefault with default headers values +func NewArkServiceRegisterOutputsForNextRoundDefault(code int) *ArkServiceRegisterOutputsForNextRoundDefault { + return &ArkServiceRegisterOutputsForNextRoundDefault{ + _statusCode: code, + } +} + +/* +ArkServiceRegisterOutputsForNextRoundDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ArkServiceRegisterOutputsForNextRoundDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this ark service register outputs for next round default response has a 2xx status code +func (o *ArkServiceRegisterOutputsForNextRoundDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this ark service register outputs for next round default response has a 3xx status code +func (o *ArkServiceRegisterOutputsForNextRoundDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this ark service register outputs for next round default response has a 4xx status code +func (o *ArkServiceRegisterOutputsForNextRoundDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this ark service register outputs for next round default response has a 5xx status code +func (o *ArkServiceRegisterOutputsForNextRoundDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this ark service register outputs for next round default response a status code equal to that given +func (o *ArkServiceRegisterOutputsForNextRoundDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the ark service register outputs for next round default response +func (o *ArkServiceRegisterOutputsForNextRoundDefault) Code() int { + return o._statusCode +} + +func (o *ArkServiceRegisterOutputsForNextRoundDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerOutputs][%d] ArkService_RegisterOutputsForNextRound default %s", o._statusCode, payload) +} + +func (o *ArkServiceRegisterOutputsForNextRoundDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/registerOutputs][%d] ArkService_RegisterOutputsForNextRound default %s", o._statusCode, payload) +} + +func (o *ArkServiceRegisterOutputsForNextRoundDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ArkServiceRegisterOutputsForNextRoundDefault) 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 new file mode 100644 index 0000000..70c25a8 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_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" +) + +// 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 new file mode 100644 index 0000000..6c5b3ff --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_transactions_responses.go @@ -0,0 +1,185 @@ +// 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/arkservice/ark_service/ark_service_submit_signed_forfeit_txs_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_txs_parameters.go new file mode 100644 index 0000000..d9fb15b --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_txs_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" +) + +// NewArkServiceSubmitSignedForfeitTxsParams creates a new ArkServiceSubmitSignedForfeitTxsParams 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 NewArkServiceSubmitSignedForfeitTxsParams() *ArkServiceSubmitSignedForfeitTxsParams { + return &ArkServiceSubmitSignedForfeitTxsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArkServiceSubmitSignedForfeitTxsParamsWithTimeout creates a new ArkServiceSubmitSignedForfeitTxsParams object +// with the ability to set a timeout on a request. +func NewArkServiceSubmitSignedForfeitTxsParamsWithTimeout(timeout time.Duration) *ArkServiceSubmitSignedForfeitTxsParams { + return &ArkServiceSubmitSignedForfeitTxsParams{ + timeout: timeout, + } +} + +// NewArkServiceSubmitSignedForfeitTxsParamsWithContext creates a new ArkServiceSubmitSignedForfeitTxsParams object +// with the ability to set a context for a request. +func NewArkServiceSubmitSignedForfeitTxsParamsWithContext(ctx context.Context) *ArkServiceSubmitSignedForfeitTxsParams { + return &ArkServiceSubmitSignedForfeitTxsParams{ + Context: ctx, + } +} + +// NewArkServiceSubmitSignedForfeitTxsParamsWithHTTPClient creates a new ArkServiceSubmitSignedForfeitTxsParams object +// with the ability to set a custom HTTPClient for a request. +func NewArkServiceSubmitSignedForfeitTxsParamsWithHTTPClient(client *http.Client) *ArkServiceSubmitSignedForfeitTxsParams { + return &ArkServiceSubmitSignedForfeitTxsParams{ + HTTPClient: client, + } +} + +/* +ArkServiceSubmitSignedForfeitTxsParams contains all the parameters to send to the API endpoint + + for the ark service submit signed forfeit txs operation. + + Typically these are written to a http.Request. +*/ +type ArkServiceSubmitSignedForfeitTxsParams struct { + + // Body. + Body *models.V1SubmitSignedForfeitTxsRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ark service submit signed forfeit txs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitSignedForfeitTxsParams) WithDefaults() *ArkServiceSubmitSignedForfeitTxsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ark service submit signed forfeit txs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitSignedForfeitTxsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) WithTimeout(timeout time.Duration) *ArkServiceSubmitSignedForfeitTxsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) WithContext(ctx context.Context) *ArkServiceSubmitSignedForfeitTxsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) WithHTTPClient(client *http.Client) *ArkServiceSubmitSignedForfeitTxsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) WithBody(body *models.V1SubmitSignedForfeitTxsRequest) *ArkServiceSubmitSignedForfeitTxsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the ark service submit signed forfeit txs params +func (o *ArkServiceSubmitSignedForfeitTxsParams) SetBody(body *models.V1SubmitSignedForfeitTxsRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ArkServiceSubmitSignedForfeitTxsParams) 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_txs_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_txs_responses.go new file mode 100644 index 0000000..90d5311 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_signed_forfeit_txs_responses.go @@ -0,0 +1,185 @@ +// 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" +) + +// ArkServiceSubmitSignedForfeitTxsReader is a Reader for the ArkServiceSubmitSignedForfeitTxs structure. +type ArkServiceSubmitSignedForfeitTxsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArkServiceSubmitSignedForfeitTxsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArkServiceSubmitSignedForfeitTxsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewArkServiceSubmitSignedForfeitTxsDefault(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 + } +} + +// NewArkServiceSubmitSignedForfeitTxsOK creates a ArkServiceSubmitSignedForfeitTxsOK with default headers values +func NewArkServiceSubmitSignedForfeitTxsOK() *ArkServiceSubmitSignedForfeitTxsOK { + return &ArkServiceSubmitSignedForfeitTxsOK{} +} + +/* +ArkServiceSubmitSignedForfeitTxsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ArkServiceSubmitSignedForfeitTxsOK struct { + Payload models.V1SubmitSignedForfeitTxsResponse +} + +// IsSuccess returns true when this ark service submit signed forfeit txs o k response has a 2xx status code +func (o *ArkServiceSubmitSignedForfeitTxsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ark service submit signed forfeit txs o k response has a 3xx status code +func (o *ArkServiceSubmitSignedForfeitTxsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ark service submit signed forfeit txs o k response has a 4xx status code +func (o *ArkServiceSubmitSignedForfeitTxsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ark service submit signed forfeit txs o k response has a 5xx status code +func (o *ArkServiceSubmitSignedForfeitTxsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ark service submit signed forfeit txs o k response a status code equal to that given +func (o *ArkServiceSubmitSignedForfeitTxsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the ark service submit signed forfeit txs o k response +func (o *ArkServiceSubmitSignedForfeitTxsOK) Code() int { + return 200 +} + +func (o *ArkServiceSubmitSignedForfeitTxsOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] arkServiceSubmitSignedForfeitTxsOK %s", 200, payload) +} + +func (o *ArkServiceSubmitSignedForfeitTxsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] arkServiceSubmitSignedForfeitTxsOK %s", 200, payload) +} + +func (o *ArkServiceSubmitSignedForfeitTxsOK) GetPayload() models.V1SubmitSignedForfeitTxsResponse { + return o.Payload +} + +func (o *ArkServiceSubmitSignedForfeitTxsOK) 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 +} + +// NewArkServiceSubmitSignedForfeitTxsDefault creates a ArkServiceSubmitSignedForfeitTxsDefault with default headers values +func NewArkServiceSubmitSignedForfeitTxsDefault(code int) *ArkServiceSubmitSignedForfeitTxsDefault { + return &ArkServiceSubmitSignedForfeitTxsDefault{ + _statusCode: code, + } +} + +/* +ArkServiceSubmitSignedForfeitTxsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ArkServiceSubmitSignedForfeitTxsDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this ark service submit signed forfeit txs default response has a 2xx status code +func (o *ArkServiceSubmitSignedForfeitTxsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this ark service submit signed forfeit txs default response has a 3xx status code +func (o *ArkServiceSubmitSignedForfeitTxsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this ark service submit signed forfeit txs default response has a 4xx status code +func (o *ArkServiceSubmitSignedForfeitTxsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this ark service submit signed forfeit txs default response has a 5xx status code +func (o *ArkServiceSubmitSignedForfeitTxsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this ark service submit signed forfeit txs default response a status code equal to that given +func (o *ArkServiceSubmitSignedForfeitTxsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the ark service submit signed forfeit txs default response +func (o *ArkServiceSubmitSignedForfeitTxsDefault) Code() int { + return o._statusCode +} + +func (o *ArkServiceSubmitSignedForfeitTxsDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] ArkService_SubmitSignedForfeitTxs default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitSignedForfeitTxsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/submitForfeitTxs][%d] ArkService_SubmitSignedForfeitTxs default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitSignedForfeitTxsDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ArkServiceSubmitSignedForfeitTxsDefault) 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_tree_nonces_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_nonces_parameters.go new file mode 100644 index 0000000..e4a1390 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_nonces_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" +) + +// NewArkServiceSubmitTreeNoncesParams creates a new ArkServiceSubmitTreeNoncesParams 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 NewArkServiceSubmitTreeNoncesParams() *ArkServiceSubmitTreeNoncesParams { + return &ArkServiceSubmitTreeNoncesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArkServiceSubmitTreeNoncesParamsWithTimeout creates a new ArkServiceSubmitTreeNoncesParams object +// with the ability to set a timeout on a request. +func NewArkServiceSubmitTreeNoncesParamsWithTimeout(timeout time.Duration) *ArkServiceSubmitTreeNoncesParams { + return &ArkServiceSubmitTreeNoncesParams{ + timeout: timeout, + } +} + +// NewArkServiceSubmitTreeNoncesParamsWithContext creates a new ArkServiceSubmitTreeNoncesParams object +// with the ability to set a context for a request. +func NewArkServiceSubmitTreeNoncesParamsWithContext(ctx context.Context) *ArkServiceSubmitTreeNoncesParams { + return &ArkServiceSubmitTreeNoncesParams{ + Context: ctx, + } +} + +// NewArkServiceSubmitTreeNoncesParamsWithHTTPClient creates a new ArkServiceSubmitTreeNoncesParams object +// with the ability to set a custom HTTPClient for a request. +func NewArkServiceSubmitTreeNoncesParamsWithHTTPClient(client *http.Client) *ArkServiceSubmitTreeNoncesParams { + return &ArkServiceSubmitTreeNoncesParams{ + HTTPClient: client, + } +} + +/* +ArkServiceSubmitTreeNoncesParams contains all the parameters to send to the API endpoint + + for the ark service submit tree nonces operation. + + Typically these are written to a http.Request. +*/ +type ArkServiceSubmitTreeNoncesParams struct { + + // Body. + Body *models.V1SubmitTreeNoncesRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ark service submit tree nonces params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitTreeNoncesParams) WithDefaults() *ArkServiceSubmitTreeNoncesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ark service submit tree nonces params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitTreeNoncesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) WithTimeout(timeout time.Duration) *ArkServiceSubmitTreeNoncesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) WithContext(ctx context.Context) *ArkServiceSubmitTreeNoncesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) WithHTTPClient(client *http.Client) *ArkServiceSubmitTreeNoncesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) WithBody(body *models.V1SubmitTreeNoncesRequest) *ArkServiceSubmitTreeNoncesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the ark service submit tree nonces params +func (o *ArkServiceSubmitTreeNoncesParams) SetBody(body *models.V1SubmitTreeNoncesRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ArkServiceSubmitTreeNoncesParams) 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_tree_nonces_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_nonces_responses.go new file mode 100644 index 0000000..956a329 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_nonces_responses.go @@ -0,0 +1,185 @@ +// 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" +) + +// ArkServiceSubmitTreeNoncesReader is a Reader for the ArkServiceSubmitTreeNonces structure. +type ArkServiceSubmitTreeNoncesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArkServiceSubmitTreeNoncesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArkServiceSubmitTreeNoncesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewArkServiceSubmitTreeNoncesDefault(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 + } +} + +// NewArkServiceSubmitTreeNoncesOK creates a ArkServiceSubmitTreeNoncesOK with default headers values +func NewArkServiceSubmitTreeNoncesOK() *ArkServiceSubmitTreeNoncesOK { + return &ArkServiceSubmitTreeNoncesOK{} +} + +/* +ArkServiceSubmitTreeNoncesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ArkServiceSubmitTreeNoncesOK struct { + Payload models.V1SubmitTreeNoncesResponse +} + +// IsSuccess returns true when this ark service submit tree nonces o k response has a 2xx status code +func (o *ArkServiceSubmitTreeNoncesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ark service submit tree nonces o k response has a 3xx status code +func (o *ArkServiceSubmitTreeNoncesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ark service submit tree nonces o k response has a 4xx status code +func (o *ArkServiceSubmitTreeNoncesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ark service submit tree nonces o k response has a 5xx status code +func (o *ArkServiceSubmitTreeNoncesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ark service submit tree nonces o k response a status code equal to that given +func (o *ArkServiceSubmitTreeNoncesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the ark service submit tree nonces o k response +func (o *ArkServiceSubmitTreeNoncesOK) Code() int { + return 200 +} + +func (o *ArkServiceSubmitTreeNoncesOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitNonces][%d] arkServiceSubmitTreeNoncesOK %s", 200, payload) +} + +func (o *ArkServiceSubmitTreeNoncesOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitNonces][%d] arkServiceSubmitTreeNoncesOK %s", 200, payload) +} + +func (o *ArkServiceSubmitTreeNoncesOK) GetPayload() models.V1SubmitTreeNoncesResponse { + return o.Payload +} + +func (o *ArkServiceSubmitTreeNoncesOK) 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 +} + +// NewArkServiceSubmitTreeNoncesDefault creates a ArkServiceSubmitTreeNoncesDefault with default headers values +func NewArkServiceSubmitTreeNoncesDefault(code int) *ArkServiceSubmitTreeNoncesDefault { + return &ArkServiceSubmitTreeNoncesDefault{ + _statusCode: code, + } +} + +/* +ArkServiceSubmitTreeNoncesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ArkServiceSubmitTreeNoncesDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this ark service submit tree nonces default response has a 2xx status code +func (o *ArkServiceSubmitTreeNoncesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this ark service submit tree nonces default response has a 3xx status code +func (o *ArkServiceSubmitTreeNoncesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this ark service submit tree nonces default response has a 4xx status code +func (o *ArkServiceSubmitTreeNoncesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this ark service submit tree nonces default response has a 5xx status code +func (o *ArkServiceSubmitTreeNoncesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this ark service submit tree nonces default response a status code equal to that given +func (o *ArkServiceSubmitTreeNoncesDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the ark service submit tree nonces default response +func (o *ArkServiceSubmitTreeNoncesDefault) Code() int { + return o._statusCode +} + +func (o *ArkServiceSubmitTreeNoncesDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitNonces][%d] ArkService_SubmitTreeNonces default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitTreeNoncesDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitNonces][%d] ArkService_SubmitTreeNonces default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitTreeNoncesDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ArkServiceSubmitTreeNoncesDefault) 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_tree_signatures_parameters.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_signatures_parameters.go new file mode 100644 index 0000000..b6407ac --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_signatures_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" +) + +// NewArkServiceSubmitTreeSignaturesParams creates a new ArkServiceSubmitTreeSignaturesParams 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 NewArkServiceSubmitTreeSignaturesParams() *ArkServiceSubmitTreeSignaturesParams { + return &ArkServiceSubmitTreeSignaturesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewArkServiceSubmitTreeSignaturesParamsWithTimeout creates a new ArkServiceSubmitTreeSignaturesParams object +// with the ability to set a timeout on a request. +func NewArkServiceSubmitTreeSignaturesParamsWithTimeout(timeout time.Duration) *ArkServiceSubmitTreeSignaturesParams { + return &ArkServiceSubmitTreeSignaturesParams{ + timeout: timeout, + } +} + +// NewArkServiceSubmitTreeSignaturesParamsWithContext creates a new ArkServiceSubmitTreeSignaturesParams object +// with the ability to set a context for a request. +func NewArkServiceSubmitTreeSignaturesParamsWithContext(ctx context.Context) *ArkServiceSubmitTreeSignaturesParams { + return &ArkServiceSubmitTreeSignaturesParams{ + Context: ctx, + } +} + +// NewArkServiceSubmitTreeSignaturesParamsWithHTTPClient creates a new ArkServiceSubmitTreeSignaturesParams object +// with the ability to set a custom HTTPClient for a request. +func NewArkServiceSubmitTreeSignaturesParamsWithHTTPClient(client *http.Client) *ArkServiceSubmitTreeSignaturesParams { + return &ArkServiceSubmitTreeSignaturesParams{ + HTTPClient: client, + } +} + +/* +ArkServiceSubmitTreeSignaturesParams contains all the parameters to send to the API endpoint + + for the ark service submit tree signatures operation. + + Typically these are written to a http.Request. +*/ +type ArkServiceSubmitTreeSignaturesParams struct { + + // Body. + Body *models.V1SubmitTreeSignaturesRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ark service submit tree signatures params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitTreeSignaturesParams) WithDefaults() *ArkServiceSubmitTreeSignaturesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ark service submit tree signatures params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ArkServiceSubmitTreeSignaturesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) WithTimeout(timeout time.Duration) *ArkServiceSubmitTreeSignaturesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) WithContext(ctx context.Context) *ArkServiceSubmitTreeSignaturesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) WithHTTPClient(client *http.Client) *ArkServiceSubmitTreeSignaturesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) WithBody(body *models.V1SubmitTreeSignaturesRequest) *ArkServiceSubmitTreeSignaturesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the ark service submit tree signatures params +func (o *ArkServiceSubmitTreeSignaturesParams) SetBody(body *models.V1SubmitTreeSignaturesRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ArkServiceSubmitTreeSignaturesParams) 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_tree_signatures_responses.go b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_signatures_responses.go new file mode 100644 index 0000000..ba3d01e --- /dev/null +++ b/pkg/client-sdk/client/rest/service/arkservice/ark_service/ark_service_submit_tree_signatures_responses.go @@ -0,0 +1,185 @@ +// 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" +) + +// ArkServiceSubmitTreeSignaturesReader is a Reader for the ArkServiceSubmitTreeSignatures structure. +type ArkServiceSubmitTreeSignaturesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ArkServiceSubmitTreeSignaturesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewArkServiceSubmitTreeSignaturesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewArkServiceSubmitTreeSignaturesDefault(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 + } +} + +// NewArkServiceSubmitTreeSignaturesOK creates a ArkServiceSubmitTreeSignaturesOK with default headers values +func NewArkServiceSubmitTreeSignaturesOK() *ArkServiceSubmitTreeSignaturesOK { + return &ArkServiceSubmitTreeSignaturesOK{} +} + +/* +ArkServiceSubmitTreeSignaturesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ArkServiceSubmitTreeSignaturesOK struct { + Payload models.V1SubmitTreeSignaturesResponse +} + +// IsSuccess returns true when this ark service submit tree signatures o k response has a 2xx status code +func (o *ArkServiceSubmitTreeSignaturesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this ark service submit tree signatures o k response has a 3xx status code +func (o *ArkServiceSubmitTreeSignaturesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this ark service submit tree signatures o k response has a 4xx status code +func (o *ArkServiceSubmitTreeSignaturesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this ark service submit tree signatures o k response has a 5xx status code +func (o *ArkServiceSubmitTreeSignaturesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this ark service submit tree signatures o k response a status code equal to that given +func (o *ArkServiceSubmitTreeSignaturesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the ark service submit tree signatures o k response +func (o *ArkServiceSubmitTreeSignaturesOK) Code() int { + return 200 +} + +func (o *ArkServiceSubmitTreeSignaturesOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitSignatures][%d] arkServiceSubmitTreeSignaturesOK %s", 200, payload) +} + +func (o *ArkServiceSubmitTreeSignaturesOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitSignatures][%d] arkServiceSubmitTreeSignaturesOK %s", 200, payload) +} + +func (o *ArkServiceSubmitTreeSignaturesOK) GetPayload() models.V1SubmitTreeSignaturesResponse { + return o.Payload +} + +func (o *ArkServiceSubmitTreeSignaturesOK) 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 +} + +// NewArkServiceSubmitTreeSignaturesDefault creates a ArkServiceSubmitTreeSignaturesDefault with default headers values +func NewArkServiceSubmitTreeSignaturesDefault(code int) *ArkServiceSubmitTreeSignaturesDefault { + return &ArkServiceSubmitTreeSignaturesDefault{ + _statusCode: code, + } +} + +/* +ArkServiceSubmitTreeSignaturesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ArkServiceSubmitTreeSignaturesDefault struct { + _statusCode int + + Payload *models.RPCStatus +} + +// IsSuccess returns true when this ark service submit tree signatures default response has a 2xx status code +func (o *ArkServiceSubmitTreeSignaturesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this ark service submit tree signatures default response has a 3xx status code +func (o *ArkServiceSubmitTreeSignaturesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this ark service submit tree signatures default response has a 4xx status code +func (o *ArkServiceSubmitTreeSignaturesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this ark service submit tree signatures default response has a 5xx status code +func (o *ArkServiceSubmitTreeSignaturesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this ark service submit tree signatures default response a status code equal to that given +func (o *ArkServiceSubmitTreeSignaturesDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the ark service submit tree signatures default response +func (o *ArkServiceSubmitTreeSignaturesDefault) Code() int { + return o._statusCode +} + +func (o *ArkServiceSubmitTreeSignaturesDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitSignatures][%d] ArkService_SubmitTreeSignatures default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitTreeSignaturesDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/round/tree/submitSignatures][%d] ArkService_SubmitTreeSignatures default %s", o._statusCode, payload) +} + +func (o *ArkServiceSubmitTreeSignaturesDefault) GetPayload() *models.RPCStatus { + return o.Payload +} + +func (o *ArkServiceSubmitTreeSignaturesDefault) 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_get_info_response.go b/pkg/client-sdk/client/rest/service/models/v1_get_info_response.go index aaf3e8e..ff01142 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 @@ -40,6 +40,9 @@ type V1GetInfoResponse struct { // unilateral exit delay UnilateralExitDelay string `json:"unilateralExitDelay,omitempty"` + + // vtxo descriptor templates + VtxoDescriptorTemplates []string `json:"vtxoDescriptorTemplates"` } // Validate validates this v1 get info response diff --git a/pkg/client-sdk/client/rest/service/models/v1_output.go b/pkg/client-sdk/client/rest/service/models/v1_output.go index 63f7d35..be584cb 100644 --- a/pkg/client-sdk/client/rest/service/models/v1_output.go +++ b/pkg/client-sdk/client/rest/service/models/v1_output.go @@ -17,13 +17,13 @@ import ( // swagger:model v1Output type V1Output struct { - // onchain + // onchain or off-chain Address string `json:"address,omitempty"` // Amount to send in satoshis. Amount string `json:"amount,omitempty"` - // offchain + // descriptor Descriptor string `json:"descriptor,omitempty"` } diff --git a/pkg/client-sdk/client/rest/service/models/v1_register_inputs_for_next_round_request.go b/pkg/client-sdk/client/rest/service/models/v1_register_inputs_for_next_round_request.go new file mode 100644 index 0000000..c2d76b3 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_register_inputs_for_next_round_request.go @@ -0,0 +1,124 @@ +// 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" +) + +// V1RegisterInputsForNextRoundRequest v1 register inputs for next round request +// +// swagger:model v1RegisterInputsForNextRoundRequest +type V1RegisterInputsForNextRoundRequest struct { + + // ephemeral pubkey + EphemeralPubkey string `json:"ephemeralPubkey,omitempty"` + + // inputs + Inputs []*V1Input `json:"inputs"` +} + +// Validate validates this v1 register inputs for next round request +func (m *V1RegisterInputsForNextRoundRequest) 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 *V1RegisterInputsForNextRoundRequest) 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 inputs for next round request based on the context it is used +func (m *V1RegisterInputsForNextRoundRequest) 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 *V1RegisterInputsForNextRoundRequest) 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 *V1RegisterInputsForNextRoundRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegisterInputsForNextRoundRequest) UnmarshalBinary(b []byte) error { + var res V1RegisterInputsForNextRoundRequest + 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_inputs_for_next_round_response.go b/pkg/client-sdk/client/rest/service/models/v1_register_inputs_for_next_round_response.go new file mode 100644 index 0000000..38ad364 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_register_inputs_for_next_round_response.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" +) + +// V1RegisterInputsForNextRoundResponse v1 register inputs for next round response +// +// swagger:model v1RegisterInputsForNextRoundResponse +type V1RegisterInputsForNextRoundResponse struct { + + // Mocks wabisabi's blinded credentials. + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 register inputs for next round response +func (m *V1RegisterInputsForNextRoundResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 register inputs for next round response based on context it is used +func (m *V1RegisterInputsForNextRoundResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegisterInputsForNextRoundResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegisterInputsForNextRoundResponse) UnmarshalBinary(b []byte) error { + var res V1RegisterInputsForNextRoundResponse + 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_outputs_for_next_round_request.go b/pkg/client-sdk/client/rest/service/models/v1_register_outputs_for_next_round_request.go new file mode 100644 index 0000000..08dc549 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_register_outputs_for_next_round_request.go @@ -0,0 +1,124 @@ +// 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" +) + +// V1RegisterOutputsForNextRoundRequest v1 register outputs for next round request +// +// swagger:model v1RegisterOutputsForNextRoundRequest +type V1RegisterOutputsForNextRoundRequest struct { + + // Mocks wabisabi's blinded credentials. + ID string `json:"id,omitempty"` + + // List of receivers for a registered payment. + Outputs []*V1Output `json:"outputs"` +} + +// Validate validates this v1 register outputs for next round request +func (m *V1RegisterOutputsForNextRoundRequest) 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 *V1RegisterOutputsForNextRoundRequest) 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 register outputs for next round request based on the context it is used +func (m *V1RegisterOutputsForNextRoundRequest) 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 *V1RegisterOutputsForNextRoundRequest) 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 *V1RegisterOutputsForNextRoundRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegisterOutputsForNextRoundRequest) UnmarshalBinary(b []byte) error { + var res V1RegisterOutputsForNextRoundRequest + 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_outputs_for_next_round_response.go b/pkg/client-sdk/client/rest/service/models/v1_register_outputs_for_next_round_response.go new file mode 100644 index 0000000..634405d --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_register_outputs_for_next_round_response.go @@ -0,0 +1,11 @@ +// 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 + +// V1RegisterOutputsForNextRoundResponse v1 register outputs for next round response +// +// swagger:model v1RegisterOutputsForNextRoundResponse +type V1RegisterOutputsForNextRoundResponse interface{} 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 new file mode 100644 index 0000000..3016adb --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_request.go @@ -0,0 +1,53 @@ +// 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 new file mode 100644 index 0000000..7e8f9d6 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_transactions_response.go @@ -0,0 +1,11 @@ +// 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_submit_signed_forfeit_txs_request.go b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_txs_request.go new file mode 100644 index 0000000..5ff54de --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_txs_request.go @@ -0,0 +1,53 @@ +// 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" +) + +// V1SubmitSignedForfeitTxsRequest v1 submit signed forfeit txs request +// +// swagger:model v1SubmitSignedForfeitTxsRequest +type V1SubmitSignedForfeitTxsRequest 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 txs request +func (m *V1SubmitSignedForfeitTxsRequest) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 submit signed forfeit txs request based on context it is used +func (m *V1SubmitSignedForfeitTxsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SubmitSignedForfeitTxsRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SubmitSignedForfeitTxsRequest) UnmarshalBinary(b []byte) error { + var res V1SubmitSignedForfeitTxsRequest + 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_txs_response.go b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_txs_response.go new file mode 100644 index 0000000..0854c20 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_signed_forfeit_txs_response.go @@ -0,0 +1,11 @@ +// 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 + +// V1SubmitSignedForfeitTxsResponse v1 submit signed forfeit txs response +// +// swagger:model v1SubmitSignedForfeitTxsResponse +type V1SubmitSignedForfeitTxsResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_submit_tree_nonces_request.go b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_nonces_request.go new file mode 100644 index 0000000..03efd80 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_nonces_request.go @@ -0,0 +1,56 @@ +// 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" +) + +// V1SubmitTreeNoncesRequest v1 submit tree nonces request +// +// swagger:model v1SubmitTreeNoncesRequest +type V1SubmitTreeNoncesRequest 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 submit tree nonces request +func (m *V1SubmitTreeNoncesRequest) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 submit tree nonces request based on context it is used +func (m *V1SubmitTreeNoncesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SubmitTreeNoncesRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SubmitTreeNoncesRequest) UnmarshalBinary(b []byte) error { + var res V1SubmitTreeNoncesRequest + 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_tree_nonces_response.go b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_nonces_response.go new file mode 100644 index 0000000..2c58957 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_nonces_response.go @@ -0,0 +1,11 @@ +// 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 + +// V1SubmitTreeNoncesResponse v1 submit tree nonces response +// +// swagger:model v1SubmitTreeNoncesResponse +type V1SubmitTreeNoncesResponse interface{} diff --git a/pkg/client-sdk/client/rest/service/models/v1_submit_tree_signatures_request.go b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_signatures_request.go new file mode 100644 index 0000000..2e648b6 --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_signatures_request.go @@ -0,0 +1,56 @@ +// 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" +) + +// V1SubmitTreeSignaturesRequest v1 submit tree signatures request +// +// swagger:model v1SubmitTreeSignaturesRequest +type V1SubmitTreeSignaturesRequest 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 submit tree signatures request +func (m *V1SubmitTreeSignaturesRequest) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 submit tree signatures request based on context it is used +func (m *V1SubmitTreeSignaturesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SubmitTreeSignaturesRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SubmitTreeSignaturesRequest) UnmarshalBinary(b []byte) error { + var res V1SubmitTreeSignaturesRequest + 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_tree_signatures_response.go b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_signatures_response.go new file mode 100644 index 0000000..e4eaf4f --- /dev/null +++ b/pkg/client-sdk/client/rest/service/models/v1_submit_tree_signatures_response.go @@ -0,0 +1,11 @@ +// 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 + +// V1SubmitTreeSignaturesResponse v1 submit tree signatures response +// +// swagger:model v1SubmitTreeSignaturesResponse +type V1SubmitTreeSignaturesResponse interface{} diff --git a/pkg/client-sdk/covenant_client.go b/pkg/client-sdk/covenant_client.go index 954a55d..f1e0b81 100644 --- a/pkg/client-sdk/covenant_client.go +++ b/pkg/client-sdk/covenant_client.go @@ -481,12 +481,12 @@ func (a *covenantArkClient) CollaborativeRedeem( }) } - paymentID, err := a.client.RegisterPayment(ctx, inputs, "") // ephemeralPublicKey is not required for covenant + paymentID, err := a.client.RegisterInputsForNextRound(ctx, inputs, "") // ephemeralPublicKey is not required for covenant if err != nil { return "", err } - if err := a.client.ClaimPayment(ctx, paymentID, receivers); err != nil { + if err := a.client.RegisterOutputsForNextRound(ctx, paymentID, receivers); err != nil { return "", err } @@ -900,14 +900,14 @@ func (a *covenantArkClient) sendOffchain( }) } - paymentID, err := a.client.RegisterPayment( + paymentID, err := a.client.RegisterInputsForNextRound( ctx, inputs, "", // ephemeralPublicKey is not required for covenant ) if err != nil { return "", err } - if err := a.client.ClaimPayment( + if err := a.client.RegisterOutputsForNextRound( ctx, paymentID, receiversOutput, ); err != nil { return "", err @@ -1058,7 +1058,7 @@ func (a *covenantArkClient) handleRoundStream( } log.Info("finalizing payment... ") - if err := a.client.FinalizePayment(ctx, signedForfeitTxs, signedRoundTx); err != nil { + if err := a.client.SubmitSignedForfeitTxs(ctx, signedForfeitTxs, signedRoundTx); err != nil { return "", err } @@ -1632,12 +1632,12 @@ func (a *covenantArkClient) selfTransferAllPendingPayments( outputs := []client.Output{myself} - paymentID, err := a.client.RegisterPayment(ctx, inputs, "") // ephemeralPublicKey is not required for covenant + paymentID, err := a.client.RegisterInputsForNextRound(ctx, inputs, "") // ephemeralPublicKey is not required for covenant if err != nil { return "", err } - if err := a.client.ClaimPayment(ctx, paymentID, outputs); err != nil { + if err := a.client.RegisterOutputsForNextRound(ctx, paymentID, outputs); err != nil { return "", err } diff --git a/pkg/client-sdk/covenantless_client.go b/pkg/client-sdk/covenantless_client.go index 6f844b2..bbb3fb3 100644 --- a/pkg/client-sdk/covenantless_client.go +++ b/pkg/client-sdk/covenantless_client.go @@ -521,7 +521,7 @@ func (a *covenantlessArkClient) CollaborativeRedeem( return "", err } - paymentID, err := a.client.RegisterPayment( + paymentID, err := a.client.RegisterInputsForNextRound( ctx, inputs, hex.EncodeToString(roundEphemeralKey.PubKey().SerializeCompressed()), @@ -530,7 +530,7 @@ func (a *covenantlessArkClient) CollaborativeRedeem( return "", err } - if err := a.client.ClaimPayment(ctx, paymentID, receivers); err != nil { + if err := a.client.RegisterOutputsForNextRound(ctx, paymentID, receivers); err != nil { return "", err } @@ -1005,14 +1005,14 @@ func (a *covenantlessArkClient) sendOffchain( return "", err } - paymentID, err := a.client.RegisterPayment( + paymentID, err := a.client.RegisterInputsForNextRound( ctx, inputs, hex.EncodeToString(roundEphemeralKey.PubKey().SerializeCompressed()), ) if err != nil { return "", err } - if err := a.client.ClaimPayment( + if err := a.client.RegisterOutputsForNextRound( ctx, paymentID, receiversOutput, ); err != nil { return "", err @@ -1203,7 +1203,7 @@ func (a *covenantlessArkClient) handleRoundStream( } log.Info("finalizing payment... ") - if err := a.client.FinalizePayment(ctx, signedForfeitTxs, signedRoundTx); err != nil { + if err := a.client.SubmitSignedForfeitTxs(ctx, signedForfeitTxs, signedRoundTx); err != nil { return "", err } @@ -1255,7 +1255,7 @@ func (a *covenantlessArkClient) handleRoundSigningStarted( myPubKey := hex.EncodeToString(ephemeralKey.PubKey().SerializeCompressed()) - err = a.arkClient.client.SendTreeNonces(ctx, event.ID, myPubKey, nonces) + err = a.arkClient.client.SubmitTreeNonces(ctx, event.ID, myPubKey, nonces) return } @@ -1279,7 +1279,7 @@ func (a *covenantlessArkClient) handleRoundSigningNoncesGenerated( return err } - if err := a.arkClient.client.SendTreeSignatures( + if err := a.arkClient.client.SubmitTreeSignatures( ctx, event.ID, hex.EncodeToString(ephemeralKey.PubKey().SerializeCompressed()), @@ -1994,7 +1994,7 @@ func (a *covenantlessArkClient) selfTransferAllPendingPayments( return "", err } - paymentID, err := a.client.RegisterPayment( + paymentID, err := a.client.RegisterInputsForNextRound( ctx, inputs, hex.EncodeToString(roundEphemeralKey.PubKey().SerializeCompressed()), @@ -2003,7 +2003,7 @@ func (a *covenantlessArkClient) selfTransferAllPendingPayments( return "", err } - if err := a.client.ClaimPayment(ctx, paymentID, outputs); err != nil { + if err := a.client.RegisterOutputsForNextRound(ctx, paymentID, outputs); err != nil { return "", err } diff --git a/server/internal/interface/grpc/handlers/arkservice.go b/server/internal/interface/grpc/handlers/arkservice.go index f088d69..2be46ad 100644 --- a/server/internal/interface/grpc/handlers/arkservice.go +++ b/server/internal/interface/grpc/handlers/arkservice.go @@ -40,63 +40,228 @@ func NewHandler(service application.Service) arkv1.ArkServiceServer { return h } -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 len(req.GetSignedUnconditionalForfeitTxs()) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing signed unconditional forfeit txs") - } - - if err := h.svc.CompleteAsyncPayment( - ctx, req.GetSignedRedeemTx(), req.GetSignedUnconditionalForfeitTxs(), - ); err != nil { +func (h *handler) GetInfo( + ctx context.Context, req *arkv1.GetInfoRequest, +) (*arkv1.GetInfoResponse, error) { + info, err := h.svc.GetInfo(ctx) + if err != nil { return nil, err } - return &arkv1.CompletePaymentResponse{}, nil + return &arkv1.GetInfoResponse{ + Pubkey: info.PubKey, + RoundLifetime: info.RoundLifetime, + UnilateralExitDelay: info.UnilateralExitDelay, + RoundInterval: info.RoundInterval, + Network: info.Network, + Dust: int64(info.Dust), + BoardingDescriptorTemplate: info.BoardingDescriptorTemplate, + ForfeitAddress: info.ForfeitAddress, + }, nil } -func (h *handler) CreatePayment(ctx context.Context, req *arkv1.CreatePaymentRequest) (*arkv1.CreatePaymentResponse, error) { +func (h *handler) GetBoardingAddress( + ctx context.Context, req *arkv1.GetBoardingAddressRequest, +) (*arkv1.GetBoardingAddressResponse, error) { + pubkey := req.GetPubkey() + if pubkey == "" { + return nil, status.Error(codes.InvalidArgument, "missing pubkey") + } + + pubkeyBytes, err := hex.DecodeString(pubkey) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "invalid pubkey (invalid hex)") + } + + userPubkey, err := secp256k1.ParsePubKey(pubkeyBytes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "invalid pubkey (parse error)") + } + + addr, descriptor, err := h.svc.GetBoardingAddress(ctx, userPubkey) + if err != nil { + return nil, err + } + + return &arkv1.GetBoardingAddressResponse{ + Address: addr, + Descriptor_: descriptor, + }, nil +} + +func (h *handler) RegisterInputsForNextRound( + ctx context.Context, req *arkv1.RegisterInputsForNextRoundRequest, +) (*arkv1.RegisterInputsForNextRoundResponse, error) { inputs, err := parseInputs(req.GetInputs()) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } + id, err := h.svc.SpendVtxos(ctx, inputs) + if err != nil { + return nil, err + } + pubkey := req.GetEphemeralPubkey() + if len(pubkey) > 0 { + if err := h.svc.RegisterCosignerPubkey(ctx, id, pubkey); err != nil { + return nil, err + } + } + + return &arkv1.RegisterInputsForNextRoundResponse{ + Id: id, + }, nil +} + +func (h *handler) RegisterOutputsForNextRound( + ctx context.Context, req *arkv1.RegisterOutputsForNextRoundRequest, +) (*arkv1.RegisterOutputsForNextRoundResponse, error) { 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 { - return nil, status.Error(codes.InvalidArgument, "onchain address is not supported as async payment destination") - } - - if len(receiver.Descriptor) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing output descriptor") - } - } - - redeemTx, unconditionalForfeitTxs, err := h.svc.CreateAsyncPayment( - ctx, inputs, receivers, - ) - if err != nil { + if err := h.svc.ClaimVtxos(ctx, req.GetId(), receivers); err != nil { return nil, err } - return &arkv1.CreatePaymentResponse{ - SignedRedeemTx: redeemTx, - UsignedUnconditionalForfeitTxs: unconditionalForfeitTxs, - }, nil + return &arkv1.RegisterOutputsForNextRoundResponse{}, nil } -func (h *handler) Ping(ctx context.Context, req *arkv1.PingRequest) (*arkv1.PingResponse, error) { +func (h *handler) SubmitTreeNonces( + ctx context.Context, req *arkv1.SubmitTreeNoncesRequest, +) (*arkv1.SubmitTreeNoncesResponse, error) { + pubkey := req.GetPublicKey() + encodedNonces := req.GetTreeNonces() + roundID := req.GetRoundId() + + if len(pubkey) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing cosigner public key") + } + + if len(encodedNonces) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing tree nonces") + } + + if len(roundID) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing round id") + } + + pubkeyBytes, err := hex.DecodeString(pubkey) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") + } + + cosignerPublicKey, err := secp256k1.ParsePubKey(pubkeyBytes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") + } + + if err := h.svc.RegisterCosignerNonces( + ctx, roundID, cosignerPublicKey, encodedNonces, + ); err != nil { + return nil, err + } + + return &arkv1.SubmitTreeNoncesResponse{}, nil +} + +func (h *handler) SubmitTreeSignatures( + ctx context.Context, req *arkv1.SubmitTreeSignaturesRequest, +) (*arkv1.SubmitTreeSignaturesResponse, error) { + roundID := req.GetRoundId() + pubkey := req.GetPublicKey() + encodedSignatures := req.GetTreeSignatures() + + if len(pubkey) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing cosigner public key") + } + + if len(encodedSignatures) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing tree signatures") + } + + if len(roundID) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing round id") + } + + pubkeyBytes, err := hex.DecodeString(pubkey) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") + } + + cosignerPublicKey, err := secp256k1.ParsePubKey(pubkeyBytes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") + } + + if err := h.svc.RegisterCosignerSignatures( + ctx, roundID, cosignerPublicKey, encodedSignatures, + ); err != nil { + return nil, err + } + + return &arkv1.SubmitTreeSignaturesResponse{}, nil +} + +func (h *handler) SubmitSignedForfeitTxs( + ctx context.Context, req *arkv1.SubmitSignedForfeitTxsRequest, +) (*arkv1.SubmitSignedForfeitTxsResponse, error) { + forfeitTxs := req.GetSignedForfeitTxs() + roundTx := req.GetSignedRoundTx() + + if len(forfeitTxs) <= 0 && roundTx == "" { + return nil, status.Error(codes.InvalidArgument, "missing forfeit txs or round tx") + } + + if len(forfeitTxs) > 0 { + if err := h.svc.SignVtxos(ctx, forfeitTxs); err != nil { + return nil, err + } + } + + if roundTx != "" { + if err := h.svc.SignRoundTx(ctx, roundTx); err != nil { + return nil, err + } + } + + return &arkv1.SubmitSignedForfeitTxsResponse{}, nil +} + +func (h *handler) GetEventStream( + _ *arkv1.GetEventStreamRequest, stream arkv1.ArkService_GetEventStreamServer, +) error { + doneCh := make(chan struct{}) + + listener := &listener{ + id: uuid.NewString(), + done: doneCh, + ch: make(chan *arkv1.GetEventStreamResponse), + } + + h.pushListener(listener) + defer h.removeListener(listener.id) + defer close(listener.ch) + defer close(doneCh) + + for { + select { + case <-stream.Context().Done(): + return nil + case <-doneCh: + return nil + case ev := <-listener.ch: + if err := stream.Send(ev); err != nil { + return err + } + } + } +} + +func (h *handler) Ping( + ctx context.Context, req *arkv1.PingRequest, +) (*arkv1.PingResponse, error) { if req.GetPaymentId() == "" { return nil, status.Error(codes.InvalidArgument, "missing payment id") } @@ -175,65 +340,69 @@ func (h *handler) Ping(ctx context.Context, req *arkv1.PingRequest) (*arkv1.Ping return resp, nil } -func (h *handler) RegisterPayment(ctx context.Context, req *arkv1.RegisterPaymentRequest) (*arkv1.RegisterPaymentResponse, error) { +func (h *handler) CreatePayment( + ctx context.Context, req *arkv1.CreatePaymentRequest, +) (*arkv1.CreatePaymentResponse, error) { inputs, err := parseInputs(req.GetInputs()) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } - id, err := h.svc.SpendVtxos(ctx, inputs) - if err != nil { - return nil, err - } - pubkey := req.GetEphemeralPubkey() - if len(pubkey) > 0 { - if err := h.svc.RegisterCosignerPubkey(ctx, id, pubkey); err != nil { - return nil, err - } - } - - return &arkv1.RegisterPaymentResponse{ - Id: id, - }, nil -} - -func (h *handler) ClaimPayment(ctx context.Context, req *arkv1.ClaimPaymentRequest) (*arkv1.ClaimPaymentResponse, error) { receivers, err := parseReceivers(req.GetOutputs()) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } - if err := h.svc.ClaimVtxos(ctx, req.GetId(), receivers); err != nil { + 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 { + return nil, status.Error(codes.InvalidArgument, "onchain address is not supported as async payment destination") + } + + if len(receiver.Descriptor) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing output descriptor") + } + } + + redeemTx, unconditionalForfeitTxs, err := h.svc.CreateAsyncPayment( + ctx, inputs, receivers, + ) + if err != nil { return nil, err } - return &arkv1.ClaimPaymentResponse{}, nil + return &arkv1.CreatePaymentResponse{ + SignedRedeemTx: redeemTx, + UsignedUnconditionalForfeitTxs: unconditionalForfeitTxs, + }, nil } -func (h *handler) FinalizePayment(ctx context.Context, req *arkv1.FinalizePaymentRequest) (*arkv1.FinalizePaymentResponse, error) { - forfeitTxs := req.GetSignedForfeitTxs() - roundTx := req.GetSignedRoundTx() - - if len(forfeitTxs) <= 0 && roundTx == "" { - return nil, status.Error(codes.InvalidArgument, "missing forfeit txs or round tx") +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 len(forfeitTxs) > 0 { - if err := h.svc.SignVtxos(ctx, forfeitTxs); err != nil { - return nil, err - } + if len(req.GetSignedUnconditionalForfeitTxs()) <= 0 { + return nil, status.Error(codes.InvalidArgument, "missing signed unconditional forfeit txs") } - if roundTx != "" { - if err := h.svc.SignRoundTx(ctx, roundTx); err != nil { - return nil, err - } + if err := h.svc.CompleteAsyncPayment( + ctx, req.GetSignedRedeemTx(), req.GetSignedUnconditionalForfeitTxs(), + ); err != nil { + return nil, err } - return &arkv1.FinalizePaymentResponse{}, nil + return &arkv1.CompletePaymentResponse{}, nil } -func (h *handler) GetRound(ctx context.Context, req *arkv1.GetRoundRequest) (*arkv1.GetRoundResponse, error) { +func (h *handler) GetRound( + ctx context.Context, req *arkv1.GetRoundRequest, +) (*arkv1.GetRoundResponse, error) { if len(req.GetTxid()) <= 0 { round, err := h.svc.GetCurrentRound(ctx) if err != nil { @@ -300,35 +469,9 @@ func (h *handler) GetRoundById( }, nil } -func (h *handler) GetEventStream(_ *arkv1.GetEventStreamRequest, stream arkv1.ArkService_GetEventStreamServer) error { - doneCh := make(chan struct{}) - - listener := &listener{ - id: uuid.NewString(), - done: doneCh, - ch: make(chan *arkv1.GetEventStreamResponse), - } - - h.pushListener(listener) - defer h.removeListener(listener.id) - defer close(listener.ch) - defer close(doneCh) - - for { - select { - case <-stream.Context().Done(): - return nil - case <-doneCh: - return nil - case ev := <-listener.ch: - if err := stream.Send(ev); err != nil { - return err - } - } - } -} - -func (h *handler) ListVtxos(ctx context.Context, req *arkv1.ListVtxosRequest) (*arkv1.ListVtxosResponse, error) { +func (h *handler) ListVtxos( + ctx context.Context, req *arkv1.ListVtxosRequest, +) (*arkv1.ListVtxosResponse, error) { _, userPubkey, _, err := parseAddress(req.GetAddress()) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) @@ -345,119 +488,6 @@ func (h *handler) ListVtxos(ctx context.Context, req *arkv1.ListVtxosRequest) (* }, nil } -func (h *handler) GetInfo(ctx context.Context, req *arkv1.GetInfoRequest) (*arkv1.GetInfoResponse, error) { - info, err := h.svc.GetInfo(ctx) - if err != nil { - return nil, err - } - - return &arkv1.GetInfoResponse{ - Pubkey: info.PubKey, - RoundLifetime: info.RoundLifetime, - UnilateralExitDelay: info.UnilateralExitDelay, - RoundInterval: info.RoundInterval, - Network: info.Network, - Dust: int64(info.Dust), - BoardingDescriptorTemplate: info.BoardingDescriptorTemplate, - ForfeitAddress: info.ForfeitAddress, - }, nil -} - -func (h *handler) GetBoardingAddress(ctx context.Context, req *arkv1.GetBoardingAddressRequest) (*arkv1.GetBoardingAddressResponse, error) { - pubkey := req.GetPubkey() - if pubkey == "" { - return nil, status.Error(codes.InvalidArgument, "missing pubkey") - } - - pubkeyBytes, err := hex.DecodeString(pubkey) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid pubkey (invalid hex)") - } - - userPubkey, err := secp256k1.ParsePubKey(pubkeyBytes) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid pubkey (parse error)") - } - - addr, descriptor, err := h.svc.GetBoardingAddress(ctx, userPubkey) - if err != nil { - return nil, err - } - - return &arkv1.GetBoardingAddressResponse{ - Address: addr, - Descriptor_: descriptor, - }, nil -} - -func (h *handler) SendTreeNonces(ctx context.Context, req *arkv1.SendTreeNoncesRequest) (*arkv1.SendTreeNoncesResponse, error) { - pubkey := req.GetPublicKey() - encodedNonces := req.GetTreeNonces() - roundID := req.GetRoundId() - - if len(pubkey) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing cosigner public key") - } - - if len(encodedNonces) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing tree nonces") - } - - if len(roundID) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing round id") - } - - pubkeyBytes, err := hex.DecodeString(pubkey) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") - } - - cosignerPublicKey, err := secp256k1.ParsePubKey(pubkeyBytes) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") - } - - if err := h.svc.RegisterCosignerNonces(ctx, roundID, cosignerPublicKey, encodedNonces); err != nil { - return nil, err - } - - return &arkv1.SendTreeNoncesResponse{}, nil -} - -func (h *handler) SendTreeSignatures(ctx context.Context, req *arkv1.SendTreeSignaturesRequest) (*arkv1.SendTreeSignaturesResponse, error) { - roundID := req.GetRoundId() - pubkey := req.GetPublicKey() - encodedSignatures := req.GetTreeSignatures() - - if len(pubkey) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing cosigner public key") - } - - if len(encodedSignatures) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing tree signatures") - } - - if len(roundID) <= 0 { - return nil, status.Error(codes.InvalidArgument, "missing round id") - } - - pubkeyBytes, err := hex.DecodeString(pubkey) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") - } - - cosignerPublicKey, err := secp256k1.ParsePubKey(pubkeyBytes) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid cosigner public key") - } - - if err := h.svc.RegisterCosignerSignatures(ctx, roundID, cosignerPublicKey, encodedSignatures); err != nil { - return nil, err - } - - return &arkv1.SendTreeSignaturesResponse{}, nil -} - func (h *handler) pushListener(l *listener) { h.listenersLock.Lock() defer h.listenersLock.Unlock() @@ -520,7 +550,8 @@ func (h *handler) listenToEvents() { case application.RoundSigningStarted: cosignersKeys := make([]string, 0, len(e.Cosigners)) for _, key := range e.Cosigners { - cosignersKeys = append(cosignersKeys, hex.EncodeToString(key.SerializeCompressed())) + keyStr := hex.EncodeToString(key.SerializeCompressed()) + cosignersKeys = append(cosignersKeys, keyStr) } ev = &arkv1.GetEventStreamResponse{ diff --git a/server/internal/interface/grpc/permissions/permissions.go b/server/internal/interface/grpc/permissions/permissions.go index 88aa6dc..b5923be 100644 --- a/server/internal/interface/grpc/permissions/permissions.go +++ b/server/internal/interface/grpc/permissions/permissions.go @@ -109,15 +109,15 @@ func Whitelist() map[string][]bakery.Op { Entity: EntityWallet, Action: "read", }}, - fmt.Sprintf("/%s/RegisterPayment", arkv1.ArkService_ServiceDesc.ServiceName): {{ + fmt.Sprintf("/%s/RegisterInputsForNextRound", arkv1.ArkService_ServiceDesc.ServiceName): {{ Entity: EntityArk, Action: "write", }}, - fmt.Sprintf("/%s/ClaimPayment", arkv1.ArkService_ServiceDesc.ServiceName): {{ + fmt.Sprintf("/%s/RegisterOutputsForNextRound", arkv1.ArkService_ServiceDesc.ServiceName): {{ Entity: EntityArk, Action: "write", }}, - fmt.Sprintf("/%s/FinalizePayment", arkv1.ArkService_ServiceDesc.ServiceName): {{ + fmt.Sprintf("/%s/SubmitSignedForfeitTxs", arkv1.ArkService_ServiceDesc.ServiceName): {{ Entity: EntityArk, Action: "write", }}, @@ -161,11 +161,11 @@ func Whitelist() map[string][]bakery.Op { Entity: EntityArk, Action: "read", }}, - fmt.Sprintf("/%s/SendTreeNonces", arkv1.ArkService_ServiceDesc.ServiceName): {{ + fmt.Sprintf("/%s/SubmitTreeNonces", arkv1.ArkService_ServiceDesc.ServiceName): {{ Entity: EntityArk, Action: "write", }}, - fmt.Sprintf("/%s/SendTreeSignatures", arkv1.ArkService_ServiceDesc.ServiceName): {{ + fmt.Sprintf("/%s/SubmitTreeSignatures", arkv1.ArkService_ServiceDesc.ServiceName): {{ Entity: EntityArk, Action: "write", }},