@arkade-os/sdk 0.4.28 → 0.4.29
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 +14 -16
- package/dist/adapters/expo.cjs +5 -5
- package/dist/adapters/expo.d.cts +4 -4
- package/dist/adapters/expo.d.ts +4 -4
- package/dist/adapters/expo.js +3 -3
- package/dist/adapters/indexedDB.cjs +5 -5
- package/dist/adapters/indexedDB.js +4 -4
- package/dist/{ark-TZ1gXAXU.d.cts → ark-ChhTwpLf.d.cts} +73 -61
- package/dist/{ark-TZ1gXAXU.d.ts → ark-ChhTwpLf.d.ts} +73 -61
- package/dist/{asyncStorageTaskQueue-EFqSmYTg.d.cts → asyncStorageTaskQueue-DW1-BpI7.d.cts} +2 -2
- package/dist/{asyncStorageTaskQueue-Cb1F_Z9s.d.ts → asyncStorageTaskQueue-DZ0nUuEJ.d.ts} +2 -2
- package/dist/{chunk-ADV27S4N.cjs → chunk-6FLL2Q36.cjs} +8 -8
- package/dist/chunk-6FLL2Q36.cjs.map +1 -0
- package/dist/{chunk-ZBUDLTBO.js → chunk-6NWNOLL3.js} +5 -5
- package/dist/chunk-6NWNOLL3.js.map +1 -0
- package/dist/{chunk-CFZMTDWI.js → chunk-ABWRLTX5.js} +6 -5
- package/dist/chunk-ABWRLTX5.js.map +1 -0
- package/dist/{chunk-BQLHADL7.js → chunk-BVP2U66Q.js} +316 -178
- package/dist/chunk-BVP2U66Q.js.map +1 -0
- package/dist/{chunk-ZLO6NETT.cjs → chunk-GDCTOSMV.cjs} +480 -332
- package/dist/chunk-GDCTOSMV.cjs.map +1 -0
- package/dist/{chunk-FG5ACJJW.cjs → chunk-GIGILVVP.cjs} +11 -10
- package/dist/chunk-GIGILVVP.cjs.map +1 -0
- package/dist/{chunk-I3DGUUCT.cjs → chunk-IEO3XDKI.cjs} +28 -28
- package/dist/{chunk-I3DGUUCT.cjs.map → chunk-IEO3XDKI.cjs.map} +1 -1
- package/dist/{chunk-IPX2R7FR.cjs → chunk-PJUFOJ2L.cjs} +7 -7
- package/dist/{chunk-IPX2R7FR.cjs.map → chunk-PJUFOJ2L.cjs.map} +1 -1
- package/dist/{chunk-A3EMF7RN.js → chunk-TH6T23XG.js} +3 -3
- package/dist/{chunk-A3EMF7RN.js.map → chunk-TH6T23XG.js.map} +1 -1
- package/dist/{chunk-HW3JJ323.js → chunk-TU3LVAPX.js} +32 -31
- package/dist/chunk-TU3LVAPX.js.map +1 -0
- package/dist/{chunk-5PG7DV7A.cjs → chunk-WMIPYZSB.cjs} +34 -36
- package/dist/chunk-WMIPYZSB.cjs.map +1 -0
- package/dist/{chunk-T64LAI7L.js → chunk-YA4G7RFB.js} +3 -3
- package/dist/{chunk-T64LAI7L.js.map → chunk-YA4G7RFB.js.map} +1 -1
- package/dist/contracts/handlers/index.cjs +6 -6
- package/dist/contracts/handlers/index.d.cts +3 -3
- package/dist/contracts/handlers/index.d.ts +3 -3
- package/dist/contracts/handlers/index.js +2 -2
- package/dist/{delegate-aaVGfWsV.d.ts → delegate-4JBUkUhR.d.cts} +2 -2
- package/dist/{delegate-BFZs69hp.d.cts → delegate-DN7RELL1.d.ts} +2 -2
- package/dist/{index-NDla_UoJ.d.ts → index-Cn82bBUu.d.ts} +2 -2
- package/dist/{index-B22cA64m.d.cts → index-DfT5xzgY.d.cts} +2 -2
- package/dist/index.cjs +161 -137
- package/dist/index.d.cts +143 -17
- package/dist/index.d.ts +143 -17
- package/dist/index.js +4 -4
- package/dist/repositories/realm/index.cjs +13 -13
- package/dist/repositories/realm/index.d.cts +1 -1
- package/dist/repositories/realm/index.d.ts +1 -1
- package/dist/repositories/realm/index.js +4 -4
- package/dist/repositories/sqlite/index.cjs +13 -13
- package/dist/repositories/sqlite/index.d.cts +1 -1
- package/dist/repositories/sqlite/index.d.ts +1 -1
- package/dist/repositories/sqlite/index.js +4 -4
- package/dist/{taskRunner-C6Ff4OaU.d.cts → taskRunner-B-aPfHhK.d.cts} +2 -2
- package/dist/{taskRunner-yvPN8Z0K.d.ts → taskRunner-B-vG08pX.d.ts} +2 -2
- package/dist/wallet/expo/background.cjs +14 -14
- package/dist/wallet/expo/background.d.cts +3 -3
- package/dist/wallet/expo/background.d.ts +3 -3
- package/dist/wallet/expo/background.js +6 -6
- package/dist/wallet/expo/index.cjs +19 -15
- package/dist/wallet/expo/index.cjs.map +1 -1
- package/dist/wallet/expo/index.d.cts +9 -7
- package/dist/wallet/expo/index.d.ts +9 -7
- package/dist/wallet/expo/index.js +11 -7
- package/dist/wallet/expo/index.js.map +1 -1
- package/dist/{wallet-D9NBRqvC.d.ts → wallet-CCtqT2Wb.d.ts} +19 -15
- package/dist/{wallet-AF-p-OWj.d.cts → wallet-DjgFb_4T.d.cts} +19 -15
- package/dist/worker/expo/index.cjs +9 -9
- package/dist/worker/expo/index.d.cts +4 -4
- package/dist/worker/expo/index.d.ts +4 -4
- package/dist/worker/expo/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-5PG7DV7A.cjs.map +0 -1
- package/dist/chunk-ADV27S4N.cjs.map +0 -1
- package/dist/chunk-BQLHADL7.js.map +0 -1
- package/dist/chunk-CFZMTDWI.js.map +0 -1
- package/dist/chunk-FG5ACJJW.cjs.map +0 -1
- package/dist/chunk-HW3JJ323.js.map +0 -1
- package/dist/chunk-ZBUDLTBO.js.map +0 -1
- 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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
569
|
+
* arkProvider: new RestArkProvider(),
|
|
570
570
|
* settlementConfig: false,
|
|
571
571
|
* });
|
|
572
572
|
* ```
|
|
@@ -626,7 +626,7 @@ declare function isVtxoExpiringSoon(vtxo: ExtendedVirtualCoin, thresholdMs: numb
|
|
|
626
626
|
* ```typescript
|
|
627
627
|
* const wallet = await Wallet.create({
|
|
628
628
|
* identity,
|
|
629
|
-
*
|
|
629
|
+
* arkProvider: new RestArkProvider(),
|
|
630
630
|
* settlementConfig: {
|
|
631
631
|
* // Seconds before virtual output expiry to trigger renewal
|
|
632
632
|
* vtxoThreshold: 259_200, // 3 days
|
|
@@ -763,7 +763,7 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
|
|
|
763
763
|
* ```typescript
|
|
764
764
|
* const wallet = await Wallet.create({
|
|
765
765
|
* identity,
|
|
766
|
-
*
|
|
766
|
+
* arkProvider: new RestArkProvider(),
|
|
767
767
|
* settlementConfig: {
|
|
768
768
|
* vtxoThreshold: 86_400 // 24 hours
|
|
769
769
|
* },
|
|
@@ -841,7 +841,7 @@ declare class VtxoManager implements AsyncDisposable, IVtxoManager {
|
|
|
841
841
|
* ```typescript
|
|
842
842
|
* const wallet = await Wallet.create({
|
|
843
843
|
* identity,
|
|
844
|
-
*
|
|
844
|
+
* arkProvider: new RestArkProvider(),
|
|
845
845
|
* settlementConfig: {
|
|
846
846
|
* boardingUtxoSweep: true,
|
|
847
847
|
* },
|
|
@@ -1074,7 +1074,7 @@ declare class EsploraProvider implements OnchainProvider {
|
|
|
1074
1074
|
private baseUrl;
|
|
1075
1075
|
readonly pollingInterval: number;
|
|
1076
1076
|
readonly forcePolling: boolean;
|
|
1077
|
-
constructor(baseUrl
|
|
1077
|
+
constructor(baseUrl?: string, opts?: {
|
|
1078
1078
|
/** Polling interval in milliseconds. */
|
|
1079
1079
|
pollingInterval?: number;
|
|
1080
1080
|
/** Force polling even when websocket transport is available. */
|
|
@@ -2288,13 +2288,12 @@ declare namespace Intent {
|
|
|
2288
2288
|
interface DelegateInfo {
|
|
2289
2289
|
/** Delegate public key. */
|
|
2290
2290
|
pubkey: string;
|
|
2291
|
-
/** Delegate fee amount or expression returned by the
|
|
2291
|
+
/** Delegate fee amount or expression returned by the delegate. */
|
|
2292
2292
|
fee: string;
|
|
2293
|
-
/**
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
delegatorAddress: string;
|
|
2293
|
+
/** Address for delegate fee collection. Sourced from `delegatorAddress` in Fulmine response, for now. */
|
|
2294
|
+
delegateAddress: string;
|
|
2295
|
+
/** @deprecated alias for @see DelegateInfo.delegateAddress */
|
|
2296
|
+
delegatorAddress?: string;
|
|
2298
2297
|
}
|
|
2299
2298
|
/**
|
|
2300
2299
|
* Optional delegate behavior flags.
|
|
@@ -2310,9 +2309,9 @@ interface DelegateOptions {
|
|
|
2310
2309
|
rejectReplace?: boolean;
|
|
2311
2310
|
}
|
|
2312
2311
|
/**
|
|
2313
|
-
* Provider interface for remote delegation
|
|
2312
|
+
* Provider interface for remote delegation service.
|
|
2314
2313
|
*/
|
|
2315
|
-
interface
|
|
2314
|
+
interface DelegateProvider {
|
|
2316
2315
|
/**
|
|
2317
2316
|
* Request delegation for a signed register intent and its forfeit transactions.
|
|
2318
2317
|
*
|
|
@@ -2328,21 +2327,23 @@ interface DelegatorProvider {
|
|
|
2328
2327
|
*/
|
|
2329
2328
|
getDelegateInfo(): Promise<DelegateInfo>;
|
|
2330
2329
|
}
|
|
2330
|
+
/** @deprecated alias for @see DelegateProvider */
|
|
2331
|
+
type DelegatorProvider = DelegateProvider;
|
|
2331
2332
|
/**
|
|
2332
|
-
* REST-based
|
|
2333
|
+
* REST-based delegate provider implementation.
|
|
2333
2334
|
* @example
|
|
2334
2335
|
* ```typescript
|
|
2335
|
-
* const provider = new
|
|
2336
|
+
* const provider = new RestDelegateProvider('https://delegate.example.com');
|
|
2336
2337
|
* const info = await provider.getDelegateInfo();
|
|
2337
2338
|
* await provider.delegate(intent, forfeitTxs);
|
|
2338
2339
|
* ```
|
|
2339
2340
|
*/
|
|
2340
|
-
declare class
|
|
2341
|
+
declare class RestDelegateProvider implements DelegateProvider {
|
|
2341
2342
|
url: string;
|
|
2342
2343
|
/**
|
|
2343
|
-
* Create a REST
|
|
2344
|
+
* Create a REST delegate provider targeting the given base URL.
|
|
2344
2345
|
*
|
|
2345
|
-
* @param url - Base URL of the delegation service
|
|
2346
|
+
* @param url - Base URL of the remote delegation service.
|
|
2346
2347
|
*/
|
|
2347
2348
|
constructor(url: string);
|
|
2348
2349
|
/**
|
|
@@ -2362,14 +2363,17 @@ declare class RestDelegatorProvider implements DelegatorProvider {
|
|
|
2362
2363
|
*/
|
|
2363
2364
|
getDelegateInfo(): Promise<DelegateInfo>;
|
|
2364
2365
|
}
|
|
2366
|
+
/** @deprecated alias for @see RestDelegateProvider */
|
|
2367
|
+
declare const RestDelegatorProvider: typeof RestDelegateProvider;
|
|
2368
|
+
type RestDelegatorProvider = RestDelegateProvider;
|
|
2365
2369
|
|
|
2366
|
-
interface
|
|
2370
|
+
interface IDelegateManager {
|
|
2367
2371
|
/**
|
|
2368
2372
|
* Delegate virtual outputs to the remote delegation service.
|
|
2369
2373
|
*
|
|
2370
2374
|
* Vtxos that are not locked to a delegate-type contract (no tap leaf
|
|
2371
|
-
* matches the
|
|
2372
|
-
* cannot be co-signed by the
|
|
2375
|
+
* matches the delegate's pubkey) are filtered out silently, since they
|
|
2376
|
+
* cannot be co-signed by the delegate.
|
|
2373
2377
|
*
|
|
2374
2378
|
* @param vtxos - Virtual outputs to delegate
|
|
2375
2379
|
* @param destination - Arkade address that should receive renewed funds
|
|
@@ -2386,12 +2390,14 @@ interface IDelegatorManager {
|
|
|
2386
2390
|
/** Fetch delegate metadata such as pubkey, fee, and delegate address. */
|
|
2387
2391
|
getDelegateInfo(): Promise<DelegateInfo>;
|
|
2388
2392
|
}
|
|
2389
|
-
|
|
2390
|
-
|
|
2393
|
+
/** @deprecated alias for @see IDelegateManager */
|
|
2394
|
+
type IDelegatorManager = IDelegateManager;
|
|
2395
|
+
declare class DelegateManagerImpl implements IDelegateManager {
|
|
2396
|
+
readonly delegateProvider: DelegateProvider;
|
|
2391
2397
|
readonly arkInfoProvider: Pick<ArkProvider, "getInfo">;
|
|
2392
2398
|
readonly identity: Identity;
|
|
2393
|
-
/** Create a
|
|
2394
|
-
constructor(
|
|
2399
|
+
/** Create a delegate manager from the configured provider, Arkade info source, and wallet identity. */
|
|
2400
|
+
constructor(delegateProvider: DelegateProvider, arkInfoProvider: Pick<ArkProvider, "getInfo">, identity: Identity);
|
|
2395
2401
|
getDelegateInfo(): Promise<DelegateInfo>;
|
|
2396
2402
|
delegate(vtxos: ContractVtxo[], destination: string, delegateAt?: Date): Promise<{
|
|
2397
2403
|
delegated: Outpoint[];
|
|
@@ -2401,6 +2407,9 @@ declare class DelegatorManagerImpl implements IDelegatorManager {
|
|
|
2401
2407
|
}[];
|
|
2402
2408
|
}>;
|
|
2403
2409
|
}
|
|
2410
|
+
/** @deprecated alias for @see DelegateManagerImpl */
|
|
2411
|
+
declare const DelegatorManagerImpl: typeof DelegateManagerImpl;
|
|
2412
|
+
type DelegatorManagerImpl = DelegateManagerImpl;
|
|
2404
2413
|
|
|
2405
2414
|
/**
|
|
2406
2415
|
* Wallet receive-address strategy.
|
|
@@ -2431,11 +2440,11 @@ type WalletMode = "auto" | "static" | "hd" | DescriptorProvider;
|
|
|
2431
2440
|
*
|
|
2432
2441
|
* Supports URL-based and provider-based configuration.
|
|
2433
2442
|
*
|
|
2434
|
-
* URL-based configuration starts from `arkServerUrl` and can optionally override
|
|
2443
|
+
* @deprecated URL-based configuration starts from `arkServerUrl` and can optionally override
|
|
2435
2444
|
* derived service URLs such as `indexerUrl` and `esploraUrl`.
|
|
2436
2445
|
*
|
|
2437
2446
|
* Provider-based configuration supplies concrete provider instances directly,
|
|
2438
|
-
* including the ArkProvider, IndexerProvider, OnchainProvider, and
|
|
2447
|
+
* including the ArkProvider, IndexerProvider, OnchainProvider, and DelegateProvider.
|
|
2439
2448
|
*
|
|
2440
2449
|
* The wallet will use provided URLs to create default providers if custom provider
|
|
2441
2450
|
* instances are not supplied. If optional parameters are not provided, the wallet
|
|
@@ -2450,11 +2459,24 @@ type WalletMode = "auto" | "static" | "hd" | DescriptorProvider;
|
|
|
2450
2459
|
* @see StorageConfig
|
|
2451
2460
|
*/
|
|
2452
2461
|
interface BaseWalletConfig {
|
|
2453
|
-
/**
|
|
2462
|
+
/**
|
|
2463
|
+
* Base URL of the Arkade server.
|
|
2464
|
+
*
|
|
2465
|
+
* @deprecated Pass an explicit `arkProvider` instance instead. URL-based
|
|
2466
|
+
* configuration will be removed in a future major version.
|
|
2467
|
+
*/
|
|
2454
2468
|
arkServerUrl?: string;
|
|
2455
|
-
/**
|
|
2469
|
+
/**
|
|
2470
|
+
* Optional override for the indexer URL.
|
|
2471
|
+
*
|
|
2472
|
+
* @deprecated Pass an explicit `indexerProvider` instance instead.
|
|
2473
|
+
*/
|
|
2456
2474
|
indexerUrl?: string;
|
|
2457
|
-
/**
|
|
2475
|
+
/**
|
|
2476
|
+
* Optional override for the Esplora API URL.
|
|
2477
|
+
*
|
|
2478
|
+
* @deprecated Pass an explicit `onchainProvider` instance instead.
|
|
2479
|
+
*/
|
|
2458
2480
|
esploraUrl?: string;
|
|
2459
2481
|
/** Optional Arkade server public key used to construct and validate Arkade addresses. */
|
|
2460
2482
|
arkServerPublicKey?: string;
|
|
@@ -2474,7 +2496,9 @@ interface BaseWalletConfig {
|
|
|
2474
2496
|
/** Optional onchain provider instance. */
|
|
2475
2497
|
onchainProvider?: OnchainProvider;
|
|
2476
2498
|
/** Optional delegation service instance. */
|
|
2477
|
-
|
|
2499
|
+
delegateProvider?: DelegateProvider;
|
|
2500
|
+
/** @deprecated alias for @see BaseWalletConfig.delegateProvider */
|
|
2501
|
+
delegatorProvider?: DelegateProvider;
|
|
2478
2502
|
}
|
|
2479
2503
|
/**
|
|
2480
2504
|
* Configuration options for readonly wallet initialization.
|
|
@@ -2490,19 +2514,12 @@ interface BaseWalletConfig {
|
|
|
2490
2514
|
*
|
|
2491
2515
|
* @example
|
|
2492
2516
|
* ```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
2517
|
* // Provider-based configuration (e.g., for Expo/React Native)
|
|
2501
2518
|
* const wallet = await ReadonlyWallet.create({
|
|
2502
2519
|
* identity: ReadonlySingleKey.fromPublicKey(pubkey),
|
|
2503
|
-
* arkProvider: new ExpoArkProvider(
|
|
2504
|
-
* indexerProvider: new ExpoIndexerProvider(
|
|
2505
|
-
* onchainProvider: new EsploraProvider(
|
|
2520
|
+
* arkProvider: new ExpoArkProvider(),
|
|
2521
|
+
* indexerProvider: new ExpoIndexerProvider(),
|
|
2522
|
+
* onchainProvider: new EsploraProvider()
|
|
2506
2523
|
* });
|
|
2507
2524
|
* ```
|
|
2508
2525
|
*/
|
|
@@ -2528,25 +2545,18 @@ interface ReadonlyWalletConfig extends BaseWalletConfig {
|
|
|
2528
2545
|
*
|
|
2529
2546
|
* @example
|
|
2530
2547
|
* ```typescript
|
|
2531
|
-
* //
|
|
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)
|
|
2548
|
+
* // Provider-based configuration
|
|
2539
2549
|
* const wallet = await Wallet.create({
|
|
2540
2550
|
* identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
|
|
2541
|
-
* arkProvider: new ExpoArkProvider(
|
|
2542
|
-
* indexerProvider: new ExpoIndexerProvider(
|
|
2543
|
-
* onchainProvider: new EsploraProvider(
|
|
2551
|
+
* arkProvider: new ExpoArkProvider(),
|
|
2552
|
+
* indexerProvider: new ExpoIndexerProvider(),
|
|
2553
|
+
* onchainProvider: new EsploraProvider()
|
|
2544
2554
|
* });
|
|
2545
2555
|
*
|
|
2546
2556
|
* // With settlement configuration
|
|
2547
2557
|
* const wallet = await Wallet.create({
|
|
2548
2558
|
* identity: MnemonicIdentity.fromMnemonic('abandon abandon...'),
|
|
2549
|
-
*
|
|
2559
|
+
* arkProvider: new RestArkProvider(),
|
|
2550
2560
|
* settlementConfig: {
|
|
2551
2561
|
* vtxoThreshold: 60 * 60 * 24, // 24 hours in seconds
|
|
2552
2562
|
* boardingUtxoSweep: true,
|
|
@@ -3131,7 +3141,9 @@ interface IWallet extends IReadonlyWallet {
|
|
|
3131
3141
|
/** Asset manager bound to this wallet instance. */
|
|
3132
3142
|
assetManager: IAssetManager;
|
|
3133
3143
|
/** @returns Delegation manager, when configured. */
|
|
3134
|
-
|
|
3144
|
+
getDelegateManager(): Promise<IDelegateManager | undefined>;
|
|
3145
|
+
/** @deprecated alias for @see IWallet.getDelegateManager */
|
|
3146
|
+
getDelegatorManager(): Promise<IDelegateManager | undefined>;
|
|
3135
3147
|
}
|
|
3136
3148
|
/**
|
|
3137
3149
|
* Readonly wallet interface for Bitcoin transactions with Arkade protocol support.
|
|
@@ -3439,7 +3451,7 @@ interface IndexerProvider {
|
|
|
3439
3451
|
*/
|
|
3440
3452
|
declare class RestIndexerProvider implements IndexerProvider {
|
|
3441
3453
|
serverUrl: string;
|
|
3442
|
-
constructor(serverUrl
|
|
3454
|
+
constructor(serverUrl?: string);
|
|
3443
3455
|
getVtxoTree(batchOutpoint: Outpoint, opts?: PaginationOptions): Promise<{
|
|
3444
3456
|
vtxoTree: Tx[];
|
|
3445
3457
|
page?: PageResponse;
|
|
@@ -3709,7 +3721,7 @@ interface ArkProvider {
|
|
|
3709
3721
|
*/
|
|
3710
3722
|
declare class RestArkProvider implements ArkProvider {
|
|
3711
3723
|
serverUrl: string;
|
|
3712
|
-
constructor(serverUrl
|
|
3724
|
+
constructor(serverUrl?: string);
|
|
3713
3725
|
getInfo(): Promise<ArkInfo>;
|
|
3714
3726
|
submitTx(signedArkTx: string, checkpointTxs: string[]): Promise<{
|
|
3715
3727
|
arkTxid: string;
|
|
@@ -3877,4 +3889,4 @@ declare namespace ProtoTypes {
|
|
|
3877
3889
|
export { };
|
|
3878
3890
|
}
|
|
3879
3891
|
|
|
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
|
|
3892
|
+
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 IReadonlyWallet as K, type ReadonlyIdentity as L, type DelegateProvider as M, type Network as N, type OnchainProvider as O, type ReadonlyWalletConfig as P, type IReadonlyAssetManager as Q, type Recipient as R, type SendBitcoinParams as S, type TxNotification as T, type NetworkName as U, VtxoScript as V, type WalletRepository as W, type ArkInfo as X, ArkAddress as Y, type Coin as Z, ContractManager as _, type Identity as a, type IDelegatorManager 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, DelegateManagerImpl as aQ, type DelegateOptions as aR, DelegatorManagerImpl as aS, type DelegatorProvider as aT, type Discoverable as aU, type DiscoveredContract as aV, type DiscoveryDeps as aW, ESPLORA_URL as aX, EsploraProvider as aY, type ExtendedContractVtxo as aZ, type HandlerError 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, IndexerTxType as b0, type KnownMetadata as b1, MultisigTapscript as b2, type Nonces as b3, type Output as b4, type PageResponse as b5, type PaginationOptions as b6, PartialSig as b7, type PathContext as b8, type ProviderClass as b9, isBatchSignable as bA, isDiscoverable as bB, isExpired as bC, isRecoverable as bD, isSpendable as bE, isSubdust as bF, isVtxoExpiringSoon as bG, networks as bH, RestDelegateProvider as ba, RestDelegatorProvider as bb, type ScanContractsOptions as bc, type ScanResult as bd, type ScheduledSession as be, SettlementEventType as bf, type SignRequest as bg, type SubscriptionEvent as bh, type SubscriptionHeartbeat as bi, type TapLeaves as bj, TapTreeCoder as bk, TapscriptType as bl, type TreeNonces as bm, type TreePartialSigs as bn, type Tx as bo, type TxHistoryRecord as bp, type TxKey as bq, type TxTreeNode as br, TxType as bs, type VirtualStatus as bt, type Vtxo as bu, type VtxoChain as bv, type VtxoType as bw, type WalletMode as bx, decodeTapscript as by, getSequence 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 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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-B-aPfHhK.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 {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as TaskQueue, c as TaskItem, d as TaskResult } from './taskRunner-B-vG08pX.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 {
|
|
49
|
+
export { AsyncStorageTaskQueue as A, type AsyncStorageLike as a };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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
|
|
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 =
|
|
322
|
-
const sequence =
|
|
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-
|
|
2701
|
-
//# sourceMappingURL=chunk-
|
|
2700
|
+
//# sourceMappingURL=chunk-6FLL2Q36.cjs.map
|
|
2701
|
+
//# sourceMappingURL=chunk-6FLL2Q36.cjs.map
|