Topup#

Usage: client.platform.identities.topUp(identity, amount)
Description: This method will topup the provided identity’s balance.

The identity balance might slightly vary from the topped up amount because of the transaction fee estimation.

Parameters:

Parameters

Type

Required

Description

identity

Identity

yes

A valid registered identity

amount

number

yes

A duffs (satoshis) value corresponding to the amount you want to top up to the identity.

Example:

const identityId = '';// Your identity identifier
const identity = await client.platform.identities.get(identityId);
await client.platform.identities.topUp(identity.getId(), 10000);

console.log(`New identity balance: ${identity.balance}`)

Returns: Boolean.