wallet

package
v0.0.0-...-97165cf Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package wallet provides a JSON-RPC 2.0 client for the Mintlayer wallet daemon (wallet-rpc-daemon, default mainnet port 3034, testnet port 13034).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	Account uint32 `json:"account"`
	Name    string `json:"name"`
}

AccountInfo is returned by CreateAccount.

type AddressWithUsage

type AddressWithUsage struct {
	Address string `json:"address"`
	Used    bool   `json:"used"`
	Coins   Amount `json:"coins"`
}

AddressWithUsage is one entry from ShowReceiveAddresses.

type Amount

type Amount struct {
	Atoms   string `json:"atoms,omitempty"`
	Decimal string `json:"decimal,omitempty"`
}

Amount represents a coin or token amount. At least one of Atoms or Decimal must be set. The daemon accepts either field; responses always include both.

type Balance

type Balance struct {
	Coins  Amount            `json:"coins"`
	Tokens map[string]Amount `json:"tokens"`
}

Balance is returned by GetBalance.

type BestBlock

type BestBlock struct {
	Height uint64 `json:"height"`
	ID     string `json:"id"`
}

BestBlock is returned by BestBlock.

type ChangeAuthorityParams

type ChangeAuthorityParams struct {
	Account uint32    `json:"account"`
	TokenID string    `json:"token_id"`
	Address string    `json:"address"`
	Options TxOptions `json:"options"`
}

ChangeAuthorityParams is the parameter block for ChangeTokenAuthority.

type Client

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

Client is a JSON-RPC 2.0 client for the Mintlayer wallet daemon.

func New

func New(endpoint string, opts ...Option) *Client

New creates a Client targeting endpoint (e.g. "http://127.0.0.1:3034").

func (*Client) AbandonTransaction

func (c *Client) AbandonTransaction(ctx context.Context, account uint32, txID string) error

AbandonTransaction abandons an unconfirmed transaction, releasing its inputs for reuse.

func (*Client) AddressSend

func (c *Client) AddressSend(ctx context.Context, params SendParams) (*SendResult, error)

AddressSend sends coins to an address. Fees are calculated automatically.

func (*Client) BestBlock

func (c *Client) BestBlock(ctx context.Context) (*BestBlock, error)

BestBlock returns the best block the wallet is currently synced to.

func (*Client) ChangeTokenAuthority

func (c *Client) ChangeTokenAuthority(ctx context.Context, params ChangeAuthorityParams) (*SendResult, error)

ChangeTokenAuthority transfers the authority address to a new key.

func (*Client) CloseWallet

func (c *Client) CloseWallet(ctx context.Context) error

CloseWallet closes the currently open wallet.

func (*Client) ComposeTransaction

func (c *Client) ComposeTransaction(ctx context.Context, params ComposeParams) (*ComposedTx, error)

ComposeTransaction composes a raw transaction from explicit inputs and outputs without signing it. Returns a hex-encoded PartiallySignedTransaction that can be passed to SignRawTransaction.

func (*Client) CreateAccount

func (c *Client) CreateAccount(ctx context.Context, name string) (*AccountInfo, error)

CreateAccount creates a new account. Fails if the last account has no transaction history.

func (*Client) CreateDelegation

func (c *Client) CreateDelegation(ctx context.Context, params CreateDelegationParams) (*CreateDelegationResult, error)

CreateDelegation creates a delegation to a pool. The Address in params is the owner — the key authorized to withdraw from the delegation.

func (*Client) CreateStakePool

func (c *Client) CreateStakePool(ctx context.Context, params CreatePoolParams) (*SendResult, error)

CreateStakePool creates a new staking pool. The pool can produce blocks and accept delegations.

func (*Client) CreateWallet

func (c *Client) CreateWallet(ctx context.Context, params CreateWalletParams) (*CreateWalletResult, error)

CreateWallet creates a new wallet file at the given path. If no mnemonic is supplied in params, the daemon generates one and returns it in the result.

func (*Client) DecommissionStakePool

func (c *Client) DecommissionStakePool(ctx context.Context, params DecommissionParams) (*SendResult, error)

DecommissionStakePool decommissions a pool whose decommission key is held by this wallet. Returns the pledge and rewards to OutputAddress in params.

func (*Client) DelegateStaking

func (c *Client) DelegateStaking(ctx context.Context, params DelegateParams) (*SendResult, error)

DelegateStaking sends coins to a delegation id to begin staking them.

func (*Client) DepositData

