DappErrorCode

The error codes CIP-0103 inherits from EIP-1474 / EIP-1193.

Two families share the space and mean different things. The 4xxx codes are provider errors — the wallet understood the request and declined it. The negative codes are JSON-RPC's own, for requests that were malformed or failed downstream. Getting this wrong is user-visible: a dApp that treats USER_REJECTED as a transport failure will retry a request the user just declined.

Entries

Link copied to clipboard

The user declined. Terminal: do not retry, and change no state.

Link copied to clipboard

The caller has no grant for this account or method.

Link copied to clipboard

The method is not supported by this provider.

Link copied to clipboard

The provider is disconnected from the dApp.

Link copied to clipboard

The provider is connected, but not to a network.

Link copied to clipboard

Malformed parameters — ours or the caller's.

Link copied to clipboard

An unexpected failure inside the provider.

Link copied to clipboard

Well-formed parameters the ledger nonetheless rejected.

Link copied to clipboard

The transaction was rejected by the ledger.

Types

Link copied to clipboard
object Companion

Lookup by numeric wire code.

Properties

Link copied to clipboard
val code: Int
Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.