node

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MPL-2.0 Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TxType_name = map[int32]string{
		0: "COINBASE",
		1: "BID",
		2: "STAKE",
		3: "STANDARD",
		4: "TIMELOCK",
		5: "CONTRACT",
	}
	TxType_value = map[string]int32{
		"COINBASE": 0,
		"BID":      1,
		"STAKE":    2,
		"STANDARD": 3,
		"TIMELOCK": 4,
		"CONTRACT": 5,
	}
)

Enum value maps for TxType.

View Source
var (
	Direction_name = map[int32]string{
		0: "OUT",
		1: "IN",
	}
	Direction_value = map[string]int32{
		"OUT": 0,
		"IN":  1,
	}
)

Enum value maps for Direction.

View Source
var File_mempool_proto protoreflect.FileDescriptor
View Source
var File_wallet_proto protoreflect.FileDescriptor

Functions

func RegisterChainServer added in v0.2.0

func RegisterChainServer(s *grpc.Server, srv ChainServer)

func RegisterMaintainerServer added in v0.2.0

func RegisterMaintainerServer(s *grpc.Server, srv MaintainerServer)

func RegisterMempoolServer added in v0.2.0

func RegisterMempoolServer(s *grpc.Server, srv MempoolServer)

func RegisterTransactorServer added in v0.2.0

func RegisterTransactorServer(s *grpc.Server, srv TransactorServer)

func RegisterWalletServer added in v0.2.0

func RegisterWalletServer(s *grpc.Server, srv WalletServer)

Types

type BalanceResponse