func (c *Client) DepositData(ctx context.Context, account uint32, dataHex string) (*SendResult, error)

DepositData stores arbitrary data on the blockchain as a hex-encoded byte string. Note: this incurs a higher-than-normal fee.

func (*Client) EncryptPrivateKeys

func (c *Client) EncryptPrivateKeys(ctx context.Context, password string) error

EncryptPrivateKeys encrypts the wallet's private keys with a password.

func (*Client) FreezeToken

func (c *Client) FreezeToken(ctx context.Context, params FreezeParams) (*SendResult, error)

FreezeToken freezes a token, blocking all operations. Requires the token to have been issued with IsFreezable: true.

func (*Client) GetBalance

func (c *Client) GetBalance(ctx context.Context, account uint32) (*Balance, error)

GetBalance returns the confirmed coin and token balances for an account.

func (*Client) GetPoolBalance

func (c *Client) GetPoolBalance(ctx context.Context, account uint32, poolID string) (*Amount, error)

GetPoolBalance returns the current balance of a specific staking pool. The account parameter is accepted for API consistency but not forwarded to the daemon.

func (*Client) GetStakingStatus

func (c *Client) GetStakingStatus(ctx context.Context, account uint32) (*StakingStatus, error)

GetStakingStatus returns whether staking is currently active for the account. Returns StakingStatusActive ("Staking") or StakingStatusInactive ("NotStaking").

func (*Client) GetTransaction

func (c *Client) GetTransaction(ctx context.Context, account uint32, txID string) (json.RawMessage, error)

GetTransaction returns a transaction from the wallet as raw JSON.

func (*Client) GetWalletInfo

func (c *Client) GetWalletInfo(ctx context.Context) (*WalletInfo, error)

GetWalletInfo returns information about the open wallet: id, account names, and wallet type.

func (*Client) InspectTransaction

func (c *Client) InspectTransaction(ctx context.Context, txHex string) (*TxInspection, error)

InspectTransaction inspects a raw transaction hex — shows inputs, outputs, fees, and signature status without broadcasting.

func (*Client) IssueNFT

func (c *Client) IssueNFT(ctx context.Context, params IssueNFTParams) (*IssueTokenResult, error)

IssueNFT issues a non-fungible token. The NFT is immediately sent to DestinationAddress and cannot be minted again.

func (*Client) IssueToken

func (c *Client) IssueToken(ctx context.Context, params IssueTokenParams) (*IssueTokenResult, error)

IssueToken issues a new fungible token. After issuance, tokens must be minted before they can be transferred.

func (*Client) ListDelegations

func (c *Client) ListDelegations(ctx context.Context, account uint32) ([]DelegationInfo, error)

ListDelegations lists delegation ids controlled by the account with their pool and balance.

func (*Client) ListOwnedPools

func (c *Client) ListOwnedPools(ctx context.Context, account uint32) ([]OwnedPool, error)

ListOwnedPools lists all pools whose staking key is controlled by the account.

func (*Client) ListPendingTransactions

func (c *Client) ListPendingTransactions(ctx context.Context, account uint32) ([]string, error)

ListPendingTransactions lists pending (unconfirmed) transaction ids that can be abandoned.

func (*Client) ListTransactionsByAddress

func (c *Client) ListTransactionsByAddress(ctx context.Context, account uint32, address *string, limit uint32) ([]WalletTx, error)

ListTransactionsByAddress lists confirmed transactions for an account, optionally filtered by address. Pass a nil address to list all transactions. limit controls the maximum number of results.

func (*Client) LockPrivateKeys

func (c *Client) LockPrivateKeys(ctx context.Context) error

LockPrivateKeys locks the wallet, preventing private key usage until unlocked again.

func (*Client) LockTokenSupply

func (c *Client) LockTokenSupply(ctx context.Context, params LockSupplyParams) (*SendResult, error)

LockTokenSupply permanently locks the token supply at the current circulating amount. This is irreversible and only available for tokens issued with Lockable supply. Note: params uses AccountIndex (not Account) to match the wire format.

func (*Client) MintTokens

func (c *Client) MintTokens(ctx context.Context, params MintParams) (*SendResult, error)

MintTokens mints tokens into the circulating supply. The authority key must be held by the selected account.

func (*Client) NewAddress

func (c *Client) NewAddress(ctx context.Context, account uint32) (string, error)

NewAddress generates a new unused receive address for the account.

func (*Client) OpenWallet

func (c *Client) OpenWallet(ctx context.Context, path, password string) error

