@avail-project/ca-common 1.0.0-beta.7 → 1.0.0-dev.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.
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ensureBufferPolyfill = ensureBufferPolyfill;
4
+ const tslib_1 = require("tslib");
5
+ const bufferModule = tslib_1.__importStar(require("buffer"));
6
+ const buffer_1 = require("buffer");
7
+ const globalScope = globalThis;
8
+ let patched = false;
9
+ function collectBufferCtors() {
10
+ const candidates = new Set();
11
+ if (typeof buffer_1.Buffer === "function") {
12
+ candidates.add(buffer_1.Buffer);
13
+ }
14
+ const mod = bufferModule;
15
+ if (typeof mod?.Buffer === "function") {
16
+ candidates.add(mod.Buffer);
17
+ }
18
+ const defaultExport = mod?.default;
19
+ if (typeof defaultExport === "function") {
20
+ candidates.add(defaultExport);
21
+ }
22
+ else if (defaultExport &&
23
+ typeof defaultExport === "object" &&
24
+ typeof defaultExport.Buffer === "function") {
25
+ candidates.add(defaultExport.Buffer);
26
+ }
27
+ if (typeof globalScope.Buffer === "function") {
28
+ candidates.add(globalScope.Buffer);
29
+ }
30
+ return Array.from(candidates);
31
+ }
32
+ function assertOffset(buffer, offset) {
33
+ const numericOffset = Number(offset);
34
+ if (!Number.isFinite(numericOffset)) {
35
+ throw new TypeError("Offset must be a finite number");
36
+ }
37
+ const normalized = numericOffset >>> 0;
38
+ if (normalized !== numericOffset) {
39
+ throw new RangeError("Offset must be a non-negative integer");
40
+ }
41
+ if (normalized + 4 > buffer.length) {
42
+ throw new RangeError("Offset out of bounds");
43
+ }
44
+ return normalized;
45
+ }
46
+ function fallbackWriteUint32BE(value, offset = 0) {
47
+ const o = assertOffset(this, offset);
48
+ const normalized = Number(value) >>> 0;
49
+ this[o] = (normalized >>> 24) & 0xff;
50
+ this[o + 1] =
51
+ (normalized >>> 16) & 0xff;
52
+ this[o + 2] =
53
+ (normalized >>> 8) & 0xff;
54
+ this[o + 3] = normalized & 0xff;
55
+ return o + 4;
56
+ }
57
+ function fallbackWriteUint32LE(value, offset = 0) {
58
+ const o = assertOffset(this, offset);
59
+ const normalized = Number(value) >>> 0;
60
+ this[o] = normalized & 0xff;
61
+ this[o + 1] =
62
+ (normalized >>> 8) & 0xff;
63
+ this[o + 2] =
64
+ (normalized >>> 16) & 0xff;
65
+ this[o + 3] =
66
+ (normalized >>> 24) & 0xff;
67
+ return o + 4;
68
+ }
69
+ function fallbackReadUint32BE(offset = 0) {
70
+ const o = assertOffset(this, offset);
71
+ const store = this;
72
+ return ((store[o] * 0x1000000 +
73
+ ((store[o + 1] << 16) | (store[o + 2] << 8) | store[o + 3])) >>>
74
+ 0);
75
+ }
76
+ function fallbackReadUint32LE(offset = 0) {
77
+ const o = assertOffset(this, offset);
78
+ const store = this;
79
+ return ((store[o] |
80
+ (store[o + 1] << 8) |
81
+ (store[o + 2] << 16) |
82
+ (store[o + 3] * 0x1000000)) >>>
83
+ 0);
84
+ }
85
+ function aliasOrDefine(proto, alias, canonical, fallback) {
86
+ const aliasKey = alias;
87
+ const canonicalKey = canonical;
88
+ const existingAlias = proto[aliasKey];
89
+ if (typeof existingAlias === "function") {
90
+ return;
91
+ }
92
+ const canonicalFn = proto[canonicalKey];
93
+ if (typeof canonicalFn === "function") {
94
+ Object.defineProperty(proto, aliasKey, {
95
+ value: canonicalFn,
96
+ writable: true,
97
+ configurable: true,
98
+ });
99
+ return;
100
+ }
101
+ Object.defineProperty(proto, aliasKey, {
102
+ value: fallback,
103
+ writable: true,
104
+ configurable: true,
105
+ });
106
+ }
107
+ function patchPrototype(bufferCtor) {
108
+ const proto = bufferCtor.prototype;
109
+ if (!proto) {
110
+ return;
111
+ }
112
+ aliasOrDefine(proto, "writeUint32BE", "writeUInt32BE", fallbackWriteUint32BE);
113
+ aliasOrDefine(proto, "writeUint32LE", "writeUInt32LE", fallbackWriteUint32LE);
114
+ aliasOrDefine(proto, "readUint32BE", "readUInt32BE", fallbackReadUint32BE);
115
+ aliasOrDefine(proto, "readUint32LE", "readUInt32LE", fallbackReadUint32LE);
116
+ }
117
+ function ensureProcessEnv() {
118
+ if (!globalScope.process) {
119
+ globalScope.process = { env: { NODE_ENV: "production" } };
120
+ return;
121
+ }
122
+ const processValue = globalScope.process;
123
+ if (!processValue.env) {
124
+ processValue.env = { NODE_ENV: "production" };
125
+ return;
126
+ }
127
+ if (typeof processValue.env.NODE_ENV === "undefined") {
128
+ processValue.env.NODE_ENV = "production";
129
+ }
130
+ }
131
+ function ensureBufferPolyfill() {
132
+ if (patched) {
133
+ return;
134
+ }
135
+ const candidates = collectBufferCtors();
136
+ candidates.forEach(patchPrototype);
137
+ const preferred = candidates[0];
138
+ if (preferred &&
139
+ (typeof globalScope.Buffer !== "function" ||
140
+ typeof globalScope.Buffer.prototype?.writeUint32BE !==
141
+ "function")) {
142
+ globalScope.Buffer = preferred;
143
+ }
144
+ ensureProcessEnv();
145
+ patched = true;
146
+ }
147
+ ensureBufferPolyfill();
@@ -576,26 +576,6 @@ const RawData = [
576
576
  },
