Skip to main content

getArksatProvider

getArksatProvider(): ArksatProvider | undefined detects the extension immediately. Returns undefined during SSR; does not connect or unlock.

waitForArksatProvider

waitForArksatProvider({ timeoutMs?, signal? }): Promise<ArksatProvider> waits for injection. Default timeout: 5000 ms.

createArksatClient

Wraps Provider methods with object parameters and named results. It does not automatically request permissions or retry mutations.

request

RPC params are tuples matching raw Provider arguments:
Supported RPC methods are listed by ARKSAT_PROVIDER_METHODS and getCapabilities. requestAccounts is a convenience alias.

Amount utilities

decimalAmountToRaw, formatRawAssetAmount, and toRawAmountString handle exact conversion. Amounts.

Scope

The SDK uses the browser extension, not a remote Web wallet HTTP API. Private-key export, internal wallet administration, and settlement are not public RPC methods.

Error guards and development exports

isArksatProviderError(error) structurally checks known error codes, message, and retryable across bundles and execution contexts. It does not rely on instanceof. @arksat/wallet-sdk/mock exports createMockProvider; @arksat/wallet-sdk/conformance exports runConformance. These exports are independent of the main entry. See developer tools. Wait timeout and polling values must be finite milliseconds from 0 to 2147483647; invalid values reject with TypeError. waitForTransaction polls no faster than once per 1000 ms. Conformance timeoutMs must be strictly positive.