Skip to main content

@desmoslabs/desmjs-walletconnect-v2

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

WalletConnectRequest

Ƭ WalletConnectRequest: WalletConnectGetAccountsRequest | WalletConnectSignAminoRequest | WalletConnectSignDirectRequest

Type that represents the current supported WalletConnect RPC requests.

Defined in

packages/walletconnect-v2/src/types.ts:131

Functions

decodeAminoSignRequest

decodeAminoSignRequest(request): DecodeResult<WalletConnectSignAminoRequest>

Function to decode a WalletConnect "cosmos_signAmino" request.

Parameters

NameTypeDescription
requestBaseEventArgs<{ chainId: string ; request: { method: string ; params: any } }>The request to convert.

Returns

DecodeResult<WalletConnectSignAminoRequest>

Defined in

packages/walletconnect-v2/src/decode.ts:305


decodeAminoSignRpcRequestParams

decodeAminoSignRpcRequestParams(params): DecodeResult<SignAminoDecodedRpcRequestParams>

Decodes the params received from the cosmos_signAmino RPC method.

Parameters

NameTypeDescription
paramsany[]The params to decode.

Returns

DecodeResult<SignAminoDecodedRpcRequestParams>

Defined in

packages/walletconnect-v2/src/decode.ts:193


decodeDirectSignRequest

decodeDirectSignRequest(request): DecodeResult<WalletConnectSignDirectRequest>

Function to decode a WalletConnect "cosmos_signDirect" request.

Parameters

NameTypeDescription
requestBaseEventArgs<{ chainId: string ; request: { method: string ; params: any } }>The request to convert.

Returns

DecodeResult<WalletConnectSignDirectRequest>

Defined in

packages/walletconnect-v2/src/decode.ts:223


decodeDirectSignRpcRequestParams

decodeDirectSignRpcRequestParams(params): DecodeResult<SignDirectDecodedRpcRequestParams>

Decodes the params received from the cosmos_signDirect RPC method.

Parameters

NameTypeDescription
paramsany[]The params to decode.

Returns

DecodeResult<SignDirectDecodedRpcRequestParams>

Defined in

packages/walletconnect-v2/src/decode.ts:155


decodeGetAccountsRpcResponse

decodeGetAccountsRpcResponse(response): DecodeResult<AccountData[]>

Decodes the response received from the cosmos_getAccounts RPC method.

Parameters

NameTypeDescription
responseanyThe response to decode.

Returns

DecodeResult<AccountData[]>

Defined in

packages/walletconnect-v2/src/decode.ts:101


decodeSessionRequest

decodeSessionRequest(request): DecodeResult<WalletConnectRequest>

Function to decode a WalletConnect request received through the "session_request" event listener.

Parameters

NameTypeDescription
requestBaseEventArgs<{ chainId: string ; request: { method: string ; params: any } }>The request to decode.

Returns

DecodeResult<WalletConnectRequest>

Defined in

packages/walletconnect-v2/src/decode.ts:366


encodeAminoSignRpcRequestParams

encodeAminoSignRpcRequestParams(signerAddress, signDoc): SignAminoRpcRequestParams

Encodes the params that are sent in the cosmos_signAmino RPC method.

Parameters

NameTypeDescription
signerAddressstringAddress of who is singing the transaction.
signDocStdSignDocTransaction to be signed.

Returns

SignAminoRpcRequestParams

Defined in

packages/walletconnect-v2/src/encode.ts:64


encodeAminoSignRpcResponse

encodeAminoSignRpcResponse(signResponse): SignAminoRpcResponseParams

Encodes the signature to be returned as response of the cosmos_signAmino RPC method.

Parameters

NameTypeDescription
signResponseAminoSignResponseSignature to encode.

Returns

SignAminoRpcResponseParams

Defined in

packages/walletconnect-v2/src/encode.ts:78


encodeDirectSignRpcRequestParams

encodeDirectSignRpcRequestParams(signerAddress, signDoc): SignDirectRpcRequestParams

Encodes the params that are sent in the cosmos_signDirect RPC method.

Parameters

NameTypeDescription
signerAddressstringAddress of who will sign the transaction.
signDocSignDocTransaction to be signed.

Returns

SignDirectRpcRequestParams

Defined in

packages/walletconnect-v2/src/encode.ts:34


encodeDirectSignRpcResponse

encodeDirectSignRpcResponse(signResponse): SignDirectRpcResponseParams

Encodes the signature to be returned as response of the cosmos_signDirect RPC method.

Parameters

NameTypeDescription
signResponseDirectSignResponseSignature to encode.

Returns

SignDirectRpcResponseParams

Defined in

packages/walletconnect-v2/src/encode.ts:51


encodeGetAccountsRpcResponse

encodeGetAccountsRpcResponse(accounts): GetAccountsRpcResponse

Encodes the accounts to be returned as response of the cosmos_getAccounts RPC method.

Parameters

NameTypeDescription
accountsreadonly AccountData[]Accounts to encode.

Returns

GetAccountsRpcResponse

Defined in

packages/walletconnect-v2/src/encode.ts:17