@initia/interwovenkit-react 2.11.1 → 2.12.1

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/dist/index.d.ts CHANGED
@@ -164,12 +164,14 @@ export declare interface CreateTestCosmosWalletConfig {
164
164
  export declare type CreateTestWalletConfig = CreateTestWalletOptions & {
165
165
  /**
166
166
  * Wagmi connector id. Useful when running multiple test wallets.
167
- * @default "testWallet"
167
+ * Defaults to `"testWallet"` when `addressIndex` is omitted, or
168
+ * `"testWallet-${addressIndex}"` when it is provided.
168
169
  */
169
170
  id?: string;
170
171
  /**
171
172
  * Display name shown in wallet selection UI.
172
- * @default "Test Wallet"
173
+ * Defaults to `"Test Wallet"` when `addressIndex` is omitted, or
174
+ * `"Test Wallet ${addressIndex}"` when it is provided.
173
175
  */
174
176
  name?: string;
175
177
  /**
@@ -193,6 +195,17 @@ export declare type CreateTestWalletConfig = CreateTestWalletOptions & {
193
195
  maxFeePerGas?: bigint;
194
196
  maxPriorityFeePerGas?: bigint;
195
197
  };
198
+ /**
199
+ * Open a blank window before every signing request and fail with the same error as
200
+ * popup-based wallets (Privy) when the browser blocks it. Lets browser tests check that
201
+ * signing is still inside the click's user activation when the wallet is asked.
202
+ * `delayMs` waits that long before opening the window, which is useful as a negative
203
+ * control since the activation expires during the wait.
204
+ * @default false
205
+ */
206
+ simulatePopup?: boolean | {
207
+ delayMs: number;
208
+ };
196
209
  };
197
210
 
198
211
  /**
@@ -214,6 +227,15 @@ export declare type CreateTestWalletConfig = CreateTestWalletOptions & {
214
227
  * mnemonic: process.env.TEST_MNEMONIC!,
215
228
  * })
216
229
  *
230
+ * // Derive multiple connectors from one mnemonic. Explicit indexes also
231
+ * // produce unique default ids and names for wagmi and wallet selection UIs.
232
+ * const testConnectors = Array.from({ length: 40 }, (_, addressIndex) =>
233
+ * createTestWalletConnector({
234
+ * mnemonic: process.env.TEST_MNEMONIC!,
235
+ * addressIndex,
236
+ * }),
237
+ * )
238
+ *
217
239
  * // Or from private key
218
240
  * const connector = createTestWalletConnector({
219
241
  * privateKey: process.env.TEST_PRIVATE_KEY as `0x${string}`,
@@ -356,9 +378,15 @@ export declare type CreateTestWalletOptions = {
356
378
  * BIP-39 mnemonic phrase. Provide either `mnemonic` or `privateKey`.
357
379
  */
358
380
  mnemonic: string;
381
+ /**
382
+ * Address index in the HD path (`m/44'/60'/0'/0/${addressIndex}`).
383
+ * @default 0
384
+ */
385
+ addressIndex?: number;
359
386
  privateKey?: never;
360
387
  } | {
361
388
  mnemonic?: never;
389
+ addressIndex?: never;
362
390
  /**
363
391
  * Hex-encoded private key (with `0x` prefix).
364
392
  * Provide either `mnemonic` or `privateKey`.
@@ -427,6 +455,7 @@ declare class OfflineSigner implements OfflineAminoSigner {
427
455
  private restUrl;
428
456
  constructor(address: string, signMessage: (message: string) => Promise<string>, restUrl: string);
429
457
  private cachedPublicKey;
458
+ private setCachedPublicKey;
430
459
  private getCachedPublicKey;
431
460
  private getPublicKeyFromRestApi;
432
461
  private getPublicKey;