Class: SiwxMessage
siwx/src.SiwxMessage
Parameters for SiwxMessage constructor.
Implements
Constructors
constructor
• new SiwxMessage(fields): SiwxMessage
Parameters
| Name | Type |
|---|---|
fields | SiwxMessageFields |
Returns
Properties
address
• Readonly address: string & WithOpaque<"address">
Implementation of
chainId
• Readonly chainId: string & WithOpaque<"chain-id">
Implementation of
domain
• Readonly domain: string & WithOpaque<"domain">
Implementation of
expirationTime
• Optional Readonly expirationTime: string & WithOpaque<"date-time">
Implementation of
SiwxMessageFields.expirationTime
issuedAt
• Readonly issuedAt: string & WithOpaque<"date-time">
Implementation of
network
• Readonly network: string & WithOpaque<"network">
Implementation of
nonce
• Readonly nonce: string & WithOpaque<"nonce">
Implementation of
notBefore
• Optional Readonly notBefore: string & WithOpaque<"date-time">
Implementation of
requestId
• Optional Readonly requestId: string & WithOpaque<"non-empty">
Implementation of
resources
• Optional Readonly resources: string & WithOpaque<"URI">[]
Implementation of
statement
• Optional Readonly statement: string & WithOpaque<"non-empty">
Implementation of
uri
• Readonly uri: string & WithOpaque<"URI">
Implementation of
version
• Readonly version: "1" & WithOpaque<"version">
Implementation of
fromString
▪ Static fromString: (input: string) => SiwxMessage = fromString
Type declaration
▸ (input): SiwxMessage
Parse SIWx message string.
Parameters
| Name | Type |
|---|---|
input | string |
Returns
Throws
If invalid string passed.
fromStringSafe
▪ Static fromStringSafe: (input: string) => Maybe<SiwxMessage> = fromStringSafe
Type declaration
▸ (input): Maybe<SiwxMessage>
Parse SIWx message string. Return Maybe, thus do not throw.
Parameters
| Name | Type |
|---|---|
input | string |
Returns
Maybe<SiwxMessage>
Methods
toString
▸ toString(): string
Returns
string