window.keplr
. If window.keplr
returns undefined
after document.load, Coin98 is not installed. There are several ways to wait for the load event to check the status. Refer to the examples below:window.onload
:window.d.ts
@keplr-wallet/types
package has the type definition related to Keplr.
If you're using TypeScript, run npm install --save-dev @keplr-wallet/types
or yarn add -D @keplr-wallet/types
to install @keplr-wallet/types
.
Then, you can add the @keplr-wallet/types
window to a global window object and register the Coin98 related types.window.keplr.enable(chainIds)
method requests the extension to be unlocked if it's currently locked. If the user hasn't given permission to the webpage, it will ask the user to give permission for the webpage to access Coin98.enable
method can receive one or more chain-id as an array. When the array of chain-id is passed, you can request permissions for all chains that have not yet been authorized at once.isNanoLedger
field in the return type is used to indicate whether the selected account is from the Ledger Nano. Because current KAVA app in the Ledger Nano doesn't support the direct (protobuf) format msgs, this field can be used to select the amino or direct signer. RefOfflineSigner
's signAmino
, but Keplr's signAmino
takes the chain-id as a required parameter. Signs Amino-encoded StdSignDoc
.OfflineDirectSigner
's signDirect
, but Keplr's signDirect
takes the chain-id as a required parameter. Signs Proto-encoded StdSignDoc
.preferNoSetFee
is set to true, Keplr will prioritize the frontend-suggested fee rather than overriding the tx fee setting of the signing page.preferNoSetMemo
is set to true, Keplr will not override the memo and set fix memo as the front-end set memo.keplr_keystorechange
event to the webpage's window. You can request the new key/account based on this event listener.