wallet

package
v0.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_wallet_proto protoreflect.FileDescriptor
View Source
var Wallet_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Wallet",
	HandlerType: (*WalletServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "WalletAddress",
			Handler:    _Wallet_WalletAddress_Handler,
		},
		{
			MethodName: "WalletBalance",
			Handler:    _Wallet_WalletBalance_Handler,
		},
		{
			MethodName: "SendToMany",
			Handler:    _Wallet_SendToMany_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wallet.proto",
}

Wallet_ServiceDesc is the grpc.ServiceDesc for Wallet service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterWalletServer

func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer)

Types

type BalanceInfo

type BalanceInfo struct {

	// The balance of the wallet
	TotalBalance uint64 `protobuf:"varint,1,opt,name=total_balance,json=totalBalance,proto3" json:"total_balance,omitempty"`
	// The confirmed balance of a wallet(with >= 1 confirmations)
	ConfirmedBalance uint64 `protobuf:"varint,2,opt,name=confirmed_balance,json=confirmedBalance,proto3" json:"confirmed_balance,omitempty"`
	// The unconfirmed balance of a wallet(with 0 confirmations)
	UnconfirmedBalance uint64 `protobuf:"varint,3,opt,name=unconfirmed_balance,json=unconfirmedBalance,proto3" json:"unconfirmed_balance,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceInfo) Descriptor deprecated

func (*BalanceInfo) Descriptor() ([]byte, []int)

Deprecated: Use BalanceInfo.ProtoReflect.Descriptor instead.

func (*BalanceInfo) GetConfirmedBalance

func (x *BalanceInfo) GetConfirmedBalance() uint64

func (*BalanceInfo) GetTotalBalance

func (x *BalanceInfo) GetTotalBalance() uint64

func (*BalanceInfo) GetUnconfirmedBalance

func (x *BalanceInfo) GetUnconfirmedBalance() uint64

func (*BalanceInfo) ProtoMessage

func (*BalanceInfo) ProtoMessage()

func (*BalanceInfo) ProtoReflect

func (x *BalanceInfo) ProtoReflect() protoreflect.Message

func (*BalanceInfo) Reset

func (x *BalanceInfo) Reset()

func (*BalanceInfo) String

func (x *BalanceInfo) String() string

type SendToManyReply

type SendToManyReply struct {

	//
	//The serialized transaction sent out on the network.
	RawTx []byte `protobuf:"bytes,1,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"`
	//
	//The id of the broadcasted transaction.
	Txid []byte `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"`
	// contains filtered or unexported fields
}

func (*SendToManyReply) Descriptor deprecated

func (*SendToManyReply) Descriptor() ([]byte, []int)

Deprecated: Use SendToManyReply.ProtoReflect.Descriptor instead.

func (*SendToManyReply) GetRawTx

func (x *SendToManyReply) GetRawTx() []byte

func (*SendToManyReply) GetTxid added in v0.6.0

func (x *SendToManyReply) GetTxid() []byte

func (*SendToManyReply) ProtoMessage

func (*SendToManyReply) ProtoMessage()

func (*SendToManyReply) ProtoReflect

func (x *SendToManyReply) ProtoReflect() protoreflect.Message

func (*SendToManyReply) Reset

func (x *SendToManyReply) Reset()

func (*SendToManyReply) String

func (x *SendToManyReply) String() string

type SendToManyRequest

type SendToManyRequest struct {

	//
	//A slice of the outputs that should be created in the transaction produced.
	Outputs []*TxOut `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"`
	//
	//The number of millisatoshis per byte that should be used when crafting
	//this transaction.
	MillisatPerByte int64 `protobuf:"varint,2,opt,name=millisat_per_byte,json=millisatPerByte,proto3" json:"millisat_per_byte,omitempty"`
	// Optional: if true the transaction will be pushed to the network
	Push bool `protobuf:"varint,3,opt,name=push,proto3" json:"push,omitempty"`
	// contains filtered or unexported fields
}

func (*SendToManyRequest) Descriptor deprecated