OpenWallet opens an existing wallet file. Pass an empty password for unencrypted wallets.

func (*Client) RecoverWallet

func (c *Client) RecoverWallet(ctx context.Context, params RecoverWalletParams) error

RecoverWallet restores a wallet from a BIP-39 mnemonic phrase.

func (*Client) RenameAccount

func (c *Client) RenameAccount(ctx context.Context, account uint32, name string) error

RenameAccount renames an account. Pass an empty name to remove the name.

func (*Client) RescanWallet

func (c *Client) RescanWallet(ctx context.Context) error

RescanWallet rescans the entire blockchain from genesis.

func (*Client) RevealPublicKey

func (c *Client) RevealPublicKey(ctx context.Context, account uint32, address string) (string, error)

RevealPublicKey reveals the public key hex behind a given address.

func (*Client) SendToken

func (c *Client) SendToken(ctx context.Context, params TokenSendParams) (*SendResult, error)

SendToken sends a token amount to an address. Fees are paid in TML. This is an alias for TokenSend in the transactions module; both call token_send.

func (*Client) ShowReceiveAddresses

func (c *Client) ShowReceiveAddresses(ctx context.Context, account uint32) ([]AddressWithUsage, error)

ShowReceiveAddresses lists receive addresses for the account with their usage state and balance.

func (*Client) SignRawTransaction

func (c *Client) SignRawTransaction(ctx context.Context, account uint32, rawTx string) (*SignedTx, error)

SignRawTransaction signs a hex-encoded transaction or PartiallySignedTransaction. Used for multisig and cold wallet workflows.

func (*Client) SpendUTXO

func (c *Client) SpendUTXO(ctx context.Context, params UTXOSpendParams) (*SendResult, error)

SpendUTXO spends a specific UTXO, moving its funds to an address.

func (*Client) StartStaking

func (c *Client) StartStaking(ctx context.Context, account uint32) error

StartStaking starts producing blocks with the pools in the selected account.

func (*Client) StopStaking

func (c *Client) StopStaking(ctx context.Context, account uint32) error

StopStaking stops block production. Does not affect pools or delegations.

func (*Client) SubmitTransaction

func (c *Client) SubmitTransaction(ctx context.Context, txHex string, doNotStore bool) (*SubmitResult, error)

SubmitTransaction submits a fully signed hex transaction to the mempool and broadcasts it. Set doNotStore to true to skip storing the transaction in the wallet database.

func (*Client) SweepSpendable

func (c *Client) SweepSpendable(ctx context.Context, params SweepParams) (*SendResult, error)

SweepSpendable sweeps all spendable coins and tokens from one or more addresses to a destination. Set All to true to sweep all addresses in the account; otherwise list source addresses in FromAddresses.

func (*Client) SyncWallet

func (c *Client) SyncWallet(ctx context.Context) error

SyncWallet scans remaining blocks from the node until the chain tip.

func (*Client) TokenSend

func (c *Client) TokenSend(ctx context.Context, params TokenSendParams) (*SendResult, error)

TokenSend sends a token amount to an address. Fees are paid in TML.

func (*Client) UnfreezeToken

func (c *Client) UnfreezeToken(ctx context.Context, params UnfreezeParams) (*SendResult, error)

UnfreezeToken unfreezes a token. Only possible if frozen with IsUnfreezable: true.

func (*Client) UnlockPrivateKeys

func (c *Client) UnlockPrivateKeys(ctx context.Context, password string) error

UnlockPrivateKeys unlocks an encrypted wallet for use.

func (*Client) UnmintTokens

func (c *Client) UnmintTokens(ctx context.Context, params UnmintParams) (*SendResult, error)

UnmintTokens unmints tokens, reducing the circulating supply. The wallet must hold both the tokens and the authority key.

func (*Client) WithdrawFromDelegation

func (c *Client) WithdrawFromDelegation(ctx context.Context, params WithdrawParams) (*SendResult, error)

WithdrawFromDelegation withdraws coins from a delegation. Withdrawn coins have a lock period before they become spendable.

type ComposeParams

type ComposeParams struct {
	Inputs          []Outpoint        `json:"inputs"`
	Outputs         []json.RawMessage `json:"outputs"`
	HTLCSecrets     *json.RawMessage  `json:"htlc_secrets"`
	OnlyTransaction bool              `json:"only_transaction"`
}

ComposeParams is the parameter block for ComposeTransaction.

type ComposedTx

