@canton-network/core-amulet-service 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,362 +1,334 @@
1
- 'use strict';
2
-
3
- var coreSpliceClient = require('@canton-network/core-splice-client');
4
- var Decimal = require('decimal.js');
5
-
6
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
-
8
- var Decimal__default = /*#__PURE__*/_interopDefault(Decimal);
9
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
10
4
  var __defProp = Object.defineProperty;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
13
- var REQUESTED_AT_SKEW_MS = 6e4;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ let _canton_network_core_splice_client = require("@canton-network/core-splice-client");
25
+ let decimal_js = require("decimal.js");
26
+ decimal_js = __toESM(decimal_js, 1);
27
+ //#region src/amulet-service-base.ts
28
+ const REQUESTED_AT_SKEW_MS = 6e4;
14
29
  var AmuletServiceBase = class {
15
- constructor(tokenStandard) {
16
- this.tokenStandard = tokenStandard;
17
- }
18
- async buyMemberTraffic(dso, provider, trafficAmount, synchronizerId, memberId, migrationId, inputUtxos) {
19
- const amuletRules = await this.getAmuletRules();
20
- const activeRound = await this.getActiveOpenMiningRound();
21
- const inputHoldings = await this.tokenStandard.getInputHoldingsCids(
22
- provider,
23
- inputUtxos,
24
- new Decimal__default.default(trafficAmount)
25
- );
26
- if (!amuletRules) {
27
- throw new Error("AmuletRules contract not found");
28
- }
29
- if (!activeRound) {
30
- throw new Error(
31
- "OpenMiningRound active at current moment not found"
32
- );
33
- }
34
- const disclosed = [
35
- {
36
- templateId: amuletRules.template_id,
37
- contractId: amuletRules.contract_id,
38
- createdEventBlob: amuletRules.created_event_blob,
39
- synchronizerId
40
- },
41
- {
42
- templateId: activeRound.template_id,
43
- contractId: activeRound.contract_id,
44
- createdEventBlob: activeRound.created_event_blob,
45
- synchronizerId
46
- }
47
- ];
48
- const context = {
49
- openMiningRound: activeRound.contract_id,
50
- issuingMiningRounds: [],
51
- validatorRights: [],
52
- featuredAppRight: null
53
- };
54
- const choiceArgs = {
55
- context,
56
- inputs: inputHoldings.map((cid) => ({
57
- tag: "InputAmulet",
58
- value: cid
59
- })),
60
- provider,
61
- memberId: this.tokenStandard.core.toQualifiedMemberId(memberId),
62
- synchronizerId,
63
- migrationId: migrationId.toString(),
64
- trafficAmount: trafficAmount.toString(),
65
- expectedDso: dso
66
- };
67
- const exercise = {
68
- templateId: "#splice-amulet:Splice.AmuletRules:AmuletRules",
69
- contractId: amuletRules.contract_id,
70
- choice: "AmuletRules_BuyMemberTraffic",
71
- choiceArgument: choiceArgs
72
- };
73
- return [exercise, disclosed];
74
- }
75
- async selfGrantFeatureAppRight(providerPartyId, synchronizerId) {
76
- const amuletRules = await this.getAmuletRules();
77
- const disclosedContracts = {
78
- templateId: amuletRules.template_id,
79
- contractId: amuletRules.contract_id,
80
- createdEventBlob: amuletRules.created_event_blob,
81
- synchronizerId
82
- };
83
- return [
84
- {
85
- templateId: amuletRules.template_id,
86
- contractId: amuletRules.contract_id,
87
- choice: "AmuletRules_DevNet_FeatureApp",
88
- choiceArgument: {
89
- provider: providerPartyId
90
- }
91
- },
92
- [disclosedContracts]
93
- ];
94
- }
95
- async cancelTransferPreapproval(contractId, templateId, actor) {
96
- const exercise = {
97
- templateId,
98
- contractId,
99
- choice: "TransferPreapproval_Cancel",
100
- choiceArgument: { p: actor }
101
- };
102
- return [exercise, []];
103
- }
104
- async renewTransferPreapproval(contractId, templateId, provider, synchronizerId, newExpiresAt, inputUtxos) {
105
- const amuletRules = await this.getAmuletRules();
106
- const activeRound = await this.getActiveOpenMiningRound();
107
- if (!amuletRules) {
108
- throw new Error("AmuletRules contract not found");
109
- }
110
- if (!activeRound) {
111
- throw new Error(
112
- "OpenMiningRound active at current moment not found"
113
- );
114
- }
115
- const disclosed = [
116
- {
117
- templateId: amuletRules.template_id,
118
- contractId: amuletRules.contract_id,
119
- createdEventBlob: amuletRules.created_event_blob,
120
- synchronizerId
121
- },
122
- {
123
- templateId: activeRound.template_id,
124
- contractId: activeRound.contract_id,
125
- createdEventBlob: activeRound.created_event_blob,
126
- synchronizerId
127
- }
128
- ];
129
- const inputHoldings = await this.tokenStandard.getInputHoldingsCids(
130
- provider,
131
- inputUtxos
132
- );
133
- const context = {
134
- context: {
135
- openMiningRound: activeRound.contract_id,
136
- issuingMiningRounds: [],
137
- validatorRights: [],
138
- featuredAppRight: null
139
- },
140
- amuletRules: amuletRules.contract_id
141
- };
142
- const effectiveNewExpiresAt = newExpiresAt ?? new Date(Date.now() + 90 * 24 * 3600 * 1e3);
143
- const exercise = {
144
- templateId,
145
- contractId,
146
- choice: "TransferPreapproval_Renew",
147
- choiceArgument: {
148
- context,
149
- inputs: inputHoldings.map((cid) => ({
150
- tag: "InputAmulet",
151
- value: cid
152
- })),
153
- newExpiresAt: effectiveNewExpiresAt.toISOString()
154
- }
155
- };
156
- return [exercise, disclosed];
157
- }
158
- async createTap(receiver, amount, instrumentAdmin, instrumentId, registryUrl) {
159
- const now = /* @__PURE__ */ new Date();
160
- const tomorrow = new Date(now);
161
- tomorrow.setDate(tomorrow.getDate() + 1);
162
- const choiceArgs = {
163
- expectedAdmin: instrumentAdmin,
164
- transfer: {
165
- sender: instrumentAdmin,
166
- receiver,
167
- amount,
168
- instrumentId: { admin: instrumentAdmin, id: instrumentId },
169
- lock: null,
170
- requestedAt: new Date(
171
- Date.now() - REQUESTED_AT_SKEW_MS
172
- ).toISOString(),
173
- executeBefore: tomorrow.toISOString(),
174
- inputHoldingCids: [],
175
- meta: { values: {} }
176
- },
177
- extraArgs: {
178
- context: { values: {} },
179
- meta: { values: {} }
180
- }
181
- };
182
- const disclosedContracts = (await this.tokenStandard.transfer.fetchTransferFactoryChoiceContext(
183
- registryUrl,
184
- choiceArgs
185
- )).choiceContext.disclosedContracts;
186
- const amuletRules = await this.getAmuletRules();
187
- if (!amuletRules) {
188
- throw new Error("AmuletRules contract not found");
189
- }
190
- const latestOpenMiningRound = await this.getActiveOpenMiningRound();
191
- if (!latestOpenMiningRound) {
192
- throw new Error(
193
- "OpenMiningRound active at current moment not found"
194
- );
195
- }
196
- return [
197
- {
198
- templateId: amuletRules.template_id,
199
- contractId: amuletRules.contract_id,
200
- choice: "AmuletRules_DevNet_Tap",
201
- choiceArgument: {
202
- receiver,
203
- amount,
204
- openRound: latestOpenMiningRound.contract_id
205
- }
206
- },
207
- disclosedContracts
208
- ];
209
- }
30
+ constructor(tokenStandard) {
31
+ this.tokenStandard = tokenStandard;
32
+ }
33
+ async buyMemberTraffic(dso, provider, trafficAmount, synchronizerId, memberId, migrationId, inputUtxos) {
34
+ const amuletRules = await this.getAmuletRules();
35
+ const activeRound = await this.getActiveOpenMiningRound();
36
+ const inputHoldings = await this.tokenStandard.getInputHoldingsCids(provider, inputUtxos, new decimal_js.default(trafficAmount));
37
+ if (!amuletRules) throw new Error("AmuletRules contract not found");
38
+ if (!activeRound) throw new Error("OpenMiningRound active at current moment not found");
39
+ const disclosed = [{
40
+ templateId: amuletRules.template_id,
41
+ contractId: amuletRules.contract_id,
42
+ createdEventBlob: amuletRules.created_event_blob,
43
+ synchronizerId
44
+ }, {
45
+ templateId: activeRound.template_id,
46
+ contractId: activeRound.contract_id,
47
+ createdEventBlob: activeRound.created_event_blob,
48
+ synchronizerId
49
+ }];
50
+ const choiceArgs = {
51
+ context: {
52
+ openMiningRound: activeRound.contract_id,
53
+ issuingMiningRounds: [],
54
+ validatorRights: [],
55
+ featuredAppRight: null
56
+ },
57
+ inputs: inputHoldings.map((cid) => ({
58
+ tag: "InputAmulet",
59
+ value: cid
60
+ })),
61
+ provider,
62
+ memberId: this.tokenStandard.core.toQualifiedMemberId(memberId),
63
+ synchronizerId,
64
+ migrationId: migrationId.toString(),
65
+ trafficAmount: trafficAmount.toString(),
66
+ expectedDso: dso
67
+ };
68
+ return [{
69
+ templateId: "#splice-amulet:Splice.AmuletRules:AmuletRules",
70
+ contractId: amuletRules.contract_id,
71
+ choice: "AmuletRules_BuyMemberTraffic",
72
+ choiceArgument: choiceArgs
73
+ }, disclosed];
74
+ }
75
+ async selfGrantFeatureAppRight(providerPartyId, synchronizerId) {
76
+ const amuletRules = await this.getAmuletRules();
77
+ const disclosedContracts = {
78
+ templateId: amuletRules.template_id,
79
+ contractId: amuletRules.contract_id,
80
+ createdEventBlob: amuletRules.created_event_blob,
81
+ synchronizerId
82
+ };
83
+ return [{
84
+ templateId: amuletRules.template_id,
85
+ contractId: amuletRules.contract_id,
86
+ choice: "AmuletRules_DevNet_FeatureApp",
87
+ choiceArgument: { provider: providerPartyId }
88
+ }, [disclosedContracts]];
89
+ }
90
+ async cancelTransferPreapproval(contractId, templateId, actor) {
91
+ return [{
92
+ templateId,
93
+ contractId,
94
+ choice: "TransferPreapproval_Cancel",
95
+ choiceArgument: { p: actor }
96
+ }, []];
97
+ }
98
+ async renewTransferPreapproval(contractId, templateId, provider, synchronizerId, newExpiresAt, inputUtxos) {
99
+ const amuletRules = await this.getAmuletRules();
100
+ const activeRound = await this.getActiveOpenMiningRound();
101
+ if (!amuletRules) throw new Error("AmuletRules contract not found");
102
+ if (!activeRound) throw new Error("OpenMiningRound active at current moment not found");
103
+ const disclosed = [{
104
+ templateId: amuletRules.template_id,
105
+ contractId: amuletRules.contract_id,
106
+ createdEventBlob: amuletRules.created_event_blob,
107
+ synchronizerId
108
+ }, {
109
+ templateId: activeRound.template_id,
110
+ contractId: activeRound.contract_id,
111
+ createdEventBlob: activeRound.created_event_blob,
112
+ synchronizerId
113
+ }];
114
+ const inputHoldings = await this.tokenStandard.getInputHoldingsCids(provider, inputUtxos);
115
+ const context = {
116
+ context: {
117
+ openMiningRound: activeRound.contract_id,
118
+ issuingMiningRounds: [],
119
+ validatorRights: [],
120
+ featuredAppRight: null
121
+ },
122
+ amuletRules: amuletRules.contract_id
123
+ };
124
+ const effectiveNewExpiresAt = newExpiresAt ?? new Date(Date.now() + 7776e6);
125
+ return [{
126
+ templateId,
127
+ contractId,
128
+ choice: "TransferPreapproval_Renew",
129
+ choiceArgument: {
130
+ context,
131
+ inputs: inputHoldings.map((cid) => ({
132
+ tag: "InputAmulet",
133
+ value: cid
134
+ })),
135
+ newExpiresAt: effectiveNewExpiresAt.toISOString()
136
+ }
137
+ }, disclosed];
138
+ }
139
+ async createTap(receiver, amount, instrumentAdmin, instrumentId, registryUrl) {
140
+ const tomorrow = /* @__PURE__ */ new Date(/* @__PURE__ */ new Date());
141
+ tomorrow.setDate(tomorrow.getDate() + 1);
142
+ const choiceArgs = {
143
+ expectedAdmin: instrumentAdmin,
144
+ transfer: {
145
+ sender: instrumentAdmin,
146
+ receiver,
147
+ amount,
148
+ instrumentId: {
149
+ admin: instrumentAdmin,
150
+ id: instrumentId
151
+ },
152
+ lock: null,
153
+ requestedAt: (/* @__PURE__ */ new Date(Date.now() - REQUESTED_AT_SKEW_MS)).toISOString(),
154
+ executeBefore: tomorrow.toISOString(),
155
+ inputHoldingCids: [],
156
+ meta: { values: {} }
157
+ },
158
+ extraArgs: {
159
+ context: { values: {} },
160
+ meta: { values: {} }
161
+ }
162
+ };
163
+ const disclosedContracts = (await this.tokenStandard.transfer.fetchTransferFactoryChoiceContext(registryUrl, choiceArgs)).choiceContext.disclosedContracts;
164
+ const amuletRules = await this.getAmuletRules();
165
+ if (!amuletRules) throw new Error("AmuletRules contract not found");
166
+ const latestOpenMiningRound = await this.getActiveOpenMiningRound();
167
+ if (!latestOpenMiningRound) throw new Error("OpenMiningRound active at current moment not found");
168
+ return [{
169
+ templateId: amuletRules.template_id,
170
+ contractId: amuletRules.contract_id,
171
+ choice: "AmuletRules_DevNet_Tap",
172
+ choiceArgument: {
173
+ receiver,
174
+ amount,
175
+ openRound: latestOpenMiningRound.contract_id
176
+ }
177
+ }, disclosedContracts];
178
+ }
210
179
  };
