@cosmosapp/pay_sdkDefinitionenWeb

CosmosWalletAdapter

Wallet adapter for the Cosmos Pay Wallet, as its browser extension or its hosted web build.

Wallet adapter for the Cosmos Pay Wallet, as its browser extension or its hosted web build.

Constructor

CosmosWalletAdapter

constructor(options?: CosmosProviderOptions | CosmosWalletProvider)

Parameters

  • options (optional): CosmosProviderOptions | CosmosWalletProvider

Properties

id

readonly id = "cosmos"

name

readonly name = "Cosmos Pay Wallet"

Methods

isAvailable()

Available when a provider is already here, or when a hosted wallet is configured — the hosted build needs no install, so it is always usable. Deliberately does NOT wait for the hosted script: this answer gates a modal, and a wallet that takes a network round trip to say "yes" reads as broken. The script is fetched on the first real call instead.

isAvailable(): Promise<boolean>

Returns Promise<boolean>

getPublicKey()

getPublicKey(_network: NetworkConfig): Promise<string>

Parameters

  • _network: NetworkConfig

Returns Promise<string>

signTransaction()

signTransaction(xdr: string, params: SignParams): Promise<string>

Parameters

  • xdr: string
  • params: SignParams

Returns Promise<string>

Auf dieser Seite