@ouronet/ouronet-core 4.3.6
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/CHANGELOG.md +3043 -0
- package/README.md +1940 -0
- package/dist/codex/codec.d.ts +77 -0
- package/dist/codex/codec.js +123 -0
- package/dist/codex/errors.d.ts +14 -0
- package/dist/codex/errors.js +20 -0
- package/dist/codex/index.d.ts +27 -0
- package/dist/codex/index.js +25 -0
- package/dist/codex/seedTypeMigration.d.ts +35 -0
- package/dist/codex/seedTypeMigration.js +45 -0
- package/dist/codex/types.d.ts +100 -0
- package/dist/codex/types.js +19 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +3 -0
- package/dist/constants/ouronet.d.ts +33 -0
- package/dist/constants/ouronet.js +59 -0
- package/dist/constants/tokenIds.d.ts +13 -0
- package/dist/constants/tokenIds.js +21 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1 -0
- package/dist/interactions/activateFunctions.d.ts +67 -0
- package/dist/interactions/activateFunctions.js +154 -0
- package/dist/interactions/addLiquidityFunctions.d.ts +140 -0
- package/dist/interactions/addLiquidityFunctions.js +485 -0
- package/dist/interactions/coilFunctions.d.ts +73 -0
- package/dist/interactions/coilFunctions.js +213 -0
- package/dist/interactions/crossChainFunctions.d.ts +211 -0
- package/dist/interactions/crossChainFunctions.js +463 -0
- package/dist/interactions/dexAcquisitionPoolFunctions.d.ts +18 -0
- package/dist/interactions/dexAcquisitionPoolFunctions.js +18 -0
- package/dist/interactions/dexCollectablesFunctions.d.ts +28 -0
- package/dist/interactions/dexCollectablesFunctions.js +227 -0
- package/dist/interactions/dexFunctions.d.ts +23 -0
- package/dist/interactions/dexFunctions.js +23 -0
- package/dist/interactions/dexOrtoFungibleFunctions.d.ts +33 -0
- package/dist/interactions/dexOrtoFungibleFunctions.js +171 -0
- package/dist/interactions/dexParseFunctions.d.ts +150 -0
- package/dist/interactions/dexParseFunctions.js +316 -0
- package/dist/interactions/dexSwapPairAdminFunctions.d.ts +75 -0
- package/dist/interactions/dexSwapPairAdminFunctions.js +255 -0
- package/dist/interactions/dexSwapPairCalcFunctions.d.ts +55 -0
- package/dist/interactions/dexSwapPairCalcFunctions.js +218 -0
- package/dist/interactions/dexSwapPairDashboardFunctions.d.ts +47 -0
- package/dist/interactions/dexSwapPairDashboardFunctions.js +179 -0
- package/dist/interactions/dexSwapPairExecuteFunctions.d.ts +40 -0
- package/dist/interactions/dexSwapPairExecuteFunctions.js +301 -0
- package/dist/interactions/dexSwapPairSmartSwapFunctions.d.ts +25 -0
- package/dist/interactions/dexSwapPairSmartSwapFunctions.js +166 -0
- package/dist/interactions/dexTrueFungibleFunctions.d.ts +52 -0
- package/dist/interactions/dexTrueFungibleFunctions.js +220 -0
- package/dist/interactions/dexTypes.d.ts +465 -0
- package/dist/interactions/dexTypes.js +6 -0
- package/dist/interactions/errors.d.ts +12 -0
- package/dist/interactions/errors.js +13 -0
- package/dist/interactions/guardFunctions.d.ts +33 -0
- package/dist/interactions/guardFunctions.js +110 -0
- package/dist/interactions/index.d.ts +1 -0
- package/dist/interactions/index.js +20 -0
- package/dist/interactions/infoOneFunctions.d.ts +133 -0
- package/dist/interactions/infoOneFunctions.js +566 -0
- package/dist/interactions/kadenaFunctions.d.ts +11 -0
- package/dist/interactions/kadenaFunctions.js +40 -0
- package/dist/interactions/kpayFunctions.d.ts +45 -0
- package/dist/interactions/kpayFunctions.js +191 -0
- package/dist/interactions/ouroAccountFunctions.d.ts +64 -0
- package/dist/interactions/ouroAccountFunctions.js +229 -0
- package/dist/interactions/ouroBalanceFunctions.d.ts +39 -0
- package/dist/interactions/ouroBalanceFunctions.js +100 -0
- package/dist/interactions/ouroCoilFunctions.d.ts +33 -0
- package/dist/interactions/ouroCoilFunctions.js +190 -0
- package/dist/interactions/ouroFunctions.d.ts +23 -0
- package/dist/interactions/ouroFunctions.js +23 -0
- package/dist/interactions/ouroMovieBoosterFunctions.d.ts +18 -0
- package/dist/interactions/ouroMovieBoosterFunctions.js +203 -0
- package/dist/interactions/ouroPriceFunctions.d.ts +38 -0
- package/dist/interactions/ouroPriceFunctions.js +96 -0
- package/dist/interactions/ouroPrimordialsFunctions.d.ts +10 -0
- package/dist/interactions/ouroPrimordialsFunctions.js +480 -0
- package/dist/interactions/ouroRotateFunctions.d.ts +22 -0
- package/dist/interactions/ouroRotateFunctions.js +114 -0
- package/dist/interactions/ouroSubCompressFunctions.d.ts +23 -0
- package/dist/interactions/ouroSubCompressFunctions.js +191 -0
- package/dist/interactions/ouroTransferFunctions.d.ts +14 -0
- package/dist/interactions/ouroTransferFunctions.js +87 -0
- package/dist/interactions/ouroTypes.d.ts +113 -0
- package/dist/interactions/ouroTypes.js +6 -0
- package/dist/interactions/ouroUrStoaFunctions.d.ts +16 -0
- package/dist/interactions/ouroUrStoaFunctions.js +121 -0
- package/dist/interactions/ouroWrapFunctions.d.ts +22 -0
- package/dist/interactions/ouroWrapFunctions.js +234 -0
- package/dist/interactions/pensionFunctions.d.ts +12 -0
- package/dist/interactions/pensionFunctions.js +127 -0
- package/dist/interactions/urStoaFunctions.d.ts +104 -0
- package/dist/interactions/urStoaFunctions.js +475 -0
- package/dist/interactions/wrapFunctions.d.ts +46 -0
- package/dist/interactions/wrapFunctions.js +221 -0
- package/dist/pact/cfmBuilders.d.ts +807 -0
- package/dist/pact/cfmBuilders.js +812 -0
- package/dist/pact/index.d.ts +1 -0
- package/dist/pact/index.js +10 -0
- package/package.json +64 -0
|
@@ -0,0 +1,807 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CFM Pact-code builders — string construction for every Pact function
|
|
3
|
+
* the 23 OuronetUI CFM modals call.
|
|
4
|
+
*
|
|
5
|
+
* Background. Each CFM modal builds a Pact-code string like
|
|
6
|
+
* `(ouronet-ns.TS01-C2.ATS|C_Coil "<patron>" "<coiler>" "<ats>" "<rt>" <amount>)`
|
|
7
|
+
* and hands it to `strategy.execute({ build })`. Historically these
|
|
8
|
+
* strings lived inside the modal as a template literal — convenient
|
|
9
|
+
* but impossible to test without rendering the React component, so
|
|
10
|
+
* a typo (`C_Coyl`, missing quote, wrong namespace) only surfaced
|
|
11
|
+
* when a user clicked the button and the chain rejected the tx.
|
|
12
|
+
*
|
|
13
|
+
* This module extracts each Pact-function-specific string builder
|
|
14
|
+
* into a pure function. Modals import the builder and pass the
|
|
15
|
+
* returned string to `Pact.builder.execution(...)`. Tests in
|
|
16
|
+
* `tests/cfm-builders.test.ts` verify every builder produces the
|
|
17
|
+
* exact expected shape for a canonical input set.
|
|
18
|
+
*
|
|
19
|
+
* No React, no @kadena/client, no crypto. Just string templating
|
|
20
|
+
* with `formatDecimalForPact` for the amount fields. Works on
|
|
21
|
+
* Node + browser + any JS environment.
|
|
22
|
+
*
|
|
23
|
+
* Naming convention. Each builder is `buildX_PactCode(params)`
|
|
24
|
+
* where `X` is the Pact function name (C_Coil, C_Transfer, etc.).
|
|
25
|
+
* Return type is always `string`.
|
|
26
|
+
*
|
|
27
|
+
* All Pact function names the ecosystem currently ships are covered.
|
|
28
|
+
* When a new CFM modal lands, add its builder here + a test; don't
|
|
29
|
+
* inline the Pact code in the modal.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Transfer. The most-called CFM function across the UI — all 9
|
|
33
|
+
* Transfer* modals emit this shape, differing only in token-id.
|
|
34
|
+
*
|
|
35
|
+
* (ouronet-ns.TS01-C1.DPTF|C_Transfer
|
|
36
|
+
* <patron> <token-id> <sender> <receiver> <amount:decimal> <method:bool>)
|
|
37
|
+
*
|
|
38
|
+
* `method` is `false` for standard accounts and `true` for smart
|
|
39
|
+
* accounts. `amount` is formatted to `x.y` decimal form.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildTransferPactCode(p: {
|
|
42
|
+
patron: string;
|
|
43
|
+
tokenId: string;
|
|
44
|
+
sender: string;
|
|
45
|
+
receiver: string;
|
|
46
|
+
amount: string;
|
|
47
|
+
method: boolean;
|
|
48
|
+
}): string;
|
|
49
|
+
/**
|
|
50
|
+
* Clear Ouroboros Dispo. Triggered when a resident has negative virtual
|
|
51
|
+
* OURO; this zeroes the dispo by burning from the patron.
|
|
52
|
+
*
|
|
53
|
+
* (ouronet-ns.TS01-C1.DPTF|C_ClearDispo <patron> <account>)
|
|
54
|
+
*/
|
|
55
|
+
export declare function buildClearDispoPactCode(p: {
|
|
56
|
+
patron: string;
|
|
57
|
+
account: string;
|
|
58
|
+
}): string;
|
|
59
|
+
/**
|
|
60
|
+
* Sublimate OURO → IGNIS. Patronless (gasless for the user —
|
|
61
|
+
* STOA_AUTONOMIC_OURONETGASSTATION pays the chain gas). `target` is
|
|
62
|
+
* usually the same as `client` (self-sublimate) but can be another
|
|
63
|
+
* account for gift-style flows.
|
|
64
|
+
*
|
|
65
|
+
* (ouronet-ns.TS01-C2.ORBR|C_Sublimate <client> <target> <amount:decimal>)
|
|
66
|
+
*/
|
|
67
|
+
export declare function buildSublimatePactCode(p: {
|
|
68
|
+
client: string;
|
|
69
|
+
target: string;
|
|
70
|
+
amount: string;
|
|
71
|
+
}): string;
|
|
72
|
+
/**
|
|
73
|
+
* Compress IGNIS → OURO. Patronless, integer-valued amount only.
|
|
74
|
+
* `formatDecimalForPact` still runs on the amount string because the
|
|
75
|
+
* Pact `decimal` lexer rejects bare integers.
|
|
76
|
+
*
|
|
77
|
+
* (ouronet-ns.TS01-C2.ORBR|C_Compress <client> <ignis-amount:decimal>)
|
|
78
|
+
*/
|
|
79
|
+
export declare function buildCompressPactCode(p: {
|
|
80
|
+
client: string;
|
|
81
|
+
ignisAmount: string;
|
|
82
|
+
}): string;
|
|
83
|
+
/**
|
|
84
|
+
* Coil — deposit reward-token into an autostake pool.
|
|
85
|
+
*
|
|
86
|
+
* (ouronet-ns.TS01-C2.ATS|C_Coil
|
|
87
|
+
* <patron> <coiler> <ats> <rt> <amount:decimal>)
|
|
88
|
+
*/
|
|
89
|
+
export declare function buildCoilPactCode(p: {
|
|
90
|
+
patron: string;
|
|
91
|
+
coiler: string;
|
|
92
|
+
atsId: string;
|
|
93
|
+
rewardTokenId: string;
|
|
94
|
+
amount: string;
|
|
95
|
+
}): string;
|
|
96
|
+
/**
|
|
97
|
+
* Curl — deposit reward-token through TWO autostake pools (e.g. OURO
|
|
98
|
+
* through Auryndex + EliteAuryndex in one call).
|
|
99
|
+
*
|
|
100
|
+
* (ouronet-ns.TS01-C2.ATS|C_Curl
|
|
101
|
+
* <patron> <curler> <ats1> <ats2> <rt> <amount:decimal>)
|
|
102
|
+
*/
|
|
103
|
+
export declare function buildCurlPactCode(p: {
|
|
104
|
+
patron: string;
|
|
105
|
+
curler: string;
|
|
106
|
+
ats1Id: string;
|
|
107
|
+
ats2Id: string;
|
|
108
|
+
rewardTokenId: string;
|
|
109
|
+
amount: string;
|
|
110
|
+
}): string;
|
|
111
|
+
/**
|
|
112
|
+
* Brumate — locked Curl. Same shape as Curl plus a `dayz` lock-period
|
|
113
|
+
* integer.
|
|
114
|
+
*
|
|
115
|
+
* (ouronet-ns.TS01-C2.ATS|C_Brumate
|
|
116
|
+
* <patron> <brumator> <ats1> <ats2> <rt> <amount:decimal> <dayz:integer>)
|
|
117
|
+
*/
|
|
118
|
+
export declare function buildBrumatePactCode(p: {
|
|
119
|
+
patron: string;
|
|
120
|
+
brumator: string;
|
|
121
|
+
ats1Id: string;
|
|
122
|
+
ats2Id: string;
|
|
123
|
+
rewardTokenId: string;
|
|
124
|
+
amount: string;
|
|
125
|
+
lockDays: number;
|
|
126
|
+
}): string;
|
|
127
|
+
/**
|
|
128
|
+
* Constrict — locked Coil. Same shape as Coil plus a `dayz` lock-period
|
|
129
|
+
* integer.
|
|
130
|
+
*
|
|
131
|
+
* (ouronet-ns.TS01-C2.ATS|C_Constrict
|
|
132
|
+
* <patron> <constricter> <ats> <rt> <amount:decimal> <dayz:integer>)
|
|
133
|
+
*/
|
|
134
|
+
export declare function buildConstrictPactCode(p: {
|
|
135
|
+
patron: string;
|
|
136
|
+
constricter: string;
|
|
137
|
+
atsId: string;
|
|
138
|
+
rewardTokenId: string;
|
|
139
|
+
amount: string;
|
|
140
|
+
lockDays: number;
|
|
141
|
+
}): string;
|
|
142
|
+
/**
|
|
143
|
+
* Cold recovery — withdraw from an autostake pool with the full lockout
|
|
144
|
+
* reward schedule.
|
|
145
|
+
*
|
|
146
|
+
* (ouronet-ns.TS01-C2.ATS|C_ColdRecovery
|
|
147
|
+
* <patron> <recoverer> <ats> <ra:decimal>)
|
|
148
|
+
*/
|
|
149
|
+
export declare function buildColdRecoveryPactCode(p: {
|
|
150
|
+
patron: string;
|
|
151
|
+
recoverer: string;
|
|
152
|
+
atsId: string;
|
|
153
|
+
ra: string;
|
|
154
|
+
}): string;
|
|
155
|
+
/**
|
|
156
|
+
* Direct recovery — withdraw immediately with the smaller non-lockout
|
|
157
|
+
* reward.
|
|
158
|
+
*
|
|
159
|
+
* (ouronet-ns.TS01-C2.ATS|C_DirectRecovery
|
|
160
|
+
* <patron> <recoverer> <ats> <ra:decimal>)
|
|
161
|
+
*/
|
|
162
|
+
export declare function buildDirectRecoveryPactCode(p: {
|
|
163
|
+
patron: string;
|
|
164
|
+
recoverer: string;
|
|
165
|
+
atsId: string;
|
|
166
|
+
ra: string;
|
|
167
|
+
}): string;
|
|
168
|
+
/**
|
|
169
|
+
* Cull — harvest rewards from a single autostake pool position.
|
|
170
|
+
*
|
|
171
|
+
* (ouronet-ns.TS01-C2.ATS|C_Cull <patron> <culler> <ats>)
|
|
172
|
+
*/
|
|
173
|
+
export declare function buildCullPactCode(p: {
|
|
174
|
+
patron: string;
|
|
175
|
+
culler: string;
|
|
176
|
+
atsId: string;
|
|
177
|
+
}): string;
|
|
178
|
+
/**
|
|
179
|
+
* Awake — wake a hibernated GSTOA nonce.
|
|
180
|
+
*
|
|
181
|
+
* (ouronet-ns.TS01-C2.VST|C_Awake
|
|
182
|
+
* <patron> <awaker> <dpof> <nonce:integer>)
|
|
183
|
+
*/
|
|
184
|
+
export declare function buildAwakePactCode(p: {
|
|
185
|
+
patron: string;
|
|
186
|
+
awaker: string;
|
|
187
|
+
dpof: string;
|
|
188
|
+
nonce: number;
|
|
189
|
+
}): string;
|
|
190
|
+
/**
|
|
191
|
+
* Slumber — hibernate one or more GSTOA nonces. The `nonces` list is
|
|
192
|
+
* rendered as Pact's `[n1 n2 n3]` integer-list literal.
|
|
193
|
+
*
|
|
194
|
+
* (ouronet-ns.TS01-C2.VST|C_Slumber
|
|
195
|
+
* <patron> <merger> <dpof> <nonces:[integer]>)
|
|
196
|
+
*/
|
|
197
|
+
export declare function buildSlumberPactCode(p: {
|
|
198
|
+
patron: string;
|
|
199
|
+
merger: string;
|
|
200
|
+
dpof: string;
|
|
201
|
+
nonces: number[];
|
|
202
|
+
}): string;
|
|
203
|
+
/**
|
|
204
|
+
* Wrap STOA — convert native STOA → wSTOA. Payment key signs `coin.TRANSFER`
|
|
205
|
+
* to LIQUIDPOT for the wrapped amount; patron + wrapper guards sign pure.
|
|
206
|
+
*
|
|
207
|
+
* (ouronet-ns.TS01-C2.LQD|C_WrapStoa <patron> <wrapper> <amount:decimal>)
|
|
208
|
+
*
|
|
209
|
+
* `amount` is formatted via `formatDecimalForPact` (validates `/^\d+\.?\d*$/`
|
|
210
|
+
* and pads decimal — closes the F-SEC-001 Pact-code injection vector by
|
|
211
|
+
* making the field a clean numeric literal).
|
|
212
|
+
*/
|
|
213
|
+
export declare function buildWrapStoaPactCode(p: {
|
|
214
|
+
patron: string;
|
|
215
|
+
wrapper: string;
|
|
216
|
+
amount: string;
|
|
217
|
+
}): string;
|
|
218
|
+
/**
|
|
219
|
+
* Wrap UrStoa — convert native UrStoa → wSTOA. Differs from WrapStoa in
|
|
220
|
+
* the cap the payment key carries (`coin.UR|TRANSFER` instead of
|
|
221
|
+
* `coin.TRANSFER`) — the Pact-code shape is otherwise structurally
|
|
222
|
+
* identical, just a different function name on the same LQD module.
|
|
223
|
+
*
|
|
224
|
+
* (ouronet-ns.TS01-C2.LQD|C_WrapUrStoa <patron> <wrapper> <amount:decimal>)
|
|
225
|
+
*/
|
|
226
|
+
export declare function buildWrapUrStoaPactCode(p: {
|
|
227
|
+
patron: string;
|
|
228
|
+
wrapper: string;
|
|
229
|
+
amount: string;
|
|
230
|
+
}): string;
|
|
231
|
+
/**
|
|
232
|
+
* Unwrap STOA — convert wSTOA → native STOA (target k:account already exists).
|
|
233
|
+
*
|
|
234
|
+
* (ouronet-ns.TS01-C2.LQD|C_UnwrapStoa <patron> <unwrapper> <amount:decimal>)
|
|
235
|
+
*/
|
|
236
|
+
export declare function buildUnwrapStoaPactCode(p: {
|
|
237
|
+
patron: string;
|
|
238
|
+
unwrapper: string;
|
|
239
|
+
amount: string;
|
|
240
|
+
}): string;
|
|
241
|
+
/**
|
|
242
|
+
* Unwrap STOA — composite shape that creates the target k:account inline
|
|
243
|
+
* (via `coin.C_CreateAccount`) then executes the unwrap, all in one atomic
|
|
244
|
+
* Pact expression. Call site MUST `addData("ks", { keys: [<targetPubkey>],
|
|
245
|
+
* pred: "keys-all" })` on the builder so the embedded `(read-keyset "ks")`
|
|
246
|
+
* resolves at chain time.
|
|
247
|
+
*
|
|
248
|
+
* Composite shape (multi-line for readability — emitted as one string):
|
|
249
|
+
*
|
|
250
|
+
* (namespace "ouronet-ns")
|
|
251
|
+
* (IGNIS.C_Collect <patron> (IGNIS.UDC_CustomCodeCumulator))
|
|
252
|
+
* (let
|
|
253
|
+
* ((wp:string <unwrapper>) (target:string (DALOS.UR_AccountKadena wp)))
|
|
254
|
+
* [(coin.C_CreateAccount target (read-keyset "ks"))
|
|
255
|
+
* (TS01-C2.LQD|C_UnwrapStoa <patron> <unwrapper> <amount>)])
|
|
256
|
+
*/
|
|
257
|
+
export declare function buildUnwrapStoaWithCreateAccountPactCode(p: {
|
|
258
|
+
patron: string;
|
|
259
|
+
unwrapper: string;
|
|
260
|
+
amount: string;
|
|
261
|
+
}): string;
|
|
262
|
+
/**
|
|
263
|
+
* Unwrap UrStoa — convert wURSTOA → native UrStoa (target k:account already exists).
|
|
264
|
+
*
|
|
265
|
+
* (ouronet-ns.TS01-C2.LQD|C_UnwrapUrStoa <patron> <unwrapper> <amount:decimal>)
|
|
266
|
+
*/
|
|
267
|
+
export declare function buildUnwrapUrStoaPactCode(p: {
|
|
268
|
+
patron: string;
|
|
269
|
+
unwrapper: string;
|
|
270
|
+
amount: string;
|
|
271
|
+
}): string;
|
|
272
|
+
/**
|
|
273
|
+
* Unwrap UrStoa — composite shape that creates the target k:account via
|
|
274
|
+
* `coin.C_UR|CreateAccount` (NOT `coin.C_CreateAccount` — UR is a separate
|
|
275
|
+
* coin-module variant for UrStoa accounts) then executes the unwrap.
|
|
276
|
+
* Same `addData("ks", ...)` requirement as `buildUnwrapStoaWithCreateAccountPactCode`.
|
|
277
|
+
*/
|
|
278
|
+
export declare function buildUnwrapUrStoaWithCreateAccountPactCode(p: {
|
|
279
|
+
patron: string;
|
|
280
|
+
unwrapper: string;
|
|
281
|
+
amount: string;
|
|
282
|
+
}): string;
|
|
283
|
+
/**
|
|
284
|
+
* Stake UrStoa — locks native UrStoa on the user's payment-key account.
|
|
285
|
+
*
|
|
286
|
+
* (coin.C_URV|Stake <payment-key-account:string> <amount:decimal>)
|
|
287
|
+
*/
|
|
288
|
+
export declare function buildStakeUrStoaPactCode(p: {
|
|
289
|
+
paymentKeyAddress: string;
|
|
290
|
+
amount: string;
|
|
291
|
+
}): string;
|
|
292
|
+
/**
|
|
293
|
+
* Unstake UrStoa — releases native UrStoa from the user's payment-key
|
|
294
|
+
* stake back to the user's payment-key spendable balance. Symmetric to
|
|
295
|
+
* Stake; the payment key carries `coin.URV|UNSTAKE` (NOT `STAKE`).
|
|
296
|
+
*
|
|
297
|
+
* (coin.C_URV|Unstake <payment-key-account:string> <amount:decimal>)
|
|
298
|
+
*/
|
|
299
|
+
export declare function buildUnstakeUrStoaPactCode(p: {
|
|
300
|
+
paymentKeyAddress: string;
|
|
301
|
+
amount: string;
|
|
302
|
+
}): string;
|
|
303
|
+
/**
|
|
304
|
+
* Collect UrStoa — harvests accrued STOA earnings from the UrStoa Vault to
|
|
305
|
+
* the user's payment-key coin account. Simple path: the payment-key coin
|
|
306
|
+
* account already exists; the payment key carries `coin.URV|COLLECT`.
|
|
307
|
+
*
|
|
308
|
+
* (coin.C_URV|Collect <payment-key-account:string>)
|
|
309
|
+
*
|
|
310
|
+
* For the case where the payment-key coin account does NOT yet exist,
|
|
311
|
+
* see `buildCollectUrStoaWithCreateAccountPactCode` below — it builds the
|
|
312
|
+
* 2-call composite that creates the account first and then collects.
|
|
313
|
+
*/
|
|
314
|
+
export declare function buildCollectUrStoaPactCode(p: {
|
|
315
|
+
paymentKeyAddress: string;
|
|
316
|
+
}): string;
|
|
317
|
+
/**
|
|
318
|
+
* Collect UrStoa with account-creation — used when the payment-key coin
|
|
319
|
+
* account doesn't yet exist on chain. Emits a 2-call composite Pact body:
|
|
320
|
+
* the create-account call followed by the collect call. The keyset for
|
|
321
|
+
* the new account is read from the "ks" data slot — the consumer is
|
|
322
|
+
* responsible for `.addData("ks", { keys: [pubkey], pred: "keys-all" })`
|
|
323
|
+
* on the transaction builder.
|
|
324
|
+
*
|
|
325
|
+
* (coin.C_CreateAccount <payment-key> (read-keyset "ks"))
|
|
326
|
+
* (coin.C_URV|Collect <payment-key>)
|
|
327
|
+
*
|
|
328
|
+
* Capability set on the build closure is identical to the simple path:
|
|
329
|
+
* GAS_PAYER + `coin.URV|COLLECT` on the payment key. The composite is
|
|
330
|
+
* a Pact-side ordering only — both calls execute in a single transaction.
|
|
331
|
+
*/
|
|
332
|
+
export declare function buildCollectUrStoaWithCreateAccountPactCode(p: {
|
|
333
|
+
paymentKeyAddress: string;
|
|
334
|
+
}): string;
|
|
335
|
+
/**
|
|
336
|
+
* Native UR Transfer — receiver-exists + Transfer-family branch.
|
|
337
|
+
*
|
|
338
|
+
* (coin.C_UR|Transfer <sender> <receiver> <amount:decimal>)
|
|
339
|
+
*/
|
|
340
|
+
export declare function buildNativeUrTransferPactCode(p: {
|
|
341
|
+
sender: string;
|
|
342
|
+
receiver: string;
|
|
343
|
+
amount: string;
|
|
344
|
+
}): string;
|
|
345
|
+
/**
|
|
346
|
+
* Native UR Transmit — receiver-exists + Transmit-family branch.
|
|
347
|
+
*
|
|
348
|
+
* (coin.C_UR|Transmit <sender> <receiver> <amount:decimal>)
|
|
349
|
+
*/
|
|
350
|
+
export declare function buildNativeUrTransmitPactCode(p: {
|
|
351
|
+
sender: string;
|
|
352
|
+
receiver: string;
|
|
353
|
+
amount: string;
|
|
354
|
+
}): string;
|
|
355
|
+
/**
|
|
356
|
+
* Native UR TransferAnew — receiver-does-not-exist + Transfer-family branch.
|
|
357
|
+
* Reads the receiver keyset from the "ks" data slot; consumer must
|
|
358
|
+
* `addData("ks", { keys: [receiverPubKey], pred: "keys-all" })`.
|
|
359
|
+
*
|
|
360
|
+
* (coin.C_UR|TransferAnew <sender> <receiver> (read-keyset "ks") <amount:decimal>)
|
|
361
|
+
*/
|
|
362
|
+
export declare function buildNativeUrTransferAnewPactCode(p: {
|
|
363
|
+
sender: string;
|
|
364
|
+
receiver: string;
|
|
365
|
+
amount: string;
|
|
366
|
+
}): string;
|
|
367
|
+
/**
|
|
368
|
+
* Native UR TransmitAnew — receiver-does-not-exist + Transmit-family branch.
|
|
369
|
+
* Same keyset contract as TransferAnew.
|
|
370
|
+
*
|
|
371
|
+
* (coin.C_UR|TransmitAnew <sender> <receiver> (read-keyset "ks") <amount:decimal>)
|
|
372
|
+
*/
|
|
373
|
+
export declare function buildNativeUrTransmitAnewPactCode(p: {
|
|
374
|
+
sender: string;
|
|
375
|
+
receiver: string;
|
|
376
|
+
amount: string;
|
|
377
|
+
}): string;
|
|
378
|
+
/**
|
|
379
|
+
* Firestarter — wrap 10 native STOA → 10 wSTOA. One-time, gasless for
|
|
380
|
+
* the user, payment key signs coin.TRANSFER.
|
|
381
|
+
*
|
|
382
|
+
* (ouronet-ns.TS01-C3.SWP|C_Firestarter <firestarter>)
|
|
383
|
+
*/
|
|
384
|
+
export declare function buildFirestarterPactCode(p: {
|
|
385
|
+
firestarter: string;
|
|
386
|
+
}): string;
|
|
387
|
+
/**
|
|
388
|
+
* ChangeOwnership — transfer ownership of an existing SWP-pair (liquidity
|
|
389
|
+
* pool) from its current pool-owner to a new Ouronet account. Gated by
|
|
390
|
+
* the pool's `can-change-owner` flag (must be true) and signed by the
|
|
391
|
+
* patron + current pool-owner guards.
|
|
392
|
+
*
|
|
393
|
+
* (ouronet-ns.TS01-C3.SWP|C_ChangeOwnership
|
|
394
|
+
* <patron> <swpair> <new-owner>)
|
|
395
|
+
*/
|
|
396
|
+
export declare function buildChangeOwnershipPactCode(p: {
|
|
397
|
+
patron: string;
|
|
398
|
+
swpair: string;
|
|
399
|
+
newOwner: string;
|
|
400
|
+
}): string;
|
|
401
|
+
/**
|
|
402
|
+
* ModifyWeights — set new token weight ratios on a Weighted SWP-pair.
|
|
403
|
+
* Weighted pools only (pool-type "W"). The new weights array length MUST
|
|
404
|
+
* match the pool's token count, each value MUST be a decimal ≤4 fractional
|
|
405
|
+
* digits, and the SUM MUST equal 1 exactly. UI enforces those constraints;
|
|
406
|
+
* the chain enforces them again as a defense.
|
|
407
|
+
*
|
|
408
|
+
* (ouronet-ns.TS01-C3.SWP|C_ModifyWeights
|
|
409
|
+
* <patron> <swpair> <new-weights:[decimal]>)
|
|
410
|
+
*
|
|
411
|
+
* Pact list literal format: `[w1 w2 w3]` — space-separated, square-bracketed,
|
|
412
|
+
* each value formatted via `formatDecimalForPact` (closes F-SEC-001 the
|
|
413
|
+
* same way scalar amounts do).
|
|
414
|
+
*/
|
|
415
|
+
export declare function buildModifyWeightsPactCode(p: {
|
|
416
|
+
patron: string;
|
|
417
|
+
swpair: string;
|
|
418
|
+
newWeights: string[];
|
|
419
|
+
}): string;
|
|
420
|
+
/**
|
|
421
|
+
* ToggleSwapCapability — flip the SWP-pair's swap-enabled flag (UI label
|
|
422
|
+
* "Swapping"). Boolean MUST be the inverse of `UR_CanSwap` (chain rejects
|
|
423
|
+
* same-value writes). Patron + current pool-owner guards sign pure.
|
|
424
|
+
*
|
|
425
|
+
* (ouronet-ns.TS01-C3.SWP|C_ToggleSwapCapability <patron> <swpair> <toggle:bool>)
|
|
426
|
+
*/
|
|
427
|
+
export declare function buildToggleSwapCapabilityPactCode(p: {
|
|
428
|
+
patron: string;
|
|
429
|
+
swpair: string;
|
|
430
|
+
toggle: boolean;
|
|
431
|
+
}): string;
|
|
432
|
+
/**
|
|
433
|
+
* ToggleAddLiquidity — flip the SWP-pair's add-liquidity-enabled flag
|
|
434
|
+
* (UI label "Provisioning"). Boolean MUST be the inverse of `UR_CanAdd`
|
|
435
|
+
* (chain rejects same-value writes). Patron + current pool-owner guards
|
|
436
|
+
* sign pure.
|
|
437
|
+
*
|
|
438
|
+
* (ouronet-ns.TS01-C3.SWP|C_ToggleAddLiquidity <patron> <swpair> <toggle:bool>)
|
|
439
|
+
*/
|
|
440
|
+
export declare function buildToggleAddLiquidityPactCode(p: {
|
|
441
|
+
patron: string;
|
|
442
|
+
swpair: string;
|
|
443
|
+
toggle: boolean;
|
|
444
|
+
}): string;
|
|
445
|
+
/**
|
|
446
|
+
* ModifyCanChangeOwner — flip the `can-change-owner` flag on a SWP-pair.
|
|
447
|
+
* Signed by the patron + current pool-owner guards. The `newBoolean` arg
|
|
448
|
+
* MUST be the inverse of the on-chain current value (the modal computes
|
|
449
|
+
* it automatically; user does not type it). The chain rejects same-value
|
|
450
|
+
* writes, so the new boolean is effectively the only allowed value.
|
|
451
|
+
*
|
|
452
|
+
* (ouronet-ns.TS01-C3.SWP|C_ModifyCanChangeOwner
|
|
453
|
+
* <patron> <swpair> <new-boolean:bool>)
|
|
454
|
+
*/
|
|
455
|
+
export declare function buildModifyCanChangeOwnerPactCode(p: {
|
|
456
|
+
patron: string;
|
|
457
|
+
swpair: string;
|
|
458
|
+
newBoolean: boolean;
|
|
459
|
+
}): string;
|
|
460
|
+
/**
|
|
461
|
+
* Add Liquidity — deposit input-amounts into the SWP-pair pool in exchange
|
|
462
|
+
* for LP tokens. `inputAmounts` is a per-pool-token decimal vector.
|
|
463
|
+
*
|
|
464
|
+
* (ouronet-ns.TS01-C3.SWP|C_AddLiquidity
|
|
465
|
+
* <patron> <account> <swpair> <inputAmounts:[decimal]>)
|
|
466
|
+
*/
|
|
467
|
+
export declare function buildAddLiquidityPactCode(p: {
|
|
468
|
+
patron: string;
|
|
469
|
+
account: string;
|
|
470
|
+
swpair: string;
|
|
471
|
+
inputAmounts: string[];
|
|
472
|
+
}): string;
|
|
473
|
+
/**
|
|
474
|
+
* Remove Liquidity (Unfold) — burn LP tokens to recover the underlying
|
|
475
|
+
* pool tokens in proportion to the burned LP share. Single `lpAmount`
|
|
476
|
+
* decimal (not a list).
|
|
477
|
+
*
|
|
478
|
+
* (ouronet-ns.TS01-C3.SWP|C_RemoveLiquidity
|
|
479
|
+
* <patron> <account> <swpair> <lp-amount:decimal>)
|
|
480
|
+
*/
|
|
481
|
+
export declare function buildRemoveLiquidityPactCode(p: {
|
|
482
|
+
patron: string;
|
|
483
|
+
account: string;
|
|
484
|
+
swpair: string;
|
|
485
|
+
lpAmount: string;
|
|
486
|
+
}): string;
|
|
487
|
+
/**
|
|
488
|
+
* Single-input swap WITH slippage protection.
|
|
489
|
+
*
|
|
490
|
+
* (ouronet-ns.TS01-C3.SWP|C_SingleSwapWithSlippage
|
|
491
|
+
* <patron> <account> <swpair> <inputId> <inputAmount:decimal> <outputId> (read-msg 'slippage-bounds))
|
|
492
|
+
*/
|
|
493
|
+
export declare function buildSingleSwapWithSlippagePactCode(p: {
|
|
494
|
+
patron: string;
|
|
495
|
+
account: string;
|
|
496
|
+
swpair: string;
|
|
497
|
+
inputId: string;
|
|
498
|
+
inputAmount: string;
|
|
499
|
+
outputId: string;
|
|
500
|
+
}): string;
|
|
501
|
+
/**
|
|
502
|
+
* Single-input swap WITHOUT slippage protection.
|
|
503
|
+
*
|
|
504
|
+
* (ouronet-ns.TS01-C3.SWP|C_SingleSwapNoSlippage
|
|
505
|
+
* <patron> <account> <swpair> <inputId> <inputAmount:decimal> <outputId>)
|
|
506
|
+
*/
|
|
507
|
+
export declare function buildSingleSwapNoSlippagePactCode(p: {
|
|
508
|
+
patron: string;
|
|
509
|
+
account: string;
|
|
510
|
+
swpair: string;
|
|
511
|
+
inputId: string;
|
|
512
|
+
inputAmount: string;
|
|
513
|
+
outputId: string;
|
|
514
|
+
}): string;
|
|
515
|
+
/**
|
|
516
|
+
* Multi-input swap WITH slippage protection. `inputIds` and `inputAmounts`
|
|
517
|
+
* are parallel arrays; each amount applies to the same-position id.
|
|
518
|
+
*
|
|
519
|
+
* (ouronet-ns.TS01-C3.SWP|C_MultiSwapWithSlippage
|
|
520
|
+
* <patron> <account> <swpair> <inputIds:[string]> <inputAmounts:[decimal]> <outputId> (read-msg 'slippage-bounds))
|
|
521
|
+
*/
|
|
522
|
+
export declare function buildMultiSwapWithSlippagePactCode(p: {
|
|
523
|
+
patron: string;
|
|
524
|
+
account: string;
|
|
525
|
+
swpair: string;
|
|
526
|
+
inputIds: string[];
|
|
527
|
+
inputAmounts: string[];
|
|
528
|
+
outputId: string;
|
|
529
|
+
}): string;
|
|
530
|
+
/**
|
|
531
|
+
* Multi-input swap WITHOUT slippage protection.
|
|
532
|
+
*
|
|
533
|
+
* (ouronet-ns.TS01-C3.SWP|C_MultiSwapNoSlippage
|
|
534
|
+
* <patron> <account> <swpair> <inputIds:[string]> <inputAmounts:[decimal]> <outputId>)
|
|
535
|
+
*/
|
|
536
|
+
export declare function buildMultiSwapNoSlippagePactCode(p: {
|
|
537
|
+
patron: string;
|
|
538
|
+
account: string;
|
|
539
|
+
swpair: string;
|
|
540
|
+
inputIds: string[];
|
|
541
|
+
inputAmounts: string[];
|
|
542
|
+
outputId: string;
|
|
543
|
+
}): string;
|
|
544
|
+
/**
|
|
545
|
+
* Create Set (SFT — semi-fungible). Bundles selected DPSF nonces into
|
|
546
|
+
* `howManySets` sets of class `setClass`.
|
|
547
|
+
*
|
|
548
|
+
* (ouronet-ns.TS02-C1.DPSF|C_Make
|
|
549
|
+
* <patron> <account> <id> <nonces:[integer]> <set-class:integer> <how-many-sets:integer>)
|
|
550
|
+
*/
|
|
551
|
+
export declare function buildCreateSetPactCode(p: {
|
|
552
|
+
patron: string;
|
|
553
|
+
account: string;
|
|
554
|
+
tokenId: string;
|
|
555
|
+
nonces: number[];
|
|
556
|
+
setClass: number;
|
|
557
|
+
howManySets: number;
|
|
558
|
+
}): string;
|
|
559
|
+
/**
|
|
560
|
+
* Create Set (NFT — non-fungible). Bundles selected DPNF nonces into a
|
|
561
|
+
* single set of class `setClass`. No `how-many-sets` parameter — NFT
|
|
562
|
+
* sets are always 1×.
|
|
563
|
+
*
|
|
564
|
+
* (ouronet-ns.TS02-C2.DPNF|C_Make
|
|
565
|
+
* <patron> <account> <id> <nonces:[integer]> <set-class:integer>)
|
|
566
|
+
*/
|
|
567
|
+
export declare function buildCreateSetNFTPactCode(p: {
|
|
568
|
+
patron: string;
|
|
569
|
+
account: string;
|
|
570
|
+
tokenId: string;
|
|
571
|
+
nonces: number[];
|
|
572
|
+
setClass: number;
|
|
573
|
+
}): string;
|
|
574
|
+
/**
|
|
575
|
+
* Rotate Sovereign — change the sovereign account that has primary
|
|
576
|
+
* authority over a Smart Ouronet Account (Σ. prefix).
|
|
577
|
+
*
|
|
578
|
+
* Smart-account auth is `enforce-one` over three branches:
|
|
579
|
+
* (a) the Smart account's own guard,
|
|
580
|
+
* (b) the current sovereign account's guard,
|
|
581
|
+
* (c) the Smart account's governor.
|
|
582
|
+
* Any one branch satisfying its predicate authorises the rotation.
|
|
583
|
+
*
|
|
584
|
+
* (ouronet-ns.TS01-C1.DALOS|C_RotateSovereign
|
|
585
|
+
* <patron> <account> <new-sovereign>)
|
|
586
|
+
*
|
|
587
|
+
* `account` is the Σ. Smart account being modified. `new-sovereign`
|
|
588
|
+
* must be an existing Standard Ouronet Account (Ѻ. prefix); the chain
|
|
589
|
+
* rejects Σ. → Σ. rotations because Smart accounts cannot be
|
|
590
|
+
* sovereigns themselves.
|
|
591
|
+
*
|
|
592
|
+
* Added in v1.6.0.
|
|
593
|
+
*/
|
|
594
|
+
export declare function buildRotateSovereignPactCode(p: {
|
|
595
|
+
patron: string;
|
|
596
|
+
account: string;
|
|
597
|
+
newSovereign: string;
|
|
598
|
+
}): string;
|
|
599
|
+
/**
|
|
600
|
+
* Rotate the GOVERNOR of a Smart Ouronet Account (Σ. prefix).
|
|
601
|
+
*
|
|
602
|
+
* (ouronet-ns.TS01-C1.DALOS|C_RotateGovernor <patron> <account> <governor-expr>)
|
|
603
|
+
*
|
|
604
|
+
* Unlike the account GUARD — which the chain now restricts to key-based
|
|
605
|
+
* guards (keyset / keyset-ref) — the governor slot is restricted to
|
|
606
|
+
* NON-key-based guards (user / capability / module / pact). The
|
|
607
|
+
* `governorExpr` is therefore a complete inline guard-construction
|
|
608
|
+
* expression authored by the consumer, e.g.
|
|
609
|
+
*
|
|
610
|
+
* (create-user-guard (ouronet-ns.U|G.UEV_Any [ (create-capability-guard ...) ... ]))
|
|
611
|
+
*
|
|
612
|
+
* Because the guard is inline (not read from a data slot), there is NO
|
|
613
|
+
* `.addData("ks", …)` payload — contrast `buildRotateGuardPactCode`'s
|
|
614
|
+
* "define" mode. The builder ONLY interpolates the expression; producing
|
|
615
|
+
* a syntactically valid, non-key-based `governorExpr` is the caller's
|
|
616
|
+
* responsibility (the chain rejects key-based governors).
|
|
617
|
+
*
|
|
618
|
+
* Added in v4.3.3.
|
|
619
|
+
*/
|
|
620
|
+
export declare function buildRotateGovernorPactCode(p: {
|
|
621
|
+
patron: string;
|
|
622
|
+
account: string;
|
|
623
|
+
/** Complete inline guard-construction expression. Non-key-based only. */
|
|
624
|
+
governorExpr: string;
|
|
625
|
+
}): string;
|
|
626
|
+
/**
|
|
627
|
+
* The five Pact built-in constructors that produce a NON-key-based guard.
|
|
628
|
+
* These are the only guard kinds the chain accepts in a governor slot
|
|
629
|
+
* (the account GUARD slot is the inverse — key-based only).
|
|
630
|
+
*/
|
|
631
|
+
export type NonKeyGuardConstructor = "create-user-guard" | "create-capability-guard" | "create-capability-pact-guard" | "create-module-guard" | "create-pact-guard";
|
|
632
|
+
/**
|
|
633
|
+
* Wrap a guard `body` expression in one of the five non-key-based guard
|
|
634
|
+
* constructors, producing the inline `governorExpr` that
|
|
635
|
+
* {@link buildRotateGovernorPactCode} interpolates:
|
|
636
|
+
*
|
|
637
|
+
* buildNonKeyGuardExpr({ constructor: "create-user-guard",
|
|
638
|
+
* body: "(ns.UG.UEV_Any (create-capability-guard ...))" })
|
|
639
|
+
* → "(create-user-guard (ns.UG.UEV_Any (create-capability-guard ...)))"
|
|
640
|
+
*
|
|
641
|
+
* `body` is the complete argument expression the constructor receives
|
|
642
|
+
* (parens / brackets / quotes already included — for `create-module-guard`
|
|
643
|
+
* and `create-pact-guard` that is a quoted name string `"name"`). The
|
|
644
|
+
* builder does NOT validate or quote `body`; producing a syntactically
|
|
645
|
+
* valid argument is the caller's responsibility.
|
|
646
|
+
*
|
|
647
|
+
* Added in v4.3.3.
|
|
648
|
+
*/
|
|
649
|
+
export declare function buildNonKeyGuardExpr(p: {
|
|
650
|
+
constructor: NonKeyGuardConstructor;
|
|
651
|
+
body: string;
|
|
652
|
+
}): string;
|
|
653
|
+
/**
|
|
654
|
+
* Release the StoicTag currently bound to an Ouronet account.
|
|
655
|
+
*
|
|
656
|
+
* (ouronet-ns.TS01-C4.CODEX|C_ReleaseStoicTag <patron> <tag-name>)
|
|
657
|
+
*
|
|
658
|
+
* `tag-name` is the BARE on-chain name (no § sigil — the sigil is a UI-only
|
|
659
|
+
* marker). The chain resolves the account the tag is bound to and enforces
|
|
660
|
+
* that account's ownership, so the consumer MUST sign with the bound account's
|
|
661
|
+
* guard (in addition to the patron). The only cost is IGNIS, 1 per glyph of the
|
|
662
|
+
* tag name; the amount is surfaced by `INFO_ReleaseStoicTag`.
|
|
663
|
+
*
|
|
664
|
+
* Added in v4.3.3.
|
|
665
|
+
*/
|
|
666
|
+
export declare function buildReleaseStoicTagPactCode(p: {
|
|
667
|
+
patron: string;
|
|
668
|
+
tagName: string;
|
|
669
|
+
}): string;
|
|
670
|
+
/**
|
|
671
|
+
* Register (claim) a StoicTag for an Ouronet account.
|
|
672
|
+
*
|
|
673
|
+
* (ouronet-ns.TS01-C4.CODEX|C_RegisterStoicTag <patron> <tag-name> <account-address>)
|
|
674
|
+
*
|
|
675
|
+
* `tag-name` is the BARE on-chain name (DALOS glyphs only, no § sigil).
|
|
676
|
+
* `account-address` is the Ouronet account the tag is being applied to.
|
|
677
|
+
*
|
|
678
|
+
* This costs NATIVE STOA (1 per glyph, less the account's Elite-tier discount),
|
|
679
|
+
* paid by the patron's payment key and split 10/20/30/40 across the protocol
|
|
680
|
+
* receivers returned by `INFO_RegisterStoicTag`. The consumer MUST therefore
|
|
681
|
+
* sign the payment key with `GAS_PAYER` + one `coin.TRANSFER` per split
|
|
682
|
+
* receiver — otherwise the chain rejects the transaction.
|
|
683
|
+
*
|
|
684
|
+
* Added in v4.3.3.
|
|
685
|
+
*/
|
|
686
|
+
export declare function buildRegisterStoicTagPactCode(p: {
|
|
687
|
+
patron: string;
|
|
688
|
+
tagName: string;
|
|
689
|
+
accountAddress: string;
|
|
690
|
+
}): string;
|
|
691
|
+
/**
|
|
692
|
+
* Rotate the GUARD (ownership keyset) of an Ouronet account.
|
|
693
|
+
*
|
|
694
|
+
* (ouronet-ns.TS01-C1.DALOS|C_RotateGuard <patron> <account> <guard-expr> <safe>)
|
|
695
|
+
*
|
|
696
|
+
* The guard-expr is one of two shapes, switched by `mode`:
|
|
697
|
+
* - "define" → `(read-keyset "ks")` Consumer MUST also call
|
|
698
|
+
* `.addData("ks", { keys, pred })`
|
|
699
|
+
* on the transaction builder so
|
|
700
|
+
* the chain can read the keyset.
|
|
701
|
+
* - "existing" → `(keyset-ref-guard "<ref>")` References an on-chain
|
|
702
|
+
* registered keyset; no addData
|
|
703
|
+
* call is needed.
|
|
704
|
+
*
|
|
705
|
+
* The `safe` flag (boolean) is the chain-side "are you sure?" gate — when
|
|
706
|
+
* `true` it enforces extra invariants on the new guard (e.g. that at least
|
|
707
|
+
* one key in the new keyset is held by the account holder). Define mode
|
|
708
|
+
* is always safe; existing mode lets the user opt-in/out.
|
|
709
|
+
*
|
|
710
|
+
* Added in v4.3.0.
|
|
711
|
+
*/
|
|
712
|
+
export declare function buildRotateGuardPactCode(p: {
|
|
713
|
+
patron: string;
|
|
714
|
+
account: string;
|
|
715
|
+
mode: "define" | "existing";
|
|
716
|
+
/** Required when `mode === "existing"`. */
|
|
717
|
+
keysetRef?: string;
|
|
718
|
+
safe: boolean;
|
|
719
|
+
}): string;
|
|
720
|
+
/**
|
|
721
|
+
* Rotate the Kadena Ledger payment key (= "payment key") of an Ouronet
|
|
722
|
+
* account.
|
|
723
|
+
*
|
|
724
|
+
* (ouronet-ns.TS01-C1.DALOS|C_RotateKadena <patron> <account> <new-payment-key>)
|
|
725
|
+
*
|
|
726
|
+
* Why "RotateKadena" not "RotatePaymentKey": the on-chain Pact function is
|
|
727
|
+
* `C_RotateKadena` — the kadena-ledger payment key is what the on-chain
|
|
728
|
+
* naming refers to. The builder name mirrors the Pact function for grep-
|
|
729
|
+
* ability with chain logs; UI surfaces (e.g. ouronet-codex's
|
|
730
|
+
* `<RotatePaymentKeyModal>`) use the more user-friendly "Payment Key".
|
|
731
|
+
*
|
|
732
|
+
* The consumer is responsible for `.addData("ks", { keys: patronGuard.keys,
|
|
733
|
+
* pred: patronGuard.pred })` and (when patron ≠ account)
|
|
734
|
+
* `.addData("ks-account", { keys: accountGuard.keys, pred: accountGuard.pred })`
|
|
735
|
+
* on the transaction builder. This builder ONLY emits the Pact code.
|
|
736
|
+
*
|
|
737
|
+
* Added in v4.3.0.
|
|
738
|
+
*/
|
|
739
|
+
export declare function buildRotateKadenaPactCode(p: {
|
|
740
|
+
patron: string;
|
|
741
|
+
account: string;
|
|
742
|
+
newPaymentKey: string;
|
|
743
|
+
}): string;
|
|
744
|
+
/**
|
|
745
|
+
* Deploy / activate Standard Ouronet Account. Patronless function — the
|
|
746
|
+
* Pact code does NOT take a patron argument; the deploying CodexPrime
|
|
747
|
+
* Key #0 pays gas and signs the 4× coin.TRANSFER caps that fund the
|
|
748
|
+
* receivers. The guard for the new account is read from the "ks" data
|
|
749
|
+
* slot — consumer must `.addData("ks", { keys: <guardKeys>, pred: <guardPred> })`
|
|
750
|
+
* on the transaction builder.
|
|
751
|
+
*
|
|
752
|
+
* (ouronet-ns.TS01-C1.DALOS|C_DeployStandardAccount
|
|
753
|
+
* <account> (read-keyset "ks") <kadena-address> <public-key>)
|
|
754
|
+
*
|
|
755
|
+
* The 4 coin.TRANSFER capabilities one per kadena-split receiver are NOT
|
|
756
|
+
* part of the Pact code — they're attached at signer level on the
|
|
757
|
+
* gas-payer key, with the receiver list + amount list derived from the
|
|
758
|
+
* INFO call's `kadena-targets` / `kadena-split` fields.
|
|
759
|
+
*/
|
|
760
|
+
export declare function buildDeployStandardAccountPactCode(p: {
|
|
761
|
+
account: string;
|
|
762
|
+
kadenaAddress: string;
|
|
763
|
+
publicKey: string;
|
|
764
|
+
/** Guard binding (default "define"). Mirrors buildRotateGuardPactCode:
|
|
765
|
+
* - "define" → `(read-keyset "ks")` — consumer MUST `.addData("ks", …)`.
|
|
766
|
+
* - "existing" → `(keyset-ref-guard "<ref>")` — references an on-chain
|
|
767
|
+
* named keyset; NO ks payload needed. Preserves the
|
|
768
|
+
* keyset-ref guard type instead of expanding it to a
|
|
769
|
+
* literal keyset. */
|
|
770
|
+
mode?: "define" | "existing";
|
|
771
|
+
/** Required when `mode === "existing"`. */
|
|
772
|
+
keysetRef?: string;
|
|
773
|
+
}): string;
|
|
774
|
+
/**
|
|
775
|
+
* Build the Pact code for C_DeploySmartAccount — Activate a Smart (Σ.) Ouronet
|
|
776
|
+
* Account.
|
|
777
|
+
*
|
|
778
|
+
* On-chain signature (positional):
|
|
779
|
+
* (ouronet-ns.TS01-C1.DALOS|C_DeploySmartAccount
|
|
780
|
+
* <account> <guard:guard> <kadena> <sovereign> <public>)
|
|
781
|
+
*
|
|
782
|
+
* Identical to the Standard deploy except for ONE extra positional arg —
|
|
783
|
+
* `sovereign` — inserted between `kadena` and `public`. The `guard` arg is the
|
|
784
|
+
* account keyset, passed the same way as Standard via `(read-keyset "ks")`
|
|
785
|
+
* (the consumer attaches the keyset with `addData("ks", { keys, pred })`).
|
|
786
|
+
*
|
|
787
|
+
* `sovereign` is an EXISTING Standard (Ѻ.) Ouronet account that holds the new
|
|
788
|
+
* Smart account's sovereignty — the chain rejects Σ.→Σ. (a smart account can't
|
|
789
|
+
* be its own sovereign).
|
|
790
|
+
*
|
|
791
|
+
* Signers/caps are identical to the Standard deploy: the gas-payer (CodexPrime
|
|
792
|
+
* Key #0) carries DALOS.GAS_PAYER + N coin.TRANSFER (one per `kadena-split`
|
|
793
|
+
* receiver from the INFO call), and the account keyset signs pure. None of that
|
|
794
|
+
* is in the Pact code — it's attached at signer level, exactly as Standard.
|
|
795
|
+
*/
|
|
796
|
+
export declare function buildDeploySmartAccountPactCode(p: {
|
|
797
|
+
account: string;
|
|
798
|
+
kadenaAddress: string;
|
|
799
|
+
sovereign: string;
|
|
800
|
+
publicKey: string;
|
|
801
|
+
/** Guard binding (default "define") — see buildDeployStandardAccountPactCode.
|
|
802
|
+
* - "define" → `(read-keyset "ks")` (consumer adds the ks payload).
|
|
803
|
+
* - "existing" → `(keyset-ref-guard "<ref>")` (named on-chain keyset). */
|
|
804
|
+
mode?: "define" | "existing";
|
|
805
|
+
/** Required when `mode === "existing"`. */
|
|
806
|
+
keysetRef?: string;
|
|
807
|
+
}): string;
|