@chainflip/bitcoin 0.2.2 → 1.0.1
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/index.cjs +215 -204
- package/dist/index.d.cts +4 -22
- package/dist/index.d.ts +4 -22
- package/dist/index.mjs +216 -205
- package/package.json +7 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*/
|
|
3
|
-
declare enum BitcoinNetwork$1 {
|
|
4
|
-
Mainnet = 0,
|
|
5
|
-
Testnet = 1,
|
|
6
|
-
Regtest = 2,
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
*/
|
|
10
|
-
declare enum AddressEncoding {
|
|
11
|
-
P2WPKH = 0,
|
|
12
|
-
P2SH = 1,
|
|
13
|
-
P2PKH = 2,
|
|
14
|
-
P2WSH = 3,
|
|
15
|
-
Taproot = 4,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type BitcoinAddressType = keyof typeof AddressEncoding;
|
|
19
1
|
type ChainflipNetwork = 'mainnet' | 'perseverance' | 'sisyphos' | 'backspin';
|
|
20
2
|
type BitcoinNetwork = 'mainnet' | 'testnet' | 'regtest';
|
|
21
|
-
|
|
22
|
-
declare const
|
|
23
|
-
declare const isValidAddressForNetwork: (address: string, network:
|
|
3
|
+
type AddressType = 'P2WPKH' | 'P2SH' | 'P2PKH' | 'P2WSH' | 'Taproot';
|
|
4
|
+
declare const encodeAddress: (data: `0x${string}`, kind: AddressType, cfOrBtcnetwork: BitcoinNetwork | ChainflipNetwork) => string;
|
|
5
|
+
declare const isValidAddressForNetwork: (address: string, network: BitcoinNetwork) => boolean;
|
|
24
6
|
|
|
25
|
-
export {
|
|
7
|
+
export { encodeAddress, isValidAddressForNetwork };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*/
|
|
3
|
-
declare enum BitcoinNetwork$1 {
|
|
4
|
-
Mainnet = 0,
|
|
5
|
-
Testnet = 1,
|
|
6
|
-
Regtest = 2,
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
*/
|
|
10
|
-
declare enum AddressEncoding {
|
|
11
|
-
P2WPKH = 0,
|
|
12
|
-
P2SH = 1,
|
|
13
|
-
P2PKH = 2,
|
|
14
|
-
P2WSH = 3,
|
|
15
|
-
Taproot = 4,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type BitcoinAddressType = keyof typeof AddressEncoding;
|
|
19
1
|
type ChainflipNetwork = 'mainnet' | 'perseverance' | 'sisyphos' | 'backspin';
|
|
20
2
|
type BitcoinNetwork = 'mainnet' | 'testnet' | 'regtest';
|
|
21
|
-
|
|
22
|
-
declare const
|
|
23
|
-
declare const isValidAddressForNetwork: (address: string, network:
|
|
3
|
+
type AddressType = 'P2WPKH' | 'P2SH' | 'P2PKH' | 'P2WSH' | 'Taproot';
|
|
4
|
+
declare const encodeAddress: (data: `0x${string}`, kind: AddressType, cfOrBtcnetwork: BitcoinNetwork | ChainflipNetwork) => string;
|
|
5
|
+
declare const isValidAddressForNetwork: (address: string, network: BitcoinNetwork) => boolean;
|
|
24
6
|
|
|
25
|
-
export {
|
|
7
|
+
export { encodeAddress, isValidAddressForNetwork };
|