mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 12:44:19 +01:00
committed by
GitHub
parent
28db168af0
commit
0210d39866
@@ -1,8 +0,0 @@
|
||||
# Generated by buf. DO NOT EDIT.
|
||||
version: v1
|
||||
deps:
|
||||
- remote: buf.build
|
||||
owner: googleapis
|
||||
repository: googleapis
|
||||
commit: 28151c0d0a1641bf938a7672c500e01d
|
||||
digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de
|
||||
@@ -1,12 +0,0 @@
|
||||
version: v1
|
||||
name: buf.build/ark-network/coordinator
|
||||
deps:
|
||||
- buf.build/googleapis/googleapis
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
ignore_unstable_packages: true
|
||||
lint:
|
||||
use:
|
||||
- DEFAULT
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package coordinator.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
service CoordinatorService {
|
||||
rpc RegisterPayment(RegisterPaymentRequest) returns (RegisterPaymentResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/payment/register"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc ClaimPayment(ClaimPaymentRequest) returns (ClaimPaymentResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/payment/claim"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc FinalizePayment(FinalizePaymentRequest) returns (FinalizePaymentResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/payment/finalize"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc ListRounds(ListRoundsRequest) returns (ListRoundsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/rounds"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc GetRound(GetRoundRequest) returns (GetRoundResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/round/{txid}"
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
message RegisterPaymentRequest {
|
||||
// Unsigned forfeit tx sending all funds back to the ASP.
|
||||
string vtx = 1;
|
||||
}
|
||||
message RegisterPaymentResponse {
|
||||
// Mocks wabisabi's credentials.
|
||||
string id = 1;
|
||||
// Forfeit tx signed by the ASP.
|
||||
string signed_vtx = 2;
|
||||
}
|
||||
|
||||
message ClaimPaymentRequest {
|
||||
// Mocks wabisabi's credentials.
|
||||
string id = 1;
|
||||
// List of receivers for a registered payment.
|
||||
repeated Output outputs = 2;
|
||||
}
|
||||
message ClaimPaymentResponse {}
|
||||
|
||||
message FinalizePaymentRequest {
|
||||
// Forfeit tx signed also by the user.
|
||||
string signed_vtx = 1;
|
||||
}
|
||||
message FinalizePaymentResponse {}
|
||||
|
||||
message ListRoundsRequest {
|
||||
int64 start = 1;
|
||||
int64 end = 2;
|
||||
}
|
||||
message ListRoundsResponse {
|
||||
repeated Round rounds = 1;
|
||||
}
|
||||
|
||||
message GetRoundRequest {
|
||||
string txid = 1;
|
||||
}
|
||||
message GetRoundResponse {
|
||||
Round round = 1;
|
||||
}
|
||||
|
||||
message Round {
|
||||
int64 start = 1;
|
||||
int64 end = 2;
|
||||
string txid = 3;
|
||||
repeated Output outputs = 4;
|
||||
}
|
||||
|
||||
message Output {
|
||||
string pubkey = 1;
|
||||
uint64 amount = 2;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,487 +0,0 @@
|
||||
// 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",
|
||||
}
|
||||
@@ -1,924 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
@@ -1,308 +0,0 @@
|
||||
// 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 ¬ificationServiceClient{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 := ¬ificationServiceTransactionNotificationsClient{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 := ¬ificationServiceUtxosNotificationsClient{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, ¬ificationServiceTransactionNotificationsServer{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, ¬ificationServiceUtxosNotificationsServer{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
@@ -1,649 +0,0 @@
|
||||
// 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
@@ -1,441 +0,0 @@
|
||||
// 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",
|
||||
}
|
||||
Reference in New Issue
Block a user