@arkade-os/sdk 0.3.0-alpha.0 → 0.3.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/cjs/arknote/index.js +4 -4
  2. package/dist/cjs/bip322/index.js +9 -7
  3. package/dist/cjs/forfeit.js +2 -2
  4. package/dist/cjs/identity/singleKey.js +10 -7
  5. package/dist/cjs/index.js +2 -2
  6. package/dist/cjs/musig2/keys.js +1 -1
  7. package/dist/cjs/musig2/nonces.js +1 -1
  8. package/dist/cjs/musig2/sign.js +1 -1
  9. package/dist/cjs/networks.js +6 -6
  10. package/dist/cjs/providers/ark.js +53 -71
  11. package/dist/cjs/providers/indexer.js +45 -51
  12. package/dist/cjs/providers/utils.js +60 -0
  13. package/dist/cjs/repositories/walletRepository.js +34 -4
  14. package/dist/cjs/script/address.js +3 -3
  15. package/dist/cjs/script/base.js +7 -7
  16. package/dist/cjs/script/tapscript.js +29 -23
  17. package/dist/cjs/script/vhtlc.js +2 -2
  18. package/dist/cjs/tree/signingSession.js +11 -10
  19. package/dist/cjs/tree/txTree.js +9 -9
  20. package/dist/cjs/tree/validation.js +6 -6
  21. package/dist/cjs/utils/arkTransaction.js +5 -5
  22. package/dist/cjs/utils/unknownFields.js +5 -5
  23. package/dist/cjs/wallet/onchain.js +5 -5
  24. package/dist/cjs/wallet/unroll.js +6 -6
  25. package/dist/cjs/wallet/wallet.js +21 -22
  26. package/dist/esm/arknote/index.js +2 -2
  27. package/dist/esm/bip322/index.js +3 -1
  28. package/dist/esm/forfeit.js +1 -1
  29. package/dist/esm/identity/singleKey.js +5 -2
  30. package/dist/esm/index.js +1 -1
  31. package/dist/esm/musig2/keys.js +1 -1
  32. package/dist/esm/musig2/nonces.js +1 -1
  33. package/dist/esm/musig2/sign.js +1 -1
  34. package/dist/esm/networks.js +1 -1
  35. package/dist/esm/providers/ark.js +53 -71
  36. package/dist/esm/providers/indexer.js +45 -51
  37. package/dist/esm/providers/utils.js +57 -0
  38. package/dist/esm/repositories/walletRepository.js +34 -4
  39. package/dist/esm/script/address.js +1 -1
  40. package/dist/esm/script/base.js +3 -3
  41. package/dist/esm/script/tapscript.js +10 -4
  42. package/dist/esm/script/vhtlc.js +1 -1
  43. package/dist/esm/tree/signingSession.js +6 -5
  44. package/dist/esm/tree/txTree.js +5 -5
  45. package/dist/esm/tree/validation.js +3 -3
  46. package/dist/esm/utils/arkTransaction.js +2 -2
  47. package/dist/esm/utils/unknownFields.js +1 -1
  48. package/dist/esm/wallet/onchain.js +2 -2
  49. package/dist/esm/wallet/unroll.js +2 -2
  50. package/dist/esm/wallet/wallet.js +9 -10
  51. package/dist/types/arknote/index.d.ts +1 -1
  52. package/dist/types/bip322/index.d.ts +2 -2
  53. package/dist/types/forfeit.d.ts +1 -1
  54. package/dist/types/identity/index.d.ts +4 -3
  55. package/dist/types/identity/singleKey.d.ts +2 -1
  56. package/dist/types/index.d.ts +1 -1
  57. package/dist/types/providers/ark.d.ts +1 -0
  58. package/dist/types/providers/utils.d.ts +1 -0
  59. package/dist/types/script/address.d.ts +1 -1
  60. package/dist/types/script/base.d.ts +1 -1
  61. package/dist/types/script/default.d.ts +1 -1
  62. package/dist/types/script/tapscript.d.ts +1 -1
  63. package/dist/types/script/vhtlc.d.ts +1 -1
  64. package/dist/types/tree/txTree.d.ts +3 -3
  65. package/dist/types/tree/validation.d.ts +1 -1
  66. package/dist/types/utils/anchor.d.ts +1 -1
  67. package/dist/types/utils/arkTransaction.d.ts +3 -3
  68. package/dist/types/utils/unknownFields.d.ts +1 -1
  69. package/dist/types/wallet/index.d.ts +1 -1
  70. package/dist/types/wallet/onchain.d.ts +2 -2
  71. package/dist/types/wallet/unroll.d.ts +1 -1
  72. package/dist/types/wallet/wallet.d.ts +1 -1
  73. package/package.json +3 -2
