@dynamic-labs-wallet/btc 0.0.0-pr506.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/index.cjs.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/index.cjs.js ADDED
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const version = '0.0.1';
4
+
5
+ exports.version = version;
package/index.esm.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/index.esm.js ADDED
@@ -0,0 +1,3 @@
1
+ const version = '0.0.1';
2
+
3
+ export { version };
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@dynamic-labs-wallet/btc",
3
+ "version": "0.0.0-pr506.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "dependencies": {
8
+ "@dynamic-labs-wallet/browser": "0.0.0-pr506.0"
9
+ },
10
+ "nx": {
11
+ "sourceRoot": "packages/btc/src",
12
+ "projectType": "library",
13
+ "name": "btc",
14
+ "targets": {
15
+ "build": {}
16
+ }
17
+ },
18
+ "main": "./index.cjs.js",
19
+ "module": "./index.esm.js",
20
+ "types": "./index.esm.d.ts",
21
+ "exports": {
22
+ "./package.json": "./package.json",
23
+ ".": {
24
+ "types": "./index.esm.d.ts",
25
+ "import": "./index.esm.js",
26
+ "require": "./index.cjs.js",
27
+ "default": "./index.esm.js"
28
+ }
29
+ }
30
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const version = "0.0.1";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Enum representing supported Bitcoin address types.
3
+ */
4
+ export declare enum BitcoinAddressType {
5
+ /**
6
+ * Legacy address (P2PKH). Starts with "1".
7
+ */
8
+ LEGACY = "legacy",
9
+ /**
10
+ * Nested SegWit address (P2SH-P2WPKH). Starts with "3".
11
+ */
12
+ SEGWIT = "segwit",
13
+ /**
14
+ * Native SegWit address (P2WPKH). Starts with "bc1q".
15
+ */
16
+ NATIVE_SEGWIT = "native_segwit",
17
+ /**
18
+ * Taproot address (P2TR). Starts with "bc1p".
19
+ */
20
+ TAPROOT = "taproot"
21
+ }
22
+ /**
23
+ * Supported Bitcoin networks.
24
+ */
25
+ export type BitcoinNetwork = 'mainnet' | 'testnet';
26
+ /**
27
+ * Represents an Unspent Transaction Output (UTXO).
28
+ */
29
+ export type UTXO = {
30
+ /**
31
+ * The transaction ID where this output was created.
32
+ */
33
+ txid: string;
34
+ /**
35
+ * The index of the output in the transaction.
36
+ */
37
+ vout: number;
38
+ /**
39
+ * The value of the output in satoshis.
40
+ */
41
+ value: bigint;
42
+ /**
43
+ * The script public key of the output.
44
+ */
45
+ scriptPubKey?: Uint8Array;
46
+ /**
47
+ * The witness UTXO data, used for SegWit inputs.
48
+ */
49
+ witnessUtxo?: {
50
+ /**
51
+ * The script of the witness UTXO.
52
+ */
53
+ script: Uint8Array;
54
+ /**
55
+ * The amount of the witness UTXO in satoshis.
56
+ */
57
+ amount: bigint;
58
+ };
59
+ };
60
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,kBAAkB;IAC5B;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,aAAa,kBAAkB;IAC/B;;OAEG;IACH,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE;QACZ;;WAEG;QACH,MAAM,EAAE,UAAU,CAAC;QACnB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { EcdsaPublicKey } from '@dynamic-labs-wallet/browser';
2
+ /**
3
+ * Converts a public key input (various formats) to a Buffer.
4
+ * Handles objects with `pubkey` property, numeric key maps, `serializeUncompressed` methods, etc.
5
+ *
6
+ * @param pubkey - The raw public key input
7
+ * @returns The public key as a Buffer
8
+ */
9
+ export declare const convertPublicKeyToBuffer: (pubkey: EcdsaPublicKey | Uint8Array | string | Buffer | Record<string, unknown>) => Buffer;
10
+ //# sourceMappingURL=convertPublicKeyToBuffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertPublicKeyToBuffer.d.ts","sourceRoot":"","sources":["../../../src/utils/convertPublicKeyToBuffer/convertPublicKeyToBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,WAAY,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MA0B1H,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './convertPublicKeyToBuffer.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/convertPublicKeyToBuffer/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}