@atbash/sdk 0.19.2-dev.0 → 0.21.0-dev.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/browser.mjs CHANGED
@@ -33,14 +33,6 @@ var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__
33
33
  mod2
34
34
  ));
35
35
 
36
- // <define:__ATBASH_CHROMIA_NODE_URLS__>
37
- var define_ATBASH_CHROMIA_NODE_URLS_default;
38
- var init_define_ATBASH_CHROMIA_NODE_URLS = __esm({
39
- "<define:__ATBASH_CHROMIA_NODE_URLS__>"() {
40
- define_ATBASH_CHROMIA_NODE_URLS_default = ["https://node0.testnet.chromia.com:7740", "https://node1.testnet.chromia.com:7740"];
41
- }
42
- });
43
-
44
36
  // <define:__ATBASH_PRIVATE_NODE_URLS__>
45
37
  var define_ATBASH_PRIVATE_NODE_URLS_default;
46
38
  var init_define_ATBASH_PRIVATE_NODE_URLS = __esm({
@@ -53,7 +45,6 @@ var init_define_ATBASH_PRIVATE_NODE_URLS = __esm({
53
45
  var require_buffer = __commonJS({
54
46
  "(disabled):node_modules/buffer/index.js"() {
55
47
  "use strict";
56
- init_define_ATBASH_CHROMIA_NODE_URLS();
57
48
  init_define_ATBASH_PRIVATE_NODE_URLS();
58
49
  }
59
50
  });
@@ -62,7 +53,6 @@ var require_buffer = __commonJS({
62
53
  var require_bn = __commonJS({
63
54
  "node_modules/bn.js/lib/bn.js"(exports, module) {
64
55
  "use strict";
65
- init_define_ATBASH_CHROMIA_NODE_URLS();
66
56
  init_define_ATBASH_PRIVATE_NODE_URLS();
67
57
  (function(module2, exports2) {
68
58
  "use strict";
@@ -2882,27 +2872,21 @@ var require_bn = __commonJS({
2882
2872
  });
2883
2873
 
2884
2874
  // src-ts/index.ts
2885
- init_define_ATBASH_CHROMIA_NODE_URLS();
2886
2875
  init_define_ATBASH_PRIVATE_NODE_URLS();
2887
2876
 
2888
2877
  // src-ts/browser/native.ts
2889
- init_define_ATBASH_CHROMIA_NODE_URLS();
2890
2878
  init_define_ATBASH_PRIVATE_NODE_URLS();
2891
2879
 
2892
2880
  // node_modules/@noble/curves/secp256k1.js
2893
- init_define_ATBASH_CHROMIA_NODE_URLS();
2894
2881
  init_define_ATBASH_PRIVATE_NODE_URLS();
2895
2882
 
2896
2883
  // node_modules/@noble/hashes/sha2.js
2897
- init_define_ATBASH_CHROMIA_NODE_URLS();
2898
2884
  init_define_ATBASH_PRIVATE_NODE_URLS();
2899
2885
 
2900
2886
  // node_modules/@noble/hashes/_md.js
2901
- init_define_ATBASH_CHROMIA_NODE_URLS();
2902
2887
  init_define_ATBASH_PRIVATE_NODE_URLS();
2903
2888
 
2904
2889
  // node_modules/@noble/hashes/utils.js
2905
- init_define_ATBASH_CHROMIA_NODE_URLS();
2906
2890
  init_define_ATBASH_PRIVATE_NODE_URLS();
2907
2891
  function isBytes(a) {
2908
2892
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a && a.BYTES_PER_ELEMENT === 1;
@@ -3325,11 +3309,9 @@ var sha256 = /* @__PURE__ */ createHasher(
3325
3309
  );
3326
3310
 
3327
3311
  // node_modules/@noble/curves/abstract/curve.js
3328
- init_define_ATBASH_CHROMIA_NODE_URLS();
3329
3312
  init_define_ATBASH_PRIVATE_NODE_URLS();
3330
3313
 
3331
3314
  // node_modules/@noble/curves/utils.js
3332
- init_define_ATBASH_CHROMIA_NODE_URLS();
3333
3315
  init_define_ATBASH_PRIVATE_NODE_URLS();
3334
3316
  var abytes2 = (value, length, title) => abytes(value, length, title);
3335
3317
  var anumber2 = anumber;
@@ -3483,7 +3465,6 @@ function validateObject(object, fields = {}, optFields = {}) {
3483
3465
  }
3484
3466
 
3485
3467
  // node_modules/@noble/curves/abstract/modular.js
3486
- init_define_ATBASH_CHROMIA_NODE_URLS();
3487
3468
  init_define_ATBASH_PRIVATE_NODE_URLS();
3488
3469
  var _0n2 = /* @__PURE__ */ BigInt(0);
3489
3470
  var _1n2 = /* @__PURE__ */ BigInt(1);
@@ -4133,11 +4114,9 @@ function createKeygen(randomSecretKey, getPublicKey) {
4133
4114
  }
4134
4115
 
4135
4116
  // node_modules/@noble/curves/abstract/weierstrass.js
4136
- init_define_ATBASH_CHROMIA_NODE_URLS();
4137
4117
  init_define_ATBASH_PRIVATE_NODE_URLS();
4138
4118
 
4139
4119
  // node_modules/@noble/hashes/hmac.js
4140
- init_define_ATBASH_CHROMIA_NODE_URLS();
4141
4120
  init_define_ATBASH_PRIVATE_NODE_URLS();
4142
4121
  var _HMAC = class {
4143
4122
  oHash;
@@ -5170,7 +5149,6 @@ var Pointk1 = /* @__PURE__ */ weierstrass(secp256k1_CURVE, {
5170
5149
  var secp256k1 = /* @__PURE__ */ ecdsa(Pointk1, sha256);
5171
5150
 
5172
5151
  // node_modules/postchain-client/built/esm/index.js
5173
- init_define_ATBASH_CHROMIA_NODE_URLS();
5174
5152
  init_define_ATBASH_PRIVATE_NODE_URLS();
5175
5153
  var import_bn = __toESM(require_bn(), 1);
5176
5154
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -21769,23 +21747,23 @@ Splitter$1.prototype.flush = function() {
21769
21747
  return Buffer$9.concat([this.cache, padBuff]);
21770
21748
  };
21771
21749
  function createCipheriv$1(suite, password, iv) {
21772
- var config2 = MODES$1[suite.toLowerCase()];
21773
- if (!config2) throw new TypeError("invalid suite type");
21750
+ var config3 = MODES$1[suite.toLowerCase()];
21751
+ if (!config3) throw new TypeError("invalid suite type");
21774
21752
  if (typeof password === "string") password = Buffer$9.from(password);
21775
- if (password.length !== config2.key / 8) throw new TypeError("invalid key length " + password.length);
21753
+ if (password.length !== config3.key / 8) throw new TypeError("invalid key length " + password.length);
21776
21754
  if (typeof iv === "string") iv = Buffer$9.from(iv);
21777
- if (config2.mode !== "GCM" && iv.length !== config2.iv) throw new TypeError("invalid iv length " + iv.length);
21778
- if (config2.type === "stream") {
21779
- return new StreamCipher$1(config2.module, password, iv);
21780
- } else if (config2.type === "auth") {
21781
- return new AuthCipher$1(config2.module, password, iv);
21755
+ if (config3.mode !== "GCM" && iv.length !== config3.iv) throw new TypeError("invalid iv length " + iv.length);
21756
+ if (config3.type === "stream") {
21757
+ return new StreamCipher$1(config3.module, password, iv);
21758
+ } else if (config3.type === "auth") {
21759
+ return new AuthCipher$1(config3.module, password, iv);
21782
21760
  }
21783
- return new Cipher(config2.module, password, iv);
21761
+ return new Cipher(config3.module, password, iv);
21784
21762
  }
21785
21763
  function createCipher$1(suite, password) {
21786
- var config2 = MODES$1[suite.toLowerCase()];
21787
- if (!config2) throw new TypeError("invalid suite type");
21788
- var keys2 = ebtk$2(password, false, config2.key, config2.iv);
21764
+ var config3 = MODES$1[suite.toLowerCase()];
21765
+ if (!config3) throw new TypeError("invalid suite type");
21766
+ var keys2 = ebtk$2(password, false, config3.key, config3.iv);
21789
21767
  return createCipheriv$1(suite, keys2.key, keys2.iv);
21790
21768
  }
21791
21769
  encrypter.createCipheriv = createCipheriv$1;
@@ -21873,23 +21851,23 @@ function unpad(last) {
21873
21851
  return last.slice(0, 16 - padded);
21874
21852
  }
21875
21853
  function createDecipheriv$1(suite, password, iv) {
21876
- var config2 = MODES[suite.toLowerCase()];
21877
- if (!config2) throw new TypeError("invalid suite type");
21854
+ var config3 = MODES[suite.toLowerCase()];
21855
+ if (!config3) throw new TypeError("invalid suite type");
21878
21856
  if (typeof iv === "string") iv = Buffer$8.from(iv);
21879
- if (config2.mode !== "GCM" && iv.length !== config2.iv) throw new TypeError("invalid iv length " + iv.length);
21857
+ if (config3.mode !== "GCM" && iv.length !== config3.iv) throw new TypeError("invalid iv length " + iv.length);
21880
21858
  if (typeof password === "string") password = Buffer$8.from(password);
21881
- if (password.length !== config2.key / 8) throw new TypeError("invalid key length " + password.length);
21882
- if (config2.type === "stream") {
21883
- return new StreamCipher(config2.module, password, iv, true);
21884
- } else if (config2.type === "auth") {
21885
- return new AuthCipher(config2.module, password, iv, true);
21859
+ if (password.length !== config3.key / 8) throw new TypeError("invalid key length " + password.length);
21860
+ if (config3.type === "stream") {
21861
+ return new StreamCipher(config3.module, password, iv, true);
21862
+ } else if (config3.type === "auth") {
21863
+ return new AuthCipher(config3.module, password, iv, true);
21886
21864
  }
21887
- return new Decipher(config2.module, password, iv);
21865
+ return new Decipher(config3.module, password, iv);
21888
21866
  }
21889
21867
  function createDecipher$1(suite, password) {
21890
- var config2 = MODES[suite.toLowerCase()];
21891
- if (!config2) throw new TypeError("invalid suite type");
21892
- var keys2 = ebtk$1(password, false, config2.key, config2.iv);
21868
+ var config3 = MODES[suite.toLowerCase()];
21869
+ if (!config3) throw new TypeError("invalid suite type");
21870
+ var keys2 = ebtk$1(password, false, config3.key, config3.iv);
21893
21871
  return createDecipheriv$1(suite, keys2.key, keys2.iv);
21894
21872
  }
21895
21873
  decrypter.createDecipher = createDecipher$1;
@@ -40614,29 +40592,29 @@ function requireFailoverStrategies() {
40614
40592
  }
40615
40593
  }
40616
40594
  function abortOnError(_a2) {
40617
- return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config2, postObject, timeoutOverride }) {
40595
+ return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config3, postObject, timeoutOverride }) {
40618
40596
  return yield retryRequest({
40619
40597
  method,
40620
40598
  path: path3,
40621
- config: config2,
40599
+ config: config3,
40622
40600
  postObject,
40623
40601
  timeoutOverride,
40624
40602
  useNextNodeOnError: false,
40625
- recoveryThreshold: config2.recoveryThreshold
40603
+ recoveryThreshold: config3.recoveryThreshold
40626
40604
  // Use user config or let nodeManager use default
40627
40605
  });
40628
40606
  });
40629
40607
  }
40630
40608
  function tryNextOnError(_a2) {
40631
- return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config2, postObject, timeoutOverride }) {
40609
+ return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config3, postObject, timeoutOverride }) {
40632
40610
  return yield retryRequest({
40633
40611
  method,
40634
40612
  path: path3,
40635
- config: config2,
40613
+ config: config3,
40636
40614
  postObject,
40637
40615
  timeoutOverride,
40638
40616
  useNextNodeOnError: true,
40639
- recoveryThreshold: config2.recoveryThreshold
40617
+ recoveryThreshold: config3.recoveryThreshold
40640
40618
  });
40641
40619
  });
40642
40620
  }
@@ -40647,17 +40625,17 @@ function requireFailoverStrategies() {
40647
40625
  return endpointPoolLength - (endpointPoolLength - 1) / 3;
40648
40626
  }
40649
40627
  function queryMajority(_a2) {
40650
- return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config2, postObject, timeoutOverride }) {
40628
+ return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config3, postObject, timeoutOverride }) {
40651
40629
  var _b;
40652
- const bftMajorityThreshold = calculateBftMajorityThreshold(config2.endpointPool.length);
40653
- const failureThreshold = config2.endpointPool.length - bftMajorityThreshold + 1;
40654
- const { nodeManager: nodeManager2 } = config2;
40630
+ const bftMajorityThreshold = calculateBftMajorityThreshold(config3.endpointPool.length);
40631
+ const failureThreshold = config3.endpointPool.length - bftMajorityThreshold + 1;
40632
+ const { nodeManager: nodeManager2 } = config3;
40655
40633
  const timeout = 15e3;
40656
- const availableNodes = nodeManager2.getAvailableNodes((_b = config2.recoveryThreshold) !== null && _b !== void 0 ? _b : bftMajorityThreshold);
40634
+ const availableNodes = nodeManager2.getAvailableNodes((_b = config3.recoveryThreshold) !== null && _b !== void 0 ? _b : bftMajorityThreshold);
40657
40635
  const outcomes = [];
40658
40636
  const promises = availableNodes.map((node2) => __awaiter2(this, void 0, void 0, function* () {
40659
40637
  try {
40660
- const requestTimeout = timeoutOverride !== null && timeoutOverride !== void 0 ? timeoutOverride : config2.responseTimeout;
40638
+ const requestTimeout = timeoutOverride !== null && timeoutOverride !== void 0 ? timeoutOverride : config3.responseTimeout;
40661
40639
  const response = yield (0, httpUtil_1.handleRequest)(method, path3, node2.url, requestTimeout, postObject);
40662
40640
  const { statusCode } = response;
40663
40641
  if (statusCode && (0, http_utils_1.isSuccessfulStatusCode)(statusCode)) {
@@ -40697,7 +40675,7 @@ function requireFailoverStrategies() {
40697
40675
  throw errorOutcomes[0].result;
40698
40676
  }
40699
40677
  }
40700
- if (outcomes.length >= config2.endpointPool.length) {
40678
+ if (outcomes.length >= config3.endpointPool.length) {
40701
40679
  throw new Error(exports.errorMessages.NO_CONSENSUS);
40702
40680
  }
40703
40681
  remainingPromises = yield racePromisesWithTimeout(remainingPromises, timeout);
@@ -40705,17 +40683,17 @@ function requireFailoverStrategies() {
40705
40683
  });
40706
40684
  }
40707
40685
  function singleEndpoint(_a2) {
40708
- return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config2, postObject, timeoutOverride }) {
40686
+ return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config3, postObject, timeoutOverride }) {
40709
40687
  let statusCode = null;
40710
40688
  let rspBody = null;
40711
40689
  let error4 = null;
40712
40690
  let transactionTimestamp = void 0;
40713
- const endpoint = config2.nodeManager.getNode();
40691
+ const endpoint = config3.nodeManager.getNode();
40714
40692
  if (!endpoint) {
40715
40693
  throw new Error("No nodes available after recovery attempt. Check node configuration.");
40716
40694
  }
40717
- for (let attempt = 0; attempt < config2.attemptsPerEndpoint; attempt++) {
40718
- const requestTimeout = timeoutOverride !== null && timeoutOverride !== void 0 ? timeoutOverride : config2.responseTimeout;
40695
+ for (let attempt = 0; attempt < config3.attemptsPerEndpoint; attempt++) {
40696
+ const requestTimeout = timeoutOverride !== null && timeoutOverride !== void 0 ? timeoutOverride : config3.responseTimeout;
40719
40697
  const response = yield (0, httpUtil_1.handleRequest)(method, path3, endpoint.url, requestTimeout, postObject);
40720
40698
  if (response) {
40721
40699
  ({ error: error4, statusCode, rspBody, transactionTimestamp } = response);
@@ -40724,24 +40702,24 @@ function requireFailoverStrategies() {
40724
40702
  if (!isError4 && !error4) {
40725
40703
  return { error: error4, statusCode, rspBody, transactionTimestamp };
40726
40704
  }
40727
- logger3.info(`${method} request failed on ${endpoint.url}. Attempt: ${attempt + 1} / ${config2.attemptsPerEndpoint}`);
40728
- yield (0, utils_12.sleep)(config2.attemptInterval);
40705
+ logger3.info(`${method} request failed on ${endpoint.url}. Attempt: ${attempt + 1} / ${config3.attemptsPerEndpoint}`);
40706
+ yield (0, utils_12.sleep)(config3.attemptInterval);
40729
40707
  }
40730
40708
  return { error: error4, statusCode, rspBody, transactionTimestamp };
40731
40709
  });
40732
40710
  }
40733
40711
  function retryRequest(_a2) {
40734
- return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config2, postObject, useNextNodeOnError, recoveryThreshold, timeoutOverride }) {
40712
+ return __awaiter2(this, arguments, void 0, function* ({ method, path: path3, config: config3, postObject, useNextNodeOnError, recoveryThreshold, timeoutOverride }) {
40735
40713
  var _b, _c, _d;
40736
40714
  let statusCode = null;
40737
40715
  let rspBody = null;
40738
40716
  let error4 = null;
40739
40717
  let transactionTimestamp = void 0;
40740
- const { nodeManager: nodeManager2 } = config2;
40718
+ const { nodeManager: nodeManager2 } = config3;
40741
40719
  const availableNodes = nodeManager2.getAvailableNodes(recoveryThreshold);
40742
40720
  for (const node2 of availableNodes) {
40743
- for (let attempt = 0; attempt < config2.attemptsPerEndpoint; attempt++) {
40744
- const requestTimeout = timeoutOverride !== null && timeoutOverride !== void 0 ? timeoutOverride : config2.responseTimeout;
40721
+ for (let attempt = 0; attempt < config3.attemptsPerEndpoint; attempt++) {
40722
+ const requestTimeout = timeoutOverride !== null && timeoutOverride !== void 0 ? timeoutOverride : config3.responseTimeout;
40745
40723
  const response = yield (0, httpUtil_1.handleRequest)(method, path3, node2.url, requestTimeout, postObject);
40746
40724
  error4 = (_b = response === null || response === void 0 ? void 0 : response.error) !== null && _b !== void 0 ? _b : null;
40747
40725
  statusCode = (_c = response === null || response === void 0 ? void 0 : response.statusCode) !== null && _c !== void 0 ? _c : null;
@@ -40772,9 +40750,9 @@ function requireFailoverStrategies() {
40772
40750
  break;
40773
40751
  }
40774
40752
  }
40775
- logger3.info(`${method} request failed on ${node2.url}. Attempt: ${attempt + 1} / ${config2.attemptsPerEndpoint}`);
40776
- if (config2.attemptInterval > 0) {
40777
- yield (0, utils_12.sleep)(config2.attemptInterval);
40753
+ logger3.info(`${method} request failed on ${node2.url}. Attempt: ${attempt + 1} / ${config3.attemptsPerEndpoint}`);
40754
+ if (config3.attemptInterval > 0) {
40755
+ yield (0, utils_12.sleep)(config3.attemptInterval);
40778
40756
  }
40779
40757
  }
40780
40758
  }
@@ -40885,21 +40863,21 @@ function requireRequestWithFailoverStrategy() {
40885
40863
  const enums_12 = enums;
40886
40864
  const failoverStrategies_1 = requireFailoverStrategies();
40887
40865
  function requestWithFailoverStrategy$1(method_1, path_1, config_1, postObject_1) {
40888
- return __awaiter2(this, arguments, void 0, function* (method, path3, config2, postObject, forceSingleEndpoint = false, timeoutOverride) {
40889
- switch (config2.failoverStrategy) {
40866
+ return __awaiter2(this, arguments, void 0, function* (method, path3, config3, postObject, forceSingleEndpoint = false, timeoutOverride) {
40867
+ switch (config3.failoverStrategy) {
40890
40868
  case enums_12.FailoverStrategy.AbortOnError:
40891
- return yield (0, failoverStrategies_1.abortOnError)({ method, path: path3, config: config2, postObject, timeoutOverride });
40869
+ return yield (0, failoverStrategies_1.abortOnError)({ method, path: path3, config: config3, postObject, timeoutOverride });
40892
40870
  case enums_12.FailoverStrategy.TryNextOnError:
40893
- return yield (0, failoverStrategies_1.tryNextOnError)({ method, path: path3, config: config2, postObject, timeoutOverride });
40871
+ return yield (0, failoverStrategies_1.tryNextOnError)({ method, path: path3, config: config3, postObject, timeoutOverride });
40894
40872
  case enums_12.FailoverStrategy.SingleEndpoint:
40895
- return yield (0, failoverStrategies_1.singleEndpoint)({ method, path: path3, config: config2, postObject, timeoutOverride });
40873
+ return yield (0, failoverStrategies_1.singleEndpoint)({ method, path: path3, config: config3, postObject, timeoutOverride });
40896
40874
  case enums_12.FailoverStrategy.QueryMajority:
40897
40875
  if (forceSingleEndpoint) {
40898
- return yield (0, failoverStrategies_1.singleEndpoint)({ method, path: path3, config: config2, postObject, timeoutOverride });
40876
+ return yield (0, failoverStrategies_1.singleEndpoint)({ method, path: path3, config: config3, postObject, timeoutOverride });
40899
40877
  }
40900
- return yield (0, failoverStrategies_1.queryMajority)({ method, path: path3, config: config2, postObject, timeoutOverride });
40878
+ return yield (0, failoverStrategies_1.queryMajority)({ method, path: path3, config: config3, postObject, timeoutOverride });
40901
40879
  default:
40902
- throw new Error(`Unsupported failover strategy: ${config2.failoverStrategy}`);
40880
+ throw new Error(`Unsupported failover strategy: ${config3.failoverStrategy}`);
40903
40881
  }
40904
40882
  });
40905
40883
  }
@@ -41068,11 +41046,11 @@ function requireUtils$1() {
41068
41046
  return Object.assign(Object.assign(Object.assign({ endpointPool, nodeManager: nodeManager2 }, settings.blockedNodeUrlSubstrings !== void 0 ? { blockedNodeUrlSubstrings: settings.blockedNodeUrlSubstrings } : {}), settings.nodeUrlFilter !== void 0 ? { nodeUrlFilter: settings.nodeUrlFilter } : {}), { blockchainRid: blockchainRidToUse, merkleHashVersion: (_e = settings.merkleHashVersion) !== null && _e !== void 0 ? _e : constants_12.MERKLE_HASH_VERSIONS.UNSET, dappStatusPolling: setStatusPolling(settings.dappStatusPolling), clusterAnchoringStatusPolling: setStatusPolling(settings.clusterAnchoringStatusPolling), systemAnchoringStatusPolling: setStatusPolling(settings.systemAnchoringStatusPolling), retryTransactionPolling: setRetryTransactionPolling(settings.retryTransactionPolling), failoverStrategy: ((_f = settings.failOverConfig) === null || _f === void 0 ? void 0 : _f.strategy) || exports.defaultFailoverConfig.strategy, attemptsPerEndpoint: ((_g = settings.failOverConfig) === null || _g === void 0 ? void 0 : _g.attemptsPerEndpoint) || exports.defaultFailoverConfig.attemptsPerEndpoint, attemptInterval: ((_h = settings.failOverConfig) === null || _h === void 0 ? void 0 : _h.attemptInterval) || exports.defaultFailoverConfig.attemptInterval, unreachableDuration: ((_j = settings.failOverConfig) === null || _j === void 0 ? void 0 : _j.unreachableDuration) || exports.defaultFailoverConfig.unreachableDuration, directoryChainRid: settings.directoryChainRid || directoryChainRid, connectTimeout: settings.connectTimeout, responseTimeout: settings.responseTimeout });
41069
41047
  });
41070
41048
  }
41071
- function getMerkleHashVersionFromDapp(config2) {
41049
+ function getMerkleHashVersionFromDapp(config3) {
41072
41050
  return __awaiter2(this, void 0, void 0, function* () {
41073
41051
  var _a2;
41074
41052
  try {
41075
- const response = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/config/${config2.blockchainRid}/features`, config2, void 0, false, (_a2 = config2.connectTimeout) !== null && _a2 !== void 0 ? _a2 : config2.responseTimeout);
41053
+ const response = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/config/${config3.blockchainRid}/features`, config3, void 0, false, (_a2 = config3.connectTimeout) !== null && _a2 !== void 0 ? _a2 : config3.responseTimeout);
41076
41054
  const validatedResponse = (0, merkleHash_1.validateMerkleHash)(response.rspBody);
41077
41055
  return validatedResponse.merkle_hash_version;
41078
41056
  } catch (error4) {
@@ -41528,7 +41506,7 @@ function requireUtils$1() {
41528
41506
  return __awaiter2(this, arguments, void 0, function* ({ endpointPool, chainId, failOverConfig = {}, nodeManager: nodeManager2, connectTimeout, responseTimeout }) {
41529
41507
  var _b;
41530
41508
  const mergedFailOverConfig = Object.assign(Object.assign({}, exports.defaultFailoverConfig), failOverConfig);
41531
- const config2 = {
41509
+ const config3 = {
41532
41510
  endpointPool,
41533
41511
  nodeManager: nodeManager2,
41534
41512
  dappStatusPolling: setStatusPolling(),
@@ -41543,7 +41521,7 @@ function requireUtils$1() {
41543
41521
  connectTimeout,
41544
41522
  responseTimeout
41545
41523
  };
41546
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/brid/iid_${chainId}`, config2, void 0, false, (_b = config2.connectTimeout) !== null && _b !== void 0 ? _b : config2.responseTimeout);
41524
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/brid/iid_${chainId}`, config3, void 0, false, (_b = config3.connectTimeout) !== null && _b !== void 0 ? _b : config3.responseTimeout);
41547
41525
  const blockchainRid = (0, requests_1.isString)(rspBody);
41548
41526
  if (!blockchainRid) {
41549
41527
  throw error4;
@@ -42279,10 +42257,10 @@ function requireBlockchainClient() {
42279
42257
  function createClient(settings) {
42280
42258
  return __awaiter2(this, void 0, void 0, function* () {
42281
42259
  (0, networkSettings_1.isNetworkSettingValid)(settings, { throwOnError: true });
42282
- const config2 = yield (0, utils_12.getClientConfigFromSettings)(settings);
42283
- config2.merkleHashVersion = yield getMerkleHashVersion(settings);
42260
+ const config3 = yield (0, utils_12.getClientConfigFromSettings)(settings);
42261
+ config3.merkleHashVersion = yield getMerkleHashVersion(settings);
42284
42262
  return {
42285
- config: config2,
42263
+ config: config3,
42286
42264
  query(nameOrQueryObject, args, callback) {
42287
42265
  return __awaiter2(this, void 0, void 0, function* () {
42288
42266
  let _name, _args;
@@ -42293,7 +42271,7 @@ function requireBlockchainClient() {
42293
42271
  _name = nameOrQueryObject === null || nameOrQueryObject === void 0 ? void 0 : nameOrQueryObject.name;
42294
42272
  _args = nameOrQueryObject === null || nameOrQueryObject === void 0 ? void 0 : nameOrQueryObject.args;
42295
42273
  }
42296
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.POST, `query_gtv/${config2.blockchainRid}`, config2, (0, serialization_12.encodeValue)((0, formatter_12.toQueryObjectGTV)(_name, _args)));
42274
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.POST, `query_gtv/${config3.blockchainRid}`, config3, (0, serialization_12.encodeValue)((0, formatter_12.toQueryObjectGTV)(_name, _args)));
42297
42275
  return new Promise((resolve2, reject) => {
42298
42276
  (0, utils_12.handlePostResponse)(error4, statusCode, (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, resolve2, callback));
42299
42277
  });
@@ -42302,9 +42280,9 @@ function requireBlockchainClient() {
42302
42280
  signTransaction(transaction, signMethod2, callback) {
42303
42281
  return __awaiter2(this, void 0, void 0, function* () {
42304
42282
  logger3.debug(`Signing transaction with ${!(0, utils_12.isKeyPair)(signMethod2) ? "signature provider containing " : ""}pubKey: ${(0, formatter_12.toString)(signMethod2.pubKey)}`);
42305
- const gtx2 = (0, utils_12.getGTXFromBufferOrTransactionOrOperation)(transaction, config2.blockchainRid);
42283
+ const gtx2 = (0, utils_12.getGTXFromBufferOrTransactionOrOperation)(transaction, config3.blockchainRid);
42306
42284
  try {
42307
- const signedTx = yield (0, utils_12.isKeyPair)(signMethod2) ? gtxTool.sign(gtx2, signMethod2.privKey, config2.merkleHashVersion, signMethod2.pubKey) : gtxTool.sign(gtx2, signMethod2, config2.merkleHashVersion);
42285
+ const signedTx = yield (0, utils_12.isKeyPair)(signMethod2) ? gtxTool.sign(gtx2, signMethod2.privKey, config3.merkleHashVersion, signMethod2.pubKey) : gtxTool.sign(gtx2, signMethod2, config3.merkleHashVersion);
42308
42286
  const gtxBytes = (0, utils_12.getSerializedGTX)(signedTx);
42309
42287
  if (typeof callback === "function") {
42310
42288
  callback(null, gtxBytes);
@@ -42325,8 +42303,8 @@ function requireBlockchainClient() {
42325
42303
  }
42326
42304
  const promiEvent = new promiEvents_12.Web3PromiEvent((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () {
42327
42305
  let error4 = null;
42328
- for (let i = 0; i < config2.retryTransactionPolling.count; i++) {
42329
- logger3.info(`sendTransactionWithRetries attempt ${i + 1} of ${config2.retryTransactionPolling.count}`);
42306
+ for (let i = 0; i < config3.retryTransactionPolling.count; i++) {
42307
+ logger3.info(`sendTransactionWithRetries attempt ${i + 1} of ${config3.retryTransactionPolling.count}`);
42330
42308
  const tmpPromiEvent = sendOnce().on(enums_12.TransactionEvent.ClusterAnchoringConfirmation, (receipt) => {
42331
42309
  promiEvent.emit(enums_12.TransactionEvent.ClusterAnchoringConfirmation, receipt);
42332
42310
  }).on(enums_12.TransactionEvent.SystemAnchoringConfirmation, (receipt) => {
@@ -42338,7 +42316,7 @@ function requireBlockchainClient() {
42338
42316
  }).on(enums_12.TransactionEvent.DappConfirmed, (receipt) => {
42339
42317
  promiEvent.emit(enums_12.TransactionEvent.DappConfirmed, receipt);
42340
42318
  }).catch((tmpError) => {
42341
- logger3.warning(`sendTransactionWithRetries error on attempt ${i + 1} of ${config2.retryTransactionPolling.count}: ${tmpError}`);
42319
+ logger3.warning(`sendTransactionWithRetries error on attempt ${i + 1} of ${config3.retryTransactionPolling.count}: ${tmpError}`);
42342
42320
  promiEvent.emit(enums_12.TransactionEvent.Rejected, tmpError);
42343
42321
  error4 = tmpError;
42344
42322
  });
@@ -42347,7 +42325,7 @@ function requireBlockchainClient() {
42347
42325
  resolve2(tmpReceipt);
42348
42326
  return;
42349
42327
  }
42350
- yield (0, utils_12.sleep)(config2.retryTransactionPolling.interval);
42328
+ yield (0, utils_12.sleep)(config3.retryTransactionPolling.interval);
42351
42329
  }
42352
42330
  reject(error4);
42353
42331
  }));
@@ -42357,13 +42335,13 @@ function requireBlockchainClient() {
42357
42335
  const promiEvent = new promiEvents_12.Web3PromiEvent((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () {
42358
42336
  var _a2, _b;
42359
42337
  try {
42360
- const gtx2 = (0, utils_12.getGTXFromBufferOrTransactionOrOperation)(transaction, config2.blockchainRid);
42338
+ const gtx2 = (0, utils_12.getGTXFromBufferOrTransactionOrOperation)(transaction, config3.blockchainRid);
42361
42339
  if (gtx2.signers.length !== ((_a2 = gtx2.signatures) === null || _a2 === void 0 ? void 0 : _a2.length)) {
42362
42340
  reject(new errors_12.NumberOfSignersAndSignaturesException());
42363
42341
  }
42364
42342
  const gtxBytes = (0, utils_12.getSerializedGTX)(gtx2);
42365
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.POST, `tx/${config2.blockchainRid}`, config2, gtxBytes);
42366
- const transactionRid = gtxTool.getDigestToSign(gtx2, config2.merkleHashVersion);
42343
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.POST, `tx/${config3.blockchainRid}`, config3, gtxBytes);
42344
+ const transactionRid = gtxTool.getDigestToSign(gtx2, config3.merkleHashVersion);
42367
42345
  try {
42368
42346
  yield (0, utils_12.handlePostResponsePromisified)(error4, statusCode, (0, requests_1.isRawGtv)(rspBody));
42369
42347
  if (typeof callback === "function") {
@@ -42371,7 +42349,7 @@ function requireBlockchainClient() {
42371
42349
  status: enums_12.ResponseStatus.Waiting,
42372
42350
  statusCode,
42373
42351
  transactionRid,
42374
- node: (_b = config2.nodeManager.lastUsedNode) === null || _b === void 0 ? void 0 : _b.url
42352
+ node: (_b = config3.nodeManager.lastUsedNode) === null || _b === void 0 ? void 0 : _b.url
42375
42353
  });
42376
42354
  }
42377
42355
  } catch (_error) {
@@ -42434,7 +42412,7 @@ function requireBlockchainClient() {
42434
42412
  callback === null || callback === void 0 ? void 0 : callback(error5, null);
42435
42413
  throw error5;
42436
42414
  }
42437
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `tx/${config2.blockchainRid}/${(0, formatter_12.ensureString)(transactionRid)}`, config2);
42415
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `tx/${config3.blockchainRid}/${(0, formatter_12.ensureString)(transactionRid)}`, config3);
42438
42416
  const transaction = (0, requests_1.isTransaction)(rspBody);
42439
42417
  return new Promise((resolve2, reject) => {
42440
42418
  (0, utils_12.handleGetResponse)(error4, statusCode, statusCode === 200 && transaction ? (0, formatter_12.toBuffer)(transaction.tx) : (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, resolve2, callback));
@@ -42449,7 +42427,7 @@ function requireBlockchainClient() {
42449
42427
  callback === null || callback === void 0 ? void 0 : callback(error5, null);
42450
42428
  throw error5;
42451
42429
  }
42452
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `tx/${config2.blockchainRid}/${transactionRid.toString("hex")}/status`, config2);
42430
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `tx/${config3.blockchainRid}/${transactionRid.toString("hex")}/status`, config3);
42453
42431
  return new Promise((resolve2, reject) => {
42454
42432
  (0, utils_12.handleGetResponse)(error4, statusCode, (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, (result) => resolve2((0, transactionStatusReponse_1.validateTransactionStatusReponse)({
42455
42433
  statusCode,
@@ -42472,7 +42450,7 @@ function requireBlockchainClient() {
42472
42450
  const beforeTimeQueryParam = beforeTime ? `&before-time=${beforeTime.getTime()}` : "";
42473
42451
  const afterTimeQueryParam = afterTime ? `&after-time=${afterTime.getTime()}` : "";
42474
42452
  const signerQueryParam = signerPubKey ? `&signer=${signerPubKey}` : "";
42475
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `transactions/${config2.blockchainRid}?limit=${limit}${beforeTimeQueryParam}${afterTimeQueryParam}${signerQueryParam}`, config2);
42453
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `transactions/${config3.blockchainRid}?limit=${limit}${beforeTimeQueryParam}${afterTimeQueryParam}${signerQueryParam}`, config3);
42476
42454
  const transactionsInfoResponseArray = (0, requests_1.isTransactionInfoResponseArray)(rspBody);
42477
42455
  const body = statusCode === 200 && transactionsInfoResponseArray ? transactionsInfoResponseArray.map(utils_12.formatTransactionInfoResponse) : rspBody;
42478
42456
  return new Promise((resolve2, reject) => {
@@ -42488,7 +42466,7 @@ function requireBlockchainClient() {
42488
42466
  callback === null || callback === void 0 ? void 0 : callback(error5, null);
42489
42467
  throw error5;
42490
42468
  }
42491
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `transactions/${config2.blockchainRid}/${(0, formatter_12.ensureString)(transactionRid)}`, config2);
42469
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `transactions/${config3.blockchainRid}/${(0, formatter_12.ensureString)(transactionRid)}`, config3);
42492
42470
  const transactionInfoResponse = (0, requests_1.isTransactionInfoResponse)(rspBody);
42493
42471
  const body = statusCode === 200 && transactionInfoResponse ? (0, utils_12.formatTransactionInfoResponse)(transactionInfoResponse) : rspBody;
42494
42472
  return new Promise((resolve2, reject) => {
@@ -42500,7 +42478,7 @@ function requireBlockchainClient() {
42500
42478
  return __awaiter2(this, void 0, void 0, function* () {
42501
42479
  const client = this;
42502
42480
  const result = { status: enums_12.AnchoringStatus.NotAnchored };
42503
- const clusterAnchoredTx = yield (0, utils_2.awaitGetAnchoringTransactionForBlockRid)(anchoringClient, (0, formatter_12.ensureBuffer)(client.config.blockchainRid), (0, formatter_12.ensureBuffer)(blockRid), config2.clusterAnchoringStatusPolling);
42481
+ const clusterAnchoredTx = yield (0, utils_2.awaitGetAnchoringTransactionForBlockRid)(anchoringClient, (0, formatter_12.ensureBuffer)(client.config.blockchainRid), (0, formatter_12.ensureBuffer)(blockRid), config3.clusterAnchoringStatusPolling);
42504
42482
  if (!clusterAnchoredTx) {
42505
42483
  return result;
42506
42484
  }
@@ -42510,7 +42488,7 @@ function requireBlockchainClient() {
42510
42488
  }
42511
42489
  result.status = enums_12.AnchoringStatus.ClusterAnchored;
42512
42490
  result.clusterAnchoredTx = anchoringTransactionValidation.data;
42513
- const systemAnchoredTransaction = yield (0, utils_12.getSystemAnchoringTransaction)(config2.endpointPool, anchoringTransactionValidation.data.txRid, anchoringClient, systemAnchoringChainRid, config2.systemAnchoringStatusPolling, config2.merkleHashVersion, config2.blockedNodeUrlSubstrings, config2.nodeUrlFilter);
42491
+ const systemAnchoredTransaction = yield (0, utils_12.getSystemAnchoringTransaction)(config3.endpointPool, anchoringTransactionValidation.data.txRid, anchoringClient, systemAnchoringChainRid, config3.systemAnchoringStatusPolling, config3.merkleHashVersion, config3.blockedNodeUrlSubstrings, config3.nodeUrlFilter);
42514
42492
  if (!systemAnchoredTransaction) {
42515
42493
  return result;
42516
42494
  }
@@ -42574,7 +42552,7 @@ function requireBlockchainClient() {
42574
42552
  },
42575
42553
  getTransactionCount(callback) {
42576
42554
  return __awaiter2(this, void 0, void 0, function* () {
42577
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `transactions/${config2.blockchainRid}/count`, config2, void 0, true);
42555
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `transactions/${config3.blockchainRid}/count`, config3, void 0, true);
42578
42556
  const transactionsCount = (0, requests_1.isTransactionsCount)(rspBody);
42579
42557
  return new Promise((resolve2, reject) => {
42580
42558
  (0, utils_12.handleGetResponse)(error4, statusCode, statusCode === 200 ? transactionsCount === null || transactionsCount === void 0 ? void 0 : transactionsCount.transactionsCount : (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, resolve2, callback));
@@ -42585,7 +42563,7 @@ function requireBlockchainClient() {
42585
42563
  return __awaiter2(this, arguments, void 0, function* (blockIdentifier2, txs = false, callback) {
42586
42564
  (0, blockIdentifier_1.isBlockIdentifierValid)(blockIdentifier2, { throwOnError: true });
42587
42565
  const queryString = typeof blockIdentifier2 === "string" ? blockIdentifier2 : `height/${blockIdentifier2}`;
42588
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `blocks/${config2.blockchainRid}/${queryString}?txs=${txs}`, config2);
42566
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `blocks/${config3.blockchainRid}/${queryString}?txs=${txs}`, config3);
42589
42567
  const blockInfoResponse = (0, requests_1.isBlockInfoResponse)(rspBody);
42590
42568
  return new Promise((resolve2, reject) => {
42591
42569
  (0, utils_12.handleGetResponse)(error4, statusCode, statusCode === 200 && blockInfoResponse !== null && blockInfoResponse ? (0, utils_12.formatBlockInfoResponse)(blockInfoResponse) : (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, resolve2, callback));
@@ -42595,7 +42573,7 @@ function requireBlockchainClient() {
42595
42573
  getLatestBlock() {
42596
42574
  return __awaiter2(this, arguments, void 0, function* (txs = false, callback) {
42597
42575
  const shouldIncludeFullTransaction = txs ? `&txs=${txs}` : "";
42598
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `blocks/${config2.blockchainRid}?limit=1${shouldIncludeFullTransaction}`, config2, void 0, true);
42576
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `blocks/${config3.blockchainRid}?limit=1${shouldIncludeFullTransaction}`, config3, void 0, true);
42599
42577
  const indexOfLatestBlock = 0;
42600
42578
  const blockInfoResponseArray = (0, requests_1.isBlockInfoResponseArray)(rspBody);
42601
42579
  return new Promise((resolve2, reject) => {
@@ -42620,7 +42598,7 @@ function requireBlockchainClient() {
42620
42598
  searchParams.append(key3, value.toString());
42621
42599
  }
42622
42600
  }
42623
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `blocks/${config2.blockchainRid}?${searchParams}`, config2);
42601
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `blocks/${config3.blockchainRid}?${searchParams}`, config3);
42624
42602
  const blockInfoResponseArray = (0, requests_1.isBlockInfoResponseArray)(rspBody);
42625
42603
  return new Promise((resolve2, reject) => {
42626
42604
  (0, utils_12.handleGetResponse)(error4, statusCode, statusCode === 200 && blockInfoResponseArray ? blockInfoResponseArray.map(utils_12.formatBlockInfoResponse) : (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, resolve2, callback));
@@ -42628,7 +42606,7 @@ function requireBlockchainClient() {
42628
42606
  });
42629
42607
  },
42630
42608
  getClientNodeUrlPool() {
42631
- return config2.endpointPool.map((endpoint) => endpoint.url);
42609
+ return config3.endpointPool.map((endpoint) => endpoint.url);
42632
42610
  },
42633
42611
  /**
42634
42612
  * Retrieves a confirmation proof for a transaction with the specified sha256
@@ -42663,7 +42641,7 @@ function requireBlockchainClient() {
42663
42641
  callback === null || callback === void 0 ? void 0 : callback(error5, null);
42664
42642
  throw error5;
42665
42643
  }
42666
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `tx/${config2.blockchainRid}/${(0, formatter_12.ensureString)(txRid2)}/confirmationProof`, config2);
42644
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `tx/${config3.blockchainRid}/${(0, formatter_12.ensureString)(txRid2)}/confirmationProof`, config3);
42667
42645
  const confirmationProof = {
42668
42646
  merkleProofTree: "",
42669
42647
  txIndex: 0
@@ -42727,13 +42705,13 @@ function requireBlockchainClient() {
42727
42705
  callback === null || callback === void 0 ? void 0 : callback(error4, null);
42728
42706
  throw error4;
42729
42707
  }
42730
- const systemAnchoringTransactionTransaction = yield (0, utils_12.getSystemAnchoringTransaction)(config2.endpointPool, anchoredTxRid, anchoringClient, systemAnchoringChainRid, config2.systemAnchoringStatusPolling, config2.merkleHashVersion, config2.blockedNodeUrlSubstrings, config2.nodeUrlFilter);
42708
+ const systemAnchoringTransactionTransaction = yield (0, utils_12.getSystemAnchoringTransaction)(config3.endpointPool, anchoredTxRid, anchoringClient, systemAnchoringChainRid, config3.systemAnchoringStatusPolling, config3.merkleHashVersion, config3.blockedNodeUrlSubstrings, config3.nodeUrlFilter);
42731
42709
  return systemAnchoringTransactionTransaction;
42732
42710
  });
42733
42711
  },
42734
42712
  getWaitingTransactions(blockchainRid, callback) {
42735
42713
  return __awaiter2(this, void 0, void 0, function* () {
42736
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/tx/${(0, formatter_12.ensureString)(blockchainRid)}/waiting`, config2);
42714
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/tx/${(0, formatter_12.ensureString)(blockchainRid)}/waiting`, config3);
42737
42715
  return new Promise((resolve2, reject) => {
42738
42716
  (0, utils_12.handleGetResponse)(error4, statusCode, (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, resolve2, callback));
42739
42717
  });
@@ -42741,7 +42719,7 @@ function requireBlockchainClient() {
42741
42719
  },
42742
42720
  getWaitingTransaction(blockchainRid, txRid2, callback) {
42743
42721
  return __awaiter2(this, void 0, void 0, function* () {
42744
- const { error: error4, statusCode, rspBody, transactionTimestamp } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/tx/${(0, formatter_12.ensureString)(blockchainRid)}/waiting/${(0, formatter_12.ensureString)(txRid2)}`, config2);
42722
+ const { error: error4, statusCode, rspBody, transactionTimestamp } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/tx/${(0, formatter_12.ensureString)(blockchainRid)}/waiting/${(0, formatter_12.ensureString)(txRid2)}`, config3);
42745
42723
  const transaction = (0, requests_1.isTransaction)(rspBody);
42746
42724
  const result = transaction ? (0, formatter_12.toBuffer)(transaction.tx) : (0, requests_1.isRawGtv)(rspBody);
42747
42725
  return new Promise((resolve2, reject) => {
@@ -42754,7 +42732,7 @@ function requireBlockchainClient() {
42754
42732
  },
42755
42733
  getRejectedTransactions(blockchainRid, callback) {
42756
42734
  return __awaiter2(this, void 0, void 0, function* () {
42757
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/tx/${(0, formatter_12.ensureString)(blockchainRid)}/rejected`, config2);
42735
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/tx/${(0, formatter_12.ensureString)(blockchainRid)}/rejected`, config3);
42758
42736
  const rejectedTransactionsArray = (0, requests_1.isRejectedTransactionResponseArray)(rspBody);
42759
42737
  const validResponseBody = statusCode === 200 && rejectedTransactionsArray ? rejectedTransactionsArray.map((rejectedTransaction) => (0, utils_12.formatRejectedTransactionFromResponse)(rejectedTransaction)) : rspBody;
42760
42738
  return new Promise((resolve2, reject) => {
@@ -42768,7 +42746,7 @@ function requireBlockchainClient() {
42768
42746
  */
42769
42747
  getAppStructure(callback) {
42770
42748
  return __awaiter2(this, void 0, void 0, function* () {
42771
- const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/query/${config2.blockchainRid}?type=rell.get_app_structure`, config2);
42749
+ const { error: error4, statusCode, rspBody } = yield (0, requestWithFailoverStrategy_1.requestWithFailoverStrategy)(enums_12.Method.GET, `/query/${config3.blockchainRid}?type=rell.get_app_structure`, config3);
42772
42750
  return new Promise((resolve2, reject) => {
42773
42751
  (0, utils_12.handleGetResponse)(error4, statusCode, (0, requests_1.isRawGtv)(rspBody), (0, utils_12.callbackPromiseBuilder)(reject, resolve2, callback));
42774
42752
  });
@@ -42781,7 +42759,7 @@ function requireBlockchainClient() {
42781
42759
  if (settings2.merkleHashVersion !== void 0) {
42782
42760
  merkleHashVersion = settings2.merkleHashVersion;
42783
42761
  } else {
42784
- merkleHashVersion = yield (0, utils_12.getMerkleHashVersionFromDapp)(config2);
42762
+ merkleHashVersion = yield (0, utils_12.getMerkleHashVersionFromDapp)(config3);
42785
42763
  }
42786
42764
  return merkleHashVersion;
42787
42765
  });
@@ -43295,9 +43273,7 @@ var index = /* @__PURE__ */ getDefaultExportFromCjs(builtExports);
43295
43273
  // src-ts/browser/native.ts
43296
43274
  var { Buffer: Buffer3, gtx: pcgtx } = index;
43297
43275
  var ATBASH_ENDPOINT = "https://chromia-verified-ai-dev-two.vercel.app";
43298
- var ATBASH_BLOCKCHAIN_RID = "02668C5218871F69A93CC0F7032DCFFE06EF0D35EF2F0B07A92A3D83A3F23A7D";
43299
43276
  var ATBASH_PRIVATE_BLOCKCHAIN_RID = "2603569AE8DC3F254323F719C8D4347BBA964E874E781291F8474236BE8B6493";
43300
- var DEFAULT_CHROMIA_NODE_URLS_ARR = define_ATBASH_CHROMIA_NODE_URLS_default;
43301
43277
  var DEFAULT_PRIVATE_NODE_URLS_ARR = define_ATBASH_PRIVATE_NODE_URLS_default;
43302
43278
  var MERKLE_HASH_VERSION = 2;
43303
43279
  function stripHex(s2) {
@@ -43449,10 +43425,8 @@ var native = {
43449
43425
  deriveMemoryKey,
43450
43426
  encryptMemoryContent,
43451
43427
  decryptMemoryContent,
43452
- DEFAULT_BLOCKCHAIN_RID: ATBASH_BLOCKCHAIN_RID,
43453
43428
  DEFAULT_PRIVATE_BLOCKCHAIN_RID: ATBASH_PRIVATE_BLOCKCHAIN_RID,
43454
43429
  DEFAULT_ENDPOINT: ATBASH_ENDPOINT,
43455
- defaultChromiaNodeUrls: () => [...DEFAULT_CHROMIA_NODE_URLS_ARR],
43456
43430
  defaultPrivateNodeUrls: () => [...DEFAULT_PRIVATE_NODE_URLS_ARR],
43457
43431
  // Server-only surfaces — throw at runtime, keep types satisfied.
43458
43432
  // The memory signers are here and not with the other signing shims because
@@ -43522,11 +43496,9 @@ var native = {
43522
43496
  };
43523
43497
 
43524
43498
  // src-ts/client.ts
43525
- init_define_ATBASH_CHROMIA_NODE_URLS();
43526
43499
  init_define_ATBASH_PRIVATE_NODE_URLS();
43527
43500
 
43528
43501
  // src-ts/random.ts
43529
- init_define_ATBASH_CHROMIA_NODE_URLS();
43530
43502
  init_define_ATBASH_PRIVATE_NODE_URLS();
43531
43503
  function randomBytes4(size) {
43532
43504
  const buf = new Uint8Array(size);
@@ -43543,7 +43515,6 @@ function randomHex(size) {
43543
43515
  }
43544
43516
 
43545
43517
  // src-ts/auth-bearer.ts
43546
- init_define_ATBASH_CHROMIA_NODE_URLS();
43547
43518
  init_define_ATBASH_PRIVATE_NODE_URLS();
43548
43519
  var BEARER_TTL_MS = 4 * 60 * 1e3;
43549
43520
  var bearers = /* @__PURE__ */ new Map();
@@ -43569,47 +43540,36 @@ function agentAuthHeaders(auth, blockchainRid) {
43569
43540
  }
43570
43541
 
43571
43542
  // src-ts/chain-config.ts
43572
- init_define_ATBASH_CHROMIA_NODE_URLS();
43573
- init_define_ATBASH_PRIVATE_NODE_URLS();
43574
-
43575
- // src-ts/constants.ts
43576
- init_define_ATBASH_CHROMIA_NODE_URLS();
43577
43543
  init_define_ATBASH_PRIVATE_NODE_URLS();
43578
- var DEFAULT_ENDPOINT = native.DEFAULT_ENDPOINT;
43579
- var DEFAULT_CHROMIA_NODE_URLS = Object.freeze(
43580
- native.defaultChromiaNodeUrls()
43581
- );
43582
- var DEFAULT_BLOCKCHAIN_RID = native.DEFAULT_BLOCKCHAIN_RID;
43583
-
43584
- // src-ts/chain-config.ts
43585
43544
  var DEFAULT_PRIVATE_NODE_URLS = Object.freeze(
43586
43545
  native.defaultPrivateNodeUrls()
43587
43546
  );
43588
43547
  var DEFAULT_PRIVATE_BLOCKCHAIN_RID = native.DEFAULT_PRIVATE_BLOCKCHAIN_RID;
43589
- var PUBLIC_CHAIN = {
43590
- network: "public",
43591
- blockchainRid: DEFAULT_BLOCKCHAIN_RID,
43592
- nodeUrls: DEFAULT_CHROMIA_NODE_URLS
43593
- };
43594
43548
  var PRIVATE_CHAIN = {
43595
43549
  network: "private",
43596
43550
  blockchainRid: DEFAULT_PRIVATE_BLOCKCHAIN_RID,
43597
43551
  nodeUrls: DEFAULT_PRIVATE_NODE_URLS
43598
43552
  };
43599
43553
  function chainForNetwork(network) {
43600
- return network === "private" ? PRIVATE_CHAIN : PUBLIC_CHAIN;
43554
+ if (network !== "private") {
43555
+ throw new Error(
43556
+ `network must be "private" (the public chain is retired), got ${JSON.stringify(network)}`
43557
+ );
43558
+ }
43559
+ return PRIVATE_CHAIN;
43601
43560
  }
43602
43561
 
43562
+ // src-ts/constants.ts
43563
+ init_define_ATBASH_PRIVATE_NODE_URLS();
43564
+ var DEFAULT_ENDPOINT = native.DEFAULT_ENDPOINT;
43565
+
43603
43566
  // src-ts/browser/encrypted-toolcall.ts
43604
- init_define_ATBASH_CHROMIA_NODE_URLS();
43605
43567
  init_define_ATBASH_PRIVATE_NODE_URLS();
43606
43568
 
43607
43569
  // src-ts/browser/crypto-ecies.ts
43608
- init_define_ATBASH_CHROMIA_NODE_URLS();
43609
43570
  init_define_ATBASH_PRIVATE_NODE_URLS();
43610
43571
 
43611
43572
  // node_modules/@noble/hashes/hkdf.js
43612
- init_define_ATBASH_CHROMIA_NODE_URLS();
43613
43573
  init_define_ATBASH_PRIVATE_NODE_URLS();
43614
43574
  function extract(hash3, ikm, salt) {
43615
43575
  ahash(hash3);
@@ -43651,15 +43611,12 @@ function expand2(hash3, prk, info2, length = 32) {
43651
43611
  var hkdf = (hash3, ikm, salt, info2, length) => expand2(hash3, extract(hash3, ikm, salt), info2, length);
43652
43612
 
43653
43613
  // node_modules/@noble/ciphers/aes.js
43654
- init_define_ATBASH_CHROMIA_NODE_URLS();
43655
43614
  init_define_ATBASH_PRIVATE_NODE_URLS();
43656
43615
 
43657
43616
  // node_modules/@noble/ciphers/_polyval.js
43658
- init_define_ATBASH_CHROMIA_NODE_URLS();
43659
43617
  init_define_ATBASH_PRIVATE_NODE_URLS();
43660
43618
 
43661
43619
  // node_modules/@noble/ciphers/utils.js
43662
- init_define_ATBASH_CHROMIA_NODE_URLS();
43663
43620
  init_define_ATBASH_PRIVATE_NODE_URLS();
43664
43621
  function isBytes3(a) {
43665
43622
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a && a.BYTES_PER_ELEMENT === 1;
@@ -44253,7 +44210,6 @@ function encryptedLength(plaintextByteLength) {
44253
44210
  }
44254
44211
 
44255
44212
  // src-ts/crypto/envelope.ts
44256
- init_define_ATBASH_CHROMIA_NODE_URLS();
44257
44213
  init_define_ATBASH_PRIVATE_NODE_URLS();
44258
44214
  var PREFIX = "atb1";
44259
44215
  var SEPARATOR = ".";
@@ -44387,7 +44343,6 @@ function signEncryptedToolCall(toolCallId, action, context, toolName, toolArgsJs
44387
44343
  }
44388
44344
 
44389
44345
  // src-ts/endpoint.ts
44390
- init_define_ATBASH_CHROMIA_NODE_URLS();
44391
44346
  init_define_ATBASH_PRIVATE_NODE_URLS();
44392
44347
  function buildAllowedJudgeHosts() {
44393
44348
  return /* @__PURE__ */ new Set([
@@ -44446,7 +44401,6 @@ function validateJudgeEndpoint(judge) {
44446
44401
  }
44447
44402
 
44448
44403
  // src-ts/errors.ts
44449
- init_define_ATBASH_CHROMIA_NODE_URLS();
44450
44404
  init_define_ATBASH_PRIVATE_NODE_URLS();
44451
44405
  var AtbashAPIError = class extends Error {
44452
44406
  /** HTTP status code (or 0 if the request never completed). */
@@ -44478,6 +44432,15 @@ var SignatureVerificationError = class extends Error {
44478
44432
  this.name = "SignatureVerificationError";
44479
44433
  }
44480
44434
  };
44435
+ var JudgeRefusalError = class extends Error {
44436
+ constructor(message) {
44437
+ super(message);
44438
+ this.name = "JudgeRefusalError";
44439
+ }
44440
+ };
44441
+ function isRefusalStatus(status) {
44442
+ return status >= 400 && status < 500 && status !== 408;
44443
+ }
44481
44444
  function enrich(status, body, statusText, endpoint, path3) {
44482
44445
  const dashboard = endpoint.replace(/\/+$/, "") || DEFAULT_ENDPOINT;
44483
44446
  let msg = `API error ${status}${path3 ? ` from ${path3}` : ""}: ${body || statusText}`;
@@ -44501,8 +44464,63 @@ function enrich(status, body, statusText, endpoint, path3) {
44501
44464
  return msg;
44502
44465
  }
44503
44466
 
44467
+ // src-ts/jail-hold.ts
44468
+ init_define_ATBASH_PRIVATE_NODE_URLS();
44469
+ var DEFAULTS = { ceilingMs: 3e4, pollMs: 1e3 };
44470
+ var holds = /* @__PURE__ */ new Map();
44471
+ var blockedAt = /* @__PURE__ */ new Map();
44472
+ var BLOCK_MEMORY_MS = 10 * 6e4;
44473
+ var config2 = { ...DEFAULTS };
44474
+ function isJailHeld(pubkey) {
44475
+ return holds.has(pubkey);
44476
+ }
44477
+ function recordBlock(pubkey) {
44478
+ const now = Date.now();
44479
+ for (const [key3, at] of blockedAt) if (now - at > BLOCK_MEMORY_MS) blockedAt.delete(key3);
44480
+ blockedAt.set(pubkey, now);
44481
+ }
44482
+ function blockedSince(pubkey, startedAt) {
44483
+ const at = blockedAt.get(pubkey);
44484
+ return at !== void 0 && startedAt <= at;
44485
+ }
44486
+ function holdJail(pubkey, confirmJailed, onGiveUp) {
44487
+ if (holds.has(pubkey)) return;
44488
+ const hold = { timer: null };
44489
+ holds.set(pubkey, hold);
44490
+ const deadline = Date.now() + config2.ceilingMs;
44491
+ const tick = async () => {
44492
+ if (holds.get(pubkey) !== hold) return;
44493
+ let jailed = false;
44494
+ try {
44495
+ jailed = await confirmJailed();
44496
+ } catch {
44497
+ }
44498
+ if (holds.get(pubkey) !== hold) return;
44499
+ if (jailed) {
44500
+ holds.delete(pubkey);
44501
+ return;
44502
+ }
44503
+ if (Date.now() >= deadline) {
44504
+ holds.delete(pubkey);
44505
+ onGiveUp?.();
44506
+ return;
44507
+ }
44508
+ const timer = setTimeout(() => void tick(), config2.pollMs);
44509
+ timer.unref?.();
44510
+ hold.timer = timer;
44511
+ };
44512
+ void tick();
44513
+ }
44514
+ function releaseJailHolds() {
44515
+ for (const hold of holds.values()) if (hold.timer) clearTimeout(hold.timer);
44516
+ holds.clear();
44517
+ blockedAt.clear();
44518
+ }
44519
+ function configureJailHold(next) {
44520
+ config2 = { ...DEFAULTS, ...next };
44521
+ }
44522
+
44504
44523
  // src-ts/http/client.ts
44505
- init_define_ATBASH_CHROMIA_NODE_URLS();
44506
44524
  init_define_ATBASH_PRIVATE_NODE_URLS();
44507
44525
  var HttpClient = class {
44508
44526
  baseUrl;
@@ -44608,7 +44626,6 @@ function classifyTransportError(err, url, method, timeoutMs) {
44608
44626
  }
44609
44627
 
44610
44628
  // src-ts/browser/keyLoader.ts
44611
- init_define_ATBASH_CHROMIA_NODE_URLS();
44612
44629
  init_define_ATBASH_PRIVATE_NODE_URLS();
44613
44630
  var NOT_AVAILABLE = "keyLoader is not available in the browser bundle \u2014 pass `agentKey` explicitly to Atbash.fromConfig or use `new Atbash(privkey, opts)`.";
44614
44631
  function resolveKeyPath(_input) {
@@ -44619,11 +44636,9 @@ function loadAgentFromFile(_keyPath) {
44619
44636
  }
44620
44637
 
44621
44638
  // src-ts/decision.ts
44622
- init_define_ATBASH_CHROMIA_NODE_URLS();
44623
44639
  init_define_ATBASH_PRIVATE_NODE_URLS();
44624
44640
 
44625
44641
  // src-ts/normalize.ts
44626
- init_define_ATBASH_CHROMIA_NODE_URLS();
44627
44642
  init_define_ATBASH_PRIVATE_NODE_URLS();
44628
44643
  function wireText(raw2, fallback = "") {
44629
44644
  if (raw2 === null || raw2 === void 0) return fallback;
@@ -44735,7 +44750,6 @@ function canonicalAllow(data) {
44735
44750
  }
44736
44751
 
44737
44752
  // src-ts/opentel/events.ts
44738
- init_define_ATBASH_CHROMIA_NODE_URLS();
44739
44753
  init_define_ATBASH_PRIVATE_NODE_URLS();
44740
44754
  var SLOW_MS = 1500;
44741
44755
  var SUCCESS_SAMPLE_RATE = 10;
@@ -44791,7 +44805,6 @@ function recordEvent(e) {
44791
44805
  }
44792
44806
 
44793
44807
  // src-ts/browser/opentel/telemetry.ts
44794
- init_define_ATBASH_CHROMIA_NODE_URLS();
44795
44808
  init_define_ATBASH_PRIVATE_NODE_URLS();
44796
44809
  function setupTelemetry(_config) {
44797
44810
  }
@@ -44805,7 +44818,6 @@ async function shutdownTelemetry() {
44805
44818
  }
44806
44819
 
44807
44820
  // src-ts/browser/userConfig.ts
44808
- init_define_ATBASH_CHROMIA_NODE_URLS();
44809
44821
  init_define_ATBASH_PRIVATE_NODE_URLS();
44810
44822
  var NOT_AVAILABLE2 = "userConfig file I/O is not available in the browser bundle.";
44811
44823
  function getConfigDir() {
@@ -44824,7 +44836,7 @@ function resolve(_key, flagValue) {
44824
44836
  return flagValue ?? "";
44825
44837
  }
44826
44838
  function forcedChainNetwork(flagValue) {
44827
- return flagValue === "public" || flagValue === "private" ? flagValue : void 0;
44839
+ return flagValue === "private" ? flagValue : void 0;
44828
44840
  }
44829
44841
  function agentKeyFromEnv() {
44830
44842
  return "";
@@ -44834,6 +44846,7 @@ function strandedAgentKey() {
44834
44846
  }
44835
44847
 
44836
44848
  // src-ts/client.ts
44849
+ var AGENT_NOT_REGISTERED = "Agent not registered. Onboard the agent at the dashboard before submitting actions.";
44837
44850
  function generateToolCallId() {
44838
44851
  return `tc-${Date.now()}-${randomHex(4)}`;
44839
44852
  }
@@ -44843,15 +44856,13 @@ function resolveConstructorChain(options) {
44843
44856
  const hasBrid = options.blockchainRid !== void 0;
44844
44857
  if (hasNodeUrls !== hasBrid) {
44845
44858
  throw new Error(
44846
- 'nodeUrls and blockchainRid must be provided together \u2014 passing one without the other 404s every chain request. Prefer `chain: PUBLIC_CHAIN | PRIVATE_CHAIN` or `network: "public" | "private"`.'
44859
+ 'nodeUrls and blockchainRid must be provided together \u2014 passing one without the other 404s every chain request. Prefer `chain: PRIVATE_CHAIN` or `network: "private"`.'
44847
44860
  );
44848
44861
  }
44849
44862
  if (hasNodeUrls && hasBrid) {
44850
- const brid = options.blockchainRid;
44851
- const derivedNetwork = options.network ?? (brid === PUBLIC_CHAIN.blockchainRid ? "public" : brid === PRIVATE_CHAIN.blockchainRid ? "private" : "private");
44852
44863
  return {
44853
- network: derivedNetwork,
44854
- blockchainRid: brid,
44864
+ network: "private",
44865
+ blockchainRid: options.blockchainRid,
44855
44866
  nodeUrls: options.nodeUrls
44856
44867
  };
44857
44868
  }
@@ -44991,10 +45002,9 @@ var Atbash = class _Atbash {
44991
45002
  _Atbash.environmentLogged = true;
44992
45003
  const brief = (rid) => rid ? `${rid.slice(0, 8)}\u2026` : "(unset)";
44993
45004
  this.logger.info?.(
44994
- `[atbash] environment \u2014 judge=${this.endpoint} publicChain=${brief(native.DEFAULT_BLOCKCHAIN_RID)} privateChain=${brief(native.DEFAULT_PRIVATE_BLOCKCHAIN_RID)} activeChain=${brief(this.blockchainRid)} responseSignatureCheck=${this.verifyPubKey ? "on" : "off"}`,
45005
+ `[atbash] environment \u2014 judge=${this.endpoint} privateChain=${brief(native.DEFAULT_PRIVATE_BLOCKCHAIN_RID)} activeChain=${brief(this.blockchainRid)} responseSignatureCheck=${this.verifyPubKey ? "on" : "off"}`,
44995
45006
  {
44996
45007
  judgeEndpoint: this.endpoint,
44997
- publicBlockchainRid: native.DEFAULT_BLOCKCHAIN_RID,
44998
45008
  privateBlockchainRid: native.DEFAULT_PRIVATE_BLOCKCHAIN_RID,
44999
45009
  activeBlockchainRid: this.blockchainRid,
45000
45010
  responseSignatureCheck: Boolean(this.verifyPubKey)
@@ -45182,6 +45192,15 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45182
45192
  * return the signed tx hex. The server broadcasts to chain.
45183
45193
  */
45184
45194
  async logToolCall(action, context = "", options = {}) {
45195
+ return this._logToolCall(action, context, options, false);
45196
+ }
45197
+ /**
45198
+ * `raisePreflightErrors` (the judge path, like Python's
45199
+ * `raise_preflight_errors`): a failed registration check throws instead of
45200
+ * becoming `{ success: false }`, so the caller can tell Atbash's "no"
45201
+ * (not registered, or a 4xx) from an outage.
45202
+ */
45203
+ async _logToolCall(action, context, options, raisePreflightErrors) {
45185
45204
  const start = performance.now();
45186
45205
  recordCall("logToolCall", void 0, this.auth.pubkey);
45187
45206
  let exists;
@@ -45191,18 +45210,20 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45191
45210
  });
45192
45211
  } catch (err) {
45193
45212
  recordDuration("logToolCall", performance.now() - start, "error");
45213
+ if (raisePreflightErrors) throw err;
45194
45214
  return { success: false, toolCallId: null, error: errorMessage(err) };
45195
45215
  }
45196
45216
  if (!exists) {
45197
45217
  recordDuration("logToolCall", performance.now() - start, "error");
45218
+ if (raisePreflightErrors) throw new JudgeRefusalError(AGENT_NOT_REGISTERED);
45198
45219
  return {
45199
45220
  success: false,
45200
45221
  toolCallId: null,
45201
- error: "Agent not registered. Onboard the agent at the dashboard before submitting actions."
45222
+ error: AGENT_NOT_REGISTERED
45202
45223
  };
45203
45224
  }
45204
45225
  const toolCallId = generateToolCallId();
45205
- const brid = options.chainOpts?.blockchainRid || options.chainOpts?.network ? this.bridFromChainOpts(options.chainOpts) : await this.defaultOrgBrid() ?? this.blockchainRid;
45226
+ const brid = await this.callBrid(options.chainOpts);
45206
45227
  const orgKey = options.orgEncryptionPubKey ?? this.orgEncryptionPubKey ?? this._orgKeyFromChain;
45207
45228
  try {
45208
45229
  const signedHex = orgKey ? signEncryptedToolCall(
@@ -45252,9 +45273,13 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45252
45273
  if (!action?.trim()) {
45253
45274
  throw new Error("action is required and cannot be empty.");
45254
45275
  }
45276
+ if (isJailHeld(this.auth.pubkey)) return this.localJailBlock();
45277
+ const startedAt = Date.now();
45255
45278
  let chainOpts = options.chainOpts;
45256
45279
  if (options.orgName && this._explicitChain) {
45257
- chainOpts = options.chainOpts ?? { network: this._defaultChain.network };
45280
+ chainOpts = options.chainOpts ?? {
45281
+ blockchainRid: this._defaultChain.blockchainRid
45282
+ };
45258
45283
  } else if (options.orgName && this.forcedNetwork()) {
45259
45284
  chainOpts = { network: this.forcedNetwork() };
45260
45285
  } else if (options.orgName) {
@@ -45264,8 +45289,7 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45264
45289
  } else {
45265
45290
  const mapNetwork = await this.getActiveNetworkForOrg(options.orgName);
45266
45291
  if (mapNetwork) {
45267
- const chain = mapNetwork === "private" ? PRIVATE_CHAIN : PUBLIC_CHAIN;
45268
- this._chainCache.set(options.orgName, chain);
45292
+ this._chainCache.set(options.orgName, chainForNetwork(mapNetwork));
45269
45293
  chainOpts = { network: mapNetwork };
45270
45294
  } else if (!chainOpts?.blockchainRid) {
45271
45295
  const resolved = await this.resolveChainFromMap(
@@ -45276,12 +45300,13 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45276
45300
  }
45277
45301
  }
45278
45302
  }
45279
- const brid = this.bridFromChainOpts(chainOpts);
45280
- const logResult = await this.logToolCall(action, context, {
45281
- toolName: options.toolName,
45282
- toolArgsJson: options.toolArgsJson,
45283
- chainOpts
45284
- });
45303
+ const brid = await this.callBrid(chainOpts);
45304
+ const logResult = await this._logToolCall(
45305
+ action,
45306
+ context,
45307
+ { toolName: options.toolName, toolArgsJson: options.toolArgsJson, chainOpts },
45308
+ true
45309
+ );
45285
45310
  if (!logResult.success || !logResult.toolCallId || !logResult.signedHex) {
45286
45311
  throw new Error(logResult.error || "Failed to sign log_tool_call");
45287
45312
  }
@@ -45318,10 +45343,16 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45318
45343
  if (verifyPubKey !== void 0) {
45319
45344
  verifyResponseSignature(bodyBytes, resp, verifyPubKey);
45320
45345
  }
45321
- const data = parseJson(bodyBytes);
45346
+ const parsed = tryParseJson(bodyBytes.toString("utf-8"));
45347
+ if (!isRecord2(parsed)) {
45348
+ throw new JudgeRefusalError(
45349
+ "The judge's reply could not be read, so the action was not approved."
45350
+ );
45351
+ }
45352
+ const data = parsed;
45322
45353
  const rawScore = data.score;
45323
45354
  const score = typeof rawScore === "number" && Number.isInteger(rawScore) && rawScore >= 1 && rawScore <= 10 ? rawScore : void 0;
45324
- return {
45355
+ const result = {
45325
45356
  verdict: normalizeVerdict(data.verdict),
45326
45357
  allow: this.executable(data),
45327
45358
  actionType: normalizeActionType(data.action_type),
@@ -45337,6 +45368,45 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45337
45368
  score,
45338
45369
  refusal: explicitRefusal(data)
45339
45370
  };
45371
+ return this.applyJailHold(result, startedAt);
45372
+ }
45373
+ /**
45374
+ * Start a local hold on an enforced, on-chain BLOCK (the verdict that jails).
45375
+ * Refuse any other result that lands while the agent is held, or whose
45376
+ * request was already in flight when the block arrived: the server judged it
45377
+ * on pre-jail state.
45378
+ */
45379
+ applyJailHold(result, startedAt) {
45380
+ const pubkey = this.auth.pubkey;
45381
+ if (result.verdict === "BLOCK" && result.enforced && result.onChain) {
45382
+ recordBlock(pubkey);
45383
+ holdJail(
45384
+ pubkey,
45385
+ () => this.getAgentPolicy(pubkey).then((p) => p.isJailed),
45386
+ () => this.logger.warn?.("[atbash] local jail hold released: the chain did not confirm the jail in time")
45387
+ );
45388
+ return result;
45389
+ }
45390
+ return isJailHeld(pubkey) || blockedSince(pubkey, startedAt) ? this.localJailBlock(result.toolCallId) : result;
45391
+ }
45392
+ /** The server's jailed refusal, produced locally while the agent is held. */
45393
+ localJailBlock(toolCallId = generateToolCallId()) {
45394
+ return {
45395
+ verdict: "BLOCK",
45396
+ allow: false,
45397
+ actionType: "block",
45398
+ reason: "Agent is jailed. All actions are blocked until the organization owner unjails this agent.",
45399
+ confidence: 1,
45400
+ provider: "policy",
45401
+ latencyMs: 0,
45402
+ toolCallId,
45403
+ onChain: false,
45404
+ enforced: true,
45405
+ enforcementMode: "enforce",
45406
+ status: "",
45407
+ score: void 0,
45408
+ refusal: "BLOCK"
45409
+ };
45340
45410
  }
45341
45411
  /* ── audit_tool_call (redact → judge → decision) ───────────────────────── */
45342
45412
  /**
@@ -45388,6 +45458,9 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45388
45458
  reason: `The judge's reply failed its signature check (${errorMessage(err)}), so it was not trusted.`
45389
45459
  };
45390
45460
  }
45461
+ if (err instanceof JudgeRefusalError || err instanceof AtbashAPIError && isRefusalStatus(err.status)) {
45462
+ return { ...this.failJudge(errorMessage(err), err), allow: false };
45463
+ }
45391
45464
  return this.failJudge(errorMessage(err), err);
45392
45465
  }
45393
45466
  }
@@ -45417,6 +45490,15 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45417
45490
  * never overrides a refusal.
45418
45491
  */
45419
45492
  decide(result) {
45493
+ const inner = this.decideInner(result);
45494
+ if (!result.enforcementMode) return inner;
45495
+ return {
45496
+ ...inner,
45497
+ enforced: result.enforced,
45498
+ enforcementMode: result.enforcementMode
45499
+ };
45500
+ }
45501
+ decideInner(result) {
45420
45502
  const toolCallId = result.toolCallId;
45421
45503
  const deny = (verdict, reason) => ({
45422
45504
  allow: false,
@@ -45530,17 +45612,17 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45530
45612
  /**
45531
45613
  * Return the current status of a previously submitted judgment.
45532
45614
  *
45533
- * `chainOpts` names which chain the judgment was signed against. The
45534
- * server's GET /api/v1/judge routes to that chain when the SDK sends
45535
- * a `brid` query param; without it, the server falls back to public.
45536
- * Callers on the private chain must pass a `chainOpts` (or configure
45537
- * the client on the private chain) — otherwise polling a POSTed
45538
- * judgment on the private chain 404s at the server.
45615
+ * `chainOpts` names which chain the judgment was signed against; the SDK
45616
+ * sends it as the `brid` query param the server routes by. Without it the
45617
+ * read uses the same chain `judgeAction` signs for (see `callBrid`): the
45618
+ * client's org chain when it has an `orgName`, else the client default.
45619
+ * A judgment signed with an explicit per-call `chainOpts` (or a per-call
45620
+ * `orgName` on another chain) must be polled with that same `chainOpts`.
45539
45621
  */
45540
45622
  async getJudgmentStatus(judgmentId, agentPubkey, chainOpts) {
45541
45623
  const pk = agentPubkey ?? this.auth.pubkey;
45542
- const brid = this.bridFromChainOpts(chainOpts);
45543
45624
  return this.track("getJudgmentStatus", pk, async () => {
45625
+ const brid = await this.callBrid(chainOpts);
45544
45626
  const resp = await this.http.get(
45545
45627
  "/api/v1/judge",
45546
45628
  { tool_call_id: judgmentId, agent_pubkey: pk, brid },
@@ -45745,21 +45827,16 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45745
45827
  }
45746
45828
  if (resp.status !== 200) throw await this.httpError(resp);
45747
45829
  const data = await this.json(resp);
45748
- if (data?.network === "public" || data?.network === "private") {
45749
- return data.network;
45750
- }
45830
+ if (data?.network === "private") return data.network;
45751
45831
  return null;
45752
45832
  }
45753
45833
  /**
45754
45834
  * Resolve which chain an org's actions should run against. Cached
45755
45835
  * per-client by orgName. Resolution order:
45756
45836
  * 1. `org_networks` map (authoritative).
45757
- * 2. Per-chain subscription fallback — public + private records
45758
- * are fetched in parallel, with `is_private_blockchain` and
45759
- * `assigned_at` reconciling mixed states.
45760
- * A lookup that names exactly one chain wins outright. Where it names
45761
- * neither (a brand-new org) or cannot choose between them, the client's
45762
- * configured default decides.
45837
+ * 2. Subscription fallback — the org's subscription row on the chain.
45838
+ * A lookup that finds the org wins outright. Where it finds nothing (a
45839
+ * brand-new org), the client's configured default decides.
45763
45840
  */
45764
45841
  async resolveChainForOrg(orgName) {
45765
45842
  const name2 = orgName.trim();
@@ -45781,35 +45858,14 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45781
45858
  const cached = this._chainCache.get(orgName);
45782
45859
  if (cached) return cached;
45783
45860
  if (mapNetwork) {
45784
- const chain = mapNetwork === "private" ? PRIVATE_CHAIN : PUBLIC_CHAIN;
45785
- this._chainCache.set(orgName, chain);
45786
- return chain;
45787
- }
45788
- const [pubRes, privRes] = await Promise.allSettled([
45789
- this.getOrgSubscription(orgName, "public"),
45790
- this.getOrgSubscription(orgName, "private")
45791
- ]);
45792
- const pubSub = pubRes.status === "fulfilled" ? pubRes.value : null;
45793
- const privSub = privRes.status === "fulfilled" ? privRes.value : null;
45794
- const failure = pubRes.status === "rejected" ? pubRes.reason : privRes.status === "rejected" ? privRes.reason : null;
45795
- if (pubSub?.is_private_blockchain) {
45796
- this._chainCache.set(orgName, PRIVATE_CHAIN);
45797
- return PRIVATE_CHAIN;
45798
- }
45799
- if (pubSub && privSub) {
45800
- const chain = privSub.assigned_at === pubSub.assigned_at ? this._defaultChain : privSub.assigned_at > pubSub.assigned_at ? PRIVATE_CHAIN : PUBLIC_CHAIN;
45861
+ const chain = chainForNetwork(mapNetwork);
45801
45862
  this._chainCache.set(orgName, chain);
45802
45863
  return chain;
45803
45864
  }
45804
- if (pubSub) {
45805
- this._chainCache.set(orgName, PUBLIC_CHAIN);
45806
- return PUBLIC_CHAIN;
45807
- }
45808
- if (privSub?.is_private_blockchain) {
45809
- this._chainCache.set(orgName, PRIVATE_CHAIN);
45810
- return PRIVATE_CHAIN;
45811
- }
45812
- if (failure) {
45865
+ let privSub;
45866
+ try {
45867
+ privSub = await this.getOrgSubscription(orgName, "private");
45868
+ } catch (failure) {
45813
45869
  const detail = failure instanceof Error ? failure.message : String(failure);
45814
45870
  throw new AtbashAPIError(
45815
45871
  failure instanceof AtbashAPIError ? failure.status : 0,
@@ -45818,6 +45874,10 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45818
45874
  this.endpoint
45819
45875
  );
45820
45876
  }
45877
+ if (privSub) {
45878
+ this._chainCache.set(orgName, PRIVATE_CHAIN);
45879
+ return PRIVATE_CHAIN;
45880
+ }
45821
45881
  this._chainCache.set(orgName, this._defaultChain);
45822
45882
  return this._defaultChain;
45823
45883
  }
@@ -45874,10 +45934,21 @@ config.json still holds an "agentKey" (${identity}), but a settings file no long
45874
45934
  */
45875
45935
  bridFromChainOpts(chainOpts) {
45876
45936
  if (chainOpts?.blockchainRid) return chainOpts.blockchainRid;
45877
- if (chainOpts?.network === "private") return PRIVATE_CHAIN.blockchainRid;
45878
- if (chainOpts?.network === "public") return PUBLIC_CHAIN.blockchainRid;
45937
+ if (chainOpts?.network) return chainForNetwork(chainOpts.network).blockchainRid;
45879
45938
  return this.blockchainRid;
45880
45939
  }
45940
+ /**
45941
+ * The chain one call's transactions are signed for: the per-call override
45942
+ * when given, otherwise the client's org, otherwise the client default.
45943
+ * log_tool_call, judge_action and the judgment-status read all use this, so
45944
+ * a request never pairs transactions signed for two different chains.
45945
+ */
45946
+ async callBrid(chainOpts) {
45947
+ if (chainOpts?.blockchainRid || chainOpts?.network) {
45948
+ return this.bridFromChainOpts(chainOpts);
45949
+ }
45950
+ return await this.defaultOrgBrid() ?? this.blockchainRid;
45951
+ }
45881
45952
  /**
45882
45953
  * Resolve the dashboard chain used by agent metadata/policy reads.
45883
45954
  * Explicit per-call network overrides win; otherwise use the supplied org
@@ -46185,10 +46256,6 @@ function tryParseJson(text) {
46185
46256
  return void 0;
46186
46257
  }
46187
46258
  }
46188
- function parseJson(bytes) {
46189
- const parsed = tryParseJson(bytes.toString("utf-8"));
46190
- return parsed === void 0 ? {} : parsed;
46191
- }
46192
46259
  function requestPath(url) {
46193
46260
  if (!url) return void 0;
46194
46261
  try {
@@ -46227,7 +46294,6 @@ function truncate(text, limit = MAX_ACTION_LEN) {
46227
46294
  }
46228
46295
 
46229
46296
  // src-ts/browser/key-path.ts
46230
- init_define_ATBASH_CHROMIA_NODE_URLS();
46231
46297
  init_define_ATBASH_PRIVATE_NODE_URLS();
46232
46298
  var KEY_FILENAMES = ["guard-client-key", "atbash-client-key"];
46233
46299
  var unavailable = (name2) => {
@@ -46241,7 +46307,6 @@ function chooseKeyPath(_input, _exists) {
46241
46307
  }
46242
46308
 
46243
46309
  // src-ts/redact.ts
46244
- init_define_ATBASH_CHROMIA_NODE_URLS();
46245
46310
  init_define_ATBASH_PRIVATE_NODE_URLS();
46246
46311
  function redactJsonStrings(value) {
46247
46312
  if (typeof value === "string") {
@@ -46261,7 +46326,6 @@ function redactJsonStrings(value) {
46261
46326
  }
46262
46327
 
46263
46328
  // src-ts/signature.ts
46264
- init_define_ATBASH_CHROMIA_NODE_URLS();
46265
46329
  init_define_ATBASH_PRIVATE_NODE_URLS();
46266
46330
  function verifyJudgeResponseSignature(bodyBytes, signatureHex, pubKeyHex) {
46267
46331
  if (!signatureHex) {
@@ -46285,7 +46349,6 @@ function verifyJudgeResponseSignature(bodyBytes, signatureHex, pubKeyHex) {
46285
46349
  }
46286
46350
 
46287
46351
  // src-ts/memory/boot-sync-message.ts
46288
- init_define_ATBASH_CHROMIA_NODE_URLS();
46289
46352
  init_define_ATBASH_PRIVATE_NODE_URLS();
46290
46353
  var BOOT_SYNC_HINT = "check the chain endpoint and orgName if the cause above does not explain it";
46291
46354
  function bootSyncFailureLine(cause) {
@@ -46298,11 +46361,9 @@ function bootSyncFailureLine(cause) {
46298
46361
  }
46299
46362
 
46300
46363
  // src-ts/memory/index.ts
46301
- init_define_ATBASH_CHROMIA_NODE_URLS();
46302
46364
  init_define_ATBASH_PRIVATE_NODE_URLS();
46303
46365
 
46304
46366
  // src-ts/browser/memory-crypto.ts
46305
- init_define_ATBASH_CHROMIA_NODE_URLS();
46306
46367
  init_define_ATBASH_PRIVATE_NODE_URLS();
46307
46368
  var { Buffer: Buffer4 } = index;
46308
46369
  var HKDF_INFO = new TextEncoder().encode("atbash:memory-encryption");
@@ -46378,7 +46439,6 @@ async function decryptMemoryContent2(ciphertext, nonce, key3) {
46378
46439
  }
46379
46440
 
46380
46441
  // src-ts/browser/memory-scan.ts
46381
- init_define_ATBASH_CHROMIA_NODE_URLS();
46382
46442
  init_define_ATBASH_PRIVATE_NODE_URLS();
46383
46443
  var STUB_MSG2 = "not available in @atbash/sdk browser bundle \u2014 scan memory server-side";
46384
46444
  async function scanMemory(_entry, _auth, _opts) {
@@ -46389,7 +46449,6 @@ async function scanMemoryBatch(_entries, _auth, _opts) {
46389
46449
  }
46390
46450
 
46391
46451
  // src-ts/browser/memory-chain.ts
46392
- init_define_ATBASH_CHROMIA_NODE_URLS();
46393
46452
  init_define_ATBASH_PRIVATE_NODE_URLS();
46394
46453
  var STUB_MSG3 = "not available in @atbash/sdk browser bundle \u2014 commit/rollback memory server-side";
46395
46454
  async function commitMemoryVersion(_plaintext, _auth, _opts) {
@@ -46418,7 +46477,6 @@ async function rollbackMemory(_toId, _reason, _auth, _opts) {
46418
46477
  }
46419
46478
 
46420
46479
  // src-ts/browser/memory-classifier.ts
46421
- init_define_ATBASH_CHROMIA_NODE_URLS();
46422
46480
  init_define_ATBASH_PRIVATE_NODE_URLS();
46423
46481
  var STUB_MSG4 = "not available in @atbash/sdk browser bundle \u2014 classify memory writes server-side";
46424
46482
  var DEFAULT_MEMORY_WRITE_TOOL_NAMES = [
@@ -46442,15 +46500,22 @@ function classifyMemoryWrite(_event, _ctx, _opts = {}) {
46442
46500
  }
46443
46501
 
46444
46502
  // src-ts/browser/memory-guard.ts
46445
- init_define_ATBASH_CHROMIA_NODE_URLS();
46446
46503
  init_define_ATBASH_PRIVATE_NODE_URLS();
46447
46504
  var STUB_MSG5 = "not available in @atbash/sdk browser bundle \u2014 guard memory writes agent-side";
46448
46505
  async function guardMemoryWrite(_input) {
46449
46506
  throw new Error(`guardMemoryWrite ${STUB_MSG5}`);
46450
46507
  }
46451
46508
 
46509
+ // src-ts/browser/memory-slot.ts
46510
+ init_define_ATBASH_PRIVATE_NODE_URLS();
46511
+ var unavailable2 = (name2) => {
46512
+ throw new Error(`${name2} is not available in the browser bundle`);
46513
+ };
46514
+ function memorySlotOf(_target, _home, _root2, _extraHomes, _p) {
46515
+ return unavailable2("memorySlotOf");
46516
+ }
46517
+
46452
46518
  // src-ts/memory/sync.ts
46453
- init_define_ATBASH_CHROMIA_NODE_URLS();
46454
46519
  init_define_ATBASH_PRIVATE_NODE_URLS();
46455
46520
  var MemoryIntegrityError = class extends Error {
46456
46521
  constructor(id, reason) {
@@ -46484,9 +46549,8 @@ async function syncLocalMemory(auth, pointer, opts = {}) {
46484
46549
  }
46485
46550
 
46486
46551
  // src-ts/browser/memory-pointer-store.ts
46487
- init_define_ATBASH_CHROMIA_NODE_URLS();
46488
46552
  init_define_ATBASH_PRIVATE_NODE_URLS();
46489
- var unavailable2 = (name2) => {
46553
+ var unavailable3 = (name2) => {
46490
46554
  throw new Error(`${name2} is not available in the browser bundle`);
46491
46555
  };
46492
46556
  var PointerStore = class {
@@ -46500,24 +46564,22 @@ var PointerStore = class {
46500
46564
  }
46501
46565
  };
46502
46566
  function defaultPointerPath(_workspaceDir) {
46503
- return unavailable2("defaultPointerPath");
46567
+ return unavailable3("defaultPointerPath");
46504
46568
  }
46505
46569
 
46506
46570
  // src-ts/browser/memory-file-logger.ts
46507
- init_define_ATBASH_CHROMIA_NODE_URLS();
46508
46571
  init_define_ATBASH_PRIVATE_NODE_URLS();
46509
- var unavailable3 = (name2) => {
46572
+ var unavailable4 = (name2) => {
46510
46573
  throw new Error(`${name2} is not available in the browser bundle`);
46511
46574
  };
46512
46575
  function createFileLogger(_logFilePath, _hostLogger) {
46513
- return unavailable3("createFileLogger");
46576
+ return unavailable4("createFileLogger");
46514
46577
  }
46515
46578
  function defaultPluginLogPath(_workspaceDir) {
46516
- return unavailable3("defaultPluginLogPath");
46579
+ return unavailable4("defaultPluginLogPath");
46517
46580
  }
46518
46581
 
46519
46582
  // src-ts/browser/memory-read-classifier.ts
46520
- init_define_ATBASH_CHROMIA_NODE_URLS();
46521
46583
  init_define_ATBASH_PRIVATE_NODE_URLS();
46522
46584
  var STUB_MSG6 = "not available in @atbash/sdk browser bundle \u2014 classify memory reads server-side";
46523
46585
  var DEFAULT_MEMORY_READ_TOOL_NAMES = [
@@ -46529,9 +46591,8 @@ function classifyMemoryRead(_event, _ctx, _opts = {}) {
46529
46591
  }
46530
46592
 
46531
46593
  // src-ts/browser/memory-guard-manager.ts
46532
- init_define_ATBASH_CHROMIA_NODE_URLS();
46533
46594
  init_define_ATBASH_PRIVATE_NODE_URLS();
46534
- var unavailable4 = (name2) => {
46595
+ var unavailable5 = (name2) => {
46535
46596
  throw new Error(`${name2} is not available in the browser bundle`);
46536
46597
  };
46537
46598
  var MemoryGuardManager = class {
@@ -46551,7 +46612,7 @@ var MemoryGuardManager = class {
46551
46612
  }
46552
46613
  };
46553
46614
  function createMemoryGuardManager(_opts) {
46554
- return unavailable4("createMemoryGuardManager");
46615
+ return unavailable5("createMemoryGuardManager");
46555
46616
  }
46556
46617
 
46557
46618
  // src-ts/index.ts
@@ -46613,8 +46674,6 @@ export {
46613
46674
  Atbash,
46614
46675
  AtbashAPIError,
46615
46676
  BOOT_SYNC_HINT,
46616
- DEFAULT_BLOCKCHAIN_RID,
46617
- DEFAULT_CHROMIA_NODE_URLS,
46618
46677
  DEFAULT_ENDPOINT,
46619
46678
  DEFAULT_MEMORY_PATH_PATTERNS,
46620
46679
  DEFAULT_MEMORY_READ_TOOL_NAMES,
@@ -46622,11 +46681,11 @@ export {
46622
46681
  EciesDomain,
46623
46682
  HttpClient,
46624
46683
  HttpTransportError,
46684
+ JudgeRefusalError,
46625
46685
  KEY_FILENAMES,
46626
46686
  MemoryGuardManager,
46627
46687
  MemoryIntegrityError,
46628
46688
  PRIVATE_CHAIN,
46629
- PUBLIC_CHAIN,
46630
46689
  PointerStore,
46631
46690
  SignatureVerificationError,
46632
46691
  bootSyncFailureLine,
@@ -46640,6 +46699,7 @@ export {
46640
46699
  columnAad,
46641
46700
  commitMemoryVersion,
46642
46701
  configureEvents,
46702
+ configureJailHold,
46643
46703
  containsEvasionCharacters2 as containsEvasionCharacters,
46644
46704
  containsSecret2 as containsSecret,
46645
46705
  createFileLogger,
@@ -46668,12 +46728,14 @@ export {
46668
46728
  getRollbackHistory,
46669
46729
  guardMemoryWrite,
46670
46730
  isEnvelope,
46731
+ isJailHeld,
46671
46732
  isValidPrivateKey2 as isValidPrivateKey,
46672
46733
  keyFingerprintOf,
46673
46734
  keyPathCandidates,
46674
46735
  loadAgent2 as loadAgent,
46675
46736
  loadAgentFromFile,
46676
46737
  loadUserConfig,
46738
+ memorySlotOf,
46677
46739
  normalizeActionForHash,
46678
46740
  normalizeActionType,
46679
46741
  normalizeForMatching2 as normalizeForMatching,
@@ -46687,6 +46749,7 @@ export {
46687
46749
  recordEvent,
46688
46750
  redactJsonStrings,
46689
46751
  redactSecrets2 as redactSecrets,
46752
+ releaseJailHolds,
46690
46753
  resolve,
46691
46754
  resolveKeyPath,
46692
46755
  rollbackMemory,