ecash-lib 4.3.3 → 4.4.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/index.d.ts CHANGED
@@ -26,5 +26,6 @@ export * from './token/common.js';
26
26
  export * from './token/empp.js';
27
27
  export * from './token/slp.js';
28
28
  export * from './token/slp.parse.js';
29
+ export * from './parse/opreturn.js';
29
30
  export * as payment from './payment';
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -58,5 +58,6 @@ __exportStar(require("./token/common.js"), exports);
58
58
  __exportStar(require("./token/empp.js"), exports);
59
59
  __exportStar(require("./token/slp.js"), exports);
60
60
  __exportStar(require("./token/slp.parse.js"), exports);
61
+ __exportStar(require("./parse/opreturn.js"), exports);
61
62
  exports.payment = __importStar(require("./payment"));
62
63
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,mEAAmE;AACnE,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtE,8CAA4B;AAC5B,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,8CAA4B;AAC5B,8CAA4B;AAC5B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC;AACrC,mDAAiC;AACjC,0CAAwB;AACxB,iDAA+B;AAC/B,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAChC,iDAA+B;AAC/B,sDAAoC;AACpC,uDAAqC;AACrC,iDAA+B;AAC/B,uDAAqC;AACrC,oDAAkC;AAClC,kDAAgC;AAChC,iDAA+B;AAC/B,uDAAqC;AACrC,qDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,mEAAmE;AACnE,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtE,8CAA4B;AAC5B,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,8CAA4B;AAC5B,8CAA4B;AAC5B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC;AACrC,mDAAiC;AACjC,0CAAwB;AACxB,iDAA+B;AAC/B,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAChC,iDAA+B;AAC/B,sDAAoC;AACpC,uDAAqC;AACrC,iDAA+B;AAC/B,uDAAqC;AACrC,oDAAkC;AAClC,kDAAgC;AAChC,iDAA+B;AAC/B,uDAAqC;AACrC,sDAAoC;AACpC,qDAAqC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Convert an OP_RETURN outputScript into an array of pushes
3
+ * @param outputScript - An OP_RETURN output script, e.g. 6a042e7865630003333333150076458db0ed96fe9863fc1ccec9fa2cfab884b0f6
4
+ * @returns An array of hex pushes, e.g. ['2e786563', '00', '333333', '0076458db0ed96fe9863fc1ccec9fa2cfab884b0f6']
5
+ * @throws Error if outputScript is not a valid OP_RETURN outputScript
6
+ */
7
+ export declare function getStackArray(outputScript: string): string[];
8
+ /**
9
+ * Swap endianness of a hex string
10
+ * @param hexString a string of hex bytes, e.g. 04000000
11
+ * @returns a string of hex bytes with swapped endianness, e.g. for 04000000, returns 00000004
12
+ */
13
+ export declare function swapEndianness(hexString: string): string;
14
+ /**
15
+ * Consume a specified number of bytes from a stack object
16
+ * @param stack an object containing a hex string outputScript of an eCash tx, e.g. {remainingHex: '6a...'}
17
+ * @param byteCount integer
18
+ * @returns consumed, a hex string of byteCount bytes
19
+ * The stack object is modified in place so that consumed bytes are removed
20
+ */
21
+ export declare function consume(stack: {
22
+ remainingHex: string;
23
+ }, byteCount: number): string;
24
+ /**
25
+ * Parse, decode and consume the data push from the top of the stack.
26
+ * If the stack does not start with a valid push, it raises an error and the stack is left untouched.
27
+ * @param stack an object containing a hex string outputScript of an eCash tx, e.g. {remainingHex: '4d...'}
28
+ * @returns {data, pushedWith}
29
+ * stack is modified in place so that the push is removed
30
+ */
31
+ export declare function consumeNextPush(stack: {
32
+ remainingHex: string;
33
+ }): {
34
+ data: string;
35
+ pushedWith: string;
36
+ };
37
+ //# sourceMappingURL=opreturn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opreturn.d.ts","sourceRoot":"","sources":["../../src/parse/opreturn.ts"],"names":[],"mappings":"AAgCA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAiC5D;AAmCD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA4BxD;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CACnB,KAAK,EAAE;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,EAC/B,SAAS,EAAE,MAAM,GAClB,MAAM,CAmCR;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,GAAG;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACtB,CAyDA"}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ // Copyright (c) 2025 The Bitcoin developers
3
+ // Distributed under the MIT software license, see the accompanying
4
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.consumeNextPush = exports.consume = exports.swapEndianness = exports.getStackArray = void 0;
7
+ const consts_js_1 = require("../consts.js");
8
+ const hex_js_1 = require("../io/hex.js");
9
+ const opcode_js_1 = require("../opcode.js");
10
+ /**
11
+ * Convert an OP_RETURN outputScript into an array of pushes
12
+ * @param outputScript - An OP_RETURN output script, e.g. 6a042e7865630003333333150076458db0ed96fe9863fc1ccec9fa2cfab884b0f6
13
+ * @returns An array of hex pushes, e.g. ['2e786563', '00', '333333', '0076458db0ed96fe9863fc1ccec9fa2cfab884b0f6']
14
+ * @throws Error if outputScript is not a valid OP_RETURN outputScript
15
+ */
16
+ function getStackArray(outputScript) {
17
+ const opReturnHex = (0, hex_js_1.toHex)(new Uint8Array([opcode_js_1.OP_RETURN]));
18
+ // Validate for OP_RETURN outputScript
19
+ if (typeof outputScript !== 'string' ||
20
+ !outputScript.startsWith(opReturnHex)) {
21
+ throw new Error(`outputScript must be a string that starts with ${opReturnHex}`);
22
+ }
23
+ if (outputScript.length > 2 * consts_js_1.OP_RETURN_MAX_BYTES) {
24
+ throw new Error(`Invalid eCash OP_RETURN size: ${outputScript.length / 2} bytes. eCash OP_RETURN outputs cannot exceed ${consts_js_1.OP_RETURN_MAX_BYTES} bytes.`);
25
+ }
26
+ // Create stack, the input object required by consumeNextPush
27
+ const stack = {
28
+ remainingHex: outputScript.slice(opReturnHex.length),
29
+ };
30
+ // Initialize stackArray
31
+ const stackArray = [];
32
+ while (stack.remainingHex.length > 0) {
33
+ stackArray.push(consumeNextPush(stack).data);
34
+ }
35
+ return stackArray;
36
+ }
37
+ exports.getStackArray = getStackArray;
38
+ /**
39
+ * One-byte stack additions that can be pushed to OP_RETURN in isolation
40
+ */
41
+ const ONE_BYTE_STACK_ADDS = [
42
+ opcode_js_1.OP_0,
43
+ opcode_js_1.OP_1NEGATE,
44
+ opcode_js_1.OP_RESERVED,
45
+ opcode_js_1.OP_1,
46
+ opcode_js_1.OP_2,
47
+ opcode_js_1.OP_3,
48
+ opcode_js_1.OP_4,
49
+ opcode_js_1.OP_5,
50
+ opcode_js_1.OP_6,
51
+ opcode_js_1.OP_7,
52
+ opcode_js_1.OP_8,
53
+ opcode_js_1.OP_9,
54
+ opcode_js_1.OP_10,
55
+ opcode_js_1.OP_11,
56
+ opcode_js_1.OP_12,
57
+ opcode_js_1.OP_13,
58
+ opcode_js_1.OP_14,
59
+ opcode_js_1.OP_15,
60
+ opcode_js_1.OP_16,
61
+ ];
62
+ /**
63
+ * One-byte pushdata opcodes (0x01-0x4b)
64
+ */
65
+ const ONE_BYTE_PUSHDATAS = [];
66
+ for (let i = 1; i <= 0x4b; i++) {
67
+ ONE_BYTE_PUSHDATAS.push(i);
68
+ }
69
+ /**
70
+ * Swap endianness of a hex string
71
+ * @param hexString a string of hex bytes, e.g. 04000000
72
+ * @returns a string of hex bytes with swapped endianness, e.g. for 04000000, returns 00000004
73
+ */
74
+ function swapEndianness(hexString) {
75
+ const byteLength = 2;
76
+ if (hexString.length % byteLength === 1) {
77
+ throw new Error(`Invalid input length ${hexString.length}: hexString must be divisible by bytes, i.e. have an even length.`);
78
+ }
79
+ // Check if input contains only hex characters
80
+ if (!/^[\da-f]+$/i.test(hexString)) {
81
+ throw new Error(`Invalid input. ${hexString} contains non-hexadecimal characters.`);
82
+ }
83
+ let swappedEndianHexString = '';
84
+ let remainingHex = hexString;
85
+ while (remainingHex.length > 0) {
86
+ // Get the last byte on the string
87
+ const thisByte = remainingHex.slice(-byteLength);
88
+ // Add thisByte to swappedEndianHexString in swapped-endian order
89
+ swappedEndianHexString += thisByte;
90
+ // Remove thisByte from remainingHex
91
+ remainingHex = remainingHex.slice(0, -byteLength);
92
+ }
93
+ return swappedEndianHexString;
94
+ }
95
+ exports.swapEndianness = swapEndianness;
96
+ /**
97
+ * Consume a specified number of bytes from a stack object
98
+ * @param stack an object containing a hex string outputScript of an eCash tx, e.g. {remainingHex: '6a...'}
99
+ * @param byteCount integer
100
+ * @returns consumed, a hex string of byteCount bytes
101
+ * The stack object is modified in place so that consumed bytes are removed
102
+ */
103
+ function consume(stack, byteCount) {
104
+ // Validation for stack
105
+ if (typeof stack !== 'object' || typeof stack.remainingHex !== 'string') {
106
+ throw new Error('Invalid input. Stack must be an object with string stored at key remainingHex.');
107
+ }
108
+ if (stack.remainingHex.length % 2 === 1) {
109
+ throw new Error('Invalid input: stack.remainingHex must be divisible by bytes, i.e. have an even length.');
110
+ }
111
+ // Throw an error if byteCount input is not an integer
112
+ if (!Number.isInteger(byteCount)) {
113
+ throw new Error(`byteCount must be an integer, received ${byteCount}`);
114
+ }
115
+ // One byte is 2 characters of a hex string
116
+ const byteLength = 2;
117
+ // Get byte slice size
118
+ const byteSliceSize = byteCount * byteLength;
119
+ // Throw an error if byteCount is greater than consumable hex bytes in outputScript
120
+ if (byteSliceSize > stack.remainingHex.length) {
121
+ throw new Error(`consume called with byteCount (${byteCount}) greater than remaining bytes in outputScript (${stack.remainingHex.length / byteLength})`);
122
+ }
123
+ // Get consumed bytes
124
+ const consumed = stack.remainingHex.slice(0, byteSliceSize);
125
+ // Remove consumed from the stack
126
+ stack.remainingHex = stack.remainingHex.slice(byteSliceSize);
127
+ return consumed;
128
+ }
129
+ exports.consume = consume;
130
+ /**
131
+ * Parse, decode and consume the data push from the top of the stack.
132
+ * If the stack does not start with a valid push, it raises an error and the stack is left untouched.
133
+ * @param stack an object containing a hex string outputScript of an eCash tx, e.g. {remainingHex: '4d...'}
134
+ * @returns {data, pushedWith}
135
+ * stack is modified in place so that the push is removed
136
+ */
137
+ function consumeNextPush(stack) {
138
+ // Clone stack in case you have an error and wish to leave it unmodified
139
+ const clonedStack = structuredClone(stack);
140
+ // Get the first byte on the stack
141
+ const pushOpCodeHex = consume(clonedStack, 1);
142
+ const pushOpCode = parseInt(pushOpCodeHex, 16);
143
+ if (ONE_BYTE_STACK_ADDS.includes(pushOpCode)) {
144
+ // If this is a one-byte push, consume stack and return the byte
145
+ stack.remainingHex = clonedStack.remainingHex;
146
+ return { data: pushOpCodeHex, pushedWith: pushOpCodeHex };
147
+ }
148
+ // Initialize variables
149
+ let pushBytecountHex;
150
+ // Apply conditional checks to determine the size of this push
151
+ if (ONE_BYTE_PUSHDATAS.includes(pushOpCode)) {
152
+ // If the first byte on the stack is 0x01-0x4b, then this is pushedBytesHex
153
+ pushBytecountHex = pushOpCodeHex;
154
+ }
155
+ else if (pushOpCode === opcode_js_1.OP_PUSHDATA1) {
156
+ // The next byte contains the number of bytes to be pushed onto the stack.
157
+ pushBytecountHex = consume(clonedStack, 1);
158
+ }
159
+ else if (pushOpCode === opcode_js_1.OP_PUSHDATA2) {
160
+ // The next two bytes contain the number of bytes to be pushed onto the stack in little endian order.
161
+ pushBytecountHex = consume(clonedStack, 2);
162
+ }
163
+ else if (pushOpCode === opcode_js_1.OP_PUSHDATA4) {
164
+ // The next four bytes contain the number of bytes to be pushed onto the stack in little endian order.
165
+ pushBytecountHex = consume(clonedStack, 4);
166
+ }
167
+ else {
168
+ throw new Error(`${pushOpCodeHex} is invalid pushdata`);
169
+ }
170
+ // Now that you know how many bytes are in the push, get the pushed data
171
+ const data = consume(clonedStack, parseInt(swapEndianness(pushBytecountHex), 16));
172
+ // If no error, consume stack
173
+ stack.remainingHex = clonedStack.remainingHex;
174
+ /*
175
+ Return {data, pushedWith}
176
+ Note that if the first byte on the stack is 0x01-0x4b,
177
+ this is both pushOpCode and pushBytecountHex
178
+
179
+ You don't want to return '0404' for e.g. '042e786563'
180
+ Conditionally remove pushBytecountHex for this case
181
+ */
182
+ return {
183
+ data,
184
+ pushedWith: `${pushOpCodeHex}${pushOpCodeHex !== pushBytecountHex ? pushBytecountHex : ''}`,
185
+ };
186
+ }
187
+ exports.consumeNextPush = consumeNextPush;
188
+ //# sourceMappingURL=opreturn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opreturn.js","sourceRoot":"","sources":["../../src/parse/opreturn.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,mEAAmE;AACnE,sEAAsE;;;AAEtE,4CAAmD;AACnD,yCAAqC;AACrC,4CAwBsB;AAEtB;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,YAAoB;IAC9C,MAAM,WAAW,GAAG,IAAA,cAAK,EAAC,IAAI,UAAU,CAAC,CAAC,qBAAS,CAAC,CAAC,CAAC,CAAC;IAEvD,sCAAsC;IACtC,IACI,OAAO,YAAY,KAAK,QAAQ;QAChC,CAAC,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,EACvC,CAAC;QACC,MAAM,IAAI,KAAK,CACX,kDAAkD,WAAW,EAAE,CAClE,CAAC;IACN,CAAC;IACD,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,GAAG,+BAAmB,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CACX,iCACI,YAAY,CAAC,MAAM,GAAG,CAC1B,iDAAiD,+BAAmB,SAAS,CAChF,CAAC;IACN,CAAC;IAED,6DAA6D;IAC7D,MAAM,KAAK,GAAG;QACV,YAAY,EAAE,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;KACvD,CAAC;IAEF,wBAAwB;IACxB,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,OAAO,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC;AAjCD,sCAiCC;AAED;;GAEG;AACH,MAAM,mBAAmB,GAAG;IACxB,gBAAI;I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G,WAAW,CAAC,YAAY,CAAC;IAE9C;;;;;;;MAOE;IACF,OAAO;QACH,IAAI;QACJ,UAAU,EAAE,GAAG,aAAa,GACxB,aAAa,KAAK,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAC5D,EAAE;KACL,CAAC;AACN,CAAC;AA5DD,0CA4DC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecash-lib",
3
- "version": "4.3.3",
3
+ "version": "4.4.0",
4
4
  "description": "Library for eCash transaction building",
5
5
  "main": "./dist/indexNodeJs.js",
6
6
  "browser": "./dist/indexBrowser.js",