Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🪐Near DApps Integration

Welcome to MapNodeCore Extension Wallet Developer Guide. This documentation contains guides for developers to get started developing on MapNodeCore Extension Wallet.‌

To detect MapNodeCore Extension with Near

To detect whether your browser is running MapNodeCore Extension, please use:

if(window.mapnodecore || window.mapnodecore.near || window.near?.isMapNodeCore){
    console.log('MapNodeCore Extension is installed!');›
}

Notice: MapNodeCore Extension Testnet is under development and not available now.

Support window.near only and removal window.web3


To connect MapNodeCore Extension Wallet

To connect MapNodeCore Extension means to access the user's [blockchain - like Near] account(s).

// Connect DApps
window.MapNodeCore.near.connect(<Prefix: optional>,<Contract ID: optional>);
// Get Account
window.MapNodeCore.near.selectedAddress;
// Get Full Accounts State
window.MapNodeCore.near.request({ method: 'near_accountState' });
// Check if DApps connected
window.MapNodeCore.near.isConnected();

To disconnect MapNodeCore Extension Wallet

To disconnect MapNodeCore Extension, please use:

To experience functions

Once your account is connected, let's start experiencing more functions.‌

Call View Method

SignAndSend Transaction

To handle events

List of events

Currently we only support some action event from wallet extension

Events
Trigger

accountsChanged

Receive when active account changed in Extension

networkChanged

Receive when active network changed in Extension

chainChanged

Receive when active chain changed in Extension

disconnect

Receive when disconnect from Extension

close

Alias for disconnect event

Method
Description

on(event, callback)

Add event listener

off(event, callback)

Remove event listener

Last updated