@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.
Files changed (101) hide show
  1. package/CHANGELOG.md +3043 -0
  2. package/README.md +1940 -0
  3. package/dist/codex/codec.d.ts +77 -0
  4. package/dist/codex/codec.js +123 -0
  5. package/dist/codex/errors.d.ts +14 -0
  6. package/dist/codex/errors.js +20 -0
  7. package/dist/codex/index.d.ts +27 -0
  8. package/dist/codex/index.js +25 -0
  9. package/dist/codex/seedTypeMigration.d.ts +35 -0
  10. package/dist/codex/seedTypeMigration.js +45 -0
  11. package/dist/codex/types.d.ts +100 -0
  12. package/dist/codex/types.js +19 -0
  13. package/dist/constants/index.d.ts +2 -0
  14. package/dist/constants/index.js +3 -0
  15. package/dist/constants/ouronet.d.ts +33 -0
  16. package/dist/constants/ouronet.js +59 -0
  17. package/dist/constants/tokenIds.d.ts +13 -0
  18. package/dist/constants/tokenIds.js +21 -0
  19. package/dist/index.d.ts +18 -0
  20. package/dist/index.js +1 -0
  21. package/dist/interactions/activateFunctions.d.ts +67 -0
  22. package/dist/interactions/activateFunctions.js +154 -0
  23. package/dist/interactions/addLiquidityFunctions.d.ts +140 -0
  24. package/dist/interactions/addLiquidityFunctions.js +485 -0
  25. package/dist/interactions/coilFunctions.d.ts +73 -0
  26. package/dist/interactions/coilFunctions.js +213 -0
  27. package/dist/interactions/crossChainFunctions.d.ts +211 -0
  28. package/dist/interactions/crossChainFunctions.js +463 -0
  29. package/dist/interactions/dexAcquisitionPoolFunctions.d.ts +18 -0
  30. package/dist/interactions/dexAcquisitionPoolFunctions.js +18 -0
  31. package/dist/interactions/dexCollectablesFunctions.d.ts +28 -0
  32. package/dist/interactions/dexCollectablesFunctions.js +227 -0
  33. package/dist/interactions/dexFunctions.d.ts +23 -0
  34. package/dist/interactions/dexFunctions.js +23 -0
  35. package/dist/interactions/dexOrtoFungibleFunctions.d.ts +33 -0
  36. package/dist/interactions/dexOrtoFungibleFunctions.js +171 -0
  37. package/dist/interactions/dexParseFunctions.d.ts +150 -0
  38. package/dist/interactions/dexParseFunctions.js +316 -0
  39. package/dist/interactions/dexSwapPairAdminFunctions.d.ts +75 -0
  40. package/dist/interactions/dexSwapPairAdminFunctions.js +255 -0
  41. package/dist/interactions/dexSwapPairCalcFunctions.d.ts +55 -0
  42. package/dist/interactions/dexSwapPairCalcFunctions.js +218 -0
  43. package/dist/interactions/dexSwapPairDashboardFunctions.d.ts +47 -0
  44. package/dist/interactions/dexSwapPairDashboardFunctions.js +179 -0
  45. package/dist/interactions/dexSwapPairExecuteFunctions.d.ts +40 -0
  46. package/dist/interactions/dexSwapPairExecuteFunctions.js +301 -0
  47. package/dist/interactions/dexSwapPairSmartSwapFunctions.d.ts +25 -0
  48. package/dist/interactions/dexSwapPairSmartSwapFunctions.js +166 -0
  49. package/dist/interactions/dexTrueFungibleFunctions.d.ts +52 -0
  50. package/dist/interactions/dexTrueFungibleFunctions.js +220 -0
  51. package/dist/interactions/dexTypes.d.ts +465 -0
  52. package/dist/interactions/dexTypes.js +6 -0
  53. package/dist/interactions/errors.d.ts +12 -0
  54. package/dist/interactions/errors.js +13 -0
  55. package/dist/interactions/guardFunctions.d.ts +33 -0
  56. package/dist/interactions/guardFunctions.js +110 -0
  57. package/dist/interactions/index.d.ts +1 -0
  58. package/dist/interactions/index.js +20 -0
  59. package/dist/interactions/infoOneFunctions.d.ts +133 -0
  60. package/dist/interactions/infoOneFunctions.js +566 -0
  61. package/dist/interactions/kadenaFunctions.d.ts +11 -0
  62. package/dist/interactions/kadenaFunctions.js +40 -0
  63. package/dist/interactions/kpayFunctions.d.ts +45 -0
  64. package/dist/interactions/kpayFunctions.js +191 -0
  65. package/dist/interactions/ouroAccountFunctions.d.ts +64 -0
  66. package/dist/interactions/ouroAccountFunctions.js +229 -0
  67. package/dist/interactions/ouroBalanceFunctions.d.ts +39 -0
  68. package/dist/interactions/ouroBalanceFunctions.js +100 -0
  69. package/dist/interactions/ouroCoilFunctions.d.ts +33 -0
  70. package/dist/interactions/ouroCoilFunctions.js +190 -0
  71. package/dist/interactions/ouroFunctions.d.ts +23 -0
  72. package/dist/interactions/ouroFunctions.js +23 -0
  73. package/dist/interactions/ouroMovieBoosterFunctions.d.ts +18 -0
  74. package/dist/interactions/ouroMovieBoosterFunctions.js +203 -0
  75. package/dist/interactions/ouroPriceFunctions.d.ts +38 -0
  76. package/dist/interactions/ouroPriceFunctions.js +96 -0
  77. package/dist/interactions/ouroPrimordialsFunctions.d.ts +10 -0
  78. package/dist/interactions/ouroPrimordialsFunctions.js +480 -0
  79. package/dist/interactions/ouroRotateFunctions.d.ts +22 -0
  80. package/dist/interactions/ouroRotateFunctions.js +114 -0
  81. package/dist/interactions/ouroSubCompressFunctions.d.ts +23 -0
  82. package/dist/interactions/ouroSubCompressFunctions.js +191 -0
  83. package/dist/interactions/ouroTransferFunctions.d.ts +14 -0
  84. package/dist/interactions/ouroTransferFunctions.js +87 -0
  85. package/dist/interactions/ouroTypes.d.ts +113 -0
  86. package/dist/interactions/ouroTypes.js +6 -0
  87. package/dist/interactions/ouroUrStoaFunctions.d.ts +16 -0
  88. package/dist/interactions/ouroUrStoaFunctions.js +121 -0
  89. package/dist/interactions/ouroWrapFunctions.d.ts +22 -0
  90. package/dist/interactions/ouroWrapFunctions.js +234 -0
  91. package/dist/interactions/pensionFunctions.d.ts +12 -0
  92. package/dist/interactions/pensionFunctions.js +127 -0
  93. package/dist/interactions/urStoaFunctions.d.ts +104 -0
  94. package/dist/interactions/urStoaFunctions.js +475 -0
  95. package/dist/interactions/wrapFunctions.d.ts +46 -0
  96. package/dist/interactions/wrapFunctions.js +221 -0
  97. package/dist/pact/cfmBuilders.d.ts +807 -0
  98. package/dist/pact/cfmBuilders.js +812 -0
  99. package/dist/pact/index.d.ts +1 -0
  100. package/dist/pact/index.js +10 -0
  101. package/package.json +64 -0
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,67 @@
1
+ /**
2
+ * activateFunctions.ts
3
+ * Info + execute functions for C_DeployStandardAccount (Activate Standard Ouronet Account).
4
+ */
5
+ import type { IKadenaKeypair } from "@stoachain/stoa-core/signing";
6
+ export type { IKadenaKeypair } from "@stoachain/stoa-core/signing";
7
+ export interface DeployStandardAccountInfo {
8
+ ignis: {
9
+ "ignis-need": number;
10
+ "ignis-full"?: number;
11
+ "ignis-discount"?: number;
12
+ "ignis-text"?: string;
13
+ };
14
+ kadena: {
15
+ "kadena-need"?: number;
16
+ "kadena-full": number;
17
+ "kadena-targets": string[];
18
+ "kadena-split": number[];
19
+ "kadena-text"?: string;
20
+ };
21
+ "pre-text"?: string | string[];
22
+ "post-text"?: string | string[];
23
+ }
24
+ export interface DeployStandardAccountFullInfo {
25
+ info: DeployStandardAccountInfo;
26
+ receivers: string[];
27
+ }
28
+ /**
29
+ * Fetches info for C_DeployStandardAccount.
30
+ * Also resolves the 4 receiver addresses from kadena-targets via DALOS.UR_AccountKadena.
31
+ * Single network call combining both.
32
+ */
33
+ /**
34
+ * Fetches ONLY the INFO response (no receiver resolution).
35
+ * Used by FunctionInfoZone — simpler, won't fail if kadena-targets resolution has issues.
36
+ */
37
+ export declare function getDeployStandardAccountInfoOnly(account: string): Promise<any | null>;
38
+ export declare function getDeployStandardAccountInfo(account: string): Promise<DeployStandardAccountFullInfo | null>;
39
+ export type DeploySmartAccountInfo = DeployStandardAccountInfo;
40
+ export type DeploySmartAccountFullInfo = DeployStandardAccountFullInfo;
41
+ /** Fetches ONLY the INFO response for C_DeploySmartAccount (no receiver
42
+ * resolution). Mirror of {@link getDeployStandardAccountInfoOnly}. */
43
+ export declare function getDeploySmartAccountInfoOnly(account: string): Promise<any | null>;
44
+ /** Fetches INFO + resolves the receiver addresses for C_DeploySmartAccount.
45
+ * Mirror of {@link getDeployStandardAccountInfo}. */
46
+ export declare function getDeploySmartAccountInfo(account: string): Promise<DeploySmartAccountFullInfo | null>;
47
+ export interface DeployStandardAccountParams {
48
+ /** INPUT I — Ouronet account address to activate */
49
+ account: string;
50
+ /** INPUT II — guard keyset keys (pub keys, 64 hex chars each) */
51
+ guardKeys: string[];
52
+ /** INPUT II — guard predicate */
53
+ guardPred: string;
54
+ /** INPUT III — k: Stoa account that sends the 4 coin.TRANSFER payments */
55
+ kadenaAddress: string;
56
+ /** INPUT IV — Ouronet account public key */
57
+ publicKey: string;
58
+ /** 4 receiver addresses (from info kadena-targets → UR_AccountKadena) */
59
+ receivers: string[];
60
+ /** 4 transfer amounts (from info kadena-split) */
61
+ amounts: number[];
62
+ /** CodexPrime Key #0 — signs GAS_PAYER + 4× coin.TRANSFER */
63
+ gasPayerKey: IKadenaKeypair;
64
+ /** Guard keyset signer keys (pure signers, de-duped with gasPayerKey) */
65
+ guardSignerKeys: IKadenaKeypair[];
66
+ }
67
+ export declare function executeDeployStandardAccount(params: DeployStandardAccountParams): Promise<any>;
@@ -0,0 +1,154 @@
1
+ /**
2
+ * activateFunctions.ts
3
+ * Info + execute functions for C_DeployStandardAccount (Activate Standard Ouronet Account).
4
+ */
5
+ import { KADENA_NAMESPACE, KADENA_CHAIN_ID, KADENA_NETWORK, STOA_AUTONOMIC_OURONETGASSTATION, } from "../constants/index.js";
6
+ import { Pact } from "@stoachain/kadena-stoic-legacy/client";
7
+ import { getFailoverClient } from "@stoachain/stoa-core/network";
8
+ import { pactRead } from "@stoachain/stoa-core/reads";
9
+ import { universalSignTransaction, fromKeypair } from "@stoachain/stoa-core/signing";
10
+ import { calculateAutoGasLimit } from "@stoachain/stoa-core/gas";
11
+ import { createSimulationError, logDetailedError } from "@stoachain/stoa-core/errors";
12
+ import { getLogger } from "@stoachain/stoa-core/observability";
13
+ import { safeCreationTime } from "@stoachain/stoa-core/pact";
14
+ // ─── Info ─────────────────────────────────────────────────────────────────────
15
+ /**
16
+ * Fetches info for C_DeployStandardAccount.
17
+ * Also resolves the 4 receiver addresses from kadena-targets via DALOS.UR_AccountKadena.
18
+ * Single network call combining both.
19
+ */
20
+ /**
21
+ * Fetches ONLY the INFO response (no receiver resolution).
22
+ * Used by FunctionInfoZone — simpler, won't fail if kadena-targets resolution has issues.
23
+ */
24
+ export async function getDeployStandardAccountInfoOnly(account) {
25
+ try {
26
+ const pactCode = `(${KADENA_NAMESPACE}.INFO-ZERO.DALOS-INFO|URC_DeployStandardAccount "${account}")`;
27
+ const response = await pactRead(pactCode, { tier: "T5" });
28
+ if (response?.result?.status === "success")
29
+ return response.result.data;
30
+ return null;
31
+ }
32
+ catch (error) {
33
+ getLogger().error("Error in getDeployStandardAccountInfoOnly:", error);
34
+ return null;
35
+ }
36
+ }
37
+ export async function getDeployStandardAccountInfo(account) {
38
+ try {
39
+ const pactCode = `(let*` +
40
+ ` ((info (${KADENA_NAMESPACE}.INFO-ZERO.DALOS-INFO|URC_DeployStandardAccount "${account}"))` +
41
+ ` (receivers (map (${KADENA_NAMESPACE}.DALOS.UR_AccountKadena) (at "kadena-targets" (at "kadena" info))))` +
42
+ `)` +
43
+ `{ "info": info, "receivers": receivers })`;
44
+ const response = await pactRead(pactCode, { tier: "T5" });
45
+ if (response?.result?.status === "success") {
46
+ const data = response.result.data;
47
+ return { info: data.info, receivers: data.receivers };
48
+ }
49
+ return null;
50
+ }
51
+ catch (error) {
52
+ getLogger().error("Error fetching DeployStandardAccount info:", error);
53
+ return null;
54
+ }
55
+ }
56
+ /** Fetches ONLY the INFO response for C_DeploySmartAccount (no receiver
57
+ * resolution). Mirror of {@link getDeployStandardAccountInfoOnly}. */
58
+ export async function getDeploySmartAccountInfoOnly(account) {
59
+ try {
60
+ const pactCode = `(${KADENA_NAMESPACE}.INFO-ZERO.DALOS-INFO|URC_DeploySmartAccount "${account}")`;
61
+ const response = await pactRead(pactCode, { tier: "T5" });
62
+ if (response?.result?.status === "success")
63
+ return response.result.data;
64
+ return null;
65
+ }
66
+ catch (error) {
67
+ getLogger().error("Error in getDeploySmartAccountInfoOnly:", error);
68
+ return null;
69
+ }
70
+ }
71
+ /** Fetches INFO + resolves the receiver addresses for C_DeploySmartAccount.
72
+ * Mirror of {@link getDeployStandardAccountInfo}. */
73
+ export async function getDeploySmartAccountInfo(account) {
74
+ try {
75
+ const pactCode = `(let*` +
76
+ ` ((info (${KADENA_NAMESPACE}.INFO-ZERO.DALOS-INFO|URC_DeploySmartAccount "${account}"))` +
77
+ ` (receivers (map (${KADENA_NAMESPACE}.DALOS.UR_AccountKadena) (at "kadena-targets" (at "kadena" info))))` +
78
+ `)` +
79
+ `{ "info": info, "receivers": receivers })`;
80
+ const response = await pactRead(pactCode, { tier: "T5" });
81
+ if (response?.result?.status === "success") {
82
+ const data = response.result.data;
83
+ return { info: data.info, receivers: data.receivers };
84
+ }
85
+ return null;
86
+ }
87
+ catch (error) {
88
+ getLogger().error("Error fetching DeploySmartAccount info:", error);
89
+ return null;
90
+ }
91
+ }
92
+ export async function executeDeployStandardAccount(params) {
93
+ const { account, guardKeys, guardPred, kadenaAddress, publicKey, receivers, amounts, gasPayerKey, guardSignerKeys, } = params;
94
+ const pactCode = `(${KADENA_NAMESPACE}.TS01-C1.DALOS|C_DeployStandardAccount` +
95
+ ` "${account}"` +
96
+ ` (read-keyset "ks")` +
97
+ ` "${kadenaAddress}"` +
98
+ ` "${publicKey}"` +
99
+ `)`;
100
+ let gasLimit = 2000000;
101
+ const buildTransaction = (gasLimitOverride) => {
102
+ const effectiveGasLimit = gasLimitOverride ?? gasLimit;
103
+ let builder = Pact.builder
104
+ .execution(pactCode)
105
+ .addData("ks", { keys: guardKeys, pred: guardPred })
106
+ .setMeta({
107
+ senderAccount: STOA_AUTONOMIC_OURONETGASSTATION,
108
+ creationTime: safeCreationTime(),
109
+ chainId: KADENA_CHAIN_ID,
110
+ gasLimit: effectiveGasLimit,
111
+ })
112
+ .setNetworkId(KADENA_NETWORK)
113
+ // CodexPrime Key #0: GAS_PAYER + 4× coin.TRANSFER
114
+ .addSigner(gasPayerKey.publicKey, (w) => [
115
+ w(`${KADENA_NAMESPACE}.DALOS.GAS_PAYER`, "", { int: 0 }, { decimal: "0.0" }),
116
+ ...receivers.map((receiver, i) => w("coin.TRANSFER", kadenaAddress, receiver, { decimal: String(amounts[i]) })),
117
+ ]);
118
+ // Guard keys — pure signers (skip if already added as gasPayerKey)
119
+ const addedPubs = new Set([gasPayerKey.publicKey]);
120
+ for (const k of guardSignerKeys) {
121
+ if (!addedPubs.has(k.publicKey)) {
122
+ builder = builder.addSigner(k.publicKey);
123
+ addedPubs.add(k.publicKey);
124
+ }
125
+ }
126
+ return builder.createTransaction();
127
+ };
128
+ const { dirtyRead, submit } = getFailoverClient(KADENA_CHAIN_ID);
129
+ // 1. Simulate with 2M (network max)
130
+ let transaction = buildTransaction();
131
+ const simulation = await dirtyRead(transaction);
132
+ if (simulation.result.status === "failure") {
133
+ const error = createSimulationError("Activate Standard Account", simulation.result, `Account: ${account} | Kadena: ${kadenaAddress}`);
134
+ logDetailedError(error);
135
+ throw error;
136
+ }
137
+ // 2. Adaptive gas: rebuild with calibrated limit
138
+ const requiredGas = simulation.gas;
139
+ if (requiredGas) {
140
+ gasLimit = calculateAutoGasLimit(requiredGas);
141
+ transaction = buildTransaction(gasLimit);
142
+ }
143
+ // 3. Sign & submit
144
+ const allSigners = [gasPayerKey];
145
+ const seenPubs = new Set([gasPayerKey.publicKey]);
146
+ for (const k of guardSignerKeys) {
147
+ if (!seenPubs.has(k.publicKey)) {
148
+ allSigners.push(k);
149
+ seenPubs.add(k.publicKey);
150
+ }
151
+ }
152
+ const signed = await universalSignTransaction(transaction, allSigners.map((s) => fromKeypair(s)));
153
+ return await submit(signed);
154
+ }
@@ -0,0 +1,140 @@
1
+ import type { IOuroAccountKeypair } from "./dexTypes.js";
2
+ import type { IKadenaKeypair } from "@stoachain/stoa-core/signing";
3
+ export interface LiquidityData {
4
+ readonly [key: string]: any;
5
+ }
6
+ export interface DeviationResult {
7
+ readonly deviation: number;
8
+ readonly maxDeviation: number;
9
+ readonly isValid: boolean;
10
+ }
11
+ export interface AddLiquidityParams {
12
+ readonly patronKeypair: IOuroAccountKeypair;
13
+ readonly kadenaKeypair: IKadenaKeypair;
14
+ readonly guardKeypair: IKadenaKeypair;
15
+ readonly account: string;
16
+ readonly swpair: string;
17
+ readonly inputAmounts: string[];
18
+ }
19
+ export interface LPTypeInfo {
20
+ readonly hasFrozenLP: boolean | null;
21
+ readonly hasSleepingLP: boolean | null;
22
+ }
23
+ export interface SpecialLPParams {
24
+ readonly type: "iced" | "glacial" | "frozen" | "sleeping";
25
+ readonly frozenDptf?: string;
26
+ readonly sleepingDpmf?: string;
27
+ readonly nonce?: number;
28
+ }
29
+ /**
30
+ * Generate LiquidityData object for deviation validation
31
+ */
32
+ export declare function generateLiquidityData(swpair: string, input: string, amounts: number[]): Promise<LiquidityData | null>;
33
+ /**
34
+ * Validate liquidity deviation
35
+ */
36
+ export declare function validateLiquidityDeviation(swpair: string, liquidityData: LiquidityData): Promise<DeviationResult | null>;
37
+ /**
38
+ * Calculate balanced liquidity amounts based on one input token
39
+ */
40
+ export declare function calculateBalancedLiquidity(swpair: string, inputTokenId: string, inputAmount: string, withValidation?: boolean): Promise<string[]>;
41
+ /**
42
+ * Check if pool supports special LP types
43
+ */
44
+ export declare function getLPTypeInfo(swpair: string): Promise<LPTypeInfo>;
45
+ /**
46
+ * Execute single-step add liquidity (TS01-C3 module)
47
+ */
48
+ export declare function executeAddLiquiditySingle(params: AddLiquidityParams): Promise<any>;
49
+ /**
50
+ * Main add liquidity function — single-step with gas simulation.
51
+ *
52
+ * REMOVED IN v3.2.2: the four multi-step execute functions
53
+ * (`executeAddLiquidityMultiStep1`, `executeAddLiquidityMultiStep2`,
54
+ * `executeAddLiquidityMultiStep3`, `executeAddLiquidityMultiStepComplete`)
55
+ * and the `MultiStepAddLiquidityResult` type they returned. The
56
+ * multi-step pipeline existed because the historical Kadena chainweb
57
+ * gas limit (150k per block) couldn't fit a single-block add-liquidity
58
+ * transaction; the consumer had to split into a defpact with two
59
+ * continuation steps. StoaChain's chainweb runs at 2M gas per block
60
+ * (13×), which fits the entire add-liquidity flow in one transaction —
61
+ * so the multi-step path has been dead code in OuronetUI since the
62
+ * gas-limit increase. Removing it closes audit findings F-ERR-005
63
+ * (`error.message.includes` on possibly-undefined retry-loop crashes),
64
+ * F-ERR-014 (listen timeout vs submit failure double-pay risk),
65
+ * F-PERF-014 (4× hardcoded 3-second sleeps), F-PERF-015 (retry-with-
66
+ * fixed-sleep against string-matched error messages), and F-API-026
67
+ * (the `_strategy` parameter on `executeAddLiquidity` was always
68
+ * `"auto"` → single-step path; dead public surface).
69
+ *
70
+ * The Pact-side multi-step contract still exists on chain
71
+ * (`TS01-CP.SWP|C_AddStandardLiquidity` defpact with continuation
72
+ * steps) — preserved for historical interoperability. This package
73
+ * just stops exposing the TypeScript wrappers around it because no
74
+ * consumer needs them any more.
75
+ */
76
+ export declare function executeAddLiquidity(params: AddLiquidityParams): Promise<any>;
77
+ /**
78
+ * Execute special LP type add liquidity (Iced, Glacial, Frozen, Sleeping)
79
+ */
80
+ export declare function executeSpecialAddLiquidity(params: AddLiquidityParams, specialParams: SpecialLPParams): Promise<any>;
81
+ /**
82
+ * URC_BalancedLiquidity — compute balanced amounts for all tokens given one input.
83
+ * Returns decimal[] with balanced values for each pool token.
84
+ */
85
+ export declare function getBalancedLiquidity(swpair: string, inputId: string, inputAmount: string, withValidation?: boolean): Promise<string[] | null>;
86
+ /**
87
+ * URC_SortLiquidity — split input amounts into balanced + asymmetric portions.
88
+ * Returns { balanced: string[], asymmetric: string[] }
89
+ */
90
+ export declare function getSortLiquidity(swpair: string, inputAmounts: string[]): Promise<{
91
+ balanced: string[];
92
+ asymmetric: string[];
93
+ } | null>;
94
+ /**
95
+ * URC_LD — build LiquidityData object from input amounts.
96
+ */
97
+ export declare function getLiquidityData(swpair: string, inputAmounts: string[]): Promise<any | null>;
98
+ /**
99
+ * UEV_Liquidity — validate asymmetric liquidity doesn't exceed max deviation.
100
+ * Returns true if valid, false if deviation too high.
101
+ */
102
+ /**
103
+ * Validate asymmetric liquidity deviation.
104
+ * Returns { valid: true, computed: string, max: string } on success,
105
+ * { valid: false } when deviation exceeds limit (chain rejection / validation failure),
106
+ * or { valid: false, error: string } when the read itself throws (RPC failure).
107
+ * Consumers distinguish RPC failure from validation rejection by checking the optional `error` field.
108
+ */
109
+ export declare function validateLiquidity(swpair: string, inputAmounts: string[]): Promise<{
110
+ valid: boolean;
111
+ computed?: string;
112
+ max?: string;
113
+ error?: string;
114
+ }>;
115
+ /**
116
+ * Execute Fuel — transfer tokens into pool without receiving LP.
117
+ * (ouronet-ns.TS01-C3.SWP|C_Fuel patron account swpair input-amounts)
118
+ */
119
+ export declare function executeFuel(params: AddLiquidityParams): Promise<any>;
120
+ /**
121
+ * Execute Remove Liquidity (Unfold) — burn LP tokens to recover underlying pool tokens.
122
+ * (ouronet-ns.TS01-C3.SWP|C_RemoveLiquidity patron account swpair lp-amount)
123
+ */
124
+ export declare function executeRemoveLiquidity(params: {
125
+ patronKeypair: {
126
+ address: string;
127
+ publicKey: string;
128
+ };
129
+ kadenaKeypair: {
130
+ publicKey: string;
131
+ secretKey: string;
132
+ };
133
+ guardKeypair: {
134
+ publicKey: string;
135
+ secretKey: string;
136
+ };
137
+ account: string;
138
+ swpair: string;
139
+ lpAmount: string;
140
+ }): Promise<any>;