577
577
  ],
578
578
  },
579
- {
580
- Universe: 0,
581
- ChainID32: "0x0000000000000000000000000000000000000000000000000000000000000237",
582
- Currencies: [
583
- {
584
- CurrencyID: 1,
585
- TokenContractAddress: "0x0000000000000000000000008Cf5f629Bb26FC3F92144e72bC4A3719A7DF07F3",
586
- PermitVariant: permitutils_1.PermitVariant.EIP2612Canonical,
587
- TokenDecimals: 6,
588
- IsGasToken: false,
589
- },
590
- {
591
- CurrencyID: 64,
592
- TokenContractAddress: "0x0000000000000000000000000000000000000000000000000000000000000000",
593
- PermitVariant: permitutils_1.PermitVariant.Unsupported,
594
- TokenDecimals: 18,
595
- IsGasToken: true,
596
- },
597
- ],
598
- },
599
579
  ];
600
580
  class CurrencyMap {
601
581
  map = new Map();
@@ -693,10 +673,6 @@ exports.RPCURLMap = new chainid_1.ChainIDKeyedMap([
693
673
  new chainid_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 10143),
694
674
  "https://lb.drpc.org/monad-testnet/Am5nENoJmEuovqui8_LMxzp4ChJzW7kR8JfPrqRhf0fE",
695
675
  ],
696
- [
697
- new chainid_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 567),
698
- "https://testnet.l2.rpc.validium.network",
699
- ],
700
676
  [
701
677
  new chainid_1.OmniversalChainID(definition_1.Universe.FUEL, 9889),
702
678
  "https://omniscient-fittest-pallet.fuel-mainnet.quiknode.pro/3193ae52f2522af1a4357a482e475e019857f02b/v1/graphql",
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChainIDKeyedMap = exports.OmniversalChainID = void 0;
4
4
  exports.encodeChainID36 = encodeChainID36;
5
+ const _polyfill_1 = require("../_polyfill");
5
6
  const viem_1 = require("viem");
6
7
  const definition_1 = require("../proto/definition");
7
8
  const utils_1 = require("./utils");
9
+ (0, _polyfill_1.ensureBufferPolyfill)();
8
10
  function encodeChainID36(universe, chainID) {
9
11
  let chainIDB;
10
12
  if (Buffer.isBuffer(chainID) || chainID instanceof Uint8Array) {
@@ -14,7 +16,7 @@ function encodeChainID36(universe, chainID) {
14
16
  chainIDB = (0, viem_1.toBytes)(chainID);
15
17
  }
16
18
  const buf = Buffer.alloc(36);
17
- buf.writeUint32BE(universe);
19
+ buf.writeUInt32BE(universe);
18
20
  buf.set(chainIDB, 4 + (32 - chainIDB.length));
19
21
  return buf;
20
22
  }
@@ -49,7 +51,7 @@ class OmniversalChainID {
49
51
  }
50
52
  static fromChainID36(_input) {
51
53
  const input = (0, utils_1.convertToBufferIfNecessary)(_input);
52
- const univID = input.readUint32BE(0);
54
+ const univID = input.readUInt32BE(0);
53
55
  const rest = input.subarray(4);
54
56
  return new OmniversalChainID(univID, rest);
55
57
  }
@@ -17,8 +17,7 @@ var CurrencyID;
17
17
  CurrencyID[CurrencyID["KAIA"] = 17] = "KAIA";
18
18
  CurrencyID[CurrencyID["SOPH"] = 18] = "SOPH";
19
19
  CurrencyID[CurrencyID["TRX"] = 19] = "TRX";
20
- CurrencyID[CurrencyID["VLDM"] = 64] = "VLDM";
21
- CurrencyID[CurrencyID["MON"] = 65] = "MON";
20
+ CurrencyID[CurrencyID["MON"] = 20] = "MON";
22
21
  })(CurrencyID || (exports.CurrencyID = CurrencyID = {}));
