Skip to Content
API referenceSIWX ReactSrcInterfacesSiwxMessageFields

API Reference — @tuwaio/siwx (CAIP-122 Authentication Layer)


SiwxMessageFields

Defined in: packages/siwx-core/dist/index.d.ts:26

The complete set of fields required to build a CAIP-122 compliant message. All fields follow the CAIP-122 specification.

Properties

address

address: string

Defined in: packages/siwx-core/dist/index.d.ts:36

The blockchain account address performing the sign-in, CAIP-10 compliant.

Example

"eip155:1:0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"

chainId

chainId: `eip155:${string}` | `solana:${string}`

Defined in: packages/siwx-core/dist/index.d.ts:56

The CAIP-2 chain ID to which the session is bound.

Example

"eip155:1"

domain

domain: string

Defined in: packages/siwx-core/dist/index.d.ts:31

The RFC 3986 URI of the domain requesting the sign-in.

Example

"app.tuwa.io"

expirationTime?

optional expirationTime?: string

Defined in: packages/siwx-core/dist/index.d.ts:70

Optional ISO 8601 datetime string after which the session is no longer valid.


issuedAt

issuedAt: string

Defined in: packages/siwx-core/dist/index.d.ts:66

The ISO 8601 datetime string of when the message was generated.

Example

"2021-09-30T16:25:24Z"

nonce

nonce: string

Defined in: packages/siwx-core/dist/index.d.ts:61

A unique, secure, randomly generated string used to prevent replay attacks.

Example

"32891757"

notBefore?

optional notBefore?: string

Defined in: packages/siwx-core/dist/index.d.ts:74

Optional ISO 8601 datetime string when the session is valid from.


requestId?

optional requestId?: string

Defined in: packages/siwx-core/dist/index.d.ts:78

Optional system-specific identifier for the request.


resources?

optional resources?: string[]

Defined in: packages/siwx-core/dist/index.d.ts:82

Optional list of URIs the session is valid for.


statement?

optional statement?: string

Defined in: packages/siwx-core/dist/index.d.ts:41

A statement (human-readable) that the user will sign. Must not contain ‘\n’.


uri

uri: string

Defined in: packages/siwx-core/dist/index.d.ts:46

The RFC 3986 URI referring to the resource that is the subject of the sign-in.

Example

"https://app.tuwa.io"

version

version: "1"

Defined in: packages/siwx-core/dist/index.d.ts:51

The version of the CAIP-122 message specification. Currently always “1”.

Last updated on