Skip to main content
Version: IOTA

API Reference

Address‚Äč

tryFromBech32(addr): Address‚Äč

Tries to create an Address from a Bech32 encoded string.

ParameterTypeDescription
addrString

toBech32(hrp): String‚Äč

ParameterTypeDescription
hrpString

verify(msg, signature): void‚Äč

ParameterTypeDescription
msgbyte[]
signatureSignatureUnlock

AddressDto‚Äč

kind(): short‚Äč

The kind of address

address(): String‚Äč

The address itself

AddressIndexRecorder‚Äč

Structure for sorting of UnlockBlocks

accountIndex(): long‚Äč

Index of the account

input(): Input‚Äč

The input used

output(): OutputResponse‚Äč

The output information

addressIndex(): long‚Äč

index of this address on the seed

chain(): Chain‚Äč

The chain derived from seed

internal(): boolean‚Äč

Whether this is an internal address

bech32Address(): String‚Äč

The address

AddressPublicWrapper‚Äč

isPublic(): boolean‚Äč

If this is a public address

address(): Address‚Äč

The address itself

AddressStringPublicWrapper‚Äč

isPublic(): boolean‚Äč

If this is a public address

address(): String‚Äč

The address itself

Api‚Äč

GET_HEALTH‚Äč

get_health API

GET_INFO‚Äč

get_infoAPI

GET_PEERS‚Äč

get_peersAPI

GET_TIPS‚Äč

get_tips API

POST_MESSAGE‚Äč

post_message API

POST_MESSAGE_WITH_REMOTE_POW‚Äč

post_message API with remote pow

GET_OUTPUT‚Äč

get_output API

GET_MILESTONE‚Äč

get_milestone API

GET_MESSAGE‚Äč

get_message API

GET_BALANCE‚Äč

get_balance API

BalanceAddressResponse‚Äč

Response of an address balance request

addressType(): short‚Äč

The type of address

address(): String‚Äč

The address

balance(): long‚Äč

The balance of this address

dustAllowed(): boolean‚Äč

Wether or not this address allows dust

BrokerOptions‚Äč

The MQTT broker options.

BrokerOptions(): BrokerOptions‚Äč

automaticDisconnect(disconnect): BrokerOptions‚Äč

Whether the MQTT broker should be automatically disconnected when all topics are unsubscribed or not.

ParameterTypeDescription
disconnectboolean

timeout(timeout): BrokerOptions‚Äč

timeout of the mqtt broker.

ParameterTypeDescription
timeoutfloatThe timeout in seconds

useWs(use_ws): BrokerOptions‚Äč

Defines if websockets should be used (true) or TCP (false)

ParameterTypeDescription
use_wsbooleanIf we use web sockets or not

port(port): BrokerOptions‚Äč

Defines the port to be used for the MQTT connection

ParameterTypeDescription
portintThe port we use to conenct

maxReconnectionAttempts(max_reconnection_attempts): BrokerOptions‚Äč

Defines the maximum reconnection attempts before it returns an error

ParameterTypeDescription
max_reconnection_attemptslongThe maximum attempts

Chain‚Äč

slip10 chain

Client‚Äč

The iota.rs client instance

Builder(): ClientBuilder‚Äč

Creates a new instance of the CLient builder

getHealth(): boolean‚Äč

GET /health endpoint

getNodeHealth(node): boolean‚Äč

GET /health endpoint for the passed node

ParameterTypeDescription
nodeStringthe node url which you want to query speicifically for, in the case of multiple nodes in a pool

getNode(): Node‚Äč

getNetworkId(): long‚Äč

Gets the network id of the node we're connecting to.

getPowProvider(): ClientMiner‚Äč

Gets the miner to use based on the PoW setting

getNetworkInfo(): NetworkInfo‚Äč

Gets the network related information such as network_id and min_pow_score and if it's the default one, sync it first.

getInfo(): NodeInfoWrapper‚Äč

GET /api/v1/info endpoint

getPeers(): PeerDto[]‚Äč

GET /api/v1/peers endpoint

getTips(): String[]‚Äč

GET /api/v1/tips endpoint

getOutput(output_id): OutputResponse‚Äč

GET /api/v1/outputs/{outputId} endpoint Find an output by its transaction_id and corresponding output_index.

ParameterTypeDescription
output_idStringThe id of the output

getAddress(): GetAddressBuilder‚Äč

GET /api/v1/addresses/{address} endpoint Creates a new instance of the AddressBuilder

getAddressBalance(address): BalanceAddressResponse‚Äč

Return the balance in iota for the given address; No seed needed to do this since we are only checking and already know the address.

ParameterTypeDescription
addressStringThe address we want to get the balance for

getAddressesBalances(addresses): BalanceAddressResponse[]‚Äč

since we are only checking and already know the addresses.

ParameterTypeDescription
addressesString[]The addresses we want to get the balance for

findOutputs(output_ids, addresses): OutputResponse[]‚Äč

Find all outputs based on the requests criteria. This method will try to query multiple nodes if the request amount exceeds individual node limit.

ParameterTypeDescription
output_idsString[]The optional output ids to check for
addressesString[]The optional list of addresses to check for

getMilestone(index): MilestoneResponse‚Äč

GET /api/v1/milestones/{index} endpoint Get the milestone by the given index.

ParameterTypeDescription
indexlongthe milestone index

getMilestoneUtxoChanges(index): MilestoneUtxoChangesResponse‚Äč

GET /api/v1/milestones/{index}/utxo-changes endpoint Gets the utxo changes by the given milestone index.

ParameterTypeDescription
indexlongthe milestone index

getReceipts(): ReceiptDto[]‚Äč

GET /api/v1/receipts endpoint Get all receipts.

getReceiptsMigratedAt(index): ReceiptDto[]‚Äč

GET /api/v1/receipts/{migratedAt} endpoint Get the receipts by the given milestone index.

ParameterTypeDescription
indexlongthe milestone index

getTreasury(): TreasuryResponse‚Äč

GET /api/v1/treasury endpoint Get the treasury output.

getIncludedMessage(transaction_id): Message‚Äč

GET /api/v1/transactions/{transactionId}/included-message Returns the included message of the transaction.

ParameterTypeDescription
transaction_idTransactionIdthe transaction id

postMessage(msg): MessageId‚Äč

POST /api/v1/messages endpoint

ParameterTypeDescription
msgMessageThe message to post. Use Client.message() to create one.

reattach(message_id): MessageWrap‚Äč

Reattaches messages for provided message id. Messages can be reattached only if they are valid and haven't been confirmed for a while.

ParameterTypeDescription
message_idMessageIdThe id of the Message to reattach

reattachUnchecked(message_id): MessageWrap‚Äč

Reattach a message without checking if it should be reattached

ParameterTypeDescription
message_idMessageIdThe id of the Message to reattach

promote(message_id): MessageWrap‚Äč

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.

ParameterTypeDescription
message_idMessageIdThe id of the Message to promote

promoteUnchecked(message_id): MessageWrap‚Äč

Promote a message without checking if it should be promoted

ParameterTypeDescription
message_idMessageIdThe id of the Message to promote

getBalance(seed): GetBalanceBuilderApi‚Äč

Return the balance for a provided seed Addresses with balance must be consecutive, so this method will return once it encounters a zero balance address.

ParameterTypeDescription
seedStringthe seed which contains the addressses you want to check balance for

message(): ClientMessageBuilder‚Äč

A generic send function for easily sending transaction or indexation messages.

getMessage(): GetMessageBuilder‚Äč

GET /api/v1/messages/{messageId} endpoint

getAddresses(seed): GetAddressesBuilder‚Äč

Return a list of addresses from the seed regardless of their validity.

ParameterTypeDescription
seedStringssed that will create the addresses

retryUntilIncluded(message_id, interval, max_attempts): MessageWrap[]‚Äč

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. Set to -1 for defaults.

ParameterTypeDescription
message_idMessageIdThe id of the Message to include
intervallongThe interval in seconds to try
max_attemptslongThe maximum attempts for retrying

subscriber(): MqttManager‚Äč

Returns a handle to the MQTT topics manager.

generateMnemonic(): String‚Äč

Generates a new mnemonic.

mnemonicToHexSeed(mnemonic): String‚Äč

Returns a hex encoded seed for a mnemonic.

ParameterTypeDescription
mnemonicStringThe mmnemonic to turn into a seed

findInputs(addresses, amount): UtxoInput[]‚Äč

Function to find inputs from addresses for a provided amount (useful for offline signing)

ParameterTypeDescription
addressesString[]The addresses to obtain balance from
amountlongthe amount we need to find

bech32ToHex(bech32): String‚Äč

Returns a parsed hex String from bech32.

ParameterTypeDescription
bech32StringThe address Bech32 string

hexToBech32(hex, bech32_hrp): String‚Äč

Transforms a hex encoded address to a bech32 encoded address

ParameterTypeDescription
hexStringThe address Bech32 string
bech32_hrpStringThe Bech32 hrp string

hexPublicKeyToBech32Address(hex, bech32_hrp): String‚Äč

Transforms a hex encoded public key to a bech32 encoded address

ParameterTypeDescription
hexStringhex encoded public key
bech32_hrpStringThe Bech32 hrp string

isAddressValid(address): boolean‚Äč

Checks if a str is a valid bech32 encoded address.

ParameterTypeDescription
addressStringThe addresss string to check

parseBech32Address(address): Address‚Äč

Returns a valid Address parsed from a String.

ParameterTypeDescription
addressStringThe addresss string to parse

shouldMigrate(seed, account_index, address_index, pub_addr): boolean‚Äč

Temporarily method to check if your seed is made using the incorrect generation of the old JAVA seed input

ParameterTypeDescription
seedStringThe seed you used previously
account_indexlongThe account index used, is 0 when you didnt use it
address_indexlongThe address index you want to migrate
pub_addrbooleanIf it's a public or internal address

migrate(seed, account_index, address_index, pub_addr, to_address): Message‚Äč

Temporarily method in order to migrate wrongly generated seeds from JAVA to Rust Migrates the balance of the address towards the provided to_address And returns the message or an error

ParameterTypeDescription
seedStringThe seed you used previously
account_indexlongThe account index used, is 0 when you didnt use it
address_indexlongThe address index you want to migrate
pub_addrbooleanIf it's a public or internal address
to_addressStringThe address we send the balance to

ClientBuilder‚Äč

The options builder for a client connected to multiple nodes.

ClientBuilder(): ClientBuilder‚Äč

Create a new instance of the Client

withNode(node): ClientBuilder‚Äč

Adds an IOTA node by its URL.

ParameterTypeDescription
nodeStringThe node URL

withNodes(nodes): ClientBuilder‚Äč

Adds a list of IOTA nodes by their URLs.

ParameterTypeDescription
nodesString[]The list of node URLs

withNodeAuth(node, jwt, username, password): ClientBuilder‚Äč

Adds an IOTA node by its URL with optional jwt and or basic authentication

ParameterTypeDescription
nodeStringThe node URL
jwtStringThe JWT, can be null
usernameStringThe username, can be null
passwordStringThe password, can be null. Only checked if username is not null

withPrimaryNode(node, jwt, username, password): ClientBuilder‚Äč

Adds an IOTA node by its URL to be used as primary node, with optional jwt and or basic authentication

ParameterTypeDescription
nodeStringThe node URL
jwtStringThe JWT, can be null
usernameStringThe username, can be null
passwordStringThe password, can be null. Only checked if username is not null

withPrimaryPowNode(node, jwt, username, password): 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

ParameterTypeDescription
nodeStringThe node URL
jwtStringThe JWT, can be null
usernameStringThe username, can be null
passwordStringThe password, can be null. Only checked if username is not null

withPermanode(node, jwt, username, password): ClientBuilder‚Äč

Adds an IOTA permanode by its URL, with optional jwt and or basic authentication

ParameterTypeDescription
nodeStringThe node URL
jwtStringThe JWT, can be null
usernameStringThe username, can be null
passwordStringThe password, can be null. Only checked if username is not null

withNodePoolUrls(node_pool_urls): ClientBuilder‚Äč

Get node list from the node_pool_urls

ParameterTypeDescription
node_pool_urlsString[]node_pool_urls list of node URLs for the node pool

withOfflineMode(): ClientBuilder‚Äč

Allows creating the client without nodes for offline address generation or signing

withNetwork(network): ClientBuilder‚Äč

Client connected to the default Network pool unless specified.

import org.iota.client.ClientBuilder;
Client clientOptions = new ClientBuilder().with_network("devnet").build();
ParameterTypeDescription
networkStringThe network we connect to

withNodeSyncInterval(node_sync_interval): ClientBuilder‚Äč

Set the node sync interval

ParameterTypeDescription
node_sync_intervalfloatThe interval in seconds

withNodeSyncDisabled(): ClientBuilder‚Äč

Disables the node syncing process. Every node will be considered healthy and ready to use.

withQuorum(quorum): ClientBuilder‚Äč

Set if quorum should be used or not

ParameterTypeDescription
quorumbooleantrue if we use a quorum

withQuorumSize(quorum_size): ClientBuilder‚Äč

Set amount of nodes which should be used for quorum

ParameterTypeDescription
quorum_sizelongThe amount of nodes

withQuorumThreshold(threshold): ClientBuilder‚Äč

Set quorum threshold

ParameterTypeDescription
thresholdlongThe percentage of nodes that need to agree (0-100)

withMqttBrokerOptions(options): ClientBuilder‚Äč

Sets the MQTT broker options.

ParameterTypeDescription
optionsBrokerOptionsthe MQTT options

withLocalPow(local): ClientBuilder‚Äč

Sets whether the PoW should be done locally or remotely.

ParameterTypeDescription
localbooleanEnables or disables local PoW

withTipsInterval(tips): ClientBuilder‚Äč

Sets after how many seconds new tips will be requested during PoW

ParameterTypeDescription
tipslongdelay in seconds

withRequestTimeout(timeout): ClientBuilder‚Äč

Sets the default request timeout in seconds.

ParameterTypeDescription
timeoutfloatThe request timeout in seconds

withApiTimeout(api, timeout): ClientBuilder‚Äč

Sets the request timeout in seconds for a specific API usage.

ParameterTypeDescription
apiApiThe API we set the timeout for
timeoutfloatThe request timeout in seconds

finish(): Client‚Äč

Build the Client instance.

ClientException‚Äč

ClientException(): ClientException‚Äč

ClientException(errorMessage): ClientException‚Äč

ParameterTypeDescription
errorMessageString

ClientMessageBuilder‚Äč

withSeed(seed): ClientMessageBuilder‚Äč

Sets the seed.

ParameterTypeDescription
seedStringThe seed to use

withAccountIndex(account_index): ClientMessageBuilder‚Äč

Sets the account index.

ParameterTypeDescription
account_indexlongThe index to set

withInitialAddressIndex(initial_address_index): ClientMessageBuilder‚Äč

Sets the index of the address to start looking for balance.

ParameterTypeDescription
initial_address_indexlongThe initial index to start address search from

withInput(input): ClientMessageBuilder‚Äč

Set a custom input(transaction output)

ParameterTypeDescription
inputUtxoInputThe custom input

withInputRange(low, high): ClientMessageBuilder‚Äč

Set a custom range in which to search for addresses for custom inputs. Default: 0..100

ParameterTypeDescription
lowlongLow end of input range (0)
highlongUpper end of input range (100)

withOutput(address, amount): ClientMessageBuilder‚Äč

Insert the output address and amount to spent. The amount cannot be zero.

ParameterTypeDescription
addressStringThe address we send to
amountlongThe amount to send (> 0)

withDustAllowanceOutput(address, amount): ClientMessageBuilder‚Äč

Set a dust allowance transfer to the builder, address needs to be Bech32 encoded

ParameterTypeDescription
addressStringThe Bech32 encoded address we send to
amountlongThe amount to send (> 0)

withOutputHex(address, amount): ClientMessageBuilder‚Äč

Set a transfer to the builder, address needs to be hex encoded

ParameterTypeDescription
addressStringThe hex encoded address we send to
amountlongThe amount to send (> 0)

withIndexVec(index): ClientMessageBuilder‚Äč

Set indexation to the builder

ParameterTypeDescription
indexbyte[]The index to use

withIndexString(index): ClientMessageBuilder‚Äč

Set indexation to the builder

ParameterTypeDescription
indexStringThe index to use

withData(data): ClientMessageBuilder‚Äč

Set data to the builder

ParameterTypeDescription
databyte[]The data to use

withDataString(data): ClientMessageBuilder‚Äč

Set data to the builder

ParameterTypeDescription
dataStringThe data to use

prepareTransaction(): PreparedTransactionData‚Äč

Prepare a transaction. Used as parameter for signTransaction

signTransaction(prepared_transaction_data, seed, inputs_range_low, inputs_range_high): MessagePayload‚Äč

Sign the transaction. inputsRangeLow and high to 0 for not using an input range

ParameterTypeDescription
prepared_transaction_dataPreparedTransactionDataThe completely prepared transaction
seedStringThe seed used to prepare the transaction
inputs_range_lowlongLower input used for getting adresses (default: 0)
inputs_range_highlongUpper input used for getting adresses (default: 100)

