@arkade-os/sdk 0.4.25 → 0.4.26
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/cjs/script/address.js +2 -2
- package/dist/esm/adapters/asyncStorage.js +1 -1
- package/dist/esm/adapters/expo.js +2 -2
- package/dist/esm/adapters/fileSystem.js +1 -1
- package/dist/esm/adapters/indexedDB.js +1 -1
- package/dist/esm/adapters/localStorage.js +1 -1
- package/dist/esm/arkfee/index.js +1 -1
- package/dist/esm/arknote/index.js +1 -1
- package/dist/esm/bip322/index.js +2 -2
- package/dist/esm/contracts/arkcontract.js +2 -2
- package/dist/esm/contracts/contractManager.js +5 -5
- package/dist/esm/contracts/contractWatcher.js +3 -3
- package/dist/esm/contracts/handlers/default.js +4 -4
- package/dist/esm/contracts/handlers/delegate.js +4 -4
- package/dist/esm/contracts/handlers/helpers.js +2 -2
- package/dist/esm/contracts/handlers/index.js +8 -8
- package/dist/esm/contracts/handlers/vhtlc.js +3 -3
- package/dist/esm/contracts/index.js +8 -8
- package/dist/esm/extension/asset/assetGroup.js +7 -7
- package/dist/esm/extension/asset/assetId.js +2 -2
- package/dist/esm/extension/asset/assetInput.js +2 -2
- package/dist/esm/extension/asset/assetOutput.js +1 -1
- package/dist/esm/extension/asset/assetRef.js +3 -3
- package/dist/esm/extension/asset/index.js +8 -8
- package/dist/esm/extension/asset/metadata.js +1 -1
- package/dist/esm/extension/asset/packet.js +3 -3
- package/dist/esm/extension/index.js +4 -4
- package/dist/esm/forfeit.js +2 -2
- package/dist/esm/identity/index.js +5 -5
- package/dist/esm/identity/seedIdentity.js +2 -2
- package/dist/esm/identity/serialize.js +2 -2
- package/dist/esm/identity/singleKey.js +1 -1
- package/dist/esm/identity/staticDescriptorProvider.js +2 -2
- package/dist/esm/index.js +47 -47
- package/dist/esm/intent/index.js +3 -3
- package/dist/esm/musig2/index.js +3 -3
- package/dist/esm/musig2/sign.js +1 -1
- package/dist/esm/providers/ark.js +3 -3
- package/dist/esm/providers/delegator.js +1 -1
- package/dist/esm/providers/electrum.js +2 -2
- package/dist/esm/providers/expoArk.js +2 -2
- package/dist/esm/providers/expoIndexer.js +3 -3
- package/dist/esm/providers/indexer.js +3 -3
- package/dist/esm/repositories/inMemory/walletRepository.js +1 -1
- package/dist/esm/repositories/index.js +9 -9
- package/dist/esm/repositories/indexedDB/contractRepository.js +4 -4
- package/dist/esm/repositories/indexedDB/db.js +2 -2
- package/dist/esm/repositories/indexedDB/schema.js +1 -1
- package/dist/esm/repositories/indexedDB/walletRepository.js +6 -6
- package/dist/esm/repositories/migrations/fromStorageAdapter.js +1 -1
- package/dist/esm/repositories/migrations/walletRepositoryImpl.js +1 -1
- package/dist/esm/repositories/realm/index.js +3 -3
- package/dist/esm/repositories/realm/schemas.js +1 -1
- package/dist/esm/repositories/realm/walletRepository.js +3 -3
- package/dist/esm/repositories/scriptFromAddress.js +1 -1
- package/dist/esm/repositories/sqlite/index.js +2 -2
- package/dist/esm/repositories/sqlite/walletRepository.js +3 -3
- package/dist/esm/script/address.js +3 -3
- package/dist/esm/script/base.js +3 -3
- package/dist/esm/script/default.js +2 -2
- package/dist/esm/script/delegate.js +3 -3
- package/dist/esm/script/tapscript.js +1 -1
- package/dist/esm/script/vhtlc.js +2 -2
- package/dist/esm/storage/indexedDB.js +1 -1
- package/dist/esm/tree/signingSession.js +2 -2
- package/dist/esm/tree/validation.js +2 -2
- package/dist/esm/utils/arkTransaction.js +7 -7
- package/dist/esm/utils/transactionHistory.js +1 -1
- package/dist/esm/utils/unknownFields.js +1 -1
- package/dist/esm/wallet/asset-manager.js +5 -5
- package/dist/esm/wallet/asset.js +1 -1
- package/dist/esm/wallet/batch.js +2 -2
- package/dist/esm/wallet/delegator.js +6 -6
- package/dist/esm/wallet/expo/background.js +5 -5
- package/dist/esm/wallet/expo/index.js +2 -2
- package/dist/esm/wallet/expo/wallet.js +8 -8
- package/dist/esm/wallet/hdDescriptorProvider.js +2 -2
- package/dist/esm/wallet/onchain.js +7 -7
- package/dist/esm/wallet/ramps.js +3 -3
- package/dist/esm/wallet/serviceWorker/wallet-message-handler.js +6 -6
- package/dist/esm/wallet/serviceWorker/wallet.js +7 -7
- package/dist/esm/wallet/unroll.js +7 -7
- package/dist/esm/wallet/utils.js +2 -2
- package/dist/esm/wallet/validation.js +2 -2
- package/dist/esm/wallet/vtxo-manager.js +9 -9
- package/dist/esm/wallet/wallet.js +33 -33
- package/dist/esm/worker/expo/index.js +4 -4
- package/dist/esm/worker/expo/processors/contractPollProcessor.js +1 -1
- package/dist/esm/worker/expo/processors/index.js +1 -1
- package/dist/esm/worker/expo/taskRunner.js +1 -1
- package/dist/esm/worker/messageBus.js +6 -6
- package/dist/types/adapters/asyncStorage.d.ts +2 -2
- package/dist/types/adapters/expo.d.ts +4 -4
- package/dist/types/adapters/fileSystem.d.ts +2 -2
- package/dist/types/adapters/indexedDB.d.ts +2 -2
- package/dist/types/adapters/localStorage.d.ts +2 -2
- package/dist/types/arkfee/index.d.ts +2 -2
- package/dist/types/arknote/index.d.ts +2 -2
- package/dist/types/bip322/index.d.ts +1 -1
- package/dist/types/contracts/arkcontract.d.ts +1 -1
- package/dist/types/contracts/contractManager.d.ts +6 -6
- package/dist/types/contracts/contractWatcher.d.ts +3 -3
- package/dist/types/contracts/handlers/default.d.ts +3 -3
- package/dist/types/contracts/handlers/delegate.d.ts +3 -3
- package/dist/types/contracts/handlers/helpers.d.ts +1 -1
- package/dist/types/contracts/handlers/index.d.ts +7 -7
- package/dist/types/contracts/handlers/registry.d.ts +1 -1
- package/dist/types/contracts/handlers/vhtlc.d.ts +3 -3
- package/dist/types/contracts/index.d.ts +14 -14
- package/dist/types/contracts/types.d.ts +3 -3
- package/dist/types/contracts/vtxoOwnership.d.ts +3 -3
- package/dist/types/extension/asset/assetGroup.d.ts +6 -6
- package/dist/types/extension/asset/assetId.d.ts +1 -1
- package/dist/types/extension/asset/assetInput.d.ts +2 -2
- package/dist/types/extension/asset/assetOutput.d.ts +1 -1
- package/dist/types/extension/asset/assetRef.d.ts +3 -3
- package/dist/types/extension/asset/index.d.ts +8 -8
- package/dist/types/extension/asset/metadata.d.ts +1 -1
- package/dist/types/extension/asset/packet.d.ts +2 -2
- package/dist/types/extension/index.d.ts +6 -6
- package/dist/types/forfeit.d.ts +1 -1
- package/dist/types/identity/descriptorProvider.d.ts +1 -1
- package/dist/types/identity/hdCapableIdentity.d.ts +3 -3
- package/dist/types/identity/index.d.ts +11 -11
- package/dist/types/identity/seedIdentity.d.ts +5 -5
- package/dist/types/identity/serialize.d.ts +1 -1
- package/dist/types/identity/singleKey.d.ts +3 -3
- package/dist/types/identity/staticDescriptorProvider.d.ts +3 -3
- package/dist/types/index.d.ts +57 -57
- package/dist/types/intent/index.d.ts +2 -2
- package/dist/types/musig2/index.d.ts +4 -4
- package/dist/types/providers/ark.d.ts +5 -5
- package/dist/types/providers/delegator.d.ts +2 -2
- package/dist/types/providers/electrum.d.ts +5 -5
- package/dist/types/providers/expoArk.d.ts +1 -1
- package/dist/types/providers/expoIndexer.d.ts +1 -1
- package/dist/types/providers/indexer.d.ts +1 -1
- package/dist/types/providers/onchain.d.ts +2 -2
- package/dist/types/repositories/contractRepository.d.ts +1 -1
- package/dist/types/repositories/inMemory/contractRepository.d.ts +2 -2
- package/dist/types/repositories/inMemory/walletRepository.d.ts +2 -2
- package/dist/types/repositories/index.d.ts +9 -9
- package/dist/types/repositories/indexedDB/contractRepository.d.ts +2 -2
- package/dist/types/repositories/indexedDB/db.d.ts +3 -3
- package/dist/types/repositories/indexedDB/walletRepository.d.ts +2 -2
- package/dist/types/repositories/migrations/contractRepositoryImpl.d.ts +3 -3
- package/dist/types/repositories/migrations/fromStorageAdapter.d.ts +2 -2
- package/dist/types/repositories/migrations/walletRepositoryImpl.d.ts +3 -3
- package/dist/types/repositories/realm/contractRepository.d.ts +3 -3
- package/dist/types/repositories/realm/index.d.ts +4 -4
- package/dist/types/repositories/realm/walletRepository.d.ts +3 -3
- package/dist/types/repositories/serialization.d.ts +11 -11
- package/dist/types/repositories/sqlite/contractRepository.d.ts +3 -3
- package/dist/types/repositories/sqlite/index.d.ts +3 -3
- package/dist/types/repositories/sqlite/walletRepository.d.ts +3 -3
- package/dist/types/repositories/walletRepository.d.ts +1 -1
- package/dist/types/script/address.d.ts +2 -2
- package/dist/types/script/base.d.ts +2 -2
- package/dist/types/script/default.d.ts +2 -2
- package/dist/types/script/delegate.d.ts +3 -3
- package/dist/types/script/vhtlc.d.ts +2 -2
- package/dist/types/storage/asyncStorage.d.ts +1 -1
- package/dist/types/storage/fileSystem.d.ts +1 -1
- package/dist/types/storage/inMemory.d.ts +1 -1
- package/dist/types/storage/indexedDB.d.ts +1 -1
- package/dist/types/storage/localStorage.d.ts +1 -1
- package/dist/types/tree/signingSession.d.ts +2 -2
- package/dist/types/tree/validation.d.ts +1 -1
- package/dist/types/utils/arkTransaction.d.ts +5 -5
- package/dist/types/utils/syncCursors.d.ts +1 -1
- package/dist/types/utils/timelock.d.ts +1 -1
- package/dist/types/utils/transaction.d.ts +2 -2
- package/dist/types/utils/transactionHistory.d.ts +1 -1
- package/dist/types/utils/txSizeEstimator.d.ts +1 -1
- package/dist/types/wallet/asset-manager.d.ts +3 -3
- package/dist/types/wallet/asset.d.ts +2 -2
- package/dist/types/wallet/batch.d.ts +2 -2
- package/dist/types/wallet/delegator.d.ts +5 -5
- package/dist/types/wallet/expo/background.d.ts +4 -4
- package/dist/types/wallet/expo/index.d.ts +4 -4
- package/dist/types/wallet/expo/wallet.d.ts +8 -8
- package/dist/types/wallet/hdDescriptorProvider.d.ts +4 -4
- package/dist/types/wallet/index.d.ts +29 -26
- package/dist/types/wallet/onchain.d.ts +6 -6
- package/dist/types/wallet/ramps.d.ts +2 -2
- package/dist/types/wallet/serviceWorker/wallet-message-handler.d.ts +7 -7
- package/dist/types/wallet/serviceWorker/wallet.d.ts +10 -10
- package/dist/types/wallet/unroll.d.ts +6 -6
- package/dist/types/wallet/utils.d.ts +5 -5
- package/dist/types/wallet/validation.d.ts +3 -3
- package/dist/types/wallet/vtxo-manager.d.ts +2 -2
- package/dist/types/wallet/wallet.d.ts +20 -20
- package/dist/types/worker/expo/asyncStorageTaskQueue.d.ts +1 -1
- package/dist/types/worker/expo/index.d.ts +7 -7
- package/dist/types/worker/expo/processors/contractPollProcessor.d.ts +1 -1
- package/dist/types/worker/expo/processors/index.d.ts +1 -1
- package/dist/types/worker/expo/taskRunner.d.ts +7 -7
- package/dist/types/worker/messageBus.d.ts +6 -6
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Transaction as BtcSignerTransaction } from "@scure/btc-signer";
|
|
2
|
-
import { TxOpts } from "@scure/btc-signer/transaction";
|
|
3
|
-
import { Bytes } from "@scure/btc-signer/utils";
|
|
2
|
+
import { TxOpts } from "@scure/btc-signer/transaction.js";
|
|
3
|
+
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
4
4
|
/**
|
|
5
5
|
* Transaction is a wrapper around the @scure/btc-signer Transaction class.
|
|
6
6
|
* It adds the Arkade protocol specific options to the transaction.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AssetDetails, BurnParams, IAssetManager, IReadonlyAssetManager, IssuanceParams, IssuanceResult, ReissuanceParams } from ".";
|
|
2
|
-
import { IndexerProvider } from "../providers/indexer";
|
|
3
|
-
import { Wallet } from "./wallet";
|
|
1
|
+
import { AssetDetails, BurnParams, IAssetManager, IReadonlyAssetManager, IssuanceParams, IssuanceResult, ReissuanceParams } from "./index.js";
|
|
2
|
+
import { IndexerProvider } from "../providers/indexer.js";
|
|
3
|
+
import { Wallet } from "./wallet.js";
|
|
4
4
|
export declare class ReadonlyAssetManager implements IReadonlyAssetManager {
|
|
5
5
|
readonly indexer: IndexerProvider;
|
|
6
6
|
constructor(indexer: IndexerProvider);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Packet } from "../extension/asset";
|
|
2
|
-
import { Asset, ExtendedVirtualCoin, Recipient, VirtualCoin } from "./index";
|
|
1
|
+
import { Packet } from "../extension/asset/index.js";
|
|
2
|
+
import { Asset, ExtendedVirtualCoin, Recipient, VirtualCoin } from "./index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Creates an asset packet from asset inputs and receivers.
|
|
5
5
|
* Groups inputs and outputs by asset ID and creates the Packet object
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BatchStartedEvent, BatchFinalizedEvent, BatchFailedEvent, TreeTxEvent, TreeSignatureEvent, TreeSigningStartedEvent, TreeNoncesEvent, BatchFinalizationEvent, SettlementEvent } from "../providers/ark";
|
|
2
|
-
import { TxTree } from "../tree/txTree";
|
|
1
|
+
import type { BatchStartedEvent, BatchFinalizedEvent, BatchFailedEvent, TreeTxEvent, TreeSignatureEvent, TreeSigningStartedEvent, TreeNoncesEvent, BatchFinalizationEvent, SettlementEvent } from "../providers/ark.js";
|
|
2
|
+
import { TxTree } from "../tree/txTree.js";
|
|
3
3
|
/**
|
|
4
4
|
* Batch namespace provides utilities for joining and processing batch session.
|
|
5
5
|
* The batch settlement process involves multiple events, this namespace provides abstractions and types to handle them.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TransactionOutput } from "@scure/btc-signer/psbt";
|
|
2
|
-
import { ArkProvider, DelegateInfo, Identity, Outpoint } from "
|
|
3
|
-
import { ContractVtxo } from "../contracts/types";
|
|
4
|
-
import { DelegatorProvider } from "../providers/delegator";
|
|
5
|
-
import { Bytes } from "@scure/btc-signer/utils";
|
|
1
|
+
import { TransactionOutput } from "@scure/btc-signer/psbt.js";
|
|
2
|
+
import { ArkProvider, DelegateInfo, Identity, Outpoint } from "../index.js";
|
|
3
|
+
import { ContractVtxo } from "../contracts/types.js";
|
|
4
|
+
import { DelegatorProvider } from "../providers/delegator.js";
|
|
5
|
+
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
6
6
|
export interface IDelegatorManager {
|
|
7
7
|
/**
|
|
8
8
|
* Delegate virtual outputs to the remote delegation service.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { WalletRepository } from "../../repositories/walletRepository";
|
|
2
|
-
import type { ContractRepository } from "../../repositories/contractRepository";
|
|
3
|
-
import type { AsyncStorageTaskQueue } from "../../worker/expo/asyncStorageTaskQueue";
|
|
4
|
-
import type { TaskProcessor } from "../../worker/expo/taskRunner";
|
|
1
|
+
import type { WalletRepository } from "../../repositories/walletRepository.js";
|
|
2
|
+
import type { ContractRepository } from "../../repositories/contractRepository.js";
|
|
3
|
+
import type { AsyncStorageTaskQueue } from "../../worker/expo/asyncStorageTaskQueue.js";
|
|
4
|
+
import type { TaskProcessor } from "../../worker/expo/taskRunner.js";
|
|
5
5
|
/**
|
|
6
6
|
* Wallet parameters persisted by @see ExpoWallet.setup and read
|
|
7
7
|
* by the background handler to reconstruct providers and `extendVtxo`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ExpoWallet } from "./wallet";
|
|
2
|
-
export type { ExpoWalletConfig, ExpoBackgroundConfig } from "./wallet";
|
|
3
|
-
export { defineExpoBackgroundTask, registerExpoBackgroundTask, unregisterExpoBackgroundTask, } from "./background";
|
|
4
|
-
export type { DefineBackgroundTaskOptions, PersistedBackgroundConfig, } from "./background";
|
|
1
|
+
export { ExpoWallet } from "./wallet.js";
|
|
2
|
+
export type { ExpoWalletConfig, ExpoBackgroundConfig } from "./wallet.js";
|
|
3
|
+
export { defineExpoBackgroundTask, registerExpoBackgroundTask, unregisterExpoBackgroundTask, } from "./background.js";
|
|
4
|
+
export type { DefineBackgroundTaskOptions, PersistedBackgroundConfig, } from "./background.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Wallet } from "../wallet";
|
|
2
|
-
import type { IWallet, IAssetManager, WalletBalance, WalletConfig, SendBitcoinParams, SettleParams, GetVtxosFilter, ArkTransaction, ExtendedCoin, ExtendedVirtualCoin, Recipient } from "
|
|
3
|
-
import type { SettlementEvent } from "../../providers/ark";
|
|
4
|
-
import type { Identity } from "../../identity";
|
|
5
|
-
import type { IContractManager } from "../../contracts/contractManager";
|
|
6
|
-
import type { IDelegatorManager } from "../delegator";
|
|
7
|
-
import type { TaskQueue } from "../../worker/expo/taskQueue";
|
|
8
|
-
import type { TaskProcessor } from "../../worker/expo/taskRunner";
|
|
1
|
+
import { Wallet } from "../wallet.js";
|
|
2
|
+
import type { IWallet, IAssetManager, WalletBalance, WalletConfig, SendBitcoinParams, SettleParams, GetVtxosFilter, ArkTransaction, ExtendedCoin, ExtendedVirtualCoin, Recipient } from "../index.js";
|
|
3
|
+
import type { SettlementEvent } from "../../providers/ark.js";
|
|
4
|
+
import type { Identity } from "../../identity/index.js";
|
|
5
|
+
import type { IContractManager } from "../../contracts/contractManager.js";
|
|
6
|
+
import type { IDelegatorManager } from "../delegator.js";
|
|
7
|
+
import type { TaskQueue } from "../../worker/expo/taskQueue.js";
|
|
8
|
+
import type { TaskProcessor } from "../../worker/expo/taskRunner.js";
|
|
9
9
|
/**
|
|
10
10
|
* Background processing configuration for @see ExpoWallet.
|
|
11
11
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DescriptorProvider, DescriptorSigningRequest } from "../identity/descriptorProvider";
|
|
2
|
-
import { HDCapableIdentity } from "../identity/hdCapableIdentity";
|
|
3
|
-
import { WalletRepository } from "../repositories/walletRepository";
|
|
4
|
-
import { Transaction } from "../utils/transaction";
|
|
1
|
+
import { DescriptorProvider, DescriptorSigningRequest } from "../identity/descriptorProvider.js";
|
|
2
|
+
import { HDCapableIdentity } from "../identity/hdCapableIdentity.js";
|
|
3
|
+
import { WalletRepository } from "../repositories/walletRepository.js";
|
|
4
|
+
import { Transaction } from "../utils/transaction.js";
|
|
5
5
|
/**
|
|
6
6
|
* HD-wallet {@link DescriptorProvider} that allocates a fresh signing
|
|
7
7
|
* descriptor on every call. The provider holds no notion of "current" — it
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
2
|
-
import { ArkProvider, Output, SettlementEvent } from "../providers/ark";
|
|
3
|
-
import { Identity, ReadonlyIdentity } from "../identity";
|
|
4
|
-
import { RelativeTimelock } from "../script/tapscript";
|
|
5
|
-
import { EncodedVtxoScript, TapLeafScript } from "../script/base";
|
|
6
|
-
import { RenewalConfig, SettlementConfig } from "./vtxo-manager";
|
|
7
|
-
import { IndexerProvider } from "../providers/indexer";
|
|
8
|
-
import { OnchainProvider } from "../providers/onchain";
|
|
9
|
-
import { ContractWatcherConfig } from "../contracts/contractWatcher";
|
|
10
|
-
import { ContractRepository, WalletRepository } from "../repositories";
|
|
11
|
-
import { IContractManager } from "../contracts/contractManager";
|
|
12
|
-
import { IDelegatorManager } from "./delegator";
|
|
13
|
-
import { DelegatorProvider } from "../providers/delegator";
|
|
2
|
+
import { ArkProvider, Output, SettlementEvent } from "../providers/ark.js";
|
|
3
|
+
import { Identity, ReadonlyIdentity } from "../identity/index.js";
|
|
4
|
+
import { RelativeTimelock } from "../script/tapscript.js";
|
|
5
|
+
import { EncodedVtxoScript, TapLeafScript } from "../script/base.js";
|
|
6
|
+
import { RenewalConfig, SettlementConfig } from "./vtxo-manager.js";
|
|
7
|
+
import { IndexerProvider } from "../providers/indexer.js";
|
|
8
|
+
import { OnchainProvider } from "../providers/onchain.js";
|
|
9
|
+
import { ContractWatcherConfig } from "../contracts/contractWatcher.js";
|
|
10
|
+
import { ContractRepository, WalletRepository } from "../repositories/index.js";
|
|
11
|
+
import { IContractManager } from "../contracts/contractManager.js";
|
|
12
|
+
import { IDelegatorManager } from "./delegator.js";
|
|
13
|
+
import { DelegatorProvider } from "../providers/delegator.js";
|
|
14
14
|
/** Defaults */
|
|
15
15
|
export declare const DEFAULT_ARKADE_SERVER_URL: "https://arkade.computer";
|
|
16
|
-
export declare const DEFAULT_ARKADE_HRP
|
|
17
|
-
export declare const DEFAULT_NETWORK_NAME
|
|
16
|
+
export declare const DEFAULT_ARKADE_HRP: "ark";
|
|
17
|
+
export declare const DEFAULT_NETWORK_NAME: "bitcoin";
|
|
18
18
|
/**
|
|
19
19
|
* Base configuration options shared by all wallet types.
|
|
20
20
|
*
|
|
@@ -472,24 +472,27 @@ export interface Coin extends Outpoint {
|
|
|
472
472
|
* @see VirtualStatus
|
|
473
473
|
*/
|
|
474
474
|
export interface VirtualCoin extends Coin {
|
|
475
|
-
/** Virtual output status */
|
|
476
|
-
virtualStatus: VirtualStatus;
|
|
477
|
-
/** Transaction id that spent this virtual output, when known. */
|
|
478
|
-
spentBy?: string;
|
|
479
|
-
/** Settlement transaction associated with this virtual output, when known. */
|
|
480
|
-
settledBy?: string;
|
|
481
|
-
/** Arkade transaction id that created or spent this virtual output, when known. */
|
|
482
|
-
arkTxId?: string;
|
|
483
475
|
/** Creation time of the virtual output. */
|
|
484
476
|
createdAt: Date;
|
|
485
|
-
/**
|
|
477
|
+
/** The scriptPubKey (hex) locking this virtual output, as returned by the indexer. */
|
|
478
|
+
script: string;
|
|
479
|
+
/** Whether this virtual output has been broadcasted onchain via an unroll (unilateral exit). */
|
|
486
480
|
isUnrolled: boolean;
|
|
487
|
-
/**
|
|
481
|
+
/**
|
|
482
|
+
* Whether this virtual output is already spent (boolean helper for `spentBy`).
|
|
483
|
+
* This is not set to true if the virtual output is unrolled or swept, only when it's spent offchain.
|
|
484
|
+
*/
|
|
488
485
|
isSpent?: boolean;
|
|
486
|
+
/** ID of the onchain commitment transaction that settled this output, if applicable. */
|
|
487
|
+
settledBy?: string;
|
|
488
|
+
/** ID of the offchain checkpoint transaction that spent this output, if applicable. */
|
|
489
|
+
spentBy?: string;
|
|
490
|
+
/** ID of the offchain Arkade transaction that spent the above checkpoint output, if applicable. */
|
|
491
|
+
arkTxId?: string;
|
|
492
|
+
/** Virtual output status */
|
|
493
|
+
virtualStatus: VirtualStatus;
|
|
489
494
|
/** Assets carried by this virtual output, if any. */
|
|
490
495
|
assets?: Asset[];
|
|
491
|
-
/** The scriptPubKey (hex) locking this virtual output, as returned by the indexer. */
|
|
492
|
-
script: string;
|
|
493
496
|
}
|
|
494
497
|
/** Wallet transaction direction. */
|
|
495
498
|
export declare enum TxType {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { P2TR } from "@scure/btc-signer/payment.js";
|
|
2
|
-
import { Coin, SendBitcoinParams } from ".";
|
|
3
|
-
import { Identity } from "../identity";
|
|
4
|
-
import { Network, NetworkName } from "../networks";
|
|
5
|
-
import { OnchainProvider } from "../providers/onchain";
|
|
6
|
-
import { AnchorBumper } from "../utils/anchor";
|
|
7
|
-
import { Transaction } from "../utils/transaction";
|
|
2
|
+
import { Coin, SendBitcoinParams } from "./index.js";
|
|
3
|
+
import { Identity } from "../identity/index.js";
|
|
4
|
+
import { Network, NetworkName } from "../networks.js";
|
|
5
|
+
import { OnchainProvider } from "../providers/onchain.js";
|
|
6
|
+
import { AnchorBumper } from "../utils/anchor.js";
|
|
7
|
+
import { Transaction } from "../utils/transaction.js";
|
|
8
8
|
/**
|
|
9
9
|
* Onchain Bitcoin wallet implementation for traditional Bitcoin transactions.
|
|
10
10
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExtendedCoin, IWallet } from ".";
|
|
2
|
-
import { FeeInfo, SettlementEvent } from "../providers/ark";
|
|
1
|
+
import { ExtendedCoin, IWallet } from "./index.js";
|
|
2
|
+
import { FeeInfo, SettlementEvent } from "../providers/ark.js";
|
|
3
3
|
/**
|
|
4
4
|
* Ramps is a class wrapping `settle` method to provide a more convenient interface for onboarding and offboarding operations.
|
|
5
5
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SettlementEvent } from "../../providers/ark";
|
|
2
|
-
import type { Contract, ContractEvent, ContractWithVtxos, GetContractsFilter, PathSelection } from "../../contracts";
|
|
3
|
-
import type { CreateContractParams, GetAllSpendingPathsOptions, GetSpendablePathsOptions } from "../../contracts/contractManager";
|
|
4
|
-
import { ArkTransaction, AssetDetails, BurnParams, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, IssuanceParams, IssuanceResult, IWallet, Recipient, ReissuanceParams, SendBitcoinParams, SettleParams, VirtualCoin, WalletBalance } from "../index";
|
|
5
|
-
import { DelegateInfo } from "../../providers/delegator";
|
|
6
|
-
import { MessageHandler, RequestEnvelope, ResponseEnvelope } from "../../worker/messageBus";
|
|
7
|
-
import { Transaction } from "../../utils/transaction";
|
|
1
|
+
import { SettlementEvent } from "../../providers/ark.js";
|
|
2
|
+
import type { Contract, ContractEvent, ContractWithVtxos, GetContractsFilter, PathSelection } from "../../contracts/index.js";
|
|
3
|
+
import type { CreateContractParams, GetAllSpendingPathsOptions, GetSpendablePathsOptions } from "../../contracts/contractManager.js";
|
|
4
|
+
import { ArkTransaction, AssetDetails, BurnParams, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, IssuanceParams, IssuanceResult, IWallet, Recipient, ReissuanceParams, SendBitcoinParams, SettleParams, VirtualCoin, WalletBalance } from "../index.js";
|
|
5
|
+
import { DelegateInfo } from "../../providers/delegator.js";
|
|
6
|
+
import { MessageHandler, RequestEnvelope, ResponseEnvelope } from "../../worker/messageBus.js";
|
|
7
|
+
import { Transaction } from "../../utils/transaction.js";
|
|
8
8
|
export declare class WalletNotInitializedError extends Error {
|
|
9
9
|
constructor();
|
|
10
10
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IWallet, WalletBalance, SendBitcoinParams, SettleParams, ArkTransaction, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, StorageConfig, IReadonlyWallet, IReadonlyAssetManager, IAssetManager, Recipient } from "
|
|
2
|
-
import { SettlementEvent } from "../../providers/ark";
|
|
3
|
-
import { Identity, ReadonlyIdentity, type SerializedIdentity, type LegacySerializedIdentity } from "../../identity";
|
|
4
|
-
import { WalletRepository } from "../../repositories/walletRepository";
|
|
5
|
-
import { ContractRepository } from "../../repositories/contractRepository";
|
|
6
|
-
import { RequestInitWallet, ResponseGetStatus, WalletUpdaterRequest, WalletUpdaterResponse } from "./wallet-message-handler";
|
|
7
|
-
import type { IContractManager } from "../../contracts/contractManager";
|
|
8
|
-
import type { IDelegatorManager } from "../delegator";
|
|
9
|
-
import type { IVtxoManager, SettlementConfig } from "../vtxo-manager";
|
|
10
|
-
import type { ContractWatcherConfig } from "../../contracts/contractWatcher";
|
|
1
|
+
import { IWallet, WalletBalance, SendBitcoinParams, SettleParams, ArkTransaction, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, StorageConfig, IReadonlyWallet, IReadonlyAssetManager, IAssetManager, Recipient } from "../index.js";
|
|
2
|
+
import { SettlementEvent } from "../../providers/ark.js";
|
|
3
|
+
import { Identity, ReadonlyIdentity, type SerializedIdentity, type LegacySerializedIdentity } from "../../identity/index.js";
|
|
4
|
+
import { WalletRepository } from "../../repositories/walletRepository.js";
|
|
5
|
+
import { ContractRepository } from "../../repositories/contractRepository.js";
|
|
6
|
+
import { RequestInitWallet, ResponseGetStatus, WalletUpdaterRequest, WalletUpdaterResponse } from "./wallet-message-handler.js";
|
|
7
|
+
import type { IContractManager } from "../../contracts/contractManager.js";
|
|
8
|
+
import type { IDelegatorManager } from "../delegator.js";
|
|
9
|
+
import type { IVtxoManager, SettlementConfig } from "../vtxo-manager.js";
|
|
10
|
+
import type { ContractWatcherConfig } from "../../contracts/contractWatcher.js";
|
|
11
11
|
type RequestType = WalletUpdaterRequest["type"];
|
|
12
12
|
export type MessageTimeouts = Partial<Record<RequestType, number>>;
|
|
13
13
|
export declare const DEFAULT_MESSAGE_TIMEOUTS: Readonly<Record<RequestType, number>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ChainTx, IndexerProvider } from "../providers/indexer";
|
|
2
|
-
import { AnchorBumper } from "../utils/anchor";
|
|
3
|
-
import { OnchainProvider } from "../providers/onchain";
|
|
4
|
-
import { Outpoint } from ".";
|
|
5
|
-
import { Wallet } from "./wallet";
|
|
6
|
-
import { Transaction } from "../utils/transaction";
|
|
1
|
+
import { ChainTx, IndexerProvider } from "../providers/indexer.js";
|
|
2
|
+
import { AnchorBumper } from "../utils/anchor.js";
|
|
3
|
+
import { OnchainProvider } from "../providers/onchain.js";
|
|
4
|
+
import { Outpoint } from "./index.js";
|
|
5
|
+
import { Wallet } from "./wallet.js";
|
|
6
|
+
import { Transaction } from "../utils/transaction.js";
|
|
7
7
|
export declare namespace Unroll {
|
|
8
8
|
enum StepType {
|
|
9
9
|
UNROLL = 0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Recipient } from ".";
|
|
2
|
-
import { type Coin, type ExtendedCoin, type ExtendedVirtualCoin, type VirtualCoin } from "
|
|
3
|
-
import type { Contract } from "../contracts/types";
|
|
4
|
-
import { ReadonlyWallet } from "./wallet";
|
|
5
|
-
import { Bytes } from "@scure/btc-signer/utils";
|
|
1
|
+
import { Recipient } from "./index.js";
|
|
2
|
+
import { type Coin, type ExtendedCoin, type ExtendedVirtualCoin, type VirtualCoin } from "../index.js";
|
|
3
|
+
import type { Contract } from "../contracts/types.js";
|
|
4
|
+
import { ReadonlyWallet } from "./wallet.js";
|
|
5
|
+
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
6
6
|
export declare const DUST_AMOUNT = 546;
|
|
7
7
|
export declare function extendCoin(wallet: {
|
|
8
8
|
boardingTapscript: ReadonlyWallet["boardingTapscript"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Recipient } from ".";
|
|
2
|
-
import { Transaction } from "../utils/transaction";
|
|
3
|
-
import type { Network } from "../networks";
|
|
1
|
+
import { Recipient } from "./index.js";
|
|
2
|
+
import { Transaction } from "../utils/transaction.js";
|
|
3
|
+
import type { Network } from "../networks.js";
|
|
4
4
|
export declare const ErrOffchainOutputNotFound: (address: string) => Error;
|
|
5
5
|
export declare const ErrInvalidAssetOutputAmount: (got: bigint, want: bigint, assetId: string) => Error;
|
|
6
6
|
export declare const ErrAssetGroupNotFound: (assetId: string) => Error;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExtendedCoin, ExtendedVirtualCoin, IWallet } from ".";
|
|
2
|
-
import { SettlementEvent } from "../providers/ark";
|
|
1
|
+
import { ExtendedCoin, ExtendedVirtualCoin, IWallet } from "./index.js";
|
|
2
|
+
import { SettlementEvent } from "../providers/ark.js";
|
|
3
3
|
/** Default renewal threshold in seconds (3 days). */
|
|
4
4
|
export declare const DEFAULT_THRESHOLD_SECONDS: number;
|
|
5
5
|
/**
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { TransactionOutput } from "@scure/btc-signer/psbt.js";
|
|
2
2
|
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
3
|
-
import { ArkAddress } from "../script/address";
|
|
4
|
-
import { DefaultVtxo } from "../script/default";
|
|
5
|
-
import { Network, NetworkName } from "../networks";
|
|
6
|
-
import { OnchainProvider } from "../providers/onchain";
|
|
7
|
-
import { ArkProvider, SettlementEvent, SignedIntent } from "../providers/ark";
|
|
8
|
-
import { SignerSession } from "../tree/signingSession";
|
|
9
|
-
import { Identity, ReadonlyIdentity } from "../identity";
|
|
10
|
-
import { ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, IAssetManager, IReadonlyAssetManager, IReadonlyWallet, IWallet, ReadonlyWalletConfig, Recipient, SendBitcoinParams, SettleParams, WalletBalance, WalletConfig } from ".";
|
|
11
|
-
import { CSVMultisigTapscript, RelativeTimelock } from "../script/tapscript";
|
|
12
|
-
import { SettlementConfig, VtxoManager } from "./vtxo-manager";
|
|
13
|
-
import { Intent } from "../intent";
|
|
14
|
-
import { IndexerProvider } from "../providers/indexer";
|
|
15
|
-
import { WalletRepository } from "../repositories/walletRepository";
|
|
16
|
-
import { ContractRepository } from "../repositories/contractRepository";
|
|
17
|
-
import { Batch } from "./batch";
|
|
18
|
-
import { DelegatorProvider } from "../providers/delegator";
|
|
19
|
-
import { DelegateVtxo } from "../script/delegate";
|
|
20
|
-
import { IDelegatorManager } from "./delegator";
|
|
21
|
-
import { ContractManager } from "../contracts/contractManager";
|
|
3
|
+
import { ArkAddress } from "../script/address.js";
|
|
4
|
+
import { DefaultVtxo } from "../script/default.js";
|
|
5
|
+
import { Network, NetworkName } from "../networks.js";
|
|
6
|
+
import { OnchainProvider } from "../providers/onchain.js";
|
|
7
|
+
import { ArkProvider, SettlementEvent, SignedIntent } from "../providers/ark.js";
|
|
8
|
+
import { SignerSession } from "../tree/signingSession.js";
|
|
9
|
+
import { Identity, ReadonlyIdentity } from "../identity/index.js";
|
|
10
|
+
import { ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, IAssetManager, IReadonlyAssetManager, IReadonlyWallet, IWallet, ReadonlyWalletConfig, Recipient, SendBitcoinParams, SettleParams, WalletBalance, WalletConfig } from "./index.js";
|
|
11
|
+
import { CSVMultisigTapscript, RelativeTimelock } from "../script/tapscript.js";
|
|
12
|
+
import { SettlementConfig, VtxoManager } from "./vtxo-manager.js";
|
|
13
|
+
import { Intent } from "../intent/index.js";
|
|
14
|
+
import { IndexerProvider } from "../providers/indexer.js";
|
|
15
|
+
import { WalletRepository } from "../repositories/walletRepository.js";
|
|
16
|
+
import { ContractRepository } from "../repositories/contractRepository.js";
|
|
17
|
+
import { Batch } from "./batch.js";
|
|
18
|
+
import { DelegatorProvider } from "../providers/delegator.js";
|
|
19
|
+
import { DelegateVtxo } from "../script/delegate.js";
|
|
20
|
+
import { IDelegatorManager } from "./delegator.js";
|
|
21
|
+
import { ContractManager } from "../contracts/contractManager.js";
|
|
22
22
|
export declare const getArkadeServerUrl: ({ arkServerUrl, }: {
|
|
23
23
|
arkServerUrl?: string;
|
|
24
24
|
}) => string;
|
|
@@ -67,7 +67,7 @@ export declare class ReadonlyWallet implements IReadonlyWallet {
|
|
|
67
67
|
dustAmount: bigint;
|
|
68
68
|
walletRepository: WalletRepository;
|
|
69
69
|
contractRepository: ContractRepository;
|
|
70
|
-
info: import("../providers/ark").ArkInfo;
|
|
70
|
+
info: import("../providers/ark.js").ArkInfo;
|
|
71
71
|
delegatorProvider: DelegatorProvider | undefined;
|
|
72
72
|
walletContractTimelocks: RelativeTimelock[];
|
|
73
73
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type { TaskItem, TaskResult, TaskQueue } from "./taskQueue";
|
|
2
|
-
export { InMemoryTaskQueue } from "./taskQueue";
|
|
3
|
-
export type { AsyncStorageLike } from "./asyncStorageTaskQueue";
|
|
4
|
-
export { AsyncStorageTaskQueue } from "./asyncStorageTaskQueue";
|
|
5
|
-
export type { TaskProcessor, TaskDependencies, CreateTaskDependenciesOptions, } from "./taskRunner";
|
|
6
|
-
export { runTasks, createTaskDependencies } from "./taskRunner";
|
|
7
|
-
export { contractPollProcessor, CONTRACT_POLL_TASK_TYPE } from "./processors";
|
|
1
|
+
export type { TaskItem, TaskResult, TaskQueue } from "./taskQueue.js";
|
|
2
|
+
export { InMemoryTaskQueue } from "./taskQueue.js";
|
|
3
|
+
export type { AsyncStorageLike } from "./asyncStorageTaskQueue.js";
|
|
4
|
+
export { AsyncStorageTaskQueue } from "./asyncStorageTaskQueue.js";
|
|
5
|
+
export type { TaskProcessor, TaskDependencies, CreateTaskDependenciesOptions, } from "./taskRunner.js";
|
|
6
|
+
export { runTasks, createTaskDependencies } from "./taskRunner.js";
|
|
7
|
+
export { contractPollProcessor, CONTRACT_POLL_TASK_TYPE } from "./processors/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { contractPollProcessor, CONTRACT_POLL_TASK_TYPE, } from "./contractPollProcessor";
|
|
1
|
+
export { contractPollProcessor, CONTRACT_POLL_TASK_TYPE, } from "./contractPollProcessor.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { TaskItem, TaskResult, TaskQueue } from "./taskQueue";
|
|
2
|
-
import type { WalletRepository } from "../../repositories/walletRepository";
|
|
3
|
-
import type { ContractRepository } from "../../repositories/contractRepository";
|
|
4
|
-
import type { IndexerProvider } from "../../providers/indexer";
|
|
5
|
-
import type { ArkProvider } from "../../providers/ark";
|
|
6
|
-
import type { ExtendedVirtualCoin, VirtualCoin } from "../../wallet";
|
|
7
|
-
import type { Contract } from "../../contracts/types";
|
|
1
|
+
import type { TaskItem, TaskResult, TaskQueue } from "./taskQueue.js";
|
|
2
|
+
import type { WalletRepository } from "../../repositories/walletRepository.js";
|
|
3
|
+
import type { ContractRepository } from "../../repositories/contractRepository.js";
|
|
4
|
+
import type { IndexerProvider } from "../../providers/indexer.js";
|
|
5
|
+
import type { ArkProvider } from "../../providers/ark.js";
|
|
6
|
+
import type { ExtendedVirtualCoin, VirtualCoin } from "../../wallet/index.js";
|
|
7
|
+
import type { Contract } from "../../contracts/types.js";
|
|
8
8
|
/**
|
|
9
9
|
* Shared dependencies injected into every processor at runtime.
|
|
10
10
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ArkProvider } from "../providers/ark";
|
|
2
|
-
import { type SerializedIdentity, type LegacySerializedIdentity } from "../identity";
|
|
3
|
-
import { ReadonlyWallet, Wallet } from "../wallet/wallet";
|
|
4
|
-
import type { SettlementConfig } from "../wallet/vtxo-manager";
|
|
5
|
-
import type { ContractWatcherConfig } from "../contracts/contractWatcher";
|
|
6
|
-
import { ContractRepository, WalletRepository } from "../repositories";
|
|
1
|
+
import { ArkProvider } from "../providers/ark.js";
|
|
2
|
+
import { type SerializedIdentity, type LegacySerializedIdentity } from "../identity/index.js";
|
|
3
|
+
import { ReadonlyWallet, Wallet } from "../wallet/wallet.js";
|
|
4
|
+
import type { SettlementConfig } from "../wallet/vtxo-manager.js";
|
|
5
|
+
import type { ContractWatcherConfig } from "../contracts/contractWatcher.js";
|
|
6
|
+
import { ContractRepository, WalletRepository } from "../repositories/index.js";
|
|
7
7
|
export type RequestEnvelope = {
|
|
8
8
|
tag: string;
|
|
9
9
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkade-os/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.26",
|
|
4
4
|
"description": "TypeScript SDK for building Bitcoin wallets using the Arkade protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"pnpm": ">=10.25.0 <11"
|
|
154
154
|
},
|
|
155
155
|
"scripts": {
|
|
156
|
-
"build": "rimraf dist && pnpm run build:esm && pnpm run build:expo:esm &&
|
|
156
|
+
"build": "rimraf dist && pnpm run build:esm && pnpm run build:expo:esm && pnpm run build:cjs && pnpm run build:expo:cjs && pnpm run build:types && pnpm run build:expo:types && node scripts/add-extensions.js && node scripts/generate-package-files.js",
|
|
157
157
|
"build:esm": "tsc -p tsconfig.esm.json --outDir dist/esm",
|
|
158
158
|
"build:cjs": "tsc -p tsconfig.cjs.json --outDir dist/cjs",
|
|
159
159
|
"build:types": "tsc -p tsconfig.json --outDir dist/types --emitDeclarationOnly",
|