@arkade-os/sdk 0.4.28 → 0.4.30

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 (82) hide show
  1. package/README.md +14 -16
  2. package/dist/adapters/expo.cjs +5 -5
  3. package/dist/adapters/expo.d.cts +4 -4
  4. package/dist/adapters/expo.d.ts +4 -4
  5. package/dist/adapters/expo.js +3 -3
  6. package/dist/adapters/indexedDB.cjs +5 -5
  7. package/dist/adapters/indexedDB.js +4 -4
  8. package/dist/{ark-TZ1gXAXU.d.cts → ark-C0TMXvwO.d.cts} +92 -63
  9. package/dist/{ark-TZ1gXAXU.d.ts → ark-C0TMXvwO.d.ts} +92 -63
  10. package/dist/{asyncStorageTaskQueue-EFqSmYTg.d.cts → asyncStorageTaskQueue-DHOoNvRy.d.cts} +2 -2
  11. package/dist/{asyncStorageTaskQueue-Cb1F_Z9s.d.ts → asyncStorageTaskQueue-Iip3xMF_.d.ts} +2 -2
  12. package/dist/{chunk-ADV27S4N.cjs → chunk-6FLL2Q36.cjs} +8 -8
  13. package/dist/chunk-6FLL2Q36.cjs.map +1 -0
  14. package/dist/{chunk-ZBUDLTBO.js → chunk-6NWNOLL3.js} +5 -5
  15. package/dist/chunk-6NWNOLL3.js.map +1 -0
  16. package/dist/{chunk-BQLHADL7.js → chunk-6NY27WL6.js} +341 -183
  17. package/dist/chunk-6NY27WL6.js.map +1 -0
  18. package/dist/{chunk-CFZMTDWI.js → chunk-ABWRLTX5.js} +6 -5
  19. package/dist/chunk-ABWRLTX5.js.map +1 -0
  20. package/dist/{chunk-FG5ACJJW.cjs → chunk-GIGILVVP.cjs} +11 -10
  21. package/dist/chunk-GIGILVVP.cjs.map +1 -0
  22. package/dist/{chunk-A3EMF7RN.js → chunk-GRJKJNBO.js} +3 -3
  23. package/dist/{chunk-A3EMF7RN.js.map → chunk-GRJKJNBO.js.map} +1 -1
  24. package/dist/{chunk-I3DGUUCT.cjs → chunk-IEO3XDKI.cjs} +28 -28
  25. package/dist/{chunk-I3DGUUCT.cjs.map → chunk-IEO3XDKI.cjs.map} +1 -1
  26. package/dist/{chunk-IPX2R7FR.cjs → chunk-PCEE6DRL.cjs} +7 -7
  27. package/dist/{chunk-IPX2R7FR.cjs.map → chunk-PCEE6DRL.cjs.map} +1 -1
  28. package/dist/{chunk-HW3JJ323.js → chunk-TU3LVAPX.js} +32 -31
  29. package/dist/chunk-TU3LVAPX.js.map +1 -0
  30. package/dist/{chunk-5PG7DV7A.cjs → chunk-WMIPYZSB.cjs} +34 -36
  31. package/dist/chunk-WMIPYZSB.cjs.map +1 -0
  32. package/dist/{chunk-ZLO6NETT.cjs → chunk-XWJFOP5G.cjs} +505 -337
  33. package/dist/chunk-XWJFOP5G.cjs.map +1 -0
  34. package/dist/{chunk-T64LAI7L.js → chunk-YA4G7RFB.js} +3 -3
  35. package/dist/{chunk-T64LAI7L.js.map → chunk-YA4G7RFB.js.map} +1 -1
  36. package/dist/contracts/handlers/index.cjs +6 -6
  37. package/dist/contracts/handlers/index.d.cts +3 -3
  38. package/dist/contracts/handlers/index.d.ts +3 -3
  39. package/dist/contracts/handlers/index.js +2 -2
  40. package/dist/{delegate-aaVGfWsV.d.ts → delegate-CEk9RHVj.d.cts} +2 -2
  41. package/dist/{delegate-BFZs69hp.d.cts → delegate-Ds4Hi7Xy.d.ts} +2 -2
  42. package/dist/{index-NDla_UoJ.d.ts → index-DA9r_7Vg.d.ts} +2 -2
  43. package/dist/{index-B22cA64m.d.cts → index-WIAY0DDn.d.cts} +2 -2
  44. package/dist/index.cjs +161 -137
  45. package/dist/index.d.cts +144 -17
  46. package/dist/index.d.ts +144 -17
  47. package/dist/index.js +4 -4
  48. package/dist/repositories/realm/index.cjs +13 -13
  49. package/dist/repositories/realm/index.d.cts +2 -2
  50. package/dist/repositories/realm/index.d.ts +2 -2
  51. package/dist/repositories/realm/index.js +4 -4
  52. package/dist/repositories/sqlite/index.cjs +13 -13
  53. package/dist/repositories/sqlite/index.d.cts +1 -1
  54. package/dist/repositories/sqlite/index.d.ts +1 -1
  55. package/dist/repositories/sqlite/index.js +4 -4
  56. package/dist/{taskRunner-C6Ff4OaU.d.cts → taskRunner-CdEVYgoP.d.cts} +2 -2
  57. package/dist/{taskRunner-yvPN8Z0K.d.ts → taskRunner-JNjIWWJi.d.ts} +2 -2
  58. package/dist/wallet/expo/background.cjs +14 -14
  59. package/dist/wallet/expo/background.d.cts +3 -3
  60. package/dist/wallet/expo/background.d.ts +3 -3
  61. package/dist/wallet/expo/background.js +6 -6
  62. package/dist/wallet/expo/index.cjs +19 -15
  63. package/dist/wallet/expo/index.cjs.map +1 -1
  64. package/dist/wallet/expo/index.d.cts +9 -7
  65. package/dist/wallet/expo/index.d.ts +9 -7
  66. package/dist/wallet/expo/index.js +11 -7
  67. package/dist/wallet/expo/index.js.map +1 -1
  68. package/dist/{wallet-D9NBRqvC.d.ts → wallet-BGL6SzKQ.d.ts} +19 -15
  69. package/dist/{wallet-AF-p-OWj.d.cts → wallet-CMgzKP0o.d.cts} +19 -15
  70. package/dist/worker/expo/index.cjs +9 -9
  71. package/dist/worker/expo/index.d.cts +4 -4
  72. package/dist/worker/expo/index.d.ts +4 -4
  73. package/dist/worker/expo/index.js +5 -5
  74. package/package.json +1 -1
  75. package/dist/chunk-5PG7DV7A.cjs.map +0 -1
  76. package/dist/chunk-ADV27S4N.cjs.map +0 -1
  77. package/dist/chunk-BQLHADL7.js.map +0 -1
  78. package/dist/chunk-CFZMTDWI.js.map +0 -1
  79. package/dist/chunk-FG5ACJJW.cjs.map +0 -1
  80. package/dist/chunk-HW3JJ323.js.map +0 -1
  81. package/dist/chunk-ZBUDLTBO.js.map +0 -1
  82. package/dist/chunk-ZLO6NETT.cjs.map +0 -1
