@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
package/dist/types/index.d.ts
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { Transaction } from "./utils/transaction";
|
|
2
|
-
import { SingleKey, ReadonlySingleKey } from "./identity/singleKey";
|
|
3
|
-
import { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity } from "./identity/seedIdentity";
|
|
4
|
-
import type { SeedIdentityOptions, MnemonicOptions, NetworkOptions, DescriptorOptions } from "./identity/seedIdentity";
|
|
5
|
-
import { Identity, ReadonlyIdentity, BatchSignableIdentity, SignRequest, isBatchSignable } from "./identity";
|
|
6
|
-
import { ArkAddress } from "./script/address";
|
|
7
|
-
import { VHTLC } from "./script/vhtlc";
|
|
8
|
-
import { DefaultVtxo } from "./script/default";
|
|
9
|
-
import { DelegateVtxo } from "./script/delegate";
|
|
10
|
-
import { MessageHandler, RequestEnvelope, ResponseEnvelope, MessageBus } from "./worker/messageBus";
|
|
11
|
-
import { VtxoScript, EncodedVtxoScript, TapLeafScript, TapTreeCoder, getSequence } from "./script/base";
|
|
12
|
-
import { TxType, IWallet, IReadonlyWallet, BaseWalletConfig, WalletConfig, ReadonlyWalletConfig, ProviderClass, ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, WalletBalance, SendBitcoinParams, SettleParams, Status, VirtualStatus, Outpoint, VirtualCoin, TxKey, GetVtxosFilter, TapLeaves, StorageConfig, isSpendable, isSubdust, isRecoverable, isExpired, Asset, Recipient, IssuanceParams, IssuanceResult, ReissuanceParams, BurnParams, AssetDetails, AssetMetadata, KnownMetadata } from "./wallet";
|
|
13
|
-
import { Batch } from "./wallet/batch";
|
|
14
|
-
import { Wallet, ReadonlyWallet, waitForIncomingFunds, IncomingFunds } from "./wallet/wallet";
|
|
15
|
-
import { TxTree, TxTreeNode } from "./tree/txTree";
|
|
16
|
-
import { SignerSession, TreeNonces, TreePartialSigs } from "./tree/signingSession";
|
|
17
|
-
import { Ramps } from "./wallet/ramps";
|
|
18
|
-
import { HDDescriptorProvider } from "./wallet/hdDescriptorProvider";
|
|
19
|
-
import { isVtxoExpiringSoon, VtxoManager } from "./wallet/vtxo-manager";
|
|
20
|
-
import type { IVtxoManager, SettlementConfig } from "./wallet/vtxo-manager";
|
|
21
|
-
import { ServiceWorkerWallet, ServiceWorkerReadonlyWallet, DEFAULT_MESSAGE_TIMEOUTS } from "./wallet/serviceWorker/wallet";
|
|
22
|
-
import type { MessageTimeouts } from "./wallet/serviceWorker/wallet";
|
|
23
|
-
import { OnchainWallet } from "./wallet/onchain";
|
|
24
|
-
import { setupServiceWorker } from "./worker/browser/utils";
|
|
25
|
-
import { ESPLORA_URL, EsploraProvider, OnchainProvider, ExplorerTransaction } from "./providers/onchain";
|
|
26
|
-
import { ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ElectrumOnchainProvider, WsElectrumChainSource } from "./providers/electrum";
|
|
27
|
-
import type { TransactionHistory as ElectrumTransactionHistory, BlockHeader as ElectrumBlockHeader, Unspent as ElectrumUnspent } from "./providers/electrum";
|
|
28
|
-
import { RestArkProvider, ArkProvider, SettlementEvent, SettlementEventType, ArkInfo, SignedIntent, Output, TxNotification, BatchFinalizationEvent, BatchFinalizedEvent, BatchFailedEvent, TreeSigningStartedEvent, TreeNoncesEvent, BatchStartedEvent, TreeTxEvent, TreeSignatureEvent, ScheduledSession, FeeInfo } from "./providers/ark";
|
|
29
|
-
import { DelegatorProvider, DelegateInfo, DelegateOptions, RestDelegatorProvider } from "./providers/delegator";
|
|
30
|
-
import { CLTVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, CSVMultisigTapscript, decodeTapscript, MultisigTapscript, TapscriptType, ArkTapscript, RelativeTimelock } from "./script/tapscript";
|
|
31
|
-
import { hasBoardingTxExpired, buildOffchainTx, verifyTapscriptSignatures, ArkTxInput, OffchainTx, combineTapscriptSigs, isValidArkAddress } from "./utils/arkTransaction";
|
|
32
|
-
import { VtxoTaprootTree, ConditionWitness, getArkPsbtFields, setArkPsbtField, ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CosignerPublicKey, VtxoTreeExpiry } from "./utils/unknownFields";
|
|
33
|
-
import { Intent } from "./intent";
|
|
34
|
-
import { BIP322 } from "./bip322";
|
|
35
|
-
import { ArkNote } from "./arknote";
|
|
36
|
-
import { networks, Network, NetworkName } from "./networks";
|
|
37
|
-
import { RestIndexerProvider, IndexerProvider, IndexerTxType, ChainTxType, PageResponse, BatchInfo, ChainTx, CommitmentTx, TxHistoryRecord, VtxoChain, Tx, Vtxo, PaginationOptions, SubscriptionResponse, SubscriptionHeartbeat, SubscriptionEvent } from "./providers/indexer";
|
|
38
|
-
import { Nonces } from "./musig2/nonces";
|
|
39
|
-
import { PartialSig } from "./musig2/sign";
|
|
40
|
-
import { AnchorBumper, P2A } from "./utils/anchor";
|
|
41
|
-
import { TxWeightEstimator, type VSize } from "./utils/txSizeEstimator";
|
|
42
|
-
import { Unroll } from "./wallet/unroll";
|
|
43
|
-
import { ArkError, maybeArkError } from "./providers/errors";
|
|
44
|
-
import { validateVtxoTxGraph, validateConnectorsTxGraph } from "./tree/validation";
|
|
45
|
-
import { buildForfeitTx } from "./forfeit";
|
|
46
|
-
import { IndexedDBWalletRepository, IndexedDBContractRepository, InMemoryWalletRepository, InMemoryContractRepository, MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, WalletRepositoryImpl, ContractRepositoryImpl, WalletRepository, ContractRepository } from "./repositories";
|
|
47
|
-
import type { MigrationStatus } from "./repositories";
|
|
48
|
-
import { DelegatorManagerImpl, IDelegatorManager } from "./wallet/delegator";
|
|
49
|
-
export * from "./arkfee";
|
|
50
|
-
export * as asset from "./extension/asset";
|
|
51
|
-
import { ContractManager, ContractWatcher, contractHandlers, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract } from "./contracts";
|
|
52
|
-
import type { Contract, ContractVtxo, ContractState, ContractEvent, ContractEventCallback, ContractBalance, ContractWithVtxos, ContractHandler, PathSelection, PathContext, ContractManagerConfig, CreateContractParams, ContractWatcherConfig, ParsedArkContract, DefaultContractParams, DelegateContractParams, VHTLCContractParams } from "./contracts";
|
|
53
|
-
import { IContractManager } from "./contracts/contractManager";
|
|
54
|
-
import { timelockToSequence, sequenceToTimelock } from "./utils/timelock";
|
|
55
|
-
import { closeDatabase, openDatabase } from "./repositories/indexedDB/manager";
|
|
56
|
-
import { WalletMessageHandler, WalletNotInitializedError, ReadonlyWalletError, DelegatorNotConfiguredError } from "./wallet/serviceWorker/wallet-message-handler";
|
|
57
|
-
import { MESSAGE_BUS_NOT_INITIALIZED, MessageBusNotInitializedError, ServiceWorkerTimeoutError } from "./worker/errors";
|
|
1
|
+
import { Transaction } from "./utils/transaction.js";
|
|
2
|
+
import { SingleKey, ReadonlySingleKey } from "./identity/singleKey.js";
|
|
3
|
+
import { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity } from "./identity/seedIdentity.js";
|
|
4
|
+
import type { SeedIdentityOptions, MnemonicOptions, NetworkOptions, DescriptorOptions } from "./identity/seedIdentity.js";
|
|
5
|
+
import { Identity, ReadonlyIdentity, BatchSignableIdentity, SignRequest, isBatchSignable } from "./identity/index.js";
|
|
6
|
+
import { ArkAddress } from "./script/address.js";
|
|
7
|
+
import { VHTLC } from "./script/vhtlc.js";
|
|
8
|
+
import { DefaultVtxo } from "./script/default.js";
|
|
9
|
+
import { DelegateVtxo } from "./script/delegate.js";
|
|
10
|
+
import { MessageHandler, RequestEnvelope, ResponseEnvelope, MessageBus } from "./worker/messageBus.js";
|
|
11
|
+
import { VtxoScript, EncodedVtxoScript, TapLeafScript, TapTreeCoder, getSequence } from "./script/base.js";
|
|
12
|
+
import { TxType, IWallet, IReadonlyWallet, BaseWalletConfig, WalletConfig, ReadonlyWalletConfig, ProviderClass, ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, WalletBalance, SendBitcoinParams, SettleParams, Status, VirtualStatus, Outpoint, VirtualCoin, TxKey, GetVtxosFilter, TapLeaves, StorageConfig, isSpendable, isSubdust, isRecoverable, isExpired, Asset, Recipient, IssuanceParams, IssuanceResult, ReissuanceParams, BurnParams, AssetDetails, AssetMetadata, KnownMetadata } from "./wallet/index.js";
|
|
13
|
+
import { Batch } from "./wallet/batch.js";
|
|
14
|
+
import { Wallet, ReadonlyWallet, waitForIncomingFunds, IncomingFunds } from "./wallet/wallet.js";
|
|
15
|
+
import { TxTree, TxTreeNode } from "./tree/txTree.js";
|
|
16
|
+
import { SignerSession, TreeNonces, TreePartialSigs } from "./tree/signingSession.js";
|
|
17
|
+
import { Ramps } from "./wallet/ramps.js";
|
|
18
|
+
import { HDDescriptorProvider } from "./wallet/hdDescriptorProvider.js";
|
|
19
|
+
import { isVtxoExpiringSoon, VtxoManager } from "./wallet/vtxo-manager.js";
|
|
20
|
+
import type { IVtxoManager, SettlementConfig } from "./wallet/vtxo-manager.js";
|
|
21
|
+
import { ServiceWorkerWallet, ServiceWorkerReadonlyWallet, DEFAULT_MESSAGE_TIMEOUTS } from "./wallet/serviceWorker/wallet.js";
|
|
22
|
+
import type { MessageTimeouts } from "./wallet/serviceWorker/wallet.js";
|
|
23
|
+
import { OnchainWallet } from "./wallet/onchain.js";
|
|
24
|
+
import { setupServiceWorker } from "./worker/browser/utils.js";
|
|
25
|
+
import { ESPLORA_URL, EsploraProvider, OnchainProvider, ExplorerTransaction } from "./providers/onchain.js";
|
|
26
|
+
import { ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ElectrumOnchainProvider, WsElectrumChainSource } from "./providers/electrum.js";
|
|
27
|
+
import type { TransactionHistory as ElectrumTransactionHistory, BlockHeader as ElectrumBlockHeader, Unspent as ElectrumUnspent } from "./providers/electrum.js";
|
|
28
|
+
import { RestArkProvider, ArkProvider, SettlementEvent, SettlementEventType, ArkInfo, SignedIntent, Output, TxNotification, BatchFinalizationEvent, BatchFinalizedEvent, BatchFailedEvent, TreeSigningStartedEvent, TreeNoncesEvent, BatchStartedEvent, TreeTxEvent, TreeSignatureEvent, ScheduledSession, FeeInfo } from "./providers/ark.js";
|
|
29
|
+
import { DelegatorProvider, DelegateInfo, DelegateOptions, RestDelegatorProvider } from "./providers/delegator.js";
|
|
30
|
+
import { CLTVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, CSVMultisigTapscript, decodeTapscript, MultisigTapscript, TapscriptType, ArkTapscript, RelativeTimelock } from "./script/tapscript.js";
|
|
31
|
+
import { hasBoardingTxExpired, buildOffchainTx, verifyTapscriptSignatures, ArkTxInput, OffchainTx, combineTapscriptSigs, isValidArkAddress } from "./utils/arkTransaction.js";
|
|
32
|
+
import { VtxoTaprootTree, ConditionWitness, getArkPsbtFields, setArkPsbtField, ArkPsbtFieldCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CosignerPublicKey, VtxoTreeExpiry } from "./utils/unknownFields.js";
|
|
33
|
+
import { Intent } from "./intent/index.js";
|
|
34
|
+
import { BIP322 } from "./bip322/index.js";
|
|
35
|
+
import { ArkNote } from "./arknote/index.js";
|
|
36
|
+
import { networks, Network, NetworkName } from "./networks.js";
|
|
37
|
+
import { RestIndexerProvider, IndexerProvider, IndexerTxType, ChainTxType, PageResponse, BatchInfo, ChainTx, CommitmentTx, TxHistoryRecord, VtxoChain, Tx, Vtxo, PaginationOptions, SubscriptionResponse, SubscriptionHeartbeat, SubscriptionEvent } from "./providers/indexer.js";
|
|
38
|
+
import { Nonces } from "./musig2/nonces.js";
|
|
39
|
+
import { PartialSig } from "./musig2/sign.js";
|
|
40
|
+
import { AnchorBumper, P2A } from "./utils/anchor.js";
|
|
41
|
+
import { TxWeightEstimator, type VSize } from "./utils/txSizeEstimator.js";
|
|
42
|
+
import { Unroll } from "./wallet/unroll.js";
|
|
43
|
+
import { ArkError, maybeArkError } from "./providers/errors.js";
|
|
44
|
+
import { validateVtxoTxGraph, validateConnectorsTxGraph } from "./tree/validation.js";
|
|
45
|
+
import { buildForfeitTx } from "./forfeit.js";
|
|
46
|
+
import { IndexedDBWalletRepository, IndexedDBContractRepository, InMemoryWalletRepository, InMemoryContractRepository, MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, WalletRepositoryImpl, ContractRepositoryImpl, WalletRepository, ContractRepository } from "./repositories/index.js";
|
|
47
|
+
import type { MigrationStatus } from "./repositories/index.js";
|
|
48
|
+
import { DelegatorManagerImpl, IDelegatorManager } from "./wallet/delegator.js";
|
|
49
|
+
export * from "./arkfee/index.js";
|
|
50
|
+
export * as asset from "./extension/asset/index.js";
|
|
51
|
+
import { ContractManager, ContractWatcher, contractHandlers, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract } from "./contracts/index.js";
|
|
52
|
+
import type { Contract, ContractVtxo, ContractState, ContractEvent, ContractEventCallback, ContractBalance, ContractWithVtxos, ContractHandler, PathSelection, PathContext, ContractManagerConfig, CreateContractParams, ContractWatcherConfig, ParsedArkContract, DefaultContractParams, DelegateContractParams, VHTLCContractParams } from "./contracts/index.js";
|
|
53
|
+
import { IContractManager } from "./contracts/contractManager.js";
|
|
54
|
+
import { timelockToSequence, sequenceToTimelock } from "./utils/timelock.js";
|
|
55
|
+
import { closeDatabase, openDatabase } from "./repositories/indexedDB/manager.js";
|
|
56
|
+
import { WalletMessageHandler, WalletNotInitializedError, ReadonlyWalletError, DelegatorNotConfiguredError } from "./wallet/serviceWorker/wallet-message-handler.js";
|
|
57
|
+
import { MESSAGE_BUS_NOT_INITIALIZED, MessageBusNotInitializedError, ServiceWorkerTimeoutError } from "./worker/errors.js";
|
|
58
58
|
export { Wallet, ReadonlyWallet, SingleKey, ReadonlySingleKey, SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, isBatchSignable, OnchainWallet, Ramps, VtxoManager, HDDescriptorProvider, DelegatorManagerImpl, RestDelegatorProvider, ESPLORA_URL, EsploraProvider, ELECTRUM_WS_URL, ELECTRUM_TCP_HOST, ElectrumOnchainProvider, WsElectrumChainSource, RestArkProvider, RestIndexerProvider, ArkAddress, DefaultVtxo, DelegateVtxo, VtxoScript, VHTLC, TxType, IndexerTxType, ChainTxType, SettlementEventType, setupServiceWorker, MessageBus, WalletMessageHandler, WalletNotInitializedError, ReadonlyWalletError, DelegatorNotConfiguredError, MESSAGE_BUS_NOT_INITIALIZED, MessageBusNotInitializedError, ServiceWorkerTimeoutError, ServiceWorkerWallet, ServiceWorkerReadonlyWallet, DEFAULT_MESSAGE_TIMEOUTS, decodeTapscript, MultisigTapscript, CSVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, CLTVMultisigTapscript, TapTreeCoder, ArkPsbtFieldKey, ArkPsbtFieldKeyType, setArkPsbtField, getArkPsbtFields, CosignerPublicKey, VtxoTreeExpiry, VtxoTaprootTree, ConditionWitness, buildOffchainTx, verifyTapscriptSignatures, waitForIncomingFunds, hasBoardingTxExpired, combineTapscriptSigs, isVtxoExpiringSoon, isValidArkAddress, ArkNote, networks, closeDatabase, openDatabase, IndexedDBWalletRepository, IndexedDBContractRepository, InMemoryWalletRepository, InMemoryContractRepository, MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, WalletRepositoryImpl, ContractRepositoryImpl, Intent, BIP322, TxTree, P2A, Unroll, Transaction, TxWeightEstimator, timelockToSequence, sequenceToTimelock, ArkError, maybeArkError, Batch, validateVtxoTxGraph, validateConnectorsTxGraph, buildForfeitTx, isRecoverable, isSpendable, isSubdust, isExpired, getSequence, ContractManager, ContractWatcher, contractHandlers, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract, };
|
|
59
59
|
export type { Identity, ReadonlyIdentity, BatchSignableIdentity, SignRequest, IWallet, IReadonlyWallet, BaseWalletConfig, WalletConfig, ReadonlyWalletConfig, ProviderClass, ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, WalletBalance, SendBitcoinParams, SettleParams, Status, VirtualStatus, Outpoint, VirtualCoin, TxKey, TapscriptType, ArkTxInput, OffchainTx, TapLeaves, IncomingFunds, SeedIdentityOptions, MnemonicOptions, NetworkOptions, DescriptorOptions, IndexerProvider, PageResponse, BatchInfo, ChainTx, CommitmentTx, TxHistoryRecord, Vtxo, VtxoChain, Tx, OnchainProvider, ArkProvider, SettlementEvent, FeeInfo, ArkInfo, SignedIntent, Output, TxNotification, ExplorerTransaction, ElectrumTransactionHistory, ElectrumBlockHeader, ElectrumUnspent, BatchFinalizationEvent, BatchFinalizedEvent, BatchFailedEvent, TreeSigningStartedEvent, TreeNoncesEvent, BatchStartedEvent, TreeTxEvent, TreeSignatureEvent, ScheduledSession, PaginationOptions, SubscriptionResponse, SubscriptionHeartbeat, SubscriptionEvent, Network, NetworkName, ArkTapscript, RelativeTimelock, EncodedVtxoScript, TapLeafScript, SignerSession, TreeNonces, TreePartialSigs, GetVtxosFilter, SettlementConfig, IVtxoManager, Asset, Recipient, IssuanceParams, IssuanceResult, ReissuanceParams, BurnParams, AssetDetails, AssetMetadata, KnownMetadata, Nonces, PartialSig, ArkPsbtFieldCoder, TxTreeNode, AnchorBumper, VSize, StorageConfig, Contract, ContractVtxo, ContractState, ContractEvent, ContractEventCallback, ContractBalance, ContractWithVtxos, ContractHandler, IContractManager, PathSelection, PathContext, ContractManagerConfig, CreateContractParams, ContractWatcherConfig, ParsedArkContract, DefaultContractParams, DelegateContractParams, VHTLCContractParams, MessageHandler, RequestEnvelope, ResponseEnvelope, MessageTimeouts, IDelegatorManager, DelegatorProvider, DelegateInfo, DelegateOptions, WalletRepository, ContractRepository, MigrationStatus, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransactionInput, TransactionOutput } from "@scure/btc-signer/psbt.js";
|
|
2
|
-
import { Transaction } from "../utils/transaction";
|
|
3
|
-
import { ExtendedCoin } from "../wallet";
|
|
2
|
+
import { Transaction } from "../utils/transaction.js";
|
|
3
|
+
import { ExtendedCoin } from "../wallet/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Intent proof implementation for Bitcoin message signing.
|
|
6
6
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Nonces } from "./nonces";
|
|
2
|
-
export { generateNonces, aggregateNonces } from "./nonces";
|
|
3
|
-
export { PartialSig, sign } from "./sign";
|
|
4
|
-
export { aggregateKeys } from "./keys";
|
|
1
|
+
export type { Nonces } from "./nonces.js";
|
|
2
|
+
export { generateNonces, aggregateNonces } from "./nonces.js";
|
|
3
|
+
export { PartialSig, sign } from "./sign.js";
|
|
4
|
+
export { aggregateKeys } from "./keys.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TxTreeNode } from "../tree/txTree";
|
|
2
|
-
import { TreeNonces, TreePartialSigs } from "../tree/signingSession";
|
|
3
|
-
import { Vtxo } from "./indexer";
|
|
4
|
-
import type { IntentFeeConfig } from "../arkfee";
|
|
5
|
-
import { Intent } from "../intent";
|
|
1
|
+
import { TxTreeNode } from "../tree/txTree.js";
|
|
2
|
+
import { TreeNonces, TreePartialSigs } from "../tree/signingSession.js";
|
|
3
|
+
import { Vtxo } from "./indexer.js";
|
|
4
|
+
import type { IntentFeeConfig } from "../arkfee/index.js";
|
|
5
|
+
import { Intent } from "../intent/index.js";
|
|
6
6
|
/** Output requested during settlement or transaction submission. */
|
|
7
7
|
export type Output = {
|
|
8
8
|
/** Destination address, either onchain or Arkade (offchain). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ElectrumWS } from "ws-electrumx-client";
|
|
2
|
-
import type { Network, NetworkName } from "../networks";
|
|
3
|
-
import type { Coin } from "../wallet";
|
|
4
|
-
import type { ExplorerTransaction, OnchainProvider } from "./onchain";
|
|
2
|
+
import type { Network, NetworkName } from "../networks.js";
|
|
3
|
+
import type { Coin } from "../wallet/index.js";
|
|
4
|
+
import type { ExplorerTransaction, OnchainProvider } from "./onchain.js";
|
|
5
5
|
/**
|
|
6
6
|
* Default WebSocket Electrum endpoints. Mainnet, mutinynet, and signet
|
|
7
7
|
* point at Ark Labs–operated Fulcrum 2.1 deployments (which support
|
|
@@ -86,8 +86,8 @@ type HeaderSubscribeResult = {
|
|
|
86
86
|
* @example
|
|
87
87
|
* ```typescript
|
|
88
88
|
* import { ElectrumWS } from "ws-electrumx-client";
|
|
89
|
-
* import { WsElectrumChainSource } from "./providers/electrum";
|
|
90
|
-
* import { networks } from "./networks";
|
|
89
|
+
* import { WsElectrumChainSource } from "./providers/electrum.js";
|
|
90
|
+
* import { networks } from "./networks.js";
|
|
91
91
|
*
|
|
92
92
|
* const ws = new ElectrumWS("wss://electrum.blockstream.info:50004");
|
|
93
93
|
* const chain = new WsElectrumChainSource(ws, networks.bitcoin);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RestArkProvider, SettlementEvent, TxNotification } from "./ark";
|
|
1
|
+
import { RestArkProvider, SettlementEvent, TxNotification } from "./ark.js";
|
|
2
2
|
/**
|
|
3
3
|
* Expo-compatible Arkade provider implementation using expo/fetch for SSE support.
|
|
4
4
|
* This provider works specifically in React Native/Expo environments where
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RestIndexerProvider, SubscriptionResponse } from "./indexer";
|
|
1
|
+
import { RestIndexerProvider, SubscriptionResponse } from "./indexer.js";
|
|
2
2
|
/**
|
|
3
3
|
* Expo-compatible Indexer provider implementation using expo/fetch for streaming support.
|
|
4
4
|
* This provider works specifically in React Native/Expo environments where
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContractFilter, ContractRepository } from "../contractRepository";
|
|
2
|
-
import { Contract } from "../../contracts";
|
|
1
|
+
import { ContractFilter, ContractRepository } from "../contractRepository.js";
|
|
2
|
+
import { Contract } from "../../contracts/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* In-memory implementation of ContractRepository.
|
|
5
5
|
* Data is ephemeral and scoped to the instance.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet";
|
|
2
|
-
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository";
|
|
1
|
+
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet/index.js";
|
|
2
|
+
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository.js";
|
|
3
3
|
/**
|
|
4
4
|
* In-memory implementation of WalletRepository.
|
|
5
5
|
* Data is ephemeral and scoped to the instance.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./walletRepository";
|
|
2
|
-
export * from "./contractRepository";
|
|
3
|
-
export * from "./inMemory/walletRepository";
|
|
4
|
-
export * from "./inMemory/contractRepository";
|
|
5
|
-
export * from "./indexedDB/contractRepository";
|
|
6
|
-
export * from "./indexedDB/walletRepository";
|
|
7
|
-
export { MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, type MigrationStatus, } from "./migrations/fromStorageAdapter";
|
|
8
|
-
export { WalletRepositoryImpl } from "./migrations/walletRepositoryImpl";
|
|
9
|
-
export { ContractRepositoryImpl } from "./migrations/contractRepositoryImpl";
|
|
1
|
+
export * from "./walletRepository.js";
|
|
2
|
+
export * from "./contractRepository.js";
|
|
3
|
+
export * from "./inMemory/walletRepository.js";
|
|
4
|
+
export * from "./inMemory/contractRepository.js";
|
|
5
|
+
export * from "./indexedDB/contractRepository.js";
|
|
6
|
+
export * from "./indexedDB/walletRepository.js";
|
|
7
|
+
export { MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, type MigrationStatus, } from "./migrations/fromStorageAdapter.js";
|
|
8
|
+
export { WalletRepositoryImpl } from "./migrations/walletRepositoryImpl.js";
|
|
9
|
+
export { ContractRepositoryImpl } from "./migrations/contractRepositoryImpl.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Contract } from "../../contracts";
|
|
2
|
-
import { ContractFilter, ContractRepository } from "../contractRepository";
|
|
1
|
+
import { Contract } from "../../contracts/index.js";
|
|
2
|
+
import { ContractFilter, ContractRepository } from "../contractRepository.js";
|
|
3
3
|
/**
|
|
4
4
|
* IndexedDB-based implementation of ContractRepository.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DB_VERSION, STORE_CONTRACTS, LEGACY_STORE_CONTRACT_COLLECTIONS, STORE_TRANSACTIONS, STORE_UTXOS, STORE_VTXOS, STORE_WALLET_STATE } from "./schema";
|
|
1
|
+
import { DB_VERSION, STORE_CONTRACTS, LEGACY_STORE_CONTRACT_COLLECTIONS, STORE_TRANSACTIONS, STORE_UTXOS, STORE_VTXOS, STORE_WALLET_STATE } from "./schema.js";
|
|
2
2
|
export { STORE_VTXOS, STORE_UTXOS, STORE_TRANSACTIONS, STORE_WALLET_STATE, STORE_CONTRACTS, LEGACY_STORE_CONTRACT_COLLECTIONS, DB_VERSION, };
|
|
3
|
-
export { serializeTapLeaf, serializeVtxo, serializeUtxo, deserializeTapLeaf, deserializeVtxo, deserializeUtxo, } from "../serialization";
|
|
4
|
-
export type { SerializedTapLeaf, SerializedVtxo, SerializedUtxo, } from "../serialization";
|
|
3
|
+
export { serializeTapLeaf, serializeVtxo, serializeUtxo, deserializeTapLeaf, deserializeVtxo, deserializeUtxo, } from "../serialization.js";
|
|
4
|
+
export type { SerializedTapLeaf, SerializedVtxo, SerializedUtxo, } from "../serialization.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExtendedCoin, ExtendedVirtualCoin, ArkTransaction } from "../../wallet";
|
|
2
|
-
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository";
|
|
1
|
+
import { ExtendedCoin, ExtendedVirtualCoin, ArkTransaction } from "../../wallet/index.js";
|
|
2
|
+
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository.js";
|
|
3
3
|
/**
|
|
4
4
|
* IndexedDB-based implementation of WalletRepository.
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StorageAdapter } from "../../storage";
|
|
2
|
-
import { ContractFilter, ContractRepository } from "../contractRepository";
|
|
3
|
-
import { Contract } from "../../contracts/types";
|
|
1
|
+
import { StorageAdapter } from "../../storage/index.js";
|
|
2
|
+
import { ContractFilter, ContractRepository } from "../contractRepository.js";
|
|
3
|
+
import { Contract } from "../../contracts/types.js";
|
|
4
4
|
export declare const getContractStorageKey: (id: string, key: string) => string;
|
|
5
5
|
export declare const getCollectionStorageKey: (type: string) => string;
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StorageAdapter } from "../../storage";
|
|
2
|
-
import { WalletRepository } from "../walletRepository";
|
|
1
|
+
import { StorageAdapter } from "../../storage/index.js";
|
|
2
|
+
import { WalletRepository } from "../walletRepository.js";
|
|
3
3
|
export declare const MIGRATION_KEY: (repoType: "wallet" | "contract") => string;
|
|
4
4
|
export type MigrationStatus = "pending" | "in-progress" | "done" | "not-needed";
|
|
5
5
|
export declare function getMigrationStatus(repoType: "wallet" | "contract", storageAdapter: StorageAdapter): Promise<MigrationStatus>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WalletRepository, WalletState } from "../walletRepository";
|
|
2
|
-
import { StorageAdapter } from "../../storage";
|
|
3
|
-
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet";
|
|
1
|
+
import { WalletRepository, WalletState } from "../walletRepository.js";
|
|
2
|
+
import { StorageAdapter } from "../../storage/index.js";
|
|
3
|
+
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated This is only to be used in migration from storage V1
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Contract } from "../../contracts/types";
|
|
2
|
-
import { ContractFilter, ContractRepository } from "../contractRepository";
|
|
3
|
-
import { RealmLike } from "./types";
|
|
1
|
+
import { Contract } from "../../contracts/types.js";
|
|
2
|
+
import { ContractFilter, ContractRepository } from "../contractRepository.js";
|
|
3
|
+
import { RealmLike } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Realm-based implementation of ContractRepository.
|
|
6
6
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { RealmWalletRepository } from "./walletRepository";
|
|
2
|
-
export { RealmContractRepository } from "./contractRepository";
|
|
3
|
-
export { ArkRealmSchemas, ARK_REALM_SCHEMA_VERSION, runArkRealmMigrations, } from "./schemas";
|
|
4
|
-
export type { RealmLike, RealmResults } from "./types";
|
|
1
|
+
export { RealmWalletRepository } from "./walletRepository.js";
|
|
2
|
+
export { RealmContractRepository } from "./contractRepository.js";
|
|
3
|
+
export { ArkRealmSchemas, ARK_REALM_SCHEMA_VERSION, runArkRealmMigrations, } from "./schemas.js";
|
|
4
|
+
export type { RealmLike, RealmResults } from "./types.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet";
|
|
2
|
-
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository";
|
|
3
|
-
import { RealmLike } from "./types";
|
|
1
|
+
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet/index.js";
|
|
2
|
+
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository.js";
|
|
3
|
+
import { RealmLike } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Realm-based implementation of WalletRepository.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TapLeafScript } from "../script/base";
|
|
2
|
-
import { ArkTransaction, Asset, ExtendedCoin, ExtendedVirtualCoin } from "../wallet";
|
|
1
|
+
import { TapLeafScript } from "../script/base.js";
|
|
2
|
+
import { ArkTransaction, Asset, ExtendedCoin, ExtendedVirtualCoin } from "../wallet/index.js";
|
|
3
3
|
export type SerializedTapLeaf = {
|
|
4
4
|
cb: string;
|
|
5
5
|
s: string;
|
|
@@ -28,16 +28,16 @@ export declare const serializeVtxo: (v: ExtendedVirtualCoin) => {
|
|
|
28
28
|
intentTapLeafScript: SerializedTapLeaf;
|
|
29
29
|
extraWitness: string[] | undefined;
|
|
30
30
|
assets: SerializedAsset[] | undefined;
|
|
31
|
-
virtualStatus: import("../wallet").VirtualStatus;
|
|
32
|
-
spentBy?: string;
|
|
33
|
-
settledBy?: string;
|
|
34
|
-
arkTxId?: string;
|
|
35
31
|
createdAt: Date;
|
|
32
|
+
script: string;
|
|
36
33
|
isUnrolled: boolean;
|
|
37
34
|
isSpent?: boolean;
|
|
38
|
-
|
|
35
|
+
settledBy?: string;
|
|
36
|
+
spentBy?: string;
|
|
37
|
+
arkTxId?: string;
|
|
38
|
+
virtualStatus: import("../wallet/index.js").VirtualStatus;
|
|
39
39
|
value: number;
|
|
40
|
-
status: import("../wallet").Status;
|
|
40
|
+
status: import("../wallet/index.js").Status;
|
|
41
41
|
txid: string;
|
|
42
42
|
vout: number;
|
|
43
43
|
};
|
|
@@ -47,14 +47,14 @@ export declare const serializeUtxo: (u: ExtendedCoin) => {
|
|
|
47
47
|
intentTapLeafScript: SerializedTapLeaf;
|
|
48
48
|
extraWitness: string[] | undefined;
|
|
49
49
|
value: number;
|
|
50
|
-
status: import("../wallet").Status;
|
|
50
|
+
status: import("../wallet/index.js").Status;
|
|
51
51
|
txid: string;
|
|
52
52
|
vout: number;
|
|
53
53
|
};
|
|
54
54
|
export declare const serializeTransaction: (t: ArkTransaction) => {
|
|
55
55
|
assets: SerializedAsset[] | undefined;
|
|
56
|
-
key: import("../wallet").TxKey;
|
|
57
|
-
type: import("../wallet").TxType;
|
|
56
|
+
key: import("../wallet/index.js").TxKey;
|
|
57
|
+
type: import("../wallet/index.js").TxType;
|
|
58
58
|
amount: number;
|
|
59
59
|
settled: boolean;
|
|
60
60
|
createdAt: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Contract } from "../../contracts/types";
|
|
2
|
-
import { ContractFilter, ContractRepository } from "../contractRepository";
|
|
3
|
-
import { SQLExecutor } from "./types";
|
|
1
|
+
import { Contract } from "../../contracts/types.js";
|
|
2
|
+
import { ContractFilter, ContractRepository } from "../contractRepository.js";
|
|
3
|
+
import { SQLExecutor } from "./types.js";
|
|
4
4
|
interface SQLiteContractRepositoryOptions {
|
|
5
5
|
/** Table name prefix (default: "ark_") */
|
|
6
6
|
prefix?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { SQLiteWalletRepository } from "./walletRepository";
|
|
2
|
-
export { SQLiteContractRepository } from "./contractRepository";
|
|
3
|
-
export type { SQLExecutor } from "./types";
|
|
1
|
+
export { SQLiteWalletRepository } from "./walletRepository.js";
|
|
2
|
+
export { SQLiteContractRepository } from "./contractRepository.js";
|
|
3
|
+
export type { SQLExecutor } from "./types.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet";
|
|
2
|
-
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository";
|
|
3
|
-
import { SQLExecutor } from "./types";
|
|
1
|
+
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../../wallet/index.js";
|
|
2
|
+
import { WalletRepository, WalletState, VtxoRepositoryKey } from "../walletRepository.js";
|
|
3
|
+
import { SQLExecutor } from "./types.js";
|
|
4
4
|
interface SQLiteWalletRepositoryOptions {
|
|
5
5
|
/** Table name prefix (default: "ark_") */
|
|
6
6
|
prefix?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../wallet";
|
|
1
|
+
import { ArkTransaction, ExtendedCoin, ExtendedVirtualCoin } from "../wallet/index.js";
|
|
2
2
|
export interface WalletState {
|
|
3
3
|
/** Arbitrary stored wallet settings. */
|
|
4
4
|
settings?: Record<string, any>;
|
|
@@ -34,10 +34,10 @@ export declare class ArkAddress {
|
|
|
34
34
|
readonly hrp: string;
|
|
35
35
|
readonly version: number;
|
|
36
36
|
/**
|
|
37
|
-
* Create an Arkade address from its server key,
|
|
37
|
+
* Create an Arkade address from its server public key, Taproot output key, and prefix.
|
|
38
38
|
*
|
|
39
39
|
* @param serverPubKey - 32-byte Arkade server public key
|
|
40
|
-
* @param vtxoTaprootKey - 32-byte
|
|
40
|
+
* @param vtxoTaprootKey - 32-byte Taproot output key (a.k.a. tweaked public key)
|
|
41
41
|
* @param hrp - Bech32 human-readable prefix
|
|
42
42
|
* @param version - Address version byte
|
|
43
43
|
* @defaultValue `version = 0`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NETWORK } from "@scure/btc-signer";
|
|
2
2
|
import { PSBTOutput } from "@scure/btc-signer/psbt.js";
|
|
3
3
|
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
4
|
-
import { ArkAddress } from "./address";
|
|
5
|
-
import { ConditionCSVMultisigTapscript, CSVMultisigTapscript } from "./tapscript";
|
|
4
|
+
import { ArkAddress } from "./address.js";
|
|
5
|
+
import { ConditionCSVMultisigTapscript, CSVMultisigTapscript } from "./tapscript.js";
|
|
6
6
|
export type TapLeafScript = [
|
|
7
7
|
{
|
|
8
8
|
version: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
2
|
-
import { TapLeafScript, VtxoScript } from "./base";
|
|
3
|
-
import { RelativeTimelock } from "./tapscript";
|
|
2
|
+
import { TapLeafScript, VtxoScript } from "./base.js";
|
|
3
|
+
import { RelativeTimelock } from "./tapscript.js";
|
|
4
4
|
/**
|
|
5
5
|
* DefaultVtxo is the default implementation of a VtxoScript.
|
|
6
6
|
* It contains 1 forfeit path and 1 exit path.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Bytes } from "@scure/btc-signer/utils";
|
|
2
|
-
import { DefaultVtxo } from "./default";
|
|
3
|
-
import { TapLeafScript, VtxoScript } from "./base";
|
|
1
|
+
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
2
|
+
import { DefaultVtxo } from "./default.js";
|
|
3
|
+
import { TapLeafScript, VtxoScript } from "./base.js";
|
|
4
4
|
/**
|
|
5
5
|
* DelegateVtxo extends DefaultVtxo with an extra delegator path
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bytes } from "@scure/btc-signer/utils.js";
|
|
2
|
-
import { RelativeTimelock } from "./tapscript";
|
|
3
|
-
import { TapLeafScript, VtxoScript } from "./base";
|
|
2
|
+
import { RelativeTimelock } from "./tapscript.js";
|
|
3
|
+
import { TapLeafScript, VtxoScript } from "./base.js";
|
|
4
4
|
/** Virtual Hash Time Lock Contract (VHTLC) namespace. */
|
|
5
5
|
export declare namespace VHTLC {
|
|
6
6
|
interface Options {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as musig2 from "../musig2";
|
|
2
|
-
import { TxTree } from "./txTree";
|
|
1
|
+
import * as musig2 from "../musig2/index.js";
|
|
2
|
+
import { TxTree } from "./txTree.js";
|
|
3
3
|
export declare const ErrMissingVtxoGraph: Error;
|
|
4
4
|
export declare const ErrMissingAggregateKey: Error;
|
|
5
5
|
export type Musig2PublicNonce = Pick<musig2.Nonces, "pubNonce">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Transaction } from "@scure/btc-signer/transaction.js";
|
|
2
|
-
import { TxTree } from "./txTree";
|
|
2
|
+
import { TxTree } from "./txTree.js";
|
|
3
3
|
export declare const ErrInvalidSettlementTx: (tx: string) => Error;
|
|
4
4
|
export declare const ErrInvalidSettlementTxOutputs: Error;
|
|
5
5
|
export declare const ErrEmptyTree: Error;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TransactionOutput } from "@scure/btc-signer/psbt.js";
|
|
2
|
-
import { ExtendedCoin, VirtualCoin } from "../wallet";
|
|
3
|
-
import { RelativeTimelock } from "../script/tapscript";
|
|
4
|
-
import { EncodedVtxoScript, TapLeafScript } from "../script/base";
|
|
5
|
-
import { CSVMultisigTapscript } from "../script/tapscript";
|
|
6
|
-
import { Transaction } from "./transaction";
|
|
2
|
+
import { ExtendedCoin, VirtualCoin } from "../wallet/index.js";
|
|
3
|
+
import { RelativeTimelock } from "../script/tapscript.js";
|
|
4
|
+
import { EncodedVtxoScript, TapLeafScript } from "../script/base.js";
|
|
5
|
+
import { CSVMultisigTapscript } from "../script/tapscript.js";
|
|
6
|
+
import { Transaction } from "./transaction.js";
|
|
7
7
|
export type ArkTxInput = {
|
|
8
8
|
tapLeafScript: TapLeafScript;
|
|
9
9
|
} & EncodedVtxoScript & Pick<VirtualCoin, "txid" | "vout" | "value">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WalletRepository, WalletState } from "../repositories/walletRepository";
|
|
1
|
+
import { WalletRepository, WalletState } from "../repositories/walletRepository.js";
|
|
2
2
|
/** Lag behind real-time to avoid racing with indexer writes. */
|
|
3
3
|
export declare const SAFETY_LAG_MS = 30000;
|
|
4
4
|
/** Overlap window so boundary virtual outputs are never missed. */
|