Versions in this module Expand all Collapse all v0 v0.4.0 Apr 4, 2024 Changes in this version + type RpcClient interface + GetBill func(ctx context.Context, unitID types.UnitID, includeStateProof bool) (*api.Bill, error) + GetBlock func(ctx context.Context, roundNumber uint64) (*types.Block, error) + GetFeeCreditRecord func(ctx context.Context, unitID types.UnitID, includeStateProof bool) (*api.FeeCreditBill, error) + GetRoundNumber func(ctx context.Context) (uint64, error) + GetTransactionProof func(ctx context.Context, txHash types.Bytes) (*types.TransactionRecord, *types.TxProof, error) + GetUnitsByOwnerID func(ctx context.Context, ownerID types.Bytes) ([]types.UnitID, error) + SendTransaction func(ctx context.Context, tx *types.TransactionOrder) ([]byte, error) v0.3.0 Feb 28, 2024 Changes in this version + func CreateNewWallet(am account.Manager, mnemonic string) error + func FeeCreditRecordIDFormPublicKey(shardPart, pubKey []byte) types.UnitID + type BackendAPI interface + GetBalance func(ctx context.Context, pubKey []byte, includeDCBills bool) (uint64, error) + GetBills func(ctx context.Context, pubKey []byte) ([]*wallet.Bill, error) + GetFeeCreditBill func(ctx context.Context, unitID types.UnitID) (*wallet.Bill, error) + GetRoundNumber func(ctx context.Context) (*wallet.RoundNumber, error) + GetTxProof func(ctx context.Context, unitID types.UnitID, txHash wallet.TxHash) (*wallet.Proof, error) + ListBills func(ctx context.Context, pubKey []byte, includeDCBills bool, offsetKey string, ...) (*backend.ListBillsResponse, error) + PostTransactions func(ctx context.Context, pubKey wallet.PubKey, txs *wallet.Transactions) error + type DustCollectionResult struct + AccountIndex uint64 + DustCollectionResult *dc.DustCollectionResult + type GetBalanceCmd struct + AccountIndex uint64 + CountDCBills bool + type ReceiverData struct + Amount uint64 + PubKey []byte + type SendCmd struct + AccountIndex uint64 + Receivers []ReceiverData + WaitForConfirmation bool + type TxPublisher struct + func NewTxPublisher(backend BackendAPI, log *slog.Logger) *TxPublisher + func (w *TxPublisher) Close() + func (w *TxPublisher) SendTx(ctx context.Context, tx *types.TransactionOrder, senderPubKey []byte) (*wallet.Proof, error) + type UnitLocker interface + Close func() error + GetUnit func(accountID, unitID []byte) (*unitlock.LockedUnit, error) + GetUnits func(accountID []byte) ([]*unitlock.LockedUnit, error) + LockUnit func(lockedBill *unitlock.LockedUnit) error + UnlockUnit func(accountID, unitID []byte) error + type Wallet struct + TxPublisher *TxPublisher + func LoadExistingWallet(am account.Manager, unitLocker UnitLocker, feeManagerDB fees.FeeManagerDB, ...) (*Wallet, error) + func (w *Wallet) AddFeeCredit(ctx context.Context, cmd fees.AddFeeCmd) (*fees.AddFeeCmdResponse, error) + func (w *Wallet) Close() + func (w *Wallet) CollectDust(ctx context.Context, accountNumber uint64) ([]*DustCollectionResult, error) + func (w *Wallet) GetAccountManager() account.Manager + func (w *Wallet) GetBalance(ctx context.Context, cmd GetBalanceCmd) (uint64, error) + func (w *Wallet) GetBalances(ctx context.Context, cmd GetBalanceCmd) ([]uint64, uint64, error) + func (w *Wallet) GetFeeCredit(ctx context.Context, cmd fees.GetFeeCreditCmd) (*wallet.Bill, error) + func (w *Wallet) GetFeeCreditBill(ctx context.Context, unitID types.UnitID) (*wallet.Bill, error) + func (w *Wallet) GetRoundNumber(ctx context.Context) (*wallet.RoundNumber, error) + func (w *Wallet) ReclaimFeeCredit(ctx context.Context, cmd fees.ReclaimFeeCmd) (*fees.ReclaimFeeCmdResponse, error) + func (w *Wallet) Send(ctx context.Context, cmd SendCmd) ([]*wallet.Proof, error) + func (w *Wallet) SendTx(ctx context.Context, tx *types.TransactionOrder, senderPubKey []byte) (*wallet.Proof, error) + func (w *Wallet) SystemID() types.SystemID