Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2894949
D6030.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6030.diff
View Options
diff --git a/lib/types/siwe-types.js b/lib/types/siwe-types.js
--- a/lib/types/siwe-types.js
+++ b/lib/types/siwe-types.js
@@ -43,3 +43,66 @@
+type: 'walletconnect_modal_update',
+state: 'open' | 'closed',
};
+
+export type SIWEMessage = {
+ // RFC 4501 dns authority that is requesting the signing.
+ +domain: string,
+
+ // Ethereum address performing the signing conformant to capitalization
+ // encoded checksum specified in EIP-55 where applicable.
+ +address: string,
+
+ // Human-readable ASCII assertion that the user will sign, and it must not
+ // contain `\n`.
+ +statement?: string,
+
+ // RFC 3986 URI referring to the resource that is the subject of the signing
+ // (as in the __subject__ of a claim).
+ +uri: string,
+
+ // Current version of the message.
+ +version: string,
+
+ // EIP-155 Chain ID to which the session is bound, and the network where
+ // Contract Accounts must be resolved.
+ +chainId: number,
+
+ // Randomized token used to prevent replay attacks, at least 8 alphanumeric
+ // characters.
+ +nonce: string,
+
+ // ISO 8601 datetime string of the current time.
+ +issuedAt: string,
+
+ // ISO 8601 datetime string that, if present, indicates when the signed
+ // authentication message is no longer valid.
+ +expirationTime?: string,
+
+ // ISO 8601 datetime string that, if present, indicates when the signed
+ // authentication message will become valid.
+ +notBefore?: string,
+
+ // System-specific identifier that may be used to uniquely refer to the
+ // sign-in request.
+ +requestId?: string,
+
+ // List of information or references to information the user wishes to have
+ // resolved as part of authentication by the relying party. They are
+ // expressed as RFC 3986 URIs separated by `\n- `.
+ +resources?: $ReadOnlyArray<string>,
+
+ // @deprecated
+ // Signature of the message signed by the wallet.
+ //
+ // This field will be removed in future releases, an additional parameter
+ // was added to the validate function were the signature goes to validate
+ // the message.
+ +signature?: string,
+
+ // @deprecated
+ // Type of sign message to be generated.
+ //
+ // This field will be removed in future releases and will rely on the
+ // message version.
+ +type?: 'Personal signature',
+};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 5, 4:54 PM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2244911
Default Alt Text
D6030.diff (2 KB)
Attached To
Mode
D6030: [lib] Introduce `SIWEMessage` type
Attached
Detach File
Event Timeline
Log In to Comment