Download

arrow_down

Developer sercices

arrow_down

More

arrow_down
activityactivityactivityactivity
  • themelight
  • languageIcon

  • menu
Skip to Content

Near

Wallet Standard

When running a DApp in the Bitget Wallet App or in the Chrome browser with the Chrome Extension installed, you can access the global object window.bitkeep.near for subsequent API calls.

Injected object properties and methods

MethodParametersReturn TypeDescription
getAccountId()stringGet the account ID
getPublicKey()stringGet the public key
requestSignIn(params)PromiseRequest user sign-in
isSignedIn()booleanCheck if the user is signed in
signOut()PromiseSign out the current user
signAndSendTransaction(param)PromiseSign and send a transaction
verifyOwner(message, accountId)PromiseVerify account ownership
requestSignTransactions({ transactions })PromiseRequest multiple transaction signatures

Collect to Bitget Wallet

requestSignIn

Triggers the NEAR Wallet login flow, requesting the user to sign in.

Usage

/** * 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 */ provider.requestSignIn({ contractId, methodNames, createNew = false }): Promise<Result>

Try It

Loading live editor...

isSignedIn

Checks whether the user is currently signed in to the NEAR wallet.

Usage

window.bitkeep.isSignedIn()

Try It

Loading live editor...

SignOut

disconnect current near wallet

Usage

window.bitkeep.signOut()

Try It

Loading live editor...

Account Method

Provider

When running a DApp in the Bitget Wallet App or in the Chrome browser with the Chrome Extension installed, you can access the global object window.bitkeep.near for subsequent API calls.

const provider = window.bitkeep.near

getAccountId

Returns the account ID (username) of the currently signed-in user.

Usage

window.bitkeep.getAccountId()

Try It

Loading live editor...

getPublicKey

Retrieves the public key associated with the user’s account.

Usage

window.bitkeep.getPublicKey()

Try It

Loading live editor...

VerifyOwner

Verifies that the current user is the real owner of a NEAR account by signing a message or making a secure call.

Usage

window.bitkeep.verifyOwner()

Try It

Loading live editor...

Transaction

signAndSendTransaction

near.signAndSendTransaction({ receiverId: string, actions: Action}): Response;

signAndSendTransactions

Sign and Send Multiple Transaction RPC Requests

near.signAndSendTransactions({ receiverId: string, actions: Action}): Response;
Last updated on