type BalanceResponse struct {
	UnlockedBalance uint64 `protobuf:"fixed64,1,opt,name=unlockedBalance,proto3" json:"unlockedBalance,omitempty"`
	LockedBalance   uint64 `protobuf:"fixed64,2,opt,name=lockedBalance,proto3" json:"lockedBalance,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceResponse) Descriptor deprecated

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

Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.

func (*BalanceResponse) GetLockedBalance

func (x *BalanceResponse) GetLockedBalance() uint64

func (*BalanceResponse) GetUnlockedBalance

func (x *BalanceResponse) GetUnlockedBalance() uint64

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) ProtoReflect added in v0.2.0

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

func (*BalanceResponse) Reset

func (x *BalanceResponse) Reset()

func (*BalanceResponse) String

func (x *BalanceResponse) String() string

type BidRequest added in v0.2.0

type BidRequest struct {
	Amount   uint64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Fee      uint64 `protobuf:"fixed64,2,opt,name=fee,proto3" json:"fee,omitempty"`
	Locktime uint64 `protobuf:"fixed64,3,opt,name=locktime,proto3" json:"locktime,omitempty"`
	// contains filtered or unexported fields
}

func (*BidRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use BidRequest.ProtoReflect.Descriptor instead.

func (*BidRequest) GetAmount added in v0.2.0

func (x *BidRequest) GetAmount() uint64

func (*BidRequest) GetFee added in v0.2.0

func (x *BidRequest) GetFee() uint64

func (*BidRequest) GetLocktime added in v0.2.0

func (x *BidRequest) GetLocktime() uint64

func (*BidRequest) ProtoMessage added in v0.2.0

func (*BidRequest) ProtoMessage()

func (*BidRequest) ProtoReflect added in v0.2.0

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

func (*BidRequest) Reset added in v0.2.0

func (x *BidRequest) Reset()

func (*BidRequest) String added in v0.2.0

func (x *BidRequest) String() string

type CallContractRequest added in v0.2.0

type CallContractRequest struct {
	Data    []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Fee     uint64 `protobuf:"fixed64,3,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*CallContractRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use CallContractRequest.ProtoReflect.Descriptor instead.

func (*CallContractRequest) GetAddress added in v0.2.0

func (x *CallContractRequest) GetAddress() []byte

func (*CallContractRequest) GetData added in v0.2.0

func (x *CallContractRequest) GetData() []byte

func (*CallContractRequest) GetFee added in v0.2.0

func (x *CallContractRequest) GetFee() uint64

func (*CallContractRequest) ProtoMessage added in v0.2.0

func (*CallContractRequest) ProtoMessage()

func (*CallContractRequest) ProtoReflect added in v0.2.0

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

func (*CallContractRequest) Reset added in v0.2.0

func (x *CallContractRequest) Reset()

func (*CallContractRequest) String added in v0.2.0

func (x *CallContractRequest) String() string

type ChainClient added in v0.2.0

type ChainClient interface {
	RebuildChain(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GenericResponse, error)
	GetSyncProgress(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SyncProgressResponse, error)
}

ChainClient is the client API for Chain service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewChainClient added in v0.2.0

func NewChainClient(cc grpc.ClientConnInterface) ChainClient

type ChainMock added in v0.2.0

type ChainMock struct{}

func (*ChainMock) GetSyncProgress added in v0.2.0

func (m *ChainMock) GetSyncProgress(ctx context.Context, req *EmptyRequest) (*SyncProgressResponse, error)

func (*ChainMock) RebuildChain added in v0.2.0

func (m *ChainMock) RebuildChain(ctx context.Context, req *EmptyRequest) (*GenericResponse, error)

type ChainServer added in v0.2.0

type ChainServer interface {
	RebuildChain(context.Context, *EmptyRequest) (*GenericResponse, error)
	GetSyncProgress(context.Context, *EmptyRequest) (*SyncProgressResponse, error)
}

ChainServer is the server API for Chain service.

type ConsensusTxRequest

type ConsensusTxRequest struct {
	Amount   uint64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
	LockTime uint64 `protobuf:"fixed64,2,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsensusTxRequest) Descriptor deprecated

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

Deprecated: Use ConsensusTxRequest.ProtoReflect.Descriptor instead.

func (*ConsensusTxRequest) GetAmount

func (x *ConsensusTxRequest) GetAmount() uint64

func (*ConsensusTxRequest) GetLockTime

func (x *ConsensusTxRequest) GetLockTime() uint64

func (*ConsensusTxRequest) ProtoMessage

func (*ConsensusTxRequest) ProtoMessage()

func (*ConsensusTxRequest) ProtoReflect added in v0.2.0

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

func (*ConsensusTxRequest) Reset

func (x *ConsensusTxRequest) Reset()

func (*ConsensusTxRequest) String

func (x *ConsensusTxRequest) String() string

type CreateRequest

type CreateRequest struct {
	Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	Seed     []byte `protobuf:"bytes,2,opt,name=seed,proto3" json:"seed,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetPassword

func (x *CreateRequest) GetPassword() string

func (*CreateRequest) GetSeed

func (x *CreateRequest) GetSeed() []byte

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect added in v0.2.0

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type Direction

type Direction int32
const (
	Direction_OUT Direction = 0
	Direction_IN  Direction = 1
)

func (Direction) Descriptor added in v0.2.0

func (Direction) Descriptor() protoreflect.EnumDescriptor

func (Direction) Enum added in v0.2.0

func (x Direction) Enum() *Direction

func (Direction) EnumDescriptor deprecated

func (Direction) EnumDescriptor() ([]byte, []int)

Deprecated: Use Direction.Descriptor instead.

func (Direction) Number added in v0.2.0

func (x Direction) Number() protoreflect.EnumNumber

func (Direction) String

func (x Direction) String() string

func (Direction) Type added in v0.2.0

type EmptyRequest

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

func (*EmptyRequest) Descriptor deprecated

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

Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.

func (*EmptyRequest) ProtoMessage

func (*EmptyRequest) ProtoMessage()

func (*EmptyRequest) ProtoReflect added in v0.2.0

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

func (*EmptyRequest) Reset

func (x *EmptyRequest) Reset()

func (*EmptyRequest) String

func (x *EmptyRequest) String() string

type GenericResponse

type GenericResponse struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*GenericResponse) Descriptor deprecated

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

Deprecated: Use GenericResponse.ProtoReflect.Descriptor instead.

func (*GenericResponse) GetResponse

func (x *GenericResponse) GetResponse() string

func (*GenericResponse) ProtoMessage

func (*GenericResponse) ProtoMessage()

func (*GenericResponse) ProtoReflect added in v0.2.0

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

func (*GenericResponse) Reset

func (x *GenericResponse) Reset()

func (*GenericResponse) String

func (x *GenericResponse) String() string

type LoadRequest

type LoadRequest struct {
	Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadRequest) Descriptor deprecated

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

Deprecated: Use LoadRequest.ProtoReflect.Descriptor instead.

func (*LoadRequest) GetPassword

func (x *LoadRequest) GetPassword() string

func (*LoadRequest) ProtoMessage

func (*LoadRequest) ProtoMessage()

func (*LoadRequest) ProtoReflect added in v0.2.0

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

func (*LoadRequest) Reset

func (x *LoadRequest) Reset()

func (*LoadRequest) String

func (x *LoadRequest) String() string

type LoadResponse

type LoadResponse struct {
	Key *PubKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadResponse) Descriptor deprecated

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

Deprecated: Use LoadResponse.ProtoReflect.Descriptor instead.

func (*LoadResponse) GetKey

func (x *LoadResponse) GetKey() *PubKey

func (*LoadResponse) ProtoMessage

func (*LoadResponse) ProtoMessage()

func (*LoadResponse) ProtoReflect added in v0.2.0

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

func (*LoadResponse) Reset

func (x *LoadResponse) Reset()

func (*LoadResponse) String

func (x *LoadResponse) String() string

type MaintainerClient added in v0.2.0

type MaintainerClient interface {
	AutomateConsensusTxs(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GenericResponse, error)
}

MaintainerClient is the client API for Maintainer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMaintainerClient added in v0.2.0

func NewMaintainerClient(cc grpc.ClientConnInterface) MaintainerClient

type MaintainerMock added in v0.2.0

type MaintainerMock struct{}

func (*MaintainerMock) AutomateConsensusTxs added in v0.2.0

func (m *MaintainerMock) AutomateConsensusTxs(ctx context.Context, req *EmptyRequest) (*GenericResponse, error)

type MaintainerServer added in v0.2.0

type MaintainerServer interface {
	AutomateConsensusTxs(context.Context, *EmptyRequest) (*GenericResponse, error)
}

MaintainerServer is the server API for Maintainer service.

type MempoolClient added in v0.2.0

type MempoolClient interface {
	GetUnconfirmedBalance(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
	SelectTx(ctx context.Context, in *SelectRequest, opts ...grpc.CallOption) (*SelectResponse, error)
}

MempoolClient is the client API for Mempool service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMempoolClient added in v0.2.0

func NewMempoolClient(cc grpc.ClientConnInterface) MempoolClient

type MempoolMock added in v0.2.0

type MempoolMock struct{}

func (*MempoolMock) GetUnconfirmedBalance added in v0.2.0

func (m *MempoolMock) GetUnconfirmedBalance(ctx context.Context, req *EmptyRequest) (*BalanceResponse, error)

func (*MempoolMock) SelectTx added in v0.2.0

func (m *MempoolMock) SelectTx(ctx context.Context, req *SelectRequest) (*SelectResponse, error)

type MempoolServer added in v0.2.0

type MempoolServer interface {
	GetUnconfirmedBalance(context.Context, *EmptyRequest) (*BalanceResponse, error)
	SelectTx(context.Context, *SelectRequest) (*SelectResponse, error)
}

MempoolServer is the server API for Mempool service.

type PubKey

type PubKey struct {
	PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*PubKey) Descriptor deprecated

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

Deprecated: Use PubKey.ProtoReflect.Descriptor instead.

func (*PubKey) GetPublicKey

func (x *PubKey) GetPublicKey() []byte

func (*PubKey) ProtoMessage

func (*PubKey) ProtoMessage()

func (*PubKey) ProtoReflect added in v0.2.0

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

func (*PubKey) Reset

func (x *PubKey) Reset()

func (*PubKey) String

func (x *PubKey) String() string

type SelectRequest

type SelectRequest struct {
	Types []TxType `protobuf:"varint,1,rep,packed,name=types,proto3,enum=node.TxType" json:"types,omitempty"`
	Id    string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

SelectRequest can specify an ID or a transaction type or none

func (*SelectRequest) Descriptor deprecated

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

Deprecated: Use SelectRequest.ProtoReflect.Descriptor instead.

func (*SelectRequest) GetId

func (x *SelectRequest) GetId() string

func (*SelectRequest) GetTypes

func (x *SelectRequest) GetTypes() []TxType

func (*SelectRequest) ProtoMessage

func (*SelectRequest) ProtoMessage()

func (*SelectRequest) ProtoReflect added in v0.2.0

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

func (*SelectRequest) Reset

func (x *SelectRequest) Reset()

func (*SelectRequest) String

func (x *SelectRequest) String() string

type SelectResponse

type SelectResponse struct {

	//Note: the response was a single string describing the transactions.
	//It should actually be responsibility of the caller to format the data or handle it otherwise
	//string msg = 1;
	Result []*Tx `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*SelectResponse) Descriptor deprecated

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

Deprecated: Use SelectResponse.ProtoReflect.Descriptor instead.

func (*SelectResponse) GetResult

func (x *SelectResponse) GetResult() []*Tx

func (*SelectResponse) ProtoMessage

func (*SelectResponse) ProtoMessage()

func (*SelectResponse) ProtoReflect added in v0.2.0

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

func (*SelectResponse) Reset

func (x *SelectResponse) Reset()

func (*SelectResponse) String

func (x *SelectResponse) String() string

type StakeRequest added in v0.2.0

type StakeRequest struct {
	Amount   uint64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Fee      uint64 `protobuf:"fixed64,2,opt,name=fee,proto3" json:"fee,omitempty"`
	Locktime uint64 `protobuf:"fixed64,3,opt,name=locktime,proto3" json:"locktime,omitempty"`
	// contains filtered or unexported fields
}

func (*StakeRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use StakeRequest.ProtoReflect.Descriptor instead.

func (*StakeRequest) GetAmount added in v0.2.0

func (x *StakeRequest) GetAmount() uint64

func (*StakeRequest) GetFee added in v0.2.0

func (x *StakeRequest) GetFee() uint64

func (*StakeRequest) GetLocktime added in v0.2.0

func (x *StakeRequest) GetLocktime() uint64

func (*StakeRequest) ProtoMessage added in v0.2.0

func (*StakeRequest) ProtoMessage()

func (*StakeRequest) ProtoReflect added in v0.2.0

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

func (*StakeRequest) Reset added in v0.2.0

func (x *StakeRequest) Reset()

func (*StakeRequest) String added in v0.2.0

func (x *StakeRequest) String() string

type SyncProgressResponse

type SyncProgressResponse struct {
	Progress float32 `protobuf:"fixed32,1,opt,name=progress,proto3" json:"progress,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncProgressResponse) Descriptor deprecated

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

Deprecated: Use SyncProgressResponse.ProtoReflect.Descriptor instead.

func (*SyncProgressResponse) GetProgress

func (x *SyncProgressResponse) GetProgress() float32

func (*SyncProgressResponse) ProtoMessage

func (*SyncProgressResponse) ProtoMessage()

func (*SyncProgressResponse) ProtoReflect added in v0.2.0

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

func (*SyncProgressResponse) Reset

func (x *SyncProgressResponse) Reset()

func (*SyncProgressResponse) String

func (x *SyncProgressResponse) String() string

type TransactionResponse added in v0.2.0

type TransactionResponse struct {
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead.

func (*TransactionResponse) GetHash added in v0.2.0

func (x *TransactionResponse) GetHash() []byte

func (*TransactionResponse) ProtoMessage added in v0.2.0

func (*TransactionResponse) ProtoMessage()

func (*TransactionResponse) ProtoReflect added in v0.2.0

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

func (*TransactionResponse) Reset added in v0.2.0

func (x *TransactionResponse) Reset()

func (*TransactionResponse) String added in v0.2.0

func (x *TransactionResponse) String() string

type TransactorClient added in v0.2.0

type TransactorClient interface {
	CallContract(ctx context.Context, in *CallContractRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
	Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
	Bid(ctx context.Context, in *BidRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
	Stake(ctx context.Context, in *StakeRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
}

TransactorClient is the client API for Transactor service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTransactorClient added in v0.2.0

func NewTransactorClient(cc grpc.ClientConnInterface) TransactorClient

type TransactorMock added in v0.2.0

type TransactorMock struct{}

func (*TransactorMock) Bid added in v0.2.0

func (*TransactorMock) CallContract added in v0.2.0

func (*TransactorMock) Stake added in v0.2.0

func (*TransactorMock) Transfer added in v0.2.0

type TransactorServer added in v0.2.0

TransactorServer is the server API for Transactor service.

type TransferRequest

type TransferRequest struct {
	Amount  uint64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Fee     uint64 `protobuf:"fixed64,3,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*TransferRequest) Descriptor deprecated

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

Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead.

func (*TransferRequest) GetAddress

func (x *TransferRequest) GetAddress() []byte

func (*TransferRequest) GetAmount

func (x *TransferRequest) GetAmount() uint64

func (*TransferRequest) GetFee added in v0.2.0

func (x *TransferRequest) GetFee() uint64

func (*TransferRequest) ProtoMessage

func (*TransferRequest) ProtoMessage()

func (*TransferRequest) ProtoReflect added in v0.2.0

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

func (*TransferRequest) Reset

func (x *TransferRequest) Reset()

func (*TransferRequest) String

func (x *TransferRequest) String() string

type Tx

type Tx struct {
	Type     TxType `protobuf:"varint,1,opt,name=type,proto3,enum=node.TxType" json:"type,omitempty"`
	Id       string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	LockTime uint64 `protobuf:"fixed64,3,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
	// contains filtered or unexported fields
}

func (*Tx) Descriptor deprecated

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

Deprecated: Use Tx.ProtoReflect.Descriptor instead.

func (*Tx) GetId

func (x *Tx) GetId() string

func (*Tx) GetLockTime

func (x *Tx) GetLockTime() uint64

func (*Tx) GetType

func (x *Tx) GetType() TxType

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) ProtoReflect added in v0.2.0

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

func (*Tx) Reset

func (x *Tx) Reset()

func (*Tx) String

func (x *Tx) String() string

type TxHistoryResponse

type TxHistoryResponse struct {
	Records []*TxRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*TxHistoryResponse) Descriptor deprecated

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

Deprecated: Use TxHistoryResponse.ProtoReflect.Descriptor instead.

func (*TxHistoryResponse) GetRecords

func (x *TxHistoryResponse) GetRecords() []*TxRecord

func (*TxHistoryResponse) ProtoMessage

func (*TxHistoryResponse) ProtoMessage()

func (*TxHistoryResponse) ProtoReflect added in v0.2.0

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

func (*TxHistoryResponse) Reset

func (x *TxHistoryResponse) Reset()

func (*TxHistoryResponse) String

func (x *TxHistoryResponse) String() string

type TxRecord

type TxRecord struct {
	Direction    Direction `protobuf:"varint,1,opt,name=direction,proto3,enum=node.Direction" json:"direction,omitempty"`
	Timestamp    int64     `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Height       uint64    `protobuf:"fixed64,3,opt,name=height,proto3" json:"height,omitempty"`
	Type         TxType    `protobuf:"varint,4,opt,name=type,proto3,enum=node.TxType" json:"type,omitempty"`
	Amount       uint64    `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"`
	UnlockHeight uint64    `protobuf:"fixed64,6,opt,name=unlockHeight,proto3" json:"unlockHeight,omitempty"`
	// contains filtered or unexported fields
}

func (*TxRecord) Descriptor deprecated

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

Deprecated: Use TxRecord.ProtoReflect.Descriptor instead.

func (*TxRecord) GetAmount

func (x *TxRecord) GetAmount() uint64

func (*TxRecord) GetDirection

func (x *TxRecord) GetDirection() Direction

func (*TxRecord) GetHeight

func (x *TxRecord) GetHeight() uint64

func (*TxRecord) GetTimestamp

func (x *TxRecord) GetTimestamp() int64

func (*TxRecord) GetType

func (x *TxRecord) GetType() TxType

func (*TxRecord) GetUnlockHeight

func (x *TxRecord) GetUnlockHeight() uint64

func (*TxRecord) ProtoMessage

func (*TxRecord) ProtoMessage()

func (*TxRecord) ProtoReflect added in v0.2.0

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

func (*TxRecord) Reset

func (x *TxRecord) Reset()

func (*TxRecord) String

func (x *TxRecord) String() string

type TxType

type TxType int32
const (
	// CoinbaseType is the identifier for a block coinbase
	TxType_COINBASE TxType = 0
	// BidType is the identifier for a blind bid
	TxType_BID TxType = 1
	// StakeType is the identifier for a stake
	TxType_STAKE TxType = 2
	// StandardType is the identifier for a standard transaction
	TxType_STANDARD TxType = 3
	// TimelockType is the identifier for a standard time-locked transaction
	TxType_TIMELOCK TxType = 4
	// ContractType is the identifier for a smart contract transaction
	TxType_CONTRACT TxType = 5
)

func (TxType) Descriptor added in v0.2.0

func (TxType) Descriptor() protoreflect.EnumDescriptor

func (TxType) Enum added in v0.2.0

func (x TxType) Enum() *TxType

func (TxType) EnumDescriptor deprecated

func (TxType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TxType.Descriptor instead.

func (TxType) Number added in v0.2.0

func (x TxType) Number() protoreflect.EnumNumber

func (TxType) String

func (x TxType) String() string

func (TxType) Type added in v0.2.0

func (TxType) Type() protoreflect.EnumType

type UnimplementedChainServer added in v0.2.0

type UnimplementedChainServer struct {
}

UnimplementedChainServer can be embedded to have forward compatible implementations.

func (*UnimplementedChainServer) GetSyncProgress added in v0.2.0

func (*UnimplementedChainServer) RebuildChain added in v0.2.0

type UnimplementedMaintainerServer added in v0.2.0

type UnimplementedMaintainerServer struct {
}

UnimplementedMaintainerServer can be embedded to have forward compatible implementations.

func (*UnimplementedMaintainerServer) AutomateConsensusTxs added in v0.2.0

type UnimplementedMempoolServer added in v0.2.0

type UnimplementedMempoolServer struct {
}

UnimplementedMempoolServer can be embedded to have forward compatible implementations.

func (*UnimplementedMempoolServer) GetUnconfirmedBalance added in v0.2.0

func (*UnimplementedMempoolServer) SelectTx added in v0.2.0

type UnimplementedTransactorServer added in v0.2.0

type UnimplementedTransactorServer struct {
}

UnimplementedTransactorServer can be embedded to have forward compatible implementations.

func (*UnimplementedTransactorServer) Bid added in v0.2.0

func (*UnimplementedTransactorServer) CallContract added in v0.2.0

func (*UnimplementedTransactorServer) Stake added in v0.2.0

func (*UnimplementedTransactorServer) Transfer added in v0.2.0

type UnimplementedWalletServer added in v0.2.0

type UnimplementedWalletServer struct {
}

UnimplementedWalletServer can be embedded to have forward compatible implementations.

func (*UnimplementedWalletServer) ClearWalletDatabase added in v0.2.0

func (*UnimplementedWalletServer) CreateFromSeed added in v0.2.0

func (*UnimplementedWalletServer) CreateWallet added in v0.2.0

func (*UnimplementedWalletServer) GetAddress added in v0.2.0

func (*UnimplementedWalletServer) GetBalance added in v0.2.0

func (*UnimplementedWalletServer) GetTxHistory added in v0.2.0

func (*UnimplementedWalletServer) GetWalletStatus added in v0.2.0

func (*UnimplementedWalletServer) LoadWallet added in v0.2.0

type WalletClient added in v0.2.0

type WalletClient interface {
	CreateWallet(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*LoadResponse, error)
	LoadWallet(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*LoadResponse, error)
	CreateFromSeed(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*LoadResponse, error)
	ClearWalletDatabase(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GenericResponse, error)
	GetWalletStatus(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*WalletStatusResponse, error)
	GetAddress(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*LoadResponse, error)
	GetBalance(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*BalanceResponse, error)
	GetTxHistory(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*TxHistoryResponse, error)
}

WalletClient is the client API for Wallet service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWalletClient added in v0.2.0

func NewWalletClient(cc grpc.ClientConnInterface) WalletClient

type WalletMock added in v0.2.0

type WalletMock struct{}

func (*WalletMock) ClearWalletDatabase added in v0.2.0

func (m *WalletMock) ClearWalletDatabase(ctx context.Context, req *EmptyRequest) (*GenericResponse, error)

func (*WalletMock) CreateFromSeed added in v0.2.0

func (m *WalletMock) CreateFromSeed(ctx context.Context, req *CreateRequest) (*LoadResponse, error)

func (*WalletMock) CreateWallet added in v0.2.0

func (m *WalletMock) CreateWallet(ctx context.Context, req *CreateRequest) (*LoadResponse, error)

func (*WalletMock) GetAddress added in v0.2.0

func (m *WalletMock) GetAddress(ctx context.Context, req *EmptyRequest) (*LoadResponse, error)

func (*WalletMock) GetBalance added in v0.2.0

func (m *WalletMock) GetBalance(ctx context.Context, req *EmptyRequest) (*BalanceResponse, error)

func (*WalletMock) GetTxHistory added in v0.2.0

func (m *WalletMock) GetTxHistory(ctx context.Context, req *EmptyRequest) (*TxHistoryResponse, error)

func (*WalletMock) GetWalletStatus added in v0.2.0

func (m *WalletMock) GetWalletStatus(ctx context.Context, req *EmptyRequest) (*WalletStatusResponse, error)

func (*WalletMock) LoadWallet added in v0.2.0

func (m *WalletMock) LoadWallet(ctx context.Context, req *LoadRequest) (*LoadResponse, error)

type WalletServer added in v0.2.0

WalletServer is the server API for Wallet service.

type WalletStatusResponse

type WalletStatusResponse struct {
	Loaded bool `protobuf:"varint,1,opt,name=loaded,proto3" json:"loaded,omitempty"`
	// contains filtered or unexported fields
}

func (*WalletStatusResponse) Descriptor deprecated

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

Deprecated: Use WalletStatusResponse.ProtoReflect.Descriptor instead.

func (*WalletStatusResponse) GetLoaded

func (x *WalletStatusResponse) GetLoaded() bool

func (*WalletStatusResponse) ProtoMessage

func (*WalletStatusResponse) ProtoMessage()

func (*WalletStatusResponse) ProtoReflect added in v0.2.0

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

func (*WalletStatusResponse) Reset

func (x *WalletStatusResponse) Reset()

func (*WalletStatusResponse) String

func (x *WalletStatusResponse) String() string

Jump to

Keyboard shortcuts

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