@glacislabs/stablegenie-zerodelta 4.21.0 → 4.22.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/dist/{chunk-3E554IZO.js → chunk-UBSZA63S.js} +474 -51
- package/dist/{chunk-KOFREX5L.js → chunk-UIIH5O6G.js} +385 -31
- package/dist/core/index.cjs +400 -30
- package/dist/core/index.d.cts +196 -3
- package/dist/core/index.d.ts +196 -3
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +886 -109
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{mount-C2GLFqgK.d.cts → mount-DC_JT0cE.d.cts} +1 -1
- package/dist/{mount-867H-JSe.d.ts → mount-GOYY_jNr.d.ts} +1 -1
- package/dist/mount.cjs +886 -109
- package/dist/mount.d.cts +2 -2
- package/dist/mount.d.ts +2 -2
- package/dist/mount.js +2 -2
- package/dist/standalone.global.js +15 -8
- package/dist/{verify-CeHRSKl2.d.cts → verify-mpglrU7n.d.cts} +11 -1
- package/dist/{verify-CeHRSKl2.d.ts → verify-mpglrU7n.d.ts} +11 -1
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
|
@@ -2352,13 +2352,22 @@ var MAX_STEPS = 8;
|
|
|
2352
2352
|
function isZdHeavy(r, steps) {
|
|
2353
2353
|
return r.protocol === "zdheavy" || steps.some((s) => Number(s.stepNumber ?? 0) >= ZDH_FIRST_STEP);
|
|
2354
2354
|
}
|
|
2355
|
+
var FILL_EVIDENCE = /* @__PURE__ */ new Set(["filled", "consumed", "step_executed", "paid_out", "delivered"]);
|
|
2356
|
+
function ownerCancelServedAsDeliveryFailure(steps) {
|
|
2357
|
+
const txHash = (s) => typeof s.txHash === "string" && /^0x[0-9a-fA-F]{64}$/.test(s.txHash);
|
|
2358
|
+
const anyTx = (s) => typeof s.txHash === "string" && s.txHash.length > 0;
|
|
2359
|
+
const cancelTx = steps.some((s) => s.stepName === "cancelled" && txHash(s));
|
|
2360
|
+
const refunded = steps.some((s) => s.stepName === "refunded" && word(s.stepStatus) === "recovered" && txHash(s));
|
|
2361
|
+
const filled = steps.some((s) => FILL_EVIDENCE.has(String(s.stepName)) && word(s.stepStatus) === "completed" && anyTx(s));
|
|
2362
|
+
return cancelTx && refunded && !filled;
|
|
2363
|
+
}
|
|
2355
2364
|
function zdHeavyDelivery(own, rawSteps) {
|
|
2356
2365
|
const named = rawSteps.filter((s) => s && typeof s === "object" && typeof s.stepName === "string");
|
|
2357
2366
|
const lite = (name) => named.some((s) => Number(s.stepNumber ?? 0) < ZDH_FIRST_STEP && s.stepName === name && s.stepStatus === "completed");
|
|
2358
2367
|
const events = named.map((s, i) => ({ s, i })).filter(({ s }) => Number(s.stepNumber ?? 0) >= ZDH_FIRST_STEP).sort((a, b) => (Date.parse(String(a.s.blockTimestamp ?? "")) || 0) - (Date.parse(String(b.s.blockTimestamp ?? "")) || 0) || a.i - b.i).map(({ s }) => s);
|
|
2359
2368
|
const has = (name) => events.some((e) => e.stepName === name);
|
|
2360
2369
|
const cancelled = has("cancelled");
|
|
2361
|
-
const status = PROGRESS.has(own) && has("paid_out") && !cancelled ? "delivered" : own;
|
|
2370
|
+
const status = own === "delivery_failed" && ownerCancelServedAsDeliveryFailure(named) ? "cancelled" : PROGRESS.has(own) && has("paid_out") && !cancelled ? "delivered" : own;
|
|
2362
2371
|
const steps = [];
|
|
2363
2372
|
const push = (name, done) => {
|
|
2364
2373
|
const last = steps[steps.length - 1];
|
|
@@ -2460,7 +2469,10 @@ function historyEntryFromOrder(raw2, tokens) {
|
|
|
2460
2469
|
const toAsset = (to?.symbol ?? (str(r.finalToTokenSymbol) || str(r.toTokenSymbol))).slice(0, 10);
|
|
2461
2470
|
const payAmount = amountOf(str(r.fromTokenRawAmount), from, r.fromTokenDecimals, str(r.fromTokenAmount));
|
|
2462
2471
|
const receiveAmount = str(r.finalToTokenRawAmount) ? amountOf(str(r.finalToTokenRawAmount), to, r.finalToTokenDecimals, str(r.finalToTokenAmount)) : amountOf(str(r.toTokenRawAmount), to, r.toTokenDecimals, str(r.toTokenAmount));
|
|
2463
|
-
const
|
|
2472
|
+
const tracked = normalizeDelivery(r);
|
|
2473
|
+
const delivery = tracked.phase;
|
|
2474
|
+
const protocol = str(r.protocol);
|
|
2475
|
+
const orderId = str(r.orderId);
|
|
2464
2476
|
const wallet = str(r.wallet);
|
|
2465
2477
|
const receiver = str(r.destinationReceiver);
|
|
2466
2478
|
const at = str(r.createdAt) || str(r.submittedAt);
|
|
@@ -2482,6 +2494,11 @@ function historyEntryFromOrder(raw2, tokens) {
|
|
|
2482
2494
|
status: "submitted",
|
|
2483
2495
|
at: Number.isNaN(Date.parse(at)) ? (/* @__PURE__ */ new Date(0)).toISOString() : new Date(at).toISOString(),
|
|
2484
2496
|
delivery: delivery === "tracking" || delivery === "unavailable" ? void 0 : delivery,
|
|
2497
|
+
...tracked.status && delivery !== "tracking" && delivery !== "unavailable" ? { deliveryStatus: tracked.status.slice(0, 32) } : {},
|
|
2498
|
+
.../^[a-z]{1,16}$/.test(protocol) ? { protocol } : {},
|
|
2499
|
+
// Only a router order id (bytes32) is carried: it is the one thing a recovery call puts in a URL.
|
|
2500
|
+
.../^0x[0-9a-fA-F]{64}$/.test(orderId) ? { orderId } : {},
|
|
2501
|
+
...r.claimable === true ? { claimable: true } : {},
|
|
2485
2502
|
legs: [
|
|
2486
2503
|
{
|
|
2487
2504
|
index: 1,
|
|
@@ -2529,7 +2546,17 @@ function mergeHistory(local, remote, limit = WALLET_HISTORY_LIMIT) {
|
|
|
2529
2546
|
if (seen.has(key2)) continue;
|
|
2530
2547
|
seen.add(key2);
|
|
2531
2548
|
const known = byHash.get(key2);
|
|
2532
|
-
out.push(
|
|
2549
|
+
out.push(
|
|
2550
|
+
known ? {
|
|
2551
|
+
...entry,
|
|
2552
|
+
delivery: known.delivery,
|
|
2553
|
+
legs: entry.legs ?? known.legs,
|
|
2554
|
+
deliveryStatus: known.deliveryStatus,
|
|
2555
|
+
protocol: known.protocol,
|
|
2556
|
+
orderId: known.orderId,
|
|
2557
|
+
claimable: known.claimable
|
|
2558
|
+
} : entry
|
|
2559
|
+
);
|
|
2533
2560
|
}
|
|
2534
2561
|
for (const [key2, entry] of byHash) if (!seen.has(key2)) out.push(entry);
|
|
2535
2562
|
return out.sort((a, b) => Date.parse(b.at) - Date.parse(a.at)).slice(0, limit);
|
|
@@ -3387,16 +3414,16 @@ function normalizeOrderRequests(requests, payer, destination, fallbackExecutionC
|
|
|
3387
3414
|
);
|
|
3388
3415
|
}
|
|
3389
3416
|
function assertQuoteMatchesSelection({ quote, order, orders, option, destinationToken, destination, payer, result, tokens = [] }) {
|
|
3390
|
-
const
|
|
3391
|
-
const sourceOrder =
|
|
3392
|
-
const finalOrder =
|
|
3417
|
+
const list2 = orders?.length ? orders : [order];
|
|
3418
|
+
const sourceOrder = list2[0];
|
|
3419
|
+
const finalOrder = list2[list2.length - 1];
|
|
3393
3420
|
const now = Math.floor(Date.now() / 1e3);
|
|
3394
3421
|
const deadline = Number(sourceOrder.deadline || 0);
|
|
3395
3422
|
const solana = isSolanaChainId(destination.chainId);
|
|
3396
3423
|
if (solana && solanaDestinationAsset(destinationToken.address)?.symbol !== symbolKey(destinationToken.symbol)) {
|
|
3397
3424
|
throw new Error("This Solana token is not supported for delivery; refusing to sign.");
|
|
3398
3425
|
}
|
|
3399
|
-
for (const current of
|
|
3426
|
+
for (const current of list2) {
|
|
3400
3427
|
if (normalizeAddress(current.owner) !== normalizeAddress(payer)) {
|
|
3401
3428
|
throw new Error("ZeroDelta quote returned an owner that does not match the connected wallet.");
|
|
3402
3429
|
}
|
|
@@ -3447,9 +3474,9 @@ function assertQuoteMatchesSelection({ quote, order, orders, option, destination
|
|
|
3447
3474
|
if (!Number.isFinite(deadline) || deadline <= now || deadline > now + maxDeadline + DEADLINE_CLOCK_SKEW_SECONDS) {
|
|
3448
3475
|
throw new Error("ZeroDelta quote deadline is invalid or too far in the future.");
|
|
3449
3476
|
}
|
|
3450
|
-
for (let index = 1; index <
|
|
3451
|
-
const previous =
|
|
3452
|
-
const current =
|
|
3477
|
+
for (let index = 1; index < list2.length; index += 1) {
|
|
3478
|
+
const previous = list2[index - 1];
|
|
3479
|
+
const current = list2[index];
|
|
3453
3480
|
if (normalizeAddress(previous.askToken) !== normalizeAddress(current.bidToken)) {
|
|
3454
3481
|
throw new Error("ZeroDelta chained quote returned disconnected order tokens.");
|
|
3455
3482
|
}
|
|
@@ -3526,10 +3553,10 @@ function keccak256Hex(bytes) {
|
|
|
3526
3553
|
return out;
|
|
3527
3554
|
}
|
|
3528
3555
|
function toChecksumAddress(address) {
|
|
3529
|
-
const
|
|
3530
|
-
const hash2 = keccak256Hex(new TextEncoder().encode(
|
|
3556
|
+
const lower4 = address.slice(2).toLowerCase();
|
|
3557
|
+
const hash2 = keccak256Hex(new TextEncoder().encode(lower4));
|
|
3531
3558
|
let out = "0x";
|
|
3532
|
-
for (let i = 0; i < 40; i++) out += Number.parseInt(hash2[i], 16) >= 8 ?
|
|
3559
|
+
for (let i = 0; i < 40; i++) out += Number.parseInt(hash2[i], 16) >= 8 ? lower4[i].toUpperCase() : lower4[i];
|
|
3533
3560
|
return out;
|
|
3534
3561
|
}
|
|
3535
3562
|
function hasValidChecksum(address) {
|
|
@@ -3547,6 +3574,7 @@ var toHex = (v, opts) => "0x" + (typeof v === "bigint" ? v.toString(16).padStart
|
|
|
3547
3574
|
var keccak256 = (h2) => "0x" + keccak256Hex(hexToBytes2(h2));
|
|
3548
3575
|
var STEP_VERSION = 5;
|
|
3549
3576
|
var MAX_STEPS2 = 8;
|
|
3577
|
+
var ORDER_HEADER_LEN = 76;
|
|
3550
3578
|
var StepKind = {
|
|
3551
3579
|
LOCAL_PAYOUT: 1,
|
|
3552
3580
|
REMOTE_PAYOUT: 2,
|
|
@@ -3687,11 +3715,11 @@ function decodeStep(step) {
|
|
|
3687
3715
|
r.end();
|
|
3688
3716
|
return result;
|
|
3689
3717
|
}
|
|
3690
|
-
function routerWord(
|
|
3691
|
-
return concat([toHex(new Uint8Array(12)), checkedHex(
|
|
3718
|
+
function routerWord(addr2) {
|
|
3719
|
+
return concat([toHex(new Uint8Array(12)), checkedHex(addr2, 20)]);
|
|
3692
3720
|
}
|
|
3693
|
-
function ownerWord(
|
|
3694
|
-
return routerWord(
|
|
3721
|
+
function ownerWord(addr2) {
|
|
3722
|
+
return routerWord(addr2);
|
|
3695
3723
|
}
|
|
3696
3724
|
function encodeOrderHeader(serial, router, ownerType, owner) {
|
|
3697
3725
|
if (!Number.isInteger(ownerType) || ownerType < 0 || ownerType > 255) throw new ZdHeavyCodecError("Invalid ownerType");
|
|
@@ -4958,7 +4986,7 @@ var CHANNEL_HEADER = "x-zd-channel";
|
|
|
4958
4986
|
var CHANNEL_VERSION_HEADER = "x-zd-channel-version";
|
|
4959
4987
|
var CHANNEL_ORIGIN_HEADER = "x-zd-channel-origin";
|
|
4960
4988
|
var WIDGET_CHANNEL = "widget";
|
|
4961
|
-
var WIDGET_VERSION = "4.
|
|
4989
|
+
var WIDGET_VERSION = "4.22.0" ;
|
|
4962
4990
|
var MAX_CHANNEL_VERSION_LEN = 32;
|
|
4963
4991
|
function sanitizeVersion(raw2) {
|
|
4964
4992
|
const v = String(raw2).trim();
|
|
@@ -5315,24 +5343,24 @@ function createApiClient(cfg) {
|
|
|
5315
5343
|
throw lastError;
|
|
5316
5344
|
}
|
|
5317
5345
|
async function screenWallet(address, chainId) {
|
|
5318
|
-
const
|
|
5319
|
-
if (!
|
|
5320
|
-
const solana = isSolanaChainId(chainId) || isSolanaAddress(
|
|
5321
|
-
if (solana && !isSolanaAddress(
|
|
5322
|
-
const key2 = solana ? "solana|" +
|
|
5346
|
+
const addr2 = String(address || "").trim();
|
|
5347
|
+
if (!addr2) throw apiError("An address is required to screen a wallet.", { code: "bad_request" });
|
|
5348
|
+
const solana = isSolanaChainId(chainId) || isSolanaAddress(addr2);
|
|
5349
|
+
if (solana && !isSolanaAddress(addr2)) throw apiError("Not a valid Solana address.", { code: "bad_request" });
|
|
5350
|
+
const key2 = solana ? "solana|" + addr2 : (/^0x[0-9a-fA-F]+$/.test(addr2) ? addr2.toLowerCase() : addr2) + "|" + (chainId ?? "");
|
|
5323
5351
|
const hit = screenCache.get(key2);
|
|
5324
5352
|
if (hit && Date.now() - hit.at < SCREEN_CACHE_TTL_MS) return hit.value;
|
|
5325
5353
|
const inflight = screenInflight.get(key2);
|
|
5326
5354
|
if (inflight) return inflight;
|
|
5327
5355
|
const request = apiRequest("/screen/wallet", {
|
|
5328
5356
|
method: "POST",
|
|
5329
|
-
body: JSON.stringify(solana ? { address:
|
|
5357
|
+
body: JSON.stringify(solana ? { address: addr2, network: "solana" } : chainId == null ? { address: addr2 } : { address: addr2, chainId }),
|
|
5330
5358
|
timeoutMs: 12e3
|
|
5331
5359
|
}).then((screen) => {
|
|
5332
5360
|
if (!screen || typeof screen !== "object" || typeof screen.blocked !== "boolean") {
|
|
5333
5361
|
throw apiError("Compliance screening returned an unusable result.", { code: "bad_response" });
|
|
5334
5362
|
}
|
|
5335
|
-
const value = { ...screen, address: screen.address ||
|
|
5363
|
+
const value = { ...screen, address: screen.address || addr2 };
|
|
5336
5364
|
screenCache.set(key2, { at: Date.now(), value });
|
|
5337
5365
|
return value;
|
|
5338
5366
|
}).finally(() => {
|
|
@@ -5436,12 +5464,12 @@ async function fetchPaymentPlan(api, request, payer, wallet = {}, readBalances)
|
|
|
5436
5464
|
const parties = [];
|
|
5437
5465
|
const seenParty = /* @__PURE__ */ new Set();
|
|
5438
5466
|
for (const raw2 of [payer, destination.address]) {
|
|
5439
|
-
const
|
|
5440
|
-
if (!
|
|
5441
|
-
const key2 = /^0x[0-9a-fA-F]+$/.test(
|
|
5467
|
+
const addr2 = String(raw2 || "").trim();
|
|
5468
|
+
if (!addr2) continue;
|
|
5469
|
+
const key2 = /^0x[0-9a-fA-F]+$/.test(addr2) ? addr2.toLowerCase() : addr2;
|
|
5442
5470
|
if (seenParty.has(key2)) continue;
|
|
5443
5471
|
seenParty.add(key2);
|
|
5444
|
-
parties.push(
|
|
5472
|
+
parties.push(addr2);
|
|
5445
5473
|
}
|
|
5446
5474
|
try {
|
|
5447
5475
|
const screens = await Promise.all(parties.map((address) => api.screenWallet(address, destination.chainId)));
|
|
@@ -5656,6 +5684,322 @@ async function buildSwapPlan(api, swap, payer, wallet = {}) {
|
|
|
5656
5684
|
};
|
|
5657
5685
|
}
|
|
5658
5686
|
|
|
5687
|
+
// src/core/zdheavy-cancel.ts
|
|
5688
|
+
var lower3 = (s) => (typeof s === "string" ? s : "").toLowerCase();
|
|
5689
|
+
var ORDER_ID = /^0x[0-9a-fA-F]{64}$/;
|
|
5690
|
+
var EVM_ADDRESS = /^0x[0-9a-fA-F]{40}$/;
|
|
5691
|
+
function isZdHeavyOrderId(v) {
|
|
5692
|
+
return typeof v === "string" && ORDER_ID.test(v);
|
|
5693
|
+
}
|
|
5694
|
+
function zdHeavyRecovery(plan, wallet) {
|
|
5695
|
+
const claims = wallet ? plan.places.flatMap(
|
|
5696
|
+
(p) => p.kind === "router" && p.chainId !== void 0 && p.contract ? p.claimable.filter((c) => lower3(c.payee) === lower3(wallet)).map((c) => ({ chainId: p.chainId, token: c.token, amount: c.amount })) : []
|
|
5697
|
+
) : [];
|
|
5698
|
+
if (claims.length) return { kind: "claim", claims };
|
|
5699
|
+
if (plan.finished) return { kind: "delivered" };
|
|
5700
|
+
if (plan.state === "refund_complete" && plan.complete) {
|
|
5701
|
+
return { kind: "refunded", refunds: plan.places.flatMap((p) => p.refunds.map((r) => ({ ...r, chainId: p.chainId }))) };
|
|
5702
|
+
}
|
|
5703
|
+
if (plan.ownerType !== "evm") return { kind: "not-owner" };
|
|
5704
|
+
const holding = plan.places.filter(
|
|
5705
|
+
(p) => p.kind === "router" && p.chainId !== void 0 && !!p.contract && p.canCancelInPerson && !p.complete && p.lots.length > 0
|
|
5706
|
+
);
|
|
5707
|
+
if (holding.length) return { kind: "cancel", chains: holding.map((p) => p.chainId), requested: plan.state === "cancel_requested" };
|
|
5708
|
+
if (plan.state === "open" && !plan.complete) return { kind: "cancel", chains: [plan.originChainId], requested: false };
|
|
5709
|
+
return { kind: "waiting" };
|
|
5710
|
+
}
|
|
5711
|
+
var MAX_PLACES = 32;
|
|
5712
|
+
var MAX_ROWS = 64;
|
|
5713
|
+
var DIGITS = /^\d{1,78}$/;
|
|
5714
|
+
var LOT_KEY = /^(?:\d{1,78}|0x[0-9a-fA-F]{1,64})$/;
|
|
5715
|
+
var TX_HASH = /^0x[0-9a-fA-F]{64}$/;
|
|
5716
|
+
var posInt = (v) => typeof v === "number" && Number.isSafeInteger(v) && v > 0 ? v : void 0;
|
|
5717
|
+
var nonNegInt = (v) => typeof v === "number" && Number.isSafeInteger(v) && v >= 0;
|
|
5718
|
+
var addr = (v) => typeof v === "string" && EVM_ADDRESS.test(v);
|
|
5719
|
+
var list = (v) => v === void 0 || v === null ? [] : Array.isArray(v) && v.length <= MAX_ROWS ? v : null;
|
|
5720
|
+
var obj = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : null;
|
|
5721
|
+
function normalizeCancellationPlan(raw2, orderId) {
|
|
5722
|
+
const r = obj(raw2);
|
|
5723
|
+
if (!r || !isZdHeavyOrderId(orderId) || lower3(r.orderId) !== lower3(orderId)) return null;
|
|
5724
|
+
const ownerType = r.ownerType === "evm" || r.ownerType === "solana" ? r.ownerType : null;
|
|
5725
|
+
const state = r.state === "open" || r.state === "cancel_requested" || r.state === "refund_complete" ? r.state : null;
|
|
5726
|
+
const originChainId = posInt(r.originChainId);
|
|
5727
|
+
if (!ownerType || !state || originChainId === void 0 || typeof r.complete !== "boolean" || typeof r.owner !== "string" || r.owner.length > 64) return null;
|
|
5728
|
+
if (r.finished !== void 0 && typeof r.finished !== "boolean") return null;
|
|
5729
|
+
if (!Array.isArray(r.places) || r.places.length > MAX_PLACES) return null;
|
|
5730
|
+
const places = [];
|
|
5731
|
+
for (const rawPlace of r.places) {
|
|
5732
|
+
const p = obj(rawPlace);
|
|
5733
|
+
if (!p || p.kind !== "router" && p.kind !== "hub" || typeof p.canCancelInPerson !== "boolean" || typeof p.complete !== "boolean") return null;
|
|
5734
|
+
const chainId = p.chainId === void 0 ? void 0 : posInt(p.chainId);
|
|
5735
|
+
if (p.chainId !== void 0 && chainId === void 0) return null;
|
|
5736
|
+
const contract = typeof p.contract === "string" ? p.contract : "";
|
|
5737
|
+
if (contract && !addr(contract)) return null;
|
|
5738
|
+
const lots = list(p.lots);
|
|
5739
|
+
const refunds = list(p.refunds);
|
|
5740
|
+
const claimable = list(p.claimable);
|
|
5741
|
+
if (!lots || !refunds || !claimable) return null;
|
|
5742
|
+
const place = {
|
|
5743
|
+
kind: p.kind,
|
|
5744
|
+
chainId,
|
|
5745
|
+
contract,
|
|
5746
|
+
canCancelInPerson: p.canCancelInPerson,
|
|
5747
|
+
complete: p.complete,
|
|
5748
|
+
lots: [],
|
|
5749
|
+
refunds: [],
|
|
5750
|
+
claimable: []
|
|
5751
|
+
};
|
|
5752
|
+
for (const rawLot of lots) {
|
|
5753
|
+
const l = obj(rawLot);
|
|
5754
|
+
if (!l || !nonNegInt(l.step) || !addr(l.token) || typeof l.amount !== "string" || !DIGITS.test(l.amount) || typeof l.key !== "string" || !LOT_KEY.test(l.key))
|
|
5755
|
+
return null;
|
|
5756
|
+
place.lots.push({ step: l.step, token: l.token, amount: l.amount, key: l.key });
|
|
5757
|
+
}
|
|
5758
|
+
for (const rawRefund of refunds) {
|
|
5759
|
+
const f = obj(rawRefund);
|
|
5760
|
+
if (!f || typeof f.txHash !== "string" || !TX_HASH.test(f.txHash) || !nonNegInt(f.step) || !addr(f.token) || typeof f.amount !== "string" || !DIGITS.test(f.amount) || !addr(f.to))
|
|
5761
|
+
return null;
|
|
5762
|
+
place.refunds.push({ txHash: f.txHash, step: f.step, token: f.token, amount: f.amount, to: f.to });
|
|
5763
|
+
}
|
|
5764
|
+
for (const rawClaim of claimable) {
|
|
5765
|
+
const c = obj(rawClaim);
|
|
5766
|
+
if (!c || !addr(c.payee) || !addr(c.token) || typeof c.amount !== "string" || !DIGITS.test(c.amount)) return null;
|
|
5767
|
+
place.claimable.push({ payee: c.payee, token: c.token, amount: c.amount });
|
|
5768
|
+
}
|
|
5769
|
+
places.push(place);
|
|
5770
|
+
}
|
|
5771
|
+
return {
|
|
5772
|
+
orderId: r.orderId,
|
|
5773
|
+
ownerType,
|
|
5774
|
+
owner: r.owner,
|
|
5775
|
+
originChainId,
|
|
5776
|
+
state,
|
|
5777
|
+
complete: r.complete,
|
|
5778
|
+
...r.finished !== void 0 ? { finished: r.finished } : {},
|
|
5779
|
+
places
|
|
5780
|
+
};
|
|
5781
|
+
}
|
|
5782
|
+
function zdHeavyOrderPath(orderId, tail) {
|
|
5783
|
+
if (!isZdHeavyOrderId(orderId)) throw new ZdHeavyCodecError("Not a ZD Heavy order id.");
|
|
5784
|
+
return `/orders/${orderId.toLowerCase()}/${tail}`;
|
|
5785
|
+
}
|
|
5786
|
+
async function fetchZdHeavyCancellation(api, orderId) {
|
|
5787
|
+
if (!isZdHeavyOrderId(orderId)) return null;
|
|
5788
|
+
try {
|
|
5789
|
+
return normalizeCancellationPlan(await api.apiRequest(zdHeavyOrderPath(orderId, "cancellation"), { timeoutMs: 1e4 }), orderId);
|
|
5790
|
+
} catch {
|
|
5791
|
+
return null;
|
|
5792
|
+
}
|
|
5793
|
+
}
|
|
5794
|
+
function unsigned(raw2) {
|
|
5795
|
+
const r = obj(raw2);
|
|
5796
|
+
const s = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : "";
|
|
5797
|
+
if (!r) return { purpose: "", chainId: "", from: "", to: "", data: "" };
|
|
5798
|
+
return {
|
|
5799
|
+
purpose: s(r.purpose),
|
|
5800
|
+
chainId: s(r.chainId),
|
|
5801
|
+
from: s(r.from),
|
|
5802
|
+
to: s(r.to),
|
|
5803
|
+
data: s(r.data),
|
|
5804
|
+
...r.value !== void 0 ? { value: s(r.value) } : {}
|
|
5805
|
+
};
|
|
5806
|
+
}
|
|
5807
|
+
async function buildZdHeavyCancelTx(api, orderId, chainId) {
|
|
5808
|
+
return unsigned(
|
|
5809
|
+
await api.apiRequest(zdHeavyOrderPath(orderId, "cancel-tx"), {
|
|
5810
|
+
method: "POST",
|
|
5811
|
+
body: JSON.stringify(chainId === void 0 ? {} : { chainId }),
|
|
5812
|
+
timeoutMs: 15e3
|
|
5813
|
+
})
|
|
5814
|
+
);
|
|
5815
|
+
}
|
|
5816
|
+
async function buildZdHeavyClaimTx(api, orderId, chainId, token) {
|
|
5817
|
+
return unsigned(
|
|
5818
|
+
await api.apiRequest(zdHeavyOrderPath(orderId, "claim-tx"), {
|
|
5819
|
+
method: "POST",
|
|
5820
|
+
body: JSON.stringify({ chainId, token }),
|
|
5821
|
+
timeoutMs: 15e3
|
|
5822
|
+
})
|
|
5823
|
+
);
|
|
5824
|
+
}
|
|
5825
|
+
var ZDHEAVY_CANCEL_SELECTOR = "0xf26bce2c";
|
|
5826
|
+
var ZDHEAVY_CLAIM_SELECTOR = "0x1e83409a";
|
|
5827
|
+
var ZDHEAVY_CLAIM_TO_SELECTOR = "0x21c0b342";
|
|
5828
|
+
var MAX_CANCEL_KEYS = 32;
|
|
5829
|
+
function reader(data, selector) {
|
|
5830
|
+
if (typeof data !== "string" || !/^0x(?:[0-9a-fA-F]{2})*$/.test(data) || data.slice(0, 10).toLowerCase() !== selector) {
|
|
5831
|
+
throw new ZdHeavyCodecError("Unexpected call");
|
|
5832
|
+
}
|
|
5833
|
+
const body = data.slice(10).toLowerCase();
|
|
5834
|
+
const size = body.length / 2;
|
|
5835
|
+
const fail = () => {
|
|
5836
|
+
throw new ZdHeavyCodecError("Invalid calldata");
|
|
5837
|
+
};
|
|
5838
|
+
const word2 = (at, bits = 256) => {
|
|
5839
|
+
if (!Number.isSafeInteger(at) || at < 0 || at + 32 > size) return fail();
|
|
5840
|
+
const n = BigInt(`0x${body.slice(at * 2, (at + 32) * 2)}`);
|
|
5841
|
+
if (bits < 256 && n >= 1n << BigInt(bits)) return fail();
|
|
5842
|
+
return n;
|
|
5843
|
+
};
|
|
5844
|
+
const fixed = (at) => {
|
|
5845
|
+
word2(at);
|
|
5846
|
+
return `0x${body.slice(at * 2, (at + 32) * 2)}`;
|
|
5847
|
+
};
|
|
5848
|
+
const address = (at) => `0x${word2(at, 160).toString(16).padStart(40, "0")}`;
|
|
5849
|
+
const offset = (at, expected) => {
|
|
5850
|
+
if (word2(at) !== BigInt(expected)) fail();
|
|
5851
|
+
};
|
|
5852
|
+
const count = (at, each) => {
|
|
5853
|
+
const n = word2(at);
|
|
5854
|
+
if (n > BigInt(Math.floor((size - at - 32) / each))) return fail();
|
|
5855
|
+
return Number(n);
|
|
5856
|
+
};
|
|
5857
|
+
const bytes = (at) => {
|
|
5858
|
+
const n = word2(at);
|
|
5859
|
+
if (n > BigInt(size - at - 32)) return fail();
|
|
5860
|
+
const length = Number(n);
|
|
5861
|
+
const end = at + 32 + Math.ceil(length / 32) * 32;
|
|
5862
|
+
if (end > size || /[^0]/.test(body.slice((at + 32 + length) * 2, end * 2))) return fail();
|
|
5863
|
+
return { value: `0x${body.slice((at + 32) * 2, (at + 32 + length) * 2)}`, end };
|
|
5864
|
+
};
|
|
5865
|
+
return { size, fail, word: word2, fixed, address, offset, count, bytes };
|
|
5866
|
+
}
|
|
5867
|
+
function decodeZdHeavyCancel(data) {
|
|
5868
|
+
const r = reader(data, ZDHEAVY_CANCEL_SELECTOR);
|
|
5869
|
+
const orderId = r.fixed(0);
|
|
5870
|
+
const P3 = 96;
|
|
5871
|
+
r.offset(32, P3);
|
|
5872
|
+
const expiryDate = r.word(P3, 64);
|
|
5873
|
+
r.offset(P3 + 32, 96);
|
|
5874
|
+
const header = r.bytes(P3 + 96);
|
|
5875
|
+
r.offset(P3 + 64, header.end - P3);
|
|
5876
|
+
const hashesAt = header.end;
|
|
5877
|
+
const n = r.count(hashesAt, 32);
|
|
5878
|
+
const stepHashes = [];
|
|
5879
|
+
for (let i = 0; i < n; i++) stepHashes.push(r.fixed(hashesAt + 32 + i * 32));
|
|
5880
|
+
const keysAt = hashesAt + 32 + n * 32;
|
|
5881
|
+
r.offset(64, keysAt);
|
|
5882
|
+
const k = r.count(keysAt, 32);
|
|
5883
|
+
const keys = [];
|
|
5884
|
+
for (let i = 0; i < k; i++) keys.push(r.word(keysAt + 32 + i * 32));
|
|
5885
|
+
if (keysAt + 32 + k * 32 !== r.size) r.fail();
|
|
5886
|
+
return { orderId, proof: { expiryDate, orderHeader: header.value, stepHashes }, keys };
|
|
5887
|
+
}
|
|
5888
|
+
function decodeZdHeavyClaim(data) {
|
|
5889
|
+
const selector = typeof data === "string" ? data.slice(0, 10).toLowerCase() : "";
|
|
5890
|
+
if (selector === ZDHEAVY_CLAIM_SELECTOR) {
|
|
5891
|
+
const r2 = reader(data, ZDHEAVY_CLAIM_SELECTOR);
|
|
5892
|
+
if (r2.size !== 32) r2.fail();
|
|
5893
|
+
return { token: r2.address(0) };
|
|
5894
|
+
}
|
|
5895
|
+
const r = reader(data, ZDHEAVY_CLAIM_TO_SELECTOR);
|
|
5896
|
+
if (r.size !== 64) r.fail();
|
|
5897
|
+
return { token: r.address(0), to: r.address(32) };
|
|
5898
|
+
}
|
|
5899
|
+
var hexBytes2 = (h2) => Uint8Array.from(h2.slice(2).match(/../g) ?? [], (b) => Number.parseInt(b, 16));
|
|
5900
|
+
var keccak = (h2) => `0x${keccak256Hex(hexBytes2(h2))}`;
|
|
5901
|
+
function orderIdFromProof(expiryDate, header, stepHashes) {
|
|
5902
|
+
const tag = Array.from(new TextEncoder().encode("ZD/ORDER"), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
5903
|
+
return keccak(`0x${tag}${expiryDate.toString(16).padStart(16, "0")}${keccak(header).slice(2)}${stepHashes.map((h2) => h2.slice(2)).join("")}`);
|
|
5904
|
+
}
|
|
5905
|
+
var TX = /^0x[0-9a-fA-F]{64}$/;
|
|
5906
|
+
var succeeded = (receipt) => {
|
|
5907
|
+
const status = obj(receipt)?.status;
|
|
5908
|
+
return typeof status === "string" && /^0x0*1$/.test(status);
|
|
5909
|
+
};
|
|
5910
|
+
async function verifyZdHeavySourceOrder(rpc, chainId, hash2, orderId) {
|
|
5911
|
+
const no = (reason) => ({ ok: false, reason });
|
|
5912
|
+
if (!SUPPORTED_CHAIN_IDS.has(chainId) || typeof hash2 !== "string" || !TX.test(hash2) || !isZdHeavyOrderId(orderId)) return no("not checkable");
|
|
5913
|
+
try {
|
|
5914
|
+
const [tx, receipt] = await Promise.all([rpc(chainId, "eth_getTransactionByHash", [hash2]), rpc(chainId, "eth_getTransactionReceipt", [hash2])]);
|
|
5915
|
+
const t = obj(tx);
|
|
5916
|
+
if (!t || lower3(t.hash) !== lower3(hash2)) return no("source transaction not found");
|
|
5917
|
+
if (!succeeded(receipt) || lower3(obj(receipt)?.transactionHash) !== lower3(hash2)) return no("source transaction not confirmed");
|
|
5918
|
+
const router = checkZdHeavyRouter(chainId, typeof t.to === "string" ? t.to : "");
|
|
5919
|
+
if (!router.ok) return no("source transaction is not to a pinned router");
|
|
5920
|
+
const input = typeof t.input === "string" ? t.input : typeof t.data === "string" ? t.data : "";
|
|
5921
|
+
const { submission } = decodeZdHeavySubmit(input);
|
|
5922
|
+
const id = orderIdOf(submission.expiryDate, encodeOrderHeader(submission.serial, router.address, submission.ownerType, submission.owner), submission.steps);
|
|
5923
|
+
return lower3(id) === lower3(orderId) ? { ok: true } : no("source transaction submitted another order");
|
|
5924
|
+
} catch {
|
|
5925
|
+
return no("source transaction could not be read");
|
|
5926
|
+
}
|
|
5927
|
+
}
|
|
5928
|
+
var refuse2 = (what) => ({ ok: false, reason: `The ${what} does not match this order. Refusing to sign.` });
|
|
5929
|
+
function commonChecks(tx, owner, purpose, chainId) {
|
|
5930
|
+
if (!tx || tx.purpose !== purpose) return refuse2("transaction kind");
|
|
5931
|
+
const chain2 = typeof tx.chainId === "string" && /^\d{1,12}$/.test(tx.chainId) ? Number(tx.chainId) : NaN;
|
|
5932
|
+
if (!Number.isSafeInteger(chain2) || chain2 <= 0) return refuse2("chain");
|
|
5933
|
+
if (chainId !== void 0 && chain2 !== chainId) return refuse2("chain");
|
|
5934
|
+
const router = checkZdHeavyRouter(chain2, tx.to);
|
|
5935
|
+
if (!router.ok) return { ok: false, reason: router.reason };
|
|
5936
|
+
if (!addr(owner) || !addr(tx.from) || lower3(tx.from) !== lower3(owner)) return refuse2("sender");
|
|
5937
|
+
try {
|
|
5938
|
+
if (tx.value !== void 0 && tx.value !== "" && BigInt(tx.value) !== 0n) return refuse2("value");
|
|
5939
|
+
} catch {
|
|
5940
|
+
return refuse2("value");
|
|
5941
|
+
}
|
|
5942
|
+
return { ok: true, chainId: chain2, router: router.address };
|
|
5943
|
+
}
|
|
5944
|
+
var accepted = (chainId, owner, router, data) => ({
|
|
5945
|
+
ok: true,
|
|
5946
|
+
chainId,
|
|
5947
|
+
tx: { from: owner, to: router, data: data.toLowerCase(), value: "0x0" }
|
|
5948
|
+
});
|
|
5949
|
+
function checkZdHeavyCancelTx(tx, e) {
|
|
5950
|
+
const base = commonChecks(tx, e.owner, "cancel", e.chainId);
|
|
5951
|
+
if (!base.ok) return base;
|
|
5952
|
+
let decoded;
|
|
5953
|
+
try {
|
|
5954
|
+
decoded = decodeZdHeavyCancel(tx.data);
|
|
5955
|
+
} catch {
|
|
5956
|
+
return refuse2("call");
|
|
5957
|
+
}
|
|
5958
|
+
const { orderId, proof, keys } = decoded;
|
|
5959
|
+
if (!isZdHeavyOrderId(e.orderId) || lower3(orderId) !== lower3(e.orderId)) return refuse2("order id");
|
|
5960
|
+
if (keys.length > MAX_CANCEL_KEYS) return refuse2("lot keys");
|
|
5961
|
+
const listed = e.lotKeys ? new Set(
|
|
5962
|
+
e.lotKeys.map((k) => {
|
|
5963
|
+
try {
|
|
5964
|
+
return BigInt(k).toString();
|
|
5965
|
+
} catch {
|
|
5966
|
+
return "";
|
|
5967
|
+
}
|
|
5968
|
+
})
|
|
5969
|
+
) : void 0;
|
|
5970
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5971
|
+
for (const k of keys) {
|
|
5972
|
+
if (listed && !listed.has(k.toString())) return refuse2("lot keys");
|
|
5973
|
+
const step = k >> 160n;
|
|
5974
|
+
const tokenBits = k & (1n << 160n) - 1n;
|
|
5975
|
+
if (step >= BigInt(proof.stepHashes.length) || tokenBits === 0n || seen.has(k.toString())) return refuse2("lot keys");
|
|
5976
|
+
seen.add(k.toString());
|
|
5977
|
+
}
|
|
5978
|
+
if (proof.stepHashes.length < 1 || proof.stepHashes.length > 8) return refuse2("order proof");
|
|
5979
|
+
if (lower3(orderIdFromProof(proof.expiryDate, proof.orderHeader, proof.stepHashes)) !== lower3(orderId)) return refuse2("order proof");
|
|
5980
|
+
const h2 = proof.orderHeader;
|
|
5981
|
+
if (h2.length !== 2 + ORDER_HEADER_LEN * 2) return refuse2("order proof");
|
|
5982
|
+
const routerWordHex = `0x${h2.slice(2 + 11 * 2, 2 + 43 * 2)}`;
|
|
5983
|
+
const ownerType = Number.parseInt(h2.slice(2 + 43 * 2, 2 + 44 * 2), 16);
|
|
5984
|
+
const ownerWordHex = `0x${h2.slice(2 + 44 * 2)}`;
|
|
5985
|
+
if (lower3(routerWordHex) !== lower3(ownerWord(base.router))) return refuse2("router");
|
|
5986
|
+
if (ownerType !== 1 || lower3(ownerWordHex) !== lower3(ownerWord(e.owner))) return refuse2("owner");
|
|
5987
|
+
return accepted(base.chainId, e.owner, base.router, tx.data);
|
|
5988
|
+
}
|
|
5989
|
+
function checkZdHeavyClaimTx(tx, e) {
|
|
5990
|
+
const base = commonChecks(tx, e.owner, "claim", e.chainId);
|
|
5991
|
+
if (!base.ok) return base;
|
|
5992
|
+
let decoded;
|
|
5993
|
+
try {
|
|
5994
|
+
decoded = decodeZdHeavyClaim(tx.data);
|
|
5995
|
+
} catch {
|
|
5996
|
+
return refuse2("call");
|
|
5997
|
+
}
|
|
5998
|
+
if (!addr(e.token) || lower3(decoded.token) !== lower3(e.token)) return refuse2("token");
|
|
5999
|
+
if (decoded.to !== void 0 && lower3(decoded.to) !== lower3(e.owner)) return refuse2("recipient");
|
|
6000
|
+
return accepted(base.chainId, e.owner, base.router, tx.data);
|
|
6001
|
+
}
|
|
6002
|
+
|
|
5659
6003
|
// src/core/intent-schema.ts
|
|
5660
6004
|
var STABLEGENIE_INTENT_VERSION = 1;
|
|
5661
6005
|
var STABLEGENIE_INTENT_TTL_MS = 5 * 60 * 1e3;
|
|
@@ -5929,7 +6273,13 @@ function createVerifier(api, fetchImpl, rpcOverrides = {}) {
|
|
|
5929
6273
|
return void 0;
|
|
5930
6274
|
}
|
|
5931
6275
|
}
|
|
5932
|
-
|
|
6276
|
+
async function bundledRpc(chainId, method, params) {
|
|
6277
|
+
const override = rpcOverrides[Number(chainId)];
|
|
6278
|
+
const rpc = override && /^https?:\/\//i.test(override) ? override : BUNDLED_RPC[Number(chainId)];
|
|
6279
|
+
if (!rpc) throw new Error("No bundled RPC for this chain");
|
|
6280
|
+
return rpcCall(rpc, method, params);
|
|
6281
|
+
}
|
|
6282
|
+
return { payerNonceBaseline, verifySubmittedTx, readBalances, readNativeBalance, readZdHeavySubmitFee, bundledRpc };
|
|
5933
6283
|
}
|
|
5934
6284
|
|
|
5935
6285
|
// src/core/config.ts
|
|
@@ -6089,6 +6439,10 @@ function createEngine(config = {}) {
|
|
|
6089
6439
|
executeSolanaPlanStaged: (input) => executeSolanaPlanStaged({ ...input, rpc: input.rpc ?? solanaRpc }),
|
|
6090
6440
|
previewSolanaSource: (input) => previewSolanaSource(api, input),
|
|
6091
6441
|
trackDelivery: (hash2) => fetchDelivery(api, hash2),
|
|
6442
|
+
fetchZdHeavyCancellation: (orderId) => fetchZdHeavyCancellation(api, orderId),
|
|
6443
|
+
buildZdHeavyCancelTx: (orderId, chainId) => buildZdHeavyCancelTx(api, orderId, chainId),
|
|
6444
|
+
buildZdHeavyClaimTx: (orderId, chainId, tokenAddress) => buildZdHeavyClaimTx(api, orderId, chainId, tokenAddress),
|
|
6445
|
+
verifyZdHeavySourceOrder: (chainId, hash2, orderId) => verifyZdHeavySourceOrder(verifier.bundledRpc, chainId, hash2, orderId),
|
|
6092
6446
|
fetchWalletHistory: (wallets) => fetchWalletHistory(api, wallets),
|
|
6093
6447
|
readSolanaBalance: (owner, mint) => readSolanaBalance(solanaRpc, owner, mint),
|
|
6094
6448
|
simulateSolanaCost: (plan) => simulateSolanaCost(solanaRpc, plan),
|
|
@@ -6136,6 +6490,7 @@ exports.ERC20_TRANSFER_SELECTOR = ERC20_TRANSFER_SELECTOR;
|
|
|
6136
6490
|
exports.EXECUTABLE_STABLE_ASSETS = EXECUTABLE_STABLE_ASSETS;
|
|
6137
6491
|
exports.FLOOR_CATEGORIES = FLOOR_CATEGORIES;
|
|
6138
6492
|
exports.LZ_FEE_BUFFER_BPS = LZ_FEE_BUFFER_BPS;
|
|
6493
|
+
exports.MAX_CANCEL_KEYS = MAX_CANCEL_KEYS;
|
|
6139
6494
|
exports.MAX_LZ_MSG_VALUE_WEI = MAX_LZ_MSG_VALUE_WEI;
|
|
6140
6495
|
exports.MAX_LZ_MSG_VALUE_WEI_BY_CHAIN = MAX_LZ_MSG_VALUE_WEI_BY_CHAIN;
|
|
6141
6496
|
exports.MAX_QUOTE_CANDIDATES = MAX_QUOTE_CANDIDATES;
|
|
@@ -6171,6 +6526,9 @@ exports.WAIT_MIN_SEC = WAIT_MIN_SEC;
|
|
|
6171
6526
|
exports.WAIT_POSITIONS = WAIT_POSITIONS;
|
|
6172
6527
|
exports.WAIT_STEP_SEC = WAIT_STEP_SEC;
|
|
6173
6528
|
exports.WALLET_HISTORY_LIMIT = WALLET_HISTORY_LIMIT;
|
|
6529
|
+
exports.ZDHEAVY_CANCEL_SELECTOR = ZDHEAVY_CANCEL_SELECTOR;
|
|
6530
|
+
exports.ZDHEAVY_CLAIM_SELECTOR = ZDHEAVY_CLAIM_SELECTOR;
|
|
6531
|
+
exports.ZDHEAVY_CLAIM_TO_SELECTOR = ZDHEAVY_CLAIM_TO_SELECTOR;
|
|
6174
6532
|
exports.ZD_HEAVY_KEY_PREFIX = ZD_HEAVY_KEY_PREFIX;
|
|
6175
6533
|
exports.ZERO_ADDRESS = ZERO_ADDRESS;
|
|
6176
6534
|
exports.addressWord = addressWord;
|
|
@@ -6202,6 +6560,8 @@ exports.buildPayOptions = buildPayOptions;
|
|
|
6202
6560
|
exports.buildRoute = buildRoute;
|
|
6203
6561
|
exports.buildSolanaSourcePlan = buildSolanaSourcePlan;
|
|
6204
6562
|
exports.buildSwapPlan = buildSwapPlan;
|
|
6563
|
+
exports.buildZdHeavyCancelTx = buildZdHeavyCancelTx;
|
|
6564
|
+
exports.buildZdHeavyClaimTx = buildZdHeavyClaimTx;
|
|
6205
6565
|
exports.bytes32Word = bytes32Word;
|
|
6206
6566
|
exports.bytesEqual = bytesEqual;
|
|
6207
6567
|
exports.bytesPayload = bytesPayload;
|
|
@@ -6218,6 +6578,8 @@ exports.checkSolanaPlan = checkSolanaPlan;
|
|
|
6218
6578
|
exports.checkSolanaProgram = checkSolanaProgram;
|
|
6219
6579
|
exports.checkSolanaReceiver = checkSolanaReceiver;
|
|
6220
6580
|
exports.checkSolanaRouteBuffer = checkSolanaRouteBuffer;
|
|
6581
|
+
exports.checkZdHeavyCancelTx = checkZdHeavyCancelTx;
|
|
6582
|
+
exports.checkZdHeavyClaimTx = checkZdHeavyClaimTx;
|
|
6221
6583
|
exports.clampWait = clampWait;
|
|
6222
6584
|
exports.classifyQuoteError = classifyQuoteError;
|
|
6223
6585
|
exports.compareAmount = compareAmount;
|
|
@@ -6243,6 +6605,8 @@ exports.createVerifier = createVerifier;
|
|
|
6243
6605
|
exports.decodeSolanaSubmitOrder = decodeSolanaSubmitOrder;
|
|
6244
6606
|
exports.decodeSubmitOrder = decodeSolanaSubmitOrder;
|
|
6245
6607
|
exports.decodeSubmitOrderCalldata = decodeSubmitOrderCalldata;
|
|
6608
|
+
exports.decodeZdHeavyCancel = decodeZdHeavyCancel;
|
|
6609
|
+
exports.decodeZdHeavyClaim = decodeZdHeavyClaim;
|
|
6246
6610
|
exports.deriveSolanaEvent = deriveSolanaEvent;
|
|
6247
6611
|
exports.destinationAvailability = destinationAvailability;
|
|
6248
6612
|
exports.destinationKeys = destinationKeys;
|
|
@@ -6266,6 +6630,7 @@ exports.fastestOption = fastestOption;
|
|
|
6266
6630
|
exports.fetchDelivery = fetchDelivery;
|
|
6267
6631
|
exports.fetchPaymentPlan = fetchPaymentPlan;
|
|
6268
6632
|
exports.fetchWalletHistory = fetchWalletHistory;
|
|
6633
|
+
exports.fetchZdHeavyCancellation = fetchZdHeavyCancellation;
|
|
6269
6634
|
exports.finalOf = finalOf;
|
|
6270
6635
|
exports.findProgramAddress = findProgramAddress;
|
|
6271
6636
|
exports.findToken = findToken;
|
|
@@ -6298,6 +6663,7 @@ exports.isSolanaAddress = isSolanaAddress;
|
|
|
6298
6663
|
exports.isSolanaChainId = isSolanaChainId;
|
|
6299
6664
|
exports.isSourceToken = isSourceToken;
|
|
6300
6665
|
exports.isSubmitOrder = isSubmitOrder;
|
|
6666
|
+
exports.isZdHeavyOrderId = isZdHeavyOrderId;
|
|
6301
6667
|
exports.laneAvailabilityState = laneAvailabilityState;
|
|
6302
6668
|
exports.laneKey = laneKey;
|
|
6303
6669
|
exports.laneKeys = laneKeys;
|
|
@@ -6314,10 +6680,12 @@ exports.nativeFeeShortLabel = nativeFeeShortLabel;
|
|
|
6314
6680
|
exports.nativeFeeShortMessage = nativeFeeShortMessage;
|
|
6315
6681
|
exports.nativeSymbol = nativeSymbol;
|
|
6316
6682
|
exports.normalizeAddress = normalizeAddress;
|
|
6683
|
+
exports.normalizeCancellationPlan = normalizeCancellationPlan;
|
|
6317
6684
|
exports.normalizeDecimalText = normalizeDecimalText;
|
|
6318
6685
|
exports.normalizeDelivery = normalizeDelivery;
|
|
6319
6686
|
exports.normalizeOrderRequest = normalizeOrderRequest;
|
|
6320
6687
|
exports.normalizeOrderRequests = normalizeOrderRequests;
|
|
6688
|
+
exports.orderIdFromProof = orderIdFromProof;
|
|
6321
6689
|
exports.overwriteBlockhash = overwriteBlockhash;
|
|
6322
6690
|
exports.pairPromotionsInto = pairPromotionsInto;
|
|
6323
6691
|
exports.parity = parity;
|
|
@@ -6396,6 +6764,7 @@ exports.verifySolanaSubmit = verifySolanaSubmit;
|
|
|
6396
6764
|
exports.verifySolanaTransaction = verifySolanaTransaction;
|
|
6397
6765
|
exports.verifySubmit = verifySolanaSubmit;
|
|
6398
6766
|
exports.verifyTransaction = verifySolanaTransaction;
|
|
6767
|
+
exports.verifyZdHeavySourceOrder = verifyZdHeavySourceOrder;
|
|
6399
6768
|
exports.visibleOptions = visibleOptions;
|
|
6400
6769
|
exports.waitFraction = waitFraction;
|
|
6401
6770
|
exports.waitFromFraction = waitFromFraction;
|
|
@@ -6403,4 +6772,5 @@ exports.waitLabel = waitLabel;
|
|
|
6403
6772
|
exports.waitScaleFor = waitScaleFor;
|
|
6404
6773
|
exports.withVaultArtwork = withVaultArtwork;
|
|
6405
6774
|
exports.zdHeavyOptionKey = zdHeavyOptionKey;
|
|
6775
|
+
exports.zdHeavyRecovery = zdHeavyRecovery;
|
|
6406
6776
|
exports.zdHeavyUnavailableStatus = zdHeavyUnavailableStatus;
|