Wallet

An interface type for a wallet that manages a user's UTxOs and addresses. Notably implemented by Cip30Wallet and WalletEmulator.

Getters

usedAddresses

Gets a list of addresses which already contain UTxOs.

wallet.usedAddresses: Promise<helios.Address[]>

unusedAddresses

Gets a list of unique unused addresses which can be used to send UTxOs to.

wallet.unusedAddresses: Promise<helios.Address[]>

utxos

Gets the complete list of UTxOs sitting at the addresses owned by the wallet.

wallet.utxos: Promise<helios.UTxO[]>

Methods

isMainnet

Returns true if the wallet is connected to the mainnet.

wallet.isMainnet(): Promise<boolean>

signTx

Signs a transaction, returning a list of signatures needed for submitting a valid transaction.

wallet.signTx(tx: helios.Tx): Promise<helios.Signature[]>

submitTx

Submits a transaction to the blockchain. Returns the TxId.

wallet.submitTx(tx: helios.Tx): Promise<helios.TxId>