CONNECTED

On a CONNECTED event, the user has approved the connection of the dapp with one of their accounts. This will fire the first time any of one of the following methods are called from the dapp: getAccount, invoke, send.

Parameter
Description

address: string

Address of the new account

label: string

A label the users has set to identify their wallet

Example

neoline.addEventListener(neoline.EVENT.CONNECTED, (result) => {
    console.log('connected account:', result);
});
/* Another */
window.addEventListener('NEOLine.NEO.EVENT.CONNECTED', (result) => {
    console.log('connected account:', result.detail);
});

最后更新于