type ComposedTx struct {
	// Hex is the hex-encoded PartiallySignedTransaction.
	Hex  string        `json:"hex"`
	Fees FeesBreakdown `json:"fees"`
}

ComposedTx is returned by ComposeTransaction.

type CreateDelegationParams

type CreateDelegationParams struct {
	Account uint32    `json:"account"`
	Address string    `json:"address"`
	PoolID  string    `json:"pool_id"`
	Options TxOptions `json:"options"`
}

CreateDelegationParams is the parameter block for CreateDelegation.

type CreateDelegationResult

type CreateDelegationResult struct {
	DelegationID string `json:"delegation_id"`
	TxID         string `json:"tx_id"`
}

CreateDelegationResult is returned by CreateDelegation.

type CreatePoolParams

type CreatePoolParams struct {
	Account                uint32    `json:"account"`
	Amount                 Amount    `json:"amount"`
	CostPerBlock           Amount    `json:"cost_per_block"`
	MarginRatioPerThousand string    `json:"margin_ratio_per_thousand"`
	DecommissionAddress    string    `json:"decommission_address"`
	StakerAddress          *string   `json:"staker_address"`
	VRFPublicKey           *string   `json:"vrf_public_key"`
	Options                TxOptions `json:"options"`
}

CreatePoolParams is the parameter block for CreateStakePool.

type CreateWalletParams

type CreateWalletParams struct {
	Path            string  `json:"path"`
	StoreSeedPhrase bool    `json:"store_seed_phrase"`
	Mnemonic        *string `json:"mnemonic"`
	Passphrase      *string `json:"passphrase"`
	HardwareWallet  *string `json:"hardware_wallet"`
}

CreateWalletParams is the parameter block for CreateWallet.

type CreateWalletResult

type CreateWalletResult struct {
	Mnemonic *MnemonicResult `json:"mnemonic,omitempty"`
}

CreateWalletResult is returned by CreateWallet.

type DecommissionParams

type DecommissionParams struct {
	Account       uint32    `json:"account"`
	PoolID        string    `json:"pool_id"`
	OutputAddress string    `json:"output_address"`
	Options       TxOptions `json:"options"`
}

DecommissionParams is the parameter block for DecommissionStakePool.

type DelegateParams

type DelegateParams struct {
	Account      uint32    `json:"account"`
	Amount       Amount    `json:"amount"`
	DelegationID string    `json:"delegation_id"`
	Options      TxOptions `json:"options"`
}

DelegateParams is the parameter block for DelegateStaking.

type DelegationInfo

type DelegationInfo struct {
	DelegationID string `json:"delegation_id"`
	PoolID       string `json:"pool_id"`
	Balance      Amount `json:"balance"`
}

DelegationInfo is one entry from ListDelegations.

type FeesBreakdown

type FeesBreakdown struct {
	Coins  Amount            `json:"coins"`
	Tokens map[string]Amount `json:"tokens"`
}

FeesBreakdown contains the fees paid by a transaction, split by coin and token.

type FreezeParams

type FreezeParams struct {
	Account       uint32    `json:"account"`
	TokenID       string    `json:"token_id"`
	IsUnfreezable bool      `json:"is_unfreezable"`
	Options       TxOptions `json:"options"`
}

FreezeParams is the parameter block for FreezeToken.

type IssueNFTParams

type IssueNFTParams struct {
	Account            uint32      `json:"account"`
	DestinationAddress string      `json:"destination_address"`
	Metadata           NFTMetadata `json:"metadata"`
	Options            TxOptions   `json:"options"`
}

IssueNFTParams is the parameter block for IssueNFT.

type IssueTokenParams

type IssueTokenParams struct {
	Account            uint32        `json:"account"`
	DestinationAddress string        `json:"destination_address"`
	Metadata           TokenMetadata `json:"metadata"`
	Options            TxOptions     `json:"options"`
}

IssueTokenParams is the parameter block for IssueToken.

type IssueTokenResult

type IssueTokenResult struct {
	TokenID string `json:"token_id"`
	TxID    string `json:"tx_id"`
}

IssueTokenResult is returned by IssueToken and IssueNFT.

type LockSupplyParams

type LockSupplyParams struct {
	AccountIndex uint32    `json:"account_index"`
	TokenID      string    `json:"token_id"`
	Options      TxOptions `json:"options"`
}

LockSupplyParams is the parameter block for LockTokenSupply. Note: the wire field is account_index, not account.

type MintParams

type MintParams struct {
	Account uint32    `json:"account"`
	TokenID string    `json:"token_id"`
	Address string    `json:"address"`
	Amount  Amount    `json:"amount"`
	Options TxOptions `json:"options"`
}

