Wallet
Interfaces for managing the Mystiko wallet, including creating, checking, updating, and exporting operations.
create
Create a Mystiko Wallet.
import mystiko from '@mystikonetwork/browser';
const wallet = await mystiko.wallets?.create({ masterSeed: 'deadbeef', password: 'P@ssw0rd' });
Check
checkCurrent
Check current wallet.
import mystiko from '@mystikonetwork/browser';
const wallet = await mystiko.wallets?.checkCurrent();
checkPassword
Check the password of the wallet.
import mystiko from '@mystikonetwork/browser';
const wallet = await mystiko.wallets?.checkPassword(walletPassword);
updatePassword
Update the password of the wallet.
import mystiko from '@mystikonetwork/browser';
const wallet = await mystiko.wallets?.updatePassword(oldPassword, newPassword);
exportMasterSeed
Export the mnemonic phrase of the wallet.
import mystiko from '@mystikonetwork/browser';
const seed = await mystiko.wallets?.exportMasterSeed(walletPassword);
fullSynchronization
Enable or disable full synchronization.
import mystiko from '@mystikonetwork/browser';
const phrase = await mystiko.wallets?.fullSynchronization('true');
getFullSynchronizationOptions
Get the full synchronization options.
import mystiko from '@mystikonetwork/browser';
const options = await mystiko.wallets?.getFullSynchronizationOptions();
setFullSynchronizationOptions
Set the full synchronization options.
import mystiko from '@mystikonetwork/browser';
await mystiko.wallets?.setFullSynchronizationOptions({
chains: [
{
chainId: 11155111,
name: 'Ethereum Sepolia',
assets: [
{ assetSymbol: 'MTT', enabled: true },
{ assetSymbol: 'USDT', enabled: true },
],
enabled: true,
},
{
chainId: 84532,
name: 'Base Sepolia',
assets: [{ assetSymbol: 'ETH', enabled: true }],
enabled: true,
},
],
});
FullSynchronizationOptions
FullSynchronizationOptions
data structure is as follows:
Property | Type | Description |
---|---|---|
chains | FullSynchronizationChainOptions[] | chains full synchronization. |
FullSynchronizationChainOptions
FullSynchronizationChainOptions
data structure is as follows:
Property | Type | Description |
---|---|---|
chainId | number | chain id. |
name | string | chain name. |
assets | FullSynchronizationAssetOptions[] | Asset synchronization options. |
enabled | bool | Enalbed or disabled. |
FullSynchronizationAssetOptions
FullSynchronizationAssetOptions
data structure is as follows:
Property | Type | Description |
---|---|---|
assetSymbol | string | asset symbol. |
enabled | bool | Enabled or disabled. |