@thruputchain/client 0.0.0-stage → 0.25.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/LICENSE +201 -0
- package/README.md +935 -2
- package/dist/actions-CdFSUTO2.js +298 -0
- package/dist/actions-CdFSUTO2.js.map +1 -0
- package/dist/actions-DxJZ3yIv.cjs +357 -0
- package/dist/actions-DxJZ3yIv.cjs.map +1 -0
- package/dist/actions.cjs +19 -0
- package/dist/actions.d.cts +4 -0
- package/dist/actions.d.ts +4 -0
- package/dist/actions.js +3 -0
- package/dist/client-BxB6ktQd.d.cts +690 -0
- package/dist/client-BxB6ktQd.d.cts.map +1 -0
- package/dist/client-BxB6ktQd.d.ts +690 -0
- package/dist/client-BxB6ktQd.d.ts.map +1 -0
- package/dist/codec-B7HJjMzI.cjs +8190 -0
- package/dist/codec-B7HJjMzI.cjs.map +1 -0
- package/dist/codec-CX-19jac.js +8130 -0
- package/dist/codec-CX-19jac.js.map +1 -0
- package/dist/contract-BpxjDMHw.js +1105 -0
- package/dist/contract-BpxjDMHw.js.map +1 -0
- package/dist/contract-D0wCFcAN.cjs +1219 -0
- package/dist/contract-D0wCFcAN.cjs.map +1 -0
- package/dist/contract.cjs +58 -0
- package/dist/contract.d.cts +3 -0
- package/dist/contract.d.ts +3 -0
- package/dist/contract.js +2 -0
- package/dist/contracts.cjs +1050 -0
- package/dist/contracts.cjs.map +1 -0
- package/dist/contracts.d.cts +397 -0
- package/dist/contracts.d.cts.map +1 -0
- package/dist/contracts.d.ts +397 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +1030 -0
- package/dist/contracts.js.map +1 -0
- package/dist/dev_wallet-BXWK5KR6.cjs +530 -0
- package/dist/dev_wallet-BXWK5KR6.cjs.map +1 -0
- package/dist/dev_wallet-C9eMQROk.js +497 -0
- package/dist/dev_wallet-C9eMQROk.js.map +1 -0
- package/dist/domainSeparator-B_vU_zUD.cjs +102 -0
- package/dist/domainSeparator-B_vU_zUD.cjs.map +1 -0
- package/dist/domainSeparator-CBCvxIj-.js +79 -0
- package/dist/domainSeparator-CBCvxIj-.js.map +1 -0
- package/dist/execution-CRDyKu45.d.ts +227 -0
- package/dist/execution-CRDyKu45.d.ts.map +1 -0
- package/dist/execution-DyxaIG4v.d.cts +227 -0
- package/dist/execution-DyxaIG4v.d.cts.map +1 -0
- package/dist/hex-DIcaALXL.js +112 -0
- package/dist/hex-DIcaALXL.js.map +1 -0
- package/dist/hex-DkGpiZ5e.cjs +189 -0
- package/dist/hex-DkGpiZ5e.cjs.map +1 -0
- package/dist/index--5LsCotr.d.ts +192 -0
- package/dist/index--5LsCotr.d.ts.map +1 -0
- package/dist/index-B5KqSHeL.d.cts +192 -0
- package/dist/index-B5KqSHeL.d.cts.map +1 -0
- package/dist/index-BZ0O5jZG.d.cts +163 -0
- package/dist/index-BZ0O5jZG.d.cts.map +1 -0
- package/dist/index-BuPQcAK2.d.ts +23 -0
- package/dist/index-BuPQcAK2.d.ts.map +1 -0
- package/dist/index-ByNNqY7S.d.cts +83 -0
- package/dist/index-ByNNqY7S.d.cts.map +1 -0
- package/dist/index-C-M-4jMR.d.cts +263 -0
- package/dist/index-C-M-4jMR.d.cts.map +1 -0
- package/dist/index-C97zw2rk.d.ts +137 -0
- package/dist/index-C97zw2rk.d.ts.map +1 -0
- package/dist/index-CIHK7Ew9.d.cts +303 -0
- package/dist/index-CIHK7Ew9.d.cts.map +1 -0
- package/dist/index-CIHK7Ew9.d.ts +303 -0
- package/dist/index-CIHK7Ew9.d.ts.map +1 -0
- package/dist/index-CXuO2Zjx.d.ts +263 -0
- package/dist/index-CXuO2Zjx.d.ts.map +1 -0
- package/dist/index-DOEBWXY2.d.cts +137 -0
- package/dist/index-DOEBWXY2.d.cts.map +1 -0
- package/dist/index-DzrLv3EA.d.cts +82 -0
- package/dist/index-DzrLv3EA.d.cts.map +1 -0
- package/dist/index-DzrLv3EA.d.ts +82 -0
- package/dist/index-DzrLv3EA.d.ts.map +1 -0
- package/dist/index-fdTURpBk.d.ts +83 -0
- package/dist/index-fdTURpBk.d.ts.map +1 -0
- package/dist/index-sAzHHayu.d.ts +163 -0
- package/dist/index-sAzHHayu.d.ts.map +1 -0
- package/dist/index-uQqRk9Ww.d.cts +23 -0
- package/dist/index-uQqRk9Ww.d.cts.map +1 -0
- package/dist/index.cjs +478 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +173 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +173 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +231 -0
- package/dist/index.js.map +1 -0
- package/dist/provider.cjs +101 -0
- package/dist/provider.cjs.map +1 -0
- package/dist/provider.d.cts +2 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.js +76 -0
- package/dist/provider.js.map +1 -0
- package/dist/readError-BVbfTMLv.cjs +604 -0
- package/dist/readError-BVbfTMLv.cjs.map +1 -0
- package/dist/readError-Dn_XN98x.js +551 -0
- package/dist/readError-Dn_XN98x.js.map +1 -0
- package/dist/readViews-BKJtE5J3.d.cts +594 -0
- package/dist/readViews-BKJtE5J3.d.cts.map +1 -0
- package/dist/readViews-C_FX8wby.d.ts +594 -0
- package/dist/readViews-C_FX8wby.d.ts.map +1 -0
- package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
- package/dist/sendInvocation-2EZanZZr.cjs +661 -0
- package/dist/sendInvocation-2EZanZZr.cjs.map +1 -0
- package/dist/sendInvocation-C4ruTC-9.js +505 -0
- package/dist/sendInvocation-C4ruTC-9.js.map +1 -0
- package/dist/sign-BewmV_EL.cjs +139 -0
- package/dist/sign-BewmV_EL.cjs.map +1 -0
- package/dist/sign-DVIRyW8Y.js +122 -0
- package/dist/sign-DVIRyW8Y.js.map +1 -0
- package/dist/sign-Ve0eetRO.d.ts +48 -0
- package/dist/sign-Ve0eetRO.d.ts.map +1 -0
- package/dist/sign-eUT0iGQG.d.cts +48 -0
- package/dist/sign-eUT0iGQG.d.cts.map +1 -0
- package/dist/signed-op.cjs +9 -0
- package/dist/signed-op.d.cts +3 -0
- package/dist/signed-op.d.ts +3 -0
- package/dist/signed-op.js +3 -0
- package/dist/signedOp-Bluo0OAd.cjs +183 -0
- package/dist/signedOp-Bluo0OAd.cjs.map +1 -0
- package/dist/signedOp-x4fakrr4.js +166 -0
- package/dist/signedOp-x4fakrr4.js.map +1 -0
- package/dist/signed_op-BzVbBgv4.js +154 -0
- package/dist/signed_op-BzVbBgv4.js.map +1 -0
- package/dist/signed_op-DFgQ2yFj.d.ts +58 -0
- package/dist/signed_op-DFgQ2yFj.d.ts.map +1 -0
- package/dist/signed_op-LwxrDud8.d.cts +58 -0
- package/dist/signed_op-LwxrDud8.d.cts.map +1 -0
- package/dist/signed_op-z_8fqAi1.cjs +175 -0
- package/dist/signed_op-z_8fqAi1.cjs.map +1 -0
- package/dist/signers-BFP84wJP.cjs +137 -0
- package/dist/signers-BFP84wJP.cjs.map +1 -0
- package/dist/signers-CzOSedwJ.js +120 -0
- package/dist/signers-CzOSedwJ.js.map +1 -0
- package/dist/signers.cjs +5 -0
- package/dist/signers.d.cts +3 -0
- package/dist/signers.d.ts +3 -0
- package/dist/signers.js +2 -0
- package/dist/size-506oTE28.js +91 -0
- package/dist/size-506oTE28.js.map +1 -0
- package/dist/size-OAFfOthl.cjs +108 -0
- package/dist/size-OAFfOthl.cjs.map +1 -0
- package/dist/transaction-CwkQxQOx.js +24 -0
- package/dist/transaction-CwkQxQOx.js.map +1 -0
- package/dist/transaction-DrSrCJ5y.cjs +47 -0
- package/dist/transaction-DrSrCJ5y.cjs.map +1 -0
- package/dist/transaction.cjs +13 -0
- package/dist/transaction.d.cts +3 -0
- package/dist/transaction.d.ts +3 -0
- package/dist/transaction.js +4 -0
- package/dist/transactionHash-CO9ajbvU.js +24 -0
- package/dist/transactionHash-CO9ajbvU.js.map +1 -0
- package/dist/transactionHash-D5yf4KoL.cjs +29 -0
- package/dist/transactionHash-D5yf4KoL.cjs.map +1 -0
- package/dist/transport-B-P16rs6.cjs +252 -0
- package/dist/transport-B-P16rs6.cjs.map +1 -0
- package/dist/transport-DqyoNtUy.js +234 -0
- package/dist/transport-DqyoNtUy.js.map +1 -0
- package/dist/transport.cjs +19 -0
- package/dist/transport.d.cts +3 -0
- package/dist/transport.d.ts +3 -0
- package/dist/transport.js +4 -0
- package/dist/types-BE40oD_Q.d.cts +18 -0
- package/dist/types-BE40oD_Q.d.cts.map +1 -0
- package/dist/types-BE40oD_Q.d.ts +18 -0
- package/dist/types-BE40oD_Q.d.ts.map +1 -0
- package/dist/validation-4w-vDGAi.cjs +543 -0
- package/dist/validation-4w-vDGAi.cjs.map +1 -0
- package/dist/validation-eXATmgO0.js +411 -0
- package/dist/validation-eXATmgO0.js.map +1 -0
- package/dist/wallet-Bthapk8i.cjs +709 -0
- package/dist/wallet-Bthapk8i.cjs.map +1 -0
- package/dist/wallet-CwWPYoHF.js +667 -0
- package/dist/wallet-CwWPYoHF.js.map +1 -0
- package/dist/wallet.cjs +27 -0
- package/dist/wallet.d.cts +3 -0
- package/dist/wallet.d.ts +3 -0
- package/dist/wallet.js +3 -0
- package/package.json +122 -4
|
@@ -0,0 +1,661 @@
|
|
|
1
|
+
const require_sign = require("./sign-BewmV_EL.cjs");
|
|
2
|
+
const require_contract = require("./contract-D0wCFcAN.cjs");
|
|
3
|
+
const require_codec = require("./codec-B7HJjMzI.cjs");
|
|
4
|
+
require("./hex-DkGpiZ5e.cjs");
|
|
5
|
+
const require_transactionHash = require("./transactionHash-D5yf4KoL.cjs");
|
|
6
|
+
const require_readError = require("./readError-BVbfTMLv.cjs");
|
|
7
|
+
const require_dev_wallet = require("./dev_wallet-BXWK5KR6.cjs");
|
|
8
|
+
require("./validation-4w-vDGAi.cjs");
|
|
9
|
+
let _thruputchain_protocol = require("@thruputchain/protocol");
|
|
10
|
+
let _thruputchain_xdr = require("@thruputchain/xdr");
|
|
11
|
+
let _thruputchain_protocol_utils = require("@thruputchain/protocol/utils");
|
|
12
|
+
//#region src/actions/deadline.ts
|
|
13
|
+
/** Run one operation within the caller's wall-clock budget and cancellation signal. */
|
|
14
|
+
async function beforeDeadline(operation, deadline, caller, timeout) {
|
|
15
|
+
caller?.throwIfAborted();
|
|
16
|
+
if (performance.now() >= deadline) throw timeout();
|
|
17
|
+
const controller = new AbortController();
|
|
18
|
+
const signal = caller ? AbortSignal.any([caller, controller.signal]) : controller.signal;
|
|
19
|
+
let timer;
|
|
20
|
+
let onAbort = () => {};
|
|
21
|
+
try {
|
|
22
|
+
return await Promise.race([new Promise((_, reject) => {
|
|
23
|
+
onAbort = () => reject(signal.reason);
|
|
24
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
25
|
+
timer = setTimeout(() => controller.abort(timeout()), Math.ceil(Math.max(0, deadline - performance.now())));
|
|
26
|
+
}), operation(signal)]);
|
|
27
|
+
} finally {
|
|
28
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
29
|
+
signal.removeEventListener("abort", onAbort);
|
|
30
|
+
controller.abort();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function validateTimer(value, field) {
|
|
34
|
+
if (!Number.isFinite(value) || value < 0 || value > 2147483647) throw new RangeError(`${field} must be between 0 and 2147483647`);
|
|
35
|
+
}
|
|
36
|
+
function waitDelay(delay, signal) {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
signal.throwIfAborted();
|
|
39
|
+
const finish = () => {
|
|
40
|
+
signal.removeEventListener("abort", abort);
|
|
41
|
+
resolve();
|
|
42
|
+
};
|
|
43
|
+
const timer = setTimeout(finish, delay);
|
|
44
|
+
const abort = () => {
|
|
45
|
+
clearTimeout(timer);
|
|
46
|
+
signal.removeEventListener("abort", abort);
|
|
47
|
+
reject(signal.reason);
|
|
48
|
+
};
|
|
49
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/actions/public/waitForTransactionReceipt.ts
|
|
54
|
+
/** Observation stopped; neither timeout nor cancellation proves nonexecution. */
|
|
55
|
+
var TransactionReceiptObservationError = class extends Error {
|
|
56
|
+
transactionHash;
|
|
57
|
+
knownCommitment;
|
|
58
|
+
lastStatus;
|
|
59
|
+
constructor(transactionHash, knownCommitment, lastStatus, cause) {
|
|
60
|
+
super(`Could not observe transaction ${(0, _thruputchain_protocol_utils.toBase58)(transactionHash)}`, { cause });
|
|
61
|
+
this.transactionHash = transactionHash;
|
|
62
|
+
this.knownCommitment = knownCommitment;
|
|
63
|
+
this.lastStatus = lastStatus;
|
|
64
|
+
this.name = "TransactionReceiptObservationError";
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var TransactionReceiptTimeoutError = class extends TransactionReceiptObservationError {
|
|
68
|
+
constructor(transactionHash, knownCommitment, lastStatus, cause) {
|
|
69
|
+
super(transactionHash, knownCommitment, lastStatus, cause);
|
|
70
|
+
this.name = "TransactionReceiptTimeoutError";
|
|
71
|
+
this.message = `Timed out waiting for transaction ${(0, _thruputchain_protocol_utils.toBase58)(transactionHash)}`;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const equal = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]);
|
|
75
|
+
/** Return any committed receipt, including failed execution. Never sign or resubmit. */
|
|
76
|
+
async function waitForTransactionReceipt(client, transactionHash, options = {}) {
|
|
77
|
+
return await observe(client, transactionHash, options, false);
|
|
78
|
+
}
|
|
79
|
+
/** Observe commitment independently of receipt availability or execution success. */
|
|
80
|
+
async function waitForCommitment(client, transactionHash, options = {}) {
|
|
81
|
+
return await observe(client, transactionHash, options, true);
|
|
82
|
+
}
|
|
83
|
+
function snapshotStatus(status) {
|
|
84
|
+
const copy = (value) => {
|
|
85
|
+
if (value instanceof require_codec.UnsupportedRpcValue) return new require_codec.UnsupportedRpcValue(structuredClone(value.raw));
|
|
86
|
+
if (Array.isArray(value)) return value.map(copy);
|
|
87
|
+
if (ArrayBuffer.isView(value)) return structuredClone(value);
|
|
88
|
+
if (value !== null && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, copy(entry)]));
|
|
89
|
+
return value;
|
|
90
|
+
};
|
|
91
|
+
return copy(status);
|
|
92
|
+
}
|
|
93
|
+
async function observe(client, hash, options, commitmentOnly) {
|
|
94
|
+
const timeoutMs = options.timeoutMs ?? 3e4;
|
|
95
|
+
const interval = options.pollingIntervalMs ?? 250;
|
|
96
|
+
validateTimer(timeoutMs, "timeoutMs");
|
|
97
|
+
validateTimer(interval, "pollingIntervalMs");
|
|
98
|
+
const transactionHash = new Uint8Array(hash);
|
|
99
|
+
const networkHash = new Uint8Array(options.expectedNetworkHash ?? client.discovery.network.networkHash);
|
|
100
|
+
if (transactionHash.length !== 32 || networkHash.length !== 32) throw new RangeError("Transaction and network hashes must contain 32 bytes");
|
|
101
|
+
let commitment;
|
|
102
|
+
let lastStatus;
|
|
103
|
+
if (options.knownCommitment) {
|
|
104
|
+
const known = options.knownCommitment;
|
|
105
|
+
if (!equal(known.transactionHash, transactionHash) || !equal(known.networkHash, networkHash) || typeof known.blockHeight !== "bigint" || known.blockHeight < 0n || known.blockHeight > 9223372036854775807n) throw new require_readError.RpcCompatibilityError("Known commitment does not match the transaction/network context");
|
|
106
|
+
commitment = {
|
|
107
|
+
transactionHash: transactionHash.slice(),
|
|
108
|
+
networkHash: networkHash.slice(),
|
|
109
|
+
blockHeight: known.blockHeight
|
|
110
|
+
};
|
|
111
|
+
lastStatus = {
|
|
112
|
+
status: "committed",
|
|
113
|
+
blockHeight: known.blockHeight
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
client.requireMethods([
|
|
117
|
+
"getNetworkInfo",
|
|
118
|
+
"getTransactionReceipt",
|
|
119
|
+
"getTransactionStatus"
|
|
120
|
+
]);
|
|
121
|
+
const deadline = performance.now() + timeoutMs;
|
|
122
|
+
let lastFailure;
|
|
123
|
+
let failures = 0;
|
|
124
|
+
const timeout = () => new TransactionReceiptTimeoutError(transactionHash.slice(), commitment && structuredClone(commitment), lastStatus, lastFailure);
|
|
125
|
+
const run = (operation) => beforeDeadline(operation, deadline, options.signal, timeout);
|
|
126
|
+
const retain = (blockHeight) => {
|
|
127
|
+
if (commitment && commitment.blockHeight !== blockHeight) throw new require_readError.RpcCompatibilityError("Conflicting commitment heights for the same transaction");
|
|
128
|
+
commitment = {
|
|
129
|
+
transactionHash: transactionHash.slice(),
|
|
130
|
+
networkHash: networkHash.slice(),
|
|
131
|
+
blockHeight
|
|
132
|
+
};
|
|
133
|
+
lastStatus = {
|
|
134
|
+
status: "committed",
|
|
135
|
+
blockHeight
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
try {
|
|
139
|
+
while (true) {
|
|
140
|
+
let retryAfterMs;
|
|
141
|
+
let networkVerified = false;
|
|
142
|
+
let failed = false;
|
|
143
|
+
try {
|
|
144
|
+
if (!equal((await run((signal) => client.getNetworkInfo({}, { signal }))).networkHash, networkHash)) throw new require_readError.RpcCompatibilityError("Observation endpoint network changed");
|
|
145
|
+
networkVerified = true;
|
|
146
|
+
if (commitmentOnly && commitment) return structuredClone(commitment);
|
|
147
|
+
const receipt = await run((signal) => client.getTransactionReceipt({ transactionHash }, { signal }));
|
|
148
|
+
if (receipt) {
|
|
149
|
+
retain(receipt.blockHeight);
|
|
150
|
+
return commitmentOnly ? structuredClone(commitment) : receipt;
|
|
151
|
+
}
|
|
152
|
+
} catch (cause) {
|
|
153
|
+
lastFailure = cause;
|
|
154
|
+
failed = true;
|
|
155
|
+
if (cause instanceof require_readError.NativeRpcError && cause.decoded.classification === "known") {
|
|
156
|
+
const data = cause.decoded.data;
|
|
157
|
+
if (data.kind === "backendDataInvalid" && data.observation) {
|
|
158
|
+
retain(data.observation.blockHeight);
|
|
159
|
+
if (commitmentOnly) return structuredClone(commitment);
|
|
160
|
+
}
|
|
161
|
+
if ("retryAfterMs" in data) retryAfterMs = data.retryAfterMs;
|
|
162
|
+
}
|
|
163
|
+
if (options.signal?.aborted || require_readError.classifyReadError(cause, options) !== "transient") throw cause;
|
|
164
|
+
}
|
|
165
|
+
let observedStatus;
|
|
166
|
+
if (networkVerified) try {
|
|
167
|
+
const status = await run((signal) => client.getTransactionStatus({ transactionHash }, { signal }));
|
|
168
|
+
if (!(status instanceof require_codec.UnsupportedRpcValue) && status.status === "committed") retain(status.blockHeight);
|
|
169
|
+
else if (!commitment) lastStatus = snapshotStatus(status);
|
|
170
|
+
observedStatus = status;
|
|
171
|
+
} catch (cause) {
|
|
172
|
+
if (cause instanceof require_readError.RpcCompatibilityError || cause instanceof require_codec.RpcDecodingError || cause instanceof require_codec.RpcRequestValidationError || require_readError.classifyReadError(cause, options) === "permanent") throw cause;
|
|
173
|
+
options.signal?.throwIfAborted();
|
|
174
|
+
lastFailure = cause;
|
|
175
|
+
failed = true;
|
|
176
|
+
if (cause instanceof require_readError.NativeRpcError && cause.decoded.classification === "known" && "retryAfterMs" in cause.decoded.data) {
|
|
177
|
+
const hint = cause.decoded.data.retryAfterMs;
|
|
178
|
+
if (hint !== void 0 && (retryAfterMs === void 0 || hint > retryAfterMs)) retryAfterMs = hint;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (observedStatus !== void 0) options.onStatus?.(observedStatus);
|
|
182
|
+
if (failed) failures++;
|
|
183
|
+
else {
|
|
184
|
+
failures = 0;
|
|
185
|
+
lastFailure = void 0;
|
|
186
|
+
}
|
|
187
|
+
if (commitmentOnly && commitment) return structuredClone(commitment);
|
|
188
|
+
const backoff = failures ? Math.min(5e3, Math.max(1, interval) * 2 ** Math.min(failures - 1, 8)) * (.5 + Math.random() / 2) : interval;
|
|
189
|
+
const remaining = deadline - performance.now();
|
|
190
|
+
if (retryAfterMs !== void 0 && retryAfterMs > BigInt(Math.max(0, Math.floor(remaining)))) throw timeout();
|
|
191
|
+
const delay = Math.max(backoff, Number(retryAfterMs ?? 0n));
|
|
192
|
+
await run((signal) => waitDelay(Math.min(delay, Math.max(0, remaining)), signal));
|
|
193
|
+
}
|
|
194
|
+
} catch (cause) {
|
|
195
|
+
if (cause instanceof TransactionReceiptTimeoutError) throw cause;
|
|
196
|
+
throw new TransactionReceiptObservationError(transactionHash, commitment && structuredClone(commitment), lastStatus, cause);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/wallet/invocationAdapter.ts
|
|
201
|
+
/** Build a root batch directly, copying call bytes before asynchronous work. */
|
|
202
|
+
function createDefaultWalletBatchInvocation(accountAddress, request) {
|
|
203
|
+
if (!Array.isArray(request.invocations) || request.invocations.length < 1 || request.invocations.length > 16) throw new RangeError("DefaultWallet requires 1 to 16 calls");
|
|
204
|
+
return require_dev_wallet.DefaultWallet.v0_1.execute.invocation((0, _thruputchain_protocol.contractAddress)(new Uint8Array(accountAddress)), request.gasLimit, { calls: request.invocations.map((inner) => ({
|
|
205
|
+
target: (0, _thruputchain_protocol.contractAddress)(new Uint8Array(inner.invoked_address)),
|
|
206
|
+
entrypoint: (0, _thruputchain_xdr.fixedBytes)(new Uint8Array(inner.entrypoint), 8),
|
|
207
|
+
gas_limit: inner.gas_limit,
|
|
208
|
+
calldata: new Uint8Array(inner.calldata)
|
|
209
|
+
})) });
|
|
210
|
+
}
|
|
211
|
+
/** Define an invocation adapter while preserving its request type. */
|
|
212
|
+
function defineWalletInvocationAdapter(adapter) {
|
|
213
|
+
return adapter;
|
|
214
|
+
}
|
|
215
|
+
/** Wrap one call through the native-compatible DefaultWallet interface. */
|
|
216
|
+
const defaultWalletAdapter = defineWalletInvocationAdapter({
|
|
217
|
+
createBatchRootInvocation: createDefaultWalletBatchInvocation,
|
|
218
|
+
decodeExecutionReturns: (receipt) => require_dev_wallet.DefaultWallet.v0_1.execute.decodeReceipt(receipt).value,
|
|
219
|
+
createDeploymentInvocation(account, deployment, options) {
|
|
220
|
+
if (options.initializer && !require_contract.bytesEqual(options.initializer.invoked_address, deployment.address)) throw new Error("Initializer must target the predicted deployment address");
|
|
221
|
+
if (options.amount < 0n) throw new RangeError("Deployment amount must not be negative");
|
|
222
|
+
return require_dev_wallet.DefaultWallet.v0_1.deploy.invocation(account, options.gasLimit, {
|
|
223
|
+
nonce: (0, _thruputchain_xdr.fixedBytes)(deployment.deploymentNonce, 32),
|
|
224
|
+
contractHash: (0, _thruputchain_xdr.fixedBytes)(deployment.contractHash, 32),
|
|
225
|
+
amount: options.amount,
|
|
226
|
+
initializer: options.initializer ? {
|
|
227
|
+
entrypoint: (0, _thruputchain_xdr.fixedBytes)(options.initializer.entrypoint, 8),
|
|
228
|
+
gas_limit: options.initializer.gas_limit,
|
|
229
|
+
calldata: options.initializer.calldata
|
|
230
|
+
} : null
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
decodeDeploymentReceipt: (receipt) => require_dev_wallet.DefaultWallet.v0_1.deploy.decodeReceipt(receipt).value,
|
|
234
|
+
createRootInvocation(accountAddress, request) {
|
|
235
|
+
return createDefaultWalletBatchInvocation(accountAddress, {
|
|
236
|
+
invocations: [request.invocation],
|
|
237
|
+
gasLimit: request.gasLimit
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
/** Wrap one call through the legacy DevWallet. Unified deployment is unsupported. */
|
|
242
|
+
const devWalletAdapter = defineWalletInvocationAdapter({
|
|
243
|
+
decodeExecutionReturns: () => null,
|
|
244
|
+
createRootInvocation(accountAddress, request) {
|
|
245
|
+
return require_dev_wallet.DevWallet.v0_1.doAction.invocation((0, _thruputchain_protocol.contractAddress)(new Uint8Array(accountAddress)), request.gasLimit, { invocationBytes: (0, _thruputchain_protocol.serialize)(request.invocation, _thruputchain_protocol.codec.Invocation) });
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/wallet/execution.ts
|
|
250
|
+
/** A committed execution failure, retaining the complete native receipt. */
|
|
251
|
+
var TransactionExecutionError = class extends Error {
|
|
252
|
+
receipt;
|
|
253
|
+
submission;
|
|
254
|
+
constructor(receipt, submission) {
|
|
255
|
+
super(receipt.execution instanceof require_codec.UnsupportedRpcValue ? `Transaction ${(0, _thruputchain_protocol_utils.toBase58)(receipt.transactionHash)} has an unsupported execution outcome` : `Transaction ${(0, _thruputchain_protocol_utils.toBase58)(receipt.transactionHash)} execution failed (${receipt.execution.result})`);
|
|
256
|
+
this.receipt = receipt;
|
|
257
|
+
this.submission = submission;
|
|
258
|
+
this.name = "TransactionExecutionError";
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
/** A future execution variant is unsupported, never inferred to be success or failure. */
|
|
262
|
+
var UnsupportedTransactionOutcomeError = class extends TransactionExecutionError {
|
|
263
|
+
constructor(receipt, submission) {
|
|
264
|
+
super(receipt, submission);
|
|
265
|
+
this.name = "UnsupportedTransactionOutcomeError";
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
function assertTransactionSuccess(receipt, submission) {
|
|
269
|
+
if (receipt.execution instanceof require_codec.UnsupportedRpcValue) throw new UnsupportedTransactionOutcomeError(receipt, submission);
|
|
270
|
+
if (receipt.execution.result !== "return") throw new TransactionExecutionError(receipt, submission);
|
|
271
|
+
}
|
|
272
|
+
/** A submit response that does not establish the currently supported admission outcome. */
|
|
273
|
+
var UnsupportedTransactionAdmissionError = class extends Error {
|
|
274
|
+
response;
|
|
275
|
+
constructor(response) {
|
|
276
|
+
super("Transaction submission returned an unsupported admission outcome");
|
|
277
|
+
this.response = response;
|
|
278
|
+
this.name = "UnsupportedTransactionAdmissionError";
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
/** Keep low-level future values intact, but never project them into an admitted hash. */
|
|
282
|
+
function assertTransactionAdmission(response) {
|
|
283
|
+
if (response.admission !== "accepted") throw new UnsupportedTransactionAdmissionError(response);
|
|
284
|
+
}
|
|
285
|
+
/** Snapshot approved bytes before submission; accessor copies protect the retained record. */
|
|
286
|
+
function createSubmissionEvidence(bytes, network) {
|
|
287
|
+
const signedTransaction = new Uint8Array(bytes);
|
|
288
|
+
const networkHash = new Uint8Array(network);
|
|
289
|
+
if (networkHash.length !== 32) throw new RangeError("networkHash must contain 32 bytes");
|
|
290
|
+
const transactionHash = require_transactionHash.hashSignedTransaction((0, _thruputchain_protocol.deserialize)(signedTransaction, _thruputchain_protocol.codec.SignedTransaction));
|
|
291
|
+
return Object.freeze({
|
|
292
|
+
get signedTransaction() {
|
|
293
|
+
return signedTransaction.slice();
|
|
294
|
+
},
|
|
295
|
+
get transactionHash() {
|
|
296
|
+
return transactionHash.slice();
|
|
297
|
+
},
|
|
298
|
+
get networkHash() {
|
|
299
|
+
return networkHash.slice();
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
/** Submission or observation stopped, preserving exact approved bytes and commitment. */
|
|
304
|
+
var TransactionObservationError = class extends Error {
|
|
305
|
+
submission;
|
|
306
|
+
submissionCause;
|
|
307
|
+
knownCommitment;
|
|
308
|
+
phase;
|
|
309
|
+
constructor(submission, cause, submissionCause, knownCommitment, phase = "observation") {
|
|
310
|
+
super(`Could not complete transaction ${(0, _thruputchain_protocol_utils.toBase58)(submission.transactionHash)}`, { cause });
|
|
311
|
+
this.submission = submission;
|
|
312
|
+
this.submissionCause = submissionCause;
|
|
313
|
+
this.knownCommitment = knownCommitment;
|
|
314
|
+
this.phase = phase;
|
|
315
|
+
this.name = "TransactionObservationError";
|
|
316
|
+
}
|
|
317
|
+
get transactionHash() {
|
|
318
|
+
return this.submission.transactionHash;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
/** Submit once, then reconcile only by reads. No path replaces or repeats signed bytes. */
|
|
322
|
+
async function submitAndObserve(client, evidence, submit, options, wasDispatched) {
|
|
323
|
+
const submission = createSubmissionEvidence(evidence.signedTransaction, evidence.networkHash);
|
|
324
|
+
const timeoutMs = options?.timeoutMs ?? 3e4;
|
|
325
|
+
validateTimer(timeoutMs, "timeoutMs");
|
|
326
|
+
const deadline = performance.now() + timeoutMs;
|
|
327
|
+
let submissionCause;
|
|
328
|
+
try {
|
|
329
|
+
options?.signal?.throwIfAborted();
|
|
330
|
+
if (timeoutMs === 0) throw new Error("Transaction submission timed out before dispatch");
|
|
331
|
+
} catch (cause) {
|
|
332
|
+
throw new TransactionObservationError(submission, cause, void 0, void 0, "beforeSubmission");
|
|
333
|
+
}
|
|
334
|
+
try {
|
|
335
|
+
await beforeDeadline(submit, deadline, options?.signal, () => /* @__PURE__ */ new Error("Transaction submission timed out"));
|
|
336
|
+
} catch (cause) {
|
|
337
|
+
if (wasDispatched?.() === false || cause instanceof require_codec.RpcRequestValidationError || cause instanceof require_readError.RpcCompatibilityError) throw new TransactionObservationError(submission, cause, void 0, void 0, "beforeSubmission");
|
|
338
|
+
if (cause instanceof require_readError.NativeRpcError && cause.decoded.classification === "known" && (cause.decoded.data.kind === "invalidParams" || cause.decoded.data.kind === "transactionInvalid" || cause.decoded.data.kind === "transactionRejected")) throw new TransactionObservationError(submission, cause, void 0, void 0, "submission");
|
|
339
|
+
submissionCause = cause;
|
|
340
|
+
if (options?.signal?.aborted || performance.now() >= deadline) throw new TransactionObservationError(submission, cause, submissionCause, void 0, "submission");
|
|
341
|
+
}
|
|
342
|
+
try {
|
|
343
|
+
const receipt = await client.waitForTransactionReceipt(submission.transactionHash, {
|
|
344
|
+
...options,
|
|
345
|
+
expectedNetworkHash: submission.networkHash,
|
|
346
|
+
timeoutMs: Math.max(0, deadline - performance.now())
|
|
347
|
+
});
|
|
348
|
+
return {
|
|
349
|
+
transactionHash: receipt.transactionHash,
|
|
350
|
+
receipt,
|
|
351
|
+
submission
|
|
352
|
+
};
|
|
353
|
+
} catch (cause) {
|
|
354
|
+
throw new TransactionObservationError(submission, cause, submissionCause, cause instanceof TransactionReceiptObservationError ? cause.knownCommitment : void 0);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/** Wait for a committed receipt, then require execution success. */
|
|
358
|
+
async function waitForExecution(client, hash, options) {
|
|
359
|
+
const receipt = await client.waitForTransactionReceipt(hash, options);
|
|
360
|
+
assertTransactionSuccess(receipt);
|
|
361
|
+
return {
|
|
362
|
+
transactionHash: receipt.transactionHash,
|
|
363
|
+
receipt
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Decode DefaultWallet child returns without modifying the root receipt.
|
|
368
|
+
* Works after disconnect and preserves call order. Supply an adapter for other
|
|
369
|
+
* wallets. Wallets such as DevWallet that discard child return data report
|
|
370
|
+
* unavailable results. Failed wallet receipts are not decoded with a child ABI:
|
|
371
|
+
* even a single child call does not establish where an abort originated.
|
|
372
|
+
*/
|
|
373
|
+
function decodeExecution(receipt, calls, adapter = defaultWalletAdapter, submission) {
|
|
374
|
+
assertTransactionSuccess(receipt, submission);
|
|
375
|
+
try {
|
|
376
|
+
const buffers = adapter.decodeExecutionReturns?.(receipt);
|
|
377
|
+
if (buffers == null) throw new ExecutionReturnUnavailableError(receipt, submission);
|
|
378
|
+
if (buffers.length !== calls.length) throw new Error(`Returned ${buffers.length} child results; expected ${calls.length}`);
|
|
379
|
+
return calls.map((call, index) => call.method.decodeReturn(buffers[index]));
|
|
380
|
+
} catch (cause) {
|
|
381
|
+
if (cause instanceof ExecutionReturnUnavailableError) throw cause;
|
|
382
|
+
throw new ExecutionDecodeError(receipt, cause, submission);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
/** A committed successful execution whose return data could not be decoded. */
|
|
386
|
+
var ExecutionDecodeError = class extends Error {
|
|
387
|
+
receipt;
|
|
388
|
+
submission;
|
|
389
|
+
constructor(receipt, cause, submission) {
|
|
390
|
+
super(`Transaction ${(0, _thruputchain_protocol_utils.toBase58)(receipt.transactionHash)} committed, but result decoding failed: ${cause instanceof Error ? cause.message : String(cause)}`, { cause });
|
|
391
|
+
this.receipt = receipt;
|
|
392
|
+
this.submission = submission;
|
|
393
|
+
this.name = "ExecutionDecodeError";
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
/** Execution succeeded, but this wallet does not preserve child return buffers. */
|
|
397
|
+
var ExecutionReturnUnavailableError = class extends Error {
|
|
398
|
+
receipt;
|
|
399
|
+
submission;
|
|
400
|
+
constructor(receipt, submission) {
|
|
401
|
+
super(`Transaction ${(0, _thruputchain_protocol_utils.toBase58)(receipt.transactionHash)} committed successfully, but its wallet does not expose child return data`);
|
|
402
|
+
this.receipt = receipt;
|
|
403
|
+
this.submission = submission;
|
|
404
|
+
this.name = "ExecutionReturnUnavailableError";
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* Sum explicit child budgets and a calibrated wallet overhead, checking u64 bounds.
|
|
409
|
+
* This is not gas estimation. Calibrate budgets against the target runtime and
|
|
410
|
+
* workload; there is no universally safe wallet overhead. Root gas reserves
|
|
411
|
+
* scheduling capacity against the sender's free native-token balance. Storage
|
|
412
|
+
* deposits are a separate requirement, and funding a target contract does not
|
|
413
|
+
* sponsor root gas.
|
|
414
|
+
*/
|
|
415
|
+
function walletGasLimit(calls, overhead) {
|
|
416
|
+
const limits = [overhead, ...calls.map((call) => call.gas_limit)];
|
|
417
|
+
if (limits.some((limit) => typeof limit !== "bigint" || limit < 0n)) throw new RangeError("Gas budgets must be nonnegative bigint values");
|
|
418
|
+
const total = limits.reduce((sum, limit) => sum + limit, 0n);
|
|
419
|
+
if (total > 18446744073709551615n) throw new RangeError("Root gas budget exceeds u64");
|
|
420
|
+
return (0, _thruputchain_protocol.gasAmount)(total);
|
|
421
|
+
}
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region src/actions/wallet/prepareTransaction.ts
|
|
424
|
+
const int64Max = 9223372036854775807n;
|
|
425
|
+
const uint64Max = 18446744073709551615n;
|
|
426
|
+
const defaultExpiryBlocks = 100n;
|
|
427
|
+
/** Prepare an unsigned transaction for a wallet account. */
|
|
428
|
+
async function prepareTransaction(client, account, request) {
|
|
429
|
+
const invocation = (0, _thruputchain_protocol.deserialize)((0, _thruputchain_protocol.serialize)(request.invocation, _thruputchain_protocol.codec.Invocation), _thruputchain_protocol.codec.Invocation);
|
|
430
|
+
const contractsToDeploy = (request.contractsToDeploy ?? []).map((contract) => (0, _thruputchain_protocol.deserialize)((0, _thruputchain_protocol.serialize)(contract, _thruputchain_protocol.codec.Contract), _thruputchain_protocol.codec.Contract));
|
|
431
|
+
const authClaim = (0, _thruputchain_protocol.deserialize)((0, _thruputchain_protocol.serialize)(account.authClaim, _thruputchain_protocol.codec.AuthClaim), _thruputchain_protocol.codec.AuthClaim);
|
|
432
|
+
if (!bytesEqual(invocation.invoked_address, account.address)) throw new Error("Root invocation address must match the wallet account");
|
|
433
|
+
if (request.blockExpiryHeight !== void 0 && request.expiryBlocks !== void 0) throw new Error("blockExpiryHeight and expiryBlocks are mutually exclusive");
|
|
434
|
+
const nonce = request.nonce ?? randomUint64();
|
|
435
|
+
validateRange(nonce, 0n, uint64Max, "nonce");
|
|
436
|
+
let expiry;
|
|
437
|
+
if (request.blockExpiryHeight !== void 0) {
|
|
438
|
+
expiry = request.blockExpiryHeight;
|
|
439
|
+
validateRange(expiry, 0n, int64Max, "blockExpiryHeight");
|
|
440
|
+
} else {
|
|
441
|
+
const expiryBlocks = request.expiryBlocks ?? defaultExpiryBlocks;
|
|
442
|
+
validateRange(expiryBlocks, 1n, int64Max, "expiryBlocks");
|
|
443
|
+
expiry = (await client.getChainTip()).blockHeight + expiryBlocks;
|
|
444
|
+
validateRange(expiry, 0n, int64Max, "blockExpiryHeight");
|
|
445
|
+
}
|
|
446
|
+
return require_sign.createTransaction({
|
|
447
|
+
invocation,
|
|
448
|
+
uniquifier: {
|
|
449
|
+
block_expiry_height: (0, _thruputchain_protocol.blockHeight)(expiry),
|
|
450
|
+
nonce
|
|
451
|
+
},
|
|
452
|
+
contracts_to_deploy: contractsToDeploy,
|
|
453
|
+
auth_claim: authClaim
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
function randomUint64() {
|
|
457
|
+
const bytes = crypto.getRandomValues(new Uint8Array(8));
|
|
458
|
+
return new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength).getBigUint64(0);
|
|
459
|
+
}
|
|
460
|
+
function validateRange(value, min, max, name) {
|
|
461
|
+
if (typeof value !== "bigint" || value < min || value > max) throw new RangeError(`${name} must be between ${min} and ${max}`);
|
|
462
|
+
}
|
|
463
|
+
function bytesEqual(left, right) {
|
|
464
|
+
if (left.length !== right.length) return false;
|
|
465
|
+
return left.every((byte, index) => byte === right[index]);
|
|
466
|
+
}
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region src/actions/wallet/sendInvocation.ts
|
|
469
|
+
/** Sign a transaction with a wallet account's configured signers. */
|
|
470
|
+
function signWalletTransaction(account, transaction, networkHash) {
|
|
471
|
+
return require_sign.signTransaction(transaction, account.signers, networkHash);
|
|
472
|
+
}
|
|
473
|
+
/** Prepare, sign, and submit one explicit root invocation. */
|
|
474
|
+
async function sendInvocation(client, account, networkHash, request, controls = {}) {
|
|
475
|
+
controls.signal?.throwIfAborted();
|
|
476
|
+
client.requireMethods(["getChainTip", "sendTransaction"]);
|
|
477
|
+
const signingNetwork = new Uint8Array(networkHash);
|
|
478
|
+
const checkNetwork = () => {
|
|
479
|
+
const discovered = client.discovery.network.networkHash;
|
|
480
|
+
if (signingNetwork.length !== 32 || discovered.length !== 32 || signingNetwork.some((value, index) => value !== discovered[index])) throw new require_readError.RpcCompatibilityError("Signing network does not match endpoint discovery");
|
|
481
|
+
};
|
|
482
|
+
checkNetwork();
|
|
483
|
+
const signers = account.signers.map(({ signer, publicKeyId }) => ({
|
|
484
|
+
signer,
|
|
485
|
+
publicKeyId
|
|
486
|
+
}));
|
|
487
|
+
const transaction = await prepareTransaction(client, account, request);
|
|
488
|
+
checkNetwork();
|
|
489
|
+
const evidence = createSubmissionEvidence((0, _thruputchain_protocol.serialize)(await require_sign.signTransaction(transaction, signers, signingNetwork), _thruputchain_protocol.codec.SignedTransaction), signingNetwork);
|
|
490
|
+
let phase = "beforeSubmission";
|
|
491
|
+
try {
|
|
492
|
+
await controls.onSigned?.(evidence);
|
|
493
|
+
controls.signal?.throwIfAborted();
|
|
494
|
+
checkNetwork();
|
|
495
|
+
phase = "submission";
|
|
496
|
+
const result = await client.sendTransaction({ signedTransaction: evidence.signedTransaction }, { signal: controls.signal });
|
|
497
|
+
assertTransactionAdmission(result);
|
|
498
|
+
return (0, _thruputchain_protocol.sha256Hash)(result.transactionHash);
|
|
499
|
+
} catch (cause) {
|
|
500
|
+
throw new TransactionObservationError(evidence, cause, void 0, void 0, cause instanceof require_codec.RpcRequestValidationError || cause instanceof require_readError.RpcCompatibilityError ? "beforeSubmission" : phase);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
//#endregion
|
|
504
|
+
Object.defineProperty(exports, "ExecutionDecodeError", {
|
|
505
|
+
enumerable: true,
|
|
506
|
+
get: function() {
|
|
507
|
+
return ExecutionDecodeError;
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
Object.defineProperty(exports, "ExecutionReturnUnavailableError", {
|
|
511
|
+
enumerable: true,
|
|
512
|
+
get: function() {
|
|
513
|
+
return ExecutionReturnUnavailableError;
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
Object.defineProperty(exports, "TransactionExecutionError", {
|
|
517
|
+
enumerable: true,
|
|
518
|
+
get: function() {
|
|
519
|
+
return TransactionExecutionError;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
Object.defineProperty(exports, "TransactionObservationError", {
|
|
523
|
+
enumerable: true,
|
|
524
|
+
get: function() {
|
|
525
|
+
return TransactionObservationError;
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
Object.defineProperty(exports, "TransactionReceiptObservationError", {
|
|
529
|
+
enumerable: true,
|
|
530
|
+
get: function() {
|
|
531
|
+
return TransactionReceiptObservationError;
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
Object.defineProperty(exports, "TransactionReceiptTimeoutError", {
|
|
535
|
+
enumerable: true,
|
|
536
|
+
get: function() {
|
|
537
|
+
return TransactionReceiptTimeoutError;
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
Object.defineProperty(exports, "UnsupportedTransactionAdmissionError", {
|
|
541
|
+
enumerable: true,
|
|
542
|
+
get: function() {
|
|
543
|
+
return UnsupportedTransactionAdmissionError;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
Object.defineProperty(exports, "UnsupportedTransactionOutcomeError", {
|
|
547
|
+
enumerable: true,
|
|
548
|
+
get: function() {
|
|
549
|
+
return UnsupportedTransactionOutcomeError;
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
Object.defineProperty(exports, "assertTransactionAdmission", {
|
|
553
|
+
enumerable: true,
|
|
554
|
+
get: function() {
|
|
555
|
+
return assertTransactionAdmission;
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
Object.defineProperty(exports, "assertTransactionSuccess", {
|
|
559
|
+
enumerable: true,
|
|
560
|
+
get: function() {
|
|
561
|
+
return assertTransactionSuccess;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
Object.defineProperty(exports, "beforeDeadline", {
|
|
565
|
+
enumerable: true,
|
|
566
|
+
get: function() {
|
|
567
|
+
return beforeDeadline;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
Object.defineProperty(exports, "createDefaultWalletBatchInvocation", {
|
|
571
|
+
enumerable: true,
|
|
572
|
+
get: function() {
|
|
573
|
+
return createDefaultWalletBatchInvocation;
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
Object.defineProperty(exports, "createSubmissionEvidence", {
|
|
577
|
+
enumerable: true,
|
|
578
|
+
get: function() {
|
|
579
|
+
return createSubmissionEvidence;
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
Object.defineProperty(exports, "decodeExecution", {
|
|
583
|
+
enumerable: true,
|
|
584
|
+
get: function() {
|
|
585
|
+
return decodeExecution;
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
Object.defineProperty(exports, "defaultWalletAdapter", {
|
|
589
|
+
enumerable: true,
|
|
590
|
+
get: function() {
|
|
591
|
+
return defaultWalletAdapter;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
Object.defineProperty(exports, "defineWalletInvocationAdapter", {
|
|
595
|
+
enumerable: true,
|
|
596
|
+
get: function() {
|
|
597
|
+
return defineWalletInvocationAdapter;
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
Object.defineProperty(exports, "devWalletAdapter", {
|
|
601
|
+
enumerable: true,
|
|
602
|
+
get: function() {
|
|
603
|
+
return devWalletAdapter;
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
Object.defineProperty(exports, "prepareTransaction", {
|
|
607
|
+
enumerable: true,
|
|
608
|
+
get: function() {
|
|
609
|
+
return prepareTransaction;
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
Object.defineProperty(exports, "sendInvocation", {
|
|
613
|
+
enumerable: true,
|
|
614
|
+
get: function() {
|
|
615
|
+
return sendInvocation;
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
Object.defineProperty(exports, "signWalletTransaction", {
|
|
619
|
+
enumerable: true,
|
|
620
|
+
get: function() {
|
|
621
|
+
return signWalletTransaction;
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
Object.defineProperty(exports, "submitAndObserve", {
|
|
625
|
+
enumerable: true,
|
|
626
|
+
get: function() {
|
|
627
|
+
return submitAndObserve;
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
Object.defineProperty(exports, "validateTimer", {
|
|
631
|
+
enumerable: true,
|
|
632
|
+
get: function() {
|
|
633
|
+
return validateTimer;
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
Object.defineProperty(exports, "waitForCommitment", {
|
|
637
|
+
enumerable: true,
|
|
638
|
+
get: function() {
|
|
639
|
+
return waitForCommitment;
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
Object.defineProperty(exports, "waitForExecution", {
|
|
643
|
+
enumerable: true,
|
|
644
|
+
get: function() {
|
|
645
|
+
return waitForExecution;
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
Object.defineProperty(exports, "waitForTransactionReceipt", {
|
|
649
|
+
enumerable: true,
|
|
650
|
+
get: function() {
|
|
651
|
+
return waitForTransactionReceipt;
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
Object.defineProperty(exports, "walletGasLimit", {
|
|
655
|
+
enumerable: true,
|
|
656
|
+
get: function() {
|
|
657
|
+
return walletGasLimit;
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
//# sourceMappingURL=sendInvocation-2EZanZZr.cjs.map
|