Add support for covenant-less ASP (#214)

* scaffolding wallet

* remove wallet db, add loader instead

* wip

* implement some wallet methods

* signing and utxos

* renaming

* fee estimator

* chain source options

* config

* application service

* clark docker-compose

* CLI refactor

* v0 clark

* v0.1 clark

* fix SignTapscriptInput (btcwallet)

* wallet.Broadcast, send via explora

* fix ASP pubkey

* Use lnd's btcwallet & Add rpc to get wallet staus

* wip

* unilateral exit

* Fixes on watching for notifications and cli init

* handle non-final BIP68 errors

* Fixes

* Fixes

* Fix

* a

* fix onboard cosigners + revert tree validation

* fix covenant e2e tests

* fix covenantless e2e tests

* fix container naming

* fix lint error

* update REAME.md

* Add env var for wallet password

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
This commit is contained in:
Louis Singer
2024-07-30 20:57:52 +02:00
committed by GitHub
parent 89df461623
commit 01297ae38c
99 changed files with 9487 additions and 2704 deletions

View File

@@ -16,6 +16,28 @@
"application/json"
],
"paths": {
"/v1/admin/address": {
"get": {
"operationId": "AdminService_GetWalletAddress",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetWalletAddressResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"AdminService"
]
}
},
"/v1/admin/balance": {
"get": {
"operationId": "AdminService_GetBalance",
@@ -100,6 +122,28 @@
]
}
},
"/v1/admin/status": {
"get": {
"operationId": "AdminService_GetWalletStatus",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetWalletStatusResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"AdminService"
]
}
},
"/v1/admin/sweeps": {
"get": {
"operationId": "AdminService_GetScheduledSweep",
@@ -251,6 +295,28 @@
}
}
},
"v1GetWalletAddressResponse": {
"type": "object",
"properties": {
"address": {
"type": "string"
}
}
},
"v1GetWalletStatusResponse": {
"type": "object",
"properties": {
"initialized": {
"type": "boolean"
},
"unlocked": {
"type": "boolean"
},
"synced": {
"type": "boolean"
}
}
},
"v1ScheduledSweep": {
"type": "object",
"properties": {

View File

@@ -26,6 +26,16 @@ service AdminService {
body: "*"
};
}
rpc GetWalletAddress(GetWalletAddressRequest) returns (GetWalletAddressResponse) {
option (google.api.http) = {
get: "/v1/admin/address"
};
}
rpc GetWalletStatus(GetWalletStatusRequest) returns (GetWalletStatusResponse) {
option (google.api.http) = {
get: "/v1/admin/status"
};
}
}
message GetBalanceRequest {}
@@ -82,3 +92,20 @@ message GetRoundsRequest {
message GetRoundsResponse {
repeated string rounds = 1;
}
message GetWalletAddressRequest {}
message GetWalletAddressResponse {
string address = 1;
}
message GetWalletBalanceRequest {}
message GetWalletBalanceResponse {
uint64 balance = 1;
}
message GetWalletStatusRequest {}
message GetWalletStatusResponse {
bool initialized = 1;
bool unlocked = 2;
bool synced = 3;
}

View File

@@ -640,6 +640,277 @@ func (x *GetRoundsResponse) GetRounds() []string {
return nil
}
type GetWalletAddressRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetWalletAddressRequest) Reset() {
*x = GetWalletAddressRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_admin_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWalletAddressRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWalletAddressRequest) ProtoMessage() {}
func (x *GetWalletAddressRequest) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_admin_proto_msgTypes[11]
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 GetWalletAddressRequest.ProtoReflect.Descriptor instead.
func (*GetWalletAddressRequest) Descriptor() ([]byte, []int) {
return file_ark_v1_admin_proto_rawDescGZIP(), []int{11}
}
type GetWalletAddressResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}
func (x *GetWalletAddressResponse) Reset() {
*x = GetWalletAddressResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_admin_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWalletAddressResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWalletAddressResponse) ProtoMessage() {}
func (x *GetWalletAddressResponse) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_admin_proto_msgTypes[12]
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 GetWalletAddressResponse.ProtoReflect.Descriptor instead.
func (*GetWalletAddressResponse) Descriptor() ([]byte, []int) {
return file_ark_v1_admin_proto_rawDescGZIP(), []int{12}
}
func (x *GetWalletAddressResponse) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
type GetWalletBalanceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetWalletBalanceRequest) Reset() {
*x = GetWalletBalanceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_admin_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWalletBalanceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWalletBalanceRequest) ProtoMessage() {}
func (x *GetWalletBalanceRequest) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_admin_proto_msgTypes[13]
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 GetWalletBalanceRequest.ProtoReflect.Descriptor instead.
func (*GetWalletBalanceRequest) Descriptor() ([]byte, []int) {
return file_ark_v1_admin_proto_rawDescGZIP(), []int{13}
}
type GetWalletBalanceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Balance uint64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"`
}
func (x *GetWalletBalanceResponse) Reset() {
*x = GetWalletBalanceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_admin_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWalletBalanceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWalletBalanceResponse) ProtoMessage() {}
func (x *GetWalletBalanceResponse) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_admin_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 GetWalletBalanceResponse.ProtoReflect.Descriptor instead.
func (*GetWalletBalanceResponse) Descriptor() ([]byte, []int) {
return file_ark_v1_admin_proto_rawDescGZIP(), []int{14}
}
func (x *GetWalletBalanceResponse) GetBalance() uint64 {
if x != nil {
return x.Balance
}
return 0
}
type GetWalletStatusRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetWalletStatusRequest) Reset() {
*x = GetWalletStatusRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_admin_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWalletStatusRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWalletStatusRequest) ProtoMessage() {}
func (x *GetWalletStatusRequest) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_admin_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 GetWalletStatusRequest.ProtoReflect.Descriptor instead.
func (*GetWalletStatusRequest) Descriptor() ([]byte, []int) {
return file_ark_v1_admin_proto_rawDescGZIP(), []int{15}
}
type GetWalletStatusResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Initialized bool `protobuf:"varint,1,opt,name=initialized,proto3" json:"initialized,omitempty"`
Unlocked bool `protobuf:"varint,2,opt,name=unlocked,proto3" json:"unlocked,omitempty"`
Synced bool `protobuf:"varint,3,opt,name=synced,proto3" json:"synced,omitempty"`
}
func (x *GetWalletStatusResponse) Reset() {
*x = GetWalletStatusResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_admin_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWalletStatusResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWalletStatusResponse) ProtoMessage() {}
func (x *GetWalletStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_admin_proto_msgTypes[16]
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 GetWalletStatusResponse.ProtoReflect.Descriptor instead.
func (*GetWalletStatusResponse) Descriptor() ([]byte, []int) {
return file_ark_v1_admin_proto_rawDescGZIP(), []int{16}
}
func (x *GetWalletStatusResponse) GetInitialized() bool {
if x != nil {
return x.Initialized
}
return false
}
func (x *GetWalletStatusResponse) GetUnlocked() bool {
if x != nil {
return x.Unlocked
}
return false
}
func (x *GetWalletStatusResponse) GetSynced() bool {
if x != nil {
return x.Synced
}
return false
}
var File_ark_v1_admin_proto protoreflect.FileDescriptor
var file_ark_v1_admin_proto_rawDesc = []byte{
@@ -712,45 +983,78 @@ var file_ark_v1_admin_proto_rawDesc = []byte{
0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72,
0x65, 0x22, 0x2b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x32, 0xb9,
0x03, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x5e, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x2e,
0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76,
0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76,
0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12,
0x72, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53,
0x77, 0x65, 0x65, 0x70, 0x12, 0x20, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e,
0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x22, 0x19,
0x0a, 0x17, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x18, 0x47, 0x65, 0x74,
0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 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, 0x22,
0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61,
0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x18, 0x47, 0x65,
0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65,
0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x17, 0x47, 0x65,
0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74,
0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x6c, 0x6f, 0x63,
0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x6c, 0x6f, 0x63,
0x6b, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x32, 0x99, 0x05, 0x0a, 0x0c,
0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0a,
0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x72, 0x6b,
0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47,
0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61,
0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x11,
0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x77, 0x65, 0x65,
0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x73, 0x77, 0x65,
0x65, 0x70, 0x73, 0x12, 0x76, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e,
0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e,
0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12,
0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64,
0x2f, 0x7b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x5d, 0x0a, 0x09, 0x47,
0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76,
0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52,
0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64,
0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x42, 0x90, 0x01, 0x0a, 0x0a, 0x63,
0x6f, 0x6d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x41, 0x64, 0x6d, 0x69, 0x6e,
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,
0x70, 0x12, 0x20, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63,
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10,
0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x73,
0x12, 0x76, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61,
0x69, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76,
0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2f, 0x7b, 0x72,
0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x5d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52,
0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47,
0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x6e,
0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e,
0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x61,
0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x72,
0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61,
0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69,
0x6e, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x6c, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x61,
0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61,
0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e,
0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x90, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e,
0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 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 (
@@ -765,7 +1069,7 @@ func file_ark_v1_admin_proto_rawDescGZIP() []byte {
return file_ark_v1_admin_proto_rawDescData
}
var file_ark_v1_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_ark_v1_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_ark_v1_admin_proto_goTypes = []interface{}{
(*GetBalanceRequest)(nil), // 0: ark.v1.GetBalanceRequest
(*Balance)(nil), // 1: ark.v1.Balance
@@ -778,6 +1082,12 @@ var file_ark_v1_admin_proto_goTypes = []interface{}{
(*GetRoundDetailsResponse)(nil), // 8: ark.v1.GetRoundDetailsResponse
(*GetRoundsRequest)(nil), // 9: ark.v1.GetRoundsRequest
(*GetRoundsResponse)(nil), // 10: ark.v1.GetRoundsResponse
(*GetWalletAddressRequest)(nil), // 11: ark.v1.GetWalletAddressRequest
(*GetWalletAddressResponse)(nil), // 12: ark.v1.GetWalletAddressResponse
(*GetWalletBalanceRequest)(nil), // 13: ark.v1.GetWalletBalanceRequest
(*GetWalletBalanceResponse)(nil), // 14: ark.v1.GetWalletBalanceResponse
(*GetWalletStatusRequest)(nil), // 15: ark.v1.GetWalletStatusRequest
(*GetWalletStatusResponse)(nil), // 16: ark.v1.GetWalletStatusResponse
}
var file_ark_v1_admin_proto_depIdxs = []int32{
1, // 0: ark.v1.GetBalanceResponse.main_account:type_name -> ark.v1.Balance
@@ -788,12 +1098,16 @@ var file_ark_v1_admin_proto_depIdxs = []int32{
3, // 5: ark.v1.AdminService.GetScheduledSweep:input_type -> ark.v1.GetScheduledSweepRequest
7, // 6: ark.v1.AdminService.GetRoundDetails:input_type -> ark.v1.GetRoundDetailsRequest
9, // 7: ark.v1.AdminService.GetRounds:input_type -> ark.v1.GetRoundsRequest
2, // 8: ark.v1.AdminService.GetBalance:output_type -> ark.v1.GetBalanceResponse
6, // 9: ark.v1.AdminService.GetScheduledSweep:output_type -> ark.v1.GetScheduledSweepResponse
8, // 10: ark.v1.AdminService.GetRoundDetails:output_type -> ark.v1.GetRoundDetailsResponse
10, // 11: ark.v1.AdminService.GetRounds:output_type -> ark.v1.GetRoundsResponse
8, // [8:12] is the sub-list for method output_type
4, // [4:8] is the sub-list for method input_type
11, // 8: ark.v1.AdminService.GetWalletAddress:input_type -> ark.v1.GetWalletAddressRequest
15, // 9: ark.v1.AdminService.GetWalletStatus:input_type -> ark.v1.GetWalletStatusRequest
2, // 10: ark.v1.AdminService.GetBalance:output_type -> ark.v1.GetBalanceResponse
6, // 11: ark.v1.AdminService.GetScheduledSweep:output_type -> ark.v1.GetScheduledSweepResponse
8, // 12: ark.v1.AdminService.GetRoundDetails:output_type -> ark.v1.GetRoundDetailsResponse
10, // 13: ark.v1.AdminService.GetRounds:output_type -> ark.v1.GetRoundsResponse
12, // 14: ark.v1.AdminService.GetWalletAddress:output_type -> ark.v1.GetWalletAddressResponse
16, // 15: ark.v1.AdminService.GetWalletStatus:output_type -> ark.v1.GetWalletStatusResponse
10, // [10:16] is the sub-list for method output_type
4, // [4:10] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
@@ -937,6 +1251,78 @@ func file_ark_v1_admin_proto_init() {
return nil
}
}
file_ark_v1_admin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWalletAddressRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ark_v1_admin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWalletAddressResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ark_v1_admin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWalletBalanceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ark_v1_admin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWalletBalanceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ark_v1_admin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWalletStatusRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ark_v1_admin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWalletStatusResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -944,7 +1330,7 @@ func file_ark_v1_admin_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_ark_v1_admin_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumMessages: 17,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -145,6 +145,42 @@ func local_request_AdminService_GetRounds_0(ctx context.Context, marshaler runti
}
func request_AdminService_GetWalletAddress_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWalletAddressRequest
var metadata runtime.ServerMetadata
msg, err := client.GetWalletAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AdminService_GetWalletAddress_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWalletAddressRequest
var metadata runtime.ServerMetadata
msg, err := server.GetWalletAddress(ctx, &protoReq)
return msg, metadata, err
}
func request_AdminService_GetWalletStatus_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWalletStatusRequest
var metadata runtime.ServerMetadata
msg, err := client.GetWalletStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AdminService_GetWalletStatus_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWalletStatusRequest
var metadata runtime.ServerMetadata
msg, err := server.GetWalletStatus(ctx, &protoReq)
return msg, metadata, err
}
// RegisterAdminServiceHandlerServer registers the http handlers for service AdminService to "mux".
// UnaryRPC :call AdminServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -251,6 +287,56 @@ func RegisterAdminServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
})
mux.Handle("GET", pattern_AdminService_GetWalletAddress_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.AdminService/GetWalletAddress", runtime.WithHTTPPathPattern("/v1/admin/address"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AdminService_GetWalletAddress_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_AdminService_GetWalletAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_AdminService_GetWalletStatus_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.AdminService/GetWalletStatus", runtime.WithHTTPPathPattern("/v1/admin/status"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AdminService_GetWalletStatus_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_AdminService_GetWalletStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -380,6 +466,50 @@ func RegisterAdminServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
})
mux.Handle("GET", pattern_AdminService_GetWalletAddress_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.AdminService/GetWalletAddress", runtime.WithHTTPPathPattern("/v1/admin/address"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AdminService_GetWalletAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_AdminService_GetWalletAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_AdminService_GetWalletStatus_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.AdminService/GetWalletStatus", runtime.WithHTTPPathPattern("/v1/admin/status"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AdminService_GetWalletStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_AdminService_GetWalletStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -391,6 +521,10 @@ var (
pattern_AdminService_GetRoundDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "admin", "round", "round_id"}, ""))
pattern_AdminService_GetRounds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "admin", "rounds"}, ""))
pattern_AdminService_GetWalletAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "admin", "address"}, ""))
pattern_AdminService_GetWalletStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "admin", "status"}, ""))
)
var (
@@ -401,4 +535,8 @@ var (
forward_AdminService_GetRoundDetails_0 = runtime.ForwardResponseMessage
forward_AdminService_GetRounds_0 = runtime.ForwardResponseMessage
forward_AdminService_GetWalletAddress_0 = runtime.ForwardResponseMessage
forward_AdminService_GetWalletStatus_0 = runtime.ForwardResponseMessage
)

View File

@@ -22,6 +22,8 @@ type AdminServiceClient interface {
GetScheduledSweep(ctx context.Context, in *GetScheduledSweepRequest, opts ...grpc.CallOption) (*GetScheduledSweepResponse, error)
GetRoundDetails(ctx context.Context, in *GetRoundDetailsRequest, opts ...grpc.CallOption) (*GetRoundDetailsResponse, error)
GetRounds(ctx context.Context, in *GetRoundsRequest, opts ...grpc.CallOption) (*GetRoundsResponse, error)
GetWalletAddress(ctx context.Context, in *GetWalletAddressRequest, opts ...grpc.CallOption) (*GetWalletAddressResponse, error)
GetWalletStatus(ctx context.Context, in *GetWalletStatusRequest, opts ...grpc.CallOption) (*GetWalletStatusResponse, error)
}
type adminServiceClient struct {
@@ -68,6 +70,24 @@ func (c *adminServiceClient) GetRounds(ctx context.Context, in *GetRoundsRequest
return out, nil
}
func (c *adminServiceClient) GetWalletAddress(ctx context.Context, in *GetWalletAddressRequest, opts ...grpc.CallOption) (*GetWalletAddressResponse, error) {
out := new(GetWalletAddressResponse)
err := c.cc.Invoke(ctx, "/ark.v1.AdminService/GetWalletAddress", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *adminServiceClient) GetWalletStatus(ctx context.Context, in *GetWalletStatusRequest, opts ...grpc.CallOption) (*GetWalletStatusResponse, error) {
out := new(GetWalletStatusResponse)
err := c.cc.Invoke(ctx, "/ark.v1.AdminService/GetWalletStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AdminServiceServer is the server API for AdminService service.
// All implementations should embed UnimplementedAdminServiceServer
// for forward compatibility
@@ -76,6 +96,8 @@ type AdminServiceServer interface {
GetScheduledSweep(context.Context, *GetScheduledSweepRequest) (*GetScheduledSweepResponse, error)
GetRoundDetails(context.Context, *GetRoundDetailsRequest) (*GetRoundDetailsResponse, error)
GetRounds(context.Context, *GetRoundsRequest) (*GetRoundsResponse, error)
GetWalletAddress(context.Context, *GetWalletAddressRequest) (*GetWalletAddressResponse, error)
GetWalletStatus(context.Context, *GetWalletStatusRequest) (*GetWalletStatusResponse, error)
}
// UnimplementedAdminServiceServer should be embedded to have forward compatible implementations.
@@ -94,6 +116,12 @@ func (UnimplementedAdminServiceServer) GetRoundDetails(context.Context, *GetRoun
func (UnimplementedAdminServiceServer) GetRounds(context.Context, *GetRoundsRequest) (*GetRoundsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRounds not implemented")
}
func (UnimplementedAdminServiceServer) GetWalletAddress(context.Context, *GetWalletAddressRequest) (*GetWalletAddressResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWalletAddress not implemented")
}
func (UnimplementedAdminServiceServer) GetWalletStatus(context.Context, *GetWalletStatusRequest) (*GetWalletStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWalletStatus not implemented")
}
// UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AdminServiceServer will
@@ -178,6 +206,42 @@ func _AdminService_GetRounds_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
func _AdminService_GetWalletAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWalletAddressRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminServiceServer).GetWalletAddress(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ark.v1.AdminService/GetWalletAddress",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminServiceServer).GetWalletAddress(ctx, req.(*GetWalletAddressRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AdminService_GetWalletStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWalletStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminServiceServer).GetWalletStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ark.v1.AdminService/GetWalletStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminServiceServer).GetWalletStatus(ctx, req.(*GetWalletStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
// AdminService_ServiceDesc is the grpc.ServiceDesc for AdminService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -201,6 +265,14 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetRounds",
Handler: _AdminService_GetRounds_Handler,
},
{
MethodName: "GetWalletAddress",
Handler: _AdminService_GetWalletAddress_Handler,
},
{
MethodName: "GetWalletStatus",
Handler: _AdminService_GetWalletStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ark/v1/admin.proto",