Monorepo scaffolding (#16)

* Change scaffolding

* Fix gh action
This commit is contained in:
Pietralberto Mazza
2023-11-27 14:23:22 +01:00
committed by GitHub
parent 28db168af0
commit 0210d39866
90 changed files with 1938 additions and 76 deletions

View File

@@ -0,0 +1,946 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc (unknown)
// source: ark/v1/service.proto
package arkv1
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type RegisterPaymentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Unsigned forfeit tx sending all funds back to the ASP.
Vtx string `protobuf:"bytes,1,opt,name=vtx,proto3" json:"vtx,omitempty"`
}
func (x *RegisterPaymentRequest) Reset() {
*x = RegisterPaymentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegisterPaymentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegisterPaymentRequest) ProtoMessage() {}
func (x *RegisterPaymentRequest) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_service_proto_msgTypes[0]
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 RegisterPaymentRequest.ProtoReflect.Descriptor instead.
func (*RegisterPaymentRequest) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{0}
}
func (x *RegisterPaymentRequest) GetVtx() string {
if x != nil {
return x.Vtx
}
return ""
}
type RegisterPaymentResponse 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"`
// Forfeit tx signed by the ASP.
SignedVtx string `protobuf:"bytes,2,opt,name=signed_vtx,json=signedVtx,proto3" json:"signed_vtx,omitempty"`
}
func (x *RegisterPaymentResponse) Reset() {
*x = RegisterPaymentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegisterPaymentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegisterPaymentResponse) ProtoMessage() {}
func (x *RegisterPaymentResponse) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_service_proto_msgTypes[1]
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 RegisterPaymentResponse.ProtoReflect.Descriptor instead.
func (*RegisterPaymentResponse) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{1}
}
func (x *RegisterPaymentResponse) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *RegisterPaymentResponse) GetSignedVtx() string {
if x != nil {
return x.SignedVtx
}
return ""
}
type ClaimPaymentRequest 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"`
}
func (x *ClaimPaymentRequest) Reset() {
*x = ClaimPaymentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ClaimPaymentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClaimPaymentRequest) ProtoMessage() {}
func (x *ClaimPaymentRequest) 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 ClaimPaymentRequest.ProtoReflect.Descriptor instead.
func (*ClaimPaymentRequest) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{2}
}
func (x *ClaimPaymentRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *ClaimPaymentRequest) GetOutputs() []*Output {
if x != nil {
return x.Outputs
}
return nil
}
type ClaimPaymentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ClaimPaymentResponse) Reset() {
*x = ClaimPaymentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ClaimPaymentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ClaimPaymentResponse) ProtoMessage() {}
func (x *ClaimPaymentResponse) 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 ClaimPaymentResponse.ProtoReflect.Descriptor instead.
func (*ClaimPaymentResponse) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{3}
}
type FinalizePaymentRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Forfeit tx signed also by the user.
SignedVtx string `protobuf:"bytes,1,opt,name=signed_vtx,json=signedVtx,proto3" json:"signed_vtx,omitempty"`
}
func (x *FinalizePaymentRequest) Reset() {
*x = FinalizePaymentRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FinalizePaymentRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FinalizePaymentRequest) ProtoMessage() {}
func (x *FinalizePaymentRequest) 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 FinalizePaymentRequest.ProtoReflect.Descriptor instead.
func (*FinalizePaymentRequest) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{4}
}
func (x *FinalizePaymentRequest) GetSignedVtx() string {
if x != nil {
return x.SignedVtx
}
return ""
}
type FinalizePaymentResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FinalizePaymentResponse) Reset() {
*x = FinalizePaymentResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FinalizePaymentResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FinalizePaymentResponse) ProtoMessage() {}
func (x *FinalizePaymentResponse) 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 FinalizePaymentResponse.ProtoReflect.Descriptor instead.
func (*FinalizePaymentResponse) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{5}
}
type ListRoundsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
}
func (x *ListRoundsRequest) Reset() {
*x = ListRoundsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListRoundsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListRoundsRequest) ProtoMessage() {}
func (x *ListRoundsRequest) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_service_proto_msgTypes[6]
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 ListRoundsRequest.ProtoReflect.Descriptor instead.
func (*ListRoundsRequest) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{6}
}
func (x *ListRoundsRequest) GetStart() int64 {
if x != nil {
return x.Start
}
return 0
}
func (x *ListRoundsRequest) GetEnd() int64 {
if x != nil {
return x.End
}
return 0
}
type ListRoundsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rounds []*Round `protobuf:"bytes,1,rep,name=rounds,proto3" json:"rounds,omitempty"`
}
func (x *ListRoundsResponse) Reset() {
*x = ListRoundsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListRoundsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListRoundsResponse) ProtoMessage() {}
func (x *ListRoundsResponse) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_service_proto_msgTypes[7]
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 ListRoundsResponse.ProtoReflect.Descriptor instead.
func (*ListRoundsResponse) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{7}
}
func (x *ListRoundsResponse) GetRounds() []*Round {
if x != nil {
return x.Rounds
}
return nil
}
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[8]
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[8]
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{8}
}
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[9]
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[9]
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{9}
}
func (x *GetRoundResponse) GetRound() *Round {
if x != nil {
return x.Round
}
return nil
}
type Round struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
Txid string `protobuf:"bytes,3,opt,name=txid,proto3" json:"txid,omitempty"`
Outputs []*Output `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"`
}
func (x *Round) Reset() {
*x = Round{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Round) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Round) ProtoMessage() {}
func (x *Round) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_service_proto_msgTypes[10]
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 Round.ProtoReflect.Descriptor instead.
func (*Round) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{10}
}
func (x *Round) GetStart() int64 {
if x != nil {
return x.Start
}
return 0
}
func (x *Round) GetEnd() int64 {
if x != nil {
return x.End
}
return 0
}
func (x *Round) GetTxid() string {
if x != nil {
return x.Txid
}
return ""
}
func (x *Round) GetOutputs() []*Output {
if x != nil {
return x.Outputs
}
return nil
}
type Output struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
}
func (x *Output) Reset() {
*x = Output{}
if protoimpl.UnsafeEnabled {
mi := &file_ark_v1_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Output) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Output) ProtoMessage() {}
func (x *Output) ProtoReflect() protoreflect.Message {
mi := &file_ark_v1_service_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 Output.ProtoReflect.Descriptor instead.
func (*Output) Descriptor() ([]byte, []int) {
return file_ark_v1_service_proto_rawDescGZIP(), []int{11}
}
func (x *Output) GetPubkey() string {
if x != nil {
return x.Pubkey
}
return ""
}
func (x *Output) GetAmount() uint64 {
if x != nil {
return x.Amount
}
return 0
}
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, 0x2a, 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, 0x10, 0x0a, 0x03, 0x76, 0x74, 0x78, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x76, 0x74, 0x78, 0x22, 0x48, 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, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x74,
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56,
0x74, 0x78, 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, 0x37, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f,
0x76, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65,
0x64, 0x56, 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,
0x3b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x3b, 0x0a, 0x12,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e,
0x64, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73, 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, 0x6d, 0x0a, 0x05, 0x52, 0x6f, 0x75,
0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78,
0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x28,
0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x04, 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, 0x38, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70,
0x75, 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, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75,
0x6e, 0x74, 0x32, 0x94, 0x04, 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, 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, 0x5a, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e,
0x64, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x6e, 0x64,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x73,
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, 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 (
file_ark_v1_service_proto_rawDescOnce sync.Once
file_ark_v1_service_proto_rawDescData = file_ark_v1_service_proto_rawDesc
)
func file_ark_v1_service_proto_rawDescGZIP() []byte {
file_ark_v1_service_proto_rawDescOnce.Do(func() {
file_ark_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_ark_v1_service_proto_rawDescData)
})
return file_ark_v1_service_proto_rawDescData
}
var file_ark_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_ark_v1_service_proto_goTypes = []interface{}{
(*RegisterPaymentRequest)(nil), // 0: ark.v1.RegisterPaymentRequest
(*RegisterPaymentResponse)(nil), // 1: ark.v1.RegisterPaymentResponse
(*ClaimPaymentRequest)(nil), // 2: ark.v1.ClaimPaymentRequest
(*ClaimPaymentResponse)(nil), // 3: ark.v1.ClaimPaymentResponse
(*FinalizePaymentRequest)(nil), // 4: ark.v1.FinalizePaymentRequest
(*FinalizePaymentResponse)(nil), // 5: ark.v1.FinalizePaymentResponse
(*ListRoundsRequest)(nil), // 6: ark.v1.ListRoundsRequest
(*ListRoundsResponse)(nil), // 7: ark.v1.ListRoundsResponse
(*GetRoundRequest)(nil), // 8: ark.v1.GetRoundRequest
(*GetRoundResponse)(nil), // 9: ark.v1.GetRoundResponse
(*Round)(nil), // 10: ark.v1.Round
(*Output)(nil), // 11: ark.v1.Output
}
var file_ark_v1_service_proto_depIdxs = []int32{
11, // 0: ark.v1.ClaimPaymentRequest.outputs:type_name -> ark.v1.Output
10, // 1: ark.v1.ListRoundsResponse.rounds:type_name -> ark.v1.Round
10, // 2: ark.v1.GetRoundResponse.round:type_name -> ark.v1.Round
11, // 3: ark.v1.Round.outputs:type_name -> ark.v1.Output
0, // 4: ark.v1.ArkService.RegisterPayment:input_type -> ark.v1.RegisterPaymentRequest
2, // 5: ark.v1.ArkService.ClaimPayment:input_type -> ark.v1.ClaimPaymentRequest
4, // 6: ark.v1.ArkService.FinalizePayment:input_type -> ark.v1.FinalizePaymentRequest
6, // 7: ark.v1.ArkService.ListRounds:input_type -> ark.v1.ListRoundsRequest
8, // 8: ark.v1.ArkService.GetRound:input_type -> ark.v1.GetRoundRequest
1, // 9: ark.v1.ArkService.RegisterPayment:output_type -> ark.v1.RegisterPaymentResponse
3, // 10: ark.v1.ArkService.ClaimPayment:output_type -> ark.v1.ClaimPaymentResponse
5, // 11: ark.v1.ArkService.FinalizePayment:output_type -> ark.v1.FinalizePaymentResponse
7, // 12: ark.v1.ArkService.ListRounds:output_type -> ark.v1.ListRoundsResponse
9, // 13: ark.v1.ArkService.GetRound:output_type -> ark.v1.GetRoundResponse
9, // [9:14] is the sub-list for method output_type
4, // [4:9] 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
}
func init() { file_ark_v1_service_proto_init() }
func file_ark_v1_service_proto_init() {
if File_ark_v1_service_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_ark_v1_service_proto_msgTypes[0].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[1].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[2].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[3].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[4].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[5].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[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListRoundsRequest); 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.(*ListRoundsResponse); 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.(*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[9].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[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Round); 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.(*Output); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_ark_v1_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 12,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_ark_v1_service_proto_goTypes,
DependencyIndexes: file_ark_v1_service_proto_depIdxs,
MessageInfos: file_ark_v1_service_proto_msgTypes,
}.Build()
File_ark_v1_service_proto = out.File
file_ark_v1_service_proto_rawDesc = nil
file_ark_v1_service_proto_goTypes = nil
file_ark_v1_service_proto_depIdxs = nil
}