func (*SendToManyRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendToManyRequest.ProtoReflect.Descriptor instead.

func (*SendToManyRequest) GetMillisatPerByte

func (x *SendToManyRequest) GetMillisatPerByte() int64

func (*SendToManyRequest) GetOutputs

func (x *SendToManyRequest) GetOutputs() []*TxOut

func (*SendToManyRequest) GetPush

func (x *SendToManyRequest) GetPush() bool

func (*SendToManyRequest) ProtoMessage

func (*SendToManyRequest) ProtoMessage()

func (*SendToManyRequest) ProtoReflect

func (x *SendToManyRequest) ProtoReflect() protoreflect.Message

func (*SendToManyRequest) Reset

func (x *SendToManyRequest) Reset()

func (*SendToManyRequest) String

func (x *SendToManyRequest) String() string

type TxOut

type TxOut struct {

	// The asset being spent
	Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
	// The value of the output being spent.
	Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	// The confidential address of the output being spent.
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*TxOut) Descriptor deprecated

func (*TxOut) Descriptor() ([]byte, []int)

Deprecated: Use TxOut.ProtoReflect.Descriptor instead.

func (*TxOut) GetAddress

func (x *TxOut) GetAddress() string

func (*TxOut) GetAsset

func (x *TxOut) GetAsset() string

func (*TxOut) GetValue

func (x *TxOut) GetValue() int64

func (*TxOut) ProtoMessage

func (*TxOut) ProtoMessage()

func (*TxOut) ProtoReflect

func (x *TxOut) ProtoReflect() protoreflect.Message

func (*TxOut) Reset

func (x *TxOut) Reset()

func (*TxOut) String

func (x *TxOut) String() string

type UnimplementedWalletServer

type UnimplementedWalletServer struct {
}

UnimplementedWalletServer must be embedded to have forward compatible implementations.

func (UnimplementedWalletServer) SendToMany

func (UnimplementedWalletServer) WalletAddress

func (UnimplementedWalletServer) WalletBalance

type UnsafeWalletServer

type UnsafeWalletServer interface {
	// contains filtered or unexported methods
}

UnsafeWalletServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WalletServer will result in compilation errors.

type WalletAddressReply

type WalletAddressReply struct {

	// The confidential address encoded using a blech32 format.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// The blinding private key for the given address encoded in hex format
	Blinding string `protobuf:"bytes,2,opt,name=blinding,proto3" json:"blinding,omitempty"`
	// contains filtered or unexported fields
}

func (*WalletAddressReply) Descriptor deprecated

func (*WalletAddressReply) Descriptor() ([]byte, []int)

Deprecated: Use WalletAddressReply.ProtoReflect.Descriptor instead.

func (*WalletAddressReply) GetAddress

func (x *WalletAddressReply) GetAddress() string

func (*WalletAddressReply) GetBlinding

func (x *WalletAddressReply) GetBlinding() string

func (*WalletAddressReply) ProtoMessage

func (*WalletAddressReply) ProtoMessage()

func (*WalletAddressReply) ProtoReflect

func (x *WalletAddressReply) ProtoReflect() protoreflect.Message

func (*WalletAddressReply) Reset

func (x *WalletAddressReply) Reset()

func (*WalletAddressReply) String

func (x *WalletAddressReply) String() string

type WalletAddressRequest

type WalletAddressRequest struct {
	// contains filtered or unexported fields
}

func (*WalletAddressRequest) Descriptor deprecated

func (*WalletAddressRequest) Descriptor() ([]byte, []int)

Deprecated: Use WalletAddressRequest.ProtoReflect.Descriptor instead.

func (*WalletAddressRequest) ProtoMessage

func (*WalletAddressRequest) ProtoMessage()

func (*WalletAddressRequest) ProtoReflect

func (x *WalletAddressRequest) ProtoReflect() protoreflect.Message

func (*WalletAddressRequest) Reset

func (x *WalletAddressRequest) Reset()

func (*WalletAddressRequest) String

func (x *WalletAddressRequest) String() string

type WalletBalanceReply

type WalletBalanceReply struct {

	// The balance info (total, confirmed, unconfirmed) of the wallet grouped by
	// asset
	Balance map[string]*BalanceInfo `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*WalletBalanceReply) Descriptor deprecated

func (*WalletBalanceReply) Descriptor() ([]byte, []int)

Deprecated: Use WalletBalanceReply.ProtoReflect.Descriptor instead.

func (*WalletBalanceReply) GetBalance

func (x *WalletBalanceReply) GetBalance() map[string]*BalanceInfo

func (*WalletBalanceReply) ProtoMessage

func (*WalletBalanceReply) ProtoMessage()

func (*WalletBalanceReply) ProtoReflect

func (x *WalletBalanceReply) ProtoReflect() protoreflect.Message

func (*WalletBalanceReply) Reset

func (x *WalletBalanceReply) Reset()

func (*WalletBalanceReply) String

func (x *WalletBalanceReply) String() string

type WalletBalanceRequest

type WalletBalanceRequest struct {
	// contains filtered or unexported fields
}

func (*WalletBalanceRequest) Descriptor deprecated

func (*WalletBalanceRequest) Descriptor() ([]byte, []int)

Deprecated: Use WalletBalanceRequest.ProtoReflect.Descriptor instead.

func (*WalletBalanceRequest) ProtoMessage

func (*WalletBalanceRequest) ProtoMessage()

func (*WalletBalanceRequest) ProtoReflect

func (x *WalletBalanceRequest) ProtoReflect() protoreflect.Message

func (*WalletBalanceRequest) Reset

func (x *WalletBalanceRequest) Reset()

func (*WalletBalanceRequest) String

func (x *WalletBalanceRequest) String() string

type WalletClient

type WalletClient interface {
	//
	//WalletAddress returns a Liquid confidential p2wpkh address (BLECH32)
	WalletAddress(ctx context.Context, in *WalletAddressRequest, opts ...grpc.CallOption) (*WalletAddressReply, error)
	//
	//WalletBalance returns total unspent outputs (confirmed and unconfirmed), all
	//confirmed unspent outputs and all unconfirmed unspent outputs under control
	//of the wallet.
	WalletBalance(ctx context.Context, in *WalletBalanceRequest, opts ...grpc.CallOption) (*WalletBalanceReply, error)
	//SendToMany sends funds to many outputs
	SendToMany(ctx context.Context, in *SendToManyRequest, opts ...grpc.CallOption) (*SendToManyReply, error)
}

WalletClient is the client API for Wallet 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.

func NewWalletClient

func NewWalletClient(cc grpc.ClientConnInterface) WalletClient

type WalletServer

type WalletServer interface {
	//
	//WalletAddress returns a Liquid confidential p2wpkh address (BLECH32)
	WalletAddress(context.Context, *WalletAddressRequest) (*WalletAddressReply, error)
	//
	//WalletBalance returns total unspent outputs (confirmed and unconfirmed), all
	//confirmed unspent outputs and all unconfirmed unspent outputs under control
	//of the wallet.
	WalletBalance(context.Context, *WalletBalanceRequest) (*WalletBalanceReply, error)
	//SendToMany sends funds to many outputs
	SendToMany(context.Context, *SendToManyRequest) (*SendToManyReply, error)
	// contains filtered or unexported methods
}

WalletServer is the server API for Wallet service. All implementations must embed UnimplementedWalletServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL