Skip to main content
Version: IOTA

Java API Reference

Account‚Äč

consolidateOutputs(include_dust_allowance_outputs): Message[]‚Äč

Consolidate account outputs.

ParameterTypeDescription
include_dust_allowance_outputsbooleanWether we include dust outputs or not

transfer(transfer): Message‚Äč

Send messages.

ParameterTypeDescription
transferTransferA transfer object, can be made using Transfer.builder

retry(message_id): Message‚Äč

Retry message.

ParameterTypeDescription
message_idMessageIdThe id of the message we want to retry

promote(message_id): Message‚Äč

Promote message.

ParameterTypeDescription
message_idMessageIdThe id of the message we want to promote

reattach(message_id): Message‚Äč

Reattach message.

ParameterTypeDescription
message_idMessageIdThe id of the message we want to reattach

generateAddress(): Address‚Äč

Gets a new unused address and links it to this account.

generateAddresses(amount): Address[]‚Äč

Gets amount new unused addresses and links them to this account.

ParameterTypeDescription
amountlongThe amount of addresses we generate

getUnusedAddress(): Address‚Äč

Synchronizes the account addresses with the Tangle and returns the latest address in the account, which is an address without balance.

isLatestAddressUnused(): boolean‚Äč

Syncs the latest address with the Tangle and determines whether it's unused or not. An unused address is an address without balance and associated message history. Note that such address might have been used in the past, because the message history might have been pruned by the node.

latestAddress(): Address‚Äč

Returns the most recent address of the account.

balance(): AccountBalance‚Äč

Gets the account balance information.

setAlias(alias): void‚Äč

Updates the account alias.

ParameterTypeDescription
aliasStringThe new alias

setClientOptions(options): void‚Äč

Updates the account's client options.

ParameterTypeDescription
optionsClientOptionsThe new options

listMessages(count, from, message_type): Message[]‚Äč

Gets a list of transactions on this account. It's fetched from the storage. To ensure the database is updated with the latest transactions, sync should be called first.

// gets 10 received messages, skipping the first 5 most recent messages.
ClientOptions clientOptions = ClientOptionsBuilder::new()
.withNode("https://api.lb-0.h.chrysalis-devnet.iota.cafe")
.build();

AccountManager manager = AccountManager.builder()
.withStorage("./test-storage", null)
.finish();
manager.setStrongholdPassword("password");
manager.storeMnemonic(SignerType.STRONGHOLD, null);

Account account = manager
.createAccount(clientOptions)
.unwrap()
.initialise();
account.listMessages(10, 5, MessageType.RECEIVED));
ParameterTypeDescription
countlongNumber of (most recent) messages to fetch.
fromlongStarting point of the subset to fetch.
message_typeMessageTypeOptional message type filter., can be null

listSpentAddresses(): Address[]‚Äč

Gets the spent addresses.

listUnspentAddresses(): Address[]‚Äč

Gets the unspent addresses.

getMessage(message_id): Optional<Message>‚Äč

Gets a message with the given id associated with this account.

ParameterTypeDescription
message_idMessageIdThe id of the message we want to get

getNodeInfo(node, jwt, username, password): NodeInfoWrapper‚Äč

Gets the node info from /api/v1/info endpoint TODO: Add auth and url in one NodeInfoOptions struct.

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

alias(): String‚Äč

The account alias.

bech32Hrp(): String‚Äč

Returns the address bech32 human readable part.

id(): String‚Äč

The account identifier.

createdAt(): Calendar‚Äč

Time of account creation.

sync(): AccountSynchronizer‚Äč

Returns the builder to setup the process to synchronize this account with the Tangle.

lastSyncedAt(): Optional<Calendar>‚Äč

Time the account was last synced with the Tangle.

clientOptions(): ClientOptions‚Äč

The current client options.

AccountBalance‚Äč

Account balance information.

getTotal(): long‚Äč

Account's total balance.

getAvailable(): long‚Äč

For example, if a user with 50i total account balance has made a message spending 20i, the available balance should be (50i-30i) = 20i.

getIncoming(): long‚Äč

Balances from message with incoming: true. Note that this may not be accurate since the node prunes the messags.

getOutgoing(): long‚Äč

Balances from message with incoming: false. Note that this may not be accurate since the node prunes the messags.

AccountInitialiser‚Äč

signerType(signer_type): AccountInitialiser‚Äč

Sets the account type.

ParameterTypeDescription
signer_typeAccountSignerType

alias(alias): AccountInitialiser‚Äč

Defines the account alias. If not defined, we'll generate one.

ParameterTypeDescription
aliasString

createdAt(created_at): AccountInitialiser‚Äč

Time of account creation.

ParameterTypeDescription
created_atlong

messages(messages): AccountInitialiser‚Äč

Messages associated with the seed. The account can be initialised with locally stored messages.

ParameterTypeDescription
messagesMessage[]

addresses(addresses): AccountInitialiser‚Äč

Address history associated with the seed. The account can be initialised with locally stored address history.

ParameterTypeDescription
addressesAddress[]

skipPersistence(): AccountInitialiser‚Äč

Skips storing the account to the database.

allowCreateMultipleEmptyAccounts(): AccountInitialiser‚Äč

Enables creating multiple accounts without history. The wallet disables it by default to simplify account discovery.

initialise(): Account‚Äč

Initialises the account.

AccountManager‚Äč

The account manager.

Used to manage multiple accounts.

Builder(): AccountManagerBuilder‚Äč

Initialises the account manager builder.

getMigrationData(nodes, seed, permanode, security_level, initial_address_index, gap_limit): MigrationData‚Äč

Gets the legacy migration data for the seed.

ParameterTypeDescription
nodesString[]List of legacy nodes to connect to
seedStringThe seed we want to get data for
permanodeStringThe legacy permanode URL
security_levelbyteThe seed security level
initial_address_indexlongThe starting index of the seed we searc
gap_limitlongThe maximum gap we cross without finding an address with balance

getMigrationAddress(ledger_prompt, account_id): MigrationAddress‚Äč

Convert the first address from the first account to a migration tryte address

ParameterTypeDescription
ledger_promptboolean
account_idString

createMigrationBundle(seed, input_address_indexes, options): MigrationBundle‚Äč

Creates the bundle for migration associated with the given input indexes, Performs bundle mining if the address is spent and mine is true, And signs the bundle. Returns the bundle hash. It logs the operations to $storage_path.join(log_file_name).

ParameterTypeDescription
seedString
input_address_indexeslong[]
optionsMigrationBundleOptions

sendMigrationBundle(nodes, bundle_hash, mwm): void‚Äč

Sends the migration bundle to the given node. mwm 0 for default(14)

ParameterTypeDescription
nodesString[]
bundle_hashString
mwmshort

startBackgroundSync(polling_interval, automatic_output_consolidation): void‚Äč

Initialises the background polling and MQTT monitoring.

ParameterTypeDescription
polling_intervalfloatSets the polling interval in seconds
automatic_output_consolidationbooleanIf we automatically consolidate outputs

stopBackgroundSync(): void‚Äč

Stops the background polling and MQTT monitoring.

setStoragePassword(password): void‚Äč

Sets the password for the stored accounts.

ParameterTypeDescription
passwordStringThe Storage password

setStrongholdPassword(password): void‚Äč

Sets the stronghold password.

ParameterTypeDescription
passwordStringThe Stronghold snapshot password

changeStrongholdPassword(current_password, new_password): void‚Äč

Changes the stronghold password.

ParameterTypeDescription
current_passwordStringThe current Stronghold password
new_passwordStringThe new Stronghold password

isLatestAddressUnused(): boolean‚Äč

Determines whether all accounts has the latest address unused.

setClientOptions(options): void‚Äč

Sets the client options for all accounts.

ParameterTypeDescription
optionsClientOptions

storeMnemonic(signer_type, mnemonic): void‚Äč

Stores a mnemonic for the given signer type. If the mnemonic is not provided, we'll generate one.

ParameterTypeDescription
signer_typeAccountSignerType
mnemonicString

generateMnemonic(): String‚Äč

Generates a new mnemonic.

verifyMnemonic(mnemonic): void‚Äč

Checks is the mnemonic is valid. If a mnemonic was generated with generate_mnemonic(), the mnemonic here should match the generated.

ParameterTypeDescription
mnemonicString

createAccount(client_options): AccountInitialiser‚Äč

Adds a new account.

ParameterTypeDescription
client_optionsClientOptions

removeAccount(account_id): void‚Äč

Deletes an account.

ParameterTypeDescription
account_idString

syncAccounts(): AccountsSynchronizer‚Äč

Syncs all accounts.

internalTransfer(from_account_id, to_account_id, amount): Message‚Äč

Transfers an amount from an account to another.

ParameterTypeDescription
from_account_idString
to_account_idString
amountlong

backup(destination, stronghold_password): Path‚Äč

Backups the storage to the given destination

ParameterTypeDescription
destinationString
stronghold_passwordString

importAccounts(source, stronghold_password): void‚Äč

Import backed up accounts.

ParameterTypeDescription
sourceString
stronghold_passwordString

getAccount(account_id): Account‚Äč

Gets the account associated with the given identifier.

ParameterTypeDescription
account_idString

getAccounts(): Account[]‚Äč

Gets all accounts from storage.

reattach(account_id, message_id): Message‚Äč

Reattaches an unconfirmed transaction.

ParameterTypeDescription
account_idString
message_idMessageId

promote(account_id, message_id): Message‚Äč

Promotes an unconfirmed transaction.

ParameterTypeDescription
account_idString
message_idMessageId

retry(account_id, message_id): Message‚Äč

Retries an unconfirmed transaction.

ParameterTypeDescription
account_idString
message_idMessageId

AccountManagerBuilder‚Äč

Account manager builder.

AccountManagerBuilder(): AccountManagerBuilder‚Äč

Initialises a new instance of the account manager builder with the default storage adapter.

withStorage(storage_path, password): AccountManagerBuilder‚Äč

Sets the storage config to be used.

ParameterTypeDescription
storage_pathStringThe path where the database file will be saved
passwordStringThe storage password

withPollingInterval(polling_interval): AccountManagerBuilder‚Äč

Sets the polling interval.

ParameterTypeDescription
polling_intervalfloatthe polling interval in seconds

withSkipPolling(): AccountManagerBuilder‚Äč

Skip polling

withOutputConsolidationThreshold(threshold): AccountManagerBuilder‚Äč

Sets the number of outputs an address must have to trigger the automatic consolidation process.

ParameterTypeDescription
thresholdlongThe number of outputs an address must have to trigger the automatic consolidation process

withAutomaticOutputConsolidationDisabled(): AccountManagerBuilder‚Äč

Disables the automatic output consolidation process.

withSyncSpentOutputs(): AccountManagerBuilder‚Äč

Enables fetching spent output history on sync.

withEventPersistence(): AccountManagerBuilder‚Äč

Enables event persistence.

withMultipleEmptyAccounts(): AccountManagerBuilder‚Äč

Enables creating multiple accounts without history. The wallet disables it by default to simplify account discovery.

finish(): AccountManager‚Äč

Builds the manager.

AccountSignerType‚Äč

STRONGHOLD‚Äč

LEDGER_NANO‚Äč

LEDGER_NANO_SIMULATOR‚Äč

AccountSynchronizer‚Äč

Account sync helper.

gapLimit(limit): AccountSynchronizer‚Äč

Number of address indexes that are generated.

ParameterTypeDescription
limitlongThe maximum gap we cross without finding an address with balance

skipPersistence(): AccountSynchronizer‚Äč

Skip saving new messages and addresses on the account object. The found data is returned on the execute call but won't be persisted on the database.

skipChangeAddresses(): AccountSynchronizer‚Äč

Skip syncing existing change addresses.

addressIndex(address_index): AccountSynchronizer‚Äč

Initial address index to start syncing.

ParameterTypeDescription
address_indexlongThe starting index

execute(): SyncedAccount‚Äč

Syncs account with the tangle. The account syncing process ensures that the latest metadata (balance, transactions) associated with an account is fetched from the tangle and is stored locally.

AccountsSynchronizer‚Äč

The accounts synchronizer.

gapLimit(limit): AccountsSynchronizer‚Äč

Number of address indexes that are generated.

ParameterTypeDescription
limitlongThe maximum gap we cross without finding an address with balance

addressIndex(address_index): AccountsSynchronizer‚Äč

Initial address index to start syncing.

ParameterTypeDescription
address_indexlongThe starting index

skipAccountDiscovery(): AccountsSynchronizer‚Äč

Skips the account discovery process.

skipChangeAddresses(): AccountsSynchronizer‚Äč

Skip syncing existing change addresses.

accountDiscoveryThreshold(account_discovery_threshold): AccountsSynchronizer‚Äč

Sets the minimum number of accounts to check on the discovery process.

ParameterTypeDescription
account_discovery_thresholdlongThe minimum accounts number

execute(): SyncedAccount[]‚Äč

Syncs the accounts with the Tangle.

Actor‚Äč

iotaInitialize(cb, actor_id, storage_path): void‚Äč

ParameterTypeDescription
cbActorCallback
actor_idString
storage_pathString

iotaDestroy(actor_id): void‚Äč

ParameterTypeDescription
actor_idString

iotaSendMessage(message): void‚Äč

ParameterTypeDescription
messageString

iotaListen(actor_id, id, event): void‚Äč

ParameterTypeDescription
actor_idString
idString
eventEventType

iotaInitLogger(file_name): void‚Äč

ParameterTypeDescription
file_nameString

ActorCallback‚Äč

onEvent(event): void‚Äč

ParameterTypeDescription
eventString

Address‚Äč

An address.

builder(): AddressBuilder‚Äč

Gets a new instance of the address builder.

balance(): long‚Äč

Address total balance

readable(): String‚Äč

the Bech32 human readable part.

address(): AddressWrapper‚Äč

The address.

AddressBuilder‚Äč

address(address): AddressBuilder‚Äč

Defines the address.

ParameterTypeDescription
addressAddressWrapper

keyIndex(key_index): AddressBuilder‚Äč

Sets the address key index.

ParameterTypeDescription
key_indexlong

outputs(outputs): AddressBuilder‚Äč

Sets the address outputs.

ParameterTypeDescription
outputsAddressOutput[]

internal(internal): AddressBuilder‚Äč

Sets the internal flag.

ParameterTypeDescription
internalboolean

build(): Address‚Äč

Builds the address.

AddressConsolidationNeededEvent‚Äč

The address consolidation needed data.

accountId(): String‚Äč

The associated account identifier.

address(): AddressWrapper‚Äč

The associated address.

AddressConsolidationNeededListener‚Äč

onAddressConsolidationNeeded(event): void‚Äč

ParameterTypeDescription
eventAddressConsolidationNeededEvent

AddressData‚Äč

Address data for TransferProgressType.GeneratingRemainderDepositAddress and LedgerAddressGeneration.

address(): String‚Äč

The address.

AddressOutput‚Äč

An Address output.

transactionId(): TransactionId‚Äč

Transaction ID of the output

setTransactionId(transaction_id): void‚Äč

ParameterTypeDescription
transaction_idTransactionId

messageId(): MessageId‚Äč

Message ID of the output

setMessageId(message_id): void‚Äč

ParameterTypeDescription
message_idMessageId

index(): int‚Äč

Output index.

setIndex(index): void‚Äč

ParameterTypeDescription
indexint

amount(): long‚Äč

Output amount.

setAmount(amount): void‚Äč

ParameterTypeDescription
amountlong

isSpent(): boolean‚Äč

Spend status of the output,

setSpent(is_spent): void‚Äč

ParameterTypeDescription
is_spentboolean

address(): AddressWrapper‚Äč

Associated address.

setAddress(address): void‚Äč

ParameterTypeDescription
addressAddressWrapper

kind(): OutputKind‚Äč

Output kind.

setKind(kind): void‚Äč

ParameterTypeDescription
kindOutputKind

AddressWrapper‚Äč

from(address, bech32_hrp): AddressWrapper‚Äč

Create an Address based on its address and Bech segments

ParameterTypeDescription
addressStringThe Address segment
bech32_hrpStringthe bech segment

parse(address): AddressWrapper‚Äč

parse a fully functional address string into an AddressWrapper

ParameterTypeDescription
addressStringThe address we will parse

toBech32(): String‚Äč

Get the bech segment of the address

Api‚Äč

GET_TIPS‚Äč

get_tips API

POST_MESSAGE‚Äč

post_message API

GET_OUTPUT‚Äč

get_output API

GET_BALANCE‚Äč

get_balance API

BalanceChange‚Äč

The balance change event payload.

isSpent(): boolean‚Äč

Checks if spent was more than 0

spent(): long‚Äč

The change amount if it was a spent event.

received(): long‚Äč

The change amount if it was a receive event.

BalanceChangeListener‚Äč

onBalanceChange(event): void‚Äč

ParameterTypeDescription
eventBalanceEvent

BalanceEvent‚Äč

The balance change event data.

indexationId(): String‚Äč

Event unique identifier.

accountId(): String‚Äč

The associated account identifier.

messageId(): Optional<MessageId>‚Äč

The message id associated with the balance change. Note that this might be empty without AccountManagerBuilder#withSyncSpentOutputs

address(): AddressWrapper‚Äč

The associated address.

remainder(): Optional<Boolean>‚Äč

Whether the event is associated with a remainder output or not. Note that this might be empty if we couldn't get the message object from the node.

balanceChange(): BalanceChange‚Äč

The balance change data.

BroadcastTransactionListener‚Äč

onBroadcastTransaction(event): void‚Äč

ParameterTypeDescription
eventTransactionEvent

BroadcastingBundle‚Äč

Broadcasting the given bundle hash.

getBundleHash(): String‚Äč

The bundle hash.

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

ClientOptions‚Äč

The client options type.

ClientOptionsBuilder‚Äč

The options builder for a client connected to multiple nodes.

ClientOptionsBuilder(): ClientOptionsBuilder‚Äč

Initialises a new instance of the builder.

withPrimaryNode(node): ClientOptionsBuilder‚Äč

Sets the primary node.

ParameterTypeDescription
nodeStringThe node URL

withPrimaryNodeAuth(node, jwt, username, password): ClientOptionsBuilder‚Äč

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): ClientOptionsBuilder‚Äč

Sets the primary PoW node.

ParameterTypeDescription
nodeString

withPrimaryPowNodeAuth(node, jwt, username, password): ClientOptionsBuilder‚Äč

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

withNode(node): ClientOptionsBuilder‚Äč

Adds a node to the node list.

ParameterTypeDescription
nodeStringThe node URL

withNodes(nodes): ClientOptionsBuilder‚Äč

ClientOptions connected to a list of nodes.

ParameterTypeDescription
nodesString[]The list of node URLs

withNodePoolUrls(node_pool_urls): ClientOptionsBuilder‚Äč

Get node list from the node_pool_urls

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

withNetwork(network): ClientOptionsBuilder‚Äč

ClientOptions connected to the default Network pool.

import org.iota.wallet.ClientOptionsBuilder;
ClientOptions clientOptions = new ClientOptionsBuilder().with_network("testnet2").build();
ParameterTypeDescription
networkStringThe network we connect to

withNodeSyncInterval(node_sync_interval): ClientOptionsBuilder‚Äč

Set the node sync interval

ParameterTypeDescription
node_sync_intervalfloatThe interval in seconds

withNodeSyncDisabled(): ClientOptionsBuilder‚Äč

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

withMqttBrokerOptions(options): ClientOptionsBuilder‚Äč

Sets the MQTT broker options.

ParameterTypeDescription
optionsBrokerOptionsthe MQTT options

withMqttDisabled(): ClientOptionsBuilder‚Äč

Disables MQTT

withLocalPow(local): ClientOptionsBuilder‚Äč

Sets whether the PoW should be done locally or remotely.

ParameterTypeDescription
localbooleanEnables or disables local PoW

withRequestTimeout(timeout): ClientOptionsBuilder‚Äč

Sets the request timeout.

ParameterTypeDescription
timeoutfloatThe request timeout in seconds

withApiTimeout(api, timeout): ClientOptionsBuilder‚Äč

Sets the request timeout for a specific API usage.

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

build(): ClientOptions‚Äč

Builds the options.

ErrorListener‚Äč

onError(error): void‚Äč

ParameterTypeDescription
errorString

Essence‚Äč

asRegular(): RegularEssence‚Äč

EventId‚Äč

The event identifier type.

EventManager‚Äč

subscribeErrors(cb): EventId‚Äč

Listen to errors.

ParameterTypeDescription
cbErrorListener

subscribeNewTransaction(cb): EventId‚Äč

Listen to new messages.

ParameterTypeDescription
cbNewTransactionListener

subscribeConfirmationStateChange(cb): EventId‚Äč

Listen to transaction confirmation state change.

ParameterTypeDescription
cbTransactionConfirmationChangeListener

subscribeReattachment(cb): EventId‚Äč

Listen to transaction reattachment change.

ParameterTypeDescription
cbReattachTransactionListener

subscribeBroadcast(cb): EventId‚Äč

Listen to transaction broadcast.

ParameterTypeDescription
cbBroadcastTransactionListener

subscribeTransferProgress(cb): EventId‚Äč

Listen to a transfer event.

ParameterTypeDescription
cbTransferProgressListener

subscribeMigrationProgress(cb): EventId‚Äč

Listen to a migration event.

ParameterTypeDescription
cbMigrationProgressListener

subscribeBalanceChange(cb): EventId‚Äč

Listen to balance changes.

ParameterTypeDescription
cbBalanceChangeListener

subscribeStrongholdStatusChange(cb): EventId‚Äč

Listen to stronghold status change events.

ParameterTypeDescription
cbStrongholdStatusListener

subscribeAddressConsolidationNeeded(cb): EventId‚Äč

Listen to address consolidation needed events.

ParameterTypeDescription
cbAddressConsolidationNeededListener

removeErrorListener(event): void‚Äč

Removes the error listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeNewTransactionListener(event): void‚Äč

Removes the new transaction listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeConfirmationStateChangeListener(event): void‚Äč

Removes the new confirmation state change listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeReattachmentListener(event): void‚Äč

Removes the reattachment listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeBroadcastListener(event): void‚Äč

Removes the broadcast listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeTransferProgressListener(event): void‚Äč

Remove a transfer event listener.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeMigrationProgressListener(event): void‚Äč

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove Remove a migration event listener.

removeBalanceChangeListener(event): void‚Äč

Removes the balance change listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeStrongholdStatusChangeListener(event): void‚Äč

Removes the stronghold status change listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

removeAddressConsolidationNeededListener(event): void‚Äč

Removes the balance change listener associated with the given identifier.

ParameterTypeDescription
eventEventIdThe ID of the listener we want to remove

EventType‚Äč

ERROR_THROWN‚Äč

BALANCE_CHANGE‚Äč

NEW_TRANSACTION‚Äč

CONFIRMATION_STATE_CHANGE‚Äč

REATTACHMENT‚Äč

BROADCAST‚Äč

STRONGHOLD_STATUS_CHANGE‚Äč

TRANSFER_PROGRESS‚Äč

MIGRATION_PROGRESS‚Äč

FetchingMigrationData‚Äč

Fetching migration data on the given address range.

getInitialAddressIndex(): long‚Äč

The initial address index on the fetch range.

getFinalAddressIndex(): long‚Äč

The final address index on the fetch range.

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 indexMilestoneSignature

index(): byte[]‚Äč

Returns the index of an IndexationPayload.

data(): byte[]‚Äč

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

InputData‚Äč

Address can be used as input to spend balance

address(): String‚Äč

Input address

securityLvl(): short‚Äč

Security level

balance(): long‚Äč

Balance of the address

index(): long‚Äč

Index of the address

spent(): boolean‚Äč

Spent status

spentBundlehashes(): String[]‚Äč

Spent bundlehashes

InputKind‚Äč

UTXO‚Äč

TREASURY‚Äč

Message‚Äč

id(): MessageId‚Äč

version(): long‚Äč

parents(): MessageId[]‚Äč

payloadLength(): long‚Äč

payload(): Optional<MessagePayload>‚Äč

timestamp(): Date‚Äč

nonce(): long‚Äč

confirmed(): Optional<Boolean>‚Äč

broadcasted(): boolean‚Äč

MessageId‚Äč

MessageId(): MessageId‚Äč

fromString(str_rep): MessageId‚Äč

ParameterTypeDescription
str_repString

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‚Äč

MessageType‚Äč

RECEIVED‚Äč

SENT‚Äč

FAILED‚Äč

UNCONFIRMED‚Äč

VALUE‚Äč

CONFIRMED‚Äč

MigratedFundsEntry‚Äč

tailTransactionHash(): String‚Äč

Returns the tail transaction hash of a MigratedFundsEntry.

output(): SignatureLockedSingleOutput‚Äč

Returns the output of a MigratedFundsEntry.

MigrationAddress‚Äč

Migration address

trytes(): String‚Äč

address tryte encoded

bech32(): String‚Äč

address bech32 encoded

MigrationBundle‚Äč

Migration bundle.

crackability(): double‚Äč

The bundle crackability if it was mined.

getBundleHash(): String‚Äč

The bundle hash.

MigrationBundleOptions‚Äč

Finds account data for the migration from legacy network.

MigrationBundleOptions(): MigrationBundleOptions‚Äč

setMine(node): void‚Äč

ParameterTypeDescription
nodeboolean

mine(): boolean‚Äč

setTimeouts(secs): void‚Äč

Sets the timeout in seconds, negative to set default

ParameterTypeDescription
secslong

timeouts(): long‚Äč

Returns the set timeout, defaults to 10 minutes

setOffset(offset): void‚Äč

ParameterTypeDescription
offsetLong

offset(): OptionalLong‚Äč

setLogFileName(log_file_name): void‚Äč

ParameterTypeDescription
log_file_nameString

logFileName(): Optional<String>‚Äč

MigrationData‚Äč

Migration data.

balance(): long‚Äč

Total seed balance.

lastCheckedAddressIndex(): long‚Äč

The index of the last checked address. Useful if you want to call the finder again.

inputs(): InputData[]‚Äč

Migration inputs.

spentAddresses(): boolean‚Äč

If any of the inputs are spent

MigrationProgressEvent‚Äč

Type container for handling the different Migration events.

getType(): MigrationProgressType‚Äč

asFetchingMigrationData(): FetchingMigrationData‚Äč

asMiningBundle(): MiningBundle‚Äč

asSigningBundle(): SigningBundle‚Äč

asBroadcastingBundle(): BroadcastingBundle‚Äč

asTransactionConfirmed(): TransactionConfirmed‚Äč

MigrationProgressListener‚Äč

onMigrationProgress(event): void‚Äč

ParameterTypeDescription
eventMigrationProgressEvent

MigrationProgressType‚Äč

Migration event type.

FETCHING_MIGRATION_DATA‚Äč

Fetching migration data on the given address range.

MINING_BUNDLE‚Äč

Mining the bundle with the given spent address.

SIGNING_BUNDLE‚Äč

Signing the bundle.

BROADCASTING_BUNDLE‚Äč

Broadcasting the given bundle hash.

TRANSACTION_CONFIRMED‚Äč

Transaction confirmation event.

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.

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.

MilestoneSignature‚Äč

getSignature(): byte[]‚Äč

Gets the signature of the milestone

MiningBundle‚Äč

Mining the bundle with the given spent address.

getAddress(): String‚Äč

The spent address.

NativeAPI‚Äč

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

NewTransactionListener‚Äč

onNewTransaction(event): void‚Äč

ParameterTypeDescription
eventTransactionEvent

NodeInfoWrapper‚Äč

url(): String‚Äč

Get the URL from which this info is derived

nodeInfo(): InfoResponse‚Äč

Get the information

OutputKind‚Äč

NONE‚Äč

SIGNATURE_LOCKED_SINGLE‚Äč

SIGNATURE_LOCKED_DUST_ALLOWANCE‚Äč

TREASURY‚Äč

PreparedTransactionData‚Äč

Prepared transaction event data.

inputs(): TransactionIO[]‚Äč

Transaction inputs.

outputs(): TransactionIO[]‚Äč

Transaction outputs.

data(): Optional<String>‚Äč

The indexation data.

PublicKey‚Äč

verify(sig, msg): boolean‚Äč

Verify the signature and bytes against this public key

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

toBytes(): byte[]‚Äč

Turns ths public key into bytes

tryFromBytes(bs): PublicKey‚Äč

Attempt to create a public key from the provided bytes

ParameterTypeDescription
bsbyte[]

ReattachTransactionListener‚Äč

onReattachTransaction(event): void‚Äč

ParameterTypeDescription
eventTransactionReattachmentEvent

ReceiptPayload‚Äč

migratedAt(): long‚Äč

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

last(): boolean‚Äč

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

funds(): MigratedFundsEntry[]‚Äč

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(): TransactionInput[]‚Äč

Gets the transaction inputs.

outputs(): TransactionOutput[]‚Äč

Gets the transaction outputs.

payload(): Optional<IndexationPayload>‚Äč

internal(): boolean‚Äč

Whether the transaction is between the mnemonic accounts or not.

incoming(): boolean‚Äč

Whether the transaction is incoming or outgoing.

value(): long‚Äč

The transactions's value.

remainderValue(): long‚Äč

The transactions's remainder value sum.

RemainderValueStrategy‚Äč

REUSE_ADDRESS‚Äč

CHANGE_ADDRESS‚Äč

RustHex‚Äč

encode(a0): String‚Äč

ParameterTypeDescription
a0String

decode(s): byte[]‚Äč

ParameterTypeDescription
sString

RustLogging‚Äč

init(): void‚Äč

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
addressAddressWrapperThe address to set
amountlongThe amount to set

amount(): long‚Äč

Returns the amount of a SignatureLockedDustAllowanceOutput.

address(): AddressWrapper‚Äč

Returns the address of a SignatureLockedDustAllowanceOutput.

SignatureLockedSingleOutput‚Äč

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

from(address, amount, remainder): SignatureLockedSingleOutput‚Äč

Creates a new SignatureLockedSingleOutput.

ParameterTypeDescription
addressAddressWrapperThe address to set
amountlongThe amount to set
remainderbooleanif this output allows remainder

amount(): long‚Äč

Returns the amount of a SignatureLockedSingleOutput.

address(): AddressWrapper‚Äč

Returns the address of a SignatureLockedSingleOutput.

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

SigningBundle‚Äč

Signing the bundle.

getAddresses(): String[]‚Äč

The addresses associated with the bundle.

StrongholdStatusEvent‚Äč

snapshotPath(): Path‚Äč

status(): StrongholdStatusType‚Äč

unlockedDuration(): Duration‚Äč

StrongholdStatusListener‚Äč

onStrongholdStatusChange(event): void‚Äč

ParameterTypeDescription
eventStrongholdStatusEvent

StrongholdStatusType‚Äč

UNLOCKED‚Äč

LOCKED‚Äč

SyncedAccount‚Äč

deposit_address(): Address‚Äč

Get a deposit address guaranteed to be valid after having synced

TransactionConfirmationChangeEvent‚Äč

A transaction confirmation state change event data.

indexationId(): String‚Äč

Event unique identifier.

accountId(): String‚Äč

The associated account identifier.

message(): Message‚Äč

The event message.

confirmed(): boolean‚Äč

The confirmed state of the transaction.

TransactionConfirmationChangeListener‚Äč

onConfirmationStateChange(event): void‚Äč

ParameterTypeDescription
eventTransactionConfirmationChangeEvent

TransactionConfirmed‚Äč

Transaction confirmation event.

getBundleHash(): String‚Äč

The bundle hash.

TransactionEvent‚Äč

A transaction-related event data.

indexationId(): String‚Äč

Event unique identifier.

accountId(): String‚Äč

The associated account identifier.

message(): Message‚Äč

The event message.

TransactionIO‚Äč

Input or output data for PreparedTransactionData

address(): String‚Äč

Address

amount(): long‚Äč

Amount

remainder(): Optional<Boolean>‚Äč

Remainder

TransactionId‚Äč

fromString(str_rep): TransactionId‚Äč

ParameterTypeDescription
str_repString

TransactionInput‚Äč

kind(): InputKind‚Äč

asUtxo(): UtxoInput‚Äč

asTreasury(): TreasuryInput‚Äč

TransactionOutput‚Äč

kind(): OutputKind‚Äč

asSignatureLockedSingleOutput(): SignatureLockedSingleOutput‚Äč

asSignatureLockedDustAllowanceOutput(): SignatureLockedDustAllowanceOutput‚Äč

asTreasuryOutput(): TreasuryOutput‚Äč

TransactionPayload‚Äč

essence(): Essence‚Äč

Return the essence of a TransactionPayload.

unlockBlocks(): UnlockBlock[]‚Äč

Return unlock blocks of a TransactionPayload.

TransactionReattachmentEvent‚Äč

Transaction reattachment event data.

indexationId(): String‚Äč

Event unique identifier.

accountId(): String‚Äč

The associated account identifier.

message(): Message‚Äč

The event message.

reattachedMessageId(): MessageId‚Äč

The id of the message that was reattached.

Transfer‚Äč

builder(address, amount, output_kind): TransferBuilder‚Äč

Creates a new Builder for making a Transfer object

ParameterTypeDescription
addressAddressWrapperThe addres we want to send to
amountlongThe amount we want to send
output_kindOutputKindThe kind of output we wish to use, can be OutputKind.NONE

TransferBuilder‚Äč

TransferBuilder(address, amount, output_kind): TransferBuilder‚Äč

Initialises a new transfer to the given address.

ParameterTypeDescription
addressAddressWrapperThe addres we want to send to
amountlongThe amount we want to send
output_kindOutputKindThe kind of output we wish to use

newFromOutputs(outputs): TransferBuilder‚Äč

Creates a transfer with multiple outputs.

ParameterTypeDescription
outputsTransferOutput[]List of outputs

withRemainderValueStrategy(strategy): TransferBuilder‚Äč

Sets the remainder value strategy for the transfer.

ParameterTypeDescription
strategyRemainderValueStrategyThe type of strategy we use to handle the remainder

withRemainderToAccountWithAddress(address): TransferBuilder‚Äč

Move the remainder value to an address that must belong to the source account.

ParameterTypeDescription
addressAddressWrapperThe address we send the remainder t o

withIndexation(indexation): TransferBuilder‚Äč

(Optional) message indexation.

ParameterTypeDescription
indexationIndexationPayloadBuild a transfer with this specific payload

withSkipSync(): TransferBuilder‚Äč

Skip account syncing before transferring.

finish(): Transfer‚Äč

Builds the transfer.

TransferOutput‚Äč

Transfer output.

TransferOutput(address, amount, output_kind): TransferOutput‚Äč

Transfer output

ParameterTypeDescription
addressAddressWrapperThe addres we want to send to
amountlongThe amount we want to send
output_kindOutputKindThe kind of output we wish to use. Default used is SIGNATURE_LOCKED_SINGLE

getAmount(): long‚Äč

The output value.

getAddress(): AddressWrapper‚Äč

The output address.

getOutputKind(): OutputKind‚Äč

The output type

TransferProgress‚Äč

Type container for handling the different TransferProgress events.

getType(): TransferProgressType‚Äč

asPreparedTransaction(): PreparedTransactionData‚Äč

asGeneratingRemainderDepositAddress(): AddressData‚Äč

TransferProgressListener‚Äč

onTransferProgress(event): void‚Äč

ParameterTypeDescription
eventWalletTransferProgress

TransferProgressType‚Äč

Transfer event data.

SYNCING_ACCOUNT‚Äč

Syncing account.

SELECTING_INPUTS‚Äč

Performing input selection.

GENERATING_REMAINDER_DEPOST_ADDRESS‚Äč

Generating remainder value deposit address.

PREPARED_TRANSACTION‚Äč

Prepared transaction.

SIGNING_TRANSACTION‚Äč

Signing the transaction.

PERFORMING_POW‚Äč

Performing PoW.

BROADCASTING‚Äč

Broadcasting.

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‚Äč

from(amount): TreasuryOutput‚Äč

Creates a new TreasuryOutput with the amount supplied

ParameterTypeDescription
amountlong

amount(): long‚Äč

Returns the amount of a TreasuryOutput.

TreasuryPayload‚Äč

output(): TreasuryOutput‚Äč

input(): TreasuryInput‚Äč

UnlockBlock‚Äč

kind(): UnlockBlockKind‚Äč

asReference(): ReferenceUnlock‚Äč

asSignature(): SignatureUnlock‚Äč

UnlockBlockKind‚Äč

ED25519‚Äč

REFERENCE‚Äč

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.

Value‚Äč

Value(value, unit): Value‚Äč

ParameterTypeDescription
valuelong
unitValueUnit

withDenomination(): String‚Äč

withoutDenomination(): long‚Äč

value(): long‚Äč

ValueUnit‚Äč

I‚Äč

Ki‚Äč

Mi‚Äč

Gi‚Äč

Ti‚Äč

Pi‚Äč

WalletException‚Äč

WalletException(): WalletException‚Äč

WalletException(errorMessage): WalletException‚Äč

ParameterTypeDescription
errorMessageString

WalletTransferProgress‚Äč

accountId(): String‚Äč

The associated account identifier.

event(): TransferProgress‚Äč

Get the event linked to this progress