Cip30Wallet

Implementation of Wallet that lets you connect to a browser plugin wallet.

Constructor

Constructs Cip30Wallet using the Cip30Handle which is available in the browser window.cardano context.

const handle: helios.Cip30Handle = await window.cardano.eternl.enable()

const wallet = new helios.Cip30Wallet(handle)

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 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>