Helios API/ API Reference/ Classes/

Cip30Wallet

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

Implements

Implements

Index

Constructors

constructor

new Cip30Wallet(handle)

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)

Parameters

NameType
handleCip30Handle

Accessors

collateral

get collateral(): Promise<TxInput[]>

Returns

Promise<TxInput[]>

Implementation of

Wallet.collateral

rewardAddresses

get rewardAddresses(): Promise<StakeAddress[]>

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

Returns

Promise<StakeAddress[]>

Implementation of

Wallet.rewardAddresses

unusedAddresses

get unusedAddresses(): Promise<Address[]>

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

Returns

Promise<Address[]>

Implementation of

Wallet.unusedAddresses

usedAddresses

get usedAddresses(): Promise<Address[]>

Gets a list of addresses which contain(ed) UTxOs.

Returns

Promise<Address[]>

Implementation of

Wallet.usedAddresses

utxos

get utxos(): Promise<TxInput[]>

Gets the complete list of UTxOs (as TxInput instances) sitting at the addresses owned by the wallet.

Returns

Promise<TxInput[]>

Implementation of

Wallet.utxos

Methods

isMainnet

isMainnet(): Promise<boolean>

Returns true if the wallet is connected to the mainnet.

Returns

Promise<boolean>

Implementation of

Wallet.isMainnet

signData

signData(addr, sigStructure): Promise<{ key: string ; signature: string }>

Sign a data payload with the users wallet.

Parameters

NameTypeDescription
addrAddressA Cardano address object
sigStructurestringThe message to sign, in string format.

Returns

Promise<{ key: string ; signature: string }>

Implementation of

Wallet.signData

signTx

signTx(tx): Promise<Signature[]>

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

Parameters

NameType
txTx

Returns

Promise<Signature[]>

Implementation of

Wallet.signTx

submitTx

submitTx(tx): Promise<TxId>

Submits a transaction to the blockchain.

Parameters

NameType
txTx

Returns

Promise<TxId>

Implementation of

Wallet.submitTx