Documentation
¶
Index ¶
- func DecodeAddressToPublicKey(in []byte) (*keys.StealthAddress, error)
- type Transactor
- func (t *Transactor) Bid(ctx context.Context, c *node.BidRequest) (*node.TransactionResponse, error)
- func (t *Transactor) CallContract(ctx context.Context, c *node.CallContractRequest) (*node.TransactionResponse, error)
- func (t *Transactor) ClearWalletDatabase(ctx context.Context, e *node.EmptyRequest) (*node.GenericResponse, error)
- func (t *Transactor) GetAddress(ctx context.Context, e *node.EmptyRequest) (*node.LoadResponse, error)
- func (t *Transactor) GetBalance(ctx context.Context, e *node.EmptyRequest) (*node.BalanceResponse, error)
- func (t *Transactor) GetTxHistory(ctx context.Context, e *node.EmptyRequest) (*node.TxHistoryResponse, error)
- func (t *Transactor) Listen()
- func (t *Transactor) Stake(ctx context.Context, c *node.StakeRequest) (*node.TransactionResponse, error)
- func (t *Transactor) Transfer(ctx context.Context, tr *node.TransferRequest) (*node.TransactionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAddressToPublicKey ¶ added in v0.4.0
func DecodeAddressToPublicKey(in []byte) (*keys.StealthAddress, error)
DecodeAddressToPublicKey will decode a []byte to rusk.PublicKey.
Types ¶
type Transactor ¶
type Transactor struct {
// contains filtered or unexported fields
}
Transactor is the implementation of both the Waller and the Transactor GRPC servers.
func New ¶
func New(eb *eventbus.EventBus, rb *rpcbus.RPCBus, db database.DB, srv *grpc.Server, proxy transactions.Proxy, w *wallet.Wallet, getSyncProgress func() float64) (*Transactor, error)
New Instantiate a new Transactor struct.
func (*Transactor) Bid ¶ added in v0.4.0
func (t *Transactor) Bid(ctx context.Context, c *node.BidRequest) (*node.TransactionResponse, error)
Bid will create a bidding transaction.
func (*Transactor) CallContract ¶ added in v0.4.0
func (t *Transactor) CallContract(ctx context.Context, c *node.CallContractRequest) (*node.TransactionResponse, error)
CallContract will create a transaction that calls a smart contract.
func (*Transactor) ClearWalletDatabase ¶ added in v0.4.0
func (t *Transactor) ClearWalletDatabase(ctx context.Context, e *node.EmptyRequest) (*node.GenericResponse, error)
ClearWalletDatabase clears the wallet database, containing the unspent outputs.
func (*Transactor) GetAddress ¶ added in v0.4.0
func (t *Transactor) GetAddress(ctx context.Context, e *node.EmptyRequest) (*node.LoadResponse, error)
GetAddress returns the address of the loaded wallet.
func (*Transactor) GetBalance ¶ added in v0.4.0
func (t *Transactor) GetBalance(ctx context.Context, e *node.EmptyRequest) (*node.BalanceResponse, error)
GetBalance returns the balance of the loaded wallet.
func (*Transactor) GetTxHistory ¶ added in v0.4.0
func (t *Transactor) GetTxHistory(ctx context.Context, e *node.EmptyRequest) (*node.TxHistoryResponse, error)
GetTxHistory will return a subset of the transactions that were sent and received.
func (*Transactor) Listen ¶
func (t *Transactor) Listen()
Listen to the stake and bid channels and trigger a stake and bid transaction requests.
func (*Transactor) Stake ¶ added in v0.4.0
func (t *Transactor) Stake(ctx context.Context, c *node.StakeRequest) (*node.TransactionResponse, error)
Stake will create a staking transaction.
func (*Transactor) Transfer ¶ added in v0.4.0
func (t *Transactor) Transfer(ctx context.Context, tr *node.TransferRequest) (*node.TransactionResponse, error)
Transfer will create a normal transaction, transferring DUSK.