23
22
  class Currency {
24
23
  currencyID;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ require("../_polyfill");
4
5
  tslib_1.__exportStar(require("./ArcanaVault"), exports);
5
6
  tslib_1.__exportStar(require("./ArcanaVaultFactory"), exports);
package/dist/cjs/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GrpcWebImpl = exports.GrpcWebError = exports.QueryClientImpl = exports.ArcanaVaultFactory = exports.ArcanaVault = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ require("./_polyfill");
5
6
  var fuelcontracts_1 = require("./fuelcontracts");
6
7
  Object.defineProperty(exports, "ArcanaVault", { enumerable: true, get: function () { return fuelcontracts_1.ArcanaVault; } });
7
8
  Object.defineProperty(exports, "ArcanaVaultFactory", { enumerable: true, get: function () { return fuelcontracts_1.ArcanaVaultFactory; } });
@@ -40,10 +40,6 @@ const dataSets = new Map([
40
40
  new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 10143),
41
41
  "0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
42
42
  ],
43
- [
44
- new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 567),
45
- "0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
46
- ],
47
43
  ],
48
44
  ],
49
45
  [
@@ -51,31 +47,31 @@ const dataSets = new Map([
51
47
  [
52
48
  [
53
49
  new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 137),
54
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
50
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
55
51
  ],
56
52
  [
57
53
  new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 10),
58
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
54
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
59
55
  ],
60
56
  [
61
57
  new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 42161),
62
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
58
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
63
59
  ],
64
60
  [
65
61
  new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 8453),
66
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
62
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
67
63
  ],
68
64
  [
69
65
  new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 534352),
70
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
66
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
71
67
  ],
72
68
  [
73
69
  new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 56),
74
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
70
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
75
71
  ],
76
72
  [
77
73
  new data_1.OmniversalChainID(definition_1.Universe.TRON, 728126428),
78
- "0x4ddDbe8D0D399B65E5898b6d2bC97Ae0683E8CB7",
74
+ "0x46de8c7e6f1da4dd851b62c20b78971f230fca5b",
79
75
  ],
80
76
  ],
81
77
  ],
