Skip to main content

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:

PropertyTypeDescription
chainsFullSynchronizationChainOptions[]
chains full synchronization.

FullSynchronizationChainOptions

FullSynchronizationChainOptions data structure is as follows:

PropertyTypeDescription
chainIdnumber
chain id.
namestring
chain name.
assetsFullSynchronizationAssetOptions[]
Asset synchronization options.
enabledbool
Enalbed or disabled.

FullSynchronizationAssetOptions

FullSynchronizationAssetOptions data structure is as follows:

PropertyTypeDescription
assetSymbolstring
asset symbol.
enabledbool
Enabled or disabled.