@settlemint/sdk-viem 2.1.4-prfa41b757 → 2.1.5-main2facc1fe

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.
package/README.md CHANGED
@@ -31,9 +31,34 @@
31
31
  - [Functions](#functions)
32
32
  - [getPublicClient()](#getpublicclient)
33
33
  - [getWalletClient()](#getwalletclient)
34
+ - [Enumerations](#enumerations)
35
+ - [OTPAlgorithm](#otpalgorithm)
36
+ - [WalletVerificationType](#walletverificationtype)
34
37
  - [Interfaces](#interfaces)
35
38
  - [ClientOptions](#clientoptions)
39
+ - [CreateWalletParameters](#createwalletparameters)
40
+ - [CreateWalletResponse](#createwalletresponse)
41
+ - [CreateWalletVerificationChallengesParameters](#createwalletverificationchallengesparameters)
42
+ - [CreateWalletVerificationParameters](#createwalletverificationparameters)
43
+ - [CreateWalletVerificationResponse](#createwalletverificationresponse)
44
+ - [DeleteWalletVerificationParameters](#deletewalletverificationparameters)
45
+ - [DeleteWalletVerificationResponse](#deletewalletverificationresponse)
46
+ - [GetWalletVerificationsParameters](#getwalletverificationsparameters)
47
+ - [VerificationResult](#verificationresult)
48
+ - [VerifyWalletVerificationChallengeParameters](#verifywalletverificationchallengeparameters)
49
+ - [WalletInfo](#walletinfo)
50
+ - [WalletOTPVerificationInfo](#walletotpverificationinfo)
51
+ - [WalletPincodeVerificationInfo](#walletpincodeverificationinfo)
52
+ - [WalletSecretCodesVerificationInfo](#walletsecretcodesverificationinfo)
53
+ - [WalletVerification](#walletverification)
54
+ - [WalletVerificationChallenge](#walletverificationchallenge)
36
55
  - [WalletVerificationOptions](#walletverificationoptions)
56
+ - [Type Aliases](#type-aliases)
57
+ - [AddressOrObject](#addressorobject)
58
+ - [CreateWalletVerificationChallengesResponse](#createwalletverificationchallengesresponse)
59
+ - [GetWalletVerificationsResponse](#getwalletverificationsresponse)
60
+ - [VerifyWalletVerificationChallengeResponse](#verifywalletverificationchallengeresponse)
61
+ - [WalletVerificationInfo](#walletverificationinfo)
37
62
  - [Contributing](#contributing)
38
63
  - [License](#license)
39
64
 
@@ -49,7 +74,7 @@ The SettleMint Viem SDK provides a lightweight wrapper that automatically config
49
74
 
50
75
  > **getPublicClient**(`options`): `object`
51
76
 
52
- Defined in: [sdk/viem/src/viem.ts:59](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L59)
77
+ Defined in: [sdk/viem/src/viem.ts:64](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L64)
53
78
 
54
79
  Get a public client. Use this if you need to read from the blockchain.
55
80
 
@@ -63,7 +88,7 @@ Get a public client. Use this if you need to read from the blockchain.
63
88
 
64
89
  `object`
65
90
 
66
- The public client.
91
+ The public client. see [https://viem.sh/docs/clients/public](https://viem.sh/docs/clients/public)
67
92
 
68
93
  ##### Example
69
94
 
@@ -86,18 +111,12 @@ console.log(block);
86
111
 
87
112
  #### getWalletClient()
88
113
 
89
- > **getWalletClient**\<`C`\>(`options`): (`verificationOptions?`) => `object`
114
+ > **getWalletClient**(`options`): (`verificationOptions?`) => `Client`\<`HttpTransport`\<`undefined` \| `RpcSchema`, `boolean`\>, `Chain`, `undefined`, `WalletRpcSchema`, `object` & `object` & `object` & `object` & `object` & `object` & `object` & `WalletActions`\<`Chain`, `undefined`\>\>
90
115
 
91
- Defined in: [sdk/viem/src/viem.ts:121](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L121)
116
+ Defined in: [sdk/viem/src/viem.ts:126](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L126)
92
117
 
93
118
  Get a wallet client. Use this if you need to write to the blockchain.
94
119
 
95
- ##### Type Parameters
96
-
97
- | Type Parameter |
98
- | ------ |
99
- | `C` *extends* `Chain` |
100
-
101
120
  ##### Parameters
102
121
 
103
122
  | Parameter | Type | Description |
@@ -106,9 +125,9 @@ Get a wallet client. Use this if you need to write to the blockchain.
106
125
 
107
126
  ##### Returns
108
127
 
109
- A function that returns a wallet client. The function can be called with verification options.
128
+ A function that returns a wallet client. The function can be called with verification options for HD wallets. see [https://viem.sh/docs/clients/wallet](https://viem.sh/docs/clients/wallet)
110
129
 
111
- > (`verificationOptions?`): `object`
130
+ > (`verificationOptions?`): `Client`\<`HttpTransport`\<`undefined` \| `RpcSchema`, `boolean`\>, `Chain`, `undefined`, `WalletRpcSchema`, `object` & `object` & `object` & `object` & `object` & `object` & `object` & `WalletActions`\<`Chain`, `undefined`\>\>
112
131
 
113
132
  ###### Parameters
114
133
 
@@ -118,7 +137,7 @@ A function that returns a wallet client. The function can be called with verific
118
137
 
119
138
  ###### Returns
120
139
 
121
- `object`
140
+ `Client`\<`HttpTransport`\<`undefined` \| `RpcSchema`, `boolean`\>, `Chain`, `undefined`, `WalletRpcSchema`, `object` & `object` & `object` & `object` & `object` & `object` & `object` & `WalletActions`\<`Chain`, `undefined`\>\>
122
141
 
123
142
  ##### Example
124
143
 
@@ -148,11 +167,51 @@ const transactionHash = await walletClient().writeContract({
148
167
  console.log(transactionHash);
149
168
  ```
150
169
 
170
+ ### Enumerations
171
+
172
+ #### OTPAlgorithm
173
+
174
+ Defined in: [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:18](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L18)
175
+
176
+ Supported hash algorithms for One-Time Password (OTP) verification.
177
+ These algorithms determine the cryptographic function used to generate OTP codes.
178
+
179
+ ##### Enumeration Members
180
+
181
+ | Enumeration Member | Value | Description | Defined in |
182
+ | ------ | ------ | ------ | ------ |
183
+ | <a id="sha1"></a> `SHA1` | `"SHA1"` | SHA-1 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:20](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L20) |
184
+ | <a id="sha224"></a> `SHA224` | `"SHA224"` | SHA-224 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:22](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L22) |
185
+ | <a id="sha256"></a> `SHA256` | `"SHA256"` | SHA-256 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:24](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L24) |
186
+ | <a id="sha3_224"></a> `SHA3_224` | `"SHA3-224"` | SHA3-224 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:30](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L30) |
187
+ | <a id="sha3_256"></a> `SHA3_256` | `"SHA3-256"` | SHA3-256 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:32](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L32) |
188
+ | <a id="sha3_384"></a> `SHA3_384` | `"SHA3-384"` | SHA3-384 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:34](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L34) |
189
+ | <a id="sha3_512"></a> `SHA3_512` | `"SHA3-512"` | SHA3-512 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:36](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L36) |
190
+ | <a id="sha384"></a> `SHA384` | `"SHA384"` | SHA-384 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:26](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L26) |
191
+ | <a id="sha512"></a> `SHA512` | `"SHA512"` | SHA-512 hash algorithm | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:28](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L28) |
192
+
193
+ ***
194
+
195
+ #### WalletVerificationType
196
+
197
+ Defined in: [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:5](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L5)
198
+
199
+ Types of wallet verification methods supported by the system.
200
+ Used to identify different verification mechanisms when creating or managing wallet verifications.
201
+
202
+ ##### Enumeration Members
203
+
204
+ | Enumeration Member | Value | Description | Defined in |
205
+ | ------ | ------ | ------ | ------ |
206
+ | <a id="otp"></a> `OTP` | `"OTP"` | One-Time Password verification method | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:9](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L9) |
207
+ | <a id="pincode"></a> `PINCODE` | `"PINCODE"` | PIN code verification method | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:7](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L7) |
208
+ | <a id="secret_codes"></a> `SECRET_CODES` | `"SECRET_CODES"` | Secret recovery codes verification method | [sdk/viem/src/custom-actions/types/wallet-verification.enum.ts:11](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/types/wallet-verification.enum.ts#L11) |
209
+
151
210
  ### Interfaces
152
211
 
153
212
  #### ClientOptions
154
213
 
155
- Defined in: [sdk/viem/src/viem.ts:16](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L16)
214
+ Defined in: [sdk/viem/src/viem.ts:21](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L21)
156
215
 
157
216
  The options for the viem client.
158
217
 
@@ -160,17 +219,276 @@ The options for the viem client.
160
219
 
161
220
  | Property | Type | Description | Defined in |
162
221
  | ------ | ------ | ------ | ------ |
163
- | <a id="accesstoken"></a> `accessToken` | `string` | The access token | [sdk/viem/src/viem.ts:20](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L20) |
164
- | <a id="chainid"></a> `chainId` | `string` | The chain id | [sdk/viem/src/viem.ts:24](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L24) |
165
- | <a id="chainname"></a> `chainName` | `string` | The chain name | [sdk/viem/src/viem.ts:28](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L28) |
166
- | <a id="httptransportconfig"></a> `httpTransportConfig?` | `HttpTransportConfig` | The http transport config | [sdk/viem/src/viem.ts:36](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L36) |
167
- | <a id="rpcurl"></a> `rpcUrl` | `string` | The json rpc url | [sdk/viem/src/viem.ts:32](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L32) |
222
+ | <a id="accesstoken"></a> `accessToken` | `string` | The access token | [sdk/viem/src/viem.ts:25](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L25) |
223
+ | <a id="chainid"></a> `chainId` | `string` | The chain id | [sdk/viem/src/viem.ts:29](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L29) |
224
+ | <a id="chainname"></a> `chainName` | `string` | The chain name | [sdk/viem/src/viem.ts:33](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L33) |
225
+ | <a id="httptransportconfig"></a> `httpTransportConfig?` | `HttpTransportConfig` | The http transport config | [sdk/viem/src/viem.ts:41](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L41) |
226
+ | <a id="rpcurl"></a> `rpcUrl` | `string` | The json rpc url | [sdk/viem/src/viem.ts:37](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L37) |
227
+
228
+ ***
229
+
230
+ #### CreateWalletParameters
231
+
232
+ Defined in: [sdk/viem/src/custom-actions/create-wallet.action.ts:14](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L14)
233
+
234
+ Parameters for creating a wallet.
235
+
236
+ ##### Properties
237
+
238
+ | Property | Type | Description | Defined in |
239
+ | ------ | ------ | ------ | ------ |
240
+ | <a id="keyvaultid"></a> `keyVaultId` | `string` | The unique name of the key vault where the wallet will be created. | [sdk/viem/src/custom-actions/create-wallet.action.ts:16](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L16) |
241
+ | <a id="walletinfo"></a> `walletInfo` | [`WalletInfo`](#walletinfo-1) | Information about the wallet to be created. | [sdk/viem/src/custom-actions/create-wallet.action.ts:18](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L18) |
242
+
243
+ ***
244
+
245
+ #### CreateWalletResponse
246
+
247
+ Defined in: [sdk/viem/src/custom-actions/create-wallet.action.ts:24](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L24)
248
+
249
+ Response from creating a wallet.
250
+
251
+ ##### Properties
252
+
253
+ | Property | Type | Description | Defined in |
254
+ | ------ | ------ | ------ | ------ |
255
+ | <a id="address"></a> `address` | `string` | The blockchain address of the wallet. | [sdk/viem/src/custom-actions/create-wallet.action.ts:30](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L30) |
256
+ | <a id="derivationpath"></a> `derivationPath` | `string` | The HD derivation path used to create the wallet. | [sdk/viem/src/custom-actions/create-wallet.action.ts:32](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L32) |
257
+ | <a id="id"></a> `id` | `string` | The unique identifier of the wallet. | [sdk/viem/src/custom-actions/create-wallet.action.ts:26](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L26) |
258
+ | <a id="name"></a> `name` | `string` | The name of the wallet. | [sdk/viem/src/custom-actions/create-wallet.action.ts:28](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L28) |
259
+
260
+ ***
261
+
262
+ #### CreateWalletVerificationChallengesParameters
263
+
264
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:8](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L8)
265
+
266
+ Parameters for creating wallet verification challenges.
267
+
268
+ ##### Properties
269
+
270
+ | Property | Type | Description | Defined in |
271
+ | ------ | ------ | ------ | ------ |
272
+ | <a id="addressorobject"></a> `addressOrObject` | [`AddressOrObject`](#addressorobject-2) | The wallet address or object containing wallet address and optional verification ID. | [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:10](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L10) |
273
+
274
+ ***
275
+
276
+ #### CreateWalletVerificationParameters
277
+
278
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:59](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L59)
279
+
280
+ Parameters for creating a wallet verification.
281
+
282
+ ##### Properties
283
+
284
+ | Property | Type | Description | Defined in |
285
+ | ------ | ------ | ------ | ------ |
286
+ | <a id="userwalletaddress"></a> `userWalletAddress` | `string` | The wallet address for which to create the verification. | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:61](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L61) |
287
+ | <a id="walletverificationinfo"></a> `walletVerificationInfo` | [`WalletVerificationInfo`](#walletverificationinfo-1) | The verification information to create. | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:63](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L63) |
288
+
289
+ ***
290
+
291
+ #### CreateWalletVerificationResponse
292
+
293
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:69](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L69)
294
+
295
+ Response from creating a wallet verification.
296
+
297
+ ##### Properties
298
+
299
+ | Property | Type | Description | Defined in |
300
+ | ------ | ------ | ------ | ------ |
301
+ | <a id="id-1"></a> `id` | `string` | The unique identifier of the verification. | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:71](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L71) |
302
+ | <a id="name-1"></a> `name` | `string` | The name of the verification method. | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:73](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L73) |
303
+ | <a id="parameters"></a> `parameters` | `Record`\<`string`, `string`\> | Additional parameters specific to the verification type. | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:77](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L77) |
304
+ | <a id="verificationtype"></a> `verificationType` | [`WalletVerificationType`](#walletverificationtype) | The type of verification method. | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:75](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L75) |
305
+
306
+ ***
307
+
308
+ #### DeleteWalletVerificationParameters
309
+
310
+ Defined in: [sdk/viem/src/custom-actions/delete-wallet-verification.action.ts:6](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/delete-wallet-verification.action.ts#L6)
311
+
312
+ Parameters for deleting a wallet verification.
313
+
314
+ ##### Properties
315
+
316
+ | Property | Type | Description | Defined in |
317
+ | ------ | ------ | ------ | ------ |
318
+ | <a id="userwalletaddress-1"></a> `userWalletAddress` | `string` | The wallet address for which to delete the verification. | [sdk/viem/src/custom-actions/delete-wallet-verification.action.ts:8](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/delete-wallet-verification.action.ts#L8) |
319
+ | <a id="verificationid"></a> `verificationId` | `string` | The unique identifier of the verification to delete. | [sdk/viem/src/custom-actions/delete-wallet-verification.action.ts:10](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/delete-wallet-verification.action.ts#L10) |
320
+
321
+ ***
322
+
323
+ #### DeleteWalletVerificationResponse
324
+
325
+ Defined in: [sdk/viem/src/custom-actions/delete-wallet-verification.action.ts:16](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/delete-wallet-verification.action.ts#L16)
326
+
327
+ Response from deleting a wallet verification.
328
+
329
+ ##### Properties
330
+
331
+ | Property | Type | Description | Defined in |
332
+ | ------ | ------ | ------ | ------ |
333
+ | <a id="success"></a> `success` | `boolean` | Whether the deletion was successful. | [sdk/viem/src/custom-actions/delete-wallet-verification.action.ts:18](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/delete-wallet-verification.action.ts#L18) |
334
+
335
+ ***
336
+
337
+ #### GetWalletVerificationsParameters
338
+
339
+ Defined in: [sdk/viem/src/custom-actions/get-wallet-verifications.action.ts:7](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/get-wallet-verifications.action.ts#L7)
340
+
341
+ Parameters for getting wallet verifications.
342
+
343
+ ##### Properties
344
+
345
+ | Property | Type | Description | Defined in |
346
+ | ------ | ------ | ------ | ------ |
347
+ | <a id="userwalletaddress-2"></a> `userWalletAddress` | `string` | The wallet address for which to fetch verifications. | [sdk/viem/src/custom-actions/get-wallet-verifications.action.ts:9](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/get-wallet-verifications.action.ts#L9) |
348
+
349
+ ***
350
+
351
+ #### VerificationResult
352
+
353
+ Defined in: [sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts:26](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts#L26)
354
+
355
+ Result of a wallet verification challenge.
356
+
357
+ ##### Properties
358
+
359
+ | Property | Type | Description | Defined in |
360
+ | ------ | ------ | ------ | ------ |
361
+ | <a id="verified"></a> `verified` | `boolean` | Whether the verification was successful. | [sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts:28](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts#L28) |
362
+
363
+ ***
364
+
365
+ #### VerifyWalletVerificationChallengeParameters
366
+
367
+ Defined in: [sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts:16](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts#L16)
368
+
369
+ Parameters for verifying a wallet verification challenge.
370
+
371
+ ##### Properties
372
+
373
+ | Property | Type | Description | Defined in |
374
+ | ------ | ------ | ------ | ------ |
375
+ | <a id="addressorobject-1"></a> `addressOrObject` | [`AddressOrObject`](#addressorobject-2) | The wallet address or object containing wallet address and optional verification ID. | [sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts:18](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts#L18) |
376
+ | <a id="challengeresponse"></a> `challengeResponse` | `string` | The response to the verification challenge. | [sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts:20](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts#L20) |
377
+
378
+ ***
379
+
380
+ #### WalletInfo
381
+
382
+ Defined in: [sdk/viem/src/custom-actions/create-wallet.action.ts:6](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L6)
383
+
384
+ Information about the wallet to be created.
385
+
386
+ ##### Properties
387
+
388
+ | Property | Type | Description | Defined in |
389
+ | ------ | ------ | ------ | ------ |
390
+ | <a id="name-2"></a> `name` | `string` | The name of the wallet. | [sdk/viem/src/custom-actions/create-wallet.action.ts:8](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet.action.ts#L8) |
391
+
392
+ ***
393
+
394
+ #### WalletOTPVerificationInfo
395
+
396
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:27](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L27)
397
+
398
+ Information for One-Time Password (OTP) verification.
399
+
400
+ ##### Extends
401
+
402
+ - `BaseWalletVerificationInfo`
403
+
404
+ ##### Properties
405
+
406
+ | Property | Type | Description | Overrides | Inherited from | Defined in |
407
+ | ------ | ------ | ------ | ------ | ------ | ------ |
408
+ | <a id="algorithm"></a> `algorithm?` | [`OTPAlgorithm`](#otpalgorithm) | The hash algorithm to use for OTP generation. | - | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:31](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L31) |
409
+ | <a id="digits"></a> `digits?` | `number` | The number of digits in the OTP code. | - | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:33](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L33) |
410
+ | <a id="issuer"></a> `issuer?` | `string` | The issuer of the OTP. | - | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:37](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L37) |
411
+ | <a id="name-3"></a> `name` | `string` | The name of the verification method. | - | `BaseWalletVerificationInfo.name` | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:9](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L9) |
412
+ | <a id="period"></a> `period?` | `number` | The time period in seconds for OTP validity. | - | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:35](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L35) |
413
+ | <a id="verificationtype-1"></a> `verificationType` | [`OTP`](#otp) | The type of verification method. | `BaseWalletVerificationInfo.verificationType` | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:29](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L29) |
414
+
415
+ ***
416
+
417
+ #### WalletPincodeVerificationInfo
418
+
419
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:17](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L17)
420
+
421
+ Information for PIN code verification.
422
+
423
+ ##### Extends
424
+
425
+ - `BaseWalletVerificationInfo`
426
+
427
+ ##### Properties
428
+
429
+ | Property | Type | Description | Overrides | Inherited from | Defined in |
430
+ | ------ | ------ | ------ | ------ | ------ | ------ |
431
+ | <a id="name-4"></a> `name` | `string` | The name of the verification method. | - | `BaseWalletVerificationInfo.name` | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:9](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L9) |
432
+ | <a id="pincode-1"></a> `pincode` | `string` | The PIN code to use for verification. | - | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:21](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L21) |
433
+ | <a id="verificationtype-2"></a> `verificationType` | [`PINCODE`](#pincode) | The type of verification method. | `BaseWalletVerificationInfo.verificationType` | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:19](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L19) |
434
+
435
+ ***
436
+
437
+ #### WalletSecretCodesVerificationInfo
438
+
439
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:43](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L43)
440
+
441
+ Information for secret recovery codes verification.
442
+
443
+ ##### Extends
444
+
445
+ - `BaseWalletVerificationInfo`
446
+
447
+ ##### Properties
448
+
449
+ | Property | Type | Description | Overrides | Inherited from | Defined in |
450
+ | ------ | ------ | ------ | ------ | ------ | ------ |
451
+ | <a id="name-5"></a> `name` | `string` | The name of the verification method. | - | `BaseWalletVerificationInfo.name` | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:9](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L9) |
452
+ | <a id="verificationtype-3"></a> `verificationType` | [`SECRET_CODES`](#secret_codes) | The type of verification method. | `BaseWalletVerificationInfo.verificationType` | - | [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:45](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L45) |
453
+
454
+ ***
455
+
456
+ #### WalletVerification
457
+
458
+ Defined in: [sdk/viem/src/custom-actions/get-wallet-verifications.action.ts:15](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/get-wallet-verifications.action.ts#L15)
459
+
460
+ Represents a wallet verification.
461
+
462
+ ##### Properties
463
+
464
+ | Property | Type | Description | Defined in |
465
+ | ------ | ------ | ------ | ------ |
466
+ | <a id="id-2"></a> `id` | `string` | The unique identifier of the verification. | [sdk/viem/src/custom-actions/get-wallet-verifications.action.ts:17](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/get-wallet-verifications.action.ts#L17) |
467
+ | <a id="name-6"></a> `name` | `string` | The name of the verification method. | [sdk/viem/src/custom-actions/get-wallet-verifications.action.ts:19](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/get-wallet-verifications.action.ts#L19) |
468
+ | <a id="verificationtype-4"></a> `verificationType` | [`WalletVerificationType`](#walletverificationtype) | The type of verification method. | [sdk/viem/src/custom-actions/get-wallet-verifications.action.ts:21](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/get-wallet-verifications.action.ts#L21) |
469
+
470
+ ***
471
+
472
+ #### WalletVerificationChallenge
473
+
474
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:16](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L16)
475
+
476
+ Represents a wallet verification challenge.
477
+
478
+ ##### Properties
479
+
480
+ | Property | Type | Description | Defined in |
481
+ | ------ | ------ | ------ | ------ |
482
+ | <a id="challenge"></a> `challenge` | `Record`\<`string`, `string`\> | The challenge parameters specific to the verification type. | [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:24](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L24) |
483
+ | <a id="id-3"></a> `id` | `string` | The unique identifier of the challenge. | [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:18](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L18) |
484
+ | <a id="name-7"></a> `name` | `string` | The name of the challenge. | [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:20](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L20) |
485
+ | <a id="verificationtype-5"></a> `verificationType` | [`WalletVerificationType`](#walletverificationtype) | The type of verification required. | [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:22](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L22) |
168
486
 
169
487
  ***
170
488
 
171
489
  #### WalletVerificationOptions
172
490
 
173
- Defined in: [sdk/viem/src/viem.ts:79](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L79)
491
+ Defined in: [sdk/viem/src/viem.ts:84](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L84)
174
492
 
175
493
  The options for the wallet client.
176
494
 
@@ -178,8 +496,58 @@ The options for the wallet client.
178
496
 
179
497
  | Property | Type | Description | Defined in |
180
498
  | ------ | ------ | ------ | ------ |
181
- | <a id="challengeresponse"></a> `challengeResponse` | `string` | The challenge response (used for HD wallets) | [sdk/viem/src/viem.ts:87](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L87) |
182
- | <a id="verificationid"></a> `verificationId?` | `string` | The verification id (used for HD wallets), if not provided, the challenge response will be validated against all active verifications. | [sdk/viem/src/viem.ts:83](https://github.com/settlemint/sdk/blob/v2.1.4/sdk/viem/src/viem.ts#L83) |
499
+ | <a id="challengeresponse-1"></a> `challengeResponse` | `string` | The challenge response (used for HD wallets) | [sdk/viem/src/viem.ts:92](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L92) |
500
+ | <a id="verificationid-1"></a> `verificationId?` | `string` | The verification id (used for HD wallets), if not provided, the challenge response will be validated against all active verifications. | [sdk/viem/src/viem.ts:88](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/viem.ts#L88) |
501
+
502
+ ### Type Aliases
503
+
504
+ #### AddressOrObject
505
+
506
+ > **AddressOrObject** = `string` \| \{ `userWalletAddress`: `string`; `verificationId?`: `string`; \}
507
+
508
+ Defined in: [sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts:6](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts#L6)
509
+
510
+ Represents either a wallet address string or an object containing wallet address and optional verification ID.
511
+
512
+ ***
513
+
514
+ #### CreateWalletVerificationChallengesResponse
515
+
516
+ > **CreateWalletVerificationChallengesResponse** = [`WalletVerificationChallenge`](#walletverificationchallenge)[]
517
+
518
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts:30](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification-challenges.action.ts#L30)
519
+
520
+ Response from creating wallet verification challenges.
521
+
522
+ ***
523
+
524
+ #### GetWalletVerificationsResponse
525
+
526
+ > **GetWalletVerificationsResponse** = [`WalletVerification`](#walletverification)[]
527
+
528
+ Defined in: [sdk/viem/src/custom-actions/get-wallet-verifications.action.ts:27](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/get-wallet-verifications.action.ts#L27)
529
+
530
+ Response from getting wallet verifications.
531
+
532
+ ***
533
+
534
+ #### VerifyWalletVerificationChallengeResponse
535
+
536
+ > **VerifyWalletVerificationChallengeResponse** = [`VerificationResult`](#verificationresult)[]
537
+
538
+ Defined in: [sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts:34](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/verify-wallet-verification-challenge.action.ts#L34)
539
+
540
+ Response from verifying a wallet verification challenge.
541
+
542
+ ***
543
+
544
+ #### WalletVerificationInfo
545
+
546
+ > **WalletVerificationInfo** = [`WalletPincodeVerificationInfo`](#walletpincodeverificationinfo) \| [`WalletOTPVerificationInfo`](#walletotpverificationinfo) \| [`WalletSecretCodesVerificationInfo`](#walletsecretcodesverificationinfo)
547
+
548
+ Defined in: [sdk/viem/src/custom-actions/create-wallet-verification.action.ts:51](https://github.com/settlemint/sdk/blob/v2.1.5/sdk/viem/src/custom-actions/create-wallet-verification.action.ts#L51)
549
+
550
+ Union type of all possible wallet verification information types.
183
551
 
184
552
  ## Contributing
185
553
 
package/dist/viem.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var h=Object.create;var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var n in e)a(t,n,{get:e[n],enumerable:!0})},c=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!f.call(t,r)&&r!==n&&a(t,r,{get:()=>e[r],enumerable:!(s=p(e,r))||s.enumerable});return t};var m=(t,e,n)=>(n=t!=null?h(C(t)):{},c(e||!t||!t.__esModule?a(n,"default",{value:t,enumerable:!0}):n,t)),u=t=>c(a({},"__esModule",{value:!0}),t);var x={};g(x,{getPublicClient:()=>d,getWalletClient:()=>O});module.exports=u(x);var i=require("viem"),T=m(require("viem/chains"),1),d=t=>(0,i.createPublicClient)({chain:o(t),transport:(0,i.http)(t.rpcUrl,{batch:!0,timeout:6e4,...t.httpTransportConfig,fetchOptions:{...t?.httpTransportConfig?.fetchOptions,headers:{...t?.httpTransportConfig?.fetchOptions?.headers,"x-auth-token":t.accessToken}}})}),O=t=>{let e=o(t);return n=>(0,i.createWalletClient)({chain:e,transport:(0,i.http)(t.rpcUrl,{batch:!0,timeout:6e4,...t.httpTransportConfig,fetchOptions:{...t?.httpTransportConfig?.fetchOptions,headers:{...t?.httpTransportConfig?.fetchOptions?.headers,"x-auth-token":t.accessToken,"x-auth-challenge-response":n?.challengeResponse??"","x-auth-verification-id":n?.verificationId??""}}})})};function o({chainId:t,chainName:e,rpcUrl:n}){return Object.values(T).find(r=>r.id.toString()===t)??(0,i.defineChain)({id:Number(t),name:e,rpcUrls:{default:{http:[n]}},nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}})}0&&(module.exports={getPublicClient,getWalletClient});
1
+ "use strict";var g=Object.create;var s=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})},p=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of R(t))!O.call(e,l)&&l!==i&&s(e,l,{get:()=>t[l],enumerable:!(n=y(t,l))||n.enumerable});return e};var P=(e,t,i)=>(i=e!=null?g(x(e)):{},p(t||!e||!e.__esModule?s(i,"default",{value:e,enumerable:!0}):i,e)),S=e=>p(s({},"__esModule",{value:!0}),e);var b={};I(b,{OTPAlgorithm:()=>f,WalletVerificationType:()=>c,getPublicClient:()=>T,getWalletClient:()=>A});module.exports=S(b);var r=require("viem"),v=P(require("viem/chains"),1);function W(e){return{createWalletVerificationChallenges(t){return e.request({method:"user_createWalletVerificationChallenges",params:[t.addressOrObject]})}}}function m(e){return{createWalletVerification(t){return e.request({method:"user_createWalletVerification",params:[t.userWalletAddress,t.walletVerificationInfo]})}}}function d(e){return{createWallet(t){return e.request({method:"user_createWallet",params:[t.keyVaultId,t.walletInfo]})}}}function V(e){return{deleteWalletVerification(t){return e.request({method:"user_deleteWalletVerification",params:[t.userWalletAddress,t.verificationId]})}}}function h(e){return{getWalletVerifications(t){return e.request({method:"user_walletVerifications",params:[t.userWalletAddress]})}}}function C(e){return{verifyWalletVerificationChallenge(t){return e.request({method:"user_verifyWalletVerificationChallenge",params:[t.addressOrObject,t.challengeResponse]})}}}var c=(n=>(n.PINCODE="PINCODE",n.OTP="OTP",n.SECRET_CODES="SECRET_CODES",n))(c||{}),f=(a=>(a.SHA1="SHA1",a.SHA224="SHA224",a.SHA256="SHA256",a.SHA384="SHA384",a.SHA512="SHA512",a.SHA3_224="SHA3-224",a.SHA3_256="SHA3-256",a.SHA3_384="SHA3-384",a.SHA3_512="SHA3-512",a))(f||{});var T=e=>(0,r.createPublicClient)({chain:u(e),transport:(0,r.http)(e.rpcUrl,{batch:!0,timeout:6e4,...e.httpTransportConfig,fetchOptions:{...e?.httpTransportConfig?.fetchOptions,headers:{...e?.httpTransportConfig?.fetchOptions?.headers,"x-auth-token":e.accessToken}}})}),A=e=>{let t=u(e);return i=>(0,r.createWalletClient)({chain:t,transport:(0,r.http)(e.rpcUrl,{batch:!0,timeout:6e4,...e.httpTransportConfig,fetchOptions:{...e?.httpTransportConfig?.fetchOptions,headers:{...e?.httpTransportConfig?.fetchOptions?.headers,"x-auth-token":e.accessToken,"x-auth-challenge-response":i?.challengeResponse??"","x-auth-verification-id":i?.verificationId??""}}})}).extend(r.publicActions).extend(d).extend(h).extend(m).extend(V).extend(W).extend(C)};function u({chainId:e,chainName:t,rpcUrl:i}){return Object.values(v).find(l=>l.id.toString()===e)??(0,r.defineChain)({id:Number(e),name:t,rpcUrls:{default:{http:[i]}},nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}})}0&&(module.exports={OTPAlgorithm,WalletVerificationType,getPublicClient,getWalletClient});
2
2
  //# sourceMappingURL=viem.cjs.map
package/dist/viem.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/viem.ts"],"sourcesContent":["import {\n http,\n type HttpTransportConfig,\n type Chain as ViemChain,\n type Transport as ViemTransport,\n type WalletClient,\n createPublicClient,\n createWalletClient,\n defineChain,\n} from \"viem\";\nimport * as chains from \"viem/chains\";\n\n/**\n * The options for the viem client.\n */\nexport interface ClientOptions {\n /**\n * The access token\n */\n accessToken: string;\n /**\n * The chain id\n */\n chainId: string;\n /**\n * The chain name\n */\n chainName: string;\n /**\n * The json rpc url\n */\n rpcUrl: string;\n /**\n * The http transport config\n */\n httpTransportConfig?: HttpTransportConfig;\n}\n\n/**\n * Get a public client. Use this if you need to read from the blockchain.\n * @param options - The options for the public client.\n * @returns The public client.\n * @example\n * ```ts\n * import { getPublicClient } from '@settlemint/sdk-viem';\n *\n * const publicClient = getPublicClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the block number\n * const block = await publicClient.getBlockNumber();\n * console.log(block);\n * ```\n */\nexport const getPublicClient = (options: ClientOptions) =>\n createPublicClient({\n chain: getChain(options),\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n },\n },\n }),\n });\n\n/**\n * The options for the wallet client.\n */\nexport interface WalletVerificationOptions {\n /**\n * The verification id (used for HD wallets), if not provided, the challenge response will be validated against all active verifications.\n */\n verificationId?: string;\n /**\n * The challenge response (used for HD wallets)\n */\n challengeResponse: string;\n}\n\n/**\n * Get a wallet client. Use this if you need to write to the blockchain.\n * @param options - The options for the wallet client.\n * @returns A function that returns a wallet client. The function can be called with verification options.\n * @example\n * ```ts\n * import { getWalletClient } from '@settlemint/sdk-viem';\n * import { parseAbi } from \"viem\";\n *\n * const walletClient = getWalletClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the chain id\n * const chainId = await walletClient().getChainId();\n * console.log(chainId);\n *\n * // write to the blockchain\n * const transactionHash = await walletClient().writeContract({\n * account: \"0x0000000000000000000000000000000000000000\",\n * address: \"0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2\",\n * abi: parseAbi([\"function mint(uint32 tokenId) nonpayable\"]),\n * functionName: \"mint\",\n * args: [69420],\n * });\n * console.log(transactionHash);\n * ```\n */\nexport const getWalletClient = <C extends ViemChain>(options: ClientOptions) => {\n const chain = getChain(options);\n return (verificationOptions?: WalletVerificationOptions): WalletClient<ViemTransport, C> =>\n createWalletClient({\n chain: chain as ViemChain,\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n \"x-auth-challenge-response\": verificationOptions?.challengeResponse ?? \"\",\n \"x-auth-verification-id\": verificationOptions?.verificationId ?? \"\",\n },\n },\n }),\n }) as WalletClient<ViemTransport, C>;\n};\n\nfunction getChain({ chainId, chainName, rpcUrl }: Pick<ClientOptions, \"chainId\" | \"chainName\" | \"rpcUrl\">): ViemChain {\n const knownChain = Object.values(chains).find((chain) => chain.id.toString() === chainId);\n return (\n knownChain ??\n defineChain({\n id: Number(chainId),\n name: chainName,\n rpcUrls: {\n default: {\n http: [rpcUrl],\n },\n },\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\",\n },\n })\n );\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,oBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EASO,gBACPC,EAAwB,4BAgDXC,EAAmBC,MAC9B,sBAAmB,CACjB,MAAOC,EAASD,CAAO,EACvB,aAAW,QAAKA,EAAQ,OAAQ,CAC9B,MAAO,GACP,QAAS,IACT,GAAGA,EAAQ,oBACX,aAAc,CACZ,GAAGA,GAAS,qBAAqB,aACjC,QAAS,CACP,GAAGA,GAAS,qBAAqB,cAAc,QAC/C,eAAgBA,EAAQ,WAC1B,CACF,CACF,CAAC,CACH,CAAC,EA+CUE,EAAwCF,GAA2B,CAC9E,IAAMG,EAAQF,EAASD,CAAO,EAC9B,OAAQI,MACN,sBAAmB,CACjB,MAAOD,EACP,aAAW,QAAKH,EAAQ,OAAQ,CAC9B,MAAO,GACP,QAAS,IACT,GAAGA,EAAQ,oBACX,aAAc,CACZ,GAAGA,GAAS,qBAAqB,aACjC,QAAS,CACP,GAAGA,GAAS,qBAAqB,cAAc,QAC/C,eAAgBA,EAAQ,YACxB,4BAA6BI,GAAqB,mBAAqB,GACvE,yBAA0BA,GAAqB,gBAAkB,EACnE,CACF,CACF,CAAC,CACH,CAAC,CACL,EAEA,SAASH,EAAS,CAAE,QAAAI,EAAS,UAAAC,EAAW,OAAAC,CAAO,EAAuE,CAEpH,OADmB,OAAO,OAAOT,CAAM,EAAE,KAAMK,GAAUA,EAAM,GAAG,SAAS,IAAME,CAAO,MAGtF,eAAY,CACV,GAAI,OAAOA,CAAO,EAClB,KAAMC,EACN,QAAS,CACP,QAAS,CACP,KAAM,CAACC,CAAM,CACf,CACF,EACA,eAAgB,CACd,SAAU,GACV,KAAM,QACN,OAAQ,KACV,CACF,CAAC,CAEL","names":["viem_exports","__export","getPublicClient","getWalletClient","__toCommonJS","import_viem","chains","getPublicClient","options","getChain","getWalletClient","chain","verificationOptions","chainId","chainName","rpcUrl"]}
1
+ {"version":3,"sources":["../src/viem.ts","../src/custom-actions/create-wallet-verification-challenges.action.ts","../src/custom-actions/create-wallet-verification.action.ts","../src/custom-actions/create-wallet.action.ts","../src/custom-actions/delete-wallet-verification.action.ts","../src/custom-actions/get-wallet-verifications.action.ts","../src/custom-actions/verify-wallet-verification-challenge.action.ts","../src/custom-actions/types/wallet-verification.enum.ts"],"sourcesContent":["import {\n http,\n type HttpTransportConfig,\n type Chain as ViemChain,\n createPublicClient,\n createWalletClient,\n defineChain,\n publicActions,\n} from \"viem\";\nimport * as chains from \"viem/chains\";\nimport { createWalletVerificationChallenges } from \"./custom-actions/create-wallet-verification-challenges.action.js\";\nimport { createWalletVerification } from \"./custom-actions/create-wallet-verification.action.js\";\nimport { createWallet } from \"./custom-actions/create-wallet.action.js\";\nimport { deleteWalletVerification } from \"./custom-actions/delete-wallet-verification.action.js\";\nimport { getWalletVerifications } from \"./custom-actions/get-wallet-verifications.action.js\";\nimport { verifyWalletVerificationChallenge } from \"./custom-actions/verify-wallet-verification-challenge.action.js\";\n\n/**\n * The options for the viem client.\n */\nexport interface ClientOptions {\n /**\n * The access token\n */\n accessToken: string;\n /**\n * The chain id\n */\n chainId: string;\n /**\n * The chain name\n */\n chainName: string;\n /**\n * The json rpc url\n */\n rpcUrl: string;\n /**\n * The http transport config\n */\n httpTransportConfig?: HttpTransportConfig;\n}\n\n/**\n * Get a public client. Use this if you need to read from the blockchain.\n * @param options - The options for the public client.\n * @returns The public client. see {@link https://viem.sh/docs/clients/public}\n * @example\n * ```ts\n * import { getPublicClient } from '@settlemint/sdk-viem';\n *\n * const publicClient = getPublicClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the block number\n * const block = await publicClient.getBlockNumber();\n * console.log(block);\n * ```\n */\nexport const getPublicClient = (options: ClientOptions) =>\n createPublicClient({\n chain: getChain(options),\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n },\n },\n }),\n });\n\n/**\n * The options for the wallet client.\n */\nexport interface WalletVerificationOptions {\n /**\n * The verification id (used for HD wallets), if not provided, the challenge response will be validated against all active verifications.\n */\n verificationId?: string;\n /**\n * The challenge response (used for HD wallets)\n */\n challengeResponse: string;\n}\n\n/**\n * Get a wallet client. Use this if you need to write to the blockchain.\n * @param options - The options for the wallet client.\n * @returns A function that returns a wallet client. The function can be called with verification options for HD wallets. see {@link https://viem.sh/docs/clients/wallet}\n * @example\n * ```ts\n * import { getWalletClient } from '@settlemint/sdk-viem';\n * import { parseAbi } from \"viem\";\n *\n * const walletClient = getWalletClient({\n * accessToken: process.env.SETTLEMINT_ACCESS_TOKEN!,\n * chainId: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK_CHAIN_ID!,\n * chainName: process.env.SETTLEMINT_BLOCKCHAIN_NETWORK!,\n * rpcUrl: process.env.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER_JSON_RPC_ENDPOINT!,\n * });\n *\n * // Get the chain id\n * const chainId = await walletClient().getChainId();\n * console.log(chainId);\n *\n * // write to the blockchain\n * const transactionHash = await walletClient().writeContract({\n * account: \"0x0000000000000000000000000000000000000000\",\n * address: \"0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2\",\n * abi: parseAbi([\"function mint(uint32 tokenId) nonpayable\"]),\n * functionName: \"mint\",\n * args: [69420],\n * });\n * console.log(transactionHash);\n * ```\n */\nexport const getWalletClient = (options: ClientOptions) => {\n const chain = getChain(options);\n return (verificationOptions?: WalletVerificationOptions) =>\n createWalletClient({\n chain: chain,\n transport: http(options.rpcUrl, {\n batch: true,\n timeout: 60_000,\n ...options.httpTransportConfig,\n fetchOptions: {\n ...options?.httpTransportConfig?.fetchOptions,\n headers: {\n ...options?.httpTransportConfig?.fetchOptions?.headers,\n \"x-auth-token\": options.accessToken,\n \"x-auth-challenge-response\": verificationOptions?.challengeResponse ?? \"\",\n \"x-auth-verification-id\": verificationOptions?.verificationId ?? \"\",\n },\n },\n }),\n })\n .extend(publicActions)\n .extend(createWallet)\n .extend(getWalletVerifications)\n .extend(createWalletVerification)\n .extend(deleteWalletVerification)\n .extend(createWalletVerificationChallenges)\n .extend(verifyWalletVerificationChallenge);\n};\n\nfunction getChain({ chainId, chainName, rpcUrl }: Pick<ClientOptions, \"chainId\" | \"chainName\" | \"rpcUrl\">): ViemChain {\n const knownChain = Object.values(chains).find((chain) => chain.id.toString() === chainId);\n return (\n knownChain ??\n defineChain({\n id: Number(chainId),\n name: chainName,\n rpcUrls: {\n default: {\n http: [rpcUrl],\n },\n },\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\",\n },\n })\n );\n}\n\nexport { OTPAlgorithm, WalletVerificationType } from \"./custom-actions/types/wallet-verification.enum.js\";\n\nexport type {\n CreateWalletVerificationChallengesResponse,\n CreateWalletVerificationChallengesParameters,\n WalletVerificationChallenge,\n} from \"./custom-actions/create-wallet-verification-challenges.action.js\";\nexport type {\n CreateWalletVerificationResponse,\n CreateWalletVerificationParameters,\n WalletVerificationInfo,\n WalletPincodeVerificationInfo,\n WalletOTPVerificationInfo,\n WalletSecretCodesVerificationInfo,\n} from \"./custom-actions/create-wallet-verification.action.js\";\nexport type {\n CreateWalletResponse,\n CreateWalletParameters,\n WalletInfo,\n} from \"./custom-actions/create-wallet.action.js\";\nexport type {\n DeleteWalletVerificationParameters,\n DeleteWalletVerificationResponse,\n} from \"./custom-actions/delete-wallet-verification.action.js\";\nexport type {\n GetWalletVerificationsParameters,\n GetWalletVerificationsResponse,\n WalletVerification,\n} from \"./custom-actions/get-wallet-verifications.action.js\";\nexport type {\n VerifyWalletVerificationChallengeParameters,\n AddressOrObject,\n VerifyWalletVerificationChallengeResponse,\n VerificationResult,\n} from \"./custom-actions/verify-wallet-verification-challenge.action.js\";\n","import type { Client } from \"viem\";\nimport type { WalletVerificationType } from \"./types/wallet-verification.enum.js\";\nimport type { AddressOrObject } from \"./verify-wallet-verification-challenge.action.js\";\n\n/**\n * Parameters for creating wallet verification challenges.\n */\nexport interface CreateWalletVerificationChallengesParameters {\n /** The wallet address or object containing wallet address and optional verification ID. */\n addressOrObject: AddressOrObject;\n}\n\n/**\n * Represents a wallet verification challenge.\n */\nexport interface WalletVerificationChallenge {\n /** The unique identifier of the challenge. */\n id: string;\n /** The name of the challenge. */\n name: string;\n /** The type of verification required. */\n verificationType: WalletVerificationType;\n /** The challenge parameters specific to the verification type. */\n challenge: Record<string, string>;\n}\n\n/**\n * Response from creating wallet verification challenges.\n */\nexport type CreateWalletVerificationChallengesResponse = WalletVerificationChallenge[];\n\n/**\n * RPC schema for creating wallet verification challenges.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWalletVerificationChallenges\";\n Parameters: [addressOrObject: AddressOrObject];\n ReturnType: CreateWalletVerificationChallengesResponse;\n};\n\n/**\n * Creates a wallet verification challenges action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWalletVerificationChallenges method.\n */\nexport function createWalletVerificationChallenges(client: Client) {\n return {\n /**\n * Creates verification challenges for a wallet.\n * @param args - The parameters for creating the challenges.\n * @returns A promise that resolves to an array of wallet verification challenges.\n */\n createWalletVerificationChallenges(\n args: CreateWalletVerificationChallengesParameters,\n ): Promise<CreateWalletVerificationChallengesResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWalletVerificationChallenges\",\n params: [args.addressOrObject],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\nimport type { OTPAlgorithm, WalletVerificationType } from \"./types/wallet-verification.enum.js\";\n\n/**\n * Base interface for wallet verification information.\n */\ntype BaseWalletVerificationInfo = {\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n};\n\n/**\n * Information for PIN code verification.\n */\nexport interface WalletPincodeVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.PINCODE;\n /** The PIN code to use for verification. */\n pincode: string;\n}\n\n/**\n * Information for One-Time Password (OTP) verification.\n */\nexport interface WalletOTPVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.OTP;\n /** The hash algorithm to use for OTP generation. */\n algorithm?: OTPAlgorithm;\n /** The number of digits in the OTP code. */\n digits?: number;\n /** The time period in seconds for OTP validity. */\n period?: number;\n /** The issuer of the OTP. */\n issuer?: string;\n}\n\n/**\n * Information for secret recovery codes verification.\n */\nexport interface WalletSecretCodesVerificationInfo extends BaseWalletVerificationInfo {\n /** The type of verification method. */\n verificationType: WalletVerificationType.SECRET_CODES;\n}\n\n/**\n * Union type of all possible wallet verification information types.\n */\nexport type WalletVerificationInfo =\n | WalletPincodeVerificationInfo\n | WalletOTPVerificationInfo\n | WalletSecretCodesVerificationInfo;\n\n/**\n * Parameters for creating a wallet verification.\n */\nexport interface CreateWalletVerificationParameters {\n /** The wallet address for which to create the verification. */\n userWalletAddress: string;\n /** The verification information to create. */\n walletVerificationInfo: WalletVerificationInfo;\n}\n\n/**\n * Response from creating a wallet verification.\n */\nexport interface CreateWalletVerificationResponse {\n /** The unique identifier of the verification. */\n id: string;\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n /** Additional parameters specific to the verification type. */\n parameters: Record<string, string>;\n}\n\n/**\n * RPC schema for creating a wallet verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWalletVerification\";\n Parameters: [userWalletAddress: string, walletVerificationInfo: WalletVerificationInfo];\n ReturnType: CreateWalletVerificationResponse[];\n};\n\n/**\n * Creates a wallet verification action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWalletVerification method.\n */\nexport function createWalletVerification(client: Client) {\n return {\n /**\n * Creates a new wallet verification.\n * @param args - The parameters for creating the verification.\n * @returns A promise that resolves to an array of created wallet verification responses.\n */\n createWalletVerification(args: CreateWalletVerificationParameters): Promise<CreateWalletVerificationResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWalletVerification\",\n params: [args.userWalletAddress, args.walletVerificationInfo],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Information about the wallet to be created.\n */\nexport interface WalletInfo {\n /** The name of the wallet. */\n name: string;\n}\n\n/**\n * Parameters for creating a wallet.\n */\nexport interface CreateWalletParameters {\n /** The unique name of the key vault where the wallet will be created. */\n keyVaultId: string;\n /** Information about the wallet to be created. */\n walletInfo: WalletInfo;\n}\n\n/**\n * Response from creating a wallet.\n */\nexport interface CreateWalletResponse {\n /** The unique identifier of the wallet. */\n id: string;\n /** The name of the wallet. */\n name: string;\n /** The blockchain address of the wallet. */\n address: string;\n /** The HD derivation path used to create the wallet. */\n derivationPath: string;\n}\n\n/**\n * RPC schema for wallet creation.\n */\ntype WalletRpcSchema = {\n Method: \"user_createWallet\";\n Parameters: [keyVaultId: string, walletInfo: WalletInfo];\n ReturnType: CreateWalletResponse[];\n};\n\n/**\n * Creates a wallet action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a createWallet method.\n */\nexport function createWallet(client: Client) {\n return {\n /**\n * Creates a new wallet in the specified key vault.\n * @param args - The parameters for creating a wallet.\n * @returns A promise that resolves to an array of created wallet responses.\n */\n createWallet(args: CreateWalletParameters): Promise<CreateWalletResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_createWallet\",\n params: [args.keyVaultId, args.walletInfo],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Parameters for deleting a wallet verification.\n */\nexport interface DeleteWalletVerificationParameters {\n /** The wallet address for which to delete the verification. */\n userWalletAddress: string;\n /** The unique identifier of the verification to delete. */\n verificationId: string;\n}\n\n/**\n * Response from deleting a wallet verification.\n */\nexport interface DeleteWalletVerificationResponse {\n /** Whether the deletion was successful. */\n success: boolean;\n}\n\n/**\n * RPC schema for deleting a wallet verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_deleteWalletVerification\";\n Parameters: [userWalletAddress: string, verificationId: string];\n ReturnType: DeleteWalletVerificationResponse[];\n};\n\n/**\n * Creates a wallet verification deletion action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a deleteWalletVerification method.\n */\nexport function deleteWalletVerification(client: Client) {\n return {\n /**\n * Deletes a wallet verification.\n * @param args - The parameters for deleting the verification.\n * @returns A promise that resolves to an array of deletion results.\n */\n deleteWalletVerification(args: DeleteWalletVerificationParameters): Promise<DeleteWalletVerificationResponse[]> {\n return client.request<WalletRpcSchema>({\n method: \"user_deleteWalletVerification\",\n params: [args.userWalletAddress, args.verificationId],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\nimport type { WalletVerificationType } from \"./types/wallet-verification.enum.js\";\n\n/**\n * Parameters for getting wallet verifications.\n */\nexport interface GetWalletVerificationsParameters {\n /** The wallet address for which to fetch verifications. */\n userWalletAddress: string;\n}\n\n/**\n * Represents a wallet verification.\n */\nexport interface WalletVerification {\n /** The unique identifier of the verification. */\n id: string;\n /** The name of the verification method. */\n name: string;\n /** The type of verification method. */\n verificationType: WalletVerificationType;\n}\n\n/**\n * Response from getting wallet verifications.\n */\nexport type GetWalletVerificationsResponse = WalletVerification[];\n\n/**\n * RPC schema for getting wallet verifications.\n */\ntype WalletRpcSchema = {\n Method: \"user_walletVerifications\";\n Parameters: [userWalletAddress: string];\n ReturnType: GetWalletVerificationsResponse;\n};\n\n/**\n * Creates a wallet verifications retrieval action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a getWalletVerifications method.\n */\nexport function getWalletVerifications(client: Client) {\n return {\n /**\n * Gets all verifications for a wallet.\n * @param args - The parameters for getting the verifications.\n * @returns A promise that resolves to an array of wallet verifications.\n */\n getWalletVerifications(args: GetWalletVerificationsParameters): Promise<GetWalletVerificationsResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_walletVerifications\",\n params: [args.userWalletAddress],\n });\n },\n };\n}\n","import type { Client } from \"viem\";\n\n/**\n * Represents either a wallet address string or an object containing wallet address and optional verification ID.\n */\nexport type AddressOrObject =\n | string\n | {\n userWalletAddress: string;\n verificationId?: string;\n };\n\n/**\n * Parameters for verifying a wallet verification challenge.\n */\nexport interface VerifyWalletVerificationChallengeParameters {\n /** The wallet address or object containing wallet address and optional verification ID. */\n addressOrObject: AddressOrObject;\n /** The response to the verification challenge. */\n challengeResponse: string;\n}\n\n/**\n * Result of a wallet verification challenge.\n */\nexport interface VerificationResult {\n /** Whether the verification was successful. */\n verified: boolean;\n}\n\n/**\n * Response from verifying a wallet verification challenge.\n */\nexport type VerifyWalletVerificationChallengeResponse = VerificationResult[];\n\n/**\n * RPC schema for wallet verification challenge verification.\n */\ntype WalletRpcSchema = {\n Method: \"user_verifyWalletVerificationChallenge\";\n Parameters: [addressOrObject: AddressOrObject, challengeResponse: string];\n ReturnType: VerifyWalletVerificationChallengeResponse;\n};\n\n/**\n * Creates a wallet verification challenge verification action for the given client.\n * @param client - The viem client to use for the request.\n * @returns An object with a verifyWalletVerificationChallenge method.\n */\nexport function verifyWalletVerificationChallenge(client: Client) {\n return {\n /**\n * Verifies a wallet verification challenge.\n * @param args - The parameters for verifying the challenge.\n * @returns A promise that resolves to an array of verification results.\n */\n verifyWalletVerificationChallenge(\n args: VerifyWalletVerificationChallengeParameters,\n ): Promise<VerifyWalletVerificationChallengeResponse> {\n return client.request<WalletRpcSchema>({\n method: \"user_verifyWalletVerificationChallenge\",\n params: [args.addressOrObject, args.challengeResponse],\n });\n },\n };\n}\n","/**\n * Types of wallet verification methods supported by the system.\n * Used to identify different verification mechanisms when creating or managing wallet verifications.\n */\nexport enum WalletVerificationType {\n /** PIN code verification method */\n PINCODE = \"PINCODE\",\n /** One-Time Password verification method */\n OTP = \"OTP\",\n /** Secret recovery codes verification method */\n SECRET_CODES = \"SECRET_CODES\",\n}\n\n/**\n * Supported hash algorithms for One-Time Password (OTP) verification.\n * These algorithms determine the cryptographic function used to generate OTP codes.\n */\nexport enum OTPAlgorithm {\n /** SHA-1 hash algorithm */\n SHA1 = \"SHA1\",\n /** SHA-224 hash algorithm */\n SHA224 = \"SHA224\",\n /** SHA-256 hash algorithm */\n SHA256 = \"SHA256\",\n /** SHA-384 hash algorithm */\n SHA384 = \"SHA384\",\n /** SHA-512 hash algorithm */\n SHA512 = \"SHA512\",\n /** SHA3-224 hash algorithm */\n SHA3_224 = \"SHA3-224\",\n /** SHA3-256 hash algorithm */\n SHA3_256 = \"SHA3-256\",\n /** SHA3-384 hash algorithm */\n SHA3_384 = \"SHA3-384\",\n /** SHA3-512 hash algorithm */\n SHA3_512 = \"SHA3-512\",\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,EAAA,2BAAAC,EAAA,oBAAAC,EAAA,oBAAAC,IAAA,eAAAC,EAAAN,GAAA,IAAAO,EAQO,gBACPC,EAAwB,4BCoCjB,SAASC,EAAmCC,EAAgB,CACjE,MAAO,CAML,mCACEC,EACqD,CACrD,OAAOD,EAAO,QAAyB,CACrC,OAAQ,0CACR,OAAQ,CAACC,EAAK,eAAe,CAC/B,CAAC,CACH,CACF,CACF,CCgCO,SAASC,EAAyBC,EAAgB,CACvD,MAAO,CAML,yBAAyBC,EAAuF,CAC9G,OAAOD,EAAO,QAAyB,CACrC,OAAQ,gCACR,OAAQ,CAACC,EAAK,kBAAmBA,EAAK,sBAAsB,CAC9D,CAAC,CACH,CACF,CACF,CC3DO,SAASC,EAAaC,EAAgB,CAC3C,MAAO,CAML,aAAaC,EAA+D,CAC1E,OAAOD,EAAO,QAAyB,CACrC,OAAQ,oBACR,OAAQ,CAACC,EAAK,WAAYA,EAAK,UAAU,CAC3C,CAAC,CACH,CACF,CACF,CC5BO,SAASC,EAAyBC,EAAgB,CACvD,MAAO,CAML,yBAAyBC,EAAuF,CAC9G,OAAOD,EAAO,QAAyB,CACrC,OAAQ,gCACR,OAAQ,CAACC,EAAK,kBAAmBA,EAAK,cAAc,CACtD,CAAC,CACH,CACF,CACF,CCNO,SAASC,EAAuBC,EAAgB,CACrD,MAAO,CAML,uBAAuBC,EAAiF,CACtG,OAAOD,EAAO,QAAyB,CACrC,OAAQ,2BACR,OAAQ,CAACC,EAAK,iBAAiB,CACjC,CAAC,CACH,CACF,CACF,CCPO,SAASC,EAAkCC,EAAgB,CAChE,MAAO,CAML,kCACEC,EACoD,CACpD,OAAOD,EAAO,QAAyB,CACrC,OAAQ,yCACR,OAAQ,CAACC,EAAK,gBAAiBA,EAAK,iBAAiB,CACvD,CAAC,CACH,CACF,CACF,CC7DO,IAAKC,OAEVA,EAAA,QAAU,UAEVA,EAAA,IAAM,MAENA,EAAA,aAAe,eANLA,OAAA,IAaAC,OAEVA,EAAA,KAAO,OAEPA,EAAA,OAAS,SAETA,EAAA,OAAS,SAETA,EAAA,OAAS,SAETA,EAAA,OAAS,SAETA,EAAA,SAAW,WAEXA,EAAA,SAAW,WAEXA,EAAA,SAAW,WAEXA,EAAA,SAAW,WAlBDA,OAAA,IP8CL,IAAMC,EAAmBC,MAC9B,sBAAmB,CACjB,MAAOC,EAASD,CAAO,EACvB,aAAW,QAAKA,EAAQ,OAAQ,CAC9B,MAAO,GACP,QAAS,IACT,GAAGA,EAAQ,oBACX,aAAc,CACZ,GAAGA,GAAS,qBAAqB,aACjC,QAAS,CACP,GAAGA,GAAS,qBAAqB,cAAc,QAC/C,eAAgBA,EAAQ,WAC1B,CACF,CACF,CAAC,CACH,CAAC,EA+CUE,EAAmBF,GAA2B,CACzD,IAAMG,EAAQF,EAASD,CAAO,EAC9B,OAAQI,MACN,sBAAmB,CACjB,MAAOD,EACP,aAAW,QAAKH,EAAQ,OAAQ,CAC9B,MAAO,GACP,QAAS,IACT,GAAGA,EAAQ,oBACX,aAAc,CACZ,GAAGA,GAAS,qBAAqB,aACjC,QAAS,CACP,GAAGA,GAAS,qBAAqB,cAAc,QAC/C,eAAgBA,EAAQ,YACxB,4BAA6BI,GAAqB,mBAAqB,GACvE,yBAA0BA,GAAqB,gBAAkB,EACnE,CACF,CACF,CAAC,CACH,CAAC,EACE,OAAO,eAAa,EACpB,OAAOC,CAAY,EACnB,OAAOC,CAAsB,EAC7B,OAAOC,CAAwB,EAC/B,OAAOC,CAAwB,EAC/B,OAAOC,CAAkC,EACzC,OAAOC,CAAiC,CAC/C,EAEA,SAAST,EAAS,CAAE,QAAAU,EAAS,UAAAC,EAAW,OAAAC,CAAO,EAAuE,CAEpH,OADmB,OAAO,OAAOC,CAAM,EAAE,KAAMX,GAAUA,EAAM,GAAG,SAAS,IAAMQ,CAAO,MAGtF,eAAY,CACV,GAAI,OAAOA,CAAO,EAClB,KAAMC,EACN,QAAS,CACP,QAAS,CACP,KAAM,CAACC,CAAM,CACf,CACF,EACA,eAAgB,CACd,SAAU,GACV,KAAM,QACN,OAAQ,KACV,CACF,CAAC,CAEL","names":["viem_exports","__export","OTPAlgorithm","WalletVerificationType","getPublicClient","getWalletClient","__toCommonJS","import_viem","chains","createWalletVerificationChallenges","client","args","createWalletVerification","client","args","createWallet","client","args","deleteWalletVerification","client","args","getWalletVerifications","client","args","verifyWalletVerificationChallenge","client","args","WalletVerificationType","OTPAlgorithm","getPublicClient","options","getChain","getWalletClient","chain","verificationOptions","createWallet","getWalletVerifications","createWalletVerification","deleteWalletVerification","createWalletVerificationChallenges","verifyWalletVerificationChallenge","chainId","chainName","rpcUrl","chains"]}