Skip to main content

Getting Started

Get started by checking if earth wallet is installed.

if ( !== undefined) {
console.log('Earth Wallet Exists');
//Do something
else {
console.log('Dear User, please install Earth Wallet at');

Earth Wallet can be installed here.

Connect user address to Dapp ⛓️

Get the user address

 const account = await;
console.log('ICP account: ' + account);
//account: xyzzzz

Getting user address is very simple and by calling earth.connect()

Once connected, calling earth.connect() will give same connected address e.g xyzzz.

Check if Earth Wallet is connected

const isConnected = await
//{connected: false} or {connected: true}

Get address meta

const addressMeta = await;
name: 'xyz',
createdAt: 1635962486,
principalId: 'o7nwu-xxx',
publicKey: 'asddd',
type: 'ecdsa'

Anything unclear or issue in this docs? Please connect at Discord!