## Classes
Initializes the console error panic hook for better error messages
AddressGetter
](#AddressGetter)
* [.range(start, end)](#AddressGetter+range) ⇒ [AddressGetter
](#AddressGetter)
* [.bech32Hrp(bech32_hrp)](#AddressGetter+bech32Hrp) ⇒ [AddressGetter
](#AddressGetter)
* [.includeInternal()](#AddressGetter+includeInternal) ⇒ [AddressGetter
](#AddressGetter)
* [.get()](#AddressGetter+get) ⇒ Promise.<any>
* _static_
* [.new(client, seed)](#AddressGetter.new) ⇒ [AddressGetter
](#AddressGetter)
### addressGetter.accountIndex(index) ⇒ [AddressGetter
](#AddressGetter)
Set the account index
**Kind**: instance method of [AddressGetter
](#AddressGetter)
| Param | Type |
| --- | --- |
| index | number
|
### addressGetter.range(start, end) ⇒ [AddressGetter
](#AddressGetter)
Set the address range
**Kind**: instance method of [AddressGetter
](#AddressGetter)
| Param | Type |
| --- | --- |
| start | number
|
| end | number
|
### addressGetter.bech32Hrp(bech32_hrp) ⇒ [AddressGetter
](#AddressGetter)
Set the bech32 hrp
**Kind**: instance method of [AddressGetter
](#AddressGetter)
| Param | Type |
| --- | --- |
| bech32_hrp | string
|
### addressGetter.includeInternal() ⇒ [AddressGetter
](#AddressGetter)
Include internal addresses
**Kind**: instance method of [AddressGetter
](#AddressGetter)
### addressGetter.get() ⇒ Promise.<any>
Get the addresses.
**Kind**: instance method of [AddressGetter
](#AddressGetter)
### AddressGetter.new(client, seed) ⇒ [AddressGetter
](#AddressGetter)
**Kind**: static method of [AddressGetter
](#AddressGetter)
| Param | Type |
| --- | --- |
| client | [Client
](#Client) |
| seed | string
|
## BalanceGetter
**Kind**: global class
* [BalanceGetter](#BalanceGetter)
* _instance_
* [.accountIndex(index)](#BalanceGetter+accountIndex) ⇒ [BalanceGetter
](#BalanceGetter)
* [.initialAddressIndex(initial_address_index)](#BalanceGetter+initialAddressIndex) ⇒ [BalanceGetter
](#BalanceGetter)
* [.gap_limit(gap_limit)](#BalanceGetter+gap_limit) ⇒ [BalanceGetter
](#BalanceGetter)
* [.get()](#BalanceGetter+get) ⇒ Promise.<any>
* _static_
* [.new(client, seed)](#BalanceGetter.new) ⇒ [BalanceGetter
](#BalanceGetter)
### balanceGetter.accountIndex(index) ⇒ [BalanceGetter
](#BalanceGetter)
Sets the account index
**Kind**: instance method of [BalanceGetter
](#BalanceGetter)
| Param | Type |
| --- | --- |
| index | number
|
### balanceGetter.initialAddressIndex(initial_address_index) ⇒ [BalanceGetter
](#BalanceGetter)
Sets the address index from which to start looking for balance
**Kind**: instance method of [BalanceGetter
](#BalanceGetter)
| Param | Type |
| --- | --- |
| initial_address_index | number
|
### balanceGetter.gap\_limit(gap_limit) ⇒ [BalanceGetter
](#BalanceGetter)
Sets the gap limit to specify how many addresses will be checked each round.
If gap_limit amount of addresses in a row have no balance the function will return.
**Kind**: instance method of [BalanceGetter
](#BalanceGetter)
| Param | Type |
| --- | --- |
| gap_limit | number
|
### balanceGetter.get() ⇒ Promise.<any>
Get the balance.
**Kind**: instance method of [BalanceGetter
](#BalanceGetter)
### BalanceGetter.new(client, seed) ⇒ [BalanceGetter
](#BalanceGetter)
**Kind**: static method of [BalanceGetter
](#BalanceGetter)
| Param | Type |
| --- | --- |
| client | [Client
](#Client) |
| seed | string
|
## Client
**Kind**: global class
* [Client](#Client)
* [.message()](#Client+message) ⇒ [MessageBuilder
](#MessageBuilder)
* [.getMessage()](#Client+getMessage) ⇒ [MessageGetter
](#MessageGetter)
* [.getAddresses(seed)](#Client+getAddresses) ⇒ [AddressGetter
](#AddressGetter)
* [.getUnspentAddress(seed)](#Client+getUnspentAddress) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
* [.getBalance(seed)](#Client+getBalance) ⇒ [BalanceGetter
](#BalanceGetter)
* [.getAddress()](#Client+getAddress) ⇒ [GetAddressBuilder
](#GetAddressBuilder)
* [.getInfo()](#Client+getInfo) ⇒ Promise.<any>
* [.getNodeInfo(url, jwt, username, password)](#Client+getNodeInfo) ⇒ Promise.<any>
* [.networkInfo()](#Client+networkInfo) ⇒ Promise.<any>
* [.getNetworkId()](#Client+getNetworkId) ⇒ Promise.<any>
* [.getBech32Hrp()](#Client+getBech32Hrp) ⇒ Promise.<any>
* [.getMinPowScore()](#Client+getMinPowScore) ⇒ Promise.<any>
* [.getHealth()](#Client+getHealth) ⇒ Promise.<any>
* [.getTips()](#Client+getTips) ⇒ Promise.<any>
* [.getPeers()](#Client+getPeers) ⇒ Promise.<any>
* [.getOutput(output_id)](#Client+getOutput) ⇒ Promise.<any>
* [.findMessages(indexation_keys, message_ids)](#Client+findMessages) ⇒ Promise.<any>
* [.findInputs(addresses, amount)](#Client+findInputs) ⇒ Promise.<any>
* [.findOutputs(outputs, addresses)](#Client+findOutputs) ⇒ Promise.<any>
* [.getAddressBalances(addresses)](#Client+getAddressBalances) ⇒ Promise.<any>
* [.getMilestone(index)](#Client+getMilestone) ⇒ Promise.<any>
* [.getMilestoneUtxoChanges(index)](#Client+getMilestoneUtxoChanges) ⇒ Promise.<any>
* [.getReceipts()](#Client+getReceipts) ⇒ Promise.<any>
* [.getReceiptsMigratedAt(milestone_index)](#Client+getReceiptsMigratedAt) ⇒ Promise.<any>
* [.getTreasury()](#Client+getTreasury) ⇒ Promise.<any>
* [.getIncludedMessage(transaction_id)](#Client+getIncludedMessage) ⇒ Promise.<any>
* [.postMessage(message)](#Client+postMessage) ⇒ Promise.<any>
* [.retry(message_id)](#Client+retry) ⇒ Promise.<any>
* [.retryUntilIncluded(message_id, interval, max_attempts)](#Client+retryUntilIncluded) ⇒ Promise.<any>
* [.reattach(message_id)](#Client+reattach) ⇒ Promise.<any>
* [.promote(message_id)](#Client+promote) ⇒ Promise.<any>
* [.consolidateFunds(seed, account_index, start_index, end_index)](#Client+consolidateFunds) ⇒ Promise.<any>
* [.bech32ToHex(address)](#Client+bech32ToHex) ⇒ string
* [.hexToBech32(address, bech32)](#Client+hexToBech32) ⇒ Promise.<any>
* [.hexPublicKeyToBech32Address(public_key, bech32)](#Client+hexPublicKeyToBech32Address) ⇒ Promise.<any>
* [.isAddressValid(address)](#Client+isAddressValid) ⇒ boolean
* [.generateMnemonic()](#Client+generateMnemonic) ⇒ string
* [.mnemonicToHexSeed(mnemonic)](#Client+mnemonicToHexSeed) ⇒ string
* [.getMessageId(message)](#Client+getMessageId) ⇒ string
* [.getTransactionId(transaction)](#Client+getTransactionId) ⇒ string
* [.getEssenceHash(essence)](#Client+getEssenceHash) ⇒ string
### client.message() ⇒ [MessageBuilder
](#MessageBuilder)
Send a message to the Tangle.
**Kind**: instance method of [Client
](#Client)
### client.getMessage() ⇒ [MessageGetter
](#MessageGetter)
Get a message from the Tangle.
**Kind**: instance method of [Client
](#Client)
### client.getAddresses(seed) ⇒ [AddressGetter
](#AddressGetter)
Generate addresses.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| seed | string
|
### client.getUnspentAddress(seed) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
Get an unspent address.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| seed | string
|
### client.getBalance(seed) ⇒ [BalanceGetter
](#BalanceGetter)
Get the account balance.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| seed | string
|
### client.getAddress() ⇒ [GetAddressBuilder
](#GetAddressBuilder)
GET /api/v1/addresses/{address} endpoint
**Kind**: instance method of [Client
](#Client)
### client.getInfo() ⇒ Promise.<any>
Get the nodeinfo.
**Kind**: instance method of [Client
](#Client)
### client.getNodeInfo(url, jwt, username, password) ⇒ Promise.<any>
Get the nodeinfo.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| url | string
|
| jwt | string
\| undefined
|
| username | string
\| undefined
|
| password | string
\| undefined
|
### client.networkInfo() ⇒ Promise.<any>
Gets the network related information such as network_id and min_pow_score
and if it's the default one, sync it first.
**Kind**: instance method of [Client
](#Client)
### client.getNetworkId() ⇒ Promise.<any>
Gets the network id of the node we're connecting to.
**Kind**: instance method of [Client
](#Client)
### client.getBech32Hrp() ⇒ Promise.<any>
returns the bech32_hrp
**Kind**: instance method of [Client
](#Client)
### client.getMinPowScore() ⇒ Promise.<any>
returns the bech32_hrp
**Kind**: instance method of [Client
](#Client)
### client.getHealth() ⇒ Promise.<any>
Get the node health.
**Kind**: instance method of [Client
](#Client)
### client.getTips() ⇒ Promise.<any>
Get tips.
**Kind**: instance method of [Client
](#Client)
### client.getPeers() ⇒ Promise.<any>
Get peers.
**Kind**: instance method of [Client
](#Client)
### client.getOutput(output_id) ⇒ Promise.<any>
GET /api/v1/outputs/{outputId} endpoint
Find an output by its transaction_id and corresponding output_index.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| output_id | string
|
### client.findMessages(indexation_keys, message_ids) ⇒ Promise.<any>
Find all messages by provided message IDs and/or indexation_keys.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| indexation_keys | any
|
| message_ids | any
|
### client.findInputs(addresses, amount) ⇒ Promise.<any>
Function to find inputs from addresses for a provided amount (useful for offline signing)
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| addresses | any
|
| amount | BigInt
|
### client.findOutputs(outputs, addresses) ⇒ Promise.<any>
Find all outputs based on the requests criteria. This method will try to query multiple nodes if
the request amount exceeds individual node limit.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| outputs | any
|
| addresses | any
|
### client.getAddressBalances(addresses) ⇒ Promise.<any>
Return the balance in iota for the given addresses; No seed needed to do this since we are only checking and
already know the addresses.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| addresses | any
|
### client.getMilestone(index) ⇒ Promise.<any>
GET /api/v1/milestones/{index} endpoint
Get the milestone by the given index.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| index | number
|
### client.getMilestoneUtxoChanges(index) ⇒ Promise.<any>
GET /api/v1/milestones/{index}/utxo-changes endpoint
Get the milestone by the given index.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| index | number
|
### client.getReceipts() ⇒ Promise.<any>
GET /api/v1/receipts endpoint
Get all receipts.
**Kind**: instance method of [Client
](#Client)
### client.getReceiptsMigratedAt(milestone_index) ⇒ Promise.<any>
GET /api/v1/receipts/{migratedAt} endpoint
Get the receipts by the given milestone index.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| milestone_index | number
|
### client.getTreasury() ⇒ Promise.<any>
GET /api/v1/treasury endpoint
Get the treasury output.
**Kind**: instance method of [Client
](#Client)
### client.getIncludedMessage(transaction_id) ⇒ Promise.<any>
GET /api/v1/transactions/{transactionId}/included-message
Returns the included message of the transaction.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| transaction_id | string
|
### client.postMessage(message) ⇒ Promise.<any>
Post message.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| message | any
|
### client.retry(message_id) ⇒ Promise.<any>
Retries (promotes or reattaches) a message for provided message id. Message should only be
retried only if they are valid and haven't been confirmed for a while.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| message_id | string
|
### client.retryUntilIncluded(message_id, interval, max_attempts) ⇒ Promise.<any>
Only works in browser because of the timeouts
Retries (promotes or reattaches) a message for provided message id until it's included (referenced by a
milestone). Default interval is 5 seconds and max attempts is 40. Returns reattached messages
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| message_id | string
|
| interval | BigInt
\| undefined
|
| max_attempts | BigInt
\| undefined
|
### client.reattach(message_id) ⇒ Promise.<any>
Reattaches messages for provided message id. Messages can be reattached only if they are valid and haven't been
confirmed for a while.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| message_id | string
|
### client.promote(message_id) ⇒ Promise.<any>
Promotes a message. The method should validate if a promotion is necessary through get_message. If not, the
method should error out and should not allow unnecessary promotions.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| message_id | string
|
### client.consolidateFunds(seed, account_index, start_index, end_index) ⇒ Promise.<any>
Only works in browser because of the timeouts
Function to consolidate all funds from a range of addresses to the address with the lowest index in that range
Returns the address to which the funds got consolidated, if any were available
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| seed | string
|
| account_index | number
|
| start_index | number
|
| end_index | number
|
### client.bech32ToHex(address) ⇒ string
Returns a parsed hex String from bech32.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| address | string
|
### client.hexToBech32(address, bech32) ⇒ Promise.<any>
Returns a parsed bech32 String from hex.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| address | string
|
| bech32 | string
\| undefined
|
### client.hexPublicKeyToBech32Address(public_key, bech32) ⇒ Promise.<any>
Transforms a hex encoded public key to a bech32 encoded address
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| public_key | string
|
| bech32 | string
\| undefined
|
### client.isAddressValid(address) ⇒ boolean
Checks if a String is a valid bech32 encoded address.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| address | string
|
### client.generateMnemonic() ⇒ string
Generates a new mnemonic.
**Kind**: instance method of [Client
](#Client)
### client.mnemonicToHexSeed(mnemonic) ⇒ string
Returns a hex encoded seed for a mnemonic.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| mnemonic | string
|
### client.getMessageId(message) ⇒ string
Returns the message id from a provided message.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| message | string
|
### client.getTransactionId(transaction) ⇒ string
Returns the transaction id from a provided transaction payload.
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| transaction | string
|
### client.getEssenceHash(essence) ⇒ string
Get essence hash
**Kind**: instance method of [Client
](#Client)
| Param | Type |
| --- | --- |
| essence | string
|
## ClientBuilder
**Kind**: global class
* [ClientBuilder](#ClientBuilder)
* [new ClientBuilder()](#new_ClientBuilder_new)
* [.node(url)](#ClientBuilder+node) ⇒ [ClientBuilder
](#ClientBuilder)
* [.primaryNode(url, jwt, username, password)](#ClientBuilder+primaryNode) ⇒ [ClientBuilder
](#ClientBuilder)
* [.primaryPowNode(url, jwt, username, password)](#ClientBuilder+primaryPowNode) ⇒ [ClientBuilder
](#ClientBuilder)
* [.permanode(url, jwt, username, password)](#ClientBuilder+permanode) ⇒ [ClientBuilder
](#ClientBuilder)
* [.nodeAuth(url, jwt, username, password)](#ClientBuilder+nodeAuth) ⇒ [ClientBuilder
](#ClientBuilder)
* [.nodes(urls)](#ClientBuilder+nodes) ⇒ [ClientBuilder
](#ClientBuilder)
* [.nodeSyncInterval(value)](#ClientBuilder+nodeSyncInterval) ⇒ [ClientBuilder
](#ClientBuilder)
* [.nodeSyncDisabled()](#ClientBuilder+nodeSyncDisabled) ⇒ [ClientBuilder
](#ClientBuilder)
* [.offlineMode()](#ClientBuilder+offlineMode) ⇒ [ClientBuilder
](#ClientBuilder)
* [.nodePoolUrls(node_pool_urls)](#ClientBuilder+nodePoolUrls) ⇒ Promise.<any>
* [.quorum(value)](#ClientBuilder+quorum) ⇒ [ClientBuilder
](#ClientBuilder)
* [.quorumSize(value)](#ClientBuilder+quorumSize) ⇒ [ClientBuilder
](#ClientBuilder)
* [.quorumThreshold(value)](#ClientBuilder+quorumThreshold) ⇒ [ClientBuilder
](#ClientBuilder)
* [.network(network)](#ClientBuilder+network) ⇒ [ClientBuilder
](#ClientBuilder)
* [.localPow(value)](#ClientBuilder+localPow) ⇒ [ClientBuilder
](#ClientBuilder)
* [.tipsInterval(value)](#ClientBuilder+tipsInterval) ⇒ [ClientBuilder
](#ClientBuilder)
* [.requestTimeout(value)](#ClientBuilder+requestTimeout) ⇒ [ClientBuilder
](#ClientBuilder)
* [.apiTimeout(api, timeout)](#ClientBuilder+apiTimeout) ⇒ [ClientBuilder
](#ClientBuilder)
* [.build()](#ClientBuilder+build) ⇒ Promise.<any>
### new ClientBuilder()
Creates an IOTA client builder.
### clientBuilder.node(url) ⇒ [ClientBuilder
](#ClientBuilder)
Adds an IOTA node by its URL.
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| url | string
|
### clientBuilder.primaryNode(url, jwt, username, password) ⇒ [ClientBuilder
](#ClientBuilder)
Adds an IOTA node by its URL to be used as primary node, with optional jwt and or basic authentication
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| url | string
|
| jwt | string
\| undefined
|
| username | string
\| undefined
|
| password | string
\| undefined
|
### clientBuilder.primaryPowNode(url, jwt, username, password) ⇒ [ClientBuilder
](#ClientBuilder)
Adds an IOTA node by its URL to be used as primary PoW node (for remote PoW), with optional jwt and or basic
authentication
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| url | string
|
| jwt | string
\| undefined
|
| username | string
\| undefined
|
| password | string
\| undefined
|
### clientBuilder.permanode(url, jwt, username, password) ⇒ [ClientBuilder
](#ClientBuilder)
Adds a permanode by its URL, with optional jwt and or basic authentication
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| url | string
|
| jwt | string
\| undefined
|
| username | string
\| undefined
|
| password | string
\| undefined
|
### clientBuilder.nodeAuth(url, jwt, username, password) ⇒ [ClientBuilder
](#ClientBuilder)
Adds an IOTA node by its URL with optional jwt and or basic authentication
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| url | string
|
| jwt | string
\| undefined
|
| username | string
\| undefined
|
| password | string
\| undefined
|
### clientBuilder.nodes(urls) ⇒ [ClientBuilder
](#ClientBuilder)
Adds a list of IOTA nodes by their URLs.
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| urls | any
|
### clientBuilder.nodeSyncInterval(value) ⇒ [ClientBuilder
](#ClientBuilder)
Set the node sync interval (has no effect because we can't spawn another thread in wasm to sync the nodes)
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| value | number
|
### clientBuilder.nodeSyncDisabled() ⇒ [ClientBuilder
](#ClientBuilder)
Disables the node syncing process.
Every node will be considered healthy and ready to use.
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
### clientBuilder.offlineMode() ⇒ [ClientBuilder
](#ClientBuilder)
Allows creating the client without nodes for offline address generation or signing
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
### clientBuilder.nodePoolUrls(node_pool_urls) ⇒ Promise.<any>
Get node list from the node_pool_urls
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| node_pool_urls | any
|
### clientBuilder.quorum(value) ⇒ [ClientBuilder
](#ClientBuilder)
Set if quroum should be used or not
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| value | boolean
|
### clientBuilder.quorumSize(value) ⇒ [ClientBuilder
](#ClientBuilder)
Set amount of nodes which should be used for quorum
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| value | number
|
### clientBuilder.quorumThreshold(value) ⇒ [ClientBuilder
](#ClientBuilder)
Set quorum_threshold
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| value | number
|
### clientBuilder.network(network) ⇒ [ClientBuilder
](#ClientBuilder)
Selects the type of network to get default nodes for it, only "testnet" is supported at the moment.
Nodes that don't belong to this network are ignored. Default nodes are only used when no other nodes are
provided.
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| network | string
|
### clientBuilder.localPow(value) ⇒ [ClientBuilder
](#ClientBuilder)
Since we can only have a single thread in wasm, local PoW is much slower
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| value | boolean
|
### clientBuilder.tipsInterval(value) ⇒ [ClientBuilder
](#ClientBuilder)
Sets after how many seconds new tips will be requested during PoW
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| value | number
|
### clientBuilder.requestTimeout(value) ⇒ [ClientBuilder
](#ClientBuilder)
Sets the default request timeout.
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| value | number
|
### clientBuilder.apiTimeout(api, timeout) ⇒ [ClientBuilder
](#ClientBuilder)
Sets the request timeout for a specific API usage.
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
| Param | Type |
| --- | --- |
| api | string
|
| timeout | number
|
### clientBuilder.build() ⇒ Promise.<any>
Build the client.
**Kind**: instance method of [ClientBuilder
](#ClientBuilder)
## GetAddressBuilder
**Kind**: global class
* [GetAddressBuilder](#GetAddressBuilder)
* _instance_
* [.balance(address)](#GetAddressBuilder+balance) ⇒ Promise.<any>
* [.outputs(address, options)](#GetAddressBuilder+outputs) ⇒ Promise.<any>
* _static_
* [.new(client)](#GetAddressBuilder.new) ⇒ [GetAddressBuilder
](#GetAddressBuilder)
### getAddressBuilder.balance(address) ⇒ Promise.<any>
Consume the builder and get the balance of a given Bech32 encoded address.
If count equals maxResults, then there might be more outputs available but those were skipped for performance
reasons. User should sweep the address to reduce the amount of outputs.
**Kind**: instance method of [GetAddressBuilder
](#GetAddressBuilder)
| Param | Type |
| --- | --- |
| address | string
|
### getAddressBuilder.outputs(address, options) ⇒ Promise.<any>
Consume the builder and get all outputs that use a given address.
If count equals maxResults, then there might be more outputs available but those were skipped for performance
reasons. User should sweep the address to reduce the amount of outputs.
**Kind**: instance method of [GetAddressBuilder
](#GetAddressBuilder)
| Param | Type |
| --- | --- |
| address | string
|
| options | any
|
### GetAddressBuilder.new(client) ⇒ [GetAddressBuilder
](#GetAddressBuilder)
**Kind**: static method of [GetAddressBuilder
](#GetAddressBuilder)
| Param | Type |
| --- | --- |
| client | [Client
](#Client) |
## MessageBuilder
**Kind**: global class
* [MessageBuilder](#MessageBuilder)
* _instance_
* [.index(index)](#MessageBuilder+index) ⇒ [MessageBuilder
](#MessageBuilder)
* [.data(data)](#MessageBuilder+data) ⇒ [MessageBuilder
](#MessageBuilder)
* [.seed(seed)](#MessageBuilder+seed) ⇒ [MessageBuilder
](#MessageBuilder)
* [.accountIndex(account_index)](#MessageBuilder+accountIndex) ⇒ [MessageBuilder
](#MessageBuilder)
* [.initialAddressIndex(initial_address_index)](#MessageBuilder+initialAddressIndex) ⇒ [MessageBuilder
](#MessageBuilder)
* [.parents(parents)](#MessageBuilder+parents) ⇒ [MessageBuilder
](#MessageBuilder)
* [.input(output_id)](#MessageBuilder+input) ⇒ [MessageBuilder
](#MessageBuilder)
* [.inputRange(start, end)](#MessageBuilder+inputRange) ⇒ [MessageBuilder
](#MessageBuilder)
* [.output(address, amount)](#MessageBuilder+output) ⇒ [MessageBuilder
](#MessageBuilder)
* [.dustAllowanceOutput(address, amount)](#MessageBuilder+dustAllowanceOutput) ⇒ [MessageBuilder
](#MessageBuilder)
* [.prepareTransaction()](#MessageBuilder+prepareTransaction) ⇒ Promise.<any>
* [.signTransaction(prepared_transaction_data, seed, input_range_start, input_range_end)](#MessageBuilder+signTransaction) ⇒ Promise.<any>
* [.finishMessage(payload)](#MessageBuilder+finishMessage) ⇒ Promise.<any>
* [.submit()](#MessageBuilder+submit) ⇒ Promise.<any>
* _static_
* [.new(client)](#MessageBuilder.new) ⇒ [MessageBuilder
](#MessageBuilder)
### messageBuilder.index(index) ⇒ [MessageBuilder
](#MessageBuilder)
Set indexation to the builder
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| index | Uint8Array
|
### messageBuilder.data(data) ⇒ [MessageBuilder
](#MessageBuilder)
Set data to the builder
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| data | Uint8Array
|
### messageBuilder.seed(seed) ⇒ [MessageBuilder
](#MessageBuilder)
Sets the seed.
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| seed | string
|
### messageBuilder.accountIndex(account_index) ⇒ [MessageBuilder
](#MessageBuilder)
Sets the account index.
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| account_index | number
|
### messageBuilder.initialAddressIndex(initial_address_index) ⇒ [MessageBuilder
](#MessageBuilder)
Sets the index of the address to start looking for balance.
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| initial_address_index | number
|
### messageBuilder.parents(parents) ⇒ [MessageBuilder
](#MessageBuilder)
Set 1-8 custom parent message ids
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| parents | any
|
### messageBuilder.input(output_id) ⇒ [MessageBuilder
](#MessageBuilder)
Set a custom input(transaction output)
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| output_id | string
|
### messageBuilder.inputRange(start, end) ⇒ [MessageBuilder
](#MessageBuilder)
Set a custom range in which to search for addresses for custom provided inputs. Default: 0..100
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| start | number
|
| end | number
|
### messageBuilder.output(address, amount) ⇒ [MessageBuilder
](#MessageBuilder)
Set a transfer to the builder
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| address | string
|
| amount | BigInt
|
### messageBuilder.dustAllowanceOutput(address, amount) ⇒ [MessageBuilder
](#MessageBuilder)
Set a dust allowance transfer to the builder, address needs to be Bech32 encoded
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| address | string
|
| amount | BigInt
|
### messageBuilder.prepareTransaction() ⇒ Promise.<any>
Prepare a transaction
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
### messageBuilder.signTransaction(prepared_transaction_data, seed, input_range_start, input_range_end) ⇒ Promise.<any>
Sign a transaction
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| prepared_transaction_data | any
|
| seed | string
|
| input_range_start | number
\| undefined
|
| input_range_end | number
\| undefined
|
### messageBuilder.finishMessage(payload) ⇒ Promise.<any>
Create a message with a provided payload
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| payload | any
|
### messageBuilder.submit() ⇒ Promise.<any>
Build and sumbit the message.
**Kind**: instance method of [MessageBuilder
](#MessageBuilder)
### MessageBuilder.new(client) ⇒ [MessageBuilder
](#MessageBuilder)
**Kind**: static method of [MessageBuilder
](#MessageBuilder)
| Param | Type |
| --- | --- |
| client | [Client
](#Client) |
## MessageGetter
**Kind**: global class
* [MessageGetter](#MessageGetter)
* _instance_
* [.index(index)](#MessageGetter+index) ⇒ Promise.<any>
* [.data(message_id)](#MessageGetter+data) ⇒ Promise.<any>
* [.raw(message_id)](#MessageGetter+raw) ⇒ Promise.<any>
* [.children(message_id)](#MessageGetter+children) ⇒ Promise.<any>
* [.metadata(message_id)](#MessageGetter+metadata) ⇒ Promise.<any>
* _static_
* [.new(client)](#MessageGetter.new) ⇒ [MessageGetter
](#MessageGetter)
### messageGetter.index(index) ⇒ Promise.<any>
Get message ids with an index.
**Kind**: instance method of [MessageGetter
](#MessageGetter)
| Param | Type |
| --- | --- |
| index | Uint8Array
|
### messageGetter.data(message_id) ⇒ Promise.<any>
Get a message with the message id.
**Kind**: instance method of [MessageGetter
](#MessageGetter)
| Param | Type |
| --- | --- |
| message_id | string
|
### messageGetter.raw(message_id) ⇒ Promise.<any>
Get the raw message with the message id.
**Kind**: instance method of [MessageGetter
](#MessageGetter)
| Param | Type |
| --- | --- |
| message_id | string
|
### messageGetter.children(message_id) ⇒ Promise.<any>
Get the childrens of a message with the message id.
**Kind**: instance method of [MessageGetter
](#MessageGetter)
| Param | Type |
| --- | --- |
| message_id | string
|
### messageGetter.metadata(message_id) ⇒ Promise.<any>
Get the metadata of a message with the message id.
**Kind**: instance method of [MessageGetter
](#MessageGetter)
| Param | Type |
| --- | --- |
| message_id | string
|
### MessageGetter.new(client) ⇒ [MessageGetter
](#MessageGetter)
**Kind**: static method of [MessageGetter
](#MessageGetter)
| Param | Type |
| --- | --- |
| client | [Client
](#Client) |
## UnspentAddressGetter
**Kind**: global class
* [UnspentAddressGetter](#UnspentAddressGetter)
* _instance_
* [.accountIndex(index)](#UnspentAddressGetter+accountIndex) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
* [.initialAddressIndex(index)](#UnspentAddressGetter+initialAddressIndex) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
* [.get()](#UnspentAddressGetter+get) ⇒ Promise.<any>
* _static_
* [.new(client, seed)](#UnspentAddressGetter.new) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
### unspentAddressGetter.accountIndex(index) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
Sets the account index
**Kind**: instance method of [UnspentAddressGetter
](#UnspentAddressGetter)
| Param | Type |
| --- | --- |
| index | number
|
### unspentAddressGetter.initialAddressIndex(index) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
Sets the index of the address to start looking for balance
**Kind**: instance method of [UnspentAddressGetter
](#UnspentAddressGetter)
| Param | Type |
| --- | --- |
| index | number
|
### unspentAddressGetter.get() ⇒ Promise.<any>
Get an unspent address with its index.
**Kind**: instance method of [UnspentAddressGetter
](#UnspentAddressGetter)
### UnspentAddressGetter.new(client, seed) ⇒ [UnspentAddressGetter
](#UnspentAddressGetter)
**Kind**: static method of [UnspentAddressGetter
](#UnspentAddressGetter)
| Param | Type |
| --- | --- |
| client | [Client
](#Client) |
| seed | string
|
## start()
Initializes the console error panic hook for better error messages
**Kind**: global function