@arkade-os/sdk 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -1
- package/dist/cjs/identity/singleKey.js +33 -1
- package/dist/cjs/index.js +17 -2
- package/dist/cjs/intent/index.js +31 -2
- package/dist/cjs/providers/ark.js +9 -3
- package/dist/cjs/providers/indexer.js +2 -2
- package/dist/cjs/wallet/batch.js +183 -0
- package/dist/cjs/wallet/index.js +15 -0
- package/dist/cjs/wallet/serviceWorker/request.js +0 -2
- package/dist/cjs/wallet/serviceWorker/wallet.js +98 -34
- package/dist/cjs/wallet/serviceWorker/worker.js +163 -72
- package/dist/cjs/wallet/utils.js +2 -2
- package/dist/cjs/wallet/vtxo-manager.js +5 -0
- package/dist/cjs/wallet/wallet.js +341 -359
- package/dist/esm/identity/singleKey.js +31 -0
- package/dist/esm/index.js +12 -7
- package/dist/esm/intent/index.js +31 -2
- package/dist/esm/providers/ark.js +9 -3
- package/dist/esm/providers/indexer.js +2 -2
- package/dist/esm/wallet/batch.js +180 -0
- package/dist/esm/wallet/index.js +14 -0
- package/dist/esm/wallet/serviceWorker/request.js +0 -2
- package/dist/esm/wallet/serviceWorker/wallet.js +96 -33
- package/dist/esm/wallet/serviceWorker/worker.js +165 -74
- package/dist/esm/wallet/utils.js +2 -2
- package/dist/esm/wallet/vtxo-manager.js +6 -1
- package/dist/esm/wallet/wallet.js +342 -362
- package/dist/types/identity/index.d.ts +5 -3
- package/dist/types/identity/singleKey.d.ts +20 -1
- package/dist/types/index.d.ts +11 -8
- package/dist/types/intent/index.d.ts +19 -2
- package/dist/types/providers/ark.d.ts +9 -8
- package/dist/types/providers/indexer.d.ts +2 -2
- package/dist/types/wallet/batch.d.ts +87 -0
- package/dist/types/wallet/index.d.ts +75 -16
- package/dist/types/wallet/serviceWorker/request.d.ts +5 -1
- package/dist/types/wallet/serviceWorker/wallet.d.ts +46 -15
- package/dist/types/wallet/serviceWorker/worker.d.ts +6 -3
- package/dist/types/wallet/utils.d.ts +8 -3
- package/dist/types/wallet/wallet.d.ts +87 -36
- package/package.json +123 -113
|
@@ -5,12 +5,16 @@ import { DefaultVtxo } from "../script/default";
|
|
|
5
5
|
import { Network, NetworkName } from "../networks";
|
|
6
6
|
import { OnchainProvider } from "../providers/onchain";
|
|
7
7
|
import { SettlementEvent, ArkProvider, SignedIntent } from "../providers/ark";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { SignerSession } from "../tree/signingSession";
|
|
9
|
+
import { Identity, ReadonlyIdentity } from "../identity";
|
|
10
|
+
import { ArkTransaction, Coin, ExtendedCoin, ExtendedVirtualCoin, GetVtxosFilter, IReadonlyWallet, IWallet, ReadonlyWalletConfig, SendBitcoinParams, SettleParams, VirtualCoin, WalletBalance, WalletConfig } from ".";
|
|
11
|
+
import { TapLeafScript } from "../script/base";
|
|
10
12
|
import { CSVMultisigTapscript } from "../script/tapscript";
|
|
13
|
+
import { Intent } from "../intent";
|
|
11
14
|
import { IndexerProvider } from "../providers/indexer";
|
|
12
|
-
import { WalletRepository } from "../repositories/walletRepository";
|
|
13
|
-
import { ContractRepository } from "../repositories/contractRepository";
|
|
15
|
+
import { WalletRepository, WalletRepositoryImpl } from "../repositories/walletRepository";
|
|
16
|
+
import { ContractRepository, ContractRepositoryImpl } from "../repositories/contractRepository";
|
|
17
|
+
import { Batch } from "./batch";
|
|
14
18
|
export type IncomingFunds = {
|
|
15
19
|
type: "utxo";
|
|
16
20
|
coins: Coin[];
|
|
@@ -19,6 +23,52 @@ export type IncomingFunds = {
|
|
|
19
23
|
newVtxos: ExtendedVirtualCoin[];
|
|
20
24
|
spentVtxos: ExtendedVirtualCoin[];
|
|
21
25
|
};
|
|
26
|
+
export declare class ReadonlyWallet implements IReadonlyWallet {
|
|
27
|
+
readonly identity: ReadonlyIdentity;
|
|
28
|
+
readonly network: Network;
|
|
29
|
+
readonly onchainProvider: OnchainProvider;
|
|
30
|
+
readonly indexerProvider: IndexerProvider;
|
|
31
|
+
readonly arkServerPublicKey: Bytes;
|
|
32
|
+
readonly offchainTapscript: DefaultVtxo.Script;
|
|
33
|
+
readonly boardingTapscript: DefaultVtxo.Script;
|
|
34
|
+
readonly dustAmount: bigint;
|
|
35
|
+
readonly walletRepository: WalletRepository;
|
|
36
|
+
readonly contractRepository: ContractRepository;
|
|
37
|
+
protected constructor(identity: ReadonlyIdentity, network: Network, onchainProvider: OnchainProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script, boardingTapscript: DefaultVtxo.Script, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository);
|
|
38
|
+
/**
|
|
39
|
+
* Protected helper to set up shared wallet configuration.
|
|
40
|
+
* Extracts common logic used by both ReadonlyWallet.create() and Wallet.create().
|
|
41
|
+
*/
|
|
42
|
+
protected static setupWalletConfig(config: ReadonlyWalletConfig, pubkey: Uint8Array): Promise<{
|
|
43
|
+
arkProvider: ArkProvider;
|
|
44
|
+
indexerProvider: IndexerProvider;
|
|
45
|
+
onchainProvider: OnchainProvider;
|
|
46
|
+
network: Network;
|
|
47
|
+
networkName: NetworkName;
|
|
48
|
+
serverPubKey: Uint8Array<ArrayBuffer>;
|
|
49
|
+
offchainTapscript: DefaultVtxo.Script;
|
|
50
|
+
boardingTapscript: DefaultVtxo.Script;
|
|
51
|
+
dustAmount: bigint;
|
|
52
|
+
walletRepository: WalletRepositoryImpl;
|
|
53
|
+
contractRepository: ContractRepositoryImpl;
|
|
54
|
+
info: import("../providers/ark").ArkInfo;
|
|
55
|
+
}>;
|
|
56
|
+
static create(config: ReadonlyWalletConfig): Promise<ReadonlyWallet>;
|
|
57
|
+
get arkAddress(): ArkAddress;
|
|
58
|
+
getAddress(): Promise<string>;
|
|
59
|
+
getBoardingAddress(): Promise<string>;
|
|
60
|
+
getBalance(): Promise<WalletBalance>;
|
|
61
|
+
getVtxos(filter?: GetVtxosFilter): Promise<ExtendedVirtualCoin[]>;
|
|
62
|
+
protected getVirtualCoins(filter?: GetVtxosFilter): Promise<VirtualCoin[]>;
|
|
63
|
+
getTransactionHistory(): Promise<ArkTransaction[]>;
|
|
64
|
+
getBoardingTxs(): Promise<{
|
|
65
|
+
boardingTxs: ArkTransaction[];
|
|
66
|
+
commitmentsToIgnore: Set<string>;
|
|
67
|
+
}>;
|
|
68
|
+
getBoardingUtxos(): Promise<ExtendedCoin[]>;
|
|
69
|
+
notifyIncomingFunds(eventCallback: (coins: IncomingFunds) => void): Promise<() => void>;
|
|
70
|
+
fetchPendingTxs(): Promise<string[]>;
|
|
71
|
+
}
|
|
22
72
|
/**
|
|
23
73
|
* Main wallet implementation for Bitcoin transactions with Ark protocol support.
|
|
24
74
|
* The wallet does not store any data locally and relies on Ark and onchain
|
|
@@ -52,52 +102,52 @@ export type IncomingFunds = {
|
|
|
52
102
|
* });
|
|
53
103
|
* ```
|
|
54
104
|
*/
|
|
55
|
-
export declare class Wallet implements IWallet {
|
|
56
|
-
readonly identity: Identity;
|
|
57
|
-
readonly network: Network;
|
|
105
|
+
export declare class Wallet extends ReadonlyWallet implements IWallet {
|
|
58
106
|
readonly networkName: NetworkName;
|
|
59
|
-
readonly onchainProvider: OnchainProvider;
|
|
60
107
|
readonly arkProvider: ArkProvider;
|
|
61
|
-
readonly indexerProvider: IndexerProvider;
|
|
62
|
-
readonly arkServerPublicKey: Bytes;
|
|
63
|
-
readonly offchainTapscript: DefaultVtxo.Script;
|
|
64
|
-
readonly boardingTapscript: DefaultVtxo.Script;
|
|
65
108
|
readonly serverUnrollScript: CSVMultisigTapscript.Type;
|
|
66
109
|
readonly forfeitOutputScript: Bytes;
|
|
67
110
|
readonly forfeitPubkey: Bytes;
|
|
68
|
-
readonly dustAmount: bigint;
|
|
69
111
|
static MIN_FEE_RATE: number;
|
|
70
|
-
readonly
|
|
71
|
-
readonly contractRepository: ContractRepository;
|
|
112
|
+
readonly identity: Identity;
|
|
72
113
|
readonly renewalConfig: Required<Omit<WalletConfig["renewalConfig"], "enabled">> & {
|
|
73
114
|
enabled: boolean;
|
|
74
115
|
thresholdMs: number;
|
|
75
116
|
};
|
|
76
|
-
|
|
117
|
+
protected constructor(identity: Identity, network: Network, networkName: NetworkName, onchainProvider: OnchainProvider, arkProvider: ArkProvider, indexerProvider: IndexerProvider, arkServerPublicKey: Bytes, offchainTapscript: DefaultVtxo.Script, boardingTapscript: DefaultVtxo.Script, serverUnrollScript: CSVMultisigTapscript.Type, forfeitOutputScript: Bytes, forfeitPubkey: Bytes, dustAmount: bigint, walletRepository: WalletRepository, contractRepository: ContractRepository, renewalConfig?: WalletConfig["renewalConfig"]);
|
|
77
118
|
static create(config: WalletConfig): Promise<Wallet>;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Convert this wallet to a readonly wallet.
|
|
121
|
+
*
|
|
122
|
+
* @returns A readonly wallet with the same configuration but readonly identity
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* const wallet = await Wallet.create({ identity: SingleKey.fromHex('...'), ... });
|
|
126
|
+
* const readonlyWallet = await wallet.toReadonly();
|
|
127
|
+
*
|
|
128
|
+
* // Can query balance and addresses
|
|
129
|
+
* const balance = await readonlyWallet.getBalance();
|
|
130
|
+
* const address = await readonlyWallet.getAddress();
|
|
131
|
+
*
|
|
132
|
+
* // But cannot send transactions (type error)
|
|
133
|
+
* // readonlyWallet.sendBitcoin(...); // TypeScript error
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
toReadonly(): Promise<ReadonlyWallet>;
|
|
90
137
|
sendBitcoin(params: SendBitcoinParams): Promise<string>;
|
|
91
138
|
settle(params?: SettleParams, eventCallback?: (event: SettlementEvent) => void): Promise<string>;
|
|
92
|
-
notifyIncomingFunds(eventCallback: (coins: IncomingFunds) => void): Promise<() => void>;
|
|
93
|
-
private handleBatchStartedEvent;
|
|
94
|
-
private handleSettlementSigningEvent;
|
|
95
|
-
private handleSettlementTreeNoncesEvent;
|
|
96
139
|
private handleSettlementFinalizationEvent;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
140
|
+
/**
|
|
141
|
+
* @implements Batch.Handler interface.
|
|
142
|
+
* @param intentId - The intent ID.
|
|
143
|
+
* @param inputs - The inputs of the intent.
|
|
144
|
+
* @param session - The musig2 signing session, if not provided, the signing will be skipped.
|
|
145
|
+
*/
|
|
146
|
+
createBatchHandler(intentId: string, inputs: ExtendedCoin[], session?: SignerSession): Batch.Handler;
|
|
147
|
+
safeRegisterIntent(intent: SignedIntent<Intent.RegisterMessage>): Promise<string>;
|
|
148
|
+
makeRegisterIntentSignature(coins: ExtendedCoin[], outputs: TransactionOutput[], onchainOutputsIndexes: number[], cosignerPubKeys: string[]): Promise<SignedIntent<Intent.RegisterMessage>>;
|
|
149
|
+
makeDeleteIntentSignature(coins: ExtendedCoin[]): Promise<SignedIntent<Intent.DeleteMessage>>;
|
|
150
|
+
makeGetPendingTxIntentSignature(vtxos: ExtendedVirtualCoin[]): Promise<SignedIntent<Intent.GetPendingTxMessage>>;
|
|
101
151
|
/**
|
|
102
152
|
* Finalizes pending transactions by retrieving them from the server and finalizing each one.
|
|
103
153
|
* @param vtxos - Optional list of VTXOs to use instead of retrieving them from the server
|
|
@@ -109,6 +159,7 @@ export declare class Wallet implements IWallet {
|
|
|
109
159
|
}>;
|
|
110
160
|
private prepareIntentProofInputs;
|
|
111
161
|
}
|
|
162
|
+
export declare function getSequence(tapLeafScript: TapLeafScript): number | undefined;
|
|
112
163
|
/**
|
|
113
164
|
* Wait for incoming funds to the wallet
|
|
114
165
|
* @param wallet - The wallet to wait for incoming funds
|
package/package.json
CHANGED
|
@@ -1,120 +1,130 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"name": "@arkade-os/sdk",
|
|
3
|
+
"version": "0.3.9",
|
|
4
|
+
"description": "Bitcoin wallet SDK with Taproot and Ark integration",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/cjs/index.js",
|
|
7
|
+
"module": "./dist/esm/index.js",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/types/index.d.ts",
|
|
13
|
+
"import": "./dist/esm/index.js",
|
|
14
|
+
"require": "./dist/cjs/index.js",
|
|
15
|
+
"default": "./dist/esm/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./adapters/expo": {
|
|
18
|
+
"types": "./dist/types/adapters/expo.d.ts",
|
|
19
|
+
"import": "./dist/esm/adapters/expo.js",
|
|
20
|
+
"require": "./dist/cjs/adapters/expo.js",
|
|
21
|
+
"default": "./dist/esm/adapters/expo.js"
|
|
22
|
+
},
|
|
23
|
+
"./adapters/localStorage": {
|
|
24
|
+
"types": "./dist/types/adapters/localStorage.d.ts",
|
|
25
|
+
"import": "./dist/esm/adapters/localStorage.js",
|
|
26
|
+
"require": "./dist/cjs/adapters/localStorage.js",
|
|
27
|
+
"default": "./dist/esm/adapters/localStorage.js"
|
|
28
|
+
},
|
|
29
|
+
"./adapters/fileSystem": {
|
|
30
|
+
"types": "./dist/types/adapters/fileSystem.d.ts",
|
|
31
|
+
"import": "./dist/esm/adapters/fileSystem.js",
|
|
32
|
+
"require": "./dist/cjs/adapters/fileSystem.js",
|
|
33
|
+
"default": "./dist/esm/adapters/fileSystem.js"
|
|
34
|
+
},
|
|
35
|
+
"./adapters/indexedDB": {
|
|
36
|
+
"types": "./dist/types/adapters/indexedDB.d.ts",
|
|
37
|
+
"import": "./dist/esm/adapters/indexedDB.js",
|
|
38
|
+
"require": "./dist/cjs/adapters/indexedDB.js",
|
|
39
|
+
"default": "./dist/esm/adapters/indexedDB.js"
|
|
40
|
+
},
|
|
41
|
+
"./adapters/asyncStorage": {
|
|
42
|
+
"types": "./dist/types/adapters/asyncStorage.d.ts",
|
|
43
|
+
"import": "./dist/esm/adapters/asyncStorage.js",
|
|
44
|
+
"require": "./dist/cjs/adapters/asyncStorage.js",
|
|
45
|
+
"default": "./dist/esm/adapters/asyncStorage.js"
|
|
46
|
+
}
|
|
16
47
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
48
|
+
"files": [
|
|
49
|
+
"dist"
|
|
50
|
+
],
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public",
|
|
53
|
+
"registry": "https://registry.npmjs.org/"
|
|
22
54
|
},
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "rimraf dist && pnpm run build:esm && node scripts/add-extensions.js && pnpm run build:cjs && pnpm run build:types && node scripts/generate-package-files.js",
|
|
57
|
+
"build:esm": "tsc -p tsconfig.esm.json --outDir dist/esm",
|
|
58
|
+
"build:cjs": "tsc -p tsconfig.cjs.json --outDir dist/cjs",
|
|
59
|
+
"build:types": "tsc -p tsconfig.json --outDir dist/types --emitDeclarationOnly",
|
|
60
|
+
"build:browser": "node scripts/build-browser.js",
|
|
61
|
+
"docs:build": "pnpm run build:types && pnpm typedoc",
|
|
62
|
+
"docs:open": "open ./docs/index.html",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"test:master": "ARK_ENV=master vitest run",
|
|
65
|
+
"test:unit": "vitest run --exclude test/e2e",
|
|
66
|
+
"test:setup": "node test/setup.js",
|
|
67
|
+
"test:setup-docker": "node test/setup.js docker",
|
|
68
|
+
"test:build-docker": "docker compose -f docker-compose.yml build --no-cache",
|
|
69
|
+
"test:up-docker": "docker compose -f docker-compose.yml up -d",
|
|
70
|
+
"test:down-docker": "docker compose -f docker-compose.yml down",
|
|
71
|
+
"test:integration": "vitest run test/e2e/**",
|
|
72
|
+
"test:integration-docker": "ARK_ENV=docker vitest run test/e2e/**",
|
|
73
|
+
"test:watch": "vitest",
|
|
74
|
+
"test:coverage": "vitest run --coverage",
|
|
75
|
+
"test:sw": "pnpm run build:browser && node test/serviceWorker/serve.js",
|
|
76
|
+
"expo:web:install": "cd examples/expo-demo && pnpm install",
|
|
77
|
+
"expo:web": "cd examples/expo-demo && pnpm start",
|
|
78
|
+
"format": "prettier --write src test examples",
|
|
79
|
+
"lint": "prettier --check src test examples",
|
|
80
|
+
"audit": "pnpm audit",
|
|
81
|
+
"preinstall": "npx only-allow pnpm",
|
|
82
|
+
"prepare": "husky",
|
|
83
|
+
"prepublishOnly": "pnpm run build",
|
|
84
|
+
"release": "bash scripts/release.sh",
|
|
85
|
+
"release:dry-run": "bash scripts/release.sh --dry-run",
|
|
86
|
+
"release:cleanup": "bash scripts/release.sh --cleanup"
|
|
28
87
|
},
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
88
|
+
"dependencies": {
|
|
89
|
+
"@noble/curves": "2.0.0",
|
|
90
|
+
"@noble/secp256k1": "3.0.0",
|
|
91
|
+
"@scure/base": "2.0.0",
|
|
92
|
+
"@scure/btc-signer": "2.0.1",
|
|
93
|
+
"bip68": "1.0.4"
|
|
34
94
|
},
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@types/node": "24.3.1",
|
|
97
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
98
|
+
"esbuild": "^0.25.9",
|
|
99
|
+
"expo": "~52.0.47",
|
|
100
|
+
"eventsource": "4.0.0",
|
|
101
|
+
"glob": "11.0.3",
|
|
102
|
+
"husky": "9.1.7",
|
|
103
|
+
"prettier": "3.6.2",
|
|
104
|
+
"rimraf": "^6.0.1",
|
|
105
|
+
"typedoc": "^0.28.12",
|
|
106
|
+
"typescript": "5.9.2",
|
|
107
|
+
"vitest": "3.2.4"
|
|
40
108
|
},
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
109
|
+
"keywords": [
|
|
110
|
+
"bitcoin",
|
|
111
|
+
"wallet",
|
|
112
|
+
"taproot",
|
|
113
|
+
"ark",
|
|
114
|
+
"sdk",
|
|
115
|
+
"arkade"
|
|
116
|
+
],
|
|
117
|
+
"author": "Ark Labs",
|
|
118
|
+
"license": "MIT",
|
|
119
|
+
"packageManager": "pnpm@10.20.0",
|
|
120
|
+
"engines": {
|
|
121
|
+
"node": ">=20.0.0"
|
|
122
|
+
},
|
|
123
|
+
"pnpm": {
|
|
124
|
+
"overrides": {
|
|
125
|
+
"esbuild": ">=0.25.0",
|
|
126
|
+
"brace-expansion": ">=2.0.2",
|
|
127
|
+
"minimatch": "9.0.3"
|
|
128
|
+
}
|
|
46
129
|
}
|
|
47
|
-
|
|
48
|
-
"files": [
|
|
49
|
-
"dist"
|
|
50
|
-
],
|
|
51
|
-
"publishConfig": {
|
|
52
|
-
"access": "public",
|
|
53
|
-
"registry": "https://registry.npmjs.org/"
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"@noble/curves": "2.0.0",
|
|
57
|
-
"@noble/secp256k1": "3.0.0",
|
|
58
|
-
"@scure/base": "2.0.0",
|
|
59
|
-
"@scure/btc-signer": "2.0.1",
|
|
60
|
-
"bip68": "1.0.4"
|
|
61
|
-
},
|
|
62
|
-
"devDependencies": {
|
|
63
|
-
"@types/node": "24.3.1",
|
|
64
|
-
"@vitest/coverage-v8": "3.2.4",
|
|
65
|
-
"esbuild": "^0.25.9",
|
|
66
|
-
"expo": "~52.0.47",
|
|
67
|
-
"eventsource": "4.0.0",
|
|
68
|
-
"glob": "11.0.3",
|
|
69
|
-
"husky": "9.1.7",
|
|
70
|
-
"prettier": "3.6.2",
|
|
71
|
-
"rimraf": "^6.0.1",
|
|
72
|
-
"typedoc": "^0.28.12",
|
|
73
|
-
"typescript": "5.9.2",
|
|
74
|
-
"vitest": "3.2.4"
|
|
75
|
-
},
|
|
76
|
-
"keywords": [
|
|
77
|
-
"bitcoin",
|
|
78
|
-
"wallet",
|
|
79
|
-
"taproot",
|
|
80
|
-
"ark",
|
|
81
|
-
"sdk",
|
|
82
|
-
"arkade"
|
|
83
|
-
],
|
|
84
|
-
"author": "Ark Labs",
|
|
85
|
-
"license": "MIT",
|
|
86
|
-
"engines": {
|
|
87
|
-
"node": ">=20.0.0"
|
|
88
|
-
},
|
|
89
|
-
"scripts": {
|
|
90
|
-
"build": "rimraf dist && pnpm run build:esm && node scripts/add-extensions.js && pnpm run build:cjs && pnpm run build:types && node scripts/generate-package-files.js",
|
|
91
|
-
"build:esm": "tsc -p tsconfig.esm.json --outDir dist/esm",
|
|
92
|
-
"build:cjs": "tsc -p tsconfig.cjs.json --outDir dist/cjs",
|
|
93
|
-
"build:types": "tsc -p tsconfig.json --outDir dist/types --emitDeclarationOnly",
|
|
94
|
-
"build:browser": "node scripts/build-browser.js",
|
|
95
|
-
"docs:build": "pnpm run build:types && pnpm typedoc",
|
|
96
|
-
"docs:open": "open ./docs/index.html",
|
|
97
|
-
"test": "vitest run",
|
|
98
|
-
"test:master": "ARK_ENV=master vitest run",
|
|
99
|
-
"test:unit": "vitest run --exclude test/e2e",
|
|
100
|
-
"test:setup": "node test/setup.js",
|
|
101
|
-
"test:setup-docker": "node test/setup.js docker",
|
|
102
|
-
"test:build-docker": "docker compose -f docker-compose.yml build --no-cache",
|
|
103
|
-
"test:up-docker": "docker compose -f docker-compose.yml up -d",
|
|
104
|
-
"test:down-docker": "docker compose -f docker-compose.yml down",
|
|
105
|
-
"test:integration": "vitest run test/e2e/**",
|
|
106
|
-
"test:integration-docker": "ARK_ENV=docker vitest run test/e2e/**",
|
|
107
|
-
"test:watch": "vitest",
|
|
108
|
-
"test:coverage": "vitest run --coverage",
|
|
109
|
-
"test:sw": "pnpm run build:browser && node test/serviceWorker/serve.js",
|
|
110
|
-
"expo:web:install": "cd examples/expo-demo && pnpm install",
|
|
111
|
-
"expo:web": "cd examples/expo-demo && pnpm start",
|
|
112
|
-
"format": "prettier --write src test examples",
|
|
113
|
-
"lint": "prettier --check src test examples",
|
|
114
|
-
"audit": "pnpm audit",
|
|
115
|
-
"preinstall": "npx only-allow pnpm",
|
|
116
|
-
"release": "bash scripts/release.sh",
|
|
117
|
-
"release:dry-run": "bash scripts/release.sh --dry-run",
|
|
118
|
-
"release:cleanup": "bash scripts/release.sh --cleanup"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
130
|
+
}
|