finish(payload): Message‚Äč

Consume the builder and return the message made with the specific payload

ParameterTypeDescription
payloadMessagePayloadA prepared and signed MessagePayload

finishTransaction(payload): Message‚Äč

Consume the builder and return the message made with the specific payload

ParameterTypeDescription
payloadTransactionPayloadA prepared and signed TransactionPayload

finishMilestone(payload): Message‚Äč

Consume the builder and return the message made with the specific payload

ParameterTypeDescription
payloadMilestonePayloadA prepared and signed MilestonePayload

finishIndex(payload): Message‚Äč

Consume the builder and return the message made with the specific payload

ParameterTypeDescription
payloadIndexationPayloadA prepared and signed IndexationPayload

finishReceipt(payload): Message‚Äč

Consume the builder and return the message made with the specific payload

ParameterTypeDescription
payloadReceiptPayloadA prepared and signed ReceiptPayload

finishTreasury(payload): Message‚Äč

Consume the builder and return the message made with the specific payload

ParameterTypeDescription
payloadTreasuryPayloadA prepared and signed TreasuryPayload

finish(): Message‚Äč

Consume the builder and return the message

ClientMiner‚Äč

Client miner, used as

Essence‚Äč

asRegular(): RegularEssence‚Äč

GetAddressBuilder‚Äč

Builder of GET /api/v1/address/{address} endpoint

balance(address): BalanceAddressResponse‚Äč

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.

ParameterTypeDescription
addressStringThe address to get the balance for

outputs(address, options): UtxoInput[]‚Äč

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.

ParameterTypeDescription
addressStringThe address to get the balance for
optionsOutputsOptionsThe options for finding outputs

GetAddressesBuilder‚Äč

from(seed): GetAddressesBuilder‚Äč

Construct a new addressbuilder with a seed. Invalid seeds throw an error

ParameterTypeDescription
seedString

fromOld(seed): GetAddressesBuilder‚Äč

DEBUG DO NOT USE

ParameterTypeDescription
seedString

withAccountIndex(account_index): GetAddressesBuilder‚Äč

Set the account index

ParameterTypeDescription
account_indexlong

withRange(start, end): GetAddressesBuilder‚Äč

Set range to the builder

ParameterTypeDescription
startlong
endlong

withBech32Hrp(bech32_hrp): GetAddressesBuilder‚Äč

Set bech32 human readable part (hrp)

ParameterTypeDescription
bech32_hrpString

withClient(client): GetAddressesBuilder‚Äč

Set client to the builder

ParameterTypeDescription
clientClient

finish(): String[]‚Äč

Consume the builder and get a vector of public addresses bech32 encoded

getAll(): AddressStringPublicWrapper[]‚Äč

getAllRaw(): AddressPublicWrapper[]‚Äč

Consume the builder and get the vector of public and internal addresses

GetBalanceBuilderApi‚Äč

withAccountIndex(account_index): GetBalanceBuilderApi‚Äč

Sets the account index.

ParameterTypeDescription
account_indexlongThe account index to use (Default: 0)

withInitialAddressIndex(initial_address_index): GetBalanceBuilderApi‚Äč

Sets the index of the address to start looking for balance.

ParameterTypeDescription
initial_address_indexlongThe starting index to use for searching addresses (Default: 0)

withGapLimit(gap_limit): GetBalanceBuilderApi‚Äč

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.

ParameterTypeDescription
gap_limitlongThe gap limit (Default: 20)

finish(): long‚Äč

Consume the builder and get the API result

GetMessageBuilder‚Äč

indexString(index): MessageId[]‚Äč

GET /api/v1/messages?index={Index} endpoint Consume the builder and search for messages matching the index

ParameterTypeDescription
indexStringthe index string

indexVec(index): MessageId[]‚Äč

GET /api/v1/messages?index={Index} endpoint Consume the builder and search for messages matching the index

ParameterTypeDescription
indexbyte[]the index in bytes

data(message_id): Message‚Äč

GET /api/v1/messages/{messageID} endpoint Consume the builder and find a message by its identifer. This method returns the given message object.

ParameterTypeDescription
message_idMessageIdThe id of the message to find

metadata(message_id): MessageMetadata‚Äč

GET /api/v1/messages/{messageID}/metadata endpoint Consume the builder and find a message by its identifer. This method returns the given message metadata.

ParameterTypeDescription
message_idMessageIdThe id of the message to find

raw(message_id): String‚Äč

GET /api/v1/messages/{messageID}/raw endpoint Consume the builder and find a message by its identifer. This method returns the given message raw data.

ParameterTypeDescription
message_idMessageIdThe id of the message to find

children(message_id): MessageId[]‚Äč

GET /api/v1/messages/{messageID}/children endpoint Consume the builder and returns the list of message IDs that reference a message by its identifier.

ParameterTypeDescription
message_idMessageIdThe id of the message to find

GossipDto‚Äč

heartbeat(): HeartbeatDto‚Äč

The hearthbeat information

metrics(): MetricsDto‚Äč

The metrics information

HeartbeatDto‚Äč

solidMilestoneIndex(): long‚Äč

The solid milestone index

prunedMilestoneIndex(): long‚Äč

The pruend milestone index

latestMilestoneIndex(): long‚Äč

The latest milestone index

connectedNeighbors(): short‚Äč

The amount of connected neighbors

syncedNeighbors(): short‚Äč

The amount of synced neighbors

IndexPublicDto‚Äč

index(): long‚Äč

isPublic(): boolean‚Äč

IndexationPayload‚Äč

fromBytes(index, data): IndexationPayload‚Äč

Creates a new IndexationPayload.

ParameterTypeDescription
indexbyte[]The index
databyte[]The data linked ot this index

fromStrings(index, data): IndexationPayload‚Äč

Creates a new IndexationPayload from strings

ParameterTypeDescription
indexStringThe index
dataStringThe data linked ot this index

index(): byte[]‚Äč

Returns the index of an IndexationPayload.

indexString(): String‚Äč

Returns the index of an IndexationPayload.

data(): byte[]‚Äč

Returns the data of an IndexationPayload.

dataString(): String‚Äč

Returns the data of an IndexationPayload.

InfoResponse‚Äč

Response of GET /api/v1/info. Returns general information about the node.

name(): String‚Äč

The name of the node

version(): String‚Äč

The node software version

networkId(): String‚Äč

The network id the node is connected to

bech32Hrp(): String‚Äč

The bech32 HRP which is accepted by this node

messagesPerSecond(): double‚Äč

The messages per second this node is receiving

referencedMessagesPerSecond(): double‚Äč

The referenced messages per second this node is receiving

referencedRate(): double‚Äč

The reference rate

latestMilestoneTimestamp(): long‚Äč

The timestamp of the latest received milestone

minPowScore(): double‚Äč

The minimum required PoW for a message to be accepted

latestMilestoneIndex(): long‚Äč

The index of the latest seen milestone

confirmedMilestoneIndex(): long‚Äč

The index of the latest confirmed milestone

pruningIndex(): long‚Äč

The milestone index this node is pruning from

features(): String[]‚Äč

List of features running on this node

Input‚Äč

kind(): InputKind‚Äč

asUtxo(): UtxoInput‚Äč

asTreasury(): TreasuryInput‚Äč

InputKind‚Äč

UTXO‚Äč

TREASURY‚Äč

LedgerInclusionStateDto‚Äč

CONFLICTING‚Äč

INCLUDED‚Äč

NO_TRANSACTION‚Äč

Message‚Äč

Represent the object that nodes gossip around the network.

builder(): MessageBuilder‚Äč

Creates a new MessageBuilder to construct an instance of a Message.

networkId(): long‚Äč

Returns the network id of a Message.

id(): MessageId‚Äč

Computes the identifier of the message.

nonce(): long‚Äč

Returns the nonce of a Message.

parents(): MessageId[]‚Äč

Returns the parents of a Message.

payload(): Optional<MessagePayload>‚Äč

Returns the optional payload of a Message.

MessageBuilder‚Äč

A builder to build a Message.

MessageBuilder(): MessageBuilder‚Äč

Creates a new MessageBuilder.

networkId(network_id): MessageBuilder‚Äč

Adds a network id to a MessageBuilder.

ParameterTypeDescription
network_idlongThe network id

parents(parents): MessageBuilder‚Äč

Adds parents to a MessageBuilder.

ParameterTypeDescription
parentsMessageId[]A list of parents to set

payload(payload): MessageBuilder‚Äč

Adds a payload to a MessageBuilder.

ParameterTypeDescription
payloadMessagePayloadthe MessagePayload to set

nonceProvider(provider, target_score): MessageBuilder‚Äč

Sets a provider for the nonce. Can currently only be obtained from Client.getPowProvider

ParameterTypeDescription
providerClientMinerSets the nonce provider
target_scoredoubleTarget score for the nonce, Recommended: 4000

finish(): Message‚Äč

Finish the MessageBuilder

MessageId‚Äč

MessageId(): MessageId‚Äč

fromString(str_rep): MessageId‚Äč

Create a MessageId from string

ParameterTypeDescription
str_repString

MessageMetadata‚Äč

Response of GET /api/v1/messages/{message_id}/metadata. Returns the metadata of a message.

messageId(): String‚Äč

The message id of this message

parentMessageIds(): String[]‚Äč

The ids of the parents of this message

isSolid(): boolean‚Äč

IF this message is solid

referencedByMilestoneIndex(): long‚Äč

The optional milestone index if this message is referenced

milestoneIndex(): long‚Äč

The optional milestone index this was included in

ledgerInclusionState(): Optional<LedgerInclusionStateDto>‚Äč

The ledger state

conflictReason(): int‚Äč

The optional reason of conflict

shouldPromote(): Optional<Boolean>‚Äč

Optional; if the message needs to be promoted

shouldReattach(): Optional<Boolean>‚Äč

Optional; if the message needs to be reattached

MessagePayload‚Äč

Message payload wrapper

deserialize(serialised_data): MessagePayload‚Äč

Turns a serialized message payload string back into its class

ParameterTypeDescription
serialised_dataString

payloadType(): MessagePayloadType‚Äč

Get the type of message this contains (used to select the correct getter)

asIndexation(): IndexationPayload‚Äč

asMilestone(): MilestonePayload‚Äč

asTransaction(): TransactionPayload‚Äč

asReceipt(): ReceiptPayload‚Äč

asTreasury(): TreasuryPayload‚Äč

serialize(): String‚Äč

Serializes the message payload into a json string

MessagePayloadType‚Äč

TRANSACTION‚Äč

MILESTONE‚Äč

INDEXATION‚Äč

RECEIPT‚Äč

TREASURY_TRANSACTION‚Äč

MessageWrap‚Äč

message_id(): MessageId‚Äč

The ID of this message

message(): Message‚Äč

The message

MetricsDto‚Äč

newMessages(): long‚Äč

The amount of new messages received

receivedMessages(): long‚Äč

The amount of received messages

knownMessages(): long‚Äč

The amount of received known messages

receivedMessageRequests(): long‚Äč

The amount of received requested messages

receivedMilestoneRequests(): long‚Äč

The amount of received requested milestones

receivedHeartbeats(): long‚Äč

The amount of received heartbeats

sentMessages(): long‚Äč

The amount of sent messages

sentMessageRequests(): long‚Äč

The amount of sent messages requests

