API Reference
Provider
Neo.DapiProvider.ready
Neo.DapiProvider.readyField
Type
Description
window.addEventListener("Neo.DapiProvider.ready", (event) => {
const provider = (event as CustomEvent).detail.provider;
});Neo.DapiProvider.request
Neo.DapiProvider.requestField
Type
Description
window.dispatchEvent(new CustomEvent("Neo.DapiProvider.request", {
detail: {
version: "1.0",
},
}));Provider properties
Property
Type
Description
Account and Authentication
authenticate(payload)
authenticate(payload)Parameter
Type
Description
getAccounts()
getAccounts()pickAddress(prompt?)
pickAddress(prompt?)Parameter
Type
Description
Read Methods
getBalance(asset, account)
getBalance(asset, account)Parameter
Type
Description
getTokenInfo(hash)
getTokenInfo(hash)Parameter
Type
Description
call(invocation)
call(invocation)Parameter
Type
Description
getBlock(hash)
getBlock(hash)Parameter
Type
Description
getBlock(index)
getBlock(index)Parameter
Type
Description
getBlockCount()
getBlockCount()getTransaction(txid)
getTransaction(txid)Parameter
Type
Description
getApplicationLog(txid)
getApplicationLog(txid)Parameter
Type
Description
getStorage(hash, key)
getStorage(hash, key)Parameter
Type
Description
Write and Signing Methods
send(asset, from, to, amount, data?)
send(asset, from, to, amount, data?)Parameter
Type
Description
invoke(invocations, signers?, attributes?, options?)
invoke(invocations, signers?, attributes?, options?)Parameter
Type
Description
makeTransaction(invocations, signers?, attributes?, options?)
makeTransaction(invocations, signers?, attributes?, options?)Parameter
Type
Description
sign(context)
sign(context)Parameter
Type
Description
signMessage(message, account?, options?)
signMessage(message, account?, options?)Parameter
Type
Description
relay(context)
relay(context)Parameter
Type
Description
Event Methods
on(event, listener)
on(event, listener)Parameter
Type
Description
removeListener(event, listener)
removeListener(event, listener)Parameter
Type
Description