ecash-lib 4.3.0 → 4.3.2
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/ffi/ecash_lib_wasm_bg_browser.js +945 -945
- package/dist/ffi/ecash_lib_wasm_bg_browser.wasm +0 -0
- package/dist/ffi/ecash_lib_wasm_bg_nodejs.wasm +0 -0
- package/dist/payment/output.d.ts +19 -4
- package/dist/payment/output.d.ts.map +1 -1
- package/dist/token/slp.d.ts +3 -0
- package/dist/token/slp.d.ts.map +1 -1
- package/dist/token/slp.js +16 -1
- package/dist/token/slp.js.map +1 -1
- package/package.json +2 -2
- package/src/ffi/ecash_lib_wasm_bg_browser.js +945 -945
- package/src/ffi/ecash_lib_wasm_bg_browser.wasm +0 -0
- package/src/ffi/ecash_lib_wasm_bg_nodejs.wasm +0 -0
- package/src/payment/output.ts +25 -8
- package/src/token/slp.ts +18 -0
|
Binary file
|
|
Binary file
|
package/src/payment/output.ts
CHANGED
|
@@ -13,17 +13,34 @@ export type PaymentOutput = PaymentNonTokenOutput | PaymentTokenOutput;
|
|
|
13
13
|
*
|
|
14
14
|
* Note than an OP_RETURN output is a NonTokenPaymentOutput
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
export type PaymentNonTokenOutput =
|
|
17
|
+
| {
|
|
18
|
+
/** The amount of satoshis in this tx output */
|
|
19
|
+
sats?: bigint;
|
|
20
|
+
/** The outputScript of this tx output */
|
|
21
|
+
script?: Script;
|
|
22
|
+
/**
|
|
23
|
+
* The eCash address of this tx output
|
|
24
|
+
* Alternative to script - if script is provided, address should not be set
|
|
25
|
+
*/
|
|
26
|
+
address?: never;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
/** The amount of satoshis in this tx output */
|
|
30
|
+
sats?: bigint;
|
|
31
|
+
/** The outputScript of this tx output */
|
|
32
|
+
script?: never;
|
|
33
|
+
/**
|
|
34
|
+
* The eCash address of this tx output
|
|
35
|
+
* Alternative to script - if script is not provided, address must be set
|
|
36
|
+
*/
|
|
37
|
+
address: string;
|
|
38
|
+
};
|
|
22
39
|
|
|
23
40
|
/**
|
|
24
41
|
* All token transaction outputs specified in Action have this shape
|
|
25
42
|
*/
|
|
26
|
-
export
|
|
43
|
+
export type PaymentTokenOutput = PaymentNonTokenOutput & {
|
|
27
44
|
/** The tokenId of the token associated with this tx output */
|
|
28
45
|
tokenId: string;
|
|
29
46
|
/**
|
|
@@ -34,4 +51,4 @@ export interface PaymentTokenOutput extends PaymentNonTokenOutput {
|
|
|
34
51
|
atoms: bigint;
|
|
35
52
|
/** Is this tx output a mint baton */
|
|
36
53
|
isMintBaton: boolean;
|
|
37
|
-
}
|
|
54
|
+
};
|
package/src/token/slp.ts
CHANGED
|
@@ -62,6 +62,24 @@ export const SLP_TOKEN_TYPE_FUNGIBLE: SlpTokenType = {
|
|
|
62
62
|
number: SLP_FUNGIBLE,
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
export const SLP_TOKEN_TYPE_MINT_VAULT: SlpTokenType = {
|
|
66
|
+
protocol: 'SLP',
|
|
67
|
+
type: 'SLP_TOKEN_TYPE_MINT_VAULT',
|
|
68
|
+
number: SLP_MINT_VAULT,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const SLP_TOKEN_TYPE_NFT1_GROUP: SlpTokenType = {
|
|
72
|
+
protocol: 'SLP',
|
|
73
|
+
type: 'SLP_TOKEN_TYPE_NFT1_GROUP',
|
|
74
|
+
number: SLP_NFT1_GROUP,
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const SLP_TOKEN_TYPE_NFT1_CHILD: SlpTokenType = {
|
|
78
|
+
protocol: 'SLP',
|
|
79
|
+
type: 'SLP_TOKEN_TYPE_NFT1_CHILD',
|
|
80
|
+
number: SLP_NFT1_CHILD,
|
|
81
|
+
};
|
|
82
|
+
|
|
65
83
|
/** Build an SLP GENESIS OP_RETURN, creating a new SLP token */
|
|
66
84
|
export function slpGenesis(
|
|
67
85
|
tokenType: number,
|