sentMilestoneRequests(): long‚Äč

The amount of sent milestone requests

sentHeartbeats(): long‚Äč

The amount of sent heartbeats

droppedPackets(): long‚Äč

The amount of dropped packets

MigratedFundsEntry‚Äč

from(hash, output): MigratedFundsEntry‚Äč

Creates a new MigratedFundsEntry.

ParameterTypeDescription
hashStringThe hash from the transaction used to receive the funds
outputSignatureLockedSingleOutputthe output related to this transaction

tailTransactionHash(): String‚Äč

Returns the tail transaction hash of a MigratedFundsEntry.

output(): SignatureLockedSingleOutput‚Äč

Returns the output of a MigratedFundsEntry.

MigratedFundsEntryDto‚Äč

tailTransactionHash(): String‚Äč

The tail transaction hash

address(): AddressDto‚Äč

The address this was deposited to

deposit(): long‚Äč

The amount that was deposited

MilestoneId‚Äč

fromString(str_rep): MilestoneId‚Äč

ParameterTypeDescription
str_repString

MilestonePayload‚Äč

A payload which defines the inclusion set of other messages in the Tangle.

essence(): MilestonePayloadEssence‚Äč

Returns the essence of a MilestonePayload.

signatures(): MilestoneSignature[]‚Äč

Returns the signatures of a MilestonePayload.

validate(applicable_public_keys, min_threshold): void‚Äč

Semantically validate a MilestonePayload.

ParameterTypeDescription
applicable_public_keysString[]The public keys to use to validate
min_thresholdlongTHe minimum threshold for this to succeed (0...100)

id(): String‚Äč

Computes the identifier of a MilestonePayload.

MilestonePayloadEssence‚Äč

index(): long‚Äč

Returns the index of a MilestonePayloadEssence.

timestamp(): long‚Äč

Returns the timestamp of a MilestonePayloadEssence.

parents(): MessageId[]‚Äč

Returns the parents of a MilestonePayloadEssence.

merkleProof(): byte[]‚Äč

Returns the merkle proof of a MilestonePayloadEssence.

nextPowScore(): long‚Äč

Returns the next proof of work score of a MilestonePayloadEssence.

nextPowScoreMilestone(): long‚Äč

Returns the next proof of work index of a MilestonePayloadEssence.

publicKeys(): PublicKey[]‚Äč

Returns the public keys of a MilestonePayloadEssence.

receipt(): Optional<ReceiptPayload>‚Äč

Returns the optional receipt of a MilestonePayloadEssence.

hash(): byte[]‚Äč

Hashes the MilestonePayloadEssence to be signed.

MilestoneResponse‚Äč

index(): long‚Äč

Milestone index.

messageId(): MessageId‚Äč

Milestone message id

timestamp(): long‚Äč

Milestone timestamp.

MilestoneSignature‚Äč

getSignature(): byte[]‚Äč

Gets the signature of the milestone

MilestoneUtxoChangesResponse‚Äč

index(): long‚Äč

Milestone index.

createdOutputs(): String[]‚Äč

Milestone message id

consumedOutputs(): String[]‚Äč

Milestone timestamp.

MqttEvent‚Äč

CONNECTED‚Äč

Client was connected.

DISCONNECTED‚Äč

Client was disconnected.

MqttListener‚Äč

onEvent(event): void‚Äč

ParameterTypeDescription
eventTopicEvent

MqttManager‚Äč

withTopic(topic): MqttTopicManager‚Äč

Add a new topic to the list.

ParameterTypeDescription
topicTopic

withTopics(topics): MqttTopicManager‚Äč

Add a collection of topics to the list.

ParameterTypeDescription
topicsTopic[]

unsubscribe(): void‚Äč

Unsubscribes from all subscriptions.

disconnect(): void‚Äč

Disconnects the broker. This will clear the stored topic handlers and close the MQTT connection.

MqttTopicManager‚Äč

withTopic(topic): MqttTopicManager‚Äč

Add a new topic to the list.

ParameterTypeDescription
topicTopic

withTopics(topics): MqttTopicManager‚Äč

Add a collection of topics to the list.

ParameterTypeDescription
topicsTopic[]

unsubscribe(): void‚Äč

Unsubscribe from the given topics. If no topics were provided, the function will unsubscribe from every subscribed topic.

NativeAPI‚Äč

The NativeAPI class, which houses all entrypoints to the shared library.

NetworkInfo‚Äč

Struct containing network and PoW related information

network(): Optional<String>‚Äč

networkId(): long‚Äč

bech32Hrp(): String‚Äč

minPowScore(): double‚Äč

localPow(): boolean‚Äč

fallbackToLocalPow(): boolean‚Äč

tipsInterval(): long‚Äč

Node‚Äč

Node struct

url(): String‚Äč

node url

jwt(): Optional<String>‚Äč

node jwt

NodeInfoWrapper‚Äč

Wrapper for node information

url(): String‚Äč

Get the URL from which this info is derived

nodeInfo(): InfoResponse‚Äč

Get the information

Output‚Äč

kind(): OutputKind‚Äč

asSignatureLockedSingleOutput(): SignatureLockedSingleOutput‚Äč

asSignatureLockedDustAllowanceOutput(): SignatureLockedDustAllowanceOutput‚Äč

asTreasuryOutput(): TreasuryOutput‚Äč

OutputDto‚Äč

Wrapper for different output types

kind(): OutputKind‚Äč

asSignatureLockedSingleOutputDto(): SignatureLockedSingleOutputDto‚Äč

asSignatureLockedDustAllowanceOutputDto(): SignatureLockedDustAllowanceOutputDto‚Äč

asTreasuryOutput(): TreasuryOutputDto‚Äč

OutputKind‚Äč

SIGNATURE_LOCKED_SINGLE‚Äč

SIGNATURE_LOCKED_DUST_ALLOWANCE‚Äč

