# Wallet
# wallet_listEntropyFilesInStandardDir
Return all EntropyStore
in the standard directory
Parameters:
none
Returns:
Array[string]
An list of absolute paths ofEntropyStore
Example:
# wallet_listAllEntropyFiles
Return all EntropyStore
managed by the wallet
Parameters:
none
Returns:
Array[string]
An list of absolute paths ofEntropyStore
Example:
# wallet_extractMnemonic
Return mnemonics of specified EntropyStore
Parameters:
string
: The absolute file path of theEntropyStore
, orEntropyStore
name if the file is in standard directory. Address 0 is used as standardEntropyStore
name.string
: Wallet password
Returns:
string
: Mnemonic phrase
Example:
# wallet_unlock
Unlock the specified EntropyStore
Parameters:
string
: The absolute file path of theEntropyStore
, orEntropyStore
name if the file is in standard directory. Address 0 is used as standardEntropyStore
name.string
: Wallet password
Returns:
null
Example:
# wallet_lock
Lock the specified EntropyStore
Parameters:
string
: The absolute file path of theEntropyStore
, orEntropyStore
name if the file is in standard directory. Address 0 is used as standardEntropyStore
name.
Returns:
null
Example:
# wallet_listEntropyStoreAddresses
Return a specified range of addresses in the EntropyStore
Parameters:
string
: The absolute file path of theEntropyStore
, orEntropyStore
name if the file is in standard directory. Address 0 is used as standardEntropyStore
name.uint32
: Start index, includeduint32
: End index, excluded
Returns:
Array[string]
: An list of account addresses
Example:
# wallet_newMnemonicAndEntropyStore
Create new mnemonics and corresponding EntropyStore
Parameters:
string
: Wallet password
Returns:
Object
:mnemonic : string
: The newly created mnemonicsprimaryAddr : string
: Primary account addressfilename : string
: AbsoluteEntropyStore
file path
Example:
# wallet_deriveByIndex
Generate sub address by index
Parameters:
string
: The primary account address or the absolute file path of theEntropyStore
uint32
: The index of sub address
Returns:
Object
:bip44Path : string
: The BIP44 path of the addressaddress : string
: Sub addressprivateKey : []byte
: Private key in base64 encoding
Example:
# wallet_deriveByFullPath
Generate sub address by BIP44 path. This method supports deriving sub address more flexibly.
Parameters:
string
: The primary account address or the absolute file path of theEntropyStore
string
: The BIP44 path of the address
Returns:
Object
:bip44Path : string
: The BIP44 path of the addressaddress : string
: Sub addressprivateKey : []byte
: Private key in base64 encoding
Example:
# wallet_recoverEntropyStoreFromMnemonic
Recover EntropyStore
from mnemonics
Parameters:
string
: Mnemonicsstring
: New wallet password
Returns:
Object
:mnemonic : string
: MnemonicsprimaryAddr : string
: Primary account addressfilename : string
: AbsoluteEntropyStore
file path
Example:
# wallet_globalCheckAddrUnlocked
Check if the specified address is unlocked
Parameters:
string
:address
Account addressReturns:
bool
Whether the address is unlocked.true
means unlockedExample:
# wallet_isAddrUnlocked
Check if the specified address in the EntropyStore
is unlocked. The specific EntropyStore
must be unlocked in advance before calling this method.
Parameters:
string
: The primary account address or the absolute file path of theEntropyStore
string
:address
: Account address
Returns:
bool
Whether the address is unlocked.true
means unlockedExample:
# wallet_isUnlocked
Check if the specified EntropyStore
is unlocked.
Parameters:
string
: The primary account address or the absolute file path of theEntropyStore
Returns:
bool
Whether the address is unlocked.true
means unlockedExample:
# wallet_findAddr
Return the index of specified address in the EntropyStore
. The specific EntropyStore
must be unlocked in advance before calling this method.
Parameters:
string
: The primary account address or the absolute file path of theEntropyStore
string
:address
: Account address
Returns:
Object
entropyStoreFile : string
: AbsoluteEntropyStore
file pathindex : uint32
: Index of the address in theEntropyStore
Example:
# wallet_globalFindAddr
Return the index of specified address
Parameters:
string
:address
: Account address
Returns:
Object
entropyStoreFile : string
: AbsoluteEntropyStore
file pathindex : uint32
: Index of the address in theEntropyStore
Example:
# wallet_createTxWithPassphrase
Send a transaction
Parameters:
Object
:entropystoreFile : string
: The primary account address or the absolute file path of theEntropyStore
, optionalselfAddr : string address
: The account address from which the transaction is sent, requiredtoAddr : string address
: The account address to which the transaction is sent, requiredtokenTypeId : string tokentypeid
: Token ID, requiredpassphrase : string
: Wallet password, requiredamount : string bigint
: Transfer amount, requireddata : string base64
: Additional data carried by the transaction, optionaldifficulty : string bigint
: PoW difficulty, optional
Returns:
none
:::
# wallet_addEntropyStore
Add a new EntropyStore
from non-standard directory.
Parameters:
string
: The primary account address or the absolute file path of theEntropyStore
Returns:
none