Helios API/ API Reference/ Classes/

SimpleWallet

This wallet only has a single private/public key, which isn't rotated. Staking is not yet supported.

Implements

Implements

Index

Constructors

constructor

new SimpleWallet(network, privateKey)

Parameters

NameType
networkNetwork
privateKeyBip32PrivateKey

Accessors

address

get address(): Address

Returns

Address

collateral

get collateral(): Promise<TxInput[]>

Returns

Promise<TxInput[]>

Implementation of

Wallet.collateral

privateKey

get privateKey(): Bip32PrivateKey

Returns

Bip32PrivateKey

pubKey

get pubKey(): PubKey

Returns

PubKey

pubKeyHash

get pubKeyHash(): PubKeyHash

Returns

PubKeyHash

rewardAddresses

get rewardAddresses(): Promise<StakeAddress[]>

Not yet implemented.

Returns

Promise<StakeAddress[]>

Implementation of

Wallet.rewardAddresses

unusedAddresses

get unusedAddresses(): Promise<Address[]>

Returns

Promise<Address[]>

Implementation of

Wallet.unusedAddresses

usedAddresses

get usedAddresses(): Promise<Address[]>

Assumed wallet was initiated with at least 1 UTxO at the pubkeyhash address.

Returns

Promise<Address[]>

Implementation of

Wallet.usedAddresses

utxos

get utxos(): Promise<TxInput[]>

Returns

Promise<TxInput[]>

Implementation of

Wallet.utxos

Methods

isMainnet

isMainnet(): Promise<boolean>

Returns

Promise<boolean>

Implementation of

Wallet.isMainnet

signData

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

Not yet implemented.

Parameters

NameType
addrAddress
messagestring

Returns

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

Implementation of

Wallet.signData

signTx

signTx(tx): Promise<Signature[]>

Simply assumed the tx needs to by signed by this wallet without checking.

Parameters

NameType
txTx

Returns

Promise<Signature[]>

Implementation of

Wallet.signTx

submitTx

submitTx(tx): Promise<TxId>

Parameters

NameType
txTx

Returns

Promise<TxId>

Implementation of

Wallet.submitTx