View File

@@ -0,0 +1,509 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: ark/v1/service.proto
/*
Package arkv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package arkv1
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
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
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).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))
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
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.RegisterPayment(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
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).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))
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
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ClaimPayment(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
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).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))
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
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.FinalizePayment(ctx, &protoReq)
return msg, metadata, err
}
func request_ArkService_ListRounds_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListRoundsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListRounds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ArkService_ListRounds_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListRoundsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListRounds(ctx, &protoReq)
return msg, metadata, err
}
func request_ArkService_GetRound_0(ctx context.Context, marshaler runtime.Marshaler, client ArkServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetRoundRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["txid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "txid")
}
protoReq.Txid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "txid", err)
}
msg, err := client.GetRound(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ArkService_GetRound_0(ctx context.Context, marshaler runtime.Marshaler, server ArkServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetRoundRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["txid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "txid")
}
protoReq.Txid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "txid", err)
}
msg, err := server.GetRound(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.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterArkServiceHandlerFromEndpoint instead.
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)
rctx, 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(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_RegisterPayment_0(ctx, 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)
rctx, 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(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_ClaimPayment_0(ctx, 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)
rctx, 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(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_FinalizePayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_ArkService_ListRounds_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)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ark.v1.ArkService/ListRounds", runtime.WithHTTPPathPattern("/v1/rounds"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ArkService_ListRounds_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_ListRounds_0(ctx, 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)
rctx, 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(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_GetRound_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterArkServiceHandlerFromEndpoint is same as RegisterArkServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterArkServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterArkServiceHandler(ctx, mux, conn)
}
// RegisterArkServiceHandler registers the http handlers for service ArkService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterArkServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterArkServiceHandlerClient(ctx, mux, NewArkServiceClient(conn))
}
// RegisterArkServiceHandlerClient registers the http handlers for service ArkService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ArkServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ArkServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "ArkServiceClient" to call the correct interceptors.
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)
rctx, 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(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_RegisterPayment_0(ctx, 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)
rctx, 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(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_ClaimPayment_0(ctx, 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)
rctx, 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(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_FinalizePayment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_ArkService_ListRounds_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)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ark.v1.ArkService/ListRounds", runtime.WithHTTPPathPattern("/v1/rounds"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ArkService_ListRounds_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_ListRounds_0(ctx, 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)
rctx, 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(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ArkService_GetRound_0(ctx, 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_ClaimPayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "claim"}, ""))
pattern_ArkService_FinalizePayment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "payment", "finalize"}, ""))
pattern_ArkService_ListRounds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "rounds"}, ""))
pattern_ArkService_GetRound_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "round", "txid"}, ""))
)
var (
forward_ArkService_RegisterPayment_0 = runtime.ForwardResponseMessage
forward_ArkService_ClaimPayment_0 = runtime.ForwardResponseMessage
forward_ArkService_FinalizePayment_0 = runtime.ForwardResponseMessage
forward_ArkService_ListRounds_0 = runtime.ForwardResponseMessage
forward_ArkService_GetRound_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,243 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package arkv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ArkServiceClient is the client API for ArkService service.
//
// 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)
FinalizePayment(ctx context.Context, in *FinalizePaymentRequest, opts ...grpc.CallOption) (*FinalizePaymentResponse, error)
ListRounds(ctx context.Context, in *ListRoundsRequest, opts ...grpc.CallOption) (*ListRoundsResponse, error)
GetRound(ctx context.Context, in *GetRoundRequest, opts ...grpc.CallOption) (*GetRoundResponse, error)
}
type arkServiceClient struct {
cc grpc.ClientConnInterface
}
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...)
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...)
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...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arkServiceClient) ListRounds(ctx context.Context, in *ListRoundsRequest, opts ...grpc.CallOption) (*ListRoundsResponse, error) {
out := new(ListRoundsResponse)
err := c.cc.Invoke(ctx, "/ark.v1.ArkService/ListRounds", 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...)
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)
FinalizePayment(context.Context, *FinalizePaymentRequest) (*FinalizePaymentResponse, error)
ListRounds(context.Context, *ListRoundsRequest) (*ListRoundsResponse, error)
GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, 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) ClaimPayment(context.Context, *ClaimPaymentRequest) (*ClaimPaymentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ClaimPayment not implemented")
}
func (UnimplementedArkServiceServer) FinalizePayment(context.Context, *FinalizePaymentRequest) (*FinalizePaymentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FinalizePayment not implemented")
}
func (UnimplementedArkServiceServer) ListRounds(context.Context, *ListRoundsRequest) (*ListRoundsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListRounds not implemented")
}
func (UnimplementedArkServiceServer) GetRound(context.Context, *GetRoundRequest) (*GetRoundResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRound 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
// result in compilation errors.
type UnsafeArkServiceServer interface {
mustEmbedUnimplementedArkServiceServer()
}
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)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArkServiceServer).RegisterPayment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ark.v1.ArkService/RegisterPayment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArkServiceServer).RegisterPayment(ctx, req.(*RegisterPaymentRequest))
}
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)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArkServiceServer).ClaimPayment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ark.v1.ArkService/ClaimPayment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArkServiceServer).ClaimPayment(ctx, req.(*ClaimPaymentRequest))
}
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)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArkServiceServer).FinalizePayment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ark.v1.ArkService/FinalizePayment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArkServiceServer).FinalizePayment(ctx, req.(*FinalizePaymentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ArkService_ListRounds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRoundsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArkServiceServer).ListRounds(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ark.v1.ArkService/ListRounds",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArkServiceServer).ListRounds(ctx, req.(*ListRoundsRequest))
}
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)
}
// 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)
var ArkService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ark.v1.ArkService",
HandlerType: (*ArkServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "RegisterPayment",
Handler: _ArkService_RegisterPayment_Handler,
},
{
MethodName: "ClaimPayment",
Handler: _ArkService_ClaimPayment_Handler,
},
{
MethodName: "FinalizePayment",
Handler: _ArkService_FinalizePayment_Handler,
},
{
MethodName: "ListRounds",
Handler: _ArkService_ListRounds_Handler,
},
{
MethodName: "GetRound",
Handler: _ArkService_GetRound_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ark/v1/service.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,487 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package oceanv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// AccountServiceClient is the client API for AccountService service.
//
// 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 AccountServiceClient interface {
// CreateAccountBIP44 creates a new BIP44 account.
CreateAccountBIP44(ctx context.Context, in *CreateAccountBIP44Request, opts ...grpc.CallOption) (*CreateAccountBIP44Response, error)
// CreateAccountMultiSig creates a new multisig account.
CreateAccountMultiSig(ctx context.Context, in *CreateAccountMultiSigRequest, opts ...grpc.CallOption) (*CreateAccountMultiSigResponse, error)
// CreateAccountCustom creates a new custom account for which loading a template.
CreateAccountCustom(ctx context.Context, in *CreateAccountCustomRequest, opts ...grpc.CallOption) (*CreateAccountCustomResponse, error)
// SetAccountLabel sets a label for the account that can be used later to refer to it.
SetAccountLabel(ctx context.Context, in *SetAccountLabelRequest, opts ...grpc.CallOption) (*SetAccountLabelResponse, error)
// SetAccountTemplate sets the template for the account used to generate new addresses.
SetAccountTemplate(ctx context.Context, in *SetAccountTemplateRequest, opts ...grpc.CallOption) (*SetAccountTemplateResponse, error)
// DeriveAddresses generates new address(es) for the account.
DeriveAddresses(ctx context.Context, in *DeriveAddressesRequest, opts ...grpc.CallOption) (*DeriveAddressesResponse, error)
// DeriveChangeAddresses generates new change address(es) for the account.
DeriveChangeAddresses(ctx context.Context, in *DeriveChangeAddressesRequest, opts ...grpc.CallOption) (*DeriveChangeAddressesResponse, error)
// ListAddresses returns all derived addresses for the account.
ListAddresses(ctx context.Context, in *ListAddressesRequest, opts ...grpc.CallOption) (*ListAddressesResponse, error)
// Balance returns the balance for the account, or for specific list of
// account's addresses.
Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
// ListUtxos returns the utxos for the account, or specific list of
// account's addresses.
ListUtxos(ctx context.Context, in *ListUtxosRequest, opts ...grpc.CallOption) (*ListUtxosResponse, error)
// DeleteAccount deletes an existing account. The operation is allowed only
// if the account has zero balance.
DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error)
}
type accountServiceClient struct {
cc grpc.ClientConnInterface
}
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient {
return &accountServiceClient{cc}
}
func (c *accountServiceClient) CreateAccountBIP44(ctx context.Context, in *CreateAccountBIP44Request, opts ...grpc.CallOption) (*CreateAccountBIP44Response, error) {
out := new(CreateAccountBIP44Response)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/CreateAccountBIP44", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) CreateAccountMultiSig(ctx context.Context, in *CreateAccountMultiSigRequest, opts ...grpc.CallOption) (*CreateAccountMultiSigResponse, error) {
out := new(CreateAccountMultiSigResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/CreateAccountMultiSig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) CreateAccountCustom(ctx context.Context, in *CreateAccountCustomRequest, opts ...grpc.CallOption) (*CreateAccountCustomResponse, error) {
out := new(CreateAccountCustomResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/CreateAccountCustom", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) SetAccountLabel(ctx context.Context, in *SetAccountLabelRequest, opts ...grpc.CallOption) (*SetAccountLabelResponse, error) {
out := new(SetAccountLabelResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/SetAccountLabel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) SetAccountTemplate(ctx context.Context, in *SetAccountTemplateRequest, opts ...grpc.CallOption) (*SetAccountTemplateResponse, error) {
out := new(SetAccountTemplateResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/SetAccountTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) DeriveAddresses(ctx context.Context, in *DeriveAddressesRequest, opts ...grpc.CallOption) (*DeriveAddressesResponse, error) {
out := new(DeriveAddressesResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/DeriveAddresses", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) DeriveChangeAddresses(ctx context.Context, in *DeriveChangeAddressesRequest, opts ...grpc.CallOption) (*DeriveChangeAddressesResponse, error) {
out := new(DeriveChangeAddressesResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/DeriveChangeAddresses", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListAddresses(ctx context.Context, in *ListAddressesRequest, opts ...grpc.CallOption) (*ListAddressesResponse, error) {
out := new(ListAddressesResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/ListAddresses", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, error) {
out := new(BalanceResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/Balance", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) ListUtxos(ctx context.Context, in *ListUtxosRequest, opts ...grpc.CallOption) (*ListUtxosResponse, error) {
out := new(ListUtxosResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/ListUtxos", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountServiceClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) {
out := new(DeleteAccountResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.AccountService/DeleteAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AccountServiceServer is the server API for AccountService service.
// All implementations should embed UnimplementedAccountServiceServer
// for forward compatibility
type AccountServiceServer interface {
// CreateAccountBIP44 creates a new BIP44 account.
CreateAccountBIP44(context.Context, *CreateAccountBIP44Request) (*CreateAccountBIP44Response, error)
// CreateAccountMultiSig creates a new multisig account.
CreateAccountMultiSig(context.Context, *CreateAccountMultiSigRequest) (*CreateAccountMultiSigResponse, error)
// CreateAccountCustom creates a new custom account for which loading a template.
CreateAccountCustom(context.Context, *CreateAccountCustomRequest) (*CreateAccountCustomResponse, error)
// SetAccountLabel sets a label for the account that can be used later to refer to it.
SetAccountLabel(context.Context, *SetAccountLabelRequest) (*SetAccountLabelResponse, error)
// SetAccountTemplate sets the template for the account used to generate new addresses.
SetAccountTemplate(context.Context, *SetAccountTemplateRequest) (*SetAccountTemplateResponse, error)
// DeriveAddresses generates new address(es) for the account.
DeriveAddresses(context.Context, *DeriveAddressesRequest) (*DeriveAddressesResponse, error)
// DeriveChangeAddresses generates new change address(es) for the account.
DeriveChangeAddresses(context.Context, *DeriveChangeAddressesRequest) (*DeriveChangeAddressesResponse, error)
// ListAddresses returns all derived addresses for the account.
ListAddresses(context.Context, *ListAddressesRequest) (*ListAddressesResponse, error)
// Balance returns the balance for the account, or for specific list of
// account's addresses.
Balance(context.Context, *BalanceRequest) (*BalanceResponse, error)
// ListUtxos returns the utxos for the account, or specific list of
// account's addresses.
ListUtxos(context.Context, *ListUtxosRequest) (*ListUtxosResponse, error)
// DeleteAccount deletes an existing account. The operation is allowed only
// if the account has zero balance.
DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error)
}
// UnimplementedAccountServiceServer should be embedded to have forward compatible implementations.
type UnimplementedAccountServiceServer struct {
}
func (UnimplementedAccountServiceServer) CreateAccountBIP44(context.Context, *CreateAccountBIP44Request) (*CreateAccountBIP44Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateAccountBIP44 not implemented")
}
func (UnimplementedAccountServiceServer) CreateAccountMultiSig(context.Context, *CreateAccountMultiSigRequest) (*CreateAccountMultiSigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateAccountMultiSig not implemented")
}
func (UnimplementedAccountServiceServer) CreateAccountCustom(context.Context, *CreateAccountCustomRequest) (*CreateAccountCustomResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateAccountCustom not implemented")
}
func (UnimplementedAccountServiceServer) SetAccountLabel(context.Context, *SetAccountLabelRequest) (*SetAccountLabelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetAccountLabel not implemented")
}
func (UnimplementedAccountServiceServer) SetAccountTemplate(context.Context, *SetAccountTemplateRequest) (*SetAccountTemplateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetAccountTemplate not implemented")
}
func (UnimplementedAccountServiceServer) DeriveAddresses(context.Context, *DeriveAddressesRequest) (*DeriveAddressesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeriveAddresses not implemented")
}
func (UnimplementedAccountServiceServer) DeriveChangeAddresses(context.Context, *DeriveChangeAddressesRequest) (*DeriveChangeAddressesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeriveChangeAddresses not implemented")
}
func (UnimplementedAccountServiceServer) ListAddresses(context.Context, *ListAddressesRequest) (*ListAddressesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAddresses not implemented")
}
func (UnimplementedAccountServiceServer) Balance(context.Context, *BalanceRequest) (*BalanceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented")
}
func (UnimplementedAccountServiceServer) ListUtxos(context.Context, *ListUtxosRequest) (*ListUtxosResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUtxos not implemented")
}
func (UnimplementedAccountServiceServer) DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteAccount not implemented")
}
// UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AccountServiceServer will
// result in compilation errors.
type UnsafeAccountServiceServer interface {
mustEmbedUnimplementedAccountServiceServer()
}
func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer) {
s.RegisterService(&AccountService_ServiceDesc, srv)
}
func _AccountService_CreateAccountBIP44_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateAccountBIP44Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).CreateAccountBIP44(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/CreateAccountBIP44",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).CreateAccountBIP44(ctx, req.(*CreateAccountBIP44Request))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_CreateAccountMultiSig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateAccountMultiSigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).CreateAccountMultiSig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/CreateAccountMultiSig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).CreateAccountMultiSig(ctx, req.(*CreateAccountMultiSigRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_CreateAccountCustom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateAccountCustomRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).CreateAccountCustom(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/CreateAccountCustom",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).CreateAccountCustom(ctx, req.(*CreateAccountCustomRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_SetAccountLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetAccountLabelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).SetAccountLabel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/SetAccountLabel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).SetAccountLabel(ctx, req.(*SetAccountLabelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_SetAccountTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetAccountTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).SetAccountTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/SetAccountTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).SetAccountTemplate(ctx, req.(*SetAccountTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_DeriveAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeriveAddressesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).DeriveAddresses(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/DeriveAddresses",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).DeriveAddresses(ctx, req.(*DeriveAddressesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_DeriveChangeAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeriveChangeAddressesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).DeriveChangeAddresses(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/DeriveChangeAddresses",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).DeriveChangeAddresses(ctx, req.(*DeriveChangeAddressesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAddressesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListAddresses(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/ListAddresses",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListAddresses(ctx, req.(*ListAddressesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BalanceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).Balance(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/Balance",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).Balance(ctx, req.(*BalanceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_ListUtxos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListUtxosRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).ListUtxos(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/ListUtxos",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).ListUtxos(ctx, req.(*ListUtxosRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AccountService_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountServiceServer).DeleteAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.AccountService/DeleteAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountServiceServer).DeleteAccount(ctx, req.(*DeleteAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AccountService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ocean.v1.AccountService",
HandlerType: (*AccountServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateAccountBIP44",
Handler: _AccountService_CreateAccountBIP44_Handler,
},
{
MethodName: "CreateAccountMultiSig",
Handler: _AccountService_CreateAccountMultiSig_Handler,
},
{
MethodName: "CreateAccountCustom",
Handler: _AccountService_CreateAccountCustom_Handler,
},
{
MethodName: "SetAccountLabel",
Handler: _AccountService_SetAccountLabel_Handler,
},
{
MethodName: "SetAccountTemplate",
Handler: _AccountService_SetAccountTemplate_Handler,
},
{
MethodName: "DeriveAddresses",
Handler: _AccountService_DeriveAddresses_Handler,
},
{
MethodName: "DeriveChangeAddresses",
Handler: _AccountService_DeriveChangeAddresses_Handler,
},
{
MethodName: "ListAddresses",
Handler: _AccountService_ListAddresses_Handler,
},
{
MethodName: "Balance",
Handler: _AccountService_Balance_Handler,
},
{
MethodName: "ListUtxos",
Handler: _AccountService_ListUtxos_Handler,
},
{
MethodName: "DeleteAccount",
Handler: _AccountService_DeleteAccount_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ocean/v1/account.proto",
}

View File

@@ -0,0 +1,924 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc (unknown)
// source: ocean/v1/notification.proto
package oceanv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type TransactionNotificationsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *TransactionNotificationsRequest) Reset() {
*x = TransactionNotificationsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransactionNotificationsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionNotificationsRequest) ProtoMessage() {}
func (x *TransactionNotificationsRequest) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_proto_msgTypes[0]
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 TransactionNotificationsRequest.ProtoReflect.Descriptor instead.
func (*TransactionNotificationsRequest) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{0}
}
type TransactionNotificationsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Tx event type.
EventType TxEventType `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=ocean.v1.TxEventType" json:"event_type,omitempty"`
// Account names.
AccountNames []string `protobuf:"bytes,2,rep,name=account_names,json=accountNames,proto3" json:"account_names,omitempty"`
// Tx in hex format.
Txhex string `protobuf:"bytes,3,opt,name=txhex,proto3" json:"txhex,omitempty"`
// Txid of transaction.
Txid string `protobuf:"bytes,4,opt,name=txid,proto3" json:"txid,omitempty"`
// Details of the block including the tx.
BlockDetails *BlockDetails `protobuf:"bytes,5,opt,name=block_details,json=blockDetails,proto3" json:"block_details,omitempty"`
}
func (x *TransactionNotificationsResponse) Reset() {
*x = TransactionNotificationsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TransactionNotificationsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TransactionNotificationsResponse) ProtoMessage() {}
func (x *TransactionNotificationsResponse) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_proto_msgTypes[1]
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 TransactionNotificationsResponse.ProtoReflect.Descriptor instead.
func (*TransactionNotificationsResponse) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{1}
}
func (x *TransactionNotificationsResponse) GetEventType() TxEventType {
if x != nil {
return x.EventType
}
return TxEventType_TX_EVENT_TYPE_UNSPECIFIED
}
func (x *TransactionNotificationsResponse) GetAccountNames() []string {
if x != nil {
return x.AccountNames
}
return nil
}
func (x *TransactionNotificationsResponse) GetTxhex() string {
if x != nil {
return x.Txhex
}
return ""
}
func (x *TransactionNotificationsResponse) GetTxid() string {
if x != nil {
return x.Txid
}
return ""
}
func (x *TransactionNotificationsResponse) GetBlockDetails() *BlockDetails {
if x != nil {
return x.BlockDetails
}
return nil
}
type UtxosNotificationsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *UtxosNotificationsRequest) Reset() {
*x = UtxosNotificationsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UtxosNotificationsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UtxosNotificationsRequest) ProtoMessage() {}
func (x *UtxosNotificationsRequest) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_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 UtxosNotificationsRequest.ProtoReflect.Descriptor instead.
func (*UtxosNotificationsRequest) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{2}
}
type UtxosNotificationsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The event's type occured for the utxos.
EventType UtxoEventType `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=ocean.v1.UtxoEventType" json:"event_type,omitempty"`
// List of utxos for which occured the event.
Utxos []*Utxo `protobuf:"bytes,2,rep,name=utxos,proto3" json:"utxos,omitempty"`
}
func (x *UtxosNotificationsResponse) Reset() {
*x = UtxosNotificationsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UtxosNotificationsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UtxosNotificationsResponse) ProtoMessage() {}
func (x *UtxosNotificationsResponse) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_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 UtxosNotificationsResponse.ProtoReflect.Descriptor instead.
func (*UtxosNotificationsResponse) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{3}
}
func (x *UtxosNotificationsResponse) GetEventType() UtxoEventType {
if x != nil {
return x.EventType
}
return UtxoEventType_UTXO_EVENT_TYPE_UNSPECIFIED
}
func (x *UtxosNotificationsResponse) GetUtxos() []*Utxo {
if x != nil {
return x.Utxos
}
return nil
}
type AddWebhookRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The endpoint of the external service to reach.
Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
// The event type for which the webhook should be registered.
EventType WebhookEventType `protobuf:"varint,2,opt,name=event_type,json=eventType,proto3,enum=ocean.v1.WebhookEventType" json:"event_type,omitempty"`
// The secret to use for signign a JWT token for an authenticated request
// to the external service.
Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
}
func (x *AddWebhookRequest) Reset() {
*x = AddWebhookRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddWebhookRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddWebhookRequest) ProtoMessage() {}
func (x *AddWebhookRequest) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_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 AddWebhookRequest.ProtoReflect.Descriptor instead.
func (*AddWebhookRequest) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{4}
}
func (x *AddWebhookRequest) GetEndpoint() string {
if x != nil {
return x.Endpoint
}
return ""
}
func (x *AddWebhookRequest) GetEventType() WebhookEventType {
if x != nil {
return x.EventType
}
return WebhookEventType_WEBHOOK_EVENT_TYPE_UNSPECIFIED
}
func (x *AddWebhookRequest) GetSecret() string {
if x != nil {
return x.Secret
}
return ""
}
type AddWebhookResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The id of the new webhook.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *AddWebhookResponse) Reset() {
*x = AddWebhookResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddWebhookResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddWebhookResponse) ProtoMessage() {}
func (x *AddWebhookResponse) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_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 AddWebhookResponse.ProtoReflect.Descriptor instead.
func (*AddWebhookResponse) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{5}
}
func (x *AddWebhookResponse) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type RemoveWebhookRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The id of the webhook to remove.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *RemoveWebhookRequest) Reset() {
*x = RemoveWebhookRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveWebhookRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveWebhookRequest) ProtoMessage() {}
func (x *RemoveWebhookRequest) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_proto_msgTypes[6]
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 RemoveWebhookRequest.ProtoReflect.Descriptor instead.
func (*RemoveWebhookRequest) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{6}
}
func (x *RemoveWebhookRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type RemoveWebhookResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *RemoveWebhookResponse) Reset() {
*x = RemoveWebhookResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RemoveWebhookResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RemoveWebhookResponse) ProtoMessage() {}
func (x *RemoveWebhookResponse) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_proto_msgTypes[7]
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 RemoveWebhookResponse.ProtoReflect.Descriptor instead.
func (*RemoveWebhookResponse) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{7}
}
type ListWebhooksRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The event type for which filtering the list of webhooks.
EventType WebhookEventType `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=ocean.v1.WebhookEventType" json:"event_type,omitempty"`
}
func (x *ListWebhooksRequest) Reset() {
*x = ListWebhooksRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWebhooksRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWebhooksRequest) ProtoMessage() {}
func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_proto_msgTypes[8]
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 ListWebhooksRequest.ProtoReflect.Descriptor instead.
func (*ListWebhooksRequest) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{8}
}
func (x *ListWebhooksRequest) GetEventType() WebhookEventType {
if x != nil {
return x.EventType
}
return WebhookEventType_WEBHOOK_EVENT_TYPE_UNSPECIFIED
}
type ListWebhooksResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of info about the webhooks regitered for an action.
WebhookInfo []*WebhookInfo `protobuf:"bytes,1,rep,name=webhook_info,json=webhookInfo,proto3" json:"webhook_info,omitempty"`
}
func (x *ListWebhooksResponse) Reset() {
*x = ListWebhooksResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListWebhooksResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListWebhooksResponse) ProtoMessage() {}
func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_proto_msgTypes[9]
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 ListWebhooksResponse.ProtoReflect.Descriptor instead.
func (*ListWebhooksResponse) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{9}
}
func (x *ListWebhooksResponse) GetWebhookInfo() []*WebhookInfo {
if x != nil {
return x.WebhookInfo
}
return nil
}
type WebhookInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The id of the webhook.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// The endpoint of the external service to reach.
Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
// Whether the outgoing requests are authenticated.
IsSecured bool `protobuf:"varint,3,opt,name=is_secured,json=isSecured,proto3" json:"is_secured,omitempty"`
}
func (x *WebhookInfo) Reset() {
*x = WebhookInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_ocean_v1_notification_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WebhookInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WebhookInfo) ProtoMessage() {}
func (x *WebhookInfo) ProtoReflect() protoreflect.Message {
mi := &file_ocean_v1_notification_proto_msgTypes[10]
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 WebhookInfo.ProtoReflect.Descriptor instead.
func (*WebhookInfo) Descriptor() ([]byte, []int) {
return file_ocean_v1_notification_proto_rawDescGZIP(), []int{10}
}
func (x *WebhookInfo) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *WebhookInfo) GetEndpoint() string {
if x != nil {
return x.Endpoint
}
return ""
}
func (x *WebhookInfo) GetIsSecured() bool {
if x != nil {
return x.IsSecured
}
return false
}
var File_ocean_v1_notification_proto protoreflect.FileDescriptor
var file_ocean_v1_notification_proto_rawDesc = []byte{
0x0a, 0x1b, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x6f,
0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2f, 0x76,
0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x21, 0x0a,
0x1f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x22, 0xe4, 0x01, 0x0a, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6f, 0x63, 0x65, 0x61,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73,
0x12, 0x14, 0x0a, 0x05, 0x74, 0x78, 0x68, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x74, 0x78, 0x68, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0d, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x74, 0x78, 0x6f, 0x73,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x1a, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x4e, 0x6f, 0x74,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x75, 0x74,
0x78, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x63, 0x65, 0x61,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x52, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73,
0x22, 0x82, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79,
0x70, 0x65, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x24, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x57, 0x65, 0x62, 0x68,
0x6f, 0x6f, 0x6b, 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, 0x26, 0x0a, 0x14, 0x52,
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, 0x65, 0x62,
0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x0a, 0x13,
0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e,
0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54,
0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x50,
0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f,
0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f,
0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x6e, 0x66, 0x6f,
0x22, 0x58, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69,
0x73, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
0x09, 0x69, 0x73, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x64, 0x32, 0xdd, 0x03, 0x0a, 0x13, 0x4e,
0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x73, 0x0a, 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29,
0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x63, 0x65, 0x61,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x12, 0x55, 0x74, 0x78, 0x6f, 0x73,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x2e,
0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x4e, 0x6f,
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x74,
0x78, 0x6f, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x49, 0x0a, 0x0a, 0x41, 0x64,
0x64, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1b, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31,
0x2e, 0x41, 0x64, 0x64, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57,
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1e, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x69, 0x73,
0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x1d, 0x2e, 0x6f, 0x63, 0x65, 0x61,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xa5, 0x01, 0x0a, 0x0c, 0x63,
0x6f, 0x6d, 0x2e, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x4e, 0x6f, 0x74,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
0x5a, 0x41, 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, 0x6f, 0x63, 0x65, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x63, 0x65, 0x61,
0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x4f, 0x63, 0x65, 0x61,
0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x5c, 0x56, 0x31, 0xe2,
0x02, 0x14, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x4f, 0x63, 0x65, 0x61, 0x6e, 0x3a, 0x3a,
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_ocean_v1_notification_proto_rawDescOnce sync.Once
file_ocean_v1_notification_proto_rawDescData = file_ocean_v1_notification_proto_rawDesc
)
func file_ocean_v1_notification_proto_rawDescGZIP() []byte {
file_ocean_v1_notification_proto_rawDescOnce.Do(func() {
file_ocean_v1_notification_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocean_v1_notification_proto_rawDescData)
})
return file_ocean_v1_notification_proto_rawDescData
}
var file_ocean_v1_notification_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_ocean_v1_notification_proto_goTypes = []interface{}{
(*TransactionNotificationsRequest)(nil), // 0: ocean.v1.TransactionNotificationsRequest
(*TransactionNotificationsResponse)(nil), // 1: ocean.v1.TransactionNotificationsResponse
(*UtxosNotificationsRequest)(nil), // 2: ocean.v1.UtxosNotificationsRequest
(*UtxosNotificationsResponse)(nil), // 3: ocean.v1.UtxosNotificationsResponse
(*AddWebhookRequest)(nil), // 4: ocean.v1.AddWebhookRequest
(*AddWebhookResponse)(nil), // 5: ocean.v1.AddWebhookResponse
(*RemoveWebhookRequest)(nil), // 6: ocean.v1.RemoveWebhookRequest
(*RemoveWebhookResponse)(nil), // 7: ocean.v1.RemoveWebhookResponse
(*ListWebhooksRequest)(nil), // 8: ocean.v1.ListWebhooksRequest
(*ListWebhooksResponse)(nil), // 9: ocean.v1.ListWebhooksResponse
(*WebhookInfo)(nil), // 10: ocean.v1.WebhookInfo
(TxEventType)(0), // 11: ocean.v1.TxEventType
(*BlockDetails)(nil), // 12: ocean.v1.BlockDetails
(UtxoEventType)(0), // 13: ocean.v1.UtxoEventType
(*Utxo)(nil), // 14: ocean.v1.Utxo
(WebhookEventType)(0), // 15: ocean.v1.WebhookEventType
}
var file_ocean_v1_notification_proto_depIdxs = []int32{
11, // 0: ocean.v1.TransactionNotificationsResponse.event_type:type_name -> ocean.v1.TxEventType
12, // 1: ocean.v1.TransactionNotificationsResponse.block_details:type_name -> ocean.v1.BlockDetails
13, // 2: ocean.v1.UtxosNotificationsResponse.event_type:type_name -> ocean.v1.UtxoEventType
14, // 3: ocean.v1.UtxosNotificationsResponse.utxos:type_name -> ocean.v1.Utxo
15, // 4: ocean.v1.AddWebhookRequest.event_type:type_name -> ocean.v1.WebhookEventType
15, // 5: ocean.v1.ListWebhooksRequest.event_type:type_name -> ocean.v1.WebhookEventType
10, // 6: ocean.v1.ListWebhooksResponse.webhook_info:type_name -> ocean.v1.WebhookInfo
0, // 7: ocean.v1.NotificationService.TransactionNotifications:input_type -> ocean.v1.TransactionNotificationsRequest
2, // 8: ocean.v1.NotificationService.UtxosNotifications:input_type -> ocean.v1.UtxosNotificationsRequest
4, // 9: ocean.v1.NotificationService.AddWebhook:input_type -> ocean.v1.AddWebhookRequest
6, // 10: ocean.v1.NotificationService.RemoveWebhook:input_type -> ocean.v1.RemoveWebhookRequest
8, // 11: ocean.v1.NotificationService.ListWebhooks:input_type -> ocean.v1.ListWebhooksRequest
1, // 12: ocean.v1.NotificationService.TransactionNotifications:output_type -> ocean.v1.TransactionNotificationsResponse
3, // 13: ocean.v1.NotificationService.UtxosNotifications:output_type -> ocean.v1.UtxosNotificationsResponse
5, // 14: ocean.v1.NotificationService.AddWebhook:output_type -> ocean.v1.AddWebhookResponse
7, // 15: ocean.v1.NotificationService.RemoveWebhook:output_type -> ocean.v1.RemoveWebhookResponse
9, // 16: ocean.v1.NotificationService.ListWebhooks:output_type -> ocean.v1.ListWebhooksResponse
12, // [12:17] is the sub-list for method output_type
7, // [7:12] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_ocean_v1_notification_proto_init() }
func file_ocean_v1_notification_proto_init() {
if File_ocean_v1_notification_proto != nil {
return
}
file_ocean_v1_types_proto_init()
if !protoimpl.UnsafeEnabled {
file_ocean_v1_notification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionNotificationsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TransactionNotificationsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UtxosNotificationsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UtxosNotificationsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddWebhookRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AddWebhookResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveWebhookRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RemoveWebhookResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWebhooksRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListWebhooksResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_ocean_v1_notification_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WebhookInfo); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_ocean_v1_notification_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_ocean_v1_notification_proto_goTypes,
DependencyIndexes: file_ocean_v1_notification_proto_depIdxs,
MessageInfos: file_ocean_v1_notification_proto_msgTypes,
}.Build()
File_ocean_v1_notification_proto = out.File
file_ocean_v1_notification_proto_rawDesc = nil
file_ocean_v1_notification_proto_goTypes = nil
file_ocean_v1_notification_proto_depIdxs = nil
}

View File

@@ -0,0 +1,308 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package oceanv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// NotificationServiceClient is the client API for NotificationService service.
//
// 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 NotificationServiceClient interface {
// Notifies about events related to wallet transactions.
TransactionNotifications(ctx context.Context, in *TransactionNotificationsRequest, opts ...grpc.CallOption) (NotificationService_TransactionNotificationsClient, error)
// Notifies about events realted to wallet utxos.
UtxosNotifications(ctx context.Context, in *UtxosNotificationsRequest, opts ...grpc.CallOption) (NotificationService_UtxosNotificationsClient, error)
// Adds a webhook registered for some kind of event.
AddWebhook(ctx context.Context, in *AddWebhookRequest, opts ...grpc.CallOption) (*AddWebhookResponse, error)
// Removes some previously added webhook.
RemoveWebhook(ctx context.Context, in *RemoveWebhookRequest, opts ...grpc.CallOption) (*RemoveWebhookResponse, error)
// Returns registered webhooks.
ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error)
}
type notificationServiceClient struct {
cc grpc.ClientConnInterface
}
func NewNotificationServiceClient(cc grpc.ClientConnInterface) NotificationServiceClient {
return &notificationServiceClient{cc}
}
func (c *notificationServiceClient) TransactionNotifications(ctx context.Context, in *TransactionNotificationsRequest, opts ...grpc.CallOption) (NotificationService_TransactionNotificationsClient, error) {
stream, err := c.cc.NewStream(ctx, &NotificationService_ServiceDesc.Streams[0], "/ocean.v1.NotificationService/TransactionNotifications", opts...)
if err != nil {
return nil, err
}
x := &notificationServiceTransactionNotificationsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type NotificationService_TransactionNotificationsClient interface {
Recv() (*TransactionNotificationsResponse, error)
grpc.ClientStream
}
type notificationServiceTransactionNotificationsClient struct {
grpc.ClientStream
}
func (x *notificationServiceTransactionNotificationsClient) Recv() (*TransactionNotificationsResponse, error) {
m := new(TransactionNotificationsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *notificationServiceClient) UtxosNotifications(ctx context.Context, in *UtxosNotificationsRequest, opts ...grpc.CallOption) (NotificationService_UtxosNotificationsClient, error) {
stream, err := c.cc.NewStream(ctx, &NotificationService_ServiceDesc.Streams[1], "/ocean.v1.NotificationService/UtxosNotifications", opts...)
if err != nil {
return nil, err
}
x := &notificationServiceUtxosNotificationsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type NotificationService_UtxosNotificationsClient interface {
Recv() (*UtxosNotificationsResponse, error)
grpc.ClientStream
}
type notificationServiceUtxosNotificationsClient struct {
grpc.ClientStream
}
func (x *notificationServiceUtxosNotificationsClient) Recv() (*UtxosNotificationsResponse, error) {
m := new(UtxosNotificationsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *notificationServiceClient) AddWebhook(ctx context.Context, in *AddWebhookRequest, opts ...grpc.CallOption) (*AddWebhookResponse, error) {
out := new(AddWebhookResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.NotificationService/AddWebhook", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *notificationServiceClient) RemoveWebhook(ctx context.Context, in *RemoveWebhookRequest, opts ...grpc.CallOption) (*RemoveWebhookResponse, error) {
out := new(RemoveWebhookResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.NotificationService/RemoveWebhook", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *notificationServiceClient) ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error) {
out := new(ListWebhooksResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.NotificationService/ListWebhooks", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NotificationServiceServer is the server API for NotificationService service.
// All implementations should embed UnimplementedNotificationServiceServer
// for forward compatibility
type NotificationServiceServer interface {
// Notifies about events related to wallet transactions.
TransactionNotifications(*TransactionNotificationsRequest, NotificationService_TransactionNotificationsServer) error
// Notifies about events realted to wallet utxos.
UtxosNotifications(*UtxosNotificationsRequest, NotificationService_UtxosNotificationsServer) error
// Adds a webhook registered for some kind of event.
AddWebhook(context.Context, *AddWebhookRequest) (*AddWebhookResponse, error)
// Removes some previously added webhook.
RemoveWebhook(context.Context, *RemoveWebhookRequest) (*RemoveWebhookResponse, error)
// Returns registered webhooks.
ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error)
}
// UnimplementedNotificationServiceServer should be embedded to have forward compatible implementations.
type UnimplementedNotificationServiceServer struct {
}
func (UnimplementedNotificationServiceServer) TransactionNotifications(*TransactionNotificationsRequest, NotificationService_TransactionNotificationsServer) error {
return status.Errorf(codes.Unimplemented, "method TransactionNotifications not implemented")
}
func (UnimplementedNotificationServiceServer) UtxosNotifications(*UtxosNotificationsRequest, NotificationService_UtxosNotificationsServer) error {
return status.Errorf(codes.Unimplemented, "method UtxosNotifications not implemented")
}
func (UnimplementedNotificationServiceServer) AddWebhook(context.Context, *AddWebhookRequest) (*AddWebhookResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddWebhook not implemented")
}
func (UnimplementedNotificationServiceServer) RemoveWebhook(context.Context, *RemoveWebhookRequest) (*RemoveWebhookResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveWebhook not implemented")
}
func (UnimplementedNotificationServiceServer) ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWebhooks not implemented")
}
// UnsafeNotificationServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NotificationServiceServer will
// result in compilation errors.
type UnsafeNotificationServiceServer interface {
mustEmbedUnimplementedNotificationServiceServer()
}
func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer) {
s.RegisterService(&NotificationService_ServiceDesc, srv)
}
func _NotificationService_TransactionNotifications_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(TransactionNotificationsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(NotificationServiceServer).TransactionNotifications(m, &notificationServiceTransactionNotificationsServer{stream})
}
type NotificationService_TransactionNotificationsServer interface {
Send(*TransactionNotificationsResponse) error
grpc.ServerStream
}
type notificationServiceTransactionNotificationsServer struct {
grpc.ServerStream
}
func (x *notificationServiceTransactionNotificationsServer) Send(m *TransactionNotificationsResponse) error {
return x.ServerStream.SendMsg(m)
}
func _NotificationService_UtxosNotifications_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(UtxosNotificationsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(NotificationServiceServer).UtxosNotifications(m, &notificationServiceUtxosNotificationsServer{stream})
}
type NotificationService_UtxosNotificationsServer interface {
Send(*UtxosNotificationsResponse) error
grpc.ServerStream
}
type notificationServiceUtxosNotificationsServer struct {
grpc.ServerStream
}
func (x *notificationServiceUtxosNotificationsServer) Send(m *UtxosNotificationsResponse) error {
return x.ServerStream.SendMsg(m)
}
func _NotificationService_AddWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddWebhookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).AddWebhook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.NotificationService/AddWebhook",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).AddWebhook(ctx, req.(*AddWebhookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NotificationService_RemoveWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveWebhookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).RemoveWebhook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.NotificationService/RemoveWebhook",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).RemoveWebhook(ctx, req.(*RemoveWebhookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NotificationService_ListWebhooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWebhooksRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NotificationServiceServer).ListWebhooks(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.NotificationService/ListWebhooks",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotificationServiceServer).ListWebhooks(ctx, req.(*ListWebhooksRequest))
}
return interceptor(ctx, in, info, handler)
}
// NotificationService_ServiceDesc is the grpc.ServiceDesc for NotificationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NotificationService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ocean.v1.NotificationService",
HandlerType: (*NotificationServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AddWebhook",
Handler: _NotificationService_AddWebhook_Handler,
},
{
MethodName: "RemoveWebhook",
Handler: _NotificationService_RemoveWebhook_Handler,
},
{
MethodName: "ListWebhooks",
Handler: _NotificationService_ListWebhooks_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "TransactionNotifications",
Handler: _NotificationService_TransactionNotifications_Handler,
ServerStreams: true,
},
{
StreamName: "UtxosNotifications",
Handler: _NotificationService_UtxosNotifications_Handler,
ServerStreams: true,
},
},
Metadata: "ocean/v1/notification.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,649 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package oceanv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// TransactionServiceClient is the client API for TransactionService service.
//
// 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 TransactionServiceClient interface {
// GetTransaction returns the hex of a transaction given its id.
GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error)
// SelectUtxos returns a selction of utxos, to be used in another
// transaction, for provided target amount and strategy.
// Selected utxos are locked for predefined amount of time to prevent
// double-spending them.
SelectUtxos(ctx context.Context, in *SelectUtxosRequest, opts ...grpc.CallOption) (*SelectUtxosResponse, error)
// EstimateFees returns the fee amount to pay for a tx containing the given
// inputs and outputs.
EstimateFees(ctx context.Context, in *EstimateFeesRequest, opts ...grpc.CallOption) (*EstimateFeesResponse, error)
// SignTransaction signs a raw transaction in hex format.
SignTransaction(ctx context.Context, in *SignTransactionRequest, opts ...grpc.CallOption) (*SignTransactionResponse, error)
// BroadcastTransaction broadacats a raw transaction in hex format.
BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error)
// CreatePset returns an unsigned pset for given inputs and outputs.
CreatePset(ctx context.Context, in *CreatePsetRequest, opts ...grpc.CallOption) (*CreatePsetResponse, error)
// UpdatePset adds the given inputs and outputs to the partial transaction.
UpdatePset(ctx context.Context, in *UpdatePsetRequest, opts ...grpc.CallOption) (*UpdatePsetResponse, error)
// BlindPset updates the given pset with required ins and outs blinded.
BlindPset(ctx context.Context, in *BlindPsetRequest, opts ...grpc.CallOption) (*BlindPsetResponse, error)
// SignPset updates the given pset adding the required signatures.
SignPset(ctx context.Context, in *SignPsetRequest, opts ...grpc.CallOption) (*SignPsetResponse, error)
// Mint returns a transaction that issues a new asset.
Mint(ctx context.Context, in *MintRequest, opts ...grpc.CallOption) (*MintResponse, error)
// Remint returns a transaction that re-issues an existing asset.
Remint(ctx context.Context, in *RemintRequest, opts ...grpc.CallOption) (*RemintResponse, error)
// Burn returns a transaction that burns some funds.
Burn(ctx context.Context, in *BurnRequest, opts ...grpc.CallOption) (*BurnResponse, error)
// Transfer returns a transaction to send funds to some receiver.
Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error)
// PegInAddress returns what's necessary to peg funds of the Bitcoin
// main-chain and have them available on the Liquid side-chain.
// Bitcoin funds must be sent to the main-chain address while the claim
// output script must be used to redeem the LBTC ones.
PegInAddress(ctx context.Context, in *PegInAddressRequest, opts ...grpc.CallOption) (*PegInAddressResponse, error)
// ClaimPegIn returns a transaction to claim funds pegged on the Bitcoin
// main-chain to have them available on the Liquid side-chain.
ClaimPegIn(ctx context.Context, in *ClaimPegInRequest, opts ...grpc.CallOption) (*ClaimPegInResponse, error)
}
type transactionServiceClient struct {
cc grpc.ClientConnInterface
}
func NewTransactionServiceClient(cc grpc.ClientConnInterface) TransactionServiceClient {
return &transactionServiceClient{cc}
}
func (c *transactionServiceClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) {
out := new(GetTransactionResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/GetTransaction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) SelectUtxos(ctx context.Context, in *SelectUtxosRequest, opts ...grpc.CallOption) (*SelectUtxosResponse, error) {
out := new(SelectUtxosResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/SelectUtxos", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) EstimateFees(ctx context.Context, in *EstimateFeesRequest, opts ...grpc.CallOption) (*EstimateFeesResponse, error) {
out := new(EstimateFeesResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/EstimateFees", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) SignTransaction(ctx context.Context, in *SignTransactionRequest, opts ...grpc.CallOption) (*SignTransactionResponse, error) {
out := new(SignTransactionResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/SignTransaction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) {
out := new(BroadcastTransactionResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/BroadcastTransaction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) CreatePset(ctx context.Context, in *CreatePsetRequest, opts ...grpc.CallOption) (*CreatePsetResponse, error) {
out := new(CreatePsetResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/CreatePset", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) UpdatePset(ctx context.Context, in *UpdatePsetRequest, opts ...grpc.CallOption) (*UpdatePsetResponse, error) {
out := new(UpdatePsetResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/UpdatePset", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) BlindPset(ctx context.Context, in *BlindPsetRequest, opts ...grpc.CallOption) (*BlindPsetResponse, error) {
out := new(BlindPsetResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/BlindPset", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) SignPset(ctx context.Context, in *SignPsetRequest, opts ...grpc.CallOption) (*SignPsetResponse, error) {
out := new(SignPsetResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/SignPset", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) Mint(ctx context.Context, in *MintRequest, opts ...grpc.CallOption) (*MintResponse, error) {
out := new(MintResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/Mint", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) Remint(ctx context.Context, in *RemintRequest, opts ...grpc.CallOption) (*RemintResponse, error) {
out := new(RemintResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/Remint", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) Burn(ctx context.Context, in *BurnRequest, opts ...grpc.CallOption) (*BurnResponse, error) {
out := new(BurnResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/Burn", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) {
out := new(TransferResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/Transfer", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) PegInAddress(ctx context.Context, in *PegInAddressRequest, opts ...grpc.CallOption) (*PegInAddressResponse, error) {
out := new(PegInAddressResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/PegInAddress", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *transactionServiceClient) ClaimPegIn(ctx context.Context, in *ClaimPegInRequest, opts ...grpc.CallOption) (*ClaimPegInResponse, error) {
out := new(ClaimPegInResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.TransactionService/ClaimPegIn", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TransactionServiceServer is the server API for TransactionService service.
// All implementations should embed UnimplementedTransactionServiceServer
// for forward compatibility
type TransactionServiceServer interface {
// GetTransaction returns the hex of a transaction given its id.
GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)
// SelectUtxos returns a selction of utxos, to be used in another
// transaction, for provided target amount and strategy.
// Selected utxos are locked for predefined amount of time to prevent
// double-spending them.
SelectUtxos(context.Context, *SelectUtxosRequest) (*SelectUtxosResponse, error)
// EstimateFees returns the fee amount to pay for a tx containing the given
// inputs and outputs.
EstimateFees(context.Context, *EstimateFeesRequest) (*EstimateFeesResponse, error)
// SignTransaction signs a raw transaction in hex format.
SignTransaction(context.Context, *SignTransactionRequest) (*SignTransactionResponse, error)
// BroadcastTransaction broadacats a raw transaction in hex format.
BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error)
// CreatePset returns an unsigned pset for given inputs and outputs.
CreatePset(context.Context, *CreatePsetRequest) (*CreatePsetResponse, error)
// UpdatePset adds the given inputs and outputs to the partial transaction.
UpdatePset(context.Context, *UpdatePsetRequest) (*UpdatePsetResponse, error)
// BlindPset updates the given pset with required ins and outs blinded.
BlindPset(context.Context, *BlindPsetRequest) (*BlindPsetResponse, error)
// SignPset updates the given pset adding the required signatures.
SignPset(context.Context, *SignPsetRequest) (*SignPsetResponse, error)
// Mint returns a transaction that issues a new asset.
Mint(context.Context, *MintRequest) (*MintResponse, error)
// Remint returns a transaction that re-issues an existing asset.
Remint(context.Context, *RemintRequest) (*RemintResponse, error)
// Burn returns a transaction that burns some funds.
Burn(context.Context, *BurnRequest) (*BurnResponse, error)
// Transfer returns a transaction to send funds to some receiver.
Transfer(context.Context, *TransferRequest) (*TransferResponse, error)
// PegInAddress returns what's necessary to peg funds of the Bitcoin
// main-chain and have them available on the Liquid side-chain.
// Bitcoin funds must be sent to the main-chain address while the claim
// output script must be used to redeem the LBTC ones.
PegInAddress(context.Context, *PegInAddressRequest) (*PegInAddressResponse, error)
// ClaimPegIn returns a transaction to claim funds pegged on the Bitcoin
// main-chain to have them available on the Liquid side-chain.
ClaimPegIn(context.Context, *ClaimPegInRequest) (*ClaimPegInResponse, error)
}
// UnimplementedTransactionServiceServer should be embedded to have forward compatible implementations.
type UnimplementedTransactionServiceServer struct {
}
func (UnimplementedTransactionServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented")
}
func (UnimplementedTransactionServiceServer) SelectUtxos(context.Context, *SelectUtxosRequest) (*SelectUtxosResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SelectUtxos not implemented")
}
func (UnimplementedTransactionServiceServer) EstimateFees(context.Context, *EstimateFeesRequest) (*EstimateFeesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method EstimateFees not implemented")
}
func (UnimplementedTransactionServiceServer) SignTransaction(context.Context, *SignTransactionRequest) (*SignTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignTransaction not implemented")
}
func (UnimplementedTransactionServiceServer) BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BroadcastTransaction not implemented")
}
func (UnimplementedTransactionServiceServer) CreatePset(context.Context, *CreatePsetRequest) (*CreatePsetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreatePset not implemented")
}
func (UnimplementedTransactionServiceServer) UpdatePset(context.Context, *UpdatePsetRequest) (*UpdatePsetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePset not implemented")
}
func (UnimplementedTransactionServiceServer) BlindPset(context.Context, *BlindPsetRequest) (*BlindPsetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BlindPset not implemented")
}
func (UnimplementedTransactionServiceServer) SignPset(context.Context, *SignPsetRequest) (*SignPsetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignPset not implemented")
}
func (UnimplementedTransactionServiceServer) Mint(context.Context, *MintRequest) (*MintResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Mint not implemented")
}
func (UnimplementedTransactionServiceServer) Remint(context.Context, *RemintRequest) (*RemintResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Remint not implemented")
}
func (UnimplementedTransactionServiceServer) Burn(context.Context, *BurnRequest) (*BurnResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Burn not implemented")
}
func (UnimplementedTransactionServiceServer) Transfer(context.Context, *TransferRequest) (*TransferResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented")
}
func (UnimplementedTransactionServiceServer) PegInAddress(context.Context, *PegInAddressRequest) (*PegInAddressResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PegInAddress not implemented")
}
func (UnimplementedTransactionServiceServer) ClaimPegIn(context.Context, *ClaimPegInRequest) (*ClaimPegInResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ClaimPegIn not implemented")
}
// UnsafeTransactionServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TransactionServiceServer will
// result in compilation errors.
type UnsafeTransactionServiceServer interface {
mustEmbedUnimplementedTransactionServiceServer()
}
func RegisterTransactionServiceServer(s grpc.ServiceRegistrar, srv TransactionServiceServer) {
s.RegisterService(&TransactionService_ServiceDesc, srv)
}
func _TransactionService_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).GetTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/GetTransaction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).GetTransaction(ctx, req.(*GetTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_SelectUtxos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SelectUtxosRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).SelectUtxos(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/SelectUtxos",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).SelectUtxos(ctx, req.(*SelectUtxosRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_EstimateFees_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EstimateFeesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).EstimateFees(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/EstimateFees",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).EstimateFees(ctx, req.(*EstimateFeesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_SignTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SignTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).SignTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/SignTransaction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).SignTransaction(ctx, req.(*SignTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_BroadcastTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BroadcastTransactionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).BroadcastTransaction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/BroadcastTransaction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).BroadcastTransaction(ctx, req.(*BroadcastTransactionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_CreatePset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreatePsetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).CreatePset(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/CreatePset",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).CreatePset(ctx, req.(*CreatePsetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_UpdatePset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdatePsetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).UpdatePset(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/UpdatePset",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).UpdatePset(ctx, req.(*UpdatePsetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_BlindPset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BlindPsetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).BlindPset(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/BlindPset",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).BlindPset(ctx, req.(*BlindPsetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_SignPset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SignPsetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).SignPset(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/SignPset",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).SignPset(ctx, req.(*SignPsetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_Mint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MintRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).Mint(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/Mint",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).Mint(ctx, req.(*MintRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_Remint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemintRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).Remint(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/Remint",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).Remint(ctx, req.(*RemintRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_Burn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BurnRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).Burn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/Burn",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).Burn(ctx, req.(*BurnRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TransferRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).Transfer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/Transfer",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).Transfer(ctx, req.(*TransferRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_PegInAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PegInAddressRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).PegInAddress(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/PegInAddress",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).PegInAddress(ctx, req.(*PegInAddressRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TransactionService_ClaimPegIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClaimPegInRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TransactionServiceServer).ClaimPegIn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.TransactionService/ClaimPegIn",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TransactionServiceServer).ClaimPegIn(ctx, req.(*ClaimPegInRequest))
}
return interceptor(ctx, in, info, handler)
}
// TransactionService_ServiceDesc is the grpc.ServiceDesc for TransactionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TransactionService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ocean.v1.TransactionService",
HandlerType: (*TransactionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetTransaction",
Handler: _TransactionService_GetTransaction_Handler,
},
{
MethodName: "SelectUtxos",
Handler: _TransactionService_SelectUtxos_Handler,
},
{
MethodName: "EstimateFees",
Handler: _TransactionService_EstimateFees_Handler,
},
{
MethodName: "SignTransaction",
Handler: _TransactionService_SignTransaction_Handler,
},
{
MethodName: "BroadcastTransaction",
Handler: _TransactionService_BroadcastTransaction_Handler,
},
{
MethodName: "CreatePset",
Handler: _TransactionService_CreatePset_Handler,
},
{
MethodName: "UpdatePset",
Handler: _TransactionService_UpdatePset_Handler,
},
{
MethodName: "BlindPset",
Handler: _TransactionService_BlindPset_Handler,
},
{
MethodName: "SignPset",
Handler: _TransactionService_SignPset_Handler,
},
{
MethodName: "Mint",
Handler: _TransactionService_Mint_Handler,
},
{
MethodName: "Remint",
Handler: _TransactionService_Remint_Handler,
},
{
MethodName: "Burn",
Handler: _TransactionService_Burn_Handler,
},
{
MethodName: "Transfer",
Handler: _TransactionService_Transfer_Handler,
},
{
MethodName: "PegInAddress",
Handler: _TransactionService_PegInAddress_Handler,
},
{
MethodName: "ClaimPegIn",
Handler: _TransactionService_ClaimPegIn_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "ocean/v1/transaction.proto",
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,441 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package oceanv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// WalletServiceClient is the client API for WalletService service.
//
// 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 WalletServiceClient interface {
// GenSeed returns signing and blinding seed that should be used to create a
// new HD Wallet.
GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error)
// CreateWallet creates an HD Wallet based on signing, blinding seeds,
// encrypts them with the password and persists the encrypted seeds.
CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error)
// Unlock tries to unlock the HD Wallet using the given password.
Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
// Lock locks the HD wallet.
Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error)
// ChangePassword changes the password used to encrypt/decrypt the HD seeds.
// It requires the wallet to be locked.
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
// RestoreWallet restores an HD Wallet based on signing and blinding seeds,
// encrypts them with the password and persists the encrypted seeds.
RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (WalletService_RestoreWalletClient, error)
// Status returns info about the status of the wallet.
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
// GetInfo returns info about the HD wallet.
GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
// Auth verifies whether the given password is valid without unlocking the wallet
Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error)
}
type walletServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWalletServiceClient(cc grpc.ClientConnInterface) WalletServiceClient {
return &walletServiceClient{cc}
}
func (c *walletServiceClient) GenSeed(ctx context.Context, in *GenSeedRequest, opts ...grpc.CallOption) (*GenSeedResponse, error) {
out := new(GenSeedResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/GenSeed", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) {
out := new(CreateWalletResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/CreateWallet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
out := new(UnlockResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/Unlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) {
out := new(LockResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/Lock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) {
out := new(ChangePasswordResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/ChangePassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (WalletService_RestoreWalletClient, error) {
stream, err := c.cc.NewStream(ctx, &WalletService_ServiceDesc.Streams[0], "/ocean.v1.WalletService/RestoreWallet", opts...)
if err != nil {
return nil, err
}
x := &walletServiceRestoreWalletClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type WalletService_RestoreWalletClient interface {
Recv() (*RestoreWalletResponse, error)
grpc.ClientStream
}
type walletServiceRestoreWalletClient struct {
grpc.ClientStream
}
func (x *walletServiceRestoreWalletClient) Recv() (*RestoreWalletResponse, error) {
m := new(RestoreWalletResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *walletServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
out := new(StatusResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/Status", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) {
out := new(GetInfoResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/GetInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletServiceClient) Auth(ctx context.Context, in *AuthRequest, opts ...grpc.CallOption) (*AuthResponse, error) {
out := new(AuthResponse)
err := c.cc.Invoke(ctx, "/ocean.v1.WalletService/Auth", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WalletServiceServer is the server API for WalletService service.
// All implementations should embed UnimplementedWalletServiceServer
// for forward compatibility
type WalletServiceServer interface {
// GenSeed returns signing and blinding seed that should be used to create a
// new HD Wallet.
GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error)
// CreateWallet creates an HD Wallet based on signing, blinding seeds,
// encrypts them with the password and persists the encrypted seeds.
CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error)
// Unlock tries to unlock the HD Wallet using the given password.
Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
// Lock locks the HD wallet.
Lock(context.Context, *LockRequest) (*LockResponse, error)
// ChangePassword changes the password used to encrypt/decrypt the HD seeds.
// It requires the wallet to be locked.
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
// RestoreWallet restores an HD Wallet based on signing and blinding seeds,
// encrypts them with the password and persists the encrypted seeds.
RestoreWallet(*RestoreWalletRequest, WalletService_RestoreWalletServer) error
// Status returns info about the status of the wallet.
Status(context.Context, *StatusRequest) (*StatusResponse, error)
// GetInfo returns info about the HD wallet.
GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
// Auth verifies whether the given password is valid without unlocking the wallet
Auth(context.Context, *AuthRequest) (*AuthResponse, error)
}
// UnimplementedWalletServiceServer should be embedded to have forward compatible implementations.
type UnimplementedWalletServiceServer struct {
}
func (UnimplementedWalletServiceServer) GenSeed(context.Context, *GenSeedRequest) (*GenSeedResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenSeed not implemented")
}
func (UnimplementedWalletServiceServer) CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWallet not implemented")
}
func (UnimplementedWalletServiceServer) Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented")
}
func (UnimplementedWalletServiceServer) Lock(context.Context, *LockRequest) (*LockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented")
}
func (UnimplementedWalletServiceServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
}
func (UnimplementedWalletServiceServer) RestoreWallet(*RestoreWalletRequest, WalletService_RestoreWalletServer) error {
return status.Errorf(codes.Unimplemented, "method RestoreWallet not implemented")
}
func (UnimplementedWalletServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
}
func (UnimplementedWalletServiceServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedWalletServiceServer) Auth(context.Context, *AuthRequest) (*AuthResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Auth not implemented")
}
// UnsafeWalletServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WalletServiceServer will
// result in compilation errors.
type UnsafeWalletServiceServer interface {
mustEmbedUnimplementedWalletServiceServer()
}
func RegisterWalletServiceServer(s grpc.ServiceRegistrar, srv WalletServiceServer) {
s.RegisterService(&WalletService_ServiceDesc, srv)
}
func _WalletService_GenSeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GenSeedRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).GenSeed(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/GenSeed",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).GenSeed(ctx, req.(*GenSeedRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWalletRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).CreateWallet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/CreateWallet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).CreateWallet(ctx, req.(*CreateWalletRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnlockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).Unlock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/Unlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).Unlock(ctx, req.(*UnlockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).Lock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/Lock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).Lock(ctx, req.(*LockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ChangePasswordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).ChangePassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/ChangePassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_RestoreWallet_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(RestoreWalletRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(WalletServiceServer).RestoreWallet(m, &walletServiceRestoreWalletServer{stream})
}
type WalletService_RestoreWalletServer interface {
Send(*RestoreWalletResponse) error
grpc.ServerStream
}
type walletServiceRestoreWalletServer struct {
grpc.ServerStream
}
func (x *walletServiceRestoreWalletServer) Send(m *RestoreWalletResponse) error {
return x.ServerStream.SendMsg(m)
}
func _WalletService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).Status(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/Status",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).Status(ctx, req.(*StatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_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.(WalletServiceServer).GetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/GetInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).GetInfo(ctx, req.(*GetInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletService_Auth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AuthRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletServiceServer).Auth(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ocean.v1.WalletService/Auth",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletServiceServer).Auth(ctx, req.(*AuthRequest))
}
return interceptor(ctx, in, info, handler)
}
// WalletService_ServiceDesc is the grpc.ServiceDesc for WalletService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WalletService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ocean.v1.WalletService",
HandlerType: (*WalletServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GenSeed",
Handler: _WalletService_GenSeed_Handler,
},
{
MethodName: "CreateWallet",
Handler: _WalletService_CreateWallet_Handler,
},
{
MethodName: "Unlock",
Handler: _WalletService_Unlock_Handler,
},
{
MethodName: "Lock",
Handler: _WalletService_Lock_Handler,
},
{
MethodName: "ChangePassword",
Handler: _WalletService_ChangePassword_Handler,
},
{
MethodName: "Status",
Handler: _WalletService_Status_Handler,
},
{
MethodName: "GetInfo",
Handler: _WalletService_GetInfo_Handler,
},
{
MethodName: "Auth",
Handler: _WalletService_Auth_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "RestoreWallet",
Handler: _WalletService_RestoreWallet_Handler,
ServerStreams: true,
},
},
Metadata: "ocean/v1/wallet.proto",
}