211
-
212
- // src/amulet-service-scan.ts
180
+ //#endregion
181
+ //#region src/amulet-service-scan.ts
213
182
  var AmuletServiceScanOnly = class extends AmuletServiceBase {
214
- constructor(tokenStandard, scanClient) {
215
- super(tokenStandard);
216
- this.tokenStandard = tokenStandard;
217
- this.scanClient = scanClient;
218
- }
219
- async getAmuletRules() {
220
- const amuletRules = await this.scanClient.getAmuletRules();
221
- if (!amuletRules) {
222
- throw new Error("AmuletRules contract not found");
223
- }
224
- return amuletRules;
225
- }
226
- async getActiveOpenMiningRound() {
227
- return await this.scanClient.getActiveOpenMiningRound();
228
- }
229
- async isDevNet() {
230
- return await this.scanClient.isDevNet();
231
- }
232
- async getTransferPreApprovalByParty(partyId) {
233
- const { transfer_preapproval } = await this.scanClient.get(
234
- "/v0/transfer-preapprovals/by-party/{party}",
235
- {
236
- path: {
237
- party: partyId
238
- }
239
- }
240
- );
241
- return transfer_preapproval;
242
- }
243
- async getFeaturedAppsByParty(partyId) {
244
- const { featured_app_right } = await this.scanClient.get(
245
- "/v0/featured-apps/{provider_party_id}",
246
- {
247
- path: {
248
- provider_party_id: partyId
249
- }
250
- }
251
- );
252
- return featured_app_right;
253
- }
254
- async getMemberTrafficStatus(domainId, memberId) {
255
- return this.scanClient.get(
256
- "/v0/domains/{domain_id}/members/{member_id}/traffic-status",
257
- {
258
- path: {
259
- domain_id: domainId,
260
- member_id: this.tokenStandard.core.toQualifiedMemberId(memberId)
261
- }
262
- }
263
- );
264
- }
183
+ constructor(tokenStandard, scanClient) {
184
+ super(tokenStandard);
185
+ this.tokenStandard = tokenStandard;
186
+ this.scanClient = scanClient;
187
+ }
188
+ async getAmuletRules() {
189
+ const amuletRules = await this.scanClient.getAmuletRules();
190
+ if (!amuletRules) throw new Error("AmuletRules contract not found");
191
+ return amuletRules;
192
+ }
193
+ async getActiveOpenMiningRound() {
194
+ return await this.scanClient.getActiveOpenMiningRound();
195
+ }
196
+ async isDevNet() {
197
+ return await this.scanClient.isDevNet();
198
+ }
199
+ async getTransferPreApprovalByParty(partyId) {
200
+ const { transfer_preapproval } = await this.scanClient.get("/v0/transfer-preapprovals/by-party/{party}", { path: { party: partyId } });
201
+ return transfer_preapproval;
202
+ }
203
+ async getFeaturedAppsByParty(partyId) {
204
+ const { featured_app_right } = await this.scanClient.get("/v0/featured-apps/{provider_party_id}", { path: { provider_party_id: partyId } });
205
+ return featured_app_right;
206
+ }
207
+ async getMemberTrafficStatus(domainId, memberId) {
208
+ return this.scanClient.get("/v0/domains/{domain_id}/members/{member_id}/traffic-status", { path: {
209
+ domain_id: domainId,
210
+ member_id: this.tokenStandard.core.toQualifiedMemberId(memberId)
211
+ } });
212
+ }
265
213
  };
