@settlemint/sdk-viem 2.5.6-main54b32bec → 2.5.6-main5cbcea2d

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
@@ -79,7 +79,7 @@ The SettleMint Viem SDK provides a lightweight wrapper that automatically config
79
79
 
80
80
  > **getChainId**(`options`): `Promise`\<`number`\>
81
81
 
82
- Defined in: [sdk/viem/src/viem.ts:219](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L219)
82
+ Defined in: [sdk/viem/src/viem.ts:347](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L347)
83
83
 
84
84
  Get the chain id of a blockchain network.
85
85
 
@@ -111,9 +111,9 @@ console.log(chainId);
111
111
 
112
112
  #### getPublicClient()
113
113
 
114
- > **getPublicClient**(`options`): `object`
114
+ > **getPublicClient**(`options`): \{ \} \| \{ \}
115
115
 
116
- Defined in: [sdk/viem/src/viem.ts:75](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L75)
116
+ Defined in: [sdk/viem/src/viem.ts:169](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L169)
117
117
 
118
118
  Get a public client. Use this if you need to read from the blockchain.
119
119
 
@@ -125,7 +125,7 @@ Get a public client. Use this if you need to read from the blockchain.
125
125
 
126
126
  ##### Returns
127
127
 
128
- `object`
128
+ \{ \} \| \{ \}
129
129
 
130
130
  The public client. see [https://viem.sh/docs/clients/public](https://viem.sh/docs/clients/public)
131
131
 
@@ -150,9 +150,9 @@ console.log(block);
150
150
 
151
151
  #### getWalletClient()
152
152
 
153
- > **getWalletClient**(`options`): (`verificationOptions?`) => `Client`\<`HttpTransport`\<`undefined` \| `RpcSchema`, `boolean`\>, `Chain`, `undefined`, `WalletRpcSchema`, `object` & `object` & `object` & `object` & `object` & `object` & `object` & `WalletActions`\<`Chain`, `undefined`\>\>
153
+ > **getWalletClient**(`options`): `any`
154
154
 
155
- Defined in: [sdk/viem/src/viem.ts:144](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L144)
155
+ Defined in: [sdk/viem/src/viem.ts:255](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L255)
156
156
 
157
157
  Get a wallet client. Use this if you need to write to the blockchain.
158
158
 
@@ -164,19 +164,9 @@ Get a wallet client. Use this if you need to write to the blockchain.
164
164
 
165
165
  ##### Returns
166
166
 
167
- 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)
168
-
169
- > (`verificationOptions?`): `Client`\<`HttpTransport`\<`undefined` \| `RpcSchema`, `boolean`\>, `Chain`, `undefined`, `WalletRpcSchema`, `object` & `object` & `object` & `object` & `object` & `object` & `object` & `WalletActions`\<`Chain`, `undefined`\>\>
170
-
171
- ###### Parameters
167
+ `any`
172
168
 
173
- | Parameter | Type |
174
- | ------ | ------ |
175
- | `verificationOptions?` | [`WalletVerificationOptions`](#walletverificationoptions) |
176
-
177
- ###### Returns
178
-
179
- `Client`\<`HttpTransport`\<`undefined` \| `RpcSchema`, `boolean`\>, `Chain`, `undefined`, `WalletRpcSchema`, `object` & `object` & `object` & `object` & `object` & `object` & `object` & `WalletActions`\<`Chain`, `undefined`\>\>
169
+ 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)
180
170
 
181
171
  ##### Example
182
172
 
@@ -509,7 +499,7 @@ Represents a wallet verification challenge.
509
499
 
510
500
  #### WalletVerificationOptions
511
501
 
512
- Defined in: [sdk/viem/src/viem.ts:102](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L102)
502
+ Defined in: [sdk/viem/src/viem.ts:213](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L213)
513
503
 
514
504
  The options for the wallet client.
515
505
 
@@ -517,8 +507,8 @@ The options for the wallet client.
517
507
 
518
508
  | Property | Type | Description | Defined in |
519
509
  | ------ | ------ | ------ | ------ |
