NEAR Provider API
Properties
near.isSender
Methods
near.requestSignIn()
/**
* request signin the contract, with the view and change methods provided, return the access key
* @param {*} contractId contract account id
* @param {*} methodNames the method names on the contract that should be allowed to be called. Pass null for no method names and '' or [] for any method names.
* @param {*} createNew if need create new access key, set createNew = true. Default is false
* @returns { accessKey } signed in access key
*/
near.requestSignIn({ contractId, methodNames, createNew = false }): Promise<Result>const contractId = 'guest-book.testnet';
const methodNames = ['addMessage'];
const res = await window.near.requestSignIn({ contractId, methodNames });near.signOut()
near.isSignedIn()
near.getAccountId()
[Work-In Progress] near.account()
near.signAndSendTransaction()
near.requestSignTransactions()
near.request()
Events
signIn
signOut
accountChanged
rpcChanged
Last updated