266
-
267
- // src/amulet-service-scan-proxy.ts
214
+ //#endregion
215
+ //#region src/amulet-service-scan-proxy.ts
216
+ /** AmuletService extends TokenStandardService to provide features that are
217
+ * available for amulet but not in the token standard, such as:
218
+ *
219
+ * - Tapping
220
+ * - Transfer preapprovals
221
+ * - Featured apps
222
+ */
268
223
  var AmuletServiceScanProxy = class extends AmuletServiceBase {
269
- constructor(tokenStandard, scanProxyClient, scanClient) {
270
- super(tokenStandard);
271
- this.tokenStandard = tokenStandard;
272
- this.scanProxyClient = scanProxyClient;
273
- this.scanClient = scanClient;
274
- }
275
- getAmuletRules() {
276
- return this.scanProxyClient.getAmuletRules();
277
- }
278
- getActiveOpenMiningRound() {
279
- return this.scanProxyClient.getActiveOpenMiningRound();
280
- }
281
- async isDevNet() {
282
- return await this.scanProxyClient.isDevNet();
283
- }
284
- async getTransferPreApprovalByParty(partyId) {
285
- const { transfer_preapproval } = await this.scanProxyClient.get(
286
- "/v0/scan-proxy/transfer-preapprovals/by-party/{party}",
287
- {
288
- path: {
289
- party: partyId
290
- }
291
- }
292
- );
293
- return transfer_preapproval;
294
- }
295
- async getFeaturedAppsByParty(partyId) {
296
- const { featured_app_right } = await this.scanProxyClient.get(
297
- "/v0/scan-proxy/featured-apps/{provider_party_id}",
298
- {
299
- path: {
300
- provider_party_id: partyId
301
- }
302
- }
303
- );
304
- return featured_app_right;
305
- }
306
- async getMemberTrafficStatus(domainId, memberId) {
307
- if (!this.scanClient) {
308
- throw new Error("Scan API URL was not provided");
309
- }
310
- return this.scanClient.get(
311
- "/v0/domains/{domain_id}/members/{member_id}/traffic-status",
312
- {
313
- path: {
314
- domain_id: domainId,
315
- member_id: this.tokenStandard.core.toQualifiedMemberId(memberId)
316
- }
317
- }
318
- );
319
- }
224
+ constructor(tokenStandard, scanProxyClient, scanClient) {
225
+ super(tokenStandard);
226
+ this.tokenStandard = tokenStandard;
227
+ this.scanProxyClient = scanProxyClient;
228
+ this.scanClient = scanClient;
229
+ }
230
+ getAmuletRules() {
231
+ return this.scanProxyClient.getAmuletRules();
232
+ }
233
+ getActiveOpenMiningRound() {
234
+ return this.scanProxyClient.getActiveOpenMiningRound();
235
+ }
236
+ async isDevNet() {
237
+ return await this.scanProxyClient.isDevNet();
238
+ }
239
+ async getTransferPreApprovalByParty(partyId) {
240
+ const { transfer_preapproval } = await this.scanProxyClient.get("/v0/scan-proxy/transfer-preapprovals/by-party/{party}", { path: { party: partyId } });
241
+ return transfer_preapproval;
242
+ }
243
+ async getFeaturedAppsByParty(partyId) {
244
+ const { featured_app_right } = await this.scanProxyClient.get("/v0/scan-proxy/featured-apps/{provider_party_id}", { path: { provider_party_id: partyId } });
245
+ return featured_app_right;
246
+ }
247
+ async getMemberTrafficStatus(domainId, memberId) {
248
+ if (!this.scanClient) throw new Error("Scan API URL was not provided");
249
+ return this.scanClient.get("/v0/domains/{domain_id}/members/{member_id}/traffic-status", { path: {
250
+ domain_id: domainId,
251
+ member_id: this.tokenStandard.core.toQualifiedMemberId(memberId)
252
+ } });
253
+ }
320
254
  };