MintParams is the parameter block for MintTokens.

type MnemonicContent

type MnemonicContent struct {
	Mnemonic string `json:"mnemonic"`
}

MnemonicContent holds a BIP-39 mnemonic phrase.

type MnemonicResult

type MnemonicResult struct {
	Type    string           `json:"type"`
	Content *MnemonicContent `json:"content,omitempty"`
}

MnemonicResult is the mnemonic field in CreateWalletResult. Type is "NewlyGenerated" when the daemon generated the mnemonic, or "UserProvided" when the caller supplied it.

type NFTMetadata

type NFTMetadata struct {
	MediaHash             string  `json:"media_hash"`
	Name                  string  `json:"name"`
	Description           string  `json:"description"`
	Ticker                string  `json:"ticker"`
	Creator               *string `json:"creator"`
	IconURI               *string `json:"icon_uri"`
	MediaURI              *string `json:"media_uri"`
	AdditionalMetadataURI *string `json:"additional_metadata_uri"`
}

NFTMetadata describes an NFT at issuance time.

type Option

type Option func(*Client)

Option configures a Client.

func WithBasicAuth

func WithBasicAuth(user, pass string) Option

WithBasicAuth configures HTTP Basic Authentication credentials.

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

WithHTTPClient replaces the default HTTP client.

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets a per-request timeout on the default HTTP client. Cannot be combined with WithHTTPClient — the last option applied wins.

type Outpoint

type Outpoint struct {
	SourceID OutpointSourceID `json:"source_id"`
	Index    uint32           `json:"index"`
}

Outpoint identifies a specific output within a transaction or block reward.

type OutpointSourceID

type OutpointSourceID struct {
	Type    string          `json:"type"`    // "Transaction" or "BlockReward"
	Content json.RawMessage `json:"content"` // {"tx_id":"hex"} or {"block_id":"hex"}
}

OutpointSourceID identifies the transaction or block reward that produced a UTXO.

type OwnedPool

type OwnedPool struct {
	PoolID                 string `json:"pool_id"`
	Pledge                 Amount `json:"pledge"`
	Balance                Amount `json:"balance"`
	MarginRatioPerThousand string `json:"margin_ratio_per_thousand"`
	CostPerBlock           Amount `json:"cost_per_block"`
}

OwnedPool is one entry from ListOwnedPools.

type RPCError

type RPCError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

RPCError is returned when the wallet daemon replies with a JSON-RPC error object.

func (*RPCError) Error

func (e *RPCError) Error() string

type RecoverWalletParams

type RecoverWalletParams struct {
	Path            string  `json:"path"`
	StoreSeedPhrase bool    `json:"store_seed_phrase"`
	Mnemonic        string  `json:"mnemonic"`
	Passphrase      *string `json:"passphrase"`
	HardwareWallet  *string `json:"hardware_wallet"`
}

RecoverWalletParams is the parameter block for RecoverWallet.

type RevealPublicKeyResult

type RevealPublicKeyResult struct {
	PublicKeyHex     string `json:"public_key_hex"`
	PublicKeyAddress string `json:"public_key_address"`
}

RevealPublicKeyResult is returned by RevealPublicKey.

type SendParams

type SendParams struct {
	Account       uint32     `json:"account"`
	Address       string     `json:"address"`
	Amount        Amount     `json:"amount"`
	SelectedUTXOs []Outpoint `json:"selected_utxos"`
	Options       TxOptions  `json:"options"`
}

SendParams is the parameter block for AddressSend.

type SendResult

type SendResult struct {
	TxID        string        `json:"tx_id"`
	Fees        FeesBreakdown `json:"fees"`
	Broadcasted bool          `json:"broadcasted"`
}

SendResult is returned by transaction-sending methods.

type SignedTx

type SignedTx struct {
	// Hex is the hex-encoded (partially or fully) signed transaction.
	Hex               string          `json:"hex"`
	CurrentSignatures json.RawMessage `json:"current_signatures"`
}

SignedTx is returned by SignRawTransaction.

type StakingStatus

type StakingStatus string

StakingStatus is returned by GetStakingStatus. Possible values: "Staking", "NotStaking".

const (
	StakingStatusActive   StakingStatus = "Staking"
	StakingStatusInactive StakingStatus = "NotStaking"
)

type SubmitResult

type SubmitResult struct {
	TxID string `json:"tx_id"`
}

