@dynamic-labs-sdk/bitcoin 0.4.0 → 0.6.0
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/addBitcoinExtension/addBitcoinExtension.d.ts +4 -2
- package/dist/addBitcoinExtension/addBitcoinExtension.d.ts.map +1 -1
- package/dist/{addBitcoinInjectedWalletsExtension-C_-dWLm4.cjs.js → addBitcoinInjectedWalletsExtension-BRn8yV6c.cjs.js} +9 -2
- package/dist/{addBitcoinInjectedWalletsExtension-C_-dWLm4.cjs.js.map → addBitcoinInjectedWalletsExtension-BRn8yV6c.cjs.js.map} +1 -1
- package/dist/{addBitcoinInjectedWalletsExtension-C9RQD2KW.esm.js → addBitcoinInjectedWalletsExtension-CkICdKHm.esm.js} +3 -3
- package/dist/{addBitcoinInjectedWalletsExtension-C9RQD2KW.esm.js.map → addBitcoinInjectedWalletsExtension-CkICdKHm.esm.js.map} +1 -1
- package/dist/buildPsbt/buildPsbt.d.ts +24 -0
- package/dist/buildPsbt/buildPsbt.d.ts.map +1 -0
- package/dist/buildPsbt/index.d.ts +2 -0
- package/dist/buildPsbt/index.d.ts.map +1 -0
- package/dist/errors/FeeRecommendationsFetchError.d.ts +10 -0
- package/dist/errors/FeeRecommendationsFetchError.d.ts.map +1 -0
- package/dist/errors/InsufficientFundsError.d.ts +12 -0
- package/dist/errors/InsufficientFundsError.d.ts.map +1 -0
- package/dist/errors/InvalidAmountError.d.ts +11 -0
- package/dist/errors/InvalidAmountError.d.ts.map +1 -0
- package/dist/errors/NoUTXOsFoundError.d.ts +10 -0
- package/dist/errors/NoUTXOsFoundError.d.ts.map +1 -0
- package/dist/errors/PublicKeyNotFoundError.d.ts +5 -0
- package/dist/errors/PublicKeyNotFoundError.d.ts.map +1 -0
- package/dist/errors/SegwitOutputScriptError.d.ts +5 -0
- package/dist/errors/SegwitOutputScriptError.d.ts.map +1 -0
- package/dist/errors/TaprootAddressNotSupportedError.d.ts +5 -0
- package/dist/errors/TaprootAddressNotSupportedError.d.ts.map +1 -0
- package/dist/errors/TransactionBroadcastFailedError.d.ts +10 -0
- package/dist/errors/TransactionBroadcastFailedError.d.ts.map +1 -0
- package/dist/errors/TransactionRequiredError.d.ts +5 -0
- package/dist/errors/TransactionRequiredError.d.ts.map +1 -0
- package/dist/errors/UTXOsFetchError.d.ts +12 -0
- package/dist/errors/UTXOsFetchError.d.ts.map +1 -0
- package/dist/exports/index.d.ts +2 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +4 -0
- package/dist/exports/waas.d.ts.map +1 -0
- package/dist/index.cjs.js +721 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +692 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/injected.cjs.js +2 -1
- package/dist/injected.cjs.js.map +1 -1
- package/dist/injected.esm.js +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas/WaasBitcoinWalletProvider.types.d.ts +49 -0
- package/dist/waas/WaasBitcoinWalletProvider.types.d.ts.map +1 -0
- package/dist/waas/addWaasBitcoinExtension/addWaasBitcoinExtension.d.ts +11 -0
- package/dist/waas/addWaasBitcoinExtension/addWaasBitcoinExtension.d.ts.map +1 -0
- package/dist/waas/addWaasBitcoinExtension/index.d.ts +2 -0
- package/dist/waas/addWaasBitcoinExtension/index.d.ts.map +1 -0
- package/dist/waas/constants.d.ts +36 -0
- package/dist/waas/constants.d.ts.map +1 -0
- package/dist/waas/utils/addInputsToPsbt/addInputsToPsbt.d.ts +21 -0
- package/dist/waas/utils/addInputsToPsbt/addInputsToPsbt.d.ts.map +1 -0
- package/dist/waas/utils/addInputsToPsbt/index.d.ts +2 -0
- package/dist/waas/utils/addInputsToPsbt/index.d.ts.map +1 -0
- package/dist/waas/utils/addOutputsToPsbt/addOutputsToPsbt.d.ts +24 -0
- package/dist/waas/utils/addOutputsToPsbt/addOutputsToPsbt.d.ts.map +1 -0
- package/dist/waas/utils/addOutputsToPsbt/index.d.ts +2 -0
- package/dist/waas/utils/addOutputsToPsbt/index.d.ts.map +1 -0
- package/dist/waas/utils/broadcastTransaction/broadcastTransaction.d.ts +10 -0
- package/dist/waas/utils/broadcastTransaction/broadcastTransaction.d.ts.map +1 -0
- package/dist/waas/utils/broadcastTransaction/index.d.ts +2 -0
- package/dist/waas/utils/broadcastTransaction/index.d.ts.map +1 -0
- package/dist/waas/utils/buildPsbt/buildPsbt.d.ts +26 -0
- package/dist/waas/utils/buildPsbt/buildPsbt.d.ts.map +1 -0
- package/dist/waas/utils/buildPsbt/index.d.ts +2 -0
- package/dist/waas/utils/buildPsbt/index.d.ts.map +1 -0
- package/dist/waas/utils/calculateFeeAndChange/calculateFeeAndChange.d.ts +24 -0
- package/dist/waas/utils/calculateFeeAndChange/calculateFeeAndChange.d.ts.map +1 -0
- package/dist/waas/utils/calculateFeeAndChange/index.d.ts +2 -0
- package/dist/waas/utils/calculateFeeAndChange/index.d.ts.map +1 -0
- package/dist/waas/utils/calculateUTXOTotal/calculateUTXOTotal.d.ts +9 -0
- package/dist/waas/utils/calculateUTXOTotal/calculateUTXOTotal.d.ts.map +1 -0
- package/dist/waas/utils/calculateUTXOTotal/index.d.ts +2 -0
- package/dist/waas/utils/calculateUTXOTotal/index.d.ts.map +1 -0
- package/dist/waas/utils/createWalletProviderForWaasBitcoin/createWalletProviderForWaasBitcoin.d.ts +4 -0
- package/dist/waas/utils/createWalletProviderForWaasBitcoin/createWalletProviderForWaasBitcoin.d.ts.map +1 -0
- package/dist/waas/utils/createWalletProviderForWaasBitcoin/index.d.ts +2 -0
- package/dist/waas/utils/createWalletProviderForWaasBitcoin/index.d.ts.map +1 -0
- package/dist/waas/utils/estimateTransactionFee/estimateTransactionFee.d.ts +17 -0
- package/dist/waas/utils/estimateTransactionFee/estimateTransactionFee.d.ts.map +1 -0
- package/dist/waas/utils/estimateTransactionFee/index.d.ts +2 -0
- package/dist/waas/utils/estimateTransactionFee/index.d.ts.map +1 -0
- package/dist/waas/utils/getFeeRecommendations/getFeeRecommendations.d.ts +9 -0
- package/dist/waas/utils/getFeeRecommendations/getFeeRecommendations.d.ts.map +1 -0
- package/dist/waas/utils/getFeeRecommendations/index.d.ts +2 -0
- package/dist/waas/utils/getFeeRecommendations/index.d.ts.map +1 -0
- package/dist/waas/utils/getPublicKeyForWalletAccount/getPublicKeyForWalletAccount.d.ts +6 -0
- package/dist/waas/utils/getPublicKeyForWalletAccount/getPublicKeyForWalletAccount.d.ts.map +1 -0
- package/dist/waas/utils/getUTXOs/getUTXOs.d.ts +10 -0
- package/dist/waas/utils/getUTXOs/getUTXOs.d.ts.map +1 -0
- package/dist/waas/utils/getUTXOs/index.d.ts +2 -0
- package/dist/waas/utils/getUTXOs/index.d.ts.map +1 -0
- package/dist/waas/utils/selectUTXOsLargestFirst/index.d.ts +2 -0
- package/dist/waas/utils/selectUTXOsLargestFirst/index.d.ts.map +1 -0
- package/dist/waas/utils/selectUTXOsLargestFirst/selectUTXOsLargestFirst.d.ts +16 -0
- package/dist/waas/utils/selectUTXOsLargestFirst/selectUTXOsLargestFirst.d.ts.map +1 -0
- package/dist/waas/utils/validateAndSelectUTXOs/index.d.ts +2 -0
- package/dist/waas/utils/validateAndSelectUTXOs/index.d.ts.map +1 -0
- package/dist/waas/utils/validateAndSelectUTXOs/validateAndSelectUTXOs.d.ts +22 -0
- package/dist/waas/utils/validateAndSelectUTXOs/validateAndSelectUTXOs.d.ts.map +1 -0
- package/dist/waas/utils/validateNotTaproot/index.d.ts +2 -0
- package/dist/waas/utils/validateNotTaproot/index.d.ts.map +1 -0
- package/dist/waas/utils/validateNotTaproot/validateNotTaproot.d.ts +9 -0
- package/dist/waas/utils/validateNotTaproot/validateNotTaproot.d.ts.map +1 -0
- package/package.json +11 -4
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { WalletAccount } from '@dynamic-labs-sdk/client';
|
|
2
|
+
import type { WaasProvider } from '@dynamic-labs-sdk/client/waas/core';
|
|
3
|
+
import type { BitcoinWalletProvider } from '../BitcoinWalletProvider.types';
|
|
4
|
+
/**
|
|
5
|
+
* WaaS Bitcoin Wallet Provider type
|
|
6
|
+
* Combines base WaasProvider with Bitcoin-specific functionality
|
|
7
|
+
*/
|
|
8
|
+
export type WaasBitcoinWalletProvider = Omit<WaasProvider, 'signMessage'> & BitcoinWalletProvider & {
|
|
9
|
+
buildPsbt: (args: {
|
|
10
|
+
transaction: WaasBitcoinTransaction;
|
|
11
|
+
walletAccount: WalletAccount;
|
|
12
|
+
}) => Promise<string>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Fee priority levels for transaction fee estimation
|
|
16
|
+
*/
|
|
17
|
+
export type FeePriority = 'high' | 'medium' | 'low';
|
|
18
|
+
/**
|
|
19
|
+
* Bitcoin transaction with optional fee priority
|
|
20
|
+
* Extends the base BitcoinTransaction with fee priority for WaaS
|
|
21
|
+
*/
|
|
22
|
+
export type WaasBitcoinTransaction = {
|
|
23
|
+
amount: bigint;
|
|
24
|
+
feePriority?: FeePriority;
|
|
25
|
+
recipientAddress: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Unspent Transaction Output (UTXO) from mempool.space
|
|
29
|
+
*/
|
|
30
|
+
export type UTXO = {
|
|
31
|
+
status?: {
|
|
32
|
+
confirmed: boolean;
|
|
33
|
+
};
|
|
34
|
+
txid: string;
|
|
35
|
+
value: number;
|
|
36
|
+
vout: number;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Fee recommendations from mempool.space API
|
|
40
|
+
* All values are in sat/vB
|
|
41
|
+
*/
|
|
42
|
+
export type FeeRecommendations = {
|
|
43
|
+
economyFee?: number;
|
|
44
|
+
fastestFee?: number;
|
|
45
|
+
halfHourFee?: number;
|
|
46
|
+
hourFee?: number;
|
|
47
|
+
minimumFee?: number;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=WaasBitcoinWalletProvider.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaasBitcoinWalletProvider.types.d.ts","sourceRoot":"","sources":["../../src/waas/WaasBitcoinWalletProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,GACvE,qBAAqB,GAAG;IACtB,SAAS,EAAE,CAAC,IAAI,EAAE;QAChB,WAAW,EAAE,sBAAsB,CAAC;QACpC,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACvB,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const WAAS_BITCOIN_EXTENSION_KEY = "waasBitcoin";
|
|
2
|
+
/**
|
|
3
|
+
* Adds the Dynamic WaaS (Wallet as a Service) Bitcoin extension to the Dynamic client.
|
|
4
|
+
*
|
|
5
|
+
* This extension enables embedded wallet functionality for Bitcoin blockchain,
|
|
6
|
+
* allowing users to have wallets managed by Dynamic's infrastructure.
|
|
7
|
+
*
|
|
8
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9
|
+
*/
|
|
10
|
+
export declare const addWaasBitcoinExtension: (client?: import("@dynamic-labs-sdk/client").DynamicClient) => void;
|
|
11
|
+
//# sourceMappingURL=addWaasBitcoinExtension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addWaasBitcoinExtension.d.ts","sourceRoot":"","sources":["../../../src/waas/addWaasBitcoinExtension/addWaasBitcoinExtension.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,iEAAkC,IAgBrE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/waas/addWaasBitcoinExtension/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mempool.space API URL for mainnet
|
|
3
|
+
*/
|
|
4
|
+
export declare const MEMPOOL_API_URL = "https://mempool.space/api";
|
|
5
|
+
/**
|
|
6
|
+
* Number of satoshis per Bitcoin
|
|
7
|
+
*/
|
|
8
|
+
export declare const SATOSHIS_PER_BTC = 100000000;
|
|
9
|
+
/**
|
|
10
|
+
* Bitcoin's dust limit in satoshis
|
|
11
|
+
* Outputs below this value are considered "dust" and will be rejected by nodes
|
|
12
|
+
*/
|
|
13
|
+
export declare const DUST_LIMIT = 546;
|
|
14
|
+
/**
|
|
15
|
+
* Accurate vSize constants for Native SegWit (P2WPKH) transactions
|
|
16
|
+
* Used for precise fee estimation
|
|
17
|
+
*/
|
|
18
|
+
export declare const VSIZE_OVERHEAD = 10.5;
|
|
19
|
+
export declare const VSIZE_INPUT_P2WPKH = 68;
|
|
20
|
+
export declare const VSIZE_OUTPUT_P2WPKH = 31;
|
|
21
|
+
/**
|
|
22
|
+
* Minimum relay fee in satoshis
|
|
23
|
+
* Added to fee estimate to ensure transaction propagation
|
|
24
|
+
*/
|
|
25
|
+
export declare const MIN_RELAY_FEE = 111;
|
|
26
|
+
/**
|
|
27
|
+
* Conservative default fee estimate in satoshis
|
|
28
|
+
* Used as fallback when fee estimation fails
|
|
29
|
+
*/
|
|
30
|
+
export declare const DEFAULT_FEE_ESTIMATE = 1000;
|
|
31
|
+
/**
|
|
32
|
+
* RBF (Replace-By-Fee) sequence number
|
|
33
|
+
* 0xfffffffd = 4294967293 (enables RBF, not final)
|
|
34
|
+
*/
|
|
35
|
+
export declare const RBF_SEQUENCE = 4294967293;
|
|
36
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/waas/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,8BAA8B,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAc,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,YAAY,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Network, Psbt } from 'bitcoinjs-lib';
|
|
2
|
+
import type { UTXO } from '../../WaasBitcoinWalletProvider.types';
|
|
3
|
+
type AddInputsToPsbtOptions = {
|
|
4
|
+
network: Network;
|
|
5
|
+
psbt: Psbt;
|
|
6
|
+
publicKeyPair: {
|
|
7
|
+
publicKey: Uint8Array;
|
|
8
|
+
};
|
|
9
|
+
selectedUTXOs: UTXO[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Adds inputs to PSBT from selected UTXOs
|
|
13
|
+
*
|
|
14
|
+
* @param options.network - Bitcoin network configuration (mainnet or testnet)
|
|
15
|
+
* @param options.psbt - The PSBT instance to add inputs to
|
|
16
|
+
* @param options.publicKeyPair - Key pair containing the public key for witness script
|
|
17
|
+
* @param options.selectedUTXOs - Array of UTXOs to add as inputs
|
|
18
|
+
*/
|
|
19
|
+
export declare const addInputsToPsbt: (options: AddInputsToPsbtOptions) => void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=addInputsToPsbt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addInputsToPsbt.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/addInputsToPsbt/addInputsToPsbt.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAKnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAElE,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,EAAE;QAAE,SAAS,EAAE,UAAU,CAAA;KAAE,CAAC;IACzC,aAAa,EAAE,IAAI,EAAE,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,YAAa,sBAAsB,KAAG,IA2BjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/addInputsToPsbt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Network, Psbt } from 'bitcoinjs-lib';
|
|
2
|
+
type AddOutputsToPsbtOptions = {
|
|
3
|
+
accountAddress: string;
|
|
4
|
+
amountInSatoshis: number;
|
|
5
|
+
changeAmount: number;
|
|
6
|
+
hasChangeOutput: boolean;
|
|
7
|
+
network: Network;
|
|
8
|
+
psbt: Psbt;
|
|
9
|
+
recipientAddress: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Adds outputs to PSBT (recipient and optionally change)
|
|
13
|
+
*
|
|
14
|
+
* @param options.accountAddress - The sender's address for receiving change
|
|
15
|
+
* @param options.amountInSatoshis - Amount to send to the recipient in satoshis
|
|
16
|
+
* @param options.changeAmount - Amount to return as change in satoshis
|
|
17
|
+
* @param options.hasChangeOutput - Whether to include a change output
|
|
18
|
+
* @param options.network - Bitcoin network configuration (mainnet or testnet)
|
|
19
|
+
* @param options.psbt - The PSBT instance to add outputs to
|
|
20
|
+
* @param options.recipientAddress - The recipient's Bitcoin address
|
|
21
|
+
*/
|
|
22
|
+
export declare const addOutputsToPsbt: (options: AddOutputsToPsbtOptions) => void;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=addOutputsToPsbt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addOutputsToPsbt.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/addOutputsToPsbt/addOutputsToPsbt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMnD,KAAK,uBAAuB,GAAG;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,YAAa,uBAAuB,KAAG,IA6BnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/addOutputsToPsbt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sends a raw Bitcoin transaction to the mempool
|
|
3
|
+
*
|
|
4
|
+
* @param rawTransaction - The raw transaction in hex format
|
|
5
|
+
* @returns The transaction ID
|
|
6
|
+
* @throws {TransactionRequiredError} if no transaction is specified
|
|
7
|
+
* @throws {TransactionBroadcastFailedError} if broadcasting fails
|
|
8
|
+
*/
|
|
9
|
+
export declare const broadcastTransaction: (rawTransaction: string) => Promise<string>;
|
|
10
|
+
//# sourceMappingURL=broadcastTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broadcastTransaction.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/broadcastTransaction/broadcastTransaction.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,mBACf,MAAM,KACrB,OAAO,CAAC,MAAM,CAkBhB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/broadcastTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Network } from 'bitcoinjs-lib';
|
|
2
|
+
import type { FeePriority } from '../../WaasBitcoinWalletProvider.types';
|
|
3
|
+
type BuildPsbtOptions = {
|
|
4
|
+
accountAddress: string;
|
|
5
|
+
amountInSatoshis: bigint;
|
|
6
|
+
feePriority?: FeePriority;
|
|
7
|
+
network: Network;
|
|
8
|
+
publicKeyHex: string;
|
|
9
|
+
recipientAddress: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Builds a PSBT for a Bitcoin transaction with real UTXOs
|
|
13
|
+
* Uses Largest-First UTXO selection strategy with accurate vSize fee estimation
|
|
14
|
+
*
|
|
15
|
+
* @param options.accountAddress - The sender's Bitcoin address
|
|
16
|
+
* @param options.amountInSatoshis - Amount to send in satoshis
|
|
17
|
+
* @param options.feePriority - Priority level for fee estimation ('low', 'medium', or 'high')
|
|
18
|
+
* @param options.network - Bitcoin network configuration (mainnet or testnet)
|
|
19
|
+
* @param options.publicKeyHex - The sender's public key in hexadecimal format
|
|
20
|
+
* @param options.recipientAddress - The recipient's Bitcoin address
|
|
21
|
+
* @returns A PSBT in Base64 format
|
|
22
|
+
* @throws Error if insufficient funds, no UTXOs, or other errors
|
|
23
|
+
*/
|
|
24
|
+
export declare const buildPsbt: ({ accountAddress, amountInSatoshis, feePriority, network, publicKeyHex, recipientAddress, }: BuildPsbtOptions) => Promise<string>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=buildPsbt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildPsbt.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/buildPsbt/buildPsbt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAQ7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAWzE,KAAK,gBAAgB,GAAG;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,gGAOnB,gBAAgB,KAAG,OAAO,CAAC,MAAM,CAwFnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/buildPsbt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FeePriority, UTXO } from '../../WaasBitcoinWalletProvider.types';
|
|
2
|
+
type CalculateFeeAndChangeOptions = {
|
|
3
|
+
amountInSatoshis: bigint;
|
|
4
|
+
feePriority: FeePriority;
|
|
5
|
+
selectedTotalValue: number;
|
|
6
|
+
selectedUTXOs: UTXO[];
|
|
7
|
+
};
|
|
8
|
+
type CalculateFeeAndChangeResult = {
|
|
9
|
+
changeAmountNumber: number;
|
|
10
|
+
feeEstimate: number;
|
|
11
|
+
hasChangeOutput: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Calculates fee estimate and change amount, handling dust limit
|
|
15
|
+
*
|
|
16
|
+
* @param options.amountInSatoshis - Amount to send in satoshis
|
|
17
|
+
* @param options.feePriority - Priority level for fee estimation ('low', 'medium', or 'high')
|
|
18
|
+
* @param options.selectedTotalValue - Total value of selected UTXOs in satoshis
|
|
19
|
+
* @param options.selectedUTXOs - Array of selected UTXOs for the transaction
|
|
20
|
+
* @returns Object with feeEstimate, changeAmountNumber, and hasChangeOutput
|
|
21
|
+
*/
|
|
22
|
+
export declare const calculateFeeAndChange: ({ amountInSatoshis, feePriority, selectedTotalValue, selectedUTXOs, }: CalculateFeeAndChangeOptions) => Promise<CalculateFeeAndChangeResult>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=calculateFeeAndChange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateFeeAndChange.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/calculateFeeAndChange/calculateFeeAndChange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAG/E,KAAK,4BAA4B,GAAG;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,IAAI,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,2BAA2B,GAAG;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,0EAK/B,4BAA4B,KAAG,OAAO,CAAC,2BAA2B,CAmCpE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/calculateFeeAndChange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UTXO } from '../../WaasBitcoinWalletProvider.types';
|
|
2
|
+
/**
|
|
3
|
+
* Calculates the total value of UTXOs
|
|
4
|
+
*
|
|
5
|
+
* @param utxos - Array of UTXOs
|
|
6
|
+
* @returns Total value in satoshis
|
|
7
|
+
*/
|
|
8
|
+
export declare const calculateUTXOTotal: (utxos: UTXO[]) => number;
|
|
9
|
+
//# sourceMappingURL=calculateUTXOTotal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateUTXOTotal.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/calculateUTXOTotal/calculateUTXOTotal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UAAW,IAAI,EAAE,KAAG,MACiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/calculateUTXOTotal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/waas/utils/createWalletProviderForWaasBitcoin/createWalletProviderForWaasBitcoin.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DynamicClient } from '@dynamic-labs-sdk/client';
|
|
2
|
+
import type { WaasBitcoinWalletProvider } from '../../WaasBitcoinWalletProvider.types';
|
|
3
|
+
export declare const createWalletProviderForWaasBitcoin: (sdkClient: DynamicClient) => WaasBitcoinWalletProvider;
|
|
4
|
+
//# sourceMappingURL=createWalletProviderForWaasBitcoin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createWalletProviderForWaasBitcoin.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/createWalletProviderForWaasBitcoin/createWalletProviderForWaasBitcoin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAoB9D,OAAO,KAAK,EAEV,yBAAyB,EAC1B,MAAM,uCAAuC,CAAC;AAK/C,eAAO,MAAM,kCAAkC,cAClC,aAAa,KACvB,yBAqLF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/createWalletProviderForWaasBitcoin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FeePriority } from '../../WaasBitcoinWalletProvider.types';
|
|
2
|
+
type EstimateTransactionFeeOptions = {
|
|
3
|
+
feePriority?: FeePriority;
|
|
4
|
+
numInputs: number;
|
|
5
|
+
numOutputs: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Estimates transaction fees based on number of inputs and outputs using accurate vSize
|
|
9
|
+
*
|
|
10
|
+
* @param options.feePriority - Priority level for fee estimation ('low', 'medium', or 'high')
|
|
11
|
+
* @param options.numInputs - Number of transaction inputs (UTXOs being spent)
|
|
12
|
+
* @param options.numOutputs - Number of transaction outputs
|
|
13
|
+
* @returns Estimated fee in satoshis
|
|
14
|
+
*/
|
|
15
|
+
export declare const estimateTransactionFee: ({ feePriority, numInputs, numOutputs, }: EstimateTransactionFeeOptions) => Promise<number>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=estimateTransactionFee.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimateTransactionFee.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/estimateTransactionFee/estimateTransactionFee.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAGzE,KAAK,6BAA6B,GAAG;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,4CAIhC,6BAA6B,KAAG,OAAO,CAAC,MAAM,CAwBhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/estimateTransactionFee/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FeeRecommendations } from '../../WaasBitcoinWalletProvider.types';
|
|
2
|
+
/**
|
|
3
|
+
* Gets fee recommendations from mempool.space API
|
|
4
|
+
*
|
|
5
|
+
* @returns Fee recommendation data with rates in sat/vB
|
|
6
|
+
* @throws FeeRecommendationsFetchError if fetching fee recommendations fails
|
|
7
|
+
*/
|
|
8
|
+
export declare const getFeeRecommendations: () => Promise<FeeRecommendations>;
|
|
9
|
+
//# sourceMappingURL=getFeeRecommendations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFeeRecommendations.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/getFeeRecommendations/getFeeRecommendations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,kBAAkB,CAQxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/getFeeRecommendations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DynamicClient, WalletAccount } from '@dynamic-labs-sdk/client';
|
|
2
|
+
/**
|
|
3
|
+
* Gets the public key for a wallet account from the user's verified credentials
|
|
4
|
+
*/
|
|
5
|
+
export declare const getPublicKeyForWalletAccount: (walletAccount: WalletAccount, client: DynamicClient) => string;
|
|
6
|
+
//# sourceMappingURL=getPublicKeyForWalletAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPublicKeyForWalletAccount.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/getPublicKeyForWalletAccount/getPublicKeyForWalletAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK7E;;GAEG;AACH,eAAO,MAAM,4BAA4B,kBACxB,aAAa,UACpB,aAAa,KACpB,MAcF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UTXO } from '../../WaasBitcoinWalletProvider.types';
|
|
2
|
+
/**
|
|
3
|
+
* Gets UTXOs for a Bitcoin address from mempool.space API
|
|
4
|
+
*
|
|
5
|
+
* @param address - The Bitcoin address to get UTXOs for
|
|
6
|
+
* @returns Array of UTXOs
|
|
7
|
+
* @throws UTXOsFetchError if fetching UTXOs fails
|
|
8
|
+
*/
|
|
9
|
+
export declare const getUTXOs: (address: string) => Promise<UTXO[]>;
|
|
10
|
+
//# sourceMappingURL=getUTXOs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUTXOs.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/getUTXOs/getUTXOs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,YAAmB,MAAM,KAAG,OAAO,CAAC,IAAI,EAAE,CAQ9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/getUTXOs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/selectUTXOsLargestFirst/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UTXO } from '../../WaasBitcoinWalletProvider.types';
|
|
2
|
+
type SelectUTXOsLargestFirstOptions = {
|
|
3
|
+
targetAmount: number;
|
|
4
|
+
utxos: UTXO[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Selects UTXOs using Largest-First (Accumulator) strategy
|
|
8
|
+
* Sorts UTXOs by value (descending) and selects until we have enough to cover amount + fees
|
|
9
|
+
*
|
|
10
|
+
* @param options.targetAmount - Target amount in satoshis (amount + fees + dust limit)
|
|
11
|
+
* @param options.utxos - Array of available UTXOs to select from
|
|
12
|
+
* @returns Selected UTXOs
|
|
13
|
+
*/
|
|
14
|
+
export declare const selectUTXOsLargestFirst: (options: SelectUTXOsLargestFirstOptions) => UTXO[];
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=selectUTXOsLargestFirst.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectUTXOsLargestFirst.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/selectUTXOsLargestFirst/selectUTXOsLargestFirst.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAElE,KAAK,8BAA8B,GAAG;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,YACzB,8BAA8B,WAmBxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/validateAndSelectUTXOs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { UTXO } from '../../WaasBitcoinWalletProvider.types';
|
|
2
|
+
type ValidateAndSelectUTXOsOptions = {
|
|
3
|
+
allUTXOs: UTXO[];
|
|
4
|
+
amountInSatoshis: number;
|
|
5
|
+
feeEstimate: number;
|
|
6
|
+
selectedTotal: number;
|
|
7
|
+
selectedUTXOs: UTXO[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Validates and ensures sufficient funds for the transaction
|
|
11
|
+
*
|
|
12
|
+
* @param options.allUTXOs - Complete array of available UTXOs for the address
|
|
13
|
+
* @param options.amountInSatoshis - Amount to send in satoshis
|
|
14
|
+
* @param options.feeEstimate - Estimated transaction fee in satoshis
|
|
15
|
+
* @param options.selectedTotal - Total value of initially selected UTXOs in satoshis
|
|
16
|
+
* @param options.selectedUTXOs - Array of initially selected UTXOs
|
|
17
|
+
* @returns Validated selected UTXOs
|
|
18
|
+
* @throws InsufficientFundsError if insufficient funds
|
|
19
|
+
*/
|
|
20
|
+
export declare const validateAndSelectUTXOs: (options: ValidateAndSelectUTXOsOptions) => UTXO[];
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=validateAndSelectUTXOs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateAndSelectUTXOs.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/validateAndSelectUTXOs/validateAndSelectUTXOs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAGlE,KAAK,6BAA6B,GAAG;IACnC,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,IAAI,EAAE,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,YACxB,6BAA6B,WAiCvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/validateNotTaproot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates that the address is not a Taproot address
|
|
3
|
+
* Only Native SegWit (P2WPKH) is supported for PSBT building
|
|
4
|
+
*
|
|
5
|
+
* @param accountAddress - The account address to check
|
|
6
|
+
* @throws TaprootAddressNotSupportedError if address is Taproot
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateNotTaproot: (accountAddress: string) => void;
|
|
9
|
+
//# sourceMappingURL=validateNotTaproot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateNotTaproot.d.ts","sourceRoot":"","sources":["../../../../src/waas/utils/validateNotTaproot/validateNotTaproot.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,mBAAoB,MAAM,KAAG,IAO3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-sdk/bitcoin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -19,16 +19,23 @@
|
|
|
19
19
|
"types": "./dist/exports/injected.d.ts",
|
|
20
20
|
"import": "./dist/injected.esm.js",
|
|
21
21
|
"default": "./dist/injected.cjs.js"
|
|
22
|
+
},
|
|
23
|
+
"./waas": {
|
|
24
|
+
"types": "./dist/exports/waas.d.ts",
|
|
25
|
+
"import": "./dist/waas.esm.js",
|
|
26
|
+
"default": "./dist/waas.cjs.js"
|
|
22
27
|
}
|
|
23
28
|
},
|
|
24
29
|
"dependencies": {
|
|
25
|
-
"@
|
|
30
|
+
"@bitcoinerlab/secp256k1": "1.2.0",
|
|
31
|
+
"@dynamic-labs/sdk-api-core": "0.0.864",
|
|
26
32
|
"@leather.io/rpc": "2.20.20",
|
|
27
33
|
"bitcoinjs-lib": "7.0.0",
|
|
34
|
+
"ecpair": "3.0.0",
|
|
28
35
|
"jsontokens": "4.0.1",
|
|
29
36
|
"sats-connect": "4.2.1",
|
|
30
|
-
"@dynamic-labs-sdk/assert-package-version": "0.
|
|
31
|
-
"@dynamic-labs-sdk/client": "0.
|
|
37
|
+
"@dynamic-labs-sdk/assert-package-version": "0.6.0",
|
|
38
|
+
"@dynamic-labs-sdk/client": "0.6.0"
|
|
32
39
|
},
|
|
33
40
|
"devDependencies": {
|
|
34
41
|
"vitest": "1.6.1"
|