ecash-lib 3.1.0 → 4.0.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/README.md +2 -0
- package/dist/consts.d.ts +20 -0
- package/dist/consts.d.ts.map +1 -1
- package/dist/consts.js +21 -1
- package/dist/consts.js.map +1 -1
- package/dist/ffi/ecash_lib_wasm_bg_browser.js +2597 -1753
- package/dist/ffi/ecash_lib_wasm_bg_browser.wasm +0 -0
- package/dist/ffi/ecash_lib_wasm_bg_browser.wasm.d.ts +5 -1
- package/dist/ffi/ecash_lib_wasm_bg_nodejs.wasm +0 -0
- package/dist/ffi/ecash_lib_wasm_bg_nodejs.wasm.d.ts +5 -1
- package/dist/ffi/ecash_lib_wasm_browser.d.ts +22 -1
- package/dist/ffi/ecash_lib_wasm_browser.js +115 -0
- package/dist/ffi/ecash_lib_wasm_nodejs.d.ts +17 -0
- package/dist/ffi/ecash_lib_wasm_nodejs.js +116 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/initBrowser.js +7 -2
- package/dist/initBrowser.js.map +1 -1
- package/dist/initNodeJs.js +6 -1
- package/dist/initNodeJs.js.map +1 -1
- package/dist/io/bytes.d.ts +2 -0
- package/dist/io/bytes.d.ts.map +1 -1
- package/dist/io/bytes.js +10 -2
- package/dist/io/bytes.js.map +1 -1
- package/dist/payment/action.d.ts +107 -0
- package/dist/payment/action.d.ts.map +1 -0
- package/dist/payment/action.js +13 -0
- package/dist/payment/action.js.map +1 -0
- package/dist/payment/asn1.d.ts +61 -0
- package/dist/payment/asn1.d.ts.map +1 -0
- package/dist/payment/asn1.js +322 -0
- package/dist/payment/asn1.js.map +1 -0
- package/dist/payment/index.d.ts +5 -0
- package/dist/payment/index.d.ts.map +1 -0
- package/dist/payment/index.js +39 -0
- package/dist/payment/index.js.map +1 -0
- package/dist/payment/output.d.ts +31 -0
- package/dist/payment/output.d.ts.map +1 -0
- package/dist/payment/output.js +6 -0
- package/dist/payment/output.js.map +1 -0
- package/dist/payment/x509.d.ts +17 -0
- package/dist/payment/x509.d.ts.map +1 -0
- package/dist/payment/x509.js +23 -0
- package/dist/payment/x509.js.map +1 -0
- package/dist/publicKeyCrypto.d.ts +25 -0
- package/dist/publicKeyCrypto.d.ts.map +1 -0
- package/dist/publicKeyCrypto.js +48 -0
- package/dist/publicKeyCrypto.js.map +1 -0
- package/dist/token/alp.d.ts +28 -0
- package/dist/token/alp.d.ts.map +1 -1
- package/dist/token/alp.js +25 -2
- package/dist/token/alp.js.map +1 -1
- package/dist/token/alp.parse.d.ts +73 -0
- package/dist/token/alp.parse.d.ts.map +1 -0
- package/dist/token/alp.parse.js +168 -0
- package/dist/token/alp.parse.js.map +1 -0
- package/dist/token/common.d.ts +31 -0
- package/dist/token/common.d.ts.map +1 -1
- package/dist/token/common.js +23 -5
- package/dist/token/common.js.map +1 -1
- package/dist/token/empp.d.ts +10 -0
- package/dist/token/empp.d.ts.map +1 -1
- package/dist/token/empp.js +38 -1
- package/dist/token/empp.js.map +1 -1
- package/dist/token/slp.d.ts +20 -0
- package/dist/token/slp.d.ts.map +1 -1
- package/dist/token/slp.js +17 -2
- package/dist/token/slp.js.map +1 -1
- package/dist/token/slp.parse.d.ts +91 -0
- package/dist/token/slp.parse.d.ts.map +1 -0
- package/dist/token/slp.parse.js +251 -0
- package/dist/token/slp.parse.js.map +1 -0
- package/package.json +2 -2
- package/src/consts.ts +20 -0
- package/src/ffi/ecash_lib_wasm_bg_browser.js +2597 -1753
- package/src/ffi/ecash_lib_wasm_bg_browser.wasm +0 -0
- package/src/ffi/ecash_lib_wasm_bg_browser.wasm.d.ts +5 -1
- package/src/ffi/ecash_lib_wasm_bg_nodejs.wasm +0 -0
- package/src/ffi/ecash_lib_wasm_bg_nodejs.wasm.d.ts +5 -1
- package/src/ffi/ecash_lib_wasm_browser.d.ts +22 -1
- package/src/ffi/ecash_lib_wasm_browser.js +115 -0
- package/src/ffi/ecash_lib_wasm_nodejs.d.ts +17 -0
- package/src/ffi/ecash_lib_wasm_nodejs.js +116 -1
- package/src/index.ts +3 -0
- package/src/initBrowser.ts +7 -3
- package/src/initNodeJs.ts +6 -1
- package/src/io/bytes.ts +11 -2
- package/src/payment/action.ts +123 -0
- package/src/payment/asn1.ts +440 -0
- package/src/payment/index.ts +11 -0
- package/src/payment/output.ts +37 -0
- package/src/payment/x509.ts +21 -0
- package/src/publicKeyCrypto.ts +62 -0
- package/src/token/alp.parse.ts +258 -0
- package/src/token/alp.ts +41 -1
- package/src/token/common.ts +43 -4
- package/src/token/empp.ts +42 -1
- package/src/token/slp.parse.ts +386 -0
- package/src/token/slp.ts +42 -1
package/README.md
CHANGED
|
@@ -93,3 +93,5 @@ console.log(toHex(rawTx));
|
|
|
93
93
|
- 2.1.0 - Add `signRecoverable` and `recoverSig` to `Ecc` [D17667](https://reviews.bitcoinabc.org/D17667)
|
|
94
94
|
- 3.0.0 - Improve types and shapes in line with chronik proto updates [D17650](https://reviews.bitcoinabc.org/D17650)
|
|
95
95
|
- 3.1.0 - Add methods for signing and verifying messages [D17778](https://reviews.bitcoinabc.org/D17778)
|
|
96
|
+
- 3.2.0 - Add method for parsing pushes from an EMPP OP_RETURN [D18057](https://reviews.bitcoinabc.org/D18057)
|
|
97
|
+
- 4.0.0 - Add constants and types to support `ecash-wallet` [D17822](https://reviews.bitcoinabc.org/D17822)
|
package/dist/consts.d.ts
CHANGED
|
@@ -2,4 +2,24 @@
|
|
|
2
2
|
export declare const DEFAULT_DUST_SATS = 546n;
|
|
3
3
|
/** Default fee per kB on the eCash network. */
|
|
4
4
|
export declare const DEFAULT_FEE_SATS_PER_KB = 1000n;
|
|
5
|
+
/**
|
|
6
|
+
* Confirmations required before coinbase utxos
|
|
7
|
+
* are spendable
|
|
8
|
+
*
|
|
9
|
+
* On eCash, coinbase utxos may be
|
|
10
|
+
*
|
|
11
|
+
* - mining rewards
|
|
12
|
+
* - staking rewards
|
|
13
|
+
* - IFP rewards
|
|
14
|
+
*/
|
|
15
|
+
export declare const COINBASE_MATURITY = 100;
|
|
16
|
+
/**
|
|
17
|
+
* As of May 5, 2025, the max bytes permitted in an OP_RETURN
|
|
18
|
+
* output on the eCash (XEC) network
|
|
19
|
+
*
|
|
20
|
+
* NB SLP spec works within this limit, ALP spec supports actions
|
|
21
|
+
* beyond this limit. For now, ecash-wallet is written accounting
|
|
22
|
+
* for this limit in ALP token action validation.
|
|
23
|
+
*/
|
|
24
|
+
export declare const OP_RETURN_MAX_BYTES = 223;
|
|
5
25
|
//# sourceMappingURL=consts.d.ts.map
|
package/dist/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAIA,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,+CAA+C;AAC/C,eAAO,MAAM,uBAAuB,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAIA,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,+CAA+C;AAC/C,eAAO,MAAM,uBAAuB,QAAQ,CAAC;AAC7C;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAC"}
|
package/dist/consts.js
CHANGED
|
@@ -3,9 +3,29 @@
|
|
|
3
3
|
// Distributed under the MIT software license, see the accompanying
|
|
4
4
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DEFAULT_FEE_SATS_PER_KB = exports.DEFAULT_DUST_SATS = void 0;
|
|
6
|
+
exports.OP_RETURN_MAX_BYTES = exports.COINBASE_MATURITY = exports.DEFAULT_FEE_SATS_PER_KB = exports.DEFAULT_DUST_SATS = void 0;
|
|
7
7
|
/** Default dust limit on the eCash network. */
|
|
8
8
|
exports.DEFAULT_DUST_SATS = 546n;
|
|
9
9
|
/** Default fee per kB on the eCash network. */
|
|
10
10
|
exports.DEFAULT_FEE_SATS_PER_KB = 1000n;
|
|
11
|
+
/**
|
|
12
|
+
* Confirmations required before coinbase utxos
|
|
13
|
+
* are spendable
|
|
14
|
+
*
|
|
15
|
+
* On eCash, coinbase utxos may be
|
|
16
|
+
*
|
|
17
|
+
* - mining rewards
|
|
18
|
+
* - staking rewards
|
|
19
|
+
* - IFP rewards
|
|
20
|
+
*/
|
|
21
|
+
exports.COINBASE_MATURITY = 100;
|
|
22
|
+
/**
|
|
23
|
+
* As of May 5, 2025, the max bytes permitted in an OP_RETURN
|
|
24
|
+
* output on the eCash (XEC) network
|
|
25
|
+
*
|
|
26
|
+
* NB SLP spec works within this limit, ALP spec supports actions
|
|
27
|
+
* beyond this limit. For now, ecash-wallet is written accounting
|
|
28
|
+
* for this limit in ALP token action validation.
|
|
29
|
+
*/
|
|
30
|
+
exports.OP_RETURN_MAX_BYTES = 223;
|
|
11
31
|
//# sourceMappingURL=consts.js.map
|
package/dist/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,mEAAmE;AACnE,sEAAsE;;;AAEtE,+CAA+C;AAClC,QAAA,iBAAiB,GAAG,IAAI,CAAC;AACtC,+CAA+C;AAClC,QAAA,uBAAuB,GAAG,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,mEAAmE;AACnE,sEAAsE;;;AAEtE,+CAA+C;AAClC,QAAA,iBAAiB,GAAG,IAAI,CAAC;AACtC,+CAA+C;AAClC,QAAA,uBAAuB,GAAG,KAAK,CAAC;AAC7C;;;;;;;;;GASG;AACU,QAAA,iBAAiB,GAAG,GAAG,CAAC;AACrC;;;;;;;GAOG;AACU,QAAA,mBAAmB,GAAG,GAAG,CAAC"}
|