@avail-project/ca-common 1.0.0-beta.6 → 1.0.0-dev.1
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/cjs/_polyfill.js +147 -0
- package/dist/cjs/data/chainid.js +4 -2
- package/dist/cjs/fuelcontracts/index.js +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/vaultcontracts/vaultcontracts.js +7 -11
- package/dist/esm/_polyfill.js +143 -0
- package/dist/esm/data/chainid.js +4 -2
- package/dist/esm/fuelcontracts/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/vaultcontracts/vaultcontracts.js +7 -11
- package/dist/types/_polyfill.d.ts +1 -0
- package/dist/types/fuelcontracts/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +8 -3
|
@@ -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();
|
package/dist/cjs/data/chainid.js
CHANGED
|
@@ -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.
|
|
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.
|
|
54
|
+
const univID = input.readUInt32BE(0);
|
|
53
55
|
const rest = input.subarray(4);
|
|
54
56
|
return new OmniversalChainID(univID, rest);
|
|
55
57
|
}
|
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; } });
|
|
@@ -18,31 +18,27 @@ const dataSets = new Map([
|
|
|
18
18
|
[
|
|
19
19
|
[
|
|
20
20
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 421614),
|
|
21
|
-
"
|
|
21
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
22
22
|
],
|
|
23
23
|
[
|
|
24
24
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 11155420),
|
|
25
|
-
"
|
|
25
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
26
26
|
],
|
|
27
27
|
[
|
|
28
28
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 80002),
|
|
29
|
-
"
|
|
29
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
30
30
|
],
|
|
31
31
|
[
|
|
32
32
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 84532),
|
|
33
|
-
"
|
|
33
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
34
34
|
],
|
|
35
35
|
[
|
|
36
36
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 11155111),
|
|
37
|
-
"
|
|
37
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
38
38
|
],
|
|
39
39
|
[
|
|
40
40
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 10143),
|
|
41
|
-
"
|
|
42
|
-
],
|
|
43
|
-
[
|
|
44
|
-
new data_1.OmniversalChainID(definition_1.Universe.TRON, 2494104990n),
|
|
45
|
-
"0x70f03baa2CD784447A4B133E41386562163209f8",
|
|
41
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
46
42
|
],
|
|
47
43
|
],
|
|
48
44
|
],
|
|
@@ -75,7 +71,7 @@ const dataSets = new Map([
|
|
|
75
71
|
],
|
|
76
72
|
[
|
|
77
73
|
new data_1.OmniversalChainID(definition_1.Universe.TRON, 728126428),
|
|
78
|
-
"
|
|
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();
|
package/dist/esm/data/chainid.js
CHANGED
|
@@ -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.
|
|
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.
|
|
50
|
+
const univID = input.readUInt32BE(0);
|
|
49
51
|
const rest = input.subarray(4);
|
|
50
52
|
return new OmniversalChainID(univID, rest);
|
|
51
53
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -14,31 +14,27 @@ const dataSets = new Map([
|
|
|
14
14
|
[
|
|
15
15
|
[
|
|
16
16
|
new OmniversalChainID(Universe.ETHEREUM, 421614),
|
|
17
|
-
"
|
|
17
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
18
18
|
],
|
|
19
19
|
[
|
|
20
20
|
new OmniversalChainID(Universe.ETHEREUM, 11155420),
|
|
21
|
-
"
|
|
21
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
22
22
|
],
|
|
23
23
|
[
|
|
24
24
|
new OmniversalChainID(Universe.ETHEREUM, 80002),
|
|
25
|
-
"
|
|
25
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
26
26
|
],
|
|
27
27
|
[
|
|
28
28
|
new OmniversalChainID(Universe.ETHEREUM, 84532),
|
|
29
|
-
"
|
|
29
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
30
30
|
],
|
|
31
31
|
[
|
|
32
32
|
new OmniversalChainID(Universe.ETHEREUM, 11155111),
|
|
33
|
-
"
|
|
33
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
34
34
|
],
|
|
35
35
|
[
|
|
36
36
|
new OmniversalChainID(Universe.ETHEREUM, 10143),
|
|
37
|
-
"
|
|
38
|
-
],
|
|
39
|
-
[
|
|
40
|
-
new OmniversalChainID(Universe.TRON, 2494104990n),
|
|
41
|
-
"0x70f03baa2CD784447A4B133E41386562163209f8",
|
|
37
|
+
"0xEFF0C81eC6D7c2a3B924e98B65303DDaa3030a81",
|
|
42
38
|
],
|
|
43
39
|
],
|
|
44
40
|
],
|
|
@@ -71,7 +67,7 @@ const dataSets = new Map([
|
|
|
71
67
|
],
|
|
72
68
|
[
|
|
73
69
|
new OmniversalChainID(Universe.TRON, 728126428),
|
|
74
|
-
"
|
|
70
|
+
"0x46de8c7e6f1da4dd851b62c20b78971f230fca5b",
|
|
75
71
|
],
|
|
76
72
|
],
|
|
77
73
|
],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ensureBufferPolyfill(): void;
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avail-project/ca-common",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-dev.1",
|
|
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",
|
|
@@ -50,8 +55,8 @@
|
|
|
50
55
|
"decimal.js": "^10.6.0",
|
|
51
56
|
"fuels": "^0.101.1",
|
|
52
57
|
"long": "^5.3.2",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
58
|
+
"viem": "^2.31.7",
|
|
59
|
+
"msgpackr": "^1.11.4"
|
|
55
60
|
},
|
|
56
61
|
"dependencies": {
|
|
57
62
|
"@bufbuild/protobuf": "^2.6.0",
|