@@ -1,4 +1,4 @@
1
- import { Bytes } from "@scure/btc-signer/utils";
1
+ import { Bytes } from "@scure/btc-signer/utils.js";
2
2
  import { TapLeafScript, VtxoScript } from "./base";
3
3
  import { RelativeTimelock } from "./tapscript";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Bytes } from "@scure/btc-signer/utils";
1
+ import { Bytes } from "@scure/btc-signer/utils.js";
2
2
  /**
3
3
  * RelativeTimelock lets to create timelocked with CHECKSEQUENCEVERIFY script.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Bytes } from "@scure/btc-signer/utils";
1
+ import { Bytes } from "@scure/btc-signer/utils.js";
2
2
  import { RelativeTimelock } from "./tapscript";
3
3
  import { TapLeafScript, VtxoScript } from "./base";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Transaction } from "@scure/btc-signer";
1
+ import { Transaction } from "@scure/btc-signer/transaction.js";
2
2
  /**
3
3
  * TxTreeNode is a node of the tree.
4
4
  * It contains the transaction id, the transaction and the children.
@@ -13,7 +13,7 @@ export type TxTreeNode = {
13
13
  * TxTree is a graph of bitcoin transactions.
14
14
  * It is used to represent batch tree created during settlement session
15
15
  */
