# Wallet
# wallet_getEntropyFilesInStandardDir
Return all entropy files in standard directory
Parameters:
none
Returns:
Array[string]
Absolute paths of entropy files
Example:
# wallet_getAllEntropyFiles
Return all entropy files maintained in wallet
Parameters:
none
Returns:
Array[string]
Absolute paths of entropy files
Example:
# wallet_exportMnemonic
Return mnemonic phrase of the given entropy file
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directory.string
: Passphrase
Returns:
string
: Mnemonics
Example:
# wallet_unlock
Unlock entropy file
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directory.string
: Passphrase
Returns:
null
Example:
# wallet_lock
Lock entropy file
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directory.
Returns:
null
Example:
# wallet_deriveAddressesByIndexRange
Return a list of addresses in the given entropy file
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directory.uint32
: Start index, includeduint32
: End index, excluded
Returns:
Array[string]
: Addresses
Example:
# wallet_createEntropyFile
Create new entropy file
Parameters:
string
: Passphrase
Returns:
Object
:mnemonics : string
: Mnemonic phrasefirstAddress : string
: Address at index 0filePath : string
: Absolute path of entropy file
Example:
# wallet_deriveAddressByIndex
Derive address by index
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directory.uint32
: Index
Returns:
Object
:bip44Path : string
: BIP44 path of the addressaddress : string
: AddressprivateKey : []byte
: Private key in base64 format
Example:
# wallet_deriveAddressByPath
Derive address by bip44 path
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directorystring
: BIP44 path
Returns:
Object
:bip44Path : string
: BIP44 path of the addressaddress : string
: AddressprivateKey : []byte
: Private key in base64 format
Example:
# wallet_recoverEntropyFile
Recover entropy file from mnemonic phrase
Parameters:
string
: Mnemonic phrasestring
: New passphrase
Returns:
Object
:mnemonics : string
: Mnemonic phrasefirstAddr : string
: Address at index 0filePath : string
: Absolute path of entropy file
Example:
# wallet_isUnlocked
Verify if the entropy file is unlocked
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directoryReturns:
bool
Iftrue
, the entropy file is unlockedExample:
# wallet_findAddr
Return the index of specified address in entropy file. The entropy file must be unlocked when calling this method
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directorystring
:address
: Address
Returns:
Object
entropyStoreFile : string
: Absolute path of entropy fileindex : uint32
: Index of address
Example:
# wallet_globalFindAddr
Return the index of specified address
Parameters:
string
:address
: Address
Returns:
Object
entropyStoreFile : string
: Absolute path of entropy fileindex : uint32
: Index of address
Example:
# wallet_createTxWithPassphrase
Send transaction
Parameters:
Object
:entropystoreFile : string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directory, optionalselfAddr : string address
: Address of current account, requiredtoAddr : string address
: Address of transaction's recipient, requiredtokenTypeId : string tokentypeid
: Token id, requiredpassphrase : string
: Password of entropy file, 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 entropy file. This method can be used to add an entropy file in non-standard directory.
Parameters:
string
: Absolute path of entropy file, or file name (address at index 0) if it is under standard directory, optional
Returns:
none