@supabase/auth-js 2.58.1-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -0
  3. package/dist/main/AuthAdminApi.d.ts +4 -0
  4. package/dist/main/AuthAdminApi.d.ts.map +1 -0
  5. package/dist/main/AuthAdminApi.js +9 -0
  6. package/dist/main/AuthAdminApi.js.map +1 -0
  7. package/dist/main/AuthClient.d.ts +4 -0
  8. package/dist/main/AuthClient.d.ts.map +1 -0
  9. package/dist/main/AuthClient.js +9 -0
  10. package/dist/main/AuthClient.js.map +1 -0
  11. package/dist/main/GoTrueAdminApi.d.ts +99 -0
  12. package/dist/main/GoTrueAdminApi.d.ts.map +1 -0
  13. package/dist/main/GoTrueAdminApi.js +278 -0
  14. package/dist/main/GoTrueAdminApi.js.map +1 -0
  15. package/dist/main/GoTrueClient.d.ts +531 -0
  16. package/dist/main/GoTrueClient.d.ts.map +1 -0
  17. package/dist/main/GoTrueClient.js +2564 -0
  18. package/dist/main/GoTrueClient.js.map +1 -0
  19. package/dist/main/index.d.ts +9 -0
  20. package/dist/main/index.d.ts.map +1 -0
  21. package/dist/main/index.js +36 -0
  22. package/dist/main/index.js.map +1 -0
  23. package/dist/main/lib/base64url.d.ts +76 -0
  24. package/dist/main/lib/base64url.d.ts.map +1 -0
  25. package/dist/main/lib/base64url.js +269 -0
  26. package/dist/main/lib/base64url.js.map +1 -0
  27. package/dist/main/lib/constants.d.ts +26 -0
  28. package/dist/main/lib/constants.d.ts.map +1 -0
  29. package/dist/main/lib/constants.js +31 -0
  30. package/dist/main/lib/constants.js.map +1 -0
  31. package/dist/main/lib/error-codes.d.ts +7 -0
  32. package/dist/main/lib/error-codes.d.ts.map +1 -0
  33. package/dist/main/lib/error-codes.js +3 -0
  34. package/dist/main/lib/error-codes.js.map +1 -0
  35. package/dist/main/lib/errors.d.ts +100 -0
  36. package/dist/main/lib/errors.d.ts.map +1 -0
  37. package/dist/main/lib/errors.js +137 -0
  38. package/dist/main/lib/errors.js.map +1 -0
  39. package/dist/main/lib/fetch.d.ts +34 -0
  40. package/dist/main/lib/fetch.d.ts.map +1 -0
  41. package/dist/main/lib/fetch.js +194 -0
  42. package/dist/main/lib/fetch.js.map +1 -0
  43. package/dist/main/lib/helpers.d.ts +67 -0
  44. package/dist/main/lib/helpers.d.ts.map +1 -0
  45. package/dist/main/lib/helpers.js +388 -0
  46. package/dist/main/lib/helpers.js.map +1 -0
  47. package/dist/main/lib/local-storage.d.ts +9 -0
  48. package/dist/main/lib/local-storage.d.ts.map +1 -0
  49. package/dist/main/lib/local-storage.js +21 -0
  50. package/dist/main/lib/local-storage.js.map +1 -0
  51. package/dist/main/lib/locks.d.ts +64 -0
  52. package/dist/main/lib/locks.d.ts.map +1 -0
  53. package/dist/main/lib/locks.js +187 -0
  54. package/dist/main/lib/locks.js.map +1 -0
  55. package/dist/main/lib/polyfills.d.ts +5 -0
  56. package/dist/main/lib/polyfills.d.ts.map +1 -0
  57. package/dist/main/lib/polyfills.js +29 -0
  58. package/dist/main/lib/polyfills.js.map +1 -0
  59. package/dist/main/lib/types.d.ts +1130 -0
  60. package/dist/main/lib/types.d.ts.map +1 -0
  61. package/dist/main/lib/types.js +22 -0
  62. package/dist/main/lib/types.js.map +1 -0
  63. package/dist/main/lib/version.d.ts +2 -0
  64. package/dist/main/lib/version.d.ts.map +1 -0
  65. package/dist/main/lib/version.js +11 -0
  66. package/dist/main/lib/version.js.map +1 -0
  67. package/dist/main/lib/web3/ethereum.d.ts +96 -0
  68. package/dist/main/lib/web3/ethereum.d.ts.map +1 -0
  69. package/dist/main/lib/web3/ethereum.js +66 -0
  70. package/dist/main/lib/web3/ethereum.js.map +1 -0
  71. package/dist/main/lib/web3/solana.d.ts +160 -0
  72. package/dist/main/lib/web3/solana.d.ts.map +1 -0
  73. package/dist/main/lib/web3/solana.js +4 -0
  74. package/dist/main/lib/web3/solana.js.map +1 -0
  75. package/dist/main/lib/webauthn.d.ts +274 -0
  76. package/dist/main/lib/webauthn.d.ts.map +1 -0
  77. package/dist/main/lib/webauthn.dom.d.ts +583 -0
  78. package/dist/main/lib/webauthn.dom.d.ts.map +1 -0
  79. package/dist/main/lib/webauthn.dom.js +4 -0
  80. package/dist/main/lib/webauthn.dom.js.map +1 -0
  81. package/dist/main/lib/webauthn.errors.d.ts +80 -0
  82. package/dist/main/lib/webauthn.errors.d.ts.map +1 -0
  83. package/dist/main/lib/webauthn.errors.js +265 -0
  84. package/dist/main/lib/webauthn.errors.js.map +1 -0
  85. package/dist/main/lib/webauthn.js +702 -0
  86. package/dist/main/lib/webauthn.js.map +1 -0
  87. package/dist/module/AuthAdminApi.d.ts +4 -0
  88. package/dist/module/AuthAdminApi.d.ts.map +1 -0
  89. package/dist/module/AuthAdminApi.js +4 -0
  90. package/dist/module/AuthAdminApi.js.map +1 -0
  91. package/dist/module/AuthClient.d.ts +4 -0
  92. package/dist/module/AuthClient.d.ts.map +1 -0
  93. package/dist/module/AuthClient.js +4 -0
  94. package/dist/module/AuthClient.js.map +1 -0
  95. package/dist/module/GoTrueAdminApi.d.ts +99 -0
  96. package/dist/module/GoTrueAdminApi.d.ts.map +1 -0
  97. package/dist/module/GoTrueAdminApi.js +275 -0
  98. package/dist/module/GoTrueAdminApi.js.map +1 -0
  99. package/dist/module/GoTrueClient.d.ts +531 -0
  100. package/dist/module/GoTrueClient.d.ts.map +1 -0
  101. package/dist/module/GoTrueClient.js +2559 -0
  102. package/dist/module/GoTrueClient.js.map +1 -0
  103. package/dist/module/index.d.ts +9 -0
  104. package/dist/module/index.d.ts.map +1 -0
  105. package/dist/module/index.js +9 -0
  106. package/dist/module/index.js.map +1 -0
  107. package/dist/module/lib/base64url.d.ts +76 -0
  108. package/dist/module/lib/base64url.d.ts.map +1 -0
  109. package/dist/module/lib/base64url.js +257 -0
  110. package/dist/module/lib/base64url.js.map +1 -0
  111. package/dist/module/lib/constants.d.ts +26 -0
  112. package/dist/module/lib/constants.d.ts.map +1 -0
  113. package/dist/module/lib/constants.js +28 -0
  114. package/dist/module/lib/constants.js.map +1 -0
  115. package/dist/module/lib/error-codes.d.ts +7 -0
  116. package/dist/module/lib/error-codes.d.ts.map +1 -0
  117. package/dist/module/lib/error-codes.js +2 -0
  118. package/dist/module/lib/error-codes.js.map +1 -0
  119. package/dist/module/lib/errors.d.ts +100 -0
  120. package/dist/module/lib/errors.d.ts.map +1 -0
  121. package/dist/module/lib/errors.js +116 -0
  122. package/dist/module/lib/errors.js.map +1 -0
  123. package/dist/module/lib/fetch.d.ts +34 -0
  124. package/dist/module/lib/fetch.d.ts.map +1 -0
  125. package/dist/module/lib/fetch.js +184 -0
  126. package/dist/module/lib/fetch.js.map +1 -0
  127. package/dist/module/lib/helpers.d.ts +67 -0
  128. package/dist/module/lib/helpers.d.ts.map +1 -0
  129. package/dist/module/lib/helpers.js +329 -0
  130. package/dist/module/lib/helpers.js.map +1 -0
  131. package/dist/module/lib/local-storage.d.ts +9 -0
  132. package/dist/module/lib/local-storage.d.ts.map +1 -0
  133. package/dist/module/lib/local-storage.js +18 -0
  134. package/dist/module/lib/local-storage.js.map +1 -0
  135. package/dist/module/lib/locks.d.ts +64 -0
  136. package/dist/module/lib/locks.d.ts.map +1 -0
  137. package/dist/module/lib/locks.js +179 -0
  138. package/dist/module/lib/locks.js.map +1 -0
  139. package/dist/module/lib/polyfills.d.ts +5 -0
  140. package/dist/module/lib/polyfills.d.ts.map +1 -0
  141. package/dist/module/lib/polyfills.js +26 -0
  142. package/dist/module/lib/polyfills.js.map +1 -0
  143. package/dist/module/lib/types.d.ts +1130 -0
  144. package/dist/module/lib/types.d.ts.map +1 -0
  145. package/dist/module/lib/types.js +19 -0
  146. package/dist/module/lib/types.js.map +1 -0
  147. package/dist/module/lib/version.d.ts +2 -0
  148. package/dist/module/lib/version.d.ts.map +1 -0
  149. package/dist/module/lib/version.js +8 -0
  150. package/dist/module/lib/version.js.map +1 -0
  151. package/dist/module/lib/web3/ethereum.d.ts +96 -0
  152. package/dist/module/lib/web3/ethereum.d.ts.map +1 -0
  153. package/dist/module/lib/web3/ethereum.js +60 -0
  154. package/dist/module/lib/web3/ethereum.js.map +1 -0
  155. package/dist/module/lib/web3/solana.d.ts +160 -0
  156. package/dist/module/lib/web3/solana.d.ts.map +1 -0
  157. package/dist/module/lib/web3/solana.js +3 -0
  158. package/dist/module/lib/web3/solana.js.map +1 -0
  159. package/dist/module/lib/webauthn.d.ts +274 -0
  160. package/dist/module/lib/webauthn.d.ts.map +1 -0
  161. package/dist/module/lib/webauthn.dom.d.ts +583 -0
  162. package/dist/module/lib/webauthn.dom.d.ts.map +1 -0
  163. package/dist/module/lib/webauthn.dom.js +3 -0
  164. package/dist/module/lib/webauthn.dom.js.map +1 -0
  165. package/dist/module/lib/webauthn.errors.d.ts +80 -0
  166. package/dist/module/lib/webauthn.errors.d.ts.map +1 -0
  167. package/dist/module/lib/webauthn.errors.js +257 -0
  168. package/dist/module/lib/webauthn.errors.js.map +1 -0
  169. package/dist/module/lib/webauthn.js +685 -0
  170. package/dist/module/lib/webauthn.js.map +1 -0
  171. package/package.json +49 -0
  172. package/src/AuthAdminApi.ts +5 -0
  173. package/src/AuthClient.ts +5 -0
  174. package/src/GoTrueAdminApi.ts +352 -0
  175. package/src/GoTrueClient.ts +3483 -0
  176. package/src/index.ts +13 -0
  177. package/src/lib/base64url.ts +308 -0
  178. package/src/lib/constants.ts +34 -0
  179. package/src/lib/error-codes.ts +90 -0
  180. package/src/lib/errors.ts +165 -0
  181. package/src/lib/fetch.ts +283 -0
  182. package/src/lib/helpers.ts +416 -0
  183. package/src/lib/local-storage.ts +21 -0
  184. package/src/lib/locks.ts +225 -0
  185. package/src/lib/polyfills.ts +23 -0
  186. package/src/lib/types.ts +1450 -0
  187. package/src/lib/version.ts +7 -0
  188. package/src/lib/web3/ethereum.ts +184 -0
  189. package/src/lib/web3/solana.ts +186 -0
  190. package/src/lib/webauthn.dom.ts +636 -0
  191. package/src/lib/webauthn.errors.ts +317 -0
  192. package/src/lib/webauthn.ts +929 -0