321
-
322
- // src/amulet-service.ts
255
+ //#endregion
256
+ //#region \0@oxc-project+runtime@0.142.0/helpers/esm/typeof.js
257
+ function _typeof(o) {
258
+ "@babel/helpers - typeof";
259
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
260
+ return typeof o;
261
+ } : function(o) {
262
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
263
+ }, _typeof(o);
264
+ }
265
+ //#endregion
266
+ //#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPrimitive.js
267
+ function toPrimitive(t, r) {
268
+ if ("object" != _typeof(t) || !t) return t;
269
+ var e = t[Symbol.toPrimitive];
270
+ if (void 0 !== e) {
271
+ var i = e.call(t, r || "default");
272
+ if ("object" != _typeof(i)) return i;
273
+ throw new TypeError("@@toPrimitive must return a primitive value.");
274
+ }
275
+ return ("string" === r ? String : Number)(t);
276
+ }
277
+ //#endregion
278
+ //#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPropertyKey.js
279
+ function toPropertyKey(t) {
280
+ var i = toPrimitive(t, "string");
281
+ return "symbol" == _typeof(i) ? i : i + "";
282
+ }
283
+ //#endregion
284
+ //#region \0@oxc-project+runtime@0.142.0/helpers/esm/defineProperty.js
285
+ function _defineProperty(e, r, t) {
286
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
287
+ value: t,
288
+ enumerable: !0,
289
+ configurable: !0,
290
+ writable: !0
291
+ }) : e[r] = t, e;
292
+ }
293
+ //#endregion
294
+ //#region src/amulet-service.ts
323
295
  var AmuletService = class {
324
- constructor(tokenStandard, arg1, arg2) {
325
- __publicField(this, "serviceImpl");
326
- this.serviceImpl = isScanClient(arg1) ? new AmuletServiceScanOnly(tokenStandard, arg1) : new AmuletServiceScanProxy(tokenStandard, arg1, arg2);
327
- }
328
- async buyMemberTraffic(...args) {
329
- return this.serviceImpl.buyMemberTraffic(...args);
330
- }
331
- async createTap(...args) {
332
- return this.serviceImpl.createTap(...args);
333
- }
334
- async cancelTransferPreapproval(...args) {
335
- return this.serviceImpl.cancelTransferPreapproval(...args);
336
- }
337
- async renewTransferPreapproval(...args) {
338
- return this.serviceImpl.renewTransferPreapproval(...args);
339
- }
340
- async getFeaturedAppsByParty(...args) {
341
- return this.serviceImpl.getFeaturedAppsByParty(...args);
342
- }
343
- async getTransferPreApprovalByParty(...args) {
344
- return this.serviceImpl.getTransferPreApprovalByParty(...args);
345
- }
346
- async selfGrantFeatureAppRight(...args) {
347
- return this.serviceImpl.selfGrantFeatureAppRight(...args);
348
- }
349
- async isDevNet(...args) {
350
- return this.serviceImpl.isDevNet(...args);
351
- }
352
- async getMemberTrafficStatus(...args) {
353
- return this.serviceImpl.getMemberTrafficStatus(...args);
354
- }
296
+ constructor(tokenStandard, arg1, arg2) {
297
+ _defineProperty(this, "serviceImpl", void 0);
298
+ this.serviceImpl = isScanClient(arg1) ? new AmuletServiceScanOnly(tokenStandard, arg1) : new AmuletServiceScanProxy(tokenStandard, arg1, arg2);
299
+ }
300
+ async buyMemberTraffic(...args) {
301
+ return this.serviceImpl.buyMemberTraffic(...args);
302
+ }
303
+ async createTap(...args) {
304
+ return this.serviceImpl.createTap(...args);
305
+ }
306
+ async cancelTransferPreapproval(...args) {
307
+ return this.serviceImpl.cancelTransferPreapproval(...args);
308
+ }
309
+ async renewTransferPreapproval(...args) {
310
+ return this.serviceImpl.renewTransferPreapproval(...args);
311
+ }
312
+ async getFeaturedAppsByParty(...args) {
313
+ return this.serviceImpl.getFeaturedAppsByParty(...args);
314
+ }
315
+ async getTransferPreApprovalByParty(...args) {
316
+ return this.serviceImpl.getTransferPreApprovalByParty(...args);
317
+ }
318
+ async selfGrantFeatureAppRight(...args) {
319
+ return this.serviceImpl.selfGrantFeatureAppRight(...args);
320
+ }
321
+ async isDevNet(...args) {
322
+ return this.serviceImpl.isDevNet(...args);
323
+ }
324
+ async getMemberTrafficStatus(...args) {
325
+ return this.serviceImpl.getMemberTrafficStatus(...args);
326
+ }
355
327
  };
356
328
  function isScanClient(x) {
357
- return x instanceof coreSpliceClient.ScanClient;
329
+ return x instanceof _canton_network_core_splice_client.ScanClient;
358
330
  }
359
-
331
+ //#endregion
360
332
  exports.AmuletService = AmuletService;
361
- //# sourceMappingURL=index.cjs.map
333
+
362
334
  //# sourceMappingURL=index.cjs.map