TREASURY‚Äč

OutputResponse‚Äč

Response of GET /api/v1/outputs/{output_id}. Returns all information about a specific output.

messageId(): String‚Äč

The message id this output is related to

transactionId(): String‚Äč

The transaction id this output is related to

outputIndex(): int‚Äč

The output index

isSpent(): boolean‚Äč

true if this output was spent. Otherwise false

output(): OutputDto‚Äč

Get the output object which can be turned into its specific output type

OutputsOptions‚Äč

OutputsOptions(): OutputsOptions‚Äč

Creates a new instance of output options with default values

includeSpent(include_spent): void‚Äč

Whether the query should include spent outputs or not.

ParameterTypeDescription
include_spentboolean

outputType(output_type): void‚Äč

The output type filter.

ParameterTypeDescription
output_typeOutputKind

PeerDto‚Äč

Describes a peer.

id(): String‚Äč

The id of the peer

multiAddresses(): String[]‚Äč

multi addresses

alias(): Optional<String>‚Äč

The alias of the peer

relation(): Relation‚Äč

The type of peer

connected(): boolean‚Äč

true if this peer is connected

gossip(): Optional<GossipDto>‚Äč

The gossip information of this peer

PreparedTransactionData‚Äč

Helper struct for offline signing

deserialize(serialised_data): PreparedTransactionData‚Äč

Turns a serialized preparedTransactionData string back into its class

ParameterTypeDescription
serialised_dataStringThe serialised transaction data

essence(): Essence‚Äč

Transaction essence

addressIndexRecorders(): AddressIndexRecorder[]‚Äč

Required address information for signing

serialize(): String‚Äč

Serializes the prepared data into a json string

PublicKey‚Äč

verify(sig, bytes): boolean‚Äč

Verify the signature and bytes against this public key

ParameterTypeDescription
sigSignatureThe signature to verify
bytesbyte[]The bytes to verify

toBytes(): byte[]‚Äč

Turns ths public key into bytes

tryFromBytes(bytes): PublicKey‚Äč

Attempt to create a public key from the provided bytes

ParameterTypeDescription
bytesbyte[]The bytes to create the key from

ReceiptDto‚Äč

receipt(): ReceiptPayloadDto‚Äč

Get the receipt payload

milestoneIndex(): long‚Äč

Get the milestone index this receipt is related to

ReceiptPayload‚Äč

from(migrated_at, last, funds, transaction): ReceiptPayload‚Äč

Creates a new ReceiptPayload.

ParameterTypeDescription
migrated_atlong
lastboolean
fundsMigratedFundsEntry[]
transactionMessagePayload

migratedAt(): long‚Äč

Returns the milestone index at which the funds of a ReceiptPayload were migrated at in the legacy network.

last(): boolean‚Äč

Returns whether a ReceiptPayload is the final one for a given migrated at index.

funds(): MigratedFundsEntry[]‚Äč

The funds which were migrated with a ReceiptPayload.

transaction(): TreasuryPayload‚Äč

The TreasuryTransaction used to fund the funds of a ReceiptPayload.

amount(): long‚Äč

Returns the sum of all MigratedFundsEntry items within a ReceiptPayload.

ReceiptPayloadDto‚Äč

kind(): long‚Äč

The type of receipt

migratedAt(): long‚Äč

The milestone index at which the funds of a ReceiptPayload were migrated

funds(): MigratedFundsEntryDto[]‚Äč

The funds which are migrated

last(): boolean‚Äč

Whether a ReceiptPayload is the final one for a given migrated at index.

ReferenceUnlock‚Äč

from(index): ReferenceUnlock‚Äč

Creates a new ReferenceUnlock.

ParameterTypeDescription
indexintThe unlock block index we use for signature

index(): int‚Äč

Return the index of a ReferenceUnlock.

RegularEssence‚Äč

inputs(): Input[]‚Äč

Gets the transaction inputs.

outputs(): Output[]‚Äč

Gets the transaction outputs.

payload(): Optional<MessagePayload>‚Äč

Relation‚Äč

KNOWN‚Äč

UNKNOWN‚Äč

AUTOPEERED‚Äč

RustHex‚Äč

encode(a0): String‚Äč

ParameterTypeDescription
a0String

encode(a0): String‚Äč

ParameterTypeDescription
a0byte[]

decode(s): byte[]‚Äč

ParameterTypeDescription
sString

decode(s): byte[]‚Äč

ParameterTypeDescription
sbyte[]

RustLogging‚Äč

init(): void‚Äč

SecretKey‚Äč

generate(): SecretKey‚Äč

Generate a new secret key

fromBytes(bytes): SecretKey‚Äč

Create a new secret key from the bytes

ParameterTypeDescription
bytesbyte[]The bytes to create the key from

publicKey(): PublicKey‚Äč

Derive a public key from the secret key

toBytes(): byte[]‚Äč

Turn this Secret key into bytes

sign(bytes): Signature‚Äč

Sign the bytes using this key

ParameterTypeDescription
bytesbyte[]the Bytes to sign

Signature‚Äč

toBytes(): byte[]‚Äč

Turn the signature into bytes

fromBytes(bs): Signature‚Äč

Turns bytes into a signature

ParameterTypeDescription
bsbyte[]

SignatureLockedDustAllowanceOutput‚Äč

Output type for deposits that enables an address to receive dust outputs. It can be consumed as an input like a regular SigLockedSingleOutput.

from(address, amount): SignatureLockedDustAllowanceOutput‚Äč

Creates a new SignatureLockedDustAllowanceOutput.

ParameterTypeDescription
addressAddressThe address to set
amountlongThe amount to set

amount(): long‚Äč

Returns the amount of a SignatureLockedDustAllowanceOutput.

address(): Address‚Äč

