@t2000/sdk 10.24.0 → 10.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/dist/index.cjs +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3771,6 +3771,24 @@ function refundOpenJob(base, signer, openingId) {
|
|
|
3771
3771
|
});
|
|
3772
3772
|
}
|
|
3773
3773
|
|
|
3774
|
+
// src/utils/resolve-created.ts
|
|
3775
|
+
var OPENING_TYPE_MARKER = "::opening::Opening<";
|
|
3776
|
+
var ESCROW_JOB_TYPE_MARKER = "::escrow::Job<";
|
|
3777
|
+
async function resolveCreatedObjectId(client, digest, marker, opts = {}) {
|
|
3778
|
+
try {
|
|
3779
|
+
const result = await client.core.waitForTransaction({
|
|
3780
|
+
digest,
|
|
3781
|
+
include: { objectTypes: true },
|
|
3782
|
+
timeout: opts.timeoutMs ?? 15e3
|
|
3783
|
+
});
|
|
3784
|
+
const txn = result.$kind === "Transaction" ? result.Transaction : result.FailedTransaction;
|
|
3785
|
+
const types = txn.objectTypes ?? {};
|
|
3786
|
+
return Object.keys(types).find((id) => types[id]?.includes(marker));
|
|
3787
|
+
} catch {
|
|
3788
|
+
return void 0;
|
|
3789
|
+
}
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3774
3792
|
// src/index.ts
|
|
3775
3793
|
init_coinSelection();
|
|
3776
3794
|
|
|
@@ -4204,6 +4222,7 @@ exports.DEFAULT_API_BASE = DEFAULT_API_BASE;
|
|
|
4204
4222
|
exports.DEFAULT_COMMERCE_API_BASE = DEFAULT_COMMERCE_API_BASE;
|
|
4205
4223
|
exports.DEFAULT_GRPC_URL = DEFAULT_GRPC_URL;
|
|
4206
4224
|
exports.DEFAULT_NETWORK = DEFAULT_NETWORK;
|
|
4225
|
+
exports.ESCROW_JOB_TYPE_MARKER = ESCROW_JOB_TYPE_MARKER;
|
|
4207
4226
|
exports.GASLESS_MIN_STABLE_AMOUNT = GASLESS_MIN_STABLE_AMOUNT;
|
|
4208
4227
|
exports.GASLESS_STABLE_TYPES = GASLESS_STABLE_TYPES;
|
|
4209
4228
|
exports.GAS_RESERVE_MIN = GAS_RESERVE_MIN;
|
|
@@ -4220,6 +4239,7 @@ exports.MAX_OPEN_WINDOW_MS = MAX_OPEN_WINDOW_MS;
|
|
|
4220
4239
|
exports.MAX_REVIEW_WINDOW_MS = MAX_REVIEW_WINDOW_MS;
|
|
4221
4240
|
exports.MIST_PER_SUI = MIST_PER_SUI;
|
|
4222
4241
|
exports.OPENING_CLAIM_POLICY_ANY_ACTIVE = OPENING_CLAIM_POLICY_ANY_ACTIVE;
|
|
4242
|
+
exports.OPENING_TYPE_MARKER = OPENING_TYPE_MARKER;
|
|
4223
4243
|
exports.OPERATION_ASSETS = OPERATION_ASSETS;
|
|
4224
4244
|
exports.SENDABLE_ASSETS = SENDABLE_ASSETS;
|
|
4225
4245
|
exports.SPONSORED_PYTH_DEPENDENT_PROVIDERS = SPONSORED_PYTH_DEPENDENT_PROVIDERS;
|
|
@@ -4337,6 +4357,7 @@ exports.refineLendingLabel = refineLendingLabel;
|
|
|
4337
4357
|
exports.refundOpenJob = refundOpenJob;
|
|
4338
4358
|
exports.reportX402Activity = reportX402Activity;
|
|
4339
4359
|
exports.resolveAddressToSuinsViaRpc = resolveAddressToSuinsViaRpc;
|
|
4360
|
+
exports.resolveCreatedObjectId = resolveCreatedObjectId;
|
|
4340
4361
|
exports.resolveSuinsViaRpc = resolveSuinsViaRpc;
|
|
4341
4362
|
exports.resolveSymbol = resolveSymbol;
|
|
4342
4363
|
exports.resolveTokenType = resolveTokenType;
|