16
- export declare class TxTree implements Iterable<TxTree> {
16
+ export declare class TxTree {
17
17
  readonly root: Transaction;
18
18
  readonly children: Map<number, TxTree>;
19
19
  constructor(root: Transaction, children?: Map<number, TxTree>);
@@ -24,5 +24,5 @@ export declare class TxTree implements Iterable<TxTree> {
24
24
  get txid(): string;
25
25
  find(txid: string): TxTree | null;
26
26
  update(txid: string, fn: (tx: Transaction) => void): void;
27
- [Symbol.iterator](): IterableIterator<TxTree>;
27
+ iterator(): Generator<TxTree, void, unknown>;
28
28
  }
@@ -1,4 +1,4 @@
1
- import { Transaction } from "@scure/btc-signer";
1
+ import { Transaction } from "@scure/btc-signer/transaction.js";
2
2
  import { TxTree } from "./txTree";
3
3
  export declare const ErrInvalidSettlementTx: (tx: string) => Error;
4
4
  export declare const ErrInvalidSettlementTxOutputs: Error;
@@ -1,4 +1,4 @@
1
- import { Transaction } from "@scure/btc-signer";
1
+ import { Transaction } from "@scure/btc-signer/transaction.js";
2
2
  import { TransactionInputUpdate } from "@scure/btc-signer/psbt";
3
3
  export declare const ANCHOR_VALUE = 0n;
4
4
  export declare const ANCHOR_PKSCRIPT: Uint8Array<ArrayBuffer>;
@@ -1,9 +1,9 @@
1
- import { Transaction } from "@scure/btc-signer";
1
+ import { Transaction } from "@scure/btc-signer/transaction.js";
2
2
  import { VirtualCoin } from "../wallet";
3
3
  import { EncodedVtxoScript, TapLeafScript } from "../script/base";
4
4
  import { CSVMultisigTapscript } from "../script/tapscript";
5
- import { TransactionOutput } from "@scure/btc-signer/psbt";
6
- import { Bytes } from "@scure/btc-signer/utils";
5
+ import { TransactionOutput } from "@scure/btc-signer/psbt.js";
6
+ import { Bytes } from "@scure/btc-signer/utils.js";
7
7
  export type ArkTxInput = {
8
8
  tapLeafScript: TapLeafScript;
9
9
  checkpointTapLeafScript?: Bytes;
@@ -1,4 +1,4 @@
1
- import { Transaction } from "@scure/btc-signer";
1
+ import { Transaction } from "@scure/btc-signer/transaction.js";
2
2
  import { TransactionInputUpdate } from "@scure/btc-signer/psbt";
3
3
  /**
4
4
  * ArkPsbtFieldKey is the key values for ark psbt fields.
@@ -2,7 +2,7 @@ import { Output, SettlementEvent } from "../providers/ark";
2
2
  import { Identity } from "../identity";
3
3
  import { RelativeTimelock } from "../script/tapscript";
4
4
  import { EncodedVtxoScript, TapLeafScript } from "../script/base";
5
- import { Bytes } from "@scure/btc-signer/utils";
5
+ import { Bytes } from "@scure/btc-signer/utils.js";
6
6
  import { StorageAdapter } from "../storage";
7
7
  /**
8
8
  * Configuration options for wallet initialization.
@@ -1,9 +1,9 @@
1
- import { P2TR } from "@scure/btc-signer/payment";
1
+ import { P2TR } from "@scure/btc-signer/payment.js";
2
2
  import { Coin, SendBitcoinParams } from ".";
3
3
  import { Identity } from "../identity";
4
4
  import { Network, NetworkName } from "../networks";
5
5
  import { OnchainProvider } from "../providers/onchain";
6
- import { Transaction } from "@scure/btc-signer";
6
+ import { Transaction } from "@scure/btc-signer/transaction.js";
7
7
  import { AnchorBumper } from "../utils/anchor";
8
8
  /**
9
9
  * Onchain Bitcoin wallet implementation for traditional Bitcoin transactions.
@@ -1,4 +1,4 @@
1
- import { Transaction } from "@scure/btc-signer";
1
+ import { Transaction } from "@scure/btc-signer/transaction.js";
2
2
  import { ChainTx, IndexerProvider } from "../providers/indexer";
3
3
  import { AnchorBumper } from "../utils/anchor";
4
4
  import { OnchainProvider } from "../providers/onchain";
@@ -5,7 +5,7 @@ import { OnchainProvider } from "../providers/onchain";
5
5
  import { SettlementEvent, ArkProvider } from "../providers/ark";
6
6
  import { Identity } from "../identity";
7
7
  import { ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, IWallet, SendBitcoinParams, SettleParams, VirtualCoin, WalletBalance, WalletConfig } from ".";
8
- import { Bytes } from "@scure/btc-signer/utils";
8
+ import { Bytes } from "@scure/btc-signer/utils.js";
9
9
  import { CSVMultisigTapscript } from "../script/tapscript";
10
10
  import { IndexerProvider } from "../providers/indexer";
11
11
  import { WalletRepository } from "../repositories/walletRepository";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkade-os/sdk",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "0.3.0-alpha.2",
4
4
  "description": "Bitcoin wallet SDK with Taproot and Ark integration",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -51,13 +51,14 @@
51
51
  "@noble/hashes": "2.0.0",
52
52
  "@noble/secp256k1": "3.0.0",
53
53
  "@scure/base": "2.0.0",
54
- "@scure/btc-signer": "1.8.1",
54
+ "@scure/btc-signer": "2.0.1",
55
55
  "bip68": "1.0.4"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/node": "24.3.1",
59
59
  "@vitest/coverage-v8": "3.2.4",
60
60
  "esbuild": "^0.25.9",
61
+ "eventsource": "4.0.0",
61
62
  "glob": "11.0.3",
62
63
  "husky": "9.1.7",
63
64
  "prettier": "3.6.2",