liquid-sdk 1.3.1 → 1.3.2

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
@@ -13,25 +13,20 @@ npm install liquid-sdk viem
13
13
  ## Quick Start
14
14
 
15
15
  ```typescript
16
- import { createPublicClient, createWalletClient, http } from "viem";
16
+ import { createWalletClient, http } from "viem";
17
17
  import { privateKeyToAccount } from "viem/accounts";
18
18
  import { base } from "viem/chains";
19
19
  import { LiquidSDK } from "liquid-sdk";
20
20
 
21
21
  const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
22
22
 
23
- const publicClient = createPublicClient({
24
- chain: base,
25
- transport: http(),
26
- });
27
-
28
23
  const walletClient = createWalletClient({
29
24
  account,
30
25
  chain: base,
31
26
  transport: http(),
32
27
  });
33
28
 
34
- const liquid = new LiquidSDK({ publicClient, walletClient });
29
+ const liquid = new LiquidSDK({ walletClient });
35
30
  ```
36
31
 
37
32
  ## Deploy a Token
@@ -219,11 +214,11 @@ import {
219
214
  #### Constructor
220
215
 
221
216
  ```typescript
222
- new LiquidSDK({ publicClient, walletClient? })
217
+ new LiquidSDK({ walletClient, publicClient? })
223
218
  ```
224
219
 
225
- - `publicClient` (required) - viem `PublicClient` connected to Base
226
220
  - `walletClient` (optional) - viem `WalletClient` for write operations
221
+ - `publicClient` (optional) - viem `PublicClient` connected to Base (auto-created if omitted)
227
222
 
228
223
  #### Methods
229
224
 
package/dist/index.d.mts CHANGED
@@ -194,7 +194,7 @@ interface TokenRewardInfo {
194
194
  rewardRecipients: Address[];
195
195
  }
196
196
  interface LiquidSDKConfig {
197
- publicClient: any;
197
+ publicClient?: any;
198
198
  walletClient?: any;
199
199
  }
200
200
  interface DeployTokenResult {
package/dist/index.d.ts CHANGED
@@ -194,7 +194,7 @@ interface TokenRewardInfo {
194
194
  rewardRecipients: Address[];
195
195
  }
196
196
  interface LiquidSDKConfig {
197
- publicClient: any;
197
+ publicClient?: any;
198
198
  walletClient?: any;
199
199
  }
200
200
  interface DeployTokenResult {
package/dist/index.js CHANGED
@@ -1082,7 +1082,10 @@ var LiquidSDK = class {
1082
1082
  publicClient;
1083
1083
  walletClient;
1084
1084
  constructor(config) {
1085
- this.publicClient = config.publicClient;
1085
+ this.publicClient = config.publicClient ?? (0, import_viem2.createPublicClient)({
1086
+ chain: import_chains2.base,
1087
+ transport: (0, import_viem2.http)()
1088
+ });
1086
1089
  this.walletClient = config.walletClient;
1087
1090
  }
1088
1091
  // ── Dev Buy Helper ───────────────────────────────────────────────