@@ -460,7 +460,7 @@ declare class VtxoScript {
460
460
  * @returns Arkade address for this script
461
461
  * @see ArkAddress
462
462
  */
463
- address(prefix: string, serverPubKey: Bytes): ArkAddress;
463
+ address(prefix: string | undefined, serverPubKey: Bytes): ArkAddress;
464
464
  get pkScript(): Bytes;
465
465
  /**
466
466
  * Build the Taproot onchain address corresponding to this virtual output script.
@@ -469,7 +469,7 @@ declare class VtxoScript {
469
469
  * @returns Taproot onchain address
470
470
  * @see address
471
471
  */
472
- onchainAddress(network: typeof NETWORK): string;
472
+ onchainAddress(network?: typeof NETWORK): string;
473
473
  /**
474
474
  * Look up a tapleaf script by its hex-encoded tapscript body.
475
475
  *
@@ -551,13 +551,13 @@ interface RenewalConfig {
551
551
  * // Default behavior: virtual output renewal at 3 days, boarding sweep enabled, polling every minute
552
552
  * const wallet = await Wallet.create({
553
553
  * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
554
- * arkServerUrl: 'https://arkade.computer',
554
+ * arkProvider: new RestArkProvider(),
555
555
  * });
556
556
  *
557
557
  * // Custom expiry threshold of 24 hours
558
558
  * const wallet = await Wallet.create({
559
559
  * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
560
- * arkServerUrl: 'https://arkade.computer',
560
+ * arkProvider: new RestArkProvider(),
561
561
  * settlementConfig: {
562
562
  * vtxoThreshold: 60 * 60 * 24, // 24 hours in seconds
563
563
  * },
@@ -566,7 +566,7 @@ interface RenewalConfig {
566
566
  * // Explicitly disable
567
567
  * const wallet = await Wallet.create({
568
568
  * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
569
- * arkServerUrl: 'https://arkade.computer',
569
+ * arkProvider: new RestArkProvider(),
570
570
  * settlementConfig: false,
571
571
  * });
572
572
  * ```
@@ -608,6 +608,19 @@ interface SettlementConfig {
608
608
  * @returns true if virtual output expires within threshold, false otherwise
609
609
  */
610
610
  declare function isVtxoExpiringSoon(vtxo: ExtendedVirtualCoin, thresholdMs: number): boolean;
611
+ /**
612
+ * Optional arguments for {@link IVtxoManager.renewVtxos}.
613
+ */
614
+ interface RenewVtxosOptions {
615
+ /**
616
+ * Override the renewal threshold for this call only, in seconds.
617
+ *
618
+ * When provided, takes precedence over `SettlementConfig.vtxoThreshold`
619
+ * and the default (3 days). Useful for renewing only VTXOs that are
620
+ * more urgently expiring than the globally configured threshold.
621
+ */
622
+ thresholdSeconds?: number;
623
+ }
611
624
  /**
612
625
  * VtxoManager is a unified class for managing virtual output lifecycle operations including
613
626
  * recovery of swept/expired virtual outputs and renewal to prevent expiration.
@@ -626,7 +639,7 @@ declare function isVtxoExpiringSoon(vtxo: ExtendedVirtualCoin, thresholdMs: numb
626
639
  * ```typescript
627
640
  * const wallet = await Wallet.create({
628
641
  * identity,
629
- * arkServerUrl: 'https://arkade.computer',
642
+ * arkProvider: new RestArkProvider(),
630
643
  * settlementConfig: {
631
644
  * // Seconds before virtual output expiry to trigger renewal
632
645
  * vtxoThreshold: 259_200, // 3 days
@@ -662,7 +675,7 @@ interface IVtxoManager {
662
675
  vtxoCount: number;
663
676
  }>;
664
677
  getExpiringVtxos(thresholdMs?: number): Promise<ExtendedVirtualCoin[]>;
665
- renewVtxos(eventCallback?: (event: SettlementEvent) => void): Promise<string>;
678
+ renewVtxos(eventCallback?: (event: SettlementEvent) => void, options?: RenewVtxosOptions): Promise<string>;
666
679
  getExpiredBoardingUtxos(): Promise<ExtendedCoin[]>;
667
680
  sweepExpiredBoardingUtxos(): Promise<string>;
668
681
  dispose(): Promise<void>;
@@ -763,7 +776,7 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
763
776
  * ```typescript
764
777
  * const wallet = await Wallet.create({
765
778
  * identity,
766
- * arkServerUrl: 'https://arkade.computer',
779
+ * arkProvider: new RestArkProvider(),
767
780
  * settlementConfig: {
768
781
  * vtxoThreshold: 86_400 // 24 hours
769
782
  * },
@@ -784,6 +797,7 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
784
797
  * primary way to prevent virtual outputs from expiring.
785
798
  *
786
799
  * @param eventCallback - Optional callback for settlement events
800
+ * @param options - Optional per-call overrides; see {@link RenewVtxosOptions}
787
801
  * @returns Settlement transaction ID
788
802
  * @throws Error if no virtual outputs available to renew
789
803
  * @throws Error if total amount is below dust threshold
@@ -799,9 +813,12 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
799
813
  * const txid = await manager.renewVtxos((event) => {
800
814
  * console.log('Settlement event:', event.type);
801
815
  * });
816
+ *
817
+ * // Renew only VTXOs that expire within 6 hours
818
+ * const txid = await manager.renewVtxos(undefined, { thresholdSeconds: 6 * 60 * 60 });
802
819
  * ```
803
820
  */
804
- renewVtxos(eventCallback?: (event: SettlementEvent) => void): Promise<string>;
821
+ renewVtxos(eventCallback?: (event: SettlementEvent) => void, options?: RenewVtxosOptions): Promise<string>;
805
822
  /**
806
823
  * Get boarding inputs whose timelock has expired.
807
824
  *
@@ -841,7 +858,7 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
841
858
  * ```typescript
842
859
  * const wallet = await Wallet.create({
843
860
  * identity,
844
- * arkServerUrl: 'https://arkade.computer',
861
+ * arkProvider: new RestArkProvider(),
845
862
  * settlementConfig: {
846
863
  * boardingUtxoSweep: true,
847
864
  * },
@@ -1074,7 +1091,7 @@ declare class EsploraProvider implements OnchainProvider {
1074
1091
  private baseUrl;
1075
1092
  readonly pollingInterval: number;
1076
1093
  readonly forcePolling: boolean;
1077
- constructor(baseUrl: string, opts?: {
1094
+ constructor(baseUrl?: string, opts?: {
1078
1095
  /** Polling interval in milliseconds. */
1079
1096
  pollingInterval?: number;
1080
1097
  /** Force polling even when websocket transport is available. */
@@ -2288,13 +2305,12 @@ declare namespace Intent {
2288
2305
  interface DelegateInfo {
2289
2306
  /** Delegate public key. */
2290
2307
  pubkey: string;
2291
- /** Delegate fee amount or expression returned by the delegation service. */
2308
+ /** Delegate fee amount or expression returned by the delegate. */
2292
2309
  fee: string;
2293
- /**
2294
- * Address controlled by the delegation service.
2295
- * Naming is confusing: should be thought of as a "delegate address".
2296
- */
2297
- delegatorAddress: string;
2310
+ /** Address for delegate fee collection. Sourced from `delegatorAddress` in Fulmine response, for now. */
2311
+ delegateAddress: string;
2312
+ /** @deprecated alias for @see DelegateInfo.delegateAddress */
2313
+ delegatorAddress?: string;
2298
2314
  }
2299
2315
  /**
2300
2316
  * Optional delegate behavior flags.
@@ -2310,9 +2326,9 @@ interface DelegateOptions {
2310
2326
  rejectReplace?: boolean;
2311
2327
  }
2312
2328
  /**
2313
- * Provider interface for remote delegation services.
2329
+ * Provider interface for remote delegation service.
2314
2330
  */
2315
- interface DelegatorProvider {
2331
+ interface DelegateProvider {
2316
2332
  /**
2317
2333
  * Request delegation for a signed register intent and its forfeit transactions.
2318
2334
  *
@@ -2328,21 +2344,23 @@ interface DelegatorProvider {
2328
2344
  */
2329
2345
  getDelegateInfo(): Promise<DelegateInfo>;
2330
2346
  }
2347
+ /** @deprecated alias for @see DelegateProvider */
2348
+ type DelegatorProvider = DelegateProvider;
2331
2349
  /**
2332
- * REST-based delegation provider implementation.
2350
+ * REST-based delegate provider implementation.
2333
2351
  * @example
2334
2352
  * ```typescript
2335
- * const provider = new RestDelegatorProvider('https://delegator.example.com');
2353
+ * const provider = new RestDelegateProvider('https://delegate.example.com');
2336
2354
  * const info = await provider.getDelegateInfo();
2337
2355
  * await provider.delegate(intent, forfeitTxs);
2338
2356
  * ```
2339
2357
  */
2340
- declare class RestDelegatorProvider implements DelegatorProvider {
2358
+ declare class RestDelegateProvider implements DelegateProvider {
2341
2359
  url: string;
2342
2360
  /**
2343
- * Create a REST delegation provider targeting the given base URL.
2361
+ * Create a REST delegate provider targeting the given base URL.
2344
2362
  *
2345
- * @param url - Base URL of the delegation service
2363
+ * @param url - Base URL of the remote delegation service.
2346
2364
  */
2347
2365
  constructor(url: string);
2348
2366
  /**
@@ -2362,14 +2380,17 @@ declare class RestDelegatorProvider implements DelegatorProvider {
2362
2380
  */
2363
2381
  getDelegateInfo(): Promise<DelegateInfo>;
2364
2382
  }
2383
+ /** @deprecated alias for @see RestDelegateProvider */
2384
+ declare const RestDelegatorProvider: typeof RestDelegateProvider;
2385
+ type RestDelegatorProvider = RestDelegateProvider;
2365
2386
 
2366
- interface IDelegatorManager {
2387
+ interface IDelegateManager {
2367
2388
  /**
2368
2389
  * Delegate virtual outputs to the remote delegation service.
2369
2390
  *
2370
2391
  * Vtxos that are not locked to a delegate-type contract (no tap leaf
2371
- * matches the delegator's pubkey) are filtered out silently, since they
2372
- * cannot be co-signed by the delegator.
2392
+ * matches the delegate's pubkey) are filtered out silently, since they
2393
+ * cannot be co-signed by the delegate.
2373
2394
  *
2374
2395
  * @param vtxos - Virtual outputs to delegate
2375
2396
  * @param destination - Arkade address that should receive renewed funds
@@ -2386,12 +2407,14 @@ interface IDelegatorManager {
2386
2407
  /** Fetch delegate metadata such as pubkey, fee, and delegate address. */
2387
2408
  getDelegateInfo(): Promise<DelegateInfo>;
2388
2409
  }
2389
- declare class DelegatorManagerImpl implements IDelegatorManager {
2390
- readonly delegatorProvider: DelegatorProvider;
2410
+ /** @deprecated alias for @see IDelegateManager */
2411
+ type IDelegatorManager = IDelegateManager;
2412
+ declare class DelegateManagerImpl implements IDelegateManager {
2413
+ readonly delegateProvider: DelegateProvider;
2391
2414
  readonly arkInfoProvider: Pick<ArkProvider, "getInfo">;
2392
2415
  readonly identity: Identity;
2393
- /** Create a delegator manager from the configured provider, Arkade info source, and wallet identity. */
2394
- constructor(delegatorProvider: DelegatorProvider, arkInfoProvider: Pick<ArkProvider, "getInfo">, identity: Identity);
2416
+ /** Create a delegate manager from the configured provider, Arkade info source, and wallet identity. */
2417
+ constructor(delegateProvider: DelegateProvider, arkInfoProvider: Pick<ArkProvider, "getInfo">, identity: Identity);
2395
2418
  getDelegateInfo(): Promise<DelegateInfo>;
2396
2419
  delegate(vtxos: ContractVtxo[], destination: string, delegateAt?: Date): Promise<{
2397
2420
  delegated: Outpoint[];
@@ -2401,6 +2424,9 @@ declare class DelegatorManagerImpl implements IDelegatorManager {
2401
2424
  }[];
2402
2425
  }>;
2403
2426
  }
2427
+ /** @deprecated alias for @see DelegateManagerImpl */
2428
+ declare const DelegatorManagerImpl: typeof DelegateManagerImpl;
2429
+ type DelegatorManagerImpl = DelegateManagerImpl;
2404
2430
 
2405
2431
  /**
2406
2432
  * Wallet receive-address strategy.
@@ -2431,11 +2457,11 @@ type WalletMode = "auto" | "static" | "hd" | DescriptorProvider;
2431
2457
  *
2432
2458
  * Supports URL-based and provider-based configuration.
2433
2459
  *
2434
- * URL-based configuration starts from `arkServerUrl` and can optionally override
2460
+ * @deprecated URL-based configuration starts from `arkServerUrl` and can optionally override
2435
2461
  * derived service URLs such as `indexerUrl` and `esploraUrl`.
2436
2462
  *
2437
2463
  * Provider-based configuration supplies concrete provider instances directly,
2438
- * including the ArkProvider, IndexerProvider, OnchainProvider, and DelegatorProvider.
2464
+ * including the ArkProvider, IndexerProvider, OnchainProvider, and DelegateProvider.
2439
2465
  *
2440
2466
  * The wallet will use provided URLs to create default providers if custom provider
2441
2467
  * instances are not supplied. If optional parameters are not provided, the wallet
@@ -2450,11 +2476,24 @@ type WalletMode = "auto" | "static" | "hd" | DescriptorProvider;
2450
2476
  * @see StorageConfig
2451
2477
  */
2452
2478
  interface BaseWalletConfig {
2453
- /** Base URL of the Arkade server. */
2479
+ /**
2480
+ * Base URL of the Arkade server.
2481
+ *
2482
+ * @deprecated Pass an explicit `arkProvider` instance instead. URL-based
2483
+ * configuration will be removed in a future major version.
2484
+ */
2454
2485
  arkServerUrl?: string;
2455
- /** Optional override for the indexer URL. */
2486
+ /**
2487
+ * Optional override for the indexer URL.
2488
+ *
2489
+ * @deprecated Pass an explicit `indexerProvider` instance instead.
2490
+ */
2456
2491
  indexerUrl?: string;
2457
- /** Optional override for the Esplora API URL. */
2492
+ /**
2493
+ * Optional override for the Esplora API URL.
2494
+ *
2495
+ * @deprecated Pass an explicit `onchainProvider` instance instead.
2496
+ */
2458
2497
  esploraUrl?: string;
2459
2498
  /** Optional Arkade server public key used to construct and validate Arkade addresses. */
2460
2499
  arkServerPublicKey?: string;
@@ -2474,7 +2513,9 @@ interface BaseWalletConfig {
2474
2513
  /** Optional onchain provider instance. */
2475
2514
  onchainProvider?: OnchainProvider;
2476
2515
  /** Optional delegation service instance. */
2477
- delegatorProvider?: DelegatorProvider;
2516
+ delegateProvider?: DelegateProvider;
2517
+ /** @deprecated alias for @see BaseWalletConfig.delegateProvider */
2518
+ delegatorProvider?: DelegateProvider;
2478
2519
  }
2479
2520
  /**
2480
2521
  * Configuration options for readonly wallet initialization.
@@ -2490,19 +2531,12 @@ interface BaseWalletConfig {
2490
2531
  *
2491
2532
  * @example
2492
2533
  * ```typescript
2493
- * // URL-based configuration
2494
- * const wallet = await ReadonlyWallet.create({
2495
- * identity: ReadonlySingleKey.fromPublicKey(pubkey),
2496
- * arkServerUrl: 'https://arkade.computer',
2497
- * esploraUrl: 'https://mempool.space/api'
2498
- * });
2499
- *
2500
2534
  * // Provider-based configuration (e.g., for Expo/React Native)
2501
2535
  * const wallet = await ReadonlyWallet.create({
2502
2536
  * identity: ReadonlySingleKey.fromPublicKey(pubkey),
2503
- * arkProvider: new ExpoArkProvider('https://arkade.computer'),
2504
- * indexerProvider: new ExpoIndexerProvider('https://arkade.computer'),
2505
- * onchainProvider: new EsploraProvider('https://mempool.space/api')
2537
+ * arkProvider: new ExpoArkProvider(),
2538
+ * indexerProvider: new ExpoIndexerProvider(),
2539
+ * onchainProvider: new EsploraProvider()
2506
2540
  * });
2507
2541
  * ```
2508
2542
  */
@@ -2528,25 +2562,18 @@ interface ReadonlyWalletConfig extends BaseWalletConfig {
2528
2562
  *
2529
2563
  * @example
2530
2564
  * ```typescript
2531
- * // URL-based configuration
2532
- * const wallet = await Wallet.create({
2533
- * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
2534
- * arkServerUrl: 'https://arkade.computer',
2535
- * esploraUrl: 'https://mempool.space/api'
2536
- * });
2537
- *
2538
- * // Provider-based configuration (e.g., for Expo/React Native)
2565
+ * // Provider-based configuration
2539
2566
  * const wallet = await Wallet.create({
2540
2567
  * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
2541
- * arkProvider: new ExpoArkProvider('https://arkade.computer'),
2542
- * indexerProvider: new ExpoIndexerProvider('https://arkade.computer'),
2543
- * onchainProvider: new EsploraProvider('https://mempool.space/api')
2568
+ * arkProvider: new ExpoArkProvider(),
2569
+ * indexerProvider: new ExpoIndexerProvider(),
2570
+ * onchainProvider: new EsploraProvider()
2544
2571
  * });
2545
2572
  *
2546
2573
  * // With settlement configuration
2547
2574
  * const wallet = await Wallet.create({
2548
2575
  * identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
2549
- * arkServerUrl: 'https://arkade.computer',
2576
+ * arkProvider: new RestArkProvider(),
2550
2577
  * settlementConfig: {
2551
2578
  * vtxoThreshold: 60 * 60 * 24, // 24 hours in seconds
2552
2579
  * boardingUtxoSweep: true,
@@ -3131,7 +3158,9 @@ interface IWallet extends IReadonlyWallet {
3131
3158
  /** Asset manager bound to this wallet instance. */
3132
3159
  assetManager: IAssetManager;
3133
3160
  /** @returns Delegation manager, when configured. */
3134
- getDelegatorManager(): Promise<IDelegatorManager | undefined>;
3161
+ getDelegateManager(): Promise<IDelegateManager | undefined>;
3162
+ /** @deprecated alias for @see IWallet.getDelegateManager */
3163
+ getDelegatorManager(): Promise<IDelegateManager | undefined>;
3135
3164
  }
3136
3165
  /**
3137
3166
  * Readonly wallet interface for Bitcoin transactions with Arkade protocol support.
@@ -3439,7 +3468,7 @@ interface IndexerProvider {
3439
3468
  */
3440
3469
  declare class RestIndexerProvider implements IndexerProvider {
3441
3470
  serverUrl: string;
3442
- constructor(serverUrl: string);
3471
+ constructor(serverUrl?: string);
3443
3472
  getVtxoTree(batchOutpoint: Outpoint, opts?: PaginationOptions): Promise<{
3444
3473
  vtxoTree: Tx[];
3445
3474
  page?: PageResponse;
@@ -3709,7 +3738,7 @@ interface ArkProvider {
3709
3738
  */
3710
3739
  declare class RestArkProvider implements ArkProvider {
3711
3740
  serverUrl: string;
3712
- constructor(serverUrl: string);
3741
+ constructor(serverUrl?: string);
3713
3742
  getInfo(): Promise<ArkInfo>;
3714
3743
  submitTx(signedArkTx: string, checkpointTxs: string[]): Promise<{
3715
3744
  arkTxid: string;
@@ -3877,4 +3906,4 @@ declare namespace ProtoTypes {
3877
3906
  export { };
3878
3907
  }
3879
3908
 
3880
- export { CSVMultisigTapscript as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type BatchFailedEvent as D, type ExtendedVirtualCoin as E, type TreeTxEvent as F, type GetVtxosFilter as G, type TreeSignatureEvent as H, type IWallet as I, type DescriptorProvider as J, type Coin as K, type IReadonlyWallet as L, type ReadonlyIdentity as M, type Network as N, type OnchainProvider as O, type DelegatorProvider as P, type ReadonlyWalletConfig as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type IReadonlyAssetManager as U, VtxoScript as V, type WalletRepository as W, type NetworkName as X, type ArkInfo as Y, ArkAddress as Z, ContractManager as _, type Identity as a, MultisigTapscript as a$, type SettlementConfig as a0, VtxoManager as a1, type SignerSession as a2, type SignedIntent as a3, Intent as a4, type DescriptorSigningRequest as a5, Transaction as a6, type IntentFeeConfig as a7, type OffchainInput as a8, FeeAmount as a9, type AssetMetadata as aA, type BaseWalletConfig as aB, type BatchInfo as aC, type BatchSignableIdentity as aD, CLTVMultisigTapscript as aE, ChainTxType as aF, type CommitmentTx as aG, ConditionCSVMultisigTapscript as aH, ConditionMultisigTapscript as aI, type ContractBalance as aJ, type ContractEventCallback as aK, type ContractHandler as aL, type ContractManagerConfig as aM, type ContractState as aN, type ContractVtxo as aO, ContractWatcher as aP, type DelegateOptions as aQ, DelegatorManagerImpl as aR, type Discoverable as aS, type DiscoveredContract as aT, type DiscoveryDeps as aU, ESPLORA_URL as aV, EsploraProvider as aW, type ExtendedContractVtxo as aX, type HandlerError as aY, IndexerTxType as aZ, type KnownMetadata as a_, type OnchainInput as aa, type FeeOutput as ab, type ContractWatcherConfig as ac, type FeeInfo as ad, type CreateContractParams as ae, type GetContractsFilter as af, type GetSpendablePathsOptions as ag, type GetAllSpendingPathsOptions as ah, type IssuanceParams as ai, type ReissuanceParams as aj, type BurnParams as ak, type ContractWithVtxos as al, type PathSelection as am, type ContractEvent as an, type AssetDetails as ao, type IssuanceResult as ap, type DelegateInfo as aq, type StorageConfig as ar, type IVtxoManager as as, type ExplorerTransaction as at, type EncodedVtxoScript as au, type Status as av, type Outpoint as aw, type ChainTx as ax, type ArkTapscript as ay, type Asset as az, type WalletConfig as b, type Nonces as b0, type Output as b1, type PageResponse as b2, type PaginationOptions as b3, PartialSig as b4, type PathContext as b5, type ProviderClass as b6, RestDelegatorProvider as b7, type ScanContractsOptions as b8, type ScanResult as b9, isSpendable as bA, isSubdust as bB, isVtxoExpiringSoon as bC, networks as bD, type ScheduledSession as ba, SettlementEventType as bb, type SignRequest as bc, type SubscriptionEvent as bd, type SubscriptionHeartbeat as be, type TapLeaves as bf, TapTreeCoder as bg, TapscriptType as bh, type TreeNonces as bi, type TreePartialSigs as bj, type Tx as bk, type TxHistoryRecord as bl, type TxKey as bm, type TxTreeNode as bn, TxType as bo, type VirtualStatus as bp, type Vtxo as bq, type VtxoChain as br, type VtxoType as bs, type WalletMode as bt, decodeTapscript as bu, getSequence as bv, isBatchSignable as bw, isDiscoverable as bx, isExpired as by, isRecoverable as bz, type WalletBalance as c, type ExtendedCoin as d, type IContractManager as e, type IDelegatorManager as f, type SettleParams as g, type SettlementEvent as h, type IAssetManager as i, RestArkProvider as j, RestIndexerProvider as k, type SubscriptionResponse as l, type ArkProvider as m, type IndexerProvider as n, type RelativeTimelock as o, type TapLeafScript as p, type VirtualCoin as q, type Contract as r, type VtxoRepositoryKey as s, type WalletState as t, type ContractFilter as u, type TreeSigningStartedEvent as v, TxTree as w, type TreeNoncesEvent as x, type BatchFinalizationEvent as y, type BatchFinalizedEvent as z };
3909
+ export { type SignerSession as $, type ArkTransaction as A, type BatchStartedEvent as B, type ContractRepository as C, type DescriptorProvider as D, type ExtendedVirtualCoin as E, type IReadonlyWallet as F, type GetVtxosFilter as G, type ReadonlyIdentity as H, type IWallet as I, type DelegateProvider as J, type ReadonlyWalletConfig as K, type IReadonlyAssetManager as L, type NetworkName as M, type Network as N, type OnchainProvider as O, type ArkInfo as P, ArkAddress as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type Coin as U, VtxoScript as V, type WalletRepository as W, ContractManager as X, CSVMultisigTapscript as Y, type SettlementConfig as Z, VtxoManager as _, type Identity as a, type HandlerError as a$, type SignedIntent as a0, Intent as a1, type VtxoRepositoryKey as a2, type WalletState as a3, type ContractFilter as a4, type DescriptorSigningRequest as a5, Transaction as a6, type IntentFeeConfig as a7, type OffchainInput as a8, FeeAmount as a9, type Asset as aA, type AssetMetadata as aB, type BaseWalletConfig as aC, type BatchInfo as aD, type BatchSignableIdentity as aE, CLTVMultisigTapscript as aF, ChainTxType as aG, type CommitmentTx as aH, ConditionCSVMultisigTapscript as aI, ConditionMultisigTapscript as aJ, type ContractBalance as aK, type ContractEventCallback as aL, type ContractHandler as aM, type ContractManagerConfig as aN, type ContractState as aO, type ContractVtxo as aP, ContractWatcher as aQ, DelegateManagerImpl as aR, type DelegateOptions as aS, DelegatorManagerImpl as aT, type DelegatorProvider as aU, type Discoverable as aV, type DiscoveredContract as aW, type DiscoveryDeps as aX, ESPLORA_URL as aY, EsploraProvider as aZ, type ExtendedContractVtxo as a_, type OnchainInput as aa, type FeeOutput as ab, type ContractWatcherConfig as ac, type FeeInfo as ad, type CreateContractParams as ae, type GetContractsFilter as af, type GetSpendablePathsOptions as ag, type GetAllSpendingPathsOptions as ah, type IssuanceParams as ai, type ReissuanceParams as aj, type BurnParams as ak, type RenewVtxosOptions as al, type ContractWithVtxos as am, type PathSelection as an, type ContractEvent as ao, type AssetDetails as ap, type IssuanceResult as aq, type DelegateInfo as ar, type StorageConfig as as, type IVtxoManager as at, type ExplorerTransaction as au, type EncodedVtxoScript as av, type Status as aw, type Outpoint as ax, type ChainTx as ay, type ArkTapscript as az, type WalletConfig as b, type IDelegatorManager as b0, IndexerTxType as b1, type KnownMetadata as b2, MultisigTapscript as b3, type Nonces as b4, type Output as b5, type PageResponse as b6, type PaginationOptions as b7, PartialSig as b8, type PathContext as b9, getSequence as bA, isBatchSignable as bB, isDiscoverable as bC, isExpired as bD, isRecoverable as bE, isSpendable as bF, isSubdust as bG, isVtxoExpiringSoon as bH, networks as bI, type ProviderClass as ba, RestDelegateProvider as bb, RestDelegatorProvider as bc, type ScanContractsOptions as bd, type ScanResult as be, type ScheduledSession as bf, SettlementEventType as bg, type SignRequest as bh, type SubscriptionEvent as bi, type SubscriptionHeartbeat as bj, type TapLeaves as bk, TapTreeCoder as bl, TapscriptType as bm, type TreeNonces as bn, type TreePartialSigs as bo, type Tx as bp, type TxHistoryRecord as bq, type TxKey as br, type TxTreeNode as bs, TxType as bt, type VirtualStatus as bu, type Vtxo as bv, type VtxoChain as bw, type VtxoType as bx, type WalletMode as by, decodeTapscript as bz, type WalletBalance as c, type ExtendedCoin as d, type IContractManager as e, type IDelegateManager as f, type SettleParams as g, type SettlementEvent as h, type IAssetManager as i, RestArkProvider as j, RestIndexerProvider as k, type SubscriptionResponse as l, type ArkProvider as m, type IndexerProvider as n, type RelativeTimelock as o, type TapLeafScript as p, type VirtualCoin as q, type Contract as r, type TreeSigningStartedEvent as s, TxTree as t, type TreeNoncesEvent as u, type BatchFinalizationEvent as v, type BatchFinalizedEvent as w, type BatchFailedEvent as x, type TreeTxEvent as y, type TreeSignatureEvent as z };
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, b as TaskItem, d as TaskResult } from './taskRunner-C6Ff4OaU.cjs';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-CdEVYgoP.cjs';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
46
46
  private writeList;
47
47
  }
48
48
 
49
- export { type AsyncStorageLike as A, AsyncStorageTaskQueue as a };
49
+ export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
@@ -1,4 +1,4 @@
1
- import { c as TaskQueue, b as TaskItem, d as TaskResult } from './taskRunner-yvPN8Z0K.js';
1
+ import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-JNjIWWJi.js';
2
2
 
3
3
  /**
4
4
  * Minimal async key-value storage interface.
@@ -46,4 +46,4 @@ declare class AsyncStorageTaskQueue implements TaskQueue {
46
46
  private writeList;
47
47
  }
48
48
 
49
- export { type AsyncStorageLike as A, AsyncStorageTaskQueue as a };
49
+ export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk5PG7DV7A_cjs = require('./chunk-5PG7DV7A.cjs');
3
+ var chunkWMIPYZSB_cjs = require('./chunk-WMIPYZSB.cjs');
4
4
  var chunk5BLDMQED_cjs = require('./chunk-5BLDMQED.cjs');
5
5
  var btcSigner = require('@scure/btc-signer');
6
6
  var base = require('@scure/base');
@@ -106,7 +106,7 @@ var VtxoTreeExpiry = {
106
106
  if (!checkKeyIncludes(unknown[0], "expiry" /* VtxoTreeExpiry */)) return null;
107
107
  const v = btcSigner.ScriptNum(6, true).decode(unknown[1]);
108
108
  if (!v) return null;
109
- return chunk5PG7DV7A_cjs.sequenceToTimelock(Number(v));
109
+ return chunkWMIPYZSB_cjs.sequenceToTimelock(Number(v));
110
110
  })
111
111
  };
112
112
  var encodedPsbtFieldKey = Object.fromEntries(
@@ -318,8 +318,8 @@ function prepareCoinAsIntentProofInput(coin) {
318
318
  if (!("tapTree" in coin)) {
319
319
  return coin;
320
320
  }
321
- const vtxoScript = chunk5PG7DV7A_cjs.VtxoScript.decode(coin.tapTree);
322
- const sequence = chunk5PG7DV7A_cjs.getSequence(coin.intentTapLeafScript);
321
+ const vtxoScript = chunkWMIPYZSB_cjs.VtxoScript.decode(coin.tapTree);
322
+ const sequence = chunkWMIPYZSB_cjs.getSequence(coin.intentTapLeafScript);
323
323
  const unknown = [VtxoTaprootTree.encode(coin.tapTree)];
324
324
  if (coin.extraWitness) {
325
325
  unknown.push(ConditionWitness.encode(coin.extraWitness));
@@ -451,7 +451,7 @@ var SettlementEventType = /* @__PURE__ */ ((SettlementEventType2) => {
451
451
  return SettlementEventType2;
452
452
  })(SettlementEventType || {});
453
453
  var RestArkProvider = class {
454
- constructor(serverUrl) {
454
+ constructor(serverUrl = chunkWMIPYZSB_cjs.DEFAULT_ARKADE_SERVER_URL) {
455
455
  this.serverUrl = serverUrl;
456
456
  }
457
457
  async getInfo() {
@@ -2189,7 +2189,7 @@ var ChainTxType = /* @__PURE__ */ ((ChainTxType2) => {
2189
2189
  return ChainTxType2;
2190
2190
  })(ChainTxType || {});
2191
2191
  var RestIndexerProvider = class {
2192
- constructor(serverUrl) {
2192
+ constructor(serverUrl = chunkWMIPYZSB_cjs.DEFAULT_ARKADE_SERVER_URL) {
2193
2193
  this.serverUrl = serverUrl;
2194
2194
  }
2195
2195
  async getVtxoTree(batchOutpoint, opts) {
@@ -2697,5 +2697,5 @@ exports.isEventSourceError = isEventSourceError;
2697
2697
  exports.isFetchTimeoutError = isFetchTimeoutError;
2698
2698
  exports.maybeArkError = maybeArkError;
2699
2699
  exports.setArkPsbtField = setArkPsbtField;
2700
- //# sourceMappingURL=chunk-ADV27S4N.cjs.map
2701
- //# sourceMappingURL=chunk-ADV27S4N.cjs.map
2700
+ //# sourceMappingURL=chunk-6FLL2Q36.cjs.map
2701
+ //# sourceMappingURL=chunk-6FLL2Q36.cjs.map