Cosmos Provider
#
Cosmos Provider API#
Provider Detection#
Connecting to CosmosIf Binance Web3 Wallet is locked, you can unlock the wallet by using window.binancew3w.keplr.enable(chainIds). You'll be required to grant the webpage permission to access Keplr if such permission wasn't previously granted.
The enable method can receive one or more chain IDs as an array. When passing the chain ID array, you can simultaneously request the permissions of all chains that haven't been authorized. If you cancel the unlocking or are denied permission, an error will show.
#
Methods#
signArbitraryThis request will sign any information, which is equivalent to the signMessage (any) of the previous chains.
Connect the current account.
#
ParameterschainId
-string
signerAddress
-string
data
-string
#
ReturnsPromise
returns object
:
signature
-string
signDoc
-object
#
Example#
signAminoThis request signs in a fixed format, similar to the signAmino method of OfflineSigner of cosmjs. Parameters are objects, and signDoc is a fixed format.
#
ParameterschainId
-string
signerAddress
-string
signDoc
-object
#
ReturnsPromise
returns object
:
signature
-string
signed
-boolean