Returns the address of a SignatureLockedDustAllowanceOutput.

SignatureLockedDustAllowanceOutputDto‚Äč

Output type for deposits that enables an address to receive dust outputs. It can be consumed as an input like a regular SigLockedSingleOutput.

amount(): long‚Äč

Returns the amount of a SignatureLockedDustAllowanceOutputDto.

address(): AddressDto‚Äč

Returns the address of a SignatureLockedDustAllowanceOutputDto.

SignatureLockedSingleOutput‚Äč

Describes a deposit to a single address which is unlocked via a signature.

from(address, amount): SignatureLockedSingleOutput‚Äč

Creates a new SignatureLockedSingleOutput.

ParameterTypeDescription
addressAddressThe address to set
amountlongThe amount to set

amount(): long‚Äč

Returns the amount of a SignatureLockedSingleOutput.

address(): Address‚Äč

Returns the address of a SignatureLockedSingleOutput.

SignatureLockedSingleOutputDto‚Äč

Describes a deposit to a single address which is unlocked via a signature.

amount(): long‚Äč

Returns the amount of a SignatureLockedSingleOutputDto.

address(): AddressDto‚Äč

Returns the address of a SignatureLockedSingleOutputDto.

SignatureUnlock‚Äč

SignatureUnlock(public_key, signature): SignatureUnlock‚Äč

Create a new Signature inlock block

ParameterTypeDescription
public_keybyte[]The public ket used for this signature block
signaturebyte[]The signature created for this unlock block

Topic‚Äč

from(topic): Topic‚Äč

Creates a new topic and checks if it's valid.

ParameterTypeDescription
topicString

TopicEvent‚Äč

topic(): String‚Äč

the MQTT topic.

payload(): String‚Äč

The MQTT event payload.

TransactionId‚Äč

fromString(str_rep): TransactionId‚Äč

Create a TransactionId from string

ParameterTypeDescription
str_repString

TransactionPayload‚Äč

builder(): TransactionPayloadBuilder‚Äč

Return a new TransactionPayloadBuilder to build a TransactionPayload.

essence(): Essence‚Äč

Return the essence of a TransactionPayload.

id(): TransactionId‚Äč

Computes the identifier of a TransactionPayload.

unlockBlocks(): UnlockBlock[]‚Äč

Return unlock blocks of a TransactionPayload.

TransactionPayloadBuilder‚Äč

TransactionPayloadBuilder(): TransactionPayloadBuilder‚Äč

Creates a new TransactionPayloadBuilder.

withEssence(essence): TransactionPayloadBuilder‚Äč

Adds an essence to a TransactionPayloadBuilder.

ParameterTypeDescription
essenceEssence

withUnlockBlocks(unlock_blocks): TransactionPayloadBuilder‚Äč

Adds unlock blocks to a TransactionPayloadBuilder.

ParameterTypeDescription
unlock_blocksUnlockBlocks

finish(): TransactionPayload‚Äč

Finishes a TransactionPayloadBuilder into a TransactionPayload.

TreasuryInput‚Äč

TreasuryInput is an input which references a milestone which generated a TreasuryOutput.

TreasuryInput(id): TreasuryInput‚Äč

Create a new TreasuryInput

ParameterTypeDescription
idMilestoneIdThe MilestoneId which Generated a TreasuryOutput

milestoneId(): MilestoneId‚Äč

Returns the milestones id of a TreasuryInput.

TreasuryOutput‚Äč

Trasury output.

from(amount): TreasuryOutput‚Äč

Creates a new TreasuryOutput with the amount supplied

ParameterTypeDescription
amountlongThe amount to set

amount(): long‚Äč

Returns the amount of a TreasuryOutput.

TreasuryOutputDto‚Äč

kind(): short‚Äč

The type of Treasury DTO

amount(): long‚Äč

The amount in the treasury

TreasuryPayload‚Äč

TreasuryPayload(input, output): TreasuryPayload‚Äč

ParameterTypeDescription
inputTreasuryInput
outputTreasuryOutput

output(): TreasuryOutput‚Äč

input(): TreasuryInput‚Äč

TreasuryResponse‚Äč

Response of GET /api/v1/treasury. Returns all information about the treasury.

amount(): long‚Äč

The amount in the treasury

milestoneId(): String‚Äč

The milestone ID this reponse relates to

UnlockBlock‚Äč

kind(): UnlockBlockKind‚Äč

asReference(): ReferenceUnlock‚Äč

asSignature(): SignatureUnlock‚Äč

UnlockBlockKind‚Äč

ED25519‚Äč

REFERENCE‚Äč

UnlockBlocks‚Äč

from(unlock_blocks): UnlockBlocks‚Äč

ParameterTypeDescription
unlock_blocksUnlockBlock[]

get(index): Optional<UnlockBlock>‚Äč

Gets a clone of an UnlockBlock from UnlockBlocks. Returns the referenced unlock block if the requested unlock block was a reference.

ParameterTypeDescription
indexlong

Util‚Äč

consolidateFunds(client, seed, account_index, address_range_low, address_range_high): String‚Äč

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

ParameterTypeDescription
clientClient
seedString
account_indexlong
address_range_lowlong
address_range_highlong

searchAddress(seed, bech32_hrp, account_index, range_low, range_high, address): IndexPublicDto‚Äč

Function to find the index and public or internal type of an Bech32 encoded address

ParameterTypeDescription
seedString
bech32_hrpString
account_indexlong
range_lowlong
range_highlong
addressAddress

UtxoInput‚Äč

Represents an input referencing an output.

from(id, index): UtxoInput‚Äč

Create a new UtxoInput

ParameterTypeDescription
idTransactionIdThe ouput Id
indexintThe output Index

transactionId(): TransactionId‚Äč

Returns the TransactionId of the Output.

index(): int‚Äč

Returns the index of the Output.