@canton-network/core-token-standard-service 2.1.0 → 2.2.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.js CHANGED
@@ -5,7 +5,7 @@ import Decimal$1, { Decimal } from "decimal.js";
5
5
  import { ALLOCATION_FACTORY_INTERFACE_ID_V2, ALLOCATION_INSTRUCTION_INTERFACE_ID_V2, ALLOCATION_INTERFACE_ID_V2, ALLOCATION_REQUEST_INTERFACE_ID_V2, TRANSFER_FACTORY_INTERFACE_ID_V2, TRANSFER_INSTRUCTION_INTERFACE_ID_V2, TokenStandardClient as TokenStandardClient$1, TransferInstruction as TransferInstruction$1 } from "@canton-network/core-token-standard-v2";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { ACSReader } from "@canton-network/core-acs-reader";
8
- //#region src/types.ts
8
+ // src/types.ts
9
9
  const REQUESTED_AT_SKEW_MS = 6e4;
10
10
  const EMPTY_META = { values: {} };
11
11
  const SUPPORTED_VERSIONS = ["v1", "v2"];
@@ -16,8 +16,7 @@ const KEY_MAPPING = {
16
16
  "allocation-instruction": "allocationInstruction",
17
17
  "allocation-request": "allocationRequest"
18
18
  };
19
- //#endregion
20
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
19
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/typeof.js
21
20
  function _typeof(o) {
22
21
  "@babel/helpers - typeof";
23
22
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -26,8 +25,7 @@ function _typeof(o) {
26
25
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
27
26
  }, _typeof(o);
28
27
  }
29
- //#endregion
30
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
28
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/toPrimitive.js
31
29
  function toPrimitive(t, r) {
32
30
  if ("object" != _typeof(t) || !t) return t;
33
31
  var e = t[Symbol.toPrimitive];
@@ -38,14 +36,12 @@ function toPrimitive(t, r) {
38
36
  }
39
37
  return ("string" === r ? String : Number)(t);
40
38
  }
41
- //#endregion
42
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
39
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/toPropertyKey.js
43
40
  function toPropertyKey(t) {
44
41
  var i = toPrimitive(t, "string");
45
42
  return "symbol" == _typeof(i) ? i : i + "";
46
43
  }
47
- //#endregion
48
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
44
+ // \0@oxc-project+runtime@0.155.0/helpers/esm/defineProperty.js
49
45
  function _defineProperty(e, r, t) {
50
46
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
51
47
  value: t,
@@ -54,8 +50,7 @@ function _defineProperty(e, r, t) {
54
50
  writable: !0
55
51
  }) : e[r] = t, e;
56
52
  }
57
- //#endregion
58
- //#region src/v2/transfer-service.ts
53
+ // src/v2/transfer-service.ts
59
54
  var TransferServiceV2 = class {
60
55
  constructor(core) {
61
56
  this.core = core;
@@ -165,8 +160,7 @@ var TransferServiceV2 = class {
165
160
  }, ctx.disclosedContracts ?? []];
166
161
  }
167
162
  };
168
- //#endregion
169
- //#region src/v1/transfer-service.ts
163
+ // src/v1/transfer-service.ts
170
164
  var TransferService = class {
171
165
  constructor(core) {
172
166
  this.core = core;
@@ -392,8 +386,7 @@ var TransferService = class {
392
386
  }
393
387
  }
394
388
  };
395
- //#endregion
396
- //#region src/v1/allocation-service.ts
389
+ // src/v1/allocation-service.ts
397
390
  var AllocationService$1 = class {
398
391
  constructor(core) {
399
392
  this.core = core;
@@ -546,8 +539,7 @@ var AllocationService$1 = class {
546
539
  }, []];
547
540
  }
548
541
  };
549
- //#endregion
550
- //#region src/core-service.ts
542
+ // src/core-service.ts
551
543
  var CoreService = class CoreService {
552
544
  constructor(ledgerProvider, accessTokenProvider, isMasterUser) {
553
545
  this.ledgerProvider = ledgerProvider;
@@ -705,8 +697,7 @@ var CoreService = class CoreService {
705
697
  return /^(PAR|MED)::/.test(memberId) ? memberId : `PAR::${memberId}`;
706
698
  }
707
699
  };
708
- //#endregion
709
- //#region src/v2/allocation-service.ts
700
+ // src/v2/allocation-service.ts
710
701
  const EMPTY_EXTRA_ARGS = () => ({
711
702
  context: { values: {} },
712
703
  meta: { values: {} }
@@ -869,8 +860,7 @@ var AllocationService = class AllocationService {
869
860
  return [results.map(([c]) => c), [...dcs.values()]];
870
861
  }
871
862
  };
872
- //#endregion
873
- //#region src/token-standard-service.ts
863
+ // src/token-standard-service.ts
874
864
  function isApiVersion(v) {
875
865
  return SUPPORTED_VERSIONS.includes(v);
876
866
  }
@@ -1125,7 +1115,6 @@ var TokenStandardService = class {
1125
1115
  }
1126
1116
  };
1127
1117
  _defineProperty(TokenStandardService, "MEMO_KEY", "splice.lfdecentralizedtrust.org/reason");
1128
- //#endregion
1129
1118
  export { EMPTY_META, KEY_MAPPING, REQUESTED_AT_SKEW_MS, SUPPORTED_VERSIONS, TokenStandardService, isApiVersion, resolveCapabilities };
1130
1119
 
1131
1120
  //# sourceMappingURL=index.js.map