@@ -0,0 +1,143 @@
1
+ import * as bufferModule from "buffer";
2
+ import { Buffer as DefaultBuffer } from "buffer";
3
+ const globalScope = globalThis;
4
+ let patched = false;
5
+ function collectBufferCtors() {
6
+ const candidates = new Set();
7
+ if (typeof DefaultBuffer === "function") {
8
+ candidates.add(DefaultBuffer);
9
+ }
10
+ const mod = bufferModule;
11
+ if (typeof mod?.Buffer === "function") {
12
+ candidates.add(mod.Buffer);
13
+ }
14
+ const defaultExport = mod?.default;
15
+ if (typeof defaultExport === "function") {
16
+ candidates.add(defaultExport);
17
+ }
18
+ else if (defaultExport &&
19
+ typeof defaultExport === "object" &&
20
+ typeof defaultExport.Buffer === "function") {
21
+ candidates.add(defaultExport.Buffer);
22
+ }
23
+ if (typeof globalScope.Buffer === "function") {
24
+ candidates.add(globalScope.Buffer);
25
+ }
26
+ return Array.from(candidates);
27
+ }
28
+ function assertOffset(buffer, offset) {
29
+ const numericOffset = Number(offset);
30
+ if (!Number.isFinite(numericOffset)) {
31
+ throw new TypeError("Offset must be a finite number");
32
+ }
33
+ const normalized = numericOffset >>> 0;
34
+ if (normalized !== numericOffset) {
35
+ throw new RangeError("Offset must be a non-negative integer");
36
+ }
37
+ if (normalized + 4 > buffer.length) {
38
+ throw new RangeError("Offset out of bounds");
39
+ }
40
+ return normalized;
41
+ }
42
+ function fallbackWriteUint32BE(value, offset = 0) {
43
+ const o = assertOffset(this, offset);
44
+ const normalized = Number(value) >>> 0;
45
+ this[o] = (normalized >>> 24) & 0xff;
46
+ this[o + 1] =
47
+ (normalized >>> 16) & 0xff;
48
+ this[o + 2] =
49
+ (normalized >>> 8) & 0xff;
50
+ this[o + 3] = normalized & 0xff;
51
+ return o + 4;
52
+ }
53
+ function fallbackWriteUint32LE(value, offset = 0) {
54
+ const o = assertOffset(this, offset);
55
+ const normalized = Number(value) >>> 0;
56
+ this[o] = normalized & 0xff;
57
+ this[o + 1] =
58
+ (normalized >>> 8) & 0xff;
59
+ this[o + 2] =
60
+ (normalized >>> 16) & 0xff;
61
+ this[o + 3] =
62
+ (normalized >>> 24) & 0xff;
63
+ return o + 4;
64
+ }
65
+ function fallbackReadUint32BE(offset = 0) {
66
+ const o = assertOffset(this, offset);
67
+ const store = this;
68
+ return ((store[o] * 0x1000000 +
69
+ ((store[o + 1] << 16) | (store[o + 2] << 8) | store[o + 3])) >>>
70
+ 0);
71
+ }
72
+ function fallbackReadUint32LE(offset = 0) {
73
+ const o = assertOffset(this, offset);
74
+ const store = this;
75
+ return ((store[o] |
76
+ (store[o + 1] << 8) |
77
+ (store[o + 2] << 16) |
78
+ (store[o + 3] * 0x1000000)) >>>
79
+ 0);
80
+ }
81
+ function aliasOrDefine(proto, alias, canonical, fallback) {
82
+ const aliasKey = alias;
83
+ const canonicalKey = canonical;
84
+ const existingAlias = proto[aliasKey];
85
+ if (typeof existingAlias === "function") {
86
+ return;
87
+ }
88
+ const canonicalFn = proto[canonicalKey];
89
+ if (typeof canonicalFn === "function") {
90
+ Object.defineProperty(proto, aliasKey, {
91
+ value: canonicalFn,
92
+ writable: true,
93
+ configurable: true,
94
+ });
95
+ return;
96
+ }
97
+ Object.defineProperty(proto, aliasKey, {
98
+ value: fallback,
99
+ writable: true,
100
+ configurable: true,
101
+ });
102
+ }
103
+ function patchPrototype(bufferCtor) {
104
+ const proto = bufferCtor.prototype;
105
+ if (!proto) {
106
+ return;
107
+ }
108
+ aliasOrDefine(proto, "writeUint32BE", "writeUInt32BE", fallbackWriteUint32BE);
109
+ aliasOrDefine(proto, "writeUint32LE", "writeUInt32LE", fallbackWriteUint32LE);
110
+ aliasOrDefine(proto, "readUint32BE", "readUInt32BE", fallbackReadUint32BE);
111
+ aliasOrDefine(proto, "readUint32LE", "readUInt32LE", fallbackReadUint32LE);
112
+ }
113
+ function ensureProcessEnv() {
114
+ if (!globalScope.process) {
115
+ globalScope.process = { env: { NODE_ENV: "production" } };
116
+ return;
117
+ }
118
+ const processValue = globalScope.process;
119
+ if (!processValue.env) {
120
+ processValue.env = { NODE_ENV: "production" };
121
+ return;
122
+ }
123
+ if (typeof processValue.env.NODE_ENV === "undefined") {
124
+ processValue.env.NODE_ENV = "production";
125
+ }
126
+ }
127
+ export function ensureBufferPolyfill() {
128
+ if (patched) {
129
+ return;
130
+ }
131
+ const candidates = collectBufferCtors();
132
+ candidates.forEach(patchPrototype);
133
+ const preferred = candidates[0];
134
+ if (preferred &&
135
+ (typeof globalScope.Buffer !== "function" ||
136
+ typeof globalScope.Buffer.prototype?.writeUint32BE !==
137
+ "function")) {
138
+ globalScope.Buffer = preferred;
139
+ }
140
+ ensureProcessEnv();
141
+ patched = true;
142
+ }
143
+ ensureBufferPolyfill();
@@ -573,26 +573,6 @@ const RawData = [
573
573
  },