@@ -0,0 +1,7 @@
1
+ // Generated automatically during releases by scripts/update-version-files.ts
2
+ // This file provides runtime access to the package version for:
3
+ // - HTTP request headers (e.g., X-Client-Info header for API requests)
4
+ // - Debugging and support (identifying which version is running)
5
+ // - Telemetry and logging (version reporting in errors/analytics)
6
+ // - Ensuring build artifacts match the published package version
7
+ export const version = '2.58.1-canary.0'
@@ -0,0 +1,184 @@
1
+ // types and functions copied over from viem so this library doesn't depend on it
2
+
3
+ export type Hex = `0x${string}`
4
+
5
+ export type Address = Hex
6
+
7
+ export type EIP1193EventMap = {
8
+ accountsChanged(accounts: Address[]): void
9
+ chainChanged(chainId: string): void
10
+ connect(connectInfo: { chainId: string }): void
11
+ disconnect(error: { code: number; message: string }): void
12
+ message(message: { type: string; data: unknown }): void
13
+ }
14
+
15
+ export type EIP1193Events = {
16
+ on<event extends keyof EIP1193EventMap>(event: event, listener: EIP1193EventMap[event]): void
17
+ removeListener<event extends keyof EIP1193EventMap>(
18
+ event: event,
19
+ listener: EIP1193EventMap[event]
20
+ ): void
21
+ }
22
+
23
+ export type EIP1193RequestFn = (args: { method: string; params?: unknown }) => Promise<unknown>
24
+
25
+ export type EIP1193Provider = EIP1193Events & {
26
+ address: string
27
+ request: EIP1193RequestFn
28
+ }
29
+
30
+ export type EthereumWallet = EIP1193Provider
31
+
32
+ /**
33
+ * EIP-4361 message fields
34
+ */
35
+ export type SiweMessage = {
36
+ /**
37
+ * The Ethereum address performing the signing.
38
+ */
39
+ address: Address
40
+ /**
41
+ * The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) Chain ID to which the session is bound,
42
+ */
43
+ chainId: number
44
+ /**
45
+ * [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority that is requesting the signing.
46
+ */
47
+ domain: string
48
+ /**
49
+ * Time when the signed authentication message is no longer valid.
50
+ */
51
+ expirationTime?: Date | undefined
52
+ /**
53
+ * Time when the message was generated, typically the current time.
54
+ */
55
+ issuedAt?: Date | undefined
56
+ /**
57
+ * A random string typically chosen by the relying party and used to prevent replay attacks.
58
+ */
59
+ nonce?: string
60
+ /**
61
+ * Time when the signed authentication message will become valid.
62
+ */
63
+ notBefore?: Date | undefined
64
+ /**
65
+ * A system-specific identifier that may be used to uniquely refer to the sign-in request.
66
+ */
67
+ requestId?: string | undefined
68
+ /**
69
+ * A list of information or references to information the user wishes to have resolved as part of authentication by the relying party.
70
+ */
71
+ resources?: string[] | undefined
72
+ /**
73
+ * [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme of the origin of the request.
74
+ */
75
+ scheme?: string | undefined
76
+ /**
77
+ * A human-readable ASCII assertion that the user will sign.
78
+ */
79
+ statement?: string | undefined
80
+ /**
81
+ * [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) URI referring to the resource that is the subject of the signing (as in the subject of a claim).
82
+ */
83
+ uri: string
84
+ /**
85
+ * The current version of the SIWE Message.
86
+ */
87
+ version: '1'
88
+ }
89
+
90
+ export type EthereumSignInInput = SiweMessage
91
+
92
+ export function getAddress(address: string): Address {
93
+ if (!/^0x[a-fA-F0-9]{40}$/.test(address)) {
94
+ throw new Error(`@supabase/auth-js: Address "${address}" is invalid.`)
95
+ }
96
+ return address.toLowerCase() as Address
97
+ }
98
+
99
+ export function fromHex(hex: Hex): number {
100
+ return parseInt(hex, 16)
101
+ }
102
+
103
+ export function toHex(value: string): Hex {
104
+ const bytes = new TextEncoder().encode(value)
105
+ const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join('')
106
+ return ('0x' + hex) as Hex
107
+ }
108
+
109
+ /**
110
+ * Creates EIP-4361 formatted message.
111
+ */
112
+ export function createSiweMessage(parameters: SiweMessage): string {
113
+ const {
114
+ chainId,
115
+ domain,
116
+ expirationTime,
117
+ issuedAt = new Date(),
118
+ nonce,
119
+ notBefore,
120
+ requestId,
121
+ resources,
122
+ scheme,
123
+ uri,
124
+ version,
125
+ } = parameters
126
+
127
+ // Validate fields
128
+ {
129
+ if (!Number.isInteger(chainId))
130
+ throw new Error(
131
+ `@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${chainId}`
132
+ )
133
+
134
+ if (!domain)
135
+ throw new Error(
136
+ `@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`
137
+ )
138
+
139
+ if (nonce && nonce.length < 8)
140
+ throw new Error(
141
+ `@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${nonce}`
142
+ )
143
+
144
+ if (!uri)
145
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`)
146
+
147
+ if (version !== '1')
148
+ throw new Error(
149
+ `@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${version}`
150
+ )
151
+
152
+ if (parameters.statement?.includes('\n'))
153
+ throw new Error(
154
+ `@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${parameters.statement}`
155
+ )
156
+ }
157
+
158
+ // Construct message
159
+ const address = getAddress(parameters.address)
160
+ const origin = scheme ? `${scheme}://${domain}` : domain
161
+ const statement = parameters.statement ? `${parameters.statement}\n` : ''
162
+ const prefix = `${origin} wants you to sign in with your Ethereum account:\n${address}\n\n${statement}`
163
+
164
+ let suffix = `URI: ${uri}\nVersion: ${version}\nChain ID: ${chainId}${
165
+ nonce ? `\nNonce: ${nonce}` : ''
166
+ }\nIssued At: ${issuedAt.toISOString()}`
167
+
168
+ if (expirationTime) suffix += `\nExpiration Time: ${expirationTime.toISOString()}`
169
+ if (notBefore) suffix += `\nNot Before: ${notBefore.toISOString()}`
170
+ if (requestId) suffix += `\nRequest ID: ${requestId}`
171
+ if (resources) {
172
+ let content = '\nResources:'
173
+ for (const resource of resources) {
174
+ if (!resource || typeof resource !== 'string')
175
+ throw new Error(
176
+ `@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${resource}`
177
+ )
178
+ content += `\n- ${resource}`
179
+ }
180
+ suffix += content
181
+ }
182
+
183
+ return `${prefix}\n${suffix}`
184
+ }
@@ -0,0 +1,186 @@
1
+ // types copied over from @solana/wallet-standard-features and @wallet-standard/base so this library doesn't depend on them
2
+
3
+ /**
4
+ * A namespaced identifier in the format `${namespace}:${reference}`.
5
+ *
6
+ * Used by {@link IdentifierArray} and {@link IdentifierRecord}.
7
+ *
8
+ * @group Identifier
9
+ */
10
+ export type IdentifierString = `${string}:${string}`
11
+
12
+ /**
13
+ * A read-only array of namespaced identifiers in the format `${namespace}:${reference}`.
14
+ *
15
+ * Used by {@link Wallet.chains | Wallet::chains}, {@link WalletAccount.chains | WalletAccount::chains}, and
16
+ * {@link WalletAccount.features | WalletAccount::features}.
17
+ *
18
+ * @group Identifier
19
+ */
20
+ export type IdentifierArray = readonly IdentifierString[]
21
+
22
+ /**
23
+ * Version of the Wallet Standard implemented by a {@link Wallet}.
24
+ *
25
+ * Used by {@link Wallet.version | Wallet::version}.
26
+ *
27
+ * Note that this is _NOT_ a version of the Wallet, but a version of the Wallet Standard itself that the Wallet
28
+ * supports.
29
+ *
30
+ * This may be used by the app to determine compatibility and feature detect.
31
+ *
32
+ * @group Wallet
33
+ */
34
+ export type WalletVersion = '1.0.0'
35
+
36
+ /**
37
+ * A data URI containing a base64-encoded SVG, WebP, PNG, or GIF image.
38
+ *
39
+ * Used by {@link Wallet.icon | Wallet::icon} and {@link WalletAccount.icon | WalletAccount::icon}.
40
+ *
41
+ * @group Wallet
42
+ */
43
+ export type WalletIcon = `data:image/${'svg+xml' | 'webp' | 'png' | 'gif'};base64,${string}`
44
+
45
+ /**
46
+ * Interface of a **WalletAccount**, also referred to as an **Account**.
47
+ *
48
+ * An account is a _read-only data object_ that is provided from the Wallet to the app, authorizing the app to use it.
49
+ *
50
+ * The app can use an account to display and query information from a chain.
51
+ *
52
+ * The app can also act using an account by passing it to {@link Wallet.features | features} of the Wallet.
53
+ *
54
+ * Wallets may use or extend {@link "@wallet-standard/wallet".ReadonlyWalletAccount} which implements this interface.
55
+ *
56
+ * @group Wallet
57
+ */
58
+ export interface WalletAccount {
59
+ /** Address of the account, corresponding with a public key. */
60
+ readonly address: string
61
+
62
+ /** Public key of the account, corresponding with a secret key to use. */
63
+ readonly publicKey: Uint8Array
64
+
65
+ /**
66
+ * Chains supported by the account.
67
+ *
68
+ * This must be a subset of the {@link Wallet.chains | chains} of the Wallet.
69
+ */
70
+ readonly chains: IdentifierArray
71
+
72
+ /**
73
+ * Feature names supported by the account.
74
+ *
75
+ * This must be a subset of the names of {@link Wallet.features | features} of the Wallet.
76
+ */
77
+ readonly features: IdentifierArray
78
+
79
+ /** Optional user-friendly descriptive label or name for the account. This may be displayed by the app. */
80
+ readonly label?: string
81
+
82
+ /** Optional user-friendly icon for the account. This may be displayed by the app. */
83
+ readonly icon?: WalletIcon
84
+ }
85
+
86
+ /** Input for signing in. */
87
+ export interface SolanaSignInInput {
88
+ /**
89
+ * Optional EIP-4361 Domain.
90
+ * If not provided, the wallet must determine the Domain to include in the message.
91
+ */
92
+ readonly domain?: string
93
+
94
+ /**
95
+ * Optional EIP-4361 Address.
96
+ * If not provided, the wallet must determine the Address to include in the message.
97
+ */
98
+ readonly address?: string
99
+
100
+ /**
101
+ * Optional EIP-4361 Statement.
102
+ * If not provided, the wallet must not include Statement in the message.
103
+ */
104
+ readonly statement?: string
105
+
106
+ /**
107
+ * Optional EIP-4361 URI.
108
+ * If not provided, the wallet must not include URI in the message.
109
+ */
110
+ readonly uri?: string
111
+
112
+ /**
113
+ * Optional EIP-4361 Version.
114
+ * If not provided, the wallet must not include Version in the message.
115
+ */
116
+ readonly version?: string
117
+
118
+ /**
119
+ * Optional EIP-4361 Chain ID.
120
+ * If not provided, the wallet must not include Chain ID in the message.
121
+ */
122
+ readonly chainId?: string
123
+
124
+ /**
125
+ * Optional EIP-4361 Nonce.
126
+ * If not provided, the wallet must not include Nonce in the message.
127
+ */
128
+ readonly nonce?: string
129
+
130
+ /**
131
+ * Optional EIP-4361 Issued At.
132
+ * If not provided, the wallet must not include Issued At in the message.
133
+ */
134
+ readonly issuedAt?: string
135
+
136
+ /**
137
+ * Optional EIP-4361 Expiration Time.
138
+ * If not provided, the wallet must not include Expiration Time in the message.
139
+ */
140
+ readonly expirationTime?: string
141
+
142
+ /**
143
+ * Optional EIP-4361 Not Before.
144
+ * If not provided, the wallet must not include Not Before in the message.
145
+ */
146
+ readonly notBefore?: string
147
+
148
+ /**
149
+ * Optional EIP-4361 Request ID.
150
+ * If not provided, the wallet must not include Request ID in the message.
151
+ */
152
+ readonly requestId?: string
153
+
154
+ /**
155
+ * Optional EIP-4361 Resources.
156
+ * If not provided, the wallet must not include Resources in the message.
157
+ */
158
+ readonly resources?: readonly string[]
159
+ }
160
+
161
+ /** Output of signing in. */
162
+ export interface SolanaSignInOutput {
163
+ /**
164
+ * Account that was signed in.
165
+ * The address of the account may be different from the provided input Address.
166
+ */
167
+ readonly account: WalletAccount
168
+
169
+ /**
170
+ * Message bytes that were signed.
171
+ * The wallet may prefix or otherwise modify the message before signing it.
172
+ */
173
+ readonly signedMessage: Uint8Array
174
+
175
+ /**
176
+ * Message signature produced.
177
+ * If the signature type is provided, the signature must be Ed25519.
178
+ */
179
+ readonly signature: Uint8Array
180
+
181
+ /**
182
+ * Optional type of the message signature produced.
183
+ * If not provided, the signature must be Ed25519.
184
+ */
185
+ readonly signatureType?: 'ed25519'
186
+ }