@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
|
@@ -35,10 +35,10 @@ const wallet_1 = require("../wallet");
|
|
|
35
35
|
*/
|
|
36
36
|
class ArkAddress {
|
|
37
37
|
/**
|
|
38
|
-
* Create an Arkade address from its server key,
|
|
38
|
+
* Create an Arkade address from its server public key, Taproot output key, and prefix.
|
|
39
39
|
*
|
|
40
40
|
* @param serverPubKey - 32-byte Arkade server public key
|
|
41
|
-
* @param vtxoTaprootKey - 32-byte
|
|
41
|
+
* @param vtxoTaprootKey - 32-byte Taproot output key (a.k.a. tweaked public key)
|
|
42
42
|
* @param hrp - Bech32 human-readable prefix
|
|
43
43
|
* @param version - Address version byte
|
|
44
44
|
* @defaultValue `version = 0`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AsyncStorageAdapter } from
|
|
1
|
+
export { AsyncStorageAdapter } from "../storage/asyncStorage.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Expo adapter for React Native/Expo environments
|
|
2
|
-
export { ExpoArkProvider } from
|
|
3
|
-
export { ExpoIndexerProvider } from
|
|
2
|
+
export { ExpoArkProvider } from "../providers/expoArk.js";
|
|
3
|
+
export { ExpoIndexerProvider } from "../providers/expoIndexer.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FileSystemStorageAdapter } from
|
|
1
|
+
export { FileSystemStorageAdapter } from "../storage/fileSystem.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IndexedDBStorageAdapter } from
|
|
1
|
+
export { IndexedDBStorageAdapter } from "../storage/indexedDB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LocalStorageAdapter } from
|
|
1
|
+
export { LocalStorageAdapter } from "../storage/localStorage.js";
|
package/dist/esm/arkfee/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Estimator } from
|
|
1
|
+
export { Estimator } from "./estimator.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { base58, hex } from "@scure/base";
|
|
2
2
|
import { sha256 } from "@scure/btc-signer/utils.js";
|
|
3
3
|
import { Script } from "@scure/btc-signer";
|
|
4
|
-
import { VtxoScript } from
|
|
4
|
+
import { VtxoScript } from "../script/base.js";
|
|
5
5
|
/**
|
|
6
6
|
* ArkNotes are special virtual outputs in the Arkade protocol that
|
|
7
7
|
* can be created and spent without requiring any transactions.
|
package/dist/esm/bip322/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { concatBytes, hash160, sha256x2, } from "@scure/btc-signer/utils.js";
|
|
|
3
3
|
import { schnorr, secp256k1 } from "@noble/curves/secp256k1.js";
|
|
4
4
|
import { equalBytes } from "@noble/curves/utils.js";
|
|
5
5
|
import { base64 } from "@scure/base";
|
|
6
|
-
import { Transaction } from
|
|
7
|
-
import { craftToSpendTx, OP_RETURN_EMPTY_PKSCRIPT } from
|
|
6
|
+
import { Transaction } from "../utils/transaction.js";
|
|
7
|
+
import { craftToSpendTx, OP_RETURN_EMPTY_PKSCRIPT } from "../intent/index.js";
|
|
8
8
|
const TAG_BIP322 = "BIP0322-signed-message";
|
|
9
9
|
/**
|
|
10
10
|
* BIP-322 simple message signing and verification.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { contractHandlers } from
|
|
3
|
-
import { DEFAULT_ARKADE_HRP } from
|
|
2
|
+
import { contractHandlers } from "./handlers/index.js";
|
|
3
|
+
import { DEFAULT_ARKADE_HRP } from "../wallet/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Prefix for arkcontract strings.
|
|
6
6
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { ContractWatcher } from
|
|
3
|
-
import { contractHandlers } from
|
|
4
|
-
import { extendVirtualCoinForContract } from
|
|
5
|
-
import { advanceSyncCursor, computeSyncWindow, cursorCutoff, getSyncCursor, } from
|
|
6
|
-
import { getVtxosForContract, saveVtxosForContract, warnAndFilterVtxosForScript, } from
|
|
2
|
+
import { ContractWatcher } from "./contractWatcher.js";
|
|
3
|
+
import { contractHandlers } from "./handlers/index.js";
|
|
4
|
+
import { extendVirtualCoinForContract } from "../wallet/utils.js";
|
|
5
|
+
import { advanceSyncCursor, computeSyncWindow, cursorCutoff, getSyncCursor, } from "../utils/syncCursors.js";
|
|
6
|
+
import { getVtxosForContract, saveVtxosForContract, warnAndFilterVtxosForScript, } from "./vtxoOwnership.js";
|
|
7
7
|
const DEFAULT_PAGE_SIZE = 500;
|
|
8
8
|
/**
|
|
9
9
|
* Central manager for contract lifecycle and operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { extendVirtualCoinForContract } from
|
|
2
|
-
import { isEventSourceError } from
|
|
3
|
-
import { getVtxosForContract } from
|
|
1
|
+
import { extendVirtualCoinForContract } from "../wallet/utils.js";
|
|
2
|
+
import { isEventSourceError } from "../providers/utils.js";
|
|
3
|
+
import { getVtxosForContract } from "./vtxoOwnership.js";
|
|
4
4
|
/**
|
|
5
5
|
* Watches multiple contracts for virtual output state changes with resilient connection handling.
|
|
6
6
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { DefaultVtxo } from
|
|
3
|
-
import { isCsvSpendable } from
|
|
4
|
-
import { sequenceToTimelock, timelockToSequence } from
|
|
5
|
-
import { normalizeToDescriptor, extractPubKey, } from
|
|
2
|
+
import { DefaultVtxo } from "../../script/default.js";
|
|
3
|
+
import { isCsvSpendable } from "./helpers.js";
|
|
4
|
+
import { sequenceToTimelock, timelockToSequence } from "../../utils/timelock.js";
|
|
5
|
+
import { normalizeToDescriptor, extractPubKey, } from "../../identity/descriptor.js";
|
|
6
6
|
/**
|
|
7
7
|
* Extract pubkey bytes from a descriptor or hex string.
|
|
8
8
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { DelegateVtxo } from
|
|
3
|
-
import { DefaultVtxo } from
|
|
4
|
-
import { isCsvSpendable } from
|
|
5
|
-
import { sequenceToTimelock, timelockToSequence } from
|
|
2
|
+
import { DelegateVtxo } from "../../script/delegate.js";
|
|
3
|
+
import { DefaultVtxo } from "../../script/default.js";
|
|
4
|
+
import { isCsvSpendable } from "./helpers.js";
|
|
5
|
+
import { sequenceToTimelock, timelockToSequence } from "../../utils/timelock.js";
|
|
6
6
|
/**
|
|
7
7
|
* Handler for delegate wallet virtual outputs.
|
|
8
8
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sequenceToTimelock } from
|
|
2
|
-
import { isDescriptor, extractPubKey } from
|
|
1
|
+
import { sequenceToTimelock } from "../../utils/timelock.js";
|
|
2
|
+
import { isDescriptor, extractPubKey } from "../../identity/descriptor.js";
|
|
3
3
|
/**
|
|
4
4
|
* Extract raw hex pubkey from a value that may be a descriptor or raw hex.
|
|
5
5
|
* Returns undefined for HD descriptors or unparseable values so role
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { contractHandlers } from
|
|
2
|
-
export { DefaultContractHandler } from
|
|
3
|
-
export { DelegateContractHandler } from
|
|
4
|
-
export { VHTLCContractHandler } from
|
|
1
|
+
export { contractHandlers } from "./registry.js";
|
|
2
|
+
export { DefaultContractHandler } from "./default.js";
|
|
3
|
+
export { DelegateContractHandler } from "./delegate.js";
|
|
4
|
+
export { VHTLCContractHandler } from "./vhtlc.js";
|
|
5
5
|
// Register built-in handlers
|
|
6
|
-
import { contractHandlers } from
|
|
7
|
-
import { DefaultContractHandler } from
|
|
8
|
-
import { DelegateContractHandler } from
|
|
9
|
-
import { VHTLCContractHandler } from
|
|
6
|
+
import { contractHandlers } from "./registry.js";
|
|
7
|
+
import { DefaultContractHandler } from "./default.js";
|
|
8
|
+
import { DelegateContractHandler } from "./delegate.js";
|
|
9
|
+
import { VHTLCContractHandler } from "./vhtlc.js";
|
|
10
10
|
contractHandlers.register(DefaultContractHandler);
|
|
11
11
|
contractHandlers.register(DelegateContractHandler);
|
|
12
12
|
contractHandlers.register(VHTLCContractHandler);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { VHTLC } from
|
|
3
|
-
import { isCltvSatisfied, isCsvSpendable, resolveRole } from
|
|
4
|
-
import { sequenceToTimelock, timelockToSequence } from
|
|
2
|
+
import { VHTLC } from "../../script/vhtlc.js";
|
|
3
|
+
import { isCltvSatisfied, isCsvSpendable, resolveRole } from "./helpers.js";
|
|
4
|
+
import { sequenceToTimelock, timelockToSequence } from "../../utils/timelock.js";
|
|
5
5
|
/**
|
|
6
6
|
* Handler for Virtual Hash Time Lock Contract (VHTLC).
|
|
7
7
|
*
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Types
|
|
2
|
-
export * from
|
|
2
|
+
export * from "./types.js";
|
|
3
3
|
// Contract handlers
|
|
4
|
-
export { contractHandlers } from
|
|
5
|
-
export { DefaultContractHandler } from
|
|
6
|
-
export { DelegateContractHandler } from
|
|
7
|
-
export { VHTLCContractHandler } from
|
|
4
|
+
export { contractHandlers } from "./handlers/index.js";
|
|
5
|
+
export { DefaultContractHandler } from "./handlers/index.js";
|
|
6
|
+
export { DelegateContractHandler } from "./handlers/index.js";
|
|
7
|
+
export { VHTLCContractHandler } from "./handlers/index.js";
|
|
8
8
|
// arkcontract string codec
|
|
9
|
-
export { encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract, } from
|
|
9
|
+
export { encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract, } from "./arkcontract.js";
|
|
10
10
|
// Contract watcher
|
|
11
|
-
export { ContractWatcher } from
|
|
11
|
+
export { ContractWatcher } from "./contractWatcher.js";
|
|
12
12
|
// Contract manager
|
|
13
|
-
export { ContractManager } from
|
|
13
|
+
export { ContractManager } from "./contractManager.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { AssetInputType, MASK_ASSET_ID, MASK_CONTROL_ASSET, MASK_METADATA, } from
|
|
3
|
-
import { AssetId } from
|
|
4
|
-
import { AssetRef } from
|
|
5
|
-
import { AssetInput, AssetInputs } from
|
|
6
|
-
import { AssetOutputs } from
|
|
7
|
-
import { MetadataList } from
|
|
8
|
-
import { BufferReader, BufferWriter } from
|
|
2
|
+
import { AssetInputType, MASK_ASSET_ID, MASK_CONTROL_ASSET, MASK_METADATA, } from "./types.js";
|
|
3
|
+
import { AssetId } from "./assetId.js";
|
|
4
|
+
import { AssetRef } from "./assetRef.js";
|
|
5
|
+
import { AssetInput, AssetInputs } from "./assetInput.js";
|
|
6
|
+
import { AssetOutputs } from "./assetOutput.js";
|
|
7
|
+
import { MetadataList } from "./metadata.js";
|
|
8
|
+
import { BufferReader, BufferWriter } from "./utils.js";
|
|
9
9
|
/**
|
|
10
10
|
* An asset group contains inputs, outputs, and all data related to a given asset id.
|
|
11
11
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { TX_HASH_SIZE, ASSET_ID_SIZE } from
|
|
3
|
-
import { BufferReader, BufferWriter, isZeroBytes } from
|
|
2
|
+
import { TX_HASH_SIZE, ASSET_ID_SIZE } from "./types.js";
|
|
3
|
+
import { BufferReader, BufferWriter, isZeroBytes } from "./utils.js";
|
|
4
4
|
/**
|
|
5
5
|
* AssetId identifies a specific asset.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { AssetInputType, TX_HASH_SIZE } from
|
|
3
|
-
import { BufferReader, BufferWriter, isZeroBytes } from
|
|
2
|
+
import { AssetInputType, TX_HASH_SIZE } from "./types.js";
|
|
3
|
+
import { BufferReader, BufferWriter, isZeroBytes } from "./utils.js";
|
|
4
4
|
/**
|
|
5
5
|
* AssetInput represents an input of an asset group.
|
|
6
6
|
* a local input references a real transaction input and specify the amount in satoshis.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { BufferReader, BufferWriter } from
|
|
2
|
+
import { BufferReader, BufferWriter } from "./utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* AssetOutput references a real transaction output and specify the amount in satoshis.
|
|
5
5
|
* it must be present in an AssetGroup.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { AssetRefType } from
|
|
3
|
-
import { AssetId } from
|
|
4
|
-
import { BufferReader, BufferWriter } from
|
|
2
|
+
import { AssetRefType } from "./types.js";
|
|
3
|
+
import { AssetId } from "./assetId.js";
|
|
4
|
+
import { BufferReader, BufferWriter } from "./utils.js";
|
|
5
5
|
/**
|
|
6
6
|
* Reference to either an explicit asset id or another asset group in the same packet.
|
|
7
7
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AssetInputType, AssetRefType } from
|
|
2
|
-
export { AssetId } from
|
|
3
|
-
export { AssetRef } from
|
|
4
|
-
export { AssetInput, AssetInputs } from
|
|
5
|
-
export { AssetOutput, AssetOutputs } from
|
|
6
|
-
export { Metadata, MetadataList } from
|
|
7
|
-
export { AssetGroup } from
|
|
8
|
-
export { Packet } from
|
|
1
|
+
export { AssetInputType, AssetRefType } from "./types.js";
|
|
2
|
+
export { AssetId } from "./assetId.js";
|
|
3
|
+
export { AssetRef } from "./assetRef.js";
|
|
4
|
+
export { AssetInput, AssetInputs } from "./assetInput.js";
|
|
5
|
+
export { AssetOutput, AssetOutputs } from "./assetOutput.js";
|
|
6
|
+
export { Metadata, MetadataList } from "./metadata.js";
|
|
7
|
+
export { AssetGroup } from "./assetGroup.js";
|
|
8
|
+
export { Packet } from "./packet.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { schnorr } from "@noble/curves/secp256k1.js";
|
|
2
2
|
import { hex } from "@scure/base";
|
|
3
3
|
import { compareBytes } from "@scure/btc-signer/utils.js";
|
|
4
|
-
import { BufferReader, BufferWriter } from
|
|
4
|
+
import { BufferReader, BufferWriter } from "./utils.js";
|
|
5
5
|
/**
|
|
6
6
|
* Metadata represents a key-value pair.
|
|
7
7
|
* @param key - the key
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { AssetRefType } from
|
|
3
|
-
import { AssetGroup } from
|
|
4
|
-
import { BufferReader, BufferWriter } from
|
|
2
|
+
import { AssetRefType } from "./types.js";
|
|
3
|
+
import { AssetGroup } from "./assetGroup.js";
|
|
4
|
+
import { BufferReader, BufferWriter } from "./utils.js";
|
|
5
5
|
/**
|
|
6
6
|
* Packet represents a collection of asset groups.
|
|
7
7
|
* It encodes/decodes as raw bytes only — OP_RETURN framing is handled by the Extension module.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
2
|
import { Script } from "@scure/btc-signer";
|
|
3
3
|
import { equalBytes } from "@scure/btc-signer/utils.js";
|
|
4
|
-
import { Packet } from
|
|
5
|
-
import { BufferReader } from
|
|
6
|
-
import { UnknownPacket } from
|
|
7
|
-
export { UnknownPacket } from
|
|
4
|
+
import { Packet } from "./asset/packet.js";
|
|
5
|
+
import { BufferReader } from "./asset/utils.js";
|
|
6
|
+
import { UnknownPacket } from "./packet.js";
|
|
7
|
+
export { UnknownPacket } from "./packet.js";
|
|
8
8
|
/**
|
|
9
9
|
* ArkadeMagic is the 3-byte magic prefix ("ARK") that identifies an OP_RETURN
|
|
10
10
|
* output as an Arkade extension blob.
|
package/dist/esm/forfeit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Transaction } from
|
|
2
|
-
import { P2A } from
|
|
1
|
+
import { Transaction } from "./utils/transaction.js";
|
|
2
|
+
import { P2A } from "./utils/anchor.js";
|
|
3
3
|
/**
|
|
4
4
|
* Build a forfeit transaction that spends the provided inputs to a single forfeit output.
|
|
5
5
|
*
|
|
@@ -3,10 +3,10 @@ export function isBatchSignable(identity) {
|
|
|
3
3
|
return ("signMultiple" in identity &&
|
|
4
4
|
typeof identity.signMultiple === "function");
|
|
5
5
|
}
|
|
6
|
-
export * from
|
|
7
|
-
export { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, } from
|
|
8
|
-
export * from
|
|
6
|
+
export * from "./singleKey.js";
|
|
7
|
+
export { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, } from "./seedIdentity.js";
|
|
8
|
+
export * from "./serialize.js";
|
|
9
9
|
// Descriptor utilities
|
|
10
|
-
export { isDescriptor, normalizeToDescriptor, extractPubKey, parseHDDescriptor, } from
|
|
10
|
+
export { isDescriptor, normalizeToDescriptor, extractPubKey, parseHDDescriptor, } from "./descriptor.js";
|
|
11
11
|
// Static descriptor provider (wrapper for legacy Identity)
|
|
12
|
-
export { StaticDescriptorProvider } from
|
|
12
|
+
export { StaticDescriptorProvider } from "./staticDescriptorProvider.js";
|
|
@@ -3,10 +3,10 @@ import { wordlist } from "@scure/bip39/wordlists/english.js";
|
|
|
3
3
|
import { pubECDSA, pubSchnorr } from "@scure/btc-signer/utils.js";
|
|
4
4
|
import { SigHash } from "@scure/btc-signer";
|
|
5
5
|
import { hex } from "@scure/base";
|
|
6
|
-
import { TreeSignerSession } from
|
|
6
|
+
import { TreeSignerSession } from "../tree/signingSession.js";
|
|
7
7
|
import { schnorr, signAsync } from "@noble/secp256k1";
|
|
8
8
|
import { HDKey, expand, networks, scriptExpressions, } from "@bitcoinerlab/descriptors-scure";
|
|
9
|
-
import { descriptorIsOurs, isMainnetDescriptor } from
|
|
9
|
+
import { descriptorIsOurs, isMainnetDescriptor } from "./descriptor.js";
|
|
10
10
|
const ALL_SIGHASH = Object.values(SigHash).filter((x) => typeof x === "number");
|
|
11
11
|
/**
|
|
12
12
|
* Secret-bearing state for seed-backed identities, held off the public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { SingleKey, ReadonlySingleKey } from
|
|
3
|
-
import { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, serializeSeedOwnedSigningIdentity, serializeSeedOwnedReadonlyIdentity, } from
|
|
2
|
+
import { SingleKey, ReadonlySingleKey } from "./singleKey.js";
|
|
3
|
+
import { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, serializeSeedOwnedSigningIdentity, serializeSeedOwnedReadonlyIdentity, } from "./seedIdentity.js";
|
|
4
4
|
/** Type guard — true for signing envelopes, false for readonly envelopes. */
|
|
5
5
|
export function isSigningSerialized(s) {
|
|
6
6
|
return (s.type === "single-key" || s.type === "seed" || s.type === "mnemonic");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pubECDSA, pubSchnorr, randomPrivateKeyBytes, } from "@scure/btc-signer/utils.js";
|
|
2
2
|
import { SigHash } from "@scure/btc-signer";
|
|
3
3
|
import { hex } from "@scure/base";
|
|
4
|
-
import { TreeSignerSession } from
|
|
4
|
+
import { TreeSignerSession } from "../tree/signingSession.js";
|
|
5
5
|
import { schnorr, signAsync } from "@noble/secp256k1";
|
|
6
6
|
const ALL_SIGHASH = Object.values(SigHash).filter((x) => typeof x === "number");
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { isBatchSignable } from
|
|
3
|
-
import { normalizeToDescriptor, extractPubKey } from
|
|
2
|
+
import { isBatchSignable } from "./index.js";
|
|
3
|
+
import { normalizeToDescriptor, extractPubKey } from "./descriptor.js";
|
|
4
4
|
/**
|
|
5
5
|
* Wraps a legacy Identity (single-key) as a DescriptorProvider.
|
|
6
6
|
* The descriptor is always a simple tr(pubkey) format.
|
package/dist/esm/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Transaction } from
|
|
2
|
-
import { SingleKey, ReadonlySingleKey } from
|
|
3
|
-
import { SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, } from
|
|
4
|
-
import { isBatchSignable, } from
|
|
5
|
-
import { ArkAddress } from
|
|
6
|
-
import { VHTLC } from
|
|
7
|
-
import { DefaultVtxo } from
|
|
8
|
-
import { DelegateVtxo } from
|
|
9
|
-
import { MessageBus, } from
|
|
10
|
-
import { VtxoScript, TapTreeCoder, getSequence, } from
|
|
11
|
-
import { TxType, isSpendable, isSubdust, isRecoverable, isExpired, } from
|
|
12
|
-
import { Batch } from
|
|
13
|
-
import { Wallet, ReadonlyWallet, waitForIncomingFunds, } from
|
|
14
|
-
import { TxTree } from
|
|
15
|
-
import { Ramps } from
|
|
16
|
-
import { HDDescriptorProvider } from
|
|
17
|
-
import { isVtxoExpiringSoon, VtxoManager } from
|
|
18
|
-
import { ServiceWorkerWallet, ServiceWorkerReadonlyWallet, DEFAULT_MESSAGE_TIMEOUTS, } from
|
|
19
|
-
import { OnchainWallet } from
|
|
20
|
-
import { setupServiceWorker } from
|
|
21
|
-
import { ESPLORA_URL, EsploraProvider, } from
|
|
22
|
-
import { ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ElectrumOnchainProvider, WsElectrumChainSource, } from
|
|
23
|
-
import { RestArkProvider, SettlementEventType, } from
|
|
24
|
-
import { RestDelegatorProvider, } from
|
|
25
|
-
import { CLTVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, CSVMultisigTapscript, decodeTapscript, MultisigTapscript, } from
|
|
26
|
-
import { hasBoardingTxExpired, buildOffchainTx, verifyTapscriptSignatures, combineTapscriptSigs, isValidArkAddress, } from
|
|
27
|
-
import { VtxoTaprootTree, ConditionWitness, getArkPsbtFields, setArkPsbtField, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CosignerPublicKey, VtxoTreeExpiry, } from
|
|
28
|
-
import { Intent } from
|
|
29
|
-
import { BIP322 } from
|
|
30
|
-
import { ArkNote } from
|
|
31
|
-
import { networks } from
|
|
32
|
-
import { RestIndexerProvider, IndexerTxType, ChainTxType, } from
|
|
33
|
-
import { P2A } from
|
|
34
|
-
import { TxWeightEstimator } from
|
|
35
|
-
import { Unroll } from
|
|
36
|
-
import { ArkError, maybeArkError } from
|
|
37
|
-
import { validateVtxoTxGraph, validateConnectorsTxGraph, } from
|
|
38
|
-
import { buildForfeitTx } from
|
|
39
|
-
import { IndexedDBWalletRepository, IndexedDBContractRepository, InMemoryWalletRepository, InMemoryContractRepository, MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, WalletRepositoryImpl, ContractRepositoryImpl, } from
|
|
40
|
-
import { DelegatorManagerImpl } from
|
|
41
|
-
export * from
|
|
42
|
-
export * as asset from
|
|
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 { isBatchSignable, } from "./identity/index.js";
|
|
5
|
+
import { ArkAddress } from "./script/address.js";
|
|
6
|
+
import { VHTLC } from "./script/vhtlc.js";
|
|
7
|
+
import { DefaultVtxo } from "./script/default.js";
|
|
8
|
+
import { DelegateVtxo } from "./script/delegate.js";
|
|
9
|
+
import { MessageBus, } from "./worker/messageBus.js";
|
|
10
|
+
import { VtxoScript, TapTreeCoder, getSequence, } from "./script/base.js";
|
|
11
|
+
import { TxType, isSpendable, isSubdust, isRecoverable, isExpired, } from "./wallet/index.js";
|
|
12
|
+
import { Batch } from "./wallet/batch.js";
|
|
13
|
+
import { Wallet, ReadonlyWallet, waitForIncomingFunds, } from "./wallet/wallet.js";
|
|
14
|
+
import { TxTree } from "./tree/txTree.js";
|
|
15
|
+
import { Ramps } from "./wallet/ramps.js";
|
|
16
|
+
import { HDDescriptorProvider } from "./wallet/hdDescriptorProvider.js";
|
|
17
|
+
import { isVtxoExpiringSoon, VtxoManager } from "./wallet/vtxo-manager.js";
|
|
18
|
+
import { ServiceWorkerWallet, ServiceWorkerReadonlyWallet, DEFAULT_MESSAGE_TIMEOUTS, } from "./wallet/serviceWorker/wallet.js";
|
|
19
|
+
import { OnchainWallet } from "./wallet/onchain.js";
|
|
20
|
+
import { setupServiceWorker } from "./worker/browser/utils.js";
|
|
21
|
+
import { ESPLORA_URL, EsploraProvider, } from "./providers/onchain.js";
|
|
22
|
+
import { ELECTRUM_TCP_HOST, ELECTRUM_WS_URL, ElectrumOnchainProvider, WsElectrumChainSource, } from "./providers/electrum.js";
|
|
23
|
+
import { RestArkProvider, SettlementEventType, } from "./providers/ark.js";
|
|
24
|
+
import { RestDelegatorProvider, } from "./providers/delegator.js";
|
|
25
|
+
import { CLTVMultisigTapscript, ConditionCSVMultisigTapscript, ConditionMultisigTapscript, CSVMultisigTapscript, decodeTapscript, MultisigTapscript, } from "./script/tapscript.js";
|
|
26
|
+
import { hasBoardingTxExpired, buildOffchainTx, verifyTapscriptSignatures, combineTapscriptSigs, isValidArkAddress, } from "./utils/arkTransaction.js";
|
|
27
|
+
import { VtxoTaprootTree, ConditionWitness, getArkPsbtFields, setArkPsbtField, ArkPsbtFieldKey, ArkPsbtFieldKeyType, CosignerPublicKey, VtxoTreeExpiry, } from "./utils/unknownFields.js";
|
|
28
|
+
import { Intent } from "./intent/index.js";
|
|
29
|
+
import { BIP322 } from "./bip322/index.js";
|
|
30
|
+
import { ArkNote } from "./arknote/index.js";
|
|
31
|
+
import { networks } from "./networks.js";
|
|
32
|
+
import { RestIndexerProvider, IndexerTxType, ChainTxType, } from "./providers/indexer.js";
|
|
33
|
+
import { P2A } from "./utils/anchor.js";
|
|
34
|
+
import { TxWeightEstimator } from "./utils/txSizeEstimator.js";
|
|
35
|
+
import { Unroll } from "./wallet/unroll.js";
|
|
36
|
+
import { ArkError, maybeArkError } from "./providers/errors.js";
|
|
37
|
+
import { validateVtxoTxGraph, validateConnectorsTxGraph, } from "./tree/validation.js";
|
|
38
|
+
import { buildForfeitTx } from "./forfeit.js";
|
|
39
|
+
import { IndexedDBWalletRepository, IndexedDBContractRepository, InMemoryWalletRepository, InMemoryContractRepository, MIGRATION_KEY, migrateWalletRepository, requiresMigration, getMigrationStatus, rollbackMigration, WalletRepositoryImpl, ContractRepositoryImpl, } from "./repositories/index.js";
|
|
40
|
+
import { DelegatorManagerImpl } from "./wallet/delegator.js";
|
|
41
|
+
export * from "./arkfee/index.js";
|
|
42
|
+
export * as asset from "./extension/asset/index.js";
|
|
43
43
|
// Contracts
|
|
44
|
-
import { ContractManager, ContractWatcher, contractHandlers, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract, } from
|
|
45
|
-
import { timelockToSequence, sequenceToTimelock } from
|
|
46
|
-
import { closeDatabase, openDatabase } from
|
|
47
|
-
import { WalletMessageHandler, WalletNotInitializedError, ReadonlyWalletError, DelegatorNotConfiguredError, } from
|
|
48
|
-
import { MESSAGE_BUS_NOT_INITIALIZED, MessageBusNotInitializedError, ServiceWorkerTimeoutError, } from
|
|
44
|
+
import { ContractManager, ContractWatcher, contractHandlers, DefaultContractHandler, DelegateContractHandler, VHTLCContractHandler, encodeArkContract, decodeArkContract, contractFromArkContract, contractFromArkContractWithAddress, isArkContract, } from "./contracts/index.js";
|
|
45
|
+
import { timelockToSequence, sequenceToTimelock } from "./utils/timelock.js";
|
|
46
|
+
import { closeDatabase, openDatabase } from "./repositories/indexedDB/manager.js";
|
|
47
|
+
import { WalletMessageHandler, WalletNotInitializedError, ReadonlyWalletError, DelegatorNotConfiguredError, } from "./wallet/serviceWorker/wallet-message-handler.js";
|
|
48
|
+
import { MESSAGE_BUS_NOT_INITIALIZED, MessageBusNotInitializedError, ServiceWorkerTimeoutError, } from "./worker/errors.js";
|
|
49
49
|
export {
|
|
50
50
|
// Wallets
|
|
51
51
|
Wallet, ReadonlyWallet, SingleKey, ReadonlySingleKey, SeedIdentity, MnemonicIdentity, ReadonlyDescriptorIdentity, isBatchSignable, OnchainWallet, Ramps, VtxoManager, HDDescriptorProvider, DelegatorManagerImpl, RestDelegatorProvider,
|
package/dist/esm/intent/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OP, Script, SigHash } from "@scure/btc-signer";
|
|
2
2
|
import { schnorr } from "@noble/curves/secp256k1.js";
|
|
3
|
-
import { Transaction } from
|
|
4
|
-
import { ConditionWitness, VtxoTaprootTree } from
|
|
3
|
+
import { Transaction } from "../utils/transaction.js";
|
|
4
|
+
import { ConditionWitness, VtxoTaprootTree } from "../utils/unknownFields.js";
|
|
5
5
|
import { hex } from "@scure/base";
|
|
6
|
-
import { getSequence, VtxoScript } from
|
|
6
|
+
import { getSequence, VtxoScript } from "../script/base.js";
|
|
7
7
|
/**
|
|
8
8
|
* Intent proof implementation for Bitcoin message signing.
|
|
9
9
|
*
|
package/dist/esm/musig2/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { generateNonces, aggregateNonces } from
|
|
2
|
-
export { PartialSig, sign } from
|
|
3
|
-
export { aggregateKeys } from
|
|
1
|
+
export { generateNonces, aggregateNonces } from "./nonces.js";
|
|
2
|
+
export { PartialSig, sign } from "./sign.js";
|
|
3
|
+
export { aggregateKeys } from "./keys.js";
|
package/dist/esm/musig2/sign.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as musig from "@scure/btc-signer/musig2.js";
|
|
2
2
|
import { bytesToNumberBE } from "@noble/curves/utils.js";
|
|
3
3
|
import { Point } from "@noble/secp256k1";
|
|
4
|
-
import { aggregateKeys } from
|
|
4
|
+
import { aggregateKeys } from "./keys.js";
|
|
5
5
|
import { schnorr } from "@noble/curves/secp256k1.js";
|
|
6
6
|
// Add this error type for decode failures
|
|
7
7
|
export class PartialSignatureError extends Error {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { eventSourceIterator, isEventSourceError } from
|
|
3
|
-
import { maybeArkError } from
|
|
4
|
-
import { Intent } from
|
|
2
|
+
import { eventSourceIterator, isEventSourceError } from "./utils.js";
|
|
3
|
+
import { maybeArkError } from "./errors.js";
|
|
4
|
+
import { Intent } from "../intent/index.js";
|
|
5
5
|
export var SettlementEventType;
|
|
6
6
|
(function (SettlementEventType) {
|
|
7
7
|
SettlementEventType["BatchStarted"] = "batch_started";
|
|
@@ -92,8 +92,8 @@ function parseBlockHeader(headerHex) {
|
|
|
92
92
|
* @example
|
|
93
93
|
* ```typescript
|
|
94
94
|
* import { ElectrumWS } from "ws-electrumx-client";
|
|
95
|
-
* import { WsElectrumChainSource } from
|
|
96
|
-
* import { networks } from
|
|
95
|
+
* import { WsElectrumChainSource } from "./providers/electrum.js";
|
|
96
|
+
* import { networks } from "./networks.js";
|
|
97
97
|
*
|
|
98
98
|
* const ws = new ElectrumWS("wss://electrum.blockstream.info:50004");
|
|
99
99
|
* const chain = new WsElectrumChainSource(ws, networks.bitcoin);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RestArkProvider, isFetchTimeoutError, } from
|
|
2
|
-
import { getExpoFetch, sseStreamIterator } from
|
|
1
|
+
import { RestArkProvider, isFetchTimeoutError, } from "./ark.js";
|
|
2
|
+
import { getExpoFetch, sseStreamIterator } from "./expoUtils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Expo-compatible Arkade provider implementation using expo/fetch for SSE support.
|
|
5
5
|
* This provider works specifically in React Native/Expo environments where
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RestIndexerProvider } from
|
|
2
|
-
import { isFetchTimeoutError } from
|
|
3
|
-
import { getExpoFetch, sseStreamIterator } from
|
|
1
|
+
import { RestIndexerProvider } from "./indexer.js";
|
|
2
|
+
import { isFetchTimeoutError } from "./ark.js";
|
|
3
|
+
import { getExpoFetch, sseStreamIterator } from "./expoUtils.js";
|
|
4
4
|
// Helper function to convert Vtxo to VirtualCoin (same as in indexer.ts)
|
|
5
5
|
function convertVtxo(vtxo) {
|
|
6
6
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hex } from "@scure/base";
|
|
2
|
-
import { isFetchTimeoutError } from
|
|
3
|
-
import { eventSourceIterator, isEventSourceError } from
|
|
4
|
-
import { MetadataList } from
|
|
2
|
+
import { isFetchTimeoutError } from "./ark.js";
|
|
3
|
+
import { eventSourceIterator, isEventSourceError } from "./utils.js";
|
|
4
|
+
import { MetadataList } from "../extension/asset/index.js";
|
|
5
5
|
export var IndexerTxType;
|
|
6
6
|
(function (IndexerTxType) {
|
|
7
7
|
IndexerTxType[IndexerTxType["INDEXER_TX_TYPE_UNSPECIFIED"] = 0] = "INDEXER_TX_TYPE_UNSPECIFIED";
|