@totemsdk/omnia-vtxo 0.6.0 → 0.6.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/cjs/pool-script.js +4 -1
- package/dist/pool-script.js +4 -1
- package/package.json +4 -4
package/dist/cjs/pool-script.js
CHANGED
|
@@ -65,6 +65,10 @@ function buildPoolScript(params) {
|
|
|
65
65
|
throw new Error(`exitBlock must be a non-negative integer, got ${JSON.stringify(params.exitBlock)}`);
|
|
66
66
|
}
|
|
67
67
|
const lines = [
|
|
68
|
+
// RFC-055/assessment P0: bind the exit clock before either branch. A
|
|
69
|
+
// successful exit returns early, so a SAMESTATE guard placed after the
|
|
70
|
+
// branch would be bypassable.
|
|
71
|
+
'ASSERT SAMESTATE(102 102)',
|
|
68
72
|
'LET epoch=STATE(101)',
|
|
69
73
|
'LET exitblock=PREVSTATE(102)',
|
|
70
74
|
'IF @BLOCK GT exitblock THEN',
|
|
@@ -92,7 +96,6 @@ function buildPoolScript(params) {
|
|
|
92
96
|
});
|
|
93
97
|
lines.push('ENDIF');
|
|
94
98
|
lines.push('ASSERT epoch GT PREVSTATE(101)');
|
|
95
|
-
lines.push('ASSERT SAMESTATE(102 102)');
|
|
96
99
|
lines.push('ASSERT VERIFYOUT(@INPUT @ADDRESS @AMOUNT @TOKENID TRUE)');
|
|
97
100
|
lines.push(`RETURN MULTISIG(${holders.length + 1} ${operator} ${holders.join(' ')})`);
|
|
98
101
|
return (0, core_1.toNodeScript)(lines.join('\n'));
|
package/dist/pool-script.js
CHANGED
|
@@ -59,6 +59,10 @@ export function buildPoolScript(params) {
|
|
|
59
59
|
throw new Error(`exitBlock must be a non-negative integer, got ${JSON.stringify(params.exitBlock)}`);
|
|
60
60
|
}
|
|
61
61
|
const lines = [
|
|
62
|
+
// RFC-055/assessment P0: bind the exit clock before either branch. A
|
|
63
|
+
// successful exit returns early, so a SAMESTATE guard placed after the
|
|
64
|
+
// branch would be bypassable.
|
|
65
|
+
'ASSERT SAMESTATE(102 102)',
|
|
62
66
|
'LET epoch=STATE(101)',
|
|
63
67
|
'LET exitblock=PREVSTATE(102)',
|
|
64
68
|
'IF @BLOCK GT exitblock THEN',
|
|
@@ -86,7 +90,6 @@ export function buildPoolScript(params) {
|
|
|
86
90
|
});
|
|
87
91
|
lines.push('ENDIF');
|
|
88
92
|
lines.push('ASSERT epoch GT PREVSTATE(101)');
|
|
89
|
-
lines.push('ASSERT SAMESTATE(102 102)');
|
|
90
93
|
lines.push('ASSERT VERIFYOUT(@INPUT @ADDRESS @AMOUNT @TOKENID TRUE)');
|
|
91
94
|
lines.push(`RETURN MULTISIG(${holders.length + 1} ${operator} ${holders.join(' ')})`);
|
|
92
95
|
return toNodeScript(lines.join('\n'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totemsdk/omnia-vtxo",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Virtual UTXO / payment-pool claim layer for Omnia — cash-like off-chain balance primitive for Totem Edge",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"LICENSE"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@totemsdk/chain-provider": "^0.3.0",
|
|
28
27
|
"@totemsdk/core": "^1.4.0",
|
|
29
|
-
"@totemsdk/
|
|
28
|
+
"@totemsdk/chain-provider": "^0.3.0",
|
|
29
|
+
"@totemsdk/omnia": "^2.3.0",
|
|
30
30
|
"@totemsdk/storage": "^0.1.0",
|
|
31
|
-
"@totemsdk/
|
|
31
|
+
"@totemsdk/txpow": "^1.1.0",
|
|
32
32
|
"@totemsdk/wots-lease": "^1.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|