@bigmaxwatermelon/sdk 0.4.1 → 0.4.2

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/cli.js CHANGED
@@ -11,7 +11,7 @@ var __export = (target, all) => {
11
11
 
12
12
  // src/sdk/rpc/wallet.ts
13
13
  import { ethers } from "ethers";
14
- function createWallet(rpcUrl, privateKey) {
14
+ function createWallet2(rpcUrl, privateKey) {
15
15
  if (privateKey) return new PrivateKeyWallet(rpcUrl, privateKey);
16
16
  return new ReadOnlyWallet(rpcUrl);
17
17
  }
@@ -3721,7 +3721,7 @@ var init_StableCoinBeacon = __esm({
3721
3721
  // src/sdk/rpc/contracts.ts
3722
3722
  var contracts_exports = {};
3723
3723
  __export(contracts_exports, {
3724
- getContracts: () => getContracts,
3724
+ getContracts: () => getContracts2,
3725
3725
  getPlatform: () => getPlatform,
3726
3726
  getStableCoin: () => getStableCoin
3727
3727
  });
@@ -3729,7 +3729,7 @@ import { Contract } from "ethers";
3729
3729
  function abiOf(artifact) {
3730
3730
  return artifact.abi;
3731
3731
  }
3732
- function getContracts(addresses, runner) {
3732
+ function getContracts2(addresses, runner) {
3733
3733
  if (!addresses.platform) throw new Error("ISOMETRY_PLATFORM_ADDRESS is required");
3734
3734
  if (!addresses.factory) throw new Error("ISOMETRY_FACTORY_ADDRESS is required");
3735
3735
  if (!addresses.beacon) throw new Error("ISOMETRY_BEACON_ADDRESS is required");
@@ -3766,7 +3766,7 @@ var init_platform = __esm({
3766
3766
  contracts;
3767
3767
  platform;
3768
3768
  constructor(addresses, runner) {
3769
- this.contracts = getContracts(addresses, runner);
3769
+ this.contracts = getContracts2(addresses, runner);
3770
3770
  this.platform = this.contracts.platform;
3771
3771
  }
3772
3772
  async getPlatformInfo() {
@@ -3825,11 +3825,11 @@ var init_factory = __esm({
3825
3825
  this.runner = runner;
3826
3826
  }
3827
3827
  async getBeaconAddress() {
3828
- const { factory } = getContracts(this.addresses, this.runner);
3828
+ const { factory } = getContracts2(this.addresses, this.runner);
3829
3829
  return factory.beacon();
3830
3830
  }
3831
3831
  async getPlatformAddress() {
3832
- const { factory } = getContracts(this.addresses, this.runner);
3832
+ const { factory } = getContracts2(this.addresses, this.runner);
3833
3833
  return factory.platform();
3834
3834
  }
3835
3835
  };
@@ -3915,275 +3915,17 @@ var init_stablecoin = __esm({
3915
3915
  });
3916
3916
 
3917
3917
  // src/sdk/rpc/errorMap.ts
3918
- function decodeError(details) {
3919
- if (details.data && details.data !== "0x") {
3920
- const selector = details.data.slice(0, 10).toLowerCase();
3921
- const mapped = ERROR_SELECTOR_MAP[selector];
3922
- if (mapped) return mapped;
3923
- }
3924
- if (details.reason) {
3925
- const reason = details.reason;
3926
- if (reason === "Not authorized" || reason === "Not approved issuer") {
3927
- return { code: "ACCESS_DENIED", message: reason };
3928
- }
3929
- return { code: "REVERT", message: reason };
3930
- }
3931
- if (details.revert?.args) {
3932
- const name = details.revert.name ?? details.revert.signature ?? "";
3933
- if (name.includes("AccessControl")) {
3934
- const [account, role] = details.revert.args;
3935
- return {
3936
- code: "ACCESS_DENIED",
3937
- message: `AccessControl: account ${account} missing role ${role}`
3938
- };
3939
- }
3940
- }
3941
- return null;
3942
- }
3943
- var ERROR_SELECTOR_MAP;
3944
3918
  var init_errorMap = __esm({
3945
3919
  "src/sdk/rpc/errorMap.ts"() {
3946
3920
  "use strict";
3947
- ERROR_SELECTOR_MAP = {
3948
- // OpenZeppelin AccessControlUnauthorizedAccount(address account, bytes32 role)
3949
- // keccak256("AccessControlUnauthorizedAccount(address,bytes32)") = 0x761f22a3
3950
- // ethers v6 surfaces this as 0xe2517d3f in CALL_EXCEPTION details
3951
- "0xe2517d3f": {
3952
- code: "ACCESS_DENIED",
3953
- message: "AccessControl: missing required role"
3954
- },
3955
- "0x761f22a3": {
3956
- code: "ACCESS_DENIED",
3957
- message: "AccessControl: missing required role"
3958
- },
3959
- // OpenZeppelin AccessControl: account is missing role
3960
- "0x4e6f6c52": {
3961
- code: "ACCESS_DENIED",
3962
- message: "AccessControl: account is missing role"
3963
- },
3964
- // ERC20: insufficient balance
3965
- "0x13be252b": {
3966
- code: "INSUFFICIENT_BALANCE",
3967
- message: "ERC20: transfer amount exceeds balance"
3968
- },
3969
- // ERC20: insufficient allowance
3970
- "0xf4d708f0": {
3971
- code: "INSUFFICIENT_ALLOWANCE",
3972
- message: "ERC20: insufficient allowance"
3973
- },
3974
- // Pausable: paused
3975
- "0x8d1c0a00": {
3976
- code: "PAUSED",
3977
- message: "Pausable: paused"
3978
- },
3979
- // ERC20: invalid sender
3980
- "0xdf24fd05": {
3981
- code: "INVALID_SENDER",
3982
- message: "ERC20: invalid sender"
3983
- },
3984
- // ERC20: blacklisted
3985
- "0x12d1b5d1": {
3986
- code: "BLACKLISTED",
3987
- message: "ERC20: sender is blacklisted"
3988
- },
3989
- // Isometry platform / factory custom errors (observed)
3990
- "0x1e55aece": {
3991
- code: "NOT_APPROVED_ISSUER",
3992
- message: "Not an approved issuer"
3993
- },
3994
- "0xf2d4620b": {
3995
- code: "FACTORY_SYMBOL_EXISTS",
3996
- message: "Factory: symbol already exists"
3997
- },
3998
- "0x3b800a46": {
3999
- code: "ZERO_ADDRESS",
4000
- message: "Address cannot be zero"
4001
- }
4002
- };
4003
3921
  }
4004
3922
  });
4005
3923
 
4006
3924
  // src/sdk/rpc/writeExecutor.ts
4007
- function makeWriteMeta(command) {
4008
- return {
4009
- chainId: 11155111,
4010
- source: "rpc",
4011
- timestamp: Math.floor(Date.now() / 1e3),
4012
- ...command ? { command } : {}
4013
- };
4014
- }
4015
- function formatWriteResult(result, opts, meta) {
4016
- if (opts.json) {
4017
- const out = { ok: result.ok };
4018
- if (result.ok) {
4019
- if (opts.simulate) {
4020
- const r2 = result;
4021
- Object.assign(out, { estimatedGas: r2.estimatedGas, functionFragment: r2.functionFragment, params: r2.params });
4022
- } else {
4023
- const r2 = result;
4024
- Object.assign(out, { receipt: r2.receipt });
4025
- }
4026
- } else {
4027
- const r2 = result;
4028
- Object.assign(out, { code: r2.code, message: r2.message });
4029
- if (r2.selector) Object.assign(out, { selector: r2.selector });
4030
- }
4031
- if (meta) Object.assign(out, { meta });
4032
- return JSON.stringify(
4033
- out,
4034
- (_key, value) => typeof value === "bigint" ? value.toString() : value,
4035
- 2
4036
- );
4037
- }
4038
- if (!result.ok) {
4039
- return `\u274C [${result.code}] ${result.message}`;
4040
- }
4041
- if (opts.simulate) {
4042
- const sim = result;
4043
- return `\u2705 Simulation passed
4044
- Estimated gas: ${sim.estimatedGas.toLocaleString()}`;
4045
- }
4046
- const exec = result;
4047
- const r = exec.receipt;
4048
- const ok = r.status === 1;
4049
- return [
4050
- `${ok ? "\u2705" : "\u274C"} Transaction ${ok ? "confirmed" : "FAILED"}`,
4051
- ` Tx Hash ${r.txHash}`,
4052
- ` Block ${r.blockNumber ?? "pending"}`,
4053
- ` From ${r.from}`,
4054
- ` To ${r.to ?? "N/A"}`,
4055
- ` Gas Used ${r.gasUsed.toLocaleString()}`,
4056
- ` Status ${ok ? "success" : "reverted"}`
4057
- ].join("\n");
4058
- }
4059
- var WriteExecutor;
4060
3925
  var init_writeExecutor = __esm({
4061
3926
  "src/sdk/rpc/writeExecutor.ts"() {
4062
3927
  "use strict";
4063
3928
  init_errorMap();
4064
- WriteExecutor = class {
4065
- constructor(config2) {
4066
- this.config = config2;
4067
- }
4068
- config;
4069
- /** Dry-run: estimate gas without signing. Returns gas estimate or decoded error. */
4070
- async simulate(call) {
4071
- if (this.config.wallet.mode === "readonly") {
4072
- return {
4073
- ok: false,
4074
- code: "NO_SIGNER",
4075
- message: `Cannot simulate: wallet is read-only. Set ISOMETRY_PRIVATE_KEY to enable write operations.`
4076
- };
4077
- }
4078
- try {
4079
- const fn = this.config.contract.getFunction(call.method);
4080
- const gasEstimate = await fn.estimateGas(...call.args, call.overrides ?? {});
4081
- const params = {};
4082
- fn.fragment.inputs.forEach((input, i) => {
4083
- params[input.name || `arg${i}`] = call.args[i];
4084
- });
4085
- return {
4086
- ok: true,
4087
- estimatedGas: gasEstimate,
4088
- functionFragment: `${call.method}(${fn.fragment.inputs.map((i) => i.type).join(",")})`,
4089
- params
4090
- };
4091
- } catch (err) {
4092
- const decoded = this.parseRevertError(err);
4093
- return {
4094
- ok: false,
4095
- code: "SIMULATION_FAILED",
4096
- message: `[simulate] ${decoded.message}`,
4097
- details: err,
4098
- ...decoded.selector ? { selector: decoded.selector } : {}
4099
- };
4100
- }
4101
- }
4102
- /** Execute: sign and broadcast, wait for receipt. */
4103
- async execute(call, confirmations = 1) {
4104
- if (this.config.wallet.mode === "readonly") {
4105
- return {
4106
- ok: false,
4107
- code: "NO_SIGNER",
4108
- message: `Cannot execute: wallet is read-only. Set ISOMETRY_PRIVATE_KEY to enable write operations.`
4109
- };
4110
- }
4111
- if (!this.config.wallet.signer) {
4112
- return {
4113
- ok: false,
4114
- code: "NO_SIGNER",
4115
- message: "Wallet has no signer."
4116
- };
4117
- }
4118
- try {
4119
- const contract = this.config.contract.connect(this.config.wallet.signer);
4120
- const fn = contract.getFunction(call.method);
4121
- const tx = await fn.populateTransaction(...call.args, call.overrides ?? {});
4122
- const signedTx = await this.config.wallet.signer.sendTransaction(tx);
4123
- const _receipt = await signedTx.wait(confirmations);
4124
- if (!_receipt) {
4125
- return { ok: false, code: "RPC_ERROR", message: "Transaction receipt is null" };
4126
- }
4127
- return {
4128
- ok: true,
4129
- receipt: {
4130
- txHash: _receipt.hash,
4131
- blockNumber: _receipt.blockNumber,
4132
- blockHash: _receipt.blockHash ?? null,
4133
- status: _receipt.status ?? null,
4134
- gasUsed: _receipt.gasUsed,
4135
- effectiveGasPrice: _receipt.effectiveGasPrice ?? 0n,
4136
- from: _receipt.from,
4137
- to: _receipt.to ?? null,
4138
- nonce: _receipt.nonce,
4139
- logs: _receipt.logs.map((log) => ({
4140
- address: log.address,
4141
- topics: [...log.topics],
4142
- data: log.data,
4143
- blockNumber: log.blockNumber
4144
- }))
4145
- }
4146
- };
4147
- } catch (err) {
4148
- const decoded = this.parseRevertError(err);
4149
- return {
4150
- ok: false,
4151
- code: decoded.code,
4152
- message: decoded.message,
4153
- details: err,
4154
- ...decoded.selector ? { selector: decoded.selector } : {}
4155
- };
4156
- }
4157
- }
4158
- /**
4159
- * Parse a revert error and extract { code, message, selector }.
4160
- * selector is always included for unknown errors so users can report it.
4161
- */
4162
- parseRevertError(err) {
4163
- let rawSelector;
4164
- if (err && typeof err === "object") {
4165
- const errObj = err;
4166
- const data = errObj.data;
4167
- if (data && data !== "0x" && data.length >= 10) {
4168
- rawSelector = data.slice(0, 10).toLowerCase();
4169
- }
4170
- }
4171
- if (err && typeof err === "object") {
4172
- const decoded = decodeError(err);
4173
- if (decoded) {
4174
- return { code: decoded.code, message: decoded.message, selector: rawSelector };
4175
- }
4176
- }
4177
- if (!(err instanceof Error)) {
4178
- return { code: "UNKNOWN", message: String(err), selector: rawSelector };
4179
- }
4180
- const msg = err.message;
4181
- if (msg.includes("insufficient funds")) return { code: "INSUFFICIENT_BALANCE", message: "insufficient funds for gas", selector: rawSelector };
4182
- if (msg.includes("nonce")) return { code: "RPC_ERROR", message: "nonce error (tx may already be mined)", selector: rawSelector };
4183
- if (msg.includes("read-only")) return { code: "NO_SIGNER", message: "wallet is read-only", selector: rawSelector };
4184
- return { code: "REVERT", message: msg.slice(0, 200), selector: rawSelector };
4185
- }
4186
- };
4187
3929
  }
4188
3930
  });
4189
3931
 
@@ -4929,10 +4671,10 @@ function resolveAddresses(env) {
4929
4671
  beacon: env.ISOMETRY_BEACON_ADDRESS ?? DEFAULT_ADDRESSES.beacon
4930
4672
  };
4931
4673
  }
4932
- function createClient(config2) {
4674
+ function createClient2(config2) {
4933
4675
  return new IsometryClient(config2);
4934
4676
  }
4935
- var DEFAULT_ADDRESSES, SDK_VERSION, IsometryClient;
4677
+ var DEFAULT_ADDRESSES, SDK_VERSION2, IsometryClient;
4936
4678
  var init_client2 = __esm({
4937
4679
  "src/sdk/client.ts"() {
4938
4680
  "use strict";
@@ -4947,7 +4689,7 @@ var init_client2 = __esm({
4947
4689
  factory: "0x73D6BC64f4f54F9dF05851216F70F42135d56864",
4948
4690
  beacon: "0x99d6512B5483DFA003F73F737f87e7DAE9482F89"
4949
4691
  };
4950
- SDK_VERSION = "0.4.0";
4692
+ SDK_VERSION2 = "0.4.2";
4951
4693
  IsometryClient = class {
4952
4694
  rpc;
4953
4695
  graph;
@@ -4956,11 +4698,11 @@ var init_client2 = __esm({
4956
4698
  _addresses;
4957
4699
  _chainId;
4958
4700
  constructor(config2 = {}) {
4959
- const rpcUrl = config2.rpcUrl ?? process.env.ISOMETRY_RPC_URL ?? "";
4701
+ const rpcUrl = config2.rpcUrl ?? process.env.ISOMETRY_RPC_URL ?? "https://ethereum-sepolia.publicnode.com";
4960
4702
  const graphUrl = config2.graphUrl ?? process.env.ISOMETRY_GRAPH_URL ?? "https://console.isometry.network/graph/subgraphs/name/isometry";
4961
4703
  const privateKey = config2.privateKey ?? process.env.ISOMETRY_PRIVATE_KEY;
4962
4704
  this._chainId = config2.chainId ?? parseInt(process.env.ISOMETRY_CHAIN_ID ?? "11155111");
4963
- this._wallet = createWallet(rpcUrl, privateKey);
4705
+ this._wallet = createWallet2(rpcUrl, privateKey);
4964
4706
  this._addresses = config2.addresses ?? resolveAddresses(process.env);
4965
4707
  this.config = {
4966
4708
  chainId: this._chainId,
@@ -5014,13 +4756,13 @@ __export(sdk_exports, {
5014
4756
  PlatformRpcService: () => PlatformRpcService,
5015
4757
  PrivateKeyWallet: () => PrivateKeyWallet,
5016
4758
  ReadOnlyWallet: () => ReadOnlyWallet,
5017
- SDK_VERSION: () => SDK_VERSION,
4759
+ SDK_VERSION: () => SDK_VERSION2,
5018
4760
  StableCoinRpcService: () => StableCoinRpcService,
5019
4761
  TokenHistoryService: () => TokenHistoryService,
5020
- createClient: () => createClient,
4762
+ createClient: () => createClient2,
5021
4763
  createGraphClient: () => createGraphClient,
5022
- createWallet: () => createWallet,
5023
- getContracts: () => getContracts,
4764
+ createWallet: () => createWallet2,
4765
+ getContracts: () => getContracts2,
5024
4766
  getStableCoin: () => getStableCoin
5025
4767
  });
5026
4768
  var init_sdk = __esm({
@@ -5035,26 +4777,14 @@ var init_sdk = __esm({
5035
4777
  }
5036
4778
  });
5037
4779
 
5038
- // src/env.ts
5039
- import { config } from "dotenv";
5040
- import { resolve, dirname } from "path";
5041
- import { fileURLToPath } from "url";
5042
- function loadEnv() {
5043
- config({ path: resolve(__dirname, "../.env") });
5044
- }
5045
- var __dirname;
5046
- var init_env = __esm({
5047
- "src/env.ts"() {
5048
- "use strict";
5049
- __dirname = dirname(fileURLToPath(import.meta.url));
5050
- }
5051
- });
5052
-
5053
4780
  // src/cli/commands/system.ts
5054
4781
  var system_exports = {};
5055
4782
  __export(system_exports, {
5056
4783
  registerSystem: () => registerSystem
5057
4784
  });
4785
+ function jsonReplacer(_key, value) {
4786
+ return typeof value === "bigint" ? value.toString() : value;
4787
+ }
5058
4788
  async function version(json) {
5059
4789
  const data = {
5060
4790
  cli: SDK_VERSION,
@@ -5062,7 +4792,7 @@ async function version(json) {
5062
4792
  graphUrl: process.env.ISOMETRY_GRAPH_URL ?? "https://console.isometry.network/graph/subgraphs/name/isometry"
5063
4793
  };
5064
4794
  if (json) {
5065
- console.log(JSON.stringify({ ok: true, data }, null, 2));
4795
+ console.log(JSON.stringify({ ok: true, data }, jsonReplacer, 2));
5066
4796
  } else {
5067
4797
  console.log(`isometry CLI v${SDK_VERSION}`);
5068
4798
  console.log(`SDK v${SDK_VERSION}`);
@@ -5082,7 +4812,7 @@ async function status(json) {
5082
4812
  }
5083
4813
  const data = { subgraph: meta ? "connected" : "unreachable", meta, metaError };
5084
4814
  if (json) {
5085
- console.log(JSON.stringify({ ok: true, data }, null, 2));
4815
+ console.log(JSON.stringify({ ok: true, data }, jsonReplacer, 2));
5086
4816
  } else {
5087
4817
  if (meta) {
5088
4818
  console.log(`Subgraph \u2705 connected`);
@@ -5101,159 +4831,6 @@ function registerSystem(parent) {
5101
4831
  var init_system = __esm({
5102
4832
  "src/cli/commands/system.ts"() {
5103
4833
  "use strict";
5104
- init_sdk();
5105
- init_env();
5106
- loadEnv();
5107
- }
5108
- });
5109
-
5110
- // src/cli/commands/platformWrite.ts
5111
- async function getPlatformExecutor() {
5112
- const client = createClient();
5113
- if (!client.config.privateKey) {
5114
- return {
5115
- error: "ISOMETRY_PRIVATE_KEY is not set \u2014 cannot sign transactions",
5116
- code: "NO_SIGNER"
5117
- };
5118
- }
5119
- const pk = client.config.privateKey;
5120
- if (!/^0x[0-9a-fA-F]{64}$/.test(pk)) {
5121
- return { error: "ISOMETRY_PRIVATE_KEY format invalid \u2014 must be 0x-prefixed 64-char hex", code: "INVALID_KEY" };
5122
- }
5123
- const wallet = createWallet(client.config.rpcUrl, pk);
5124
- if (!wallet.signer) {
5125
- return { error: "Wallet has no signer", code: "NO_SIGNER" };
5126
- }
5127
- const { getPlatform: getPlatform2 } = await Promise.resolve().then(() => (init_contracts(), contracts_exports));
5128
- const platform = getPlatform2(wallet.signer, client.config.addresses);
5129
- return new WriteExecutor({ wallet, contract: platform });
5130
- }
5131
- function outputError(code, message, json) {
5132
- if (json) {
5133
- console.log(JSON.stringify({ ok: false, code, message }, null, 2));
5134
- } else {
5135
- console.log(`\u274C [${code}] ${message}`);
5136
- }
5137
- }
5138
- async function addPlatformAdmin(account, opts) {
5139
- const result = await getPlatformExecutor();
5140
- if (typeof result === "object" && "error" in result) {
5141
- outputError(result.code, result.error, opts.json);
5142
- return;
5143
- }
5144
- const executor = result;
5145
- const memo = opts.memo || `Add platform admin via isometry CLI at ${(/* @__PURE__ */ new Date()).toISOString()}`;
5146
- const writeResult = opts.simulate ? await executor.simulate({ method: "addPlatformAdmin", args: [account, memo] }) : await executor.execute({ method: "addPlatformAdmin", args: [account, memo] });
5147
- console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5148
- }
5149
- async function removePlatformAdmin(account, opts) {
5150
- const result = await getPlatformExecutor();
5151
- if (typeof result === "object" && "error" in result) {
5152
- outputError(result.code, result.error, opts.json);
5153
- return;
5154
- }
5155
- const executor = result;
5156
- const memo = opts.memo || `Remove platform admin via isometry CLI at ${(/* @__PURE__ */ new Date()).toISOString()}`;
5157
- const writeResult = opts.simulate ? await executor.simulate({ method: "removePlatformAdmin", args: [account, memo] }) : await executor.execute({ method: "removePlatformAdmin", args: [account, memo] });
5158
- console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5159
- }
5160
- async function addApprovedIssuer(account, opts) {
5161
- const result = await getPlatformExecutor();
5162
- if (typeof result === "object" && "error" in result) {
5163
- outputError(result.code, result.error, opts.json);
5164
- return;
5165
- }
5166
- const executor = result;
5167
- const memo = opts.memo || `Add approved issuer via isometry CLI at ${(/* @__PURE__ */ new Date()).toISOString()}`;
5168
- const writeResult = opts.simulate ? await executor.simulate({ method: "addApprovedIssuer", args: [account, memo] }) : await executor.execute({ method: "addApprovedIssuer", args: [account, memo] });
5169
- console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5170
- }
5171
- async function removeApprovedIssuer(account, opts) {
5172
- const result = await getPlatformExecutor();
5173
- if (typeof result === "object" && "error" in result) {
5174
- outputError(result.code, result.error, opts.json);
5175
- return;
5176
- }
5177
- const executor = result;
5178
- const memo = opts.memo || `Remove approved issuer via isometry CLI at ${(/* @__PURE__ */ new Date()).toISOString()}`;
5179
- const writeResult = opts.simulate ? await executor.simulate({ method: "removeApprovedIssuer", args: [account, memo] }) : await executor.execute({ method: "removeApprovedIssuer", args: [account, memo] });
5180
- console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5181
- }
5182
- async function addAccessUser(account, opts) {
5183
- const result = await getPlatformExecutor();
5184
- if (typeof result === "object" && "error" in result) {
5185
- outputError(result.code, result.error, opts.json);
5186
- return;
5187
- }
5188
- const executor = result;
5189
- const memo = opts.memo || `Add access user via isometry CLI at ${(/* @__PURE__ */ new Date()).toISOString()}`;
5190
- const writeResult = opts.simulate ? await executor.simulate({ method: "addAccessUser", args: [account, memo] }) : await executor.execute({ method: "addAccessUser", args: [account, memo] });
5191
- console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5192
- }
5193
- async function removeAccessUser(account, opts) {
5194
- const result = await getPlatformExecutor();
5195
- if (typeof result === "object" && "error" in result) {
5196
- outputError(result.code, result.error, opts.json);
5197
- return;
5198
- }
5199
- const executor = result;
5200
- const memo = opts.memo || `Remove access user via isometry CLI at ${(/* @__PURE__ */ new Date()).toISOString()}`;
5201
- const writeResult = opts.simulate ? await executor.simulate({ method: "removeAccessUser", args: [account, memo] }) : await executor.execute({ method: "removeAccessUser", args: [account, memo] });
5202
- console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5203
- }
5204
- function registerPlatformWrite(platformCmd) {
5205
- const admin = platformCmd.command("admin").description("Platform admin management");
5206
- admin.command("add <account>").description("Add platform admin (requires PLATFORM_ADMIN_ROLE)").option("--simulate", "Simulate without signing").option("--json", "Output as JSON").option("--memo <text>", "Transaction memo", "").action(
5207
- (account, opts) => addPlatformAdmin(account, {
5208
- simulate: opts.simulate ?? false,
5209
- json: opts.json ?? false,
5210
- memo: opts.memo ?? ""
5211
- })
5212
- );
5213
- admin.command("remove <account>").description("Remove platform admin (requires PLATFORM_ADMIN_ROLE)").option("--simulate", "Simulate without signing").option("--json", "Output as JSON").option("--memo <text>", "Transaction memo", "").action(
5214
- (account, opts) => removePlatformAdmin(account, {
5215
- simulate: opts.simulate ?? false,
5216
- json: opts.json ?? false,
5217
- memo: opts.memo ?? ""
5218
- })
5219
- );
5220
- const issuer = platformCmd.command("issuer").description("Approved issuer management");
5221
- issuer.command("add <account>").description("Add approved issuer (requires PLATFORM_ADMIN_ROLE)").option("--simulate", "Simulate without signing").option("--json", "Output as JSON").option("--memo <text>", "Transaction memo", "").action(
5222
- (account, opts) => addApprovedIssuer(account, {
5223
- simulate: opts.simulate ?? false,
5224
- json: opts.json ?? false,
5225
- memo: opts.memo ?? ""
5226
- })
5227
- );
5228
- issuer.command("remove <account>").description("Remove approved issuer (requires PLATFORM_ADMIN_ROLE)").option("--simulate", "Simulate without signing").option("--json", "Output as JSON").option("--memo <text>", "Transaction memo", "").action(
5229
- (account, opts) => removeApprovedIssuer(account, {
5230
- simulate: opts.simulate ?? false,
5231
- json: opts.json ?? false,
5232
- memo: opts.memo ?? ""
5233
- })
5234
- );
5235
- const access = platformCmd.command("access").description("Access user management");
5236
- access.command("add <account>").description("Add access user (requires PLATFORM_ADMIN_ROLE)").option("--simulate", "Simulate without signing").option("--json", "Output as JSON").option("--memo <text>", "Transaction memo", "").action(
5237
- (account, opts) => addAccessUser(account, {
5238
- simulate: opts.simulate ?? false,
5239
- json: opts.json ?? false,
5240
- memo: opts.memo ?? ""
5241
- })
5242
- );
5243
- access.command("remove <account>").description("Remove access user (requires PLATFORM_ADMIN_ROLE)").option("--simulate", "Simulate without signing").option("--json", "Output as JSON").option("--memo <text>", "Transaction memo", "").action(
5244
- (account, opts) => removeAccessUser(account, {
5245
- simulate: opts.simulate ?? false,
5246
- json: opts.json ?? false,
5247
- memo: opts.memo ?? ""
5248
- })
5249
- );
5250
- }
5251
- var init_platformWrite = __esm({
5252
- "src/cli/commands/platformWrite.ts"() {
5253
- "use strict";
5254
- init_env();
5255
- init_sdk();
5256
- init_writeExecutor();
5257
4834
  loadEnv();
5258
4835
  }
5259
4836
  });
@@ -5263,6 +4840,9 @@ var platform_exports = {};
5263
4840
  __export(platform_exports, {
5264
4841
  registerPlatform: () => registerPlatform
5265
4842
  });
4843
+ function jsonReplacer2(_key, value) {
4844
+ return typeof value === "bigint" ? value.toString() : value;
4845
+ }
5266
4846
  async function info(json) {
5267
4847
  const client = createClient();
5268
4848
  const [platformInfo, graphAdmins, graphIssuers, graphAccessUsers] = await Promise.all([
@@ -5293,7 +4873,7 @@ async function info(json) {
5293
4873
  }))
5294
4874
  };
5295
4875
  if (json) {
5296
- console.log(JSON.stringify({ ok: true, data }, null, 2));
4876
+ console.log(JSON.stringify({ ok: true, data }, jsonReplacer2, 2));
5297
4877
  } else {
5298
4878
  console.log(`Platform Paused ${data.paused ? "YES \u274C" : "No \u2705"}`);
5299
4879
  console.log(`Token Count ${data.tokenCount}`);
@@ -5310,7 +4890,7 @@ async function tokens(json) {
5310
4890
  const client = createClient();
5311
4891
  const tokenAddrs = await client.rpc.platform.getAllTokens();
5312
4892
  if (json) {
5313
- console.log(JSON.stringify({ ok: true, data: { tokens: tokenAddrs } }, null, 2));
4893
+ console.log(JSON.stringify({ ok: true, data: { tokens: tokenAddrs } }, jsonReplacer2, 2));
5314
4894
  } else {
5315
4895
  console.log(`Registered tokens: ${tokenAddrs.length}`);
5316
4896
  tokenAddrs.forEach((a) => console.log(` ${a}`));
@@ -5325,14 +4905,29 @@ function registerPlatform(parent) {
5325
4905
  var init_platform2 = __esm({
5326
4906
  "src/cli/commands/platform.ts"() {
5327
4907
  "use strict";
5328
- init_env();
5329
- init_sdk();
5330
- init_platformWrite();
5331
4908
  loadEnv();
5332
4909
  }
5333
4910
  });
5334
4911
 
4912
+ // src/env.ts
4913
+ import { config } from "dotenv";
4914
+ import { resolve, dirname } from "path";
4915
+ import { fileURLToPath } from "url";
4916
+ function loadEnv2() {
4917
+ config({ path: resolve(__dirname, "../.env") });
4918
+ }
4919
+ var __dirname;
4920
+ var init_env = __esm({
4921
+ "src/env.ts"() {
4922
+ "use strict";
4923
+ __dirname = dirname(fileURLToPath(import.meta.url));
4924
+ }
4925
+ });
4926
+
5335
4927
  // src/cli/commands/tokenWrite.ts
4928
+ function jsonReplacer3(_key, value) {
4929
+ return typeof value === "bigint" ? value.toString() : value;
4930
+ }
5336
4931
  async function getTokenExecutor(tokenAddress) {
5337
4932
  if (!tokenAddress) {
5338
4933
  return { error: "Token address is required", code: "INVALID_ARGUMENT" };
@@ -5357,9 +4952,9 @@ async function getTokenExecutor(tokenAddress) {
5357
4952
  const executor = new WriteExecutor({ wallet, contract: tokenContract });
5358
4953
  return { executor };
5359
4954
  }
5360
- function outputError2(code, message, json) {
4955
+ function outputError(code, message, json) {
5361
4956
  if (json) {
5362
- console.log(JSON.stringify({ ok: false, code, message }, null, 2));
4957
+ console.log(JSON.stringify({ ok: false, code, message }, jsonReplacer3, 2));
5363
4958
  } else {
5364
4959
  console.log(`\u274C [${code}] ${message}`);
5365
4960
  }
@@ -5372,7 +4967,7 @@ async function tokenMint(tokenAddress, to, amount, opts) {
5372
4967
  const writeResult = opts.simulate ? await executor.simulate({ method: "mint", args: [to, BigInt(amount), memo] }) : await executor.execute({ method: "mint", args: [to, BigInt(amount), memo] });
5373
4968
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5374
4969
  } else {
5375
- outputError2(result.code, result.error, opts.json);
4970
+ outputError(result.code, result.error, opts.json);
5376
4971
  }
5377
4972
  }
5378
4973
  async function tokenBurn(tokenAddress, amount, opts) {
@@ -5383,7 +4978,7 @@ async function tokenBurn(tokenAddress, amount, opts) {
5383
4978
  const writeResult = opts.simulate ? await executor.simulate({ method: "burn", args: [BigInt(amount), memo] }) : await executor.execute({ method: "burn", args: [BigInt(amount), memo] });
5384
4979
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5385
4980
  } else {
5386
- outputError2(result.code, result.error, opts.json);
4981
+ outputError(result.code, result.error, opts.json);
5387
4982
  }
5388
4983
  }
5389
4984
  async function tokenPause(tokenAddress, opts) {
@@ -5394,7 +4989,7 @@ async function tokenPause(tokenAddress, opts) {
5394
4989
  const writeResult = opts.simulate ? await executor.simulate({ method: "pause", args: [memo] }) : await executor.execute({ method: "pause", args: [memo] });
5395
4990
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5396
4991
  } else {
5397
- outputError2(result.code, result.error, opts.json);
4992
+ outputError(result.code, result.error, opts.json);
5398
4993
  }
5399
4994
  }
5400
4995
  async function tokenUnpause(tokenAddress, opts) {
@@ -5405,7 +5000,7 @@ async function tokenUnpause(tokenAddress, opts) {
5405
5000
  const writeResult = opts.simulate ? await executor.simulate({ method: "unpause", args: [memo] }) : await executor.execute({ method: "unpause", args: [memo] });
5406
5001
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5407
5002
  } else {
5408
- outputError2(result.code, result.error, opts.json);
5003
+ outputError(result.code, result.error, opts.json);
5409
5004
  }
5410
5005
  }
5411
5006
  async function blacklistAdd(tokenAddress, user, opts) {
@@ -5416,7 +5011,7 @@ async function blacklistAdd(tokenAddress, user, opts) {
5416
5011
  const writeResult = opts.simulate ? await executor.simulate({ method: "blacklist", args: [user, memo] }) : await executor.execute({ method: "blacklist", args: [user, memo] });
5417
5012
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5418
5013
  } else {
5419
- outputError2(result.code, result.error, opts.json);
5014
+ outputError(result.code, result.error, opts.json);
5420
5015
  }
5421
5016
  }
5422
5017
  async function blacklistRemove(tokenAddress, user, opts) {
@@ -5427,7 +5022,7 @@ async function blacklistRemove(tokenAddress, user, opts) {
5427
5022
  const writeResult = opts.simulate ? await executor.simulate({ method: "unBlacklist", args: [user, memo] }) : await executor.execute({ method: "unBlacklist", args: [user, memo] });
5428
5023
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5429
5024
  } else {
5430
- outputError2(result.code, result.error, opts.json);
5025
+ outputError(result.code, result.error, opts.json);
5431
5026
  }
5432
5027
  }
5433
5028
  async function addBlacklistManager(tokenAddress, account, opts) {
@@ -5438,7 +5033,7 @@ async function addBlacklistManager(tokenAddress, account, opts) {
5438
5033
  const writeResult = opts.simulate ? await executor.simulate({ method: "addBlacklistManager", args: [account, memo] }) : await executor.execute({ method: "addBlacklistManager", args: [account, memo] });
5439
5034
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5440
5035
  } else {
5441
- outputError2(result.code, result.error, opts.json);
5036
+ outputError(result.code, result.error, opts.json);
5442
5037
  }
5443
5038
  }
5444
5039
  async function removeBlacklistManager(tokenAddress, account, opts) {
@@ -5449,7 +5044,7 @@ async function removeBlacklistManager(tokenAddress, account, opts) {
5449
5044
  const writeResult = opts.simulate ? await executor.simulate({ method: "removeBlacklistManager", args: [account, memo] }) : await executor.execute({ method: "removeBlacklistManager", args: [account, memo] });
5450
5045
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5451
5046
  } else {
5452
- outputError2(result.code, result.error, opts.json);
5047
+ outputError(result.code, result.error, opts.json);
5453
5048
  }
5454
5049
  }
5455
5050
  async function addMinter(tokenAddress, minter, allowance, opts) {
@@ -5460,7 +5055,7 @@ async function addMinter(tokenAddress, minter, allowance, opts) {
5460
5055
  const writeResult = opts.simulate ? await executor.simulate({ method: "addMinter", args: [minter, BigInt(allowance), memo] }) : await executor.execute({ method: "addMinter", args: [minter, BigInt(allowance), memo] });
5461
5056
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5462
5057
  } else {
5463
- outputError2(result.code, result.error, opts.json);
5058
+ outputError(result.code, result.error, opts.json);
5464
5059
  }
5465
5060
  }
5466
5061
  async function removeMinter(tokenAddress, minter, opts) {
@@ -5471,7 +5066,7 @@ async function removeMinter(tokenAddress, minter, opts) {
5471
5066
  const writeResult = opts.simulate ? await executor.simulate({ method: "removeMinter", args: [minter, memo] }) : await executor.execute({ method: "removeMinter", args: [minter, memo] });
5472
5067
  console.log(formatWriteResult(writeResult, { simulate: opts.simulate, json: opts.json }, makeWriteMeta()));
5473
5068
  } else {
5474
- outputError2(result.code, result.error, opts.json);
5069
+ outputError(result.code, result.error, opts.json);
5475
5070
  }
5476
5071
  }
5477
5072
  function registerTokenWrite(token) {
@@ -5552,9 +5147,6 @@ function registerTokenWrite(token) {
5552
5147
  var init_tokenWrite = __esm({
5553
5148
  "src/cli/commands/tokenWrite.ts"() {
5554
5149
  "use strict";
5555
- init_env();
5556
- init_sdk();
5557
- init_writeExecutor();
5558
5150
  loadEnv();
5559
5151
  }
5560
5152
  });
@@ -5567,8 +5159,11 @@ __export(token_exports, {
5567
5159
  function formatBigInt(v) {
5568
5160
  return v.toString();
5569
5161
  }
5162
+ function jsonReplacer4(_key, value) {
5163
+ return typeof value === "bigint" ? value.toString() : value;
5164
+ }
5570
5165
  async function tokenInfo(addr, json) {
5571
- const client = createClient();
5166
+ const client = createClient2();
5572
5167
  const [info2, stats] = await Promise.all([
5573
5168
  client.rpc.token.getTokenInfo(addr),
5574
5169
  client.rpc.token.getTokenStats(addr)
@@ -5588,7 +5183,7 @@ async function tokenInfo(addr, json) {
5588
5183
  blacklistCount: parseBigIntToNumber(stats.blacklistCount.toString())
5589
5184
  };
5590
5185
  if (json) {
5591
- console.log(JSON.stringify({ ok: true, data }, null, 2));
5186
+ console.log(JSON.stringify({ ok: true, data }, jsonReplacer4, 2));
5592
5187
  } else {
5593
5188
  console.log(`Address ${data.address}`);
5594
5189
  console.log(`Name ${data.name}`);
@@ -5604,7 +5199,7 @@ async function tokenInfo(addr, json) {
5604
5199
  }
5605
5200
  }
5606
5201
  async function tokenStats(addr, json) {
5607
- const client = createClient();
5202
+ const client = createClient2();
5608
5203
  const stats = await client.rpc.token.getTokenStats(addr);
5609
5204
  const net = BigInt(stats.totalMinted) - BigInt(stats.totalBurned);
5610
5205
  const data = {
@@ -5618,7 +5213,7 @@ async function tokenStats(addr, json) {
5618
5213
  blacklistCount: parseBigIntToNumber(stats.blacklistCount.toString())
5619
5214
  };
5620
5215
  if (json) {
5621
- console.log(JSON.stringify({ ok: true, data }, null, 2));
5216
+ console.log(JSON.stringify({ ok: true, data }, jsonReplacer4, 2));
5622
5217
  } else {
5623
5218
  console.log(`Address ${data.address}`);
5624
5219
  console.log(`Holders ${data.holdersTotal}`);
@@ -5631,7 +5226,7 @@ async function tokenStats(addr, json) {
5631
5226
  }
5632
5227
  }
5633
5228
  async function tokenRoles(addr, account, json) {
5634
- const client = createClient();
5229
+ const client = createClient2();
5635
5230
  const roles = await client.rpc.token.getUserRoles(addr, account);
5636
5231
  const data = {
5637
5232
  token: roles.address,
@@ -5643,7 +5238,7 @@ async function tokenRoles(addr, account, json) {
5643
5238
  isMasterStatus: roles.isMasterStatus
5644
5239
  };
5645
5240
  if (json) {
5646
- console.log(JSON.stringify({ ok: true, data }, null, 2));
5241
+ console.log(JSON.stringify({ ok: true, data }, jsonReplacer4, 2));
5647
5242
  } else {
5648
5243
  console.log(`Token ${data.token}`);
5649
5244
  console.log(`Account ${data.account}`);
@@ -5655,7 +5250,7 @@ async function tokenRoles(addr, account, json) {
5655
5250
  }
5656
5251
  }
5657
5252
  async function tokenHistory(addr, first, json) {
5658
- const client = createClient();
5253
+ const client = createClient2();
5659
5254
  const [mints, burns] = await Promise.all([
5660
5255
  client.graph.token.getMintHistory(addr, first, 0),
5661
5256
  client.graph.token.getBurnHistory(addr, first, 0)
@@ -5678,7 +5273,7 @@ async function tokenHistory(addr, first, json) {
5678
5273
  ];
5679
5274
  events.sort((a, b) => BigInt(a.block) > BigInt(b.block) ? -1 : 1);
5680
5275
  if (json) {
5681
- console.log(JSON.stringify({ ok: true, data: { events } }, null, 2));
5276
+ console.log(JSON.stringify({ ok: true, data: { events } }, jsonReplacer4, 2));
5682
5277
  } else {
5683
5278
  console.log(`Token ${addr}`);
5684
5279
  console.log(`Mint events ${mints.length} Burn events ${burns.length}`);
@@ -5688,10 +5283,10 @@ async function tokenHistory(addr, first, json) {
5688
5283
  }
5689
5284
  }
5690
5285
  async function tokenMintHistory(addr, first, json) {
5691
- const client = createClient();
5286
+ const client = createClient2();
5692
5287
  const events = await client.graph.token.getMintHistory(addr, first, 0);
5693
5288
  if (json) {
5694
- console.log(JSON.stringify({ ok: true, data: { events } }, null, 2));
5289
+ console.log(JSON.stringify({ ok: true, data: { events } }, jsonReplacer4, 2));
5695
5290
  } else {
5696
5291
  console.log(`Token ${addr} \u2014 Mint History (${events.length} events)`);
5697
5292
  events.slice(0, 10).forEach((e) => {
@@ -5700,10 +5295,10 @@ async function tokenMintHistory(addr, first, json) {
5700
5295
  }
5701
5296
  }
5702
5297
  async function tokenBurnHistory(addr, first, json) {
5703
- const client = createClient();
5298
+ const client = createClient2();
5704
5299
  const events = await client.graph.token.getBurnHistory(addr, first, 0);
5705
5300
  if (json) {
5706
- console.log(JSON.stringify({ ok: true, data: { events } }, null, 2));
5301
+ console.log(JSON.stringify({ ok: true, data: { events } }, jsonReplacer4, 2));
5707
5302
  } else {
5708
5303
  console.log(`Token ${addr} \u2014 Burn History (${events.length} events)`);
5709
5304
  events.slice(0, 10).forEach((e) => {
@@ -5712,7 +5307,7 @@ async function tokenBurnHistory(addr, first, json) {
5712
5307
  }
5713
5308
  }
5714
5309
  async function tokenPauseHistory(addr, first, json) {
5715
- const client = createClient();
5310
+ const client = createClient2();
5716
5311
  const [pauseEvts, pausedEvts, unpausedEvts] = await Promise.all([
5717
5312
  client.graph.token.getPauseHistory(addr, first, 0),
5718
5313
  client.graph.token.getPausedByOwnerHistory(addr, first, 0),
@@ -5756,7 +5351,7 @@ var init_token = __esm({
5756
5351
  init_sdk();
5757
5352
  init_analytics();
5758
5353
  init_tokenWrite();
5759
- loadEnv();
5354
+ loadEnv2();
5760
5355
  }
5761
5356
  });
5762
5357
 
@@ -5765,6 +5360,9 @@ var factory_exports = {};
5765
5360
  __export(factory_exports, {
5766
5361
  registerFactory: () => registerFactory
5767
5362
  });
5363
+ function jsonReplacer5(_key, value) {
5364
+ return typeof value === "bigint" ? value.toString() : value;
5365
+ }
5768
5366
  async function factoryInfo(json) {
5769
5367
  const client = createClient();
5770
5368
  const [beacon, platformAddr] = await Promise.all([
@@ -5778,7 +5376,7 @@ async function factoryInfo(json) {
5778
5376
  chainId: client.config.chainId
5779
5377
  };
5780
5378
  if (json) {
5781
- console.log(JSON.stringify({ ok: true, data }, null, 2));
5379
+ console.log(JSON.stringify({ ok: true, data }, jsonReplacer5, 2));
5782
5380
  } else {
5783
5381
  console.log(`Beacon ${data.beacon}`);
5784
5382
  console.log(`Platform ${data.platform}`);
@@ -5791,18 +5389,18 @@ async function factoryCreate(name, symbol, opts) {
5791
5389
  const client = createClient();
5792
5390
  if (!client.config.addresses.factory) {
5793
5391
  const msg = "ISOMETRY_FACTORY_ADDRESS is not configured";
5794
- console.log(opts.json ? JSON.stringify({ ok: false, code: "NOT_CONFIGURED", message: msg }, null, 2) : `\u274C ${msg}`);
5392
+ console.log(opts.json ? JSON.stringify({ ok: false, code: "NOT_CONFIGURED", message: msg }, jsonReplacer5, 2) : `\u274C ${msg}`);
5795
5393
  return;
5796
5394
  }
5797
5395
  if (!client.config.privateKey) {
5798
5396
  const msg = "ISOMETRY_PRIVATE_KEY is not set \u2014 cannot sign transactions";
5799
- console.log(opts.json ? JSON.stringify({ ok: false, code: "NO_SIGNER", message: msg }, null, 2) : `\u274C ${msg}`);
5397
+ console.log(opts.json ? JSON.stringify({ ok: false, code: "NO_SIGNER", message: msg }, jsonReplacer5, 2) : `\u274C ${msg}`);
5800
5398
  return;
5801
5399
  }
5802
5400
  const wallet = createWallet(client.config.rpcUrl, client.config.privateKey);
5803
5401
  if (!wallet.signer) {
5804
5402
  const msg = "Wallet has no signer \u2014 check ISOMETRY_PRIVATE_KEY";
5805
- console.log(opts.json ? JSON.stringify({ ok: false, code: "NO_SIGNER", message: msg }, null, 2) : `\u274C ${msg}`);
5403
+ console.log(opts.json ? JSON.stringify({ ok: false, code: "NO_SIGNER", message: msg }, jsonReplacer5, 2) : `\u274C ${msg}`);
5806
5404
  return;
5807
5405
  }
5808
5406
  const contracts = getContracts(client.config.addresses, wallet.signer);
@@ -5832,9 +5430,6 @@ function registerFactory(parent) {
5832
5430
  var init_factory2 = __esm({
5833
5431
  "src/cli/commands/factory.ts"() {
5834
5432
  "use strict";
5835
- init_env();
5836
- init_sdk();
5837
- init_writeExecutor();
5838
5433
  loadEnv();
5839
5434
  }
5840
5435
  });