574
574
  ],
575
575
  },
576
- {
577
- Universe: 0,
578
- ChainID32: "0x0000000000000000000000000000000000000000000000000000000000000237",
579
- Currencies: [
580
- {
581
- CurrencyID: 1,
582
- TokenContractAddress: "0x0000000000000000000000008Cf5f629Bb26FC3F92144e72bC4A3719A7DF07F3",
583
- PermitVariant: PermitVariant.EIP2612Canonical,
584
- TokenDecimals: 6,
585
- IsGasToken: false,
586
- },
587
- {
588
- CurrencyID: 64,
589
- TokenContractAddress: "0x0000000000000000000000000000000000000000000000000000000000000000",
590
- PermitVariant: PermitVariant.Unsupported,
591
- TokenDecimals: 18,
592
- IsGasToken: true,
593
- },
594
- ],
595
- },
596
576
  ];
597
577
  class CurrencyMap {
598
578
  map = new Map();
@@ -690,10 +670,6 @@ export const RPCURLMap = new ChainIDKeyedMap([
690
670
  new OmniversalChainID(Universe.ETHEREUM, 10143),
691
671
  "https://lb.drpc.org/monad-testnet/Am5nENoJmEuovqui8_LMxzp4ChJzW7kR8JfPrqRhf0fE",
692
672
  ],
693
- [
694
- new OmniversalChainID(Universe.ETHEREUM, 567),
695
- "https://testnet.l2.rpc.validium.network",
696
- ],
697
673
  [
698
674
  new OmniversalChainID(Universe.FUEL, 9889),
699
675
  "https://omniscient-fittest-pallet.fuel-mainnet.quiknode.pro/3193ae52f2522af1a4357a482e475e019857f02b/v1/graphql",
@@ -1,6 +1,8 @@
1
+ import { ensureBufferPolyfill } from "../_polyfill";
1
2
  import { bytesToBigInt, bytesToHex, hexToBigInt, hexToBytes, toBytes, toHex, } from "viem";
2
3
  import { universeFromJSON, universeToJSON, } from "../proto/definition";
3
4
  import { convertToBufferIfNecessary } from "./utils";
5
+ ensureBufferPolyfill();
4
6
  export function encodeChainID36(universe, chainID) {
5
7
  let chainIDB;
6
8
  if (Buffer.isBuffer(chainID) || chainID instanceof Uint8Array) {
@@ -10,7 +12,7 @@ export function encodeChainID36(universe, chainID) {
10
12
  chainIDB = toBytes(chainID);
11
13
  }
12
14
  const buf = Buffer.alloc(36);
13
- buf.writeUint32BE(universe);
15
+ buf.writeUInt32BE(universe);
14
16
  buf.set(chainIDB, 4 + (32 - chainIDB.length));
15
17
  return buf;
16
18
  }
@@ -45,7 +47,7 @@ export class OmniversalChainID {
45
47
  }
46
48
  static fromChainID36(_input) {
47
49
  const input = convertToBufferIfNecessary(_input);
48
- const univID = input.readUint32BE(0);
50
+ const univID = input.readUInt32BE(0);
49
51
  const rest = input.subarray(4);
50
52
  return new OmniversalChainID(univID, rest);
51
53
  }
@@ -13,8 +13,7 @@ export var CurrencyID;
13
13
  CurrencyID[CurrencyID["KAIA"] = 17] = "KAIA";
14
14
  CurrencyID[CurrencyID["SOPH"] = 18] = "SOPH";
15
15
  CurrencyID[CurrencyID["TRX"] = 19] = "TRX";
16
- CurrencyID[CurrencyID["VLDM"] = 64] = "VLDM";
17
- CurrencyID[CurrencyID["MON"] = 65] = "MON";
16
+ CurrencyID[CurrencyID["MON"] = 20] = "MON";
18
17
  })(CurrencyID || (CurrencyID = {}));
19
18
  export class Currency {
20
19
  currencyID;
@@ -1,2 +1,3 @@
1
+ import "../_polyfill";
1
2
  export * from './ArcanaVault';
2
3
  export * from './ArcanaVaultFactory';
package/dist/esm/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import "./_polyfill";
1
2
  export { ArcanaVault, ArcanaVaultFactory } from './fuelcontracts';
2
3
  export * from './proto/definition';
3
4
  export { QueryClientImpl, GrpcWebError, GrpcWebImpl } from './proto/grpc';
@@ -36,10 +36,6 @@ const dataSets = new Map([
36
36
  new OmniversalChainID(Universe.ETHEREUM, 10143),
37
37
  "0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
38
38
  ],
39
- [
40
- new OmniversalChainID(Universe.ETHEREUM, 567),
41
- "0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
42
- ],
43
39
  ],
44
40
  ],
45
41
  [
@@ -47,31 +43,31 @@ const dataSets = new Map([
47
43
  [
48
44
  [
49
45
  new OmniversalChainID(Universe.ETHEREUM, 137),
50
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
46
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
51
47
  ],
52
48
  [
53
49
  new OmniversalChainID(Universe.ETHEREUM, 10),
54
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
50
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
55
51
  ],
56
52
  [
57
53
  new OmniversalChainID(Universe.ETHEREUM, 42161),
58
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
54
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
59
55
  ],
60
56
  [
61
57
  new OmniversalChainID(Universe.ETHEREUM, 8453),
62
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
58
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
63
59
  ],
64
60
  [
65
61
  new OmniversalChainID(Universe.ETHEREUM, 534352),
66
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
62
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
67
63
  ],
68
64
  [
69
65
  new OmniversalChainID(Universe.ETHEREUM, 56),
70
- "0xB0BB1Ea8Eefb51BDA49631b09A350266e0F76EF3",
66
+ "0x111111eA4f8BdfB5AE22c37ebC3eE17b82072F57",
71
67
  ],
72
68
  [
73
69
  new OmniversalChainID(Universe.TRON, 728126428),
74
- "0x4ddDbe8D0D399B65E5898b6d2bC97Ae0683E8CB7",
70
+ "0x46de8c7e6f1da4dd851b62c20b78971f230fca5b",
75
71
  ],
76
72
  ],
77
73
  ],
@@ -0,0 +1 @@
1
+ export declare function ensureBufferPolyfill(): void;
@@ -13,8 +13,7 @@ export declare enum CurrencyID {
13
13
  KAIA = 17,
14
14
  SOPH = 18,
15
15
  TRX = 19,
16
- VLDM = 64,
17
- MON = 65
16
+ MON = 20
18
17
  }
19
18
  export declare class Currency {
20
19
  readonly currencyID: CurrencyID;
@@ -1,2 +1,3 @@
1
+ import "../_polyfill";
1
2
  export * from './ArcanaVault';
2
3
  export * from './ArcanaVaultFactory';
@@ -1,3 +1,4 @@
1
+ import "./_polyfill";
1
2
  export { ArcanaVault, ArcanaVaultFactory } from './fuelcontracts';
2
3
  export * from './proto/definition';
3
4
  export { QueryClientImpl, Query, GrpcWebError, GrpcWebImpl } from './proto/grpc';
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@avail-project/ca-common",
3
- "version": "1.0.0-beta.7",
3
+ "version": "1.0.0-dev.2",
4
4
  "description": "common utilities for CA",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
+ "sideEffects": [
9
+ "./src/_polyfill.ts",
10
+ "./dist/esm/_polyfill.js",
11
+ "./dist/cjs/_polyfill.js"
12
+ ],
8
13
  "exports": {
9
14
  ".": {
10
15
  "types": "./dist/types/index.d.ts",