520
- | <a id="challengeresponse-1"></a> `challengeResponse` | `string` | The challenge response (used for HD wallets) | [sdk/viem/src/viem.ts:110](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L110) |
521
- | <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:106](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L106) |
510
+ | <a id="challengeresponse-1"></a> `challengeResponse` | `string` | The challenge response (used for HD wallets) | [sdk/viem/src/viem.ts:221](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L221) |
511
+ | <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:217](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L217) |
522
512
 
523
513
  ### Type Aliases
524
514
 
@@ -536,7 +526,7 @@ Represents either a wallet address string or an object containing wallet address
536
526
 
537
527
  > **ClientOptions** = `Omit`\<`z.infer`\<*typeof* [`ClientOptionsSchema`](#clientoptionsschema)\>, `"httpTransportConfig"`\> & `object`
538
528
 
539
- Defined in: [sdk/viem/src/viem.ts:51](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L51)
529
+ Defined in: [sdk/viem/src/viem.ts:145](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L145)
540
530
 
541
531
  Type representing the validated client options.
542
532
 
@@ -544,7 +534,7 @@ Type representing the validated client options.
544
534
 
545
535
  | Name | Type | Defined in |
546
536
  | ------ | ------ | ------ |
547
- | `httpTransportConfig?` | `HttpTransportConfig` | [sdk/viem/src/viem.ts:52](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L52) |
537
+ | `httpTransportConfig?` | `HttpTransportConfig` | [sdk/viem/src/viem.ts:146](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L146) |
548
538
 
549
539
  ***
550
540
 
@@ -562,7 +552,7 @@ Response from creating wallet verification challenges.
562
552
 
563
553
  > **GetChainIdOptions** = `Omit`\<`z.infer`\<*typeof* [`GetChainIdOptionsSchema`](#getchainidoptionsschema)\>, `"httpTransportConfig"`\> & `object`
564
554
 
565
- Defined in: [sdk/viem/src/viem.ts:200](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L200)
555
+ Defined in: [sdk/viem/src/viem.ts:328](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L328)
566
556
 
567
557
  Type representing the validated get chain id options.
568
558
 
@@ -570,7 +560,7 @@ Type representing the validated get chain id options.
570
560
 
571
561
  | Name | Type | Defined in |
572
562
  | ------ | ------ | ------ |
573
- | `httpTransportConfig?` | `HttpTransportConfig` | [sdk/viem/src/viem.ts:201](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L201) |
563
+ | `httpTransportConfig?` | `HttpTransportConfig` | [sdk/viem/src/viem.ts:329](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L329) |
574
564
 
575
565
  ***
576
566
 
@@ -608,7 +598,7 @@ Union type of all possible wallet verification information types.
608
598
 
609
599
  > `const` **ClientOptionsSchema**: `ZodObject`\<\{ `accessToken`: `ZodOptional`\<`ZodString`\>; `chainId`: `ZodString`; `chainName`: `ZodString`; `httpTransportConfig`: `ZodOptional`\<`ZodAny`\>; `rpcUrl`: `ZodUnion`\<readonly \[`ZodString`, `ZodString`\]\>; \}, `$strip`\>
610
600
 
611
- Defined in: [sdk/viem/src/viem.ts:25](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L25)
601
+ Defined in: [sdk/viem/src/viem.ts:119](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L119)
612
602
 
613
603
  Schema for the viem client options.
614
604
 
@@ -618,7 +608,7 @@ Schema for the viem client options.
618
608
 
619
609
  > `const` **GetChainIdOptionsSchema**: `ZodObject`\<\{ `accessToken`: `ZodOptional`\<`ZodString`\>; `httpTransportConfig`: `ZodOptional`\<`ZodAny`\>; `rpcUrl`: `ZodUnion`\<readonly \[`ZodString`, `ZodString`\]\>; \}, `$strip`\>
620
610
 
621
- Defined in: [sdk/viem/src/viem.ts:182](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L182)
611
+ Defined in: [sdk/viem/src/viem.ts:310](https://github.com/settlemint/sdk/blob/v2.5.6/sdk/viem/src/viem.ts#L310)
622
612
 
623
613
  Schema for the viem client options.
624
614