@settlemint/dalp-cli 3.1.11-main.33724170756 → 3.1.11-main.33724992663

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/dalp.js CHANGED
@@ -49966,6 +49966,16 @@ async function readResponse(response) {
49966
49966
  return payload;
49967
49967
  }
49968
49968
 
49969
+ // ../sdk/src/reads-as-funding-paused.ts
49970
+ function readsAsFundingPaused(status) {
49971
+ if (status === null || typeof status !== "object") {
49972
+ return false;
49973
+ }
49974
+ const requirement = Reflect.get(status, "activeRequirement");
49975
+ return requirement !== undefined && requirement !== null;
49976
+ }
49977
+ var PAUSED_POLL_INTERVAL_MAX_MS = 30000;
49978
+
49969
49979
  // ../sdk/src/proxy/settlement.ts
49970
49980
  var SUCCESS_STATE = "COMPLETED";
49971
49981
  var FAILURE_STATES = new Set(["FAILED", "DEAD_LETTER", "CANCELLED"]);
@@ -50031,13 +50041,14 @@ async function resolveSettlement(transport, payload, options, now = Date.now, sl
50031
50041
  return payload;
50032
50042
  }
50033
50043
  const timeoutMs = options?.settlementTimeoutMs ?? transport.settlementTimeoutMs ?? DEFAULT_SETTLEMENT_TIMEOUT_MS;
50034
- const deadline = now() + timeoutMs;
50044
+ let deadline = now() + timeoutMs;
50045
+ let pollIntervalMs = POLL_INTERVAL_MS;
50035
50046
  const statusUrl = handle.statusUrl.startsWith("http") ? handle.statusUrl : `${transport.baseUrl}${handle.statusUrl}`;
50036
50047
  for (;; ) {
50037
50048
  if (now() >= deadline) {
50038
50049
  throw new SettlementTimeoutError(handle.transactionId, handle.statusUrl, timeoutMs);
50039
50050
  }
50040
- await sleep2(POLL_INTERVAL_MS);
50051
+ await sleep2(pollIntervalMs);
50041
50052
  const response = await transport.fetch(statusUrl, {
50042
50053
  method: "GET",
50043
50054
  headers: callHeaders(transport, options),
@@ -50053,6 +50064,12 @@ async function resolveSettlement(transport, payload, options, now = Date.now, sl
50053
50064
  if (state !== undefined && FAILURE_STATES.has(state)) {
50054
50065
  throw new SettlementFailedError(handle.transactionId, state, readString2(body, "errorMessage"));
50055
50066
  }
50067
+ if (readsAsFundingPaused(body)) {
50068
+ deadline = now() + timeoutMs;
50069
+ pollIntervalMs = Math.min(pollIntervalMs * 2, PAUSED_POLL_INTERVAL_MAX_MS);
50070
+ } else {
50071
+ pollIntervalMs = POLL_INTERVAL_MS;
50072
+ }
50056
50073
  }
50057
50074
  }
50058
50075
 
@@ -50224,7 +50241,7 @@ var WEBHOOK_MANIFEST_VERSION = Webhook.MANIFEST_VERSION;
50224
50241
  // ../sdk/package.json
50225
50242
  var package_default = {
50226
50243
  name: "@settlemint/dalp-sdk",
50227
- version: "3.1.11-main.33724170756",
50244
+ version: "3.1.11-main.33724992663",
50228
50245
  private: false,
50229
50246
  description: "Fully typed SDK for the DALP tokenization platform API",
50230
50247
  homepage: "https://settlemint.com",
@@ -116942,7 +116959,7 @@ async function runCommand(context, operation, errorContext = UNKNOWN_COMMAND_ERR
116942
116959
  // package.json
116943
116960
  var package_default2 = {
116944
116961
  name: "@settlemint/dalp-cli",
116945
- version: "3.1.11-main.33724170756",
116962
+ version: "3.1.11-main.33724992663",
116946
116963
  private: false,
116947
116964
  description: "CLI for the Digital Asset Lifecycle Platform \u2014 manage tokens, identities, compliance, and more from the command line.",
116948
116965
  homepage: "https://settlemint.com",
@@ -118247,4 +118264,4 @@ if (false) {}
118247
118264
  // src/bin.ts
118248
118265
  await cli.serve();
118249
118266
 
118250
- //# debugId=9E88A7094A5B6E8F64756E2164756E21
118267
+ //# debugId=9A8D17DD899B14DA64756E2164756E21