SubmitResult is returned by SubmitTransaction.

type SweepParams

type SweepParams struct {
	Account            uint32    `json:"account"`
	DestinationAddress string    `json:"destination_address"`
	FromAddresses      []string  `json:"from_addresses"`
	All                bool      `json:"all"`
	Options            TxOptions `json:"options"`
}

SweepParams is the parameter block for SweepSpendable.

type Timestamp

type Timestamp struct {
	Timestamp int64 `json:"timestamp"`
}

Timestamp wraps a Unix seconds timestamp.

type TokenMetadata

type TokenMetadata struct {
	TokenTicker      string      `json:"token_ticker"`
	NumberOfDecimals uint8       `json:"number_of_decimals"`
	MetadataURI      string      `json:"metadata_uri"`
	TokenSupply      TokenSupply `json:"token_supply"`
	IsFreezable      bool        `json:"is_freezable"`
}

TokenMetadata describes a fungible token at issuance time.

type TokenSendParams

type TokenSendParams struct {
	Account uint32    `json:"account"`
	TokenID string    `json:"token_id"`
	Address string    `json:"address"`
	Amount  Amount    `json:"amount"`
	Options TxOptions `json:"options"`
}

TokenSendParams is the parameter block for SendToken (and TokenSend in transactions).

type TokenSupply

type TokenSupply struct {
	Type    string  `json:"type"`
	Content *Amount `json:"content,omitempty"`
}

TokenSupply describes the supply policy of a fungible token. Type is one of "Fixed", "Lockable", "Unlimited". Content is only set for "Fixed" supply (holds the maximum amount).

type TxInspection

type TxInspection struct {
	Stats TxStats        `json:"stats"`
	Fees  *FeesBreakdown `json:"fees,omitempty"`
}

TxInspection is returned by InspectTransaction.

type TxOptions

type TxOptions struct {
	// InTopXMb targets the transaction to be in the top X MB of the mempool priority queue.
	InTopXMb *uint32 `json:"in_top_x_mb"`
	// BroadcastToMempool controls whether to broadcast immediately (default: true).
	BroadcastToMempool *bool `json:"broadcast_to_mempool"`
}

TxOptions controls fee priority and broadcasting behaviour for transaction methods.

type TxStats

type TxStats struct {
	NumInputs       uint32 `json:"num_inputs"`
	TotalSignatures uint32 `json:"total_signatures"`
}

TxStats holds aggregate statistics about a transaction's inputs and signatures.

type UTXOSpendParams

type UTXOSpendParams struct {
	Account       uint32    `json:"account"`
	UTXO          Outpoint  `json:"utxo"`
	OutputAddress string    `json:"output_address"`
	HTLCSecret    *string   `json:"htlc_secret"`
	Options       TxOptions `json:"options"`
}

UTXOSpendParams is the parameter block for SpendUTXO.

type UnfreezeParams

type UnfreezeParams struct {
	Account uint32    `json:"account"`
	TokenID string    `json:"token_id"`
	Options TxOptions `json:"options"`
}

UnfreezeParams is the parameter block for UnfreezeToken.

type UnmintParams

type UnmintParams struct {
	Account uint32    `json:"account"`
	TokenID string    `json:"token_id"`
	Amount  Amount    `json:"amount"`
	Options TxOptions `json:"options"`
}

UnmintParams is the parameter block for UnmintTokens.

type WalletExtraInfo

type WalletExtraInfo struct {
	// Type is one of "SoftwareWallet", "TrezorWallet", "LedgerWallet".
	Type string `json:"type"`
}

WalletExtraInfo contains hardware wallet type information.

type WalletInfo

type WalletInfo struct {
	WalletID     string          `json:"wallet_id"`
	AccountNames []string        `json:"account_names"`
	ExtraInfo    WalletExtraInfo `json:"extra_info"`
}

WalletInfo is returned by GetWalletInfo.

type WalletTx

type WalletTx struct {
	ID        string    `json:"id"`
	Height    uint64    `json:"height"`
	Timestamp Timestamp `json:"timestamp"`
}

WalletTx is one entry from ListTransactionsByAddress.

type WithdrawParams

type WithdrawParams struct {
	Account      uint32    `json:"account"`
	Address      string    `json:"address"`
	Amount       Amount    `json:"amount"`
	DelegationID string    `json:"delegation_id"`
	Options      TxOptions `json:"options"`
}

WithdrawParams is the parameter block for WithdrawFromDelegation.

Jump to

Keyboard shortcuts

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