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
Name | Type |
---|---|
handle | Cip30Handle |
Accessors
collateral
• get
collateral(): Promise
<TxInput
[]>
Returns
Promise
<TxInput
[]>
Implementation of
rewardAddresses
• get
rewardAddresses(): Promise
<StakeAddress
[]>
Gets a list of unique reward addresses which can be used to UTxOs to.
Returns
Promise
<StakeAddress
[]>
Implementation of
unusedAddresses
• get
unusedAddresses(): Promise
<Address
[]>
Gets a list of unique unused addresses which can be used to UTxOs to.
Returns
Promise
<Address
[]>
Implementation of
usedAddresses
• get
usedAddresses(): Promise
<Address
[]>
Gets a list of addresses which contain(ed) UTxOs.
Returns
Promise
<Address
[]>
Implementation of
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
Methods
isMainnet
▸ isMainnet(): Promise
<boolean
>
Returns true
if the wallet is connected to the mainnet.
Returns
Promise
<boolean
>
Implementation of
signData
▸ signData(addr
, sigStructure
): Promise
<{ key
: string
; signature
: string
}>
Sign a data payload with the users wallet.
Parameters
Name | Type | Description |
---|---|---|
addr | Address | A Cardano address object |
sigStructure | string | The message to sign, in string format. |
Returns
Promise
<{ key
: string
; signature
: string
}>
Implementation of
signTx
▸ signTx(tx
): Promise
<Signature
[]>
Signs a transaction, returning a list of signatures needed for submitting a valid transaction.
Parameters
Name | Type |
---|---|
tx | Tx |
Returns
Promise
<Signature
[]>
Implementation of
submitTx
▸ submitTx(tx
): Promise
<TxId
>
Submits a transaction to the blockchain.
Parameters
Name | Type |
---|---|
tx | Tx |
Returns
Promise
<TxId
>