@sentio/sdk-bundle 4.0.1-rc.2 → 4.0.1-rc.4
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/assets/chainlink-oracles-sepolia.json +21 -0
- package/assets/chainlink-oracles.json +219 -0
- package/dist/{0x1-B_N1Dd6d.js → 0x1-CWhLCIJf.js} +30 -22
- package/dist/0x1-CWhLCIJf.js.map +1 -0
- package/dist/{AbstractKeylessAccount-dvYSW9Go.js → AbstractKeylessAccount-DE1e2Glg.js} +3 -2
- package/dist/{AbstractKeylessAccount-dvYSW9Go.js.map → AbstractKeylessAccount-DE1e2Glg.js.map} +1 -1
- package/dist/_md-CZAi2AzY.js +644 -0
- package/dist/_md-CZAi2AzY.js.map +1 -0
- package/dist/aptos/builtin/0x1.js +2 -2
- package/dist/aptos/builtin/0x3.js +3 -3
- package/dist/aptos/builtin/0x3.js.map +1 -1
- package/dist/aptos/builtin/0x4.js +3 -3
- package/dist/aptos/builtin/0x4.js.map +1 -1
- package/dist/aptos/builtin/index.js +1 -1
- package/dist/aptos/ext/index.js +2 -2
- package/dist/aptos/index.js +2 -2
- package/dist/{aptos-DPeebJ9j.js → aptos-Cgfa8IQj.js} +257 -47
- package/dist/{aptos-DPeebJ9j.js.map → aptos-Cgfa8IQj.js.map} +1 -1
- package/dist/{coin-DREiK-Br.js → coin-CBrx3CpG.js} +1514 -105
- package/dist/coin-CBrx3CpG.js.map +1 -0
- package/dist/{coin-CWRVUEBa.js → coin-Mht4Jgvj.js} +803 -4
- package/dist/coin-Mht4Jgvj.js.map +1 -0
- package/dist/eth/builtin/eacaggregatorproxy.js +1 -1
- package/dist/eth/builtin/erc1155.js +1 -1
- package/dist/eth/builtin/erc20.js +1 -1
- package/dist/eth/builtin/erc721.js +1 -1
- package/dist/eth/builtin/index.js +1 -1
- package/dist/eth/builtin/weth9.js +1 -1
- package/dist/eth/index.js +1 -1
- package/dist/iota/builtin/0x1.js +3 -3
- package/dist/iota/builtin/0x2.js +168 -5
- package/dist/iota/builtin/0x2.js.map +1 -1
- package/dist/iota/builtin/0x3.js +3 -3
- package/dist/iota/ext/index.js +1 -1
- package/dist/iota/index.js +3 -3
- package/dist/{keyless-B3QnUmtL.js → keyless-nGiRkJjM.js} +1278 -976
- package/dist/keyless-nGiRkJjM.js.map +1 -0
- package/dist/move/index.js +1 -1
- package/dist/{move-Dr-DL5zT.js → move-BVvdKH2Q.js} +7 -7
- package/dist/{move-Dr-DL5zT.js.map → move-BVvdKH2Q.js.map} +1 -1
- package/dist/sui/builtin/0x1.js +1 -1
- package/dist/sui/builtin/0x2.js +4 -4
- package/dist/sui/builtin/0x3.js +4 -4
- package/dist/sui/builtin/index.js +1 -1
- package/dist/sui/ext/index.js +1 -1
- package/dist/sui/index.js +3 -3
- package/dist/{sui-BbKeYXM3.js → sui-BcHp8IsJ.js} +17 -17
- package/dist/{sui-BbKeYXM3.js.map → sui-BcHp8IsJ.js.map} +1 -1
- package/dist/testing/index.js +6 -6
- package/dist/utils/index.js +1 -1
- package/dist/{utils-Jndk-n_F.js → utils-BQ0dnllb.js} +11 -903
- package/dist/utils-BQ0dnllb.js.map +1 -0
- package/package.json +2 -2
- package/assets/chainlink-oracles-sepolia.csv +0 -19
- package/assets/chainlink-oracles.csv +0 -217
- package/dist/0x1-B_N1Dd6d.js.map +0 -1
- package/dist/base-BvfRCgEy.js +0 -959
- package/dist/base-BvfRCgEy.js.map +0 -1
- package/dist/coin-CWRVUEBa.js.map +0 -1
- package/dist/coin-DREiK-Br.js.map +0 -1
- package/dist/dist-CA96PSzE.js +0 -824
- package/dist/dist-CA96PSzE.js.map +0 -1
- package/dist/keyless-B3QnUmtL.js.map +0 -1
- package/dist/utils-Jndk-n_F.js.map +0 -1
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { a as __name, n as __commonJSMin } from "./bignumber-DddanwOv.js";
|
|
2
|
-
import {
|
|
3
|
-
import { C as accountTypeString, b as SPLITTER } from "./move-
|
|
4
|
-
import { i as getPriceByType } from "./utils-
|
|
2
|
+
import { A as anumber$1, C as rotrSL, D as abytes$1, F as createHasher, H as swap8IfBE, N as clean, O as aexists, S as rotrSH, U as u32, V as swap32IfBE, b as rotrBH, c as add3L, j as aoutput, o as add, p as fromBig, s as add3H, v as rotr32H, x as rotrBL, y as rotr32L } from "./_md-CZAi2AzY.js";
|
|
3
|
+
import { C as accountTypeString, b as SPLITTER } from "./move-BVvdKH2Q.js";
|
|
4
|
+
import { i as getPriceByType } from "./utils-BQ0dnllb.js";
|
|
5
5
|
import { t as fetch$1 } from "./src-Dtwrj-9V.js";
|
|
6
|
-
import { S as unknown, _ as record, a as integer, b as tuple, c as literal, d as number, f as object, g as pipe, i as check, l as nullable, m as parse, n as bigint, o as is, p as optional, r as boolean, s as lazy, t as array, u as nullish, v as string, x as union, y as transform } from "./dist-CA96PSzE.js";
|
|
7
6
|
import { Endpoints } from "@sentio/runtime";
|
|
8
7
|
import { SuiChainId } from "@sentio/chain";
|
|
9
8
|
|
|
10
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/utils/suins.mjs
|
|
11
10
|
const SUI_NS_NAME_REGEX = /^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i;
|
|
12
11
|
const SUI_NS_DOMAIN_REGEX = /^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i;
|
|
13
12
|
const MAX_SUI_NS_NAME_LENGTH = 235;
|
|
@@ -18,7 +17,7 @@ function isValidSuiNSName(name) {
|
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
//#endregion
|
|
21
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
20
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/utils/move-registry.mjs
|
|
22
21
|
/** The pattern to find an optionally versioned name */
|
|
23
22
|
const NAME_PATTERN = /^([a-z0-9]+(?:-[a-z0-9]+)*)$/;
|
|
24
23
|
/** The pattern for a valid version number */
|
|
@@ -45,12 +44,569 @@ const isValidNamedType = (type) => {
|
|
|
45
44
|
};
|
|
46
45
|
|
|
47
46
|
//#endregion
|
|
48
|
-
//#region ../../node_modules/.pnpm/@
|
|
47
|
+
//#region ../../node_modules/.pnpm/@scure+base@2.2.0/node_modules/@scure/base/index.js
|
|
48
|
+
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
49
|
+
function isBytes(a) {
|
|
50
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a && a.BYTES_PER_ELEMENT === 1;
|
|
51
|
+
}
|
|
52
|
+
/** Asserts something is Uint8Array. */
|
|
53
|
+
function abytes(b) {
|
|
54
|
+
if (!isBytes(b)) throw new TypeError("Uint8Array expected");
|
|
55
|
+
}
|
|
56
|
+
function isArrayOf(isString, arr) {
|
|
57
|
+
if (!Array.isArray(arr)) return false;
|
|
58
|
+
if (arr.length === 0) return true;
|
|
59
|
+
if (isString) return arr.every((item) => typeof item === "string");
|
|
60
|
+
else return arr.every((item) => Number.isSafeInteger(item));
|
|
61
|
+
}
|
|
62
|
+
function afn(input) {
|
|
63
|
+
if (typeof input !== "function") throw new TypeError("function expected");
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
function astr(label, input) {
|
|
67
|
+
if (typeof input !== "string") throw new TypeError(`${label}: string expected`);
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
function anumber(n) {
|
|
71
|
+
if (typeof n !== "number") throw new TypeError(`number expected, got ${typeof n}`);
|
|
72
|
+
if (!Number.isSafeInteger(n)) throw new RangeError(`invalid integer: ${n}`);
|
|
73
|
+
}
|
|
74
|
+
function aArr(input) {
|
|
75
|
+
if (!Array.isArray(input)) throw new TypeError("array expected");
|
|
76
|
+
}
|
|
77
|
+
function astrArr(label, input) {
|
|
78
|
+
if (!isArrayOf(true, input)) throw new TypeError(`${label}: array of strings expected`);
|
|
79
|
+
}
|
|
80
|
+
function anumArr(label, input) {
|
|
81
|
+
if (!isArrayOf(false, input)) throw new TypeError(`${label}: array of numbers expected`);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @__NO_SIDE_EFFECTS__
|
|
85
|
+
*/
|
|
86
|
+
function chain(...args) {
|
|
87
|
+
const id = (a) => a;
|
|
88
|
+
const wrap = (a, b) => (c) => a(b(c));
|
|
89
|
+
return {
|
|
90
|
+
encode: args.map((x) => x.encode).reduceRight(wrap, id),
|
|
91
|
+
decode: args.map((x) => x.decode).reduce(wrap, id)
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Encodes integer radix representation to array of strings using alphabet and back.
|
|
96
|
+
* Could also be array of strings.
|
|
97
|
+
* @__NO_SIDE_EFFECTS__
|
|
98
|
+
*/
|
|
99
|
+
function alphabet(letters) {
|
|
100
|
+
const lettersA = typeof letters === "string" ? letters.split("") : letters;
|
|
101
|
+
const len = lettersA.length;
|
|
102
|
+
astrArr("alphabet", lettersA);
|
|
103
|
+
const indexes = new Map(lettersA.map((l, i) => [l, i]));
|
|
104
|
+
return {
|
|
105
|
+
encode: (digits) => {
|
|
106
|
+
aArr(digits);
|
|
107
|
+
return digits.map((i) => {
|
|
108
|
+
if (!Number.isSafeInteger(i) || i < 0 || i >= len) throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${letters}`);
|
|
109
|
+
return lettersA[i];
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
decode: (input) => {
|
|
113
|
+
aArr(input);
|
|
114
|
+
return input.map((letter) => {
|
|
115
|
+
astr("alphabet.decode", letter);
|
|
116
|
+
const i = indexes.get(letter);
|
|
117
|
+
if (i === void 0) throw new Error(`Unknown letter: "${letter}". Allowed: ${letters}`);
|
|
118
|
+
return i;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @__NO_SIDE_EFFECTS__
|
|
125
|
+
*/
|
|
126
|
+
function join(separator = "") {
|
|
127
|
+
astr("join", separator);
|
|
128
|
+
return {
|
|
129
|
+
encode: (from) => {
|
|
130
|
+
astrArr("join.decode", from);
|
|
131
|
+
return from.join(separator);
|
|
132
|
+
},
|
|
133
|
+
decode: (to) => {
|
|
134
|
+
astr("join.decode", to);
|
|
135
|
+
return to.split(separator);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Pad strings array so it has integer number of bits
|
|
141
|
+
* @__NO_SIDE_EFFECTS__
|
|
142
|
+
*/
|
|
143
|
+
function padding(bits, chr = "=") {
|
|
144
|
+
anumber(bits);
|
|
145
|
+
astr("padding", chr);
|
|
146
|
+
return {
|
|
147
|
+
encode(data) {
|
|
148
|
+
astrArr("padding.encode", data);
|
|
149
|
+
while (data.length * bits % 8) data.push(chr);
|
|
150
|
+
return data;
|
|
151
|
+
},
|
|
152
|
+
decode(input) {
|
|
153
|
+
astrArr("padding.decode", input);
|
|
154
|
+
let end = input.length;
|
|
155
|
+
if (end * bits % 8) throw new Error("padding: invalid, string should have whole number of bytes");
|
|
156
|
+
for (; end > 0 && input[end - 1] === chr; end--) if ((end - 1) * bits % 8 === 0) throw new Error("padding: invalid, string has too much padding");
|
|
157
|
+
return input.slice(0, end);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* @__NO_SIDE_EFFECTS__
|
|
163
|
+
*/
|
|
164
|
+
function normalize(fn) {
|
|
165
|
+
afn(fn);
|
|
166
|
+
return {
|
|
167
|
+
encode: (from) => from,
|
|
168
|
+
decode: (to) => fn(to)
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Slow: O(n^2) time complexity
|
|
173
|
+
*/
|
|
174
|
+
function convertRadix(data, from, to) {
|
|
175
|
+
if (from < 2) throw new RangeError(`convertRadix: invalid from=${from}, base cannot be less than 2`);
|
|
176
|
+
if (to < 2) throw new RangeError(`convertRadix: invalid to=${to}, base cannot be less than 2`);
|
|
177
|
+
aArr(data);
|
|
178
|
+
if (!data.length) return [];
|
|
179
|
+
let pos = 0;
|
|
180
|
+
const res = [];
|
|
181
|
+
const digits = Array.from(data, (d) => {
|
|
182
|
+
anumber(d);
|
|
183
|
+
if (d < 0 || d >= from) throw new Error(`invalid integer: ${d}`);
|
|
184
|
+
return d;
|
|
185
|
+
});
|
|
186
|
+
const dlen = digits.length;
|
|
187
|
+
while (true) {
|
|
188
|
+
let carry = 0;
|
|
189
|
+
let done = true;
|
|
190
|
+
for (let i = pos; i < dlen; i++) {
|
|
191
|
+
const digit = digits[i];
|
|
192
|
+
const fromCarry = from * carry;
|
|
193
|
+
const digitBase = fromCarry + digit;
|
|
194
|
+
if (!Number.isSafeInteger(digitBase) || fromCarry / from !== carry || digitBase - digit !== fromCarry) throw new Error("convertRadix: carry overflow");
|
|
195
|
+
const div = digitBase / to;
|
|
196
|
+
carry = digitBase % to;
|
|
197
|
+
const rounded = Math.floor(div);
|
|
198
|
+
digits[i] = rounded;
|
|
199
|
+
if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase) throw new Error("convertRadix: carry overflow");
|
|
200
|
+
if (!done) continue;
|
|
201
|
+
else if (!rounded) pos = i;
|
|
202
|
+
else done = false;
|
|
203
|
+
}
|
|
204
|
+
res.push(carry);
|
|
205
|
+
if (done) break;
|
|
206
|
+
}
|
|
207
|
+
for (let i = 0; i < data.length - 1 && data[i] === 0; i++) res.push(0);
|
|
208
|
+
return res.reverse();
|
|
209
|
+
}
|
|
210
|
+
const gcd = (a, b) => b === 0 ? a : gcd(b, a % b);
|
|
211
|
+
const radix2carry = /* @__NO_SIDE_EFFECTS__ */ (from, to) => from + (to - gcd(from, to));
|
|
212
|
+
const powers = /* @__PURE__ */ (() => {
|
|
213
|
+
let res = [];
|
|
214
|
+
for (let i = 0; i < 40; i++) res.push(2 ** i);
|
|
215
|
+
return res;
|
|
216
|
+
})();
|
|
217
|
+
/**
|
|
218
|
+
* Implemented with numbers, because BigInt is 5x slower
|
|
219
|
+
*/
|
|
220
|
+
function convertRadix2(data, from, to, padding) {
|
|
221
|
+
aArr(data);
|
|
222
|
+
if (from <= 0 || from > 32) throw new RangeError(`convertRadix2: wrong from=${from}`);
|
|
223
|
+
if (to <= 0 || to > 32) throw new RangeError(`convertRadix2: wrong to=${to}`);
|
|
224
|
+
if (/* @__PURE__ */ radix2carry(from, to) > 32) throw new Error(`convertRadix2: carry overflow from=${from} to=${to} carryBits=${/* @__PURE__ */ radix2carry(from, to)}`);
|
|
225
|
+
let carry = 0;
|
|
226
|
+
let pos = 0;
|
|
227
|
+
const max = powers[from];
|
|
228
|
+
const mask = powers[to] - 1;
|
|
229
|
+
const res = [];
|
|
230
|
+
for (const n of data) {
|
|
231
|
+
anumber(n);
|
|
232
|
+
if (n >= max) throw new Error(`convertRadix2: invalid data word=${n} from=${from}`);
|
|
233
|
+
carry = carry << from | n;
|
|
234
|
+
if (pos + from > 32) throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from}`);
|
|
235
|
+
pos += from;
|
|
236
|
+
for (; pos >= to; pos -= to) res.push((carry >> pos - to & mask) >>> 0);
|
|
237
|
+
const pow = powers[pos];
|
|
238
|
+
if (pow === void 0) throw new Error("invalid carry");
|
|
239
|
+
carry &= pow - 1;
|
|
240
|
+
}
|
|
241
|
+
carry = carry << to - pos & mask;
|
|
242
|
+
if (!padding && pos >= from) throw new Error("Excess padding");
|
|
243
|
+
if (!padding && carry > 0) throw new Error(`Non-zero padding: ${carry}`);
|
|
244
|
+
if (padding && pos > 0) res.push(carry >>> 0);
|
|
245
|
+
return res;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @__NO_SIDE_EFFECTS__
|
|
249
|
+
*/
|
|
250
|
+
function radix(num) {
|
|
251
|
+
anumber(num);
|
|
252
|
+
const _256 = 2 ** 8;
|
|
253
|
+
return {
|
|
254
|
+
encode: (bytes) => {
|
|
255
|
+
if (!isBytes(bytes)) throw new TypeError("radix.encode input should be Uint8Array");
|
|
256
|
+
return convertRadix(Array.from(bytes), _256, num);
|
|
257
|
+
},
|
|
258
|
+
decode: (digits) => {
|
|
259
|
+
anumArr("radix.decode", digits);
|
|
260
|
+
return Uint8Array.from(convertRadix(digits, num, _256));
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* If both bases are power of same number (like `2**8 <-> 2**64`),
|
|
266
|
+
* there is a linear algorithm. For now we have implementation for power-of-two bases only.
|
|
267
|
+
* @__NO_SIDE_EFFECTS__
|
|
268
|
+
*/
|
|
269
|
+
function radix2(bits, revPadding = false) {
|
|
270
|
+
anumber(bits);
|
|
271
|
+
if (bits <= 0 || bits > 32) throw new RangeError("radix2: bits should be in (0..32]");
|
|
272
|
+
if (/* @__PURE__ */ radix2carry(8, bits) > 32 || /* @__PURE__ */ radix2carry(bits, 8) > 32) throw new RangeError("radix2: carry overflow");
|
|
273
|
+
return {
|
|
274
|
+
encode: (bytes) => {
|
|
275
|
+
if (!isBytes(bytes)) throw new TypeError("radix2.encode input should be Uint8Array");
|
|
276
|
+
return convertRadix2(Array.from(bytes), 8, bits, !revPadding);
|
|
277
|
+
},
|
|
278
|
+
decode: (digits) => {
|
|
279
|
+
anumArr("radix2.decode", digits);
|
|
280
|
+
return Uint8Array.from(convertRadix2(digits, bits, 8, revPadding));
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
function unsafeWrapper(fn) {
|
|
285
|
+
afn(fn);
|
|
286
|
+
return function(...args) {
|
|
287
|
+
try {
|
|
288
|
+
return fn.apply(null, args);
|
|
289
|
+
} catch (e) {}
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* base16 encoding from RFC 4648.
|
|
294
|
+
* This codec uses RFC 4648 Table 5's uppercase alphabet directly.
|
|
295
|
+
* RFC 4648 §8 calls base16 "case-insensitive hex encoding", but we intentionally do not case-fold decode input here.
|
|
296
|
+
* Use `hex` for case-insensitive hex decoding.
|
|
297
|
+
* @example
|
|
298
|
+
* ```js
|
|
299
|
+
* base16.encode(Uint8Array.from([0x12, 0xab]));
|
|
300
|
+
* // => '12AB'
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
303
|
+
const base16 = /* @__PURE__ */ Object.freeze(chain(radix2(4), alphabet("0123456789ABCDEF"), join("")));
|
|
304
|
+
/**
|
|
305
|
+
* base32 encoding from RFC 4648. Has padding.
|
|
306
|
+
* RFC 4648 §6 Table 3 uses uppercase letters, and RFC 4648 §3.4 allows applications to choose
|
|
307
|
+
* upper- or lowercase alphabets. We keep the published uppercase table and do not case-fold decode input.
|
|
308
|
+
* Use `base32nopad` for unpadded version.
|
|
309
|
+
* Also check out `base32hex`, `base32hexnopad`, `base32crockford`.
|
|
310
|
+
* @example
|
|
311
|
+
* ```js
|
|
312
|
+
* base32.encode(Uint8Array.from([0x12, 0xab]));
|
|
313
|
+
* // => 'CKVQ===='
|
|
314
|
+
* base32.decode('CKVQ====');
|
|
315
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
const base32 = /* @__PURE__ */ Object.freeze(chain(radix2(5), alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), padding(5), join("")));
|
|
319
|
+
/**
|
|
320
|
+
* base32 encoding from RFC 4648. No padding.
|
|
321
|
+
* This variant inherits RFC 4648 base32's uppercase table and intentionally does not case-fold decode input.
|
|
322
|
+
* Use `base32` for padded version.
|
|
323
|
+
* Also check out `base32hex`, `base32hexnopad`, `base32crockford`.
|
|
324
|
+
* @example
|
|
325
|
+
* ```js
|
|
326
|
+
* base32nopad.encode(Uint8Array.from([0x12, 0xab]));
|
|
327
|
+
* // => 'CKVQ'
|
|
328
|
+
* base32nopad.decode('CKVQ');
|
|
329
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
const base32nopad = /* @__PURE__ */ Object.freeze(chain(radix2(5), alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), join("")));
|
|
333
|
+
/**
|
|
334
|
+
* base32 encoding from RFC 4648. Padded. Compared to ordinary `base32`, slightly different alphabet.
|
|
335
|
+
* RFC 4648 §7 Table 4 uses uppercase letters, and we intentionally keep that table without case-folding decode input.
|
|
336
|
+
* Use `base32hexnopad` for unpadded version.
|
|
337
|
+
* @example
|
|
338
|
+
* ```js
|
|
339
|
+
* base32hex.encode(Uint8Array.from([0x12, 0xab]));
|
|
340
|
+
* // => '2ALG===='
|
|
341
|
+
* base32hex.decode('2ALG====');
|
|
342
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
const base32hex = /* @__PURE__ */ Object.freeze(chain(radix2(5), alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), padding(5), join("")));
|
|
346
|
+
/**
|
|
347
|
+
* base32 encoding from RFC 4648. No padding. Compared to ordinary `base32`, slightly different alphabet.
|
|
348
|
+
* This variant inherits RFC 4648 base32hex's uppercase table and intentionally does not case-fold decode input.
|
|
349
|
+
* Use `base32hex` for padded version.
|
|
350
|
+
* @example
|
|
351
|
+
* ```js
|
|
352
|
+
* base32hexnopad.encode(Uint8Array.from([0x12, 0xab]));
|
|
353
|
+
* // => '2ALG'
|
|
354
|
+
* base32hexnopad.decode('2ALG');
|
|
355
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
358
|
+
const base32hexnopad = /* @__PURE__ */ Object.freeze(chain(radix2(5), alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), join("")));
|
|
359
|
+
/**
|
|
360
|
+
* base32 encoding from RFC 4648. Doug Crockford's version.
|
|
361
|
+
* See {@link https://www.crockford.com/base32.html | Douglas Crockford's Base32}.
|
|
362
|
+
* @example
|
|
363
|
+
* ```js
|
|
364
|
+
* base32crockford.encode(Uint8Array.from([0x12, 0xab]));
|
|
365
|
+
* // => '2ANG'
|
|
366
|
+
* base32crockford.decode('2ANG');
|
|
367
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
const base32crockford = /* @__PURE__ */ Object.freeze(chain(radix2(5), alphabet("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), join(""), normalize((s) => s.toUpperCase().replace(/O/g, "0").replace(/[IL]/g, "1"))));
|
|
371
|
+
const hasBase64Builtin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toBase64 === "function" && typeof Uint8Array.fromBase64 === "function")();
|
|
372
|
+
const ASCII_WHITESPACE = /[\t\n\f\r ]/;
|
|
373
|
+
const decodeBase64Builtin = (s, isUrl) => {
|
|
374
|
+
astr("base64", s);
|
|
375
|
+
const alphabet = isUrl ? "base64url" : "base64";
|
|
376
|
+
if (s.length > 0 && ASCII_WHITESPACE.test(s)) throw new Error("invalid base64");
|
|
377
|
+
return Uint8Array.fromBase64(s, {
|
|
378
|
+
alphabet,
|
|
379
|
+
lastChunkHandling: "strict"
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* base64 from RFC 4648. Padded.
|
|
384
|
+
* Use `base64nopad` for unpadded version.
|
|
385
|
+
* Also check out `base64url`, `base64urlnopad`.
|
|
386
|
+
* Falls back to built-in function, when available.
|
|
387
|
+
* @example
|
|
388
|
+
* ```js
|
|
389
|
+
* base64.encode(Uint8Array.from([0x12, 0xab]));
|
|
390
|
+
* // => 'Eqs='
|
|
391
|
+
* base64.decode('Eqs=');
|
|
392
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
393
|
+
* ```
|
|
394
|
+
*/
|
|
395
|
+
const base64 = /* @__PURE__ */ Object.freeze(hasBase64Builtin ? {
|
|
396
|
+
encode(b) {
|
|
397
|
+
abytes(b);
|
|
398
|
+
return b.toBase64();
|
|
399
|
+
},
|
|
400
|
+
decode(s) {
|
|
401
|
+
return decodeBase64Builtin(s, false);
|
|
402
|
+
}
|
|
403
|
+
} : chain(radix2(6), alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), padding(6), join("")));
|
|
404
|
+
/**
|
|
405
|
+
* base64 from RFC 4648. No padding.
|
|
406
|
+
* Use `base64` for padded version.
|
|
407
|
+
* @example
|
|
408
|
+
* ```js
|
|
409
|
+
* base64nopad.encode(Uint8Array.from([0x12, 0xab]));
|
|
410
|
+
* // => 'Eqs'
|
|
411
|
+
* base64nopad.decode('Eqs');
|
|
412
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
const base64nopad = /* @__PURE__ */ Object.freeze(chain(radix2(6), alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), join("")));
|
|
416
|
+
/**
|
|
417
|
+
* base64 from RFC 4648, using URL-safe alphabet. Padded.
|
|
418
|
+
* Use `base64urlnopad` for unpadded version.
|
|
419
|
+
* Falls back to built-in function, when available.
|
|
420
|
+
* @example
|
|
421
|
+
* ```js
|
|
422
|
+
* base64url.encode(Uint8Array.from([0x12, 0xab]));
|
|
423
|
+
* // => 'Eqs='
|
|
424
|
+
* base64url.decode('Eqs=');
|
|
425
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
const base64url = /* @__PURE__ */ Object.freeze(hasBase64Builtin ? {
|
|
429
|
+
encode(b) {
|
|
430
|
+
abytes(b);
|
|
431
|
+
return b.toBase64({ alphabet: "base64url" });
|
|
432
|
+
},
|
|
433
|
+
decode(s) {
|
|
434
|
+
return decodeBase64Builtin(s, true);
|
|
435
|
+
}
|
|
436
|
+
} : chain(radix2(6), alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), padding(6), join("")));
|
|
437
|
+
/**
|
|
438
|
+
* base64 from RFC 4648, using URL-safe alphabet. No padding.
|
|
439
|
+
* Use `base64url` for padded version.
|
|
440
|
+
* @example
|
|
441
|
+
* ```js
|
|
442
|
+
* base64urlnopad.encode(Uint8Array.from([0x12, 0xab]));
|
|
443
|
+
* // => 'Eqs'
|
|
444
|
+
* base64urlnopad.decode('Eqs');
|
|
445
|
+
* // => Uint8Array.from([0x12, 0xab])
|
|
446
|
+
* ```
|
|
447
|
+
*/
|
|
448
|
+
const base64urlnopad = /* @__PURE__ */ Object.freeze(chain(radix2(6), alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), join("")));
|
|
449
|
+
const genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => chain(radix(58), alphabet(abc), join(""));
|
|
450
|
+
/**
|
|
451
|
+
* base58: base64 without ambigous characters +, /, 0, O, I, l.
|
|
452
|
+
* Quadratic (O(n^2)) - so, can't be used on large inputs.
|
|
453
|
+
* @example
|
|
454
|
+
* ```js
|
|
455
|
+
* const text = base58.encode(Uint8Array.from([0, 1, 2]));
|
|
456
|
+
* base58.decode(text);
|
|
457
|
+
* // => Uint8Array.from([0, 1, 2])
|
|
458
|
+
* ```
|
|
459
|
+
*/
|
|
460
|
+
const base58 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"));
|
|
461
|
+
const BECH_ALPHABET = chain(alphabet("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), join(""));
|
|
462
|
+
const POLYMOD_GENERATORS = [
|
|
463
|
+
996825010,
|
|
464
|
+
642813549,
|
|
465
|
+
513874426,
|
|
466
|
+
1027748829,
|
|
467
|
+
705979059
|
|
468
|
+
];
|
|
469
|
+
function bech32Polymod(pre) {
|
|
470
|
+
const b = pre >> 25;
|
|
471
|
+
let chk = (pre & 33554431) << 5;
|
|
472
|
+
for (let i = 0; i < POLYMOD_GENERATORS.length; i++) if ((b >> i & 1) === 1) chk ^= POLYMOD_GENERATORS[i];
|
|
473
|
+
return chk;
|
|
474
|
+
}
|
|
475
|
+
function bechChecksum(prefix, words, encodingConst = 1) {
|
|
476
|
+
const len = prefix.length;
|
|
477
|
+
let chk = 1;
|
|
478
|
+
for (let i = 0; i < len; i++) {
|
|
479
|
+
const c = prefix.charCodeAt(i);
|
|
480
|
+
if (c < 33 || c > 126) throw new Error(`Invalid prefix (${prefix})`);
|
|
481
|
+
chk = bech32Polymod(chk) ^ c >> 5;
|
|
482
|
+
}
|
|
483
|
+
chk = bech32Polymod(chk);
|
|
484
|
+
for (let i = 0; i < len; i++) chk = bech32Polymod(chk) ^ prefix.charCodeAt(i) & 31;
|
|
485
|
+
for (let v of words) chk = bech32Polymod(chk) ^ v;
|
|
486
|
+
for (let i = 0; i < 6; i++) chk = bech32Polymod(chk);
|
|
487
|
+
chk ^= encodingConst;
|
|
488
|
+
return BECH_ALPHABET.encode(convertRadix2([chk % powers[30]], 30, 5, false));
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* @__NO_SIDE_EFFECTS__
|
|
492
|
+
*/
|
|
493
|
+
function genBech32(encoding) {
|
|
494
|
+
const ENCODING_CONST = encoding === "bech32" ? 1 : 734539939;
|
|
495
|
+
const _words = radix2(5);
|
|
496
|
+
const fromWords = _words.decode;
|
|
497
|
+
const toWords = _words.encode;
|
|
498
|
+
const fromWordsUnsafe = unsafeWrapper(fromWords);
|
|
499
|
+
function encode(prefix, words, limit = 90) {
|
|
500
|
+
astr("bech32.encode prefix", prefix);
|
|
501
|
+
if (isBytes(words)) words = Array.from(words);
|
|
502
|
+
anumArr("bech32.encode", words);
|
|
503
|
+
const plen = prefix.length;
|
|
504
|
+
if (plen === 0) throw new TypeError(`Invalid prefix length ${plen}`);
|
|
505
|
+
const actualLength = plen + 7 + words.length;
|
|
506
|
+
if (limit !== false && actualLength > limit) throw new TypeError(`Length ${actualLength} exceeds limit ${limit}`);
|
|
507
|
+
const lowered = prefix.toLowerCase();
|
|
508
|
+
const sum = bechChecksum(lowered, words, ENCODING_CONST);
|
|
509
|
+
return `${lowered}1${BECH_ALPHABET.encode(words)}${sum}`;
|
|
510
|
+
}
|
|
511
|
+
function decode(str, limit = 90) {
|
|
512
|
+
astr("bech32.decode input", str);
|
|
513
|
+
const slen = str.length;
|
|
514
|
+
if (slen < 8 || limit !== false && slen > limit) throw new TypeError(`invalid string length: ${slen} (${str}). Expected (8..${limit})`);
|
|
515
|
+
const lowered = str.toLowerCase();
|
|
516
|
+
if (str !== lowered && str !== str.toUpperCase()) throw new Error(`String must be lowercase or uppercase`);
|
|
517
|
+
const sepIndex = lowered.lastIndexOf("1");
|
|
518
|
+
if (sepIndex === 0 || sepIndex === -1) throw new Error(`Letter "1" must be present between prefix and data only`);
|
|
519
|
+
const prefix = lowered.slice(0, sepIndex);
|
|
520
|
+
const data = lowered.slice(sepIndex + 1);
|
|
521
|
+
if (data.length < 6) throw new Error("Data must be at least 6 characters long");
|
|
522
|
+
const words = BECH_ALPHABET.decode(data).slice(0, -6);
|
|
523
|
+
const sum = bechChecksum(prefix, words, ENCODING_CONST);
|
|
524
|
+
if (!data.endsWith(sum)) throw new Error(`Invalid checksum in ${str}: expected "${sum}"`);
|
|
525
|
+
return {
|
|
526
|
+
prefix,
|
|
527
|
+
words
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
const decodeUnsafe = unsafeWrapper(decode);
|
|
531
|
+
function decodeToBytes(str) {
|
|
532
|
+
const { prefix, words } = decode(str, false);
|
|
533
|
+
return {
|
|
534
|
+
prefix,
|
|
535
|
+
words,
|
|
536
|
+
bytes: fromWords(words)
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
function encodeFromBytes(prefix, bytes) {
|
|
540
|
+
return encode(prefix, toWords(bytes));
|
|
541
|
+
}
|
|
542
|
+
return {
|
|
543
|
+
encode,
|
|
544
|
+
decode,
|
|
545
|
+
encodeFromBytes,
|
|
546
|
+
decodeToBytes,
|
|
547
|
+
decodeUnsafe,
|
|
548
|
+
fromWords,
|
|
549
|
+
fromWordsUnsafe,
|
|
550
|
+
toWords
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* bech32 from BIP 173. Operates on words.
|
|
555
|
+
* For high-level helpers, check out {@link https://github.com/paulmillr/scure-btc-signer | scure-btc-signer}.
|
|
556
|
+
* @example
|
|
557
|
+
* Convert bytes to words, encode them, then decode back.
|
|
558
|
+
* ```ts
|
|
559
|
+
* const words = bech32.toWords(Uint8Array.from([1, 2, 3]));
|
|
560
|
+
* const text = bech32.encode('bc', words);
|
|
561
|
+
* bech32.decode(text);
|
|
562
|
+
* ```
|
|
563
|
+
*/
|
|
564
|
+
const bech32 = /* @__PURE__ */ Object.freeze(genBech32("bech32"));
|
|
565
|
+
/**
|
|
566
|
+
* bech32m from BIP 350. Operates on words.
|
|
567
|
+
* It was to mitigate `bech32` weaknesses.
|
|
568
|
+
* For high-level helpers, check out {@link https://github.com/paulmillr/scure-btc-signer | scure-btc-signer}.
|
|
569
|
+
* @example
|
|
570
|
+
* Convert bytes to words, encode them with bech32m, then decode back.
|
|
571
|
+
* ```ts
|
|
572
|
+
* const words = bech32m.toWords(Uint8Array.from([1, 2, 3]));
|
|
573
|
+
* const text = bech32m.encode('bc', words);
|
|
574
|
+
* bech32m.decode(text);
|
|
575
|
+
* ```
|
|
576
|
+
*/
|
|
577
|
+
const bech32m = /* @__PURE__ */ Object.freeze(genBech32("bech32m"));
|
|
578
|
+
const hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
|
|
579
|
+
const hexBuiltin = {
|
|
580
|
+
encode(data) {
|
|
581
|
+
abytes(data);
|
|
582
|
+
return data.toHex();
|
|
583
|
+
},
|
|
584
|
+
decode(s) {
|
|
585
|
+
astr("hex", s);
|
|
586
|
+
return Uint8Array.fromHex(s);
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
/**
|
|
590
|
+
* hex string decoder. Uses built-in function, when available.
|
|
591
|
+
* Lowercase codec; unlike `base16`, this variant accepts either hex case and emits lowercase.
|
|
592
|
+
* @example
|
|
593
|
+
* ```js
|
|
594
|
+
* const b = hex.decode("0102ff"); // => new Uint8Array([ 1, 2, 255 ])
|
|
595
|
+
* const str = hex.encode(b); // "0102ff"
|
|
596
|
+
* ```
|
|
597
|
+
*/
|
|
598
|
+
const hex = /* @__PURE__ */ Object.freeze(hasHexBuiltin ? hexBuiltin : chain(radix2(4), alphabet("0123456789abcdef"), join(""), normalize((s) => {
|
|
599
|
+
if (typeof s !== "string" || s.length % 2 !== 0) throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);
|
|
600
|
+
return s.toLowerCase();
|
|
601
|
+
})));
|
|
602
|
+
|
|
603
|
+
//#endregion
|
|
604
|
+
//#region ../../node_modules/.pnpm/@mysten+utils@0.4.0/node_modules/@mysten/utils/dist/b58.mjs
|
|
49
605
|
const toBase58 = (buffer) => base58.encode(buffer);
|
|
50
606
|
const fromBase58 = (str) => base58.decode(str);
|
|
51
607
|
|
|
52
608
|
//#endregion
|
|
53
|
-
//#region ../../node_modules/.pnpm/@mysten+utils@0.
|
|
609
|
+
//#region ../../node_modules/.pnpm/@mysten+utils@0.4.0/node_modules/@mysten/utils/dist/b64.mjs
|
|
54
610
|
function fromBase64(base64String) {
|
|
55
611
|
return Uint8Array.from(atob(base64String), (char) => char.charCodeAt(0));
|
|
56
612
|
}
|
|
@@ -66,7 +622,7 @@ function toBase64(bytes) {
|
|
|
66
622
|
}
|
|
67
623
|
|
|
68
624
|
//#endregion
|
|
69
|
-
//#region ../../node_modules/.pnpm/@mysten+utils@0.
|
|
625
|
+
//#region ../../node_modules/.pnpm/@mysten+utils@0.4.0/node_modules/@mysten/utils/dist/hex.mjs
|
|
70
626
|
function fromHex(hexStr) {
|
|
71
627
|
const normalized = hexStr.startsWith("0x") ? hexStr.slice(2) : hexStr;
|
|
72
628
|
const padded = normalized.length % 2 === 0 ? normalized : `0${normalized}`;
|
|
@@ -79,7 +635,7 @@ function toHex(bytes) {
|
|
|
79
635
|
}
|
|
80
636
|
|
|
81
637
|
//#endregion
|
|
82
|
-
//#region ../../node_modules/.pnpm/@mysten+utils@0.
|
|
638
|
+
//#region ../../node_modules/.pnpm/@mysten+utils@0.4.0/node_modules/@mysten/utils/dist/chunk.mjs
|
|
83
639
|
function chunk(array, size) {
|
|
84
640
|
return Array.from({ length: Math.ceil(array.length / size) }, (_, i) => {
|
|
85
641
|
return array.slice(i * size, (i + 1) * size);
|
|
@@ -87,7 +643,7 @@ function chunk(array, size) {
|
|
|
87
643
|
}
|
|
88
644
|
|
|
89
645
|
//#endregion
|
|
90
|
-
//#region ../../node_modules/.pnpm/@mysten+utils@0.
|
|
646
|
+
//#region ../../node_modules/.pnpm/@mysten+utils@0.4.0/node_modules/@mysten/utils/dist/dataloader.mjs
|
|
91
647
|
/**
|
|
92
648
|
* DataLoader - A generic utility for batching and caching data fetches.
|
|
93
649
|
*
|
|
@@ -321,7 +877,7 @@ function isArrayLike(x) {
|
|
|
321
877
|
}
|
|
322
878
|
|
|
323
879
|
//#endregion
|
|
324
|
-
//#region ../../node_modules/.pnpm/@mysten+bcs@2.0
|
|
880
|
+
//#region ../../node_modules/.pnpm/@mysten+bcs@2.1.0/node_modules/@mysten/bcs/dist/utils.mjs
|
|
325
881
|
/**
|
|
326
882
|
* Encode data with either `hex` or `base64`.
|
|
327
883
|
*
|
|
@@ -358,7 +914,7 @@ function splitGenericParameters(str, genericSeparators = ["<", ">"]) {
|
|
|
358
914
|
}
|
|
359
915
|
|
|
360
916
|
//#endregion
|
|
361
|
-
//#region ../../node_modules/.pnpm/@mysten+bcs@2.0
|
|
917
|
+
//#region ../../node_modules/.pnpm/@mysten+bcs@2.1.0/node_modules/@mysten/bcs/dist/uleb.mjs
|
|
362
918
|
function ulebEncode(num) {
|
|
363
919
|
let bigNum = BigInt(num);
|
|
364
920
|
const arr = [];
|
|
@@ -392,7 +948,7 @@ function ulebDecode(arr) {
|
|
|
392
948
|
}
|
|
393
949
|
|
|
394
950
|
//#endregion
|
|
395
|
-
//#region ../../node_modules/.pnpm/@mysten+bcs@2.0
|
|
951
|
+
//#region ../../node_modules/.pnpm/@mysten+bcs@2.1.0/node_modules/@mysten/bcs/dist/reader.mjs
|
|
396
952
|
/**
|
|
397
953
|
* Class used for reading BCS data chunk by chunk. Meant to be used
|
|
398
954
|
* by some wrapper, which will make sure that data is valid and is
|
|
@@ -530,7 +1086,7 @@ var BcsReader = class {
|
|
|
530
1086
|
};
|
|
531
1087
|
|
|
532
1088
|
//#endregion
|
|
533
|
-
//#region ../../node_modules/.pnpm/@mysten+bcs@2.0
|
|
1089
|
+
//#region ../../node_modules/.pnpm/@mysten+bcs@2.1.0/node_modules/@mysten/bcs/dist/writer.mjs
|
|
534
1090
|
/**
|
|
535
1091
|
* Class used to write BCS data into a buffer. Initializer requires
|
|
536
1092
|
* some size of a buffer to init; default value for this buffer is 1KB.
|
|
@@ -704,7 +1260,7 @@ function toLittleEndian(bigint, size) {
|
|
|
704
1260
|
}
|
|
705
1261
|
|
|
706
1262
|
//#endregion
|
|
707
|
-
//#region ../../node_modules/.pnpm/@mysten+bcs@2.0
|
|
1263
|
+
//#region ../../node_modules/.pnpm/@mysten+bcs@2.1.0/node_modules/@mysten/bcs/dist/bcs-type.mjs
|
|
708
1264
|
var BcsType = class BcsType {
|
|
709
1265
|
#write;
|
|
710
1266
|
#serialize;
|
|
@@ -966,7 +1522,7 @@ var BcsTuple = class extends BcsType {
|
|
|
966
1522
|
};
|
|
967
1523
|
|
|
968
1524
|
//#endregion
|
|
969
|
-
//#region ../../node_modules/.pnpm/@mysten+bcs@2.0
|
|
1525
|
+
//#region ../../node_modules/.pnpm/@mysten+bcs@2.1.0/node_modules/@mysten/bcs/dist/bcs.mjs
|
|
970
1526
|
function fixedArray(size, type, options) {
|
|
971
1527
|
return new BcsType({
|
|
972
1528
|
read: (reader) => {
|
|
@@ -1211,7 +1767,7 @@ const bcs = {
|
|
|
1211
1767
|
};
|
|
1212
1768
|
|
|
1213
1769
|
//#endregion
|
|
1214
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
1770
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/utils/sui-types.mjs
|
|
1215
1771
|
const SUI_ADDRESS_LENGTH = 32;
|
|
1216
1772
|
function isValidSuiAddress(value) {
|
|
1217
1773
|
return isHex(value) && getHexByteLength(value) === 32;
|
|
@@ -1315,7 +1871,7 @@ function getHexByteLength(value) {
|
|
|
1315
1871
|
}
|
|
1316
1872
|
|
|
1317
1873
|
//#endregion
|
|
1318
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
1874
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/bcs/type-tag-serializer.mjs
|
|
1319
1875
|
const VECTOR_REGEX = /^vector<(.+)>$/;
|
|
1320
1876
|
const STRUCT_REGEX = /^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;
|
|
1321
1877
|
var TypeTagSerializer = class TypeTagSerializer {
|
|
@@ -1364,7 +1920,7 @@ var TypeTagSerializer = class TypeTagSerializer {
|
|
|
1364
1920
|
};
|
|
1365
1921
|
|
|
1366
1922
|
//#endregion
|
|
1367
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
1923
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/bcs/bcs.mjs
|
|
1368
1924
|
function unsafe_u64(options) {
|
|
1369
1925
|
return bcs.u64({
|
|
1370
1926
|
name: "unsafe_u64",
|
|
@@ -1651,7 +2207,7 @@ const ObjectInner = bcs.struct("ObjectInner", {
|
|
|
1651
2207
|
});
|
|
1652
2208
|
|
|
1653
2209
|
//#endregion
|
|
1654
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
2210
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/bcs/effects.mjs
|
|
1655
2211
|
const PackageUpgradeError$1 = bcs.enum("PackageUpgradeError", {
|
|
1656
2212
|
UnableToFetchPackage: bcs.struct("UnableToFetchPackage", { packageId: Address }),
|
|
1657
2213
|
NotAPackage: bcs.struct("NotAPackage", { objectId: Address }),
|
|
@@ -1870,7 +2426,7 @@ const TransactionEffects$1 = bcs.enum("TransactionEffects", {
|
|
|
1870
2426
|
});
|
|
1871
2427
|
|
|
1872
2428
|
//#endregion
|
|
1873
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
2429
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/bcs/pure.mjs
|
|
1874
2430
|
function pureBcsSchemaFromTypeName(name) {
|
|
1875
2431
|
switch (name) {
|
|
1876
2432
|
case "u8": return bcs.u8();
|
|
@@ -1894,7 +2450,7 @@ function pureBcsSchemaFromTypeName(name) {
|
|
|
1894
2450
|
}
|
|
1895
2451
|
|
|
1896
2452
|
//#endregion
|
|
1897
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
2453
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/bcs/index.mjs
|
|
1898
2454
|
const suiBcs = {
|
|
1899
2455
|
...bcs,
|
|
1900
2456
|
U8: bcs.u8(),
|
|
@@ -1948,7 +2504,7 @@ const suiBcs = {
|
|
|
1948
2504
|
};
|
|
1949
2505
|
|
|
1950
2506
|
//#endregion
|
|
1951
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
2507
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/client/cache.mjs
|
|
1952
2508
|
var ClientCache = class ClientCache {
|
|
1953
2509
|
#prefix;
|
|
1954
2510
|
#cache;
|
|
@@ -1994,7 +2550,7 @@ var ClientCache = class ClientCache {
|
|
|
1994
2550
|
};
|
|
1995
2551
|
|
|
1996
2552
|
//#endregion
|
|
1997
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
2553
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/client/client.mjs
|
|
1998
2554
|
var BaseClient = class {
|
|
1999
2555
|
constructor({ network, base, cache = base?.cache ?? new ClientCache() }) {
|
|
2000
2556
|
this.network = network;
|
|
@@ -2020,10 +2576,12 @@ var BaseClient = class {
|
|
|
2020
2576
|
};
|
|
2021
2577
|
|
|
2022
2578
|
//#endregion
|
|
2023
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.0
|
|
2579
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/_blake.js
|
|
2024
2580
|
/**
|
|
2025
|
-
* Internal blake
|
|
2026
|
-
*
|
|
2581
|
+
* Internal blake permutation table.
|
|
2582
|
+
* Rows `0..9` serve BLAKE2s, rows `0..11` serve BLAKE2b with `10..11 = 0..1`, and Blake1 also
|
|
2583
|
+
* reuses the later rows shown below. Blake1 expands rounds `10..15` as `SIGMA[i % 10]`, so rows
|
|
2584
|
+
* `10..15` intentionally repeat rows `0..5` for the 14-round (256) and 16-round (512) variants.
|
|
2027
2585
|
*/
|
|
2028
2586
|
const BSIGMA = /* @__PURE__ */ Uint8Array.from([
|
|
2029
2587
|
0,
|
|
@@ -2285,7 +2843,7 @@ const BSIGMA = /* @__PURE__ */ Uint8Array.from([
|
|
|
2285
2843
|
]);
|
|
2286
2844
|
|
|
2287
2845
|
//#endregion
|
|
2288
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.0
|
|
2846
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/blake2.js
|
|
2289
2847
|
/**
|
|
2290
2848
|
* blake2b (64-bit) & blake2s (8 to 32-bit) hash functions.
|
|
2291
2849
|
* b could have been faster, but there is no fast u64 in js, so s is 1.5x faster.
|
|
@@ -2383,12 +2941,12 @@ function G2b(a, b, c, d, msg, x) {
|
|
|
2383
2941
|
BBUF[2 * d] = Dl, BBUF[2 * d + 1] = Dh;
|
|
2384
2942
|
}
|
|
2385
2943
|
function checkBlake2Opts(outputLen, opts = {}, keyLen, saltLen, persLen) {
|
|
2386
|
-
anumber(keyLen);
|
|
2387
|
-
if (outputLen
|
|
2944
|
+
anumber$1(keyLen);
|
|
2945
|
+
if (outputLen <= 0 || outputLen > keyLen) throw new Error("outputLen bigger than keyLen");
|
|
2388
2946
|
const { key, salt, personalization } = opts;
|
|
2389
2947
|
if (key !== void 0 && (key.length < 1 || key.length > keyLen)) throw new Error("\"key\" expected to be undefined or of length=1.." + keyLen);
|
|
2390
|
-
if (salt !== void 0) abytes(salt, saltLen, "salt");
|
|
2391
|
-
if (personalization !== void 0) abytes(personalization, persLen, "personalization");
|
|
2948
|
+
if (salt !== void 0) abytes$1(salt, saltLen, "salt");
|
|
2949
|
+
if (personalization !== void 0) abytes$1(personalization, persLen, "personalization");
|
|
2392
2950
|
}
|
|
2393
2951
|
/** Internal base class for BLAKE2. */
|
|
2394
2952
|
var _BLAKE2 = class {
|
|
@@ -2400,9 +2958,10 @@ var _BLAKE2 = class {
|
|
|
2400
2958
|
pos = 0;
|
|
2401
2959
|
blockLen;
|
|
2402
2960
|
outputLen;
|
|
2961
|
+
canXOF = false;
|
|
2403
2962
|
constructor(blockLen, outputLen) {
|
|
2404
|
-
anumber(blockLen);
|
|
2405
|
-
anumber(outputLen);
|
|
2963
|
+
anumber$1(blockLen);
|
|
2964
|
+
anumber$1(outputLen);
|
|
2406
2965
|
this.blockLen = blockLen;
|
|
2407
2966
|
this.outputLen = outputLen;
|
|
2408
2967
|
this.buffer = new Uint8Array(blockLen);
|
|
@@ -2410,7 +2969,7 @@ var _BLAKE2 = class {
|
|
|
2410
2969
|
}
|
|
2411
2970
|
update(data) {
|
|
2412
2971
|
aexists(this);
|
|
2413
|
-
abytes(data);
|
|
2972
|
+
abytes$1(data);
|
|
2414
2973
|
const { blockLen, buffer, buffer32 } = this;
|
|
2415
2974
|
const len = data.length;
|
|
2416
2975
|
const offset = data.byteOffset;
|
|
@@ -2450,8 +3009,16 @@ var _BLAKE2 = class {
|
|
|
2450
3009
|
swap32IfBE(buffer32);
|
|
2451
3010
|
this.compress(buffer32, 0, true);
|
|
2452
3011
|
swap32IfBE(buffer32);
|
|
3012
|
+
if (out.byteOffset & 3) throw new RangeError("\"digestInto() output\" expected 4-byte aligned byteOffset, got " + out.byteOffset);
|
|
3013
|
+
const state = this.get();
|
|
2453
3014
|
const out32 = u32(out);
|
|
2454
|
-
|
|
3015
|
+
const full = Math.floor(this.outputLen / 4);
|
|
3016
|
+
for (let i = 0; i < full; i++) out32[i] = swap8IfBE(state[i]);
|
|
3017
|
+
const tail = this.outputLen % 4;
|
|
3018
|
+
if (!tail) return;
|
|
3019
|
+
const off = full * 4;
|
|
3020
|
+
const word = state[full];
|
|
3021
|
+
for (let i = 0; i < tail; i++) out[off + i] = word >>> 8 * i;
|
|
2455
3022
|
}
|
|
2456
3023
|
digest() {
|
|
2457
3024
|
const { buffer, outputLen } = this;
|
|
@@ -2476,7 +3043,7 @@ var _BLAKE2 = class {
|
|
|
2476
3043
|
return this._cloneInto();
|
|
2477
3044
|
}
|
|
2478
3045
|
};
|
|
2479
|
-
/** Internal blake2b hash class. */
|
|
3046
|
+
/** Internal blake2b hash class with state stored as LE u32 low/high halves. */
|
|
2480
3047
|
var _BLAKE2b = class extends _BLAKE2 {
|
|
2481
3048
|
v0l = B2B_IV[0] | 0;
|
|
2482
3049
|
v0h = B2B_IV[1] | 0;
|
|
@@ -2501,12 +3068,12 @@ var _BLAKE2b = class extends _BLAKE2 {
|
|
|
2501
3068
|
let { key, personalization, salt } = opts;
|
|
2502
3069
|
let keyLength = 0;
|
|
2503
3070
|
if (key !== void 0) {
|
|
2504
|
-
abytes(key, void 0, "key");
|
|
3071
|
+
abytes$1(key, void 0, "key");
|
|
2505
3072
|
keyLength = key.length;
|
|
2506
3073
|
}
|
|
2507
3074
|
this.v0l ^= this.outputLen | keyLength << 8 | 16842752;
|
|
2508
3075
|
if (salt !== void 0) {
|
|
2509
|
-
abytes(salt, void 0, "salt");
|
|
3076
|
+
abytes$1(salt, void 0, "salt");
|
|
2510
3077
|
const slt = u32(salt);
|
|
2511
3078
|
this.v4l ^= swap8IfBE(slt[0]);
|
|
2512
3079
|
this.v4h ^= swap8IfBE(slt[1]);
|
|
@@ -2514,7 +3081,7 @@ var _BLAKE2b = class extends _BLAKE2 {
|
|
|
2514
3081
|
this.v5h ^= swap8IfBE(slt[3]);
|
|
2515
3082
|
}
|
|
2516
3083
|
if (personalization !== void 0) {
|
|
2517
|
-
abytes(personalization, void 0, "personalization");
|
|
3084
|
+
abytes$1(personalization, void 0, "personalization");
|
|
2518
3085
|
const pers = u32(personalization);
|
|
2519
3086
|
this.v6l ^= swap8IfBE(pers[0]);
|
|
2520
3087
|
this.v6h ^= swap8IfBE(pers[1]);
|
|
@@ -2623,12 +3190,20 @@ var _BLAKE2b = class extends _BLAKE2 {
|
|
|
2623
3190
|
/**
|
|
2624
3191
|
* Blake2b hash function. 64-bit. 1.5x slower than blake2s in JS.
|
|
2625
3192
|
* @param msg - message that would be hashed
|
|
2626
|
-
* @param opts -
|
|
3193
|
+
* @param opts - Optional output, MAC, salt, and personalization settings.
|
|
3194
|
+
* `dkLen` must be 1..64 bytes; `salt` and `personalization`, if present,
|
|
3195
|
+
* must be 16 bytes each. See {@link Blake2Opts}.
|
|
3196
|
+
* @returns Digest bytes.
|
|
3197
|
+
* @example
|
|
3198
|
+
* Hash a message with Blake2b.
|
|
3199
|
+
* ```ts
|
|
3200
|
+
* blake2b(new Uint8Array([97, 98, 99]));
|
|
3201
|
+
* ```
|
|
2627
3202
|
*/
|
|
2628
3203
|
const blake2b = /* @__PURE__ */ createHasher((opts) => new _BLAKE2b(opts));
|
|
2629
3204
|
|
|
2630
3205
|
//#endregion
|
|
2631
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
3206
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/utils/dynamic-fields.mjs
|
|
2632
3207
|
function deriveDynamicFieldID(parentId, typeTag, key) {
|
|
2633
3208
|
const address = suiBcs.Address.serialize(parentId).toBytes();
|
|
2634
3209
|
const tag = suiBcs.TypeTag.serialize(typeTag).toBytes();
|
|
@@ -2643,11 +3218,11 @@ function deriveDynamicFieldID(parentId, typeTag, key) {
|
|
|
2643
3218
|
}
|
|
2644
3219
|
|
|
2645
3220
|
//#endregion
|
|
2646
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
2647
|
-
const PACKAGE_VERSION = "2.
|
|
3221
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/version.mjs
|
|
3222
|
+
const PACKAGE_VERSION = "2.20.1";
|
|
2648
3223
|
|
|
2649
3224
|
//#endregion
|
|
2650
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
3225
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/client/mvr.mjs
|
|
2651
3226
|
const NAME_SEPARATOR = "/";
|
|
2652
3227
|
const MVR_API_HEADER = { "Mvr-Source": `@mysten/sui@${PACKAGE_VERSION}` };
|
|
2653
3228
|
var MvrClient = class {
|
|
@@ -2893,7 +3468,7 @@ function getNamesFromTypeList(types) {
|
|
|
2893
3468
|
}
|
|
2894
3469
|
|
|
2895
3470
|
//#endregion
|
|
2896
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
3471
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/client/core.mjs
|
|
2897
3472
|
const DEFAULT_MVR_URLS = {
|
|
2898
3473
|
mainnet: "https://mainnet.mvr.mystenlabs.com",
|
|
2899
3474
|
testnet: "https://testnet.mvr.mystenlabs.com"
|
|
@@ -3023,7 +3598,841 @@ var CoreClient = class extends BaseClient {
|
|
|
3023
3598
|
};
|
|
3024
3599
|
|
|
3025
3600
|
//#endregion
|
|
3026
|
-
//#region ../../node_modules/.pnpm
|
|
3601
|
+
//#region ../../node_modules/.pnpm/valibot@1.4.2_typescript@6.0.3/node_modules/valibot/dist/index.mjs
|
|
3602
|
+
let store$4;
|
|
3603
|
+
const DEFAULT_CONFIG = {
|
|
3604
|
+
lang: void 0,
|
|
3605
|
+
message: void 0,
|
|
3606
|
+
abortEarly: void 0,
|
|
3607
|
+
abortPipeEarly: void 0
|
|
3608
|
+
};
|
|
3609
|
+
/**
|
|
3610
|
+
* Returns the global configuration.
|
|
3611
|
+
*
|
|
3612
|
+
* @param config The config to merge.
|
|
3613
|
+
*
|
|
3614
|
+
* @returns The configuration.
|
|
3615
|
+
*/
|
|
3616
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3617
|
+
function getGlobalConfig(config$1) {
|
|
3618
|
+
if (!config$1 && !store$4) return DEFAULT_CONFIG;
|
|
3619
|
+
return {
|
|
3620
|
+
lang: config$1?.lang ?? store$4?.lang,
|
|
3621
|
+
message: config$1?.message,
|
|
3622
|
+
abortEarly: config$1?.abortEarly ?? store$4?.abortEarly,
|
|
3623
|
+
abortPipeEarly: config$1?.abortPipeEarly ?? store$4?.abortPipeEarly
|
|
3624
|
+
};
|
|
3625
|
+
}
|
|
3626
|
+
let store$3;
|
|
3627
|
+
/**
|
|
3628
|
+
* Returns a global error message.
|
|
3629
|
+
*
|
|
3630
|
+
* @param lang The language of the message.
|
|
3631
|
+
*
|
|
3632
|
+
* @returns The error message.
|
|
3633
|
+
*/
|
|
3634
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3635
|
+
function getGlobalMessage(lang) {
|
|
3636
|
+
return store$3?.get(lang);
|
|
3637
|
+
}
|
|
3638
|
+
let store$2;
|
|
3639
|
+
/**
|
|
3640
|
+
* Returns a schema error message.
|
|
3641
|
+
*
|
|
3642
|
+
* @param lang The language of the message.
|
|
3643
|
+
*
|
|
3644
|
+
* @returns The error message.
|
|
3645
|
+
*/
|
|
3646
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3647
|
+
function getSchemaMessage(lang) {
|
|
3648
|
+
return store$2?.get(lang);
|
|
3649
|
+
}
|
|
3650
|
+
let store$1;
|
|
3651
|
+
/**
|
|
3652
|
+
* Returns a specific error message.
|
|
3653
|
+
*
|
|
3654
|
+
* @param reference The identifier reference.
|
|
3655
|
+
* @param lang The language of the message.
|
|
3656
|
+
*
|
|
3657
|
+
* @returns The error message.
|
|
3658
|
+
*/
|
|
3659
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3660
|
+
function getSpecificMessage(reference, lang) {
|
|
3661
|
+
return store$1?.get(reference)?.get(lang);
|
|
3662
|
+
}
|
|
3663
|
+
/**
|
|
3664
|
+
* Stringifies an unknown input to a literal or type string.
|
|
3665
|
+
*
|
|
3666
|
+
* @param input The unknown input.
|
|
3667
|
+
*
|
|
3668
|
+
* @returns A literal or type string.
|
|
3669
|
+
*
|
|
3670
|
+
* @internal
|
|
3671
|
+
*/
|
|
3672
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3673
|
+
function _stringify(input) {
|
|
3674
|
+
const type = typeof input;
|
|
3675
|
+
if (type === "string") return `"${input}"`;
|
|
3676
|
+
if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
|
|
3677
|
+
if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
|
3678
|
+
return type;
|
|
3679
|
+
}
|
|
3680
|
+
/**
|
|
3681
|
+
* Adds an issue to the dataset.
|
|
3682
|
+
*
|
|
3683
|
+
* @param context The issue context.
|
|
3684
|
+
* @param label The issue label.
|
|
3685
|
+
* @param dataset The input dataset.
|
|
3686
|
+
* @param config The configuration.
|
|
3687
|
+
* @param other The optional props.
|
|
3688
|
+
*
|
|
3689
|
+
* @internal
|
|
3690
|
+
*/
|
|
3691
|
+
function _addIssue(context, label, dataset, config$1, other) {
|
|
3692
|
+
const input = other && "input" in other ? other.input : dataset.value;
|
|
3693
|
+
const expected = other?.expected ?? context.expects ?? null;
|
|
3694
|
+
const received = other?.received ?? /* @__PURE__ */ _stringify(input);
|
|
3695
|
+
const issue = {
|
|
3696
|
+
kind: context.kind,
|
|
3697
|
+
type: context.type,
|
|
3698
|
+
input,
|
|
3699
|
+
expected,
|
|
3700
|
+
received,
|
|
3701
|
+
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
|
3702
|
+
requirement: context.requirement,
|
|
3703
|
+
path: other?.path,
|
|
3704
|
+
issues: other?.issues,
|
|
3705
|
+
lang: config$1.lang,
|
|
3706
|
+
abortEarly: config$1.abortEarly,
|
|
3707
|
+
abortPipeEarly: config$1.abortPipeEarly
|
|
3708
|
+
};
|
|
3709
|
+
const isSchema = context.kind === "schema";
|
|
3710
|
+
const message$1 = other?.message ?? context.message ?? /* @__PURE__ */ getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config$1.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);
|
|
3711
|
+
if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
|
|
3712
|
+
if (isSchema) dataset.typed = false;
|
|
3713
|
+
if (dataset.issues) dataset.issues.push(issue);
|
|
3714
|
+
else dataset.issues = [issue];
|
|
3715
|
+
}
|
|
3716
|
+
const _standardCache = /* @__PURE__ */ new WeakMap();
|
|
3717
|
+
/**
|
|
3718
|
+
* Returns the Standard Schema properties.
|
|
3719
|
+
*
|
|
3720
|
+
* @param context The schema context.
|
|
3721
|
+
*
|
|
3722
|
+
* @returns The Standard Schema properties.
|
|
3723
|
+
*/
|
|
3724
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3725
|
+
function _getStandardProps(context) {
|
|
3726
|
+
let cached = _standardCache.get(context);
|
|
3727
|
+
if (!cached) {
|
|
3728
|
+
cached = {
|
|
3729
|
+
version: 1,
|
|
3730
|
+
vendor: "valibot",
|
|
3731
|
+
validate(value$1) {
|
|
3732
|
+
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
3733
|
+
}
|
|
3734
|
+
};
|
|
3735
|
+
_standardCache.set(context, cached);
|
|
3736
|
+
}
|
|
3737
|
+
return cached;
|
|
3738
|
+
}
|
|
3739
|
+
/**
|
|
3740
|
+
* Disallows inherited object properties and prevents object prototype
|
|
3741
|
+
* pollution by disallowing certain keys.
|
|
3742
|
+
*
|
|
3743
|
+
* @param object The object to check.
|
|
3744
|
+
* @param key The key to check.
|
|
3745
|
+
*
|
|
3746
|
+
* @returns Whether the key is allowed.
|
|
3747
|
+
*
|
|
3748
|
+
* @internal
|
|
3749
|
+
*/
|
|
3750
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3751
|
+
function _isValidObjectKey(object$1, key) {
|
|
3752
|
+
return Object.prototype.hasOwnProperty.call(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
|
|
3753
|
+
}
|
|
3754
|
+
/**
|
|
3755
|
+
* Joins multiple `expects` values with the given separator.
|
|
3756
|
+
*
|
|
3757
|
+
* @param values The `expects` values.
|
|
3758
|
+
* @param separator The separator.
|
|
3759
|
+
*
|
|
3760
|
+
* @returns The joined `expects` property.
|
|
3761
|
+
*
|
|
3762
|
+
* @internal
|
|
3763
|
+
*/
|
|
3764
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3765
|
+
function _joinExpects(values$1, separator) {
|
|
3766
|
+
const list = [...new Set(values$1)];
|
|
3767
|
+
if (list.length > 1) return `(${list.join(` ${separator} `)})`;
|
|
3768
|
+
return list[0] ?? "never";
|
|
3769
|
+
}
|
|
3770
|
+
/**
|
|
3771
|
+
* A Valibot error with useful information.
|
|
3772
|
+
*/
|
|
3773
|
+
var ValiError = class extends Error {
|
|
3774
|
+
/**
|
|
3775
|
+
* Creates a Valibot error with useful information.
|
|
3776
|
+
*
|
|
3777
|
+
* @param issues The error issues.
|
|
3778
|
+
*/
|
|
3779
|
+
constructor(issues) {
|
|
3780
|
+
super(issues[0].message);
|
|
3781
|
+
this.name = "ValiError";
|
|
3782
|
+
this.issues = issues;
|
|
3783
|
+
}
|
|
3784
|
+
};
|
|
3785
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3786
|
+
function check(requirement, message$1) {
|
|
3787
|
+
return {
|
|
3788
|
+
kind: "validation",
|
|
3789
|
+
type: "check",
|
|
3790
|
+
reference: check,
|
|
3791
|
+
async: false,
|
|
3792
|
+
expects: null,
|
|
3793
|
+
requirement,
|
|
3794
|
+
message: message$1,
|
|
3795
|
+
"~run"(dataset, config$1) {
|
|
3796
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "input", dataset, config$1);
|
|
3797
|
+
return dataset;
|
|
3798
|
+
}
|
|
3799
|
+
};
|
|
3800
|
+
}
|
|
3801
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3802
|
+
function integer(message$1) {
|
|
3803
|
+
return {
|
|
3804
|
+
kind: "validation",
|
|
3805
|
+
type: "integer",
|
|
3806
|
+
reference: integer,
|
|
3807
|
+
async: false,
|
|
3808
|
+
expects: null,
|
|
3809
|
+
requirement: Number.isInteger,
|
|
3810
|
+
message: message$1,
|
|
3811
|
+
"~run"(dataset, config$1) {
|
|
3812
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "integer", dataset, config$1);
|
|
3813
|
+
return dataset;
|
|
3814
|
+
}
|
|
3815
|
+
};
|
|
3816
|
+
}
|
|
3817
|
+
/**
|
|
3818
|
+
* Creates a custom transformation action.
|
|
3819
|
+
*
|
|
3820
|
+
* @param operation The transformation operation.
|
|
3821
|
+
*
|
|
3822
|
+
* @returns A transform action.
|
|
3823
|
+
*/
|
|
3824
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3825
|
+
function transform(operation) {
|
|
3826
|
+
return {
|
|
3827
|
+
kind: "transformation",
|
|
3828
|
+
type: "transform",
|
|
3829
|
+
reference: transform,
|
|
3830
|
+
async: false,
|
|
3831
|
+
operation,
|
|
3832
|
+
"~run"(dataset) {
|
|
3833
|
+
dataset.value = this.operation(dataset.value);
|
|
3834
|
+
return dataset;
|
|
3835
|
+
}
|
|
3836
|
+
};
|
|
3837
|
+
}
|
|
3838
|
+
const ABORT_EARLY_CONFIG = { abortEarly: true };
|
|
3839
|
+
/**
|
|
3840
|
+
* Returns the fallback value of the schema.
|
|
3841
|
+
*
|
|
3842
|
+
* @param schema The schema to get it from.
|
|
3843
|
+
* @param dataset The output dataset if available.
|
|
3844
|
+
* @param config The config if available.
|
|
3845
|
+
*
|
|
3846
|
+
* @returns The fallback value.
|
|
3847
|
+
*/
|
|
3848
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3849
|
+
function getFallback(schema, dataset, config$1) {
|
|
3850
|
+
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
3851
|
+
}
|
|
3852
|
+
/**
|
|
3853
|
+
* Returns the default value of the schema.
|
|
3854
|
+
*
|
|
3855
|
+
* @param schema The schema to get it from.
|
|
3856
|
+
* @param dataset The input dataset if available.
|
|
3857
|
+
* @param config The config if available.
|
|
3858
|
+
*
|
|
3859
|
+
* @returns The default value.
|
|
3860
|
+
*/
|
|
3861
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3862
|
+
function getDefault(schema, dataset, config$1) {
|
|
3863
|
+
return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
|
|
3864
|
+
}
|
|
3865
|
+
/**
|
|
3866
|
+
* Checks if the input matches the schema. By using a type predicate, this
|
|
3867
|
+
* function can be used as a type guard.
|
|
3868
|
+
*
|
|
3869
|
+
* @param schema The schema to be used.
|
|
3870
|
+
* @param input The input to be tested.
|
|
3871
|
+
*
|
|
3872
|
+
* @returns Whether the input matches the schema.
|
|
3873
|
+
*/
|
|
3874
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3875
|
+
function is(schema, input) {
|
|
3876
|
+
return !schema["~run"]({ value: input }, ABORT_EARLY_CONFIG).issues;
|
|
3877
|
+
}
|
|
3878
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3879
|
+
function array(item, message$1) {
|
|
3880
|
+
return {
|
|
3881
|
+
kind: "schema",
|
|
3882
|
+
type: "array",
|
|
3883
|
+
reference: array,
|
|
3884
|
+
expects: "Array",
|
|
3885
|
+
async: false,
|
|
3886
|
+
item,
|
|
3887
|
+
message: message$1,
|
|
3888
|
+
get "~standard"() {
|
|
3889
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
3890
|
+
},
|
|
3891
|
+
"~run"(dataset, config$1) {
|
|
3892
|
+
const input = dataset.value;
|
|
3893
|
+
if (Array.isArray(input)) {
|
|
3894
|
+
dataset.typed = true;
|
|
3895
|
+
dataset.value = [];
|
|
3896
|
+
for (let key = 0; key < input.length; key++) {
|
|
3897
|
+
const value$1 = input[key];
|
|
3898
|
+
const itemDataset = this.item["~run"]({ value: value$1 }, config$1);
|
|
3899
|
+
if (itemDataset.issues) {
|
|
3900
|
+
const pathItem = {
|
|
3901
|
+
type: "array",
|
|
3902
|
+
origin: "value",
|
|
3903
|
+
input,
|
|
3904
|
+
key,
|
|
3905
|
+
value: value$1
|
|
3906
|
+
};
|
|
3907
|
+
for (const issue of itemDataset.issues) {
|
|
3908
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
3909
|
+
else issue.path = [pathItem];
|
|
3910
|
+
dataset.issues?.push(issue);
|
|
3911
|
+
}
|
|
3912
|
+
if (!dataset.issues) dataset.issues = itemDataset.issues;
|
|
3913
|
+
if (config$1.abortEarly) {
|
|
3914
|
+
dataset.typed = false;
|
|
3915
|
+
break;
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
if (!itemDataset.typed) dataset.typed = false;
|
|
3919
|
+
dataset.value.push(itemDataset.value);
|
|
3920
|
+
}
|
|
3921
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
3922
|
+
return dataset;
|
|
3923
|
+
}
|
|
3924
|
+
};
|
|
3925
|
+
}
|
|
3926
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3927
|
+
function bigint(message$1) {
|
|
3928
|
+
return {
|
|
3929
|
+
kind: "schema",
|
|
3930
|
+
type: "bigint",
|
|
3931
|
+
reference: bigint,
|
|
3932
|
+
expects: "bigint",
|
|
3933
|
+
async: false,
|
|
3934
|
+
message: message$1,
|
|
3935
|
+
get "~standard"() {
|
|
3936
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
3937
|
+
},
|
|
3938
|
+
"~run"(dataset, config$1) {
|
|
3939
|
+
if (typeof dataset.value === "bigint") dataset.typed = true;
|
|
3940
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
3941
|
+
return dataset;
|
|
3942
|
+
}
|
|
3943
|
+
};
|
|
3944
|
+
}
|
|
3945
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3946
|
+
function boolean(message$1) {
|
|
3947
|
+
return {
|
|
3948
|
+
kind: "schema",
|
|
3949
|
+
type: "boolean",
|
|
3950
|
+
reference: boolean,
|
|
3951
|
+
expects: "boolean",
|
|
3952
|
+
async: false,
|
|
3953
|
+
message: message$1,
|
|
3954
|
+
get "~standard"() {
|
|
3955
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
3956
|
+
},
|
|
3957
|
+
"~run"(dataset, config$1) {
|
|
3958
|
+
if (typeof dataset.value === "boolean") dataset.typed = true;
|
|
3959
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
3960
|
+
return dataset;
|
|
3961
|
+
}
|
|
3962
|
+
};
|
|
3963
|
+
}
|
|
3964
|
+
/**
|
|
3965
|
+
* Creates a lazy schema.
|
|
3966
|
+
*
|
|
3967
|
+
* @param getter The schema getter.
|
|
3968
|
+
*
|
|
3969
|
+
* @returns A lazy schema.
|
|
3970
|
+
*/
|
|
3971
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3972
|
+
function lazy(getter) {
|
|
3973
|
+
return {
|
|
3974
|
+
kind: "schema",
|
|
3975
|
+
type: "lazy",
|
|
3976
|
+
reference: lazy,
|
|
3977
|
+
expects: "unknown",
|
|
3978
|
+
async: false,
|
|
3979
|
+
getter,
|
|
3980
|
+
get "~standard"() {
|
|
3981
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
3982
|
+
},
|
|
3983
|
+
"~run"(dataset, config$1) {
|
|
3984
|
+
return this.getter(dataset.value)["~run"](dataset, config$1);
|
|
3985
|
+
}
|
|
3986
|
+
};
|
|
3987
|
+
}
|
|
3988
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
3989
|
+
function literal(literal_, message$1) {
|
|
3990
|
+
return {
|
|
3991
|
+
kind: "schema",
|
|
3992
|
+
type: "literal",
|
|
3993
|
+
reference: literal,
|
|
3994
|
+
expects: /* @__PURE__ */ _stringify(literal_),
|
|
3995
|
+
async: false,
|
|
3996
|
+
literal: literal_,
|
|
3997
|
+
message: message$1,
|
|
3998
|
+
get "~standard"() {
|
|
3999
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4000
|
+
},
|
|
4001
|
+
"~run"(dataset, config$1) {
|
|
4002
|
+
if (dataset.value === this.literal) dataset.typed = true;
|
|
4003
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
4004
|
+
return dataset;
|
|
4005
|
+
}
|
|
4006
|
+
};
|
|
4007
|
+
}
|
|
4008
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4009
|
+
function nullable(wrapped, default_) {
|
|
4010
|
+
return {
|
|
4011
|
+
kind: "schema",
|
|
4012
|
+
type: "nullable",
|
|
4013
|
+
reference: nullable,
|
|
4014
|
+
expects: `(${wrapped.expects} | null)`,
|
|
4015
|
+
async: false,
|
|
4016
|
+
wrapped,
|
|
4017
|
+
default: default_,
|
|
4018
|
+
get "~standard"() {
|
|
4019
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4020
|
+
},
|
|
4021
|
+
"~run"(dataset, config$1) {
|
|
4022
|
+
if (dataset.value === null) {
|
|
4023
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
4024
|
+
if (dataset.value === null) {
|
|
4025
|
+
dataset.typed = true;
|
|
4026
|
+
return dataset;
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
4030
|
+
}
|
|
4031
|
+
};
|
|
4032
|
+
}
|
|
4033
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4034
|
+
function nullish(wrapped, default_) {
|
|
4035
|
+
return {
|
|
4036
|
+
kind: "schema",
|
|
4037
|
+
type: "nullish",
|
|
4038
|
+
reference: nullish,
|
|
4039
|
+
expects: `(${wrapped.expects} | null | undefined)`,
|
|
4040
|
+
async: false,
|
|
4041
|
+
wrapped,
|
|
4042
|
+
default: default_,
|
|
4043
|
+
get "~standard"() {
|
|
4044
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4045
|
+
},
|
|
4046
|
+
"~run"(dataset, config$1) {
|
|
4047
|
+
if (dataset.value === null || dataset.value === void 0) {
|
|
4048
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
4049
|
+
if (dataset.value === null || dataset.value === void 0) {
|
|
4050
|
+
dataset.typed = true;
|
|
4051
|
+
return dataset;
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
4055
|
+
}
|
|
4056
|
+
};
|
|
4057
|
+
}
|
|
4058
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4059
|
+
function number(message$1) {
|
|
4060
|
+
return {
|
|
4061
|
+
kind: "schema",
|
|
4062
|
+
type: "number",
|
|
4063
|
+
reference: number,
|
|
4064
|
+
expects: "number",
|
|
4065
|
+
async: false,
|
|
4066
|
+
message: message$1,
|
|
4067
|
+
get "~standard"() {
|
|
4068
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4069
|
+
},
|
|
4070
|
+
"~run"(dataset, config$1) {
|
|
4071
|
+
if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
|
|
4072
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
4073
|
+
return dataset;
|
|
4074
|
+
}
|
|
4075
|
+
};
|
|
4076
|
+
}
|
|
4077
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4078
|
+
function object(entries$1, message$1) {
|
|
4079
|
+
return {
|
|
4080
|
+
kind: "schema",
|
|
4081
|
+
type: "object",
|
|
4082
|
+
reference: object,
|
|
4083
|
+
expects: "Object",
|
|
4084
|
+
async: false,
|
|
4085
|
+
entries: entries$1,
|
|
4086
|
+
message: message$1,
|
|
4087
|
+
get "~standard"() {
|
|
4088
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4089
|
+
},
|
|
4090
|
+
"~run"(dataset, config$1) {
|
|
4091
|
+
const input = dataset.value;
|
|
4092
|
+
if (input && typeof input === "object") {
|
|
4093
|
+
dataset.typed = true;
|
|
4094
|
+
dataset.value = {};
|
|
4095
|
+
for (const key in this.entries) {
|
|
4096
|
+
const valueSchema = this.entries[key];
|
|
4097
|
+
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
4098
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
4099
|
+
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
4100
|
+
if (valueDataset.issues) {
|
|
4101
|
+
const pathItem = {
|
|
4102
|
+
type: "object",
|
|
4103
|
+
origin: "value",
|
|
4104
|
+
input,
|
|
4105
|
+
key,
|
|
4106
|
+
value: value$1
|
|
4107
|
+
};
|
|
4108
|
+
for (const issue of valueDataset.issues) {
|
|
4109
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
4110
|
+
else issue.path = [pathItem];
|
|
4111
|
+
dataset.issues?.push(issue);
|
|
4112
|
+
}
|
|
4113
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
4114
|
+
if (config$1.abortEarly) {
|
|
4115
|
+
dataset.typed = false;
|
|
4116
|
+
break;
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
4120
|
+
dataset.value[key] = valueDataset.value;
|
|
4121
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
4122
|
+
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
4123
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
4124
|
+
input: void 0,
|
|
4125
|
+
expected: `"${key}"`,
|
|
4126
|
+
path: [{
|
|
4127
|
+
type: "object",
|
|
4128
|
+
origin: "key",
|
|
4129
|
+
input,
|
|
4130
|
+
key,
|
|
4131
|
+
value: input[key]
|
|
4132
|
+
}]
|
|
4133
|
+
});
|
|
4134
|
+
if (config$1.abortEarly) break;
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
4138
|
+
return dataset;
|
|
4139
|
+
}
|
|
4140
|
+
};
|
|
4141
|
+
}
|
|
4142
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4143
|
+
function optional(wrapped, default_) {
|
|
4144
|
+
return {
|
|
4145
|
+
kind: "schema",
|
|
4146
|
+
type: "optional",
|
|
4147
|
+
reference: optional,
|
|
4148
|
+
expects: `(${wrapped.expects} | undefined)`,
|
|
4149
|
+
async: false,
|
|
4150
|
+
wrapped,
|
|
4151
|
+
default: default_,
|
|
4152
|
+
get "~standard"() {
|
|
4153
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4154
|
+
},
|
|
4155
|
+
"~run"(dataset, config$1) {
|
|
4156
|
+
if (dataset.value === void 0) {
|
|
4157
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
4158
|
+
if (dataset.value === void 0) {
|
|
4159
|
+
dataset.typed = true;
|
|
4160
|
+
return dataset;
|
|
4161
|
+
}
|
|
4162
|
+
}
|
|
4163
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
4164
|
+
}
|
|
4165
|
+
};
|
|
4166
|
+
}
|
|
4167
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4168
|
+
function picklist(options, message$1) {
|
|
4169
|
+
return {
|
|
4170
|
+
kind: "schema",
|
|
4171
|
+
type: "picklist",
|
|
4172
|
+
reference: picklist,
|
|
4173
|
+
expects: /* @__PURE__ */ _joinExpects(options.map(_stringify), "|"),
|
|
4174
|
+
async: false,
|
|
4175
|
+
options,
|
|
4176
|
+
message: message$1,
|
|
4177
|
+
get "~standard"() {
|
|
4178
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4179
|
+
},
|
|
4180
|
+
"~run"(dataset, config$1) {
|
|
4181
|
+
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
4182
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
4183
|
+
return dataset;
|
|
4184
|
+
}
|
|
4185
|
+
};
|
|
4186
|
+
}
|
|
4187
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4188
|
+
function record(key, value$1, message$1) {
|
|
4189
|
+
return {
|
|
4190
|
+
kind: "schema",
|
|
4191
|
+
type: "record",
|
|
4192
|
+
reference: record,
|
|
4193
|
+
expects: "Object",
|
|
4194
|
+
async: false,
|
|
4195
|
+
key,
|
|
4196
|
+
value: value$1,
|
|
4197
|
+
message: message$1,
|
|
4198
|
+
get "~standard"() {
|
|
4199
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4200
|
+
},
|
|
4201
|
+
"~run"(dataset, config$1) {
|
|
4202
|
+
const input = dataset.value;
|
|
4203
|
+
if (input && typeof input === "object") {
|
|
4204
|
+
dataset.typed = true;
|
|
4205
|
+
dataset.value = {};
|
|
4206
|
+
for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
|
|
4207
|
+
const entryValue = input[entryKey];
|
|
4208
|
+
const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
|
|
4209
|
+
if (keyDataset.issues) {
|
|
4210
|
+
const pathItem = {
|
|
4211
|
+
type: "object",
|
|
4212
|
+
origin: "key",
|
|
4213
|
+
input,
|
|
4214
|
+
key: entryKey,
|
|
4215
|
+
value: entryValue
|
|
4216
|
+
};
|
|
4217
|
+
for (const issue of keyDataset.issues) {
|
|
4218
|
+
issue.path = [pathItem];
|
|
4219
|
+
dataset.issues?.push(issue);
|
|
4220
|
+
}
|
|
4221
|
+
if (!dataset.issues) dataset.issues = keyDataset.issues;
|
|
4222
|
+
if (config$1.abortEarly) {
|
|
4223
|
+
dataset.typed = false;
|
|
4224
|
+
break;
|
|
4225
|
+
}
|
|
4226
|
+
}
|
|
4227
|
+
const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
|
|
4228
|
+
if (valueDataset.issues) {
|
|
4229
|
+
const pathItem = {
|
|
4230
|
+
type: "object",
|
|
4231
|
+
origin: "value",
|
|
4232
|
+
input,
|
|
4233
|
+
key: entryKey,
|
|
4234
|
+
value: entryValue
|
|
4235
|
+
};
|
|
4236
|
+
for (const issue of valueDataset.issues) {
|
|
4237
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
4238
|
+
else issue.path = [pathItem];
|
|
4239
|
+
dataset.issues?.push(issue);
|
|
4240
|
+
}
|
|
4241
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
4242
|
+
if (config$1.abortEarly) {
|
|
4243
|
+
dataset.typed = false;
|
|
4244
|
+
break;
|
|
4245
|
+
}
|
|
4246
|
+
}
|
|
4247
|
+
if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
|
|
4248
|
+
if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
|
|
4249
|
+
}
|
|
4250
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
4251
|
+
return dataset;
|
|
4252
|
+
}
|
|
4253
|
+
};
|
|
4254
|
+
}
|
|
4255
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4256
|
+
function string(message$1) {
|
|
4257
|
+
return {
|
|
4258
|
+
kind: "schema",
|
|
4259
|
+
type: "string",
|
|
4260
|
+
reference: string,
|
|
4261
|
+
expects: "string",
|
|
4262
|
+
async: false,
|
|
4263
|
+
message: message$1,
|
|
4264
|
+
get "~standard"() {
|
|
4265
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4266
|
+
},
|
|
4267
|
+
"~run"(dataset, config$1) {
|
|
4268
|
+
if (typeof dataset.value === "string") dataset.typed = true;
|
|
4269
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
4270
|
+
return dataset;
|
|
4271
|
+
}
|
|
4272
|
+
};
|
|
4273
|
+
}
|
|
4274
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4275
|
+
function tuple(items, message$1) {
|
|
4276
|
+
return {
|
|
4277
|
+
kind: "schema",
|
|
4278
|
+
type: "tuple",
|
|
4279
|
+
reference: tuple,
|
|
4280
|
+
expects: "Array",
|
|
4281
|
+
async: false,
|
|
4282
|
+
items,
|
|
4283
|
+
message: message$1,
|
|
4284
|
+
get "~standard"() {
|
|
4285
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4286
|
+
},
|
|
4287
|
+
"~run"(dataset, config$1) {
|
|
4288
|
+
const input = dataset.value;
|
|
4289
|
+
if (Array.isArray(input)) {
|
|
4290
|
+
dataset.typed = true;
|
|
4291
|
+
dataset.value = [];
|
|
4292
|
+
for (let key = 0; key < this.items.length; key++) {
|
|
4293
|
+
const value$1 = input[key];
|
|
4294
|
+
const itemDataset = this.items[key]["~run"]({ value: value$1 }, config$1);
|
|
4295
|
+
if (itemDataset.issues) {
|
|
4296
|
+
const pathItem = {
|
|
4297
|
+
type: "array",
|
|
4298
|
+
origin: "value",
|
|
4299
|
+
input,
|
|
4300
|
+
key,
|
|
4301
|
+
value: value$1
|
|
4302
|
+
};
|
|
4303
|
+
for (const issue of itemDataset.issues) {
|
|
4304
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
4305
|
+
else issue.path = [pathItem];
|
|
4306
|
+
dataset.issues?.push(issue);
|
|
4307
|
+
}
|
|
4308
|
+
if (!dataset.issues) dataset.issues = itemDataset.issues;
|
|
4309
|
+
if (config$1.abortEarly) {
|
|
4310
|
+
dataset.typed = false;
|
|
4311
|
+
break;
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
if (!itemDataset.typed) dataset.typed = false;
|
|
4315
|
+
dataset.value.push(itemDataset.value);
|
|
4316
|
+
}
|
|
4317
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
4318
|
+
return dataset;
|
|
4319
|
+
}
|
|
4320
|
+
};
|
|
4321
|
+
}
|
|
4322
|
+
/**
|
|
4323
|
+
* Returns the sub issues of the provided datasets for the union issue.
|
|
4324
|
+
*
|
|
4325
|
+
* @param datasets The datasets.
|
|
4326
|
+
*
|
|
4327
|
+
* @returns The sub issues.
|
|
4328
|
+
*
|
|
4329
|
+
* @internal
|
|
4330
|
+
*/
|
|
4331
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4332
|
+
function _subIssues(datasets) {
|
|
4333
|
+
let issues;
|
|
4334
|
+
if (datasets) for (const dataset of datasets) if (issues) for (const issue of dataset.issues) issues.push(issue);
|
|
4335
|
+
else issues = dataset.issues;
|
|
4336
|
+
return issues;
|
|
4337
|
+
}
|
|
4338
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4339
|
+
function union(options, message$1) {
|
|
4340
|
+
return {
|
|
4341
|
+
kind: "schema",
|
|
4342
|
+
type: "union",
|
|
4343
|
+
reference: union,
|
|
4344
|
+
expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
|
|
4345
|
+
async: false,
|
|
4346
|
+
options,
|
|
4347
|
+
message: message$1,
|
|
4348
|
+
get "~standard"() {
|
|
4349
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4350
|
+
},
|
|
4351
|
+
"~run"(dataset, config$1) {
|
|
4352
|
+
let validDataset;
|
|
4353
|
+
let typedDatasets;
|
|
4354
|
+
let untypedDatasets;
|
|
4355
|
+
for (const schema of this.options) {
|
|
4356
|
+
const optionDataset = schema["~run"]({ value: dataset.value }, config$1);
|
|
4357
|
+
if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
|
|
4358
|
+
else typedDatasets = [optionDataset];
|
|
4359
|
+
else {
|
|
4360
|
+
validDataset = optionDataset;
|
|
4361
|
+
break;
|
|
4362
|
+
}
|
|
4363
|
+
else if (untypedDatasets) untypedDatasets.push(optionDataset);
|
|
4364
|
+
else untypedDatasets = [optionDataset];
|
|
4365
|
+
}
|
|
4366
|
+
if (validDataset) return validDataset;
|
|
4367
|
+
if (typedDatasets) {
|
|
4368
|
+
if (typedDatasets.length === 1) return typedDatasets[0];
|
|
4369
|
+
_addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
|
|
4370
|
+
dataset.typed = true;
|
|
4371
|
+
} else if (untypedDatasets?.length === 1) return untypedDatasets[0];
|
|
4372
|
+
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
4373
|
+
return dataset;
|
|
4374
|
+
}
|
|
4375
|
+
};
|
|
4376
|
+
}
|
|
4377
|
+
/**
|
|
4378
|
+
* Creates a unknown schema.
|
|
4379
|
+
*
|
|
4380
|
+
* @returns A unknown schema.
|
|
4381
|
+
*/
|
|
4382
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4383
|
+
function unknown() {
|
|
4384
|
+
return {
|
|
4385
|
+
kind: "schema",
|
|
4386
|
+
type: "unknown",
|
|
4387
|
+
reference: unknown,
|
|
4388
|
+
expects: "unknown",
|
|
4389
|
+
async: false,
|
|
4390
|
+
get "~standard"() {
|
|
4391
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4392
|
+
},
|
|
4393
|
+
"~run"(dataset) {
|
|
4394
|
+
dataset.typed = true;
|
|
4395
|
+
return dataset;
|
|
4396
|
+
}
|
|
4397
|
+
};
|
|
4398
|
+
}
|
|
4399
|
+
/**
|
|
4400
|
+
* Parses an unknown input based on a schema.
|
|
4401
|
+
*
|
|
4402
|
+
* @param schema The schema to be used.
|
|
4403
|
+
* @param input The input to be parsed.
|
|
4404
|
+
* @param config The parse configuration.
|
|
4405
|
+
*
|
|
4406
|
+
* @returns The parsed input.
|
|
4407
|
+
*/
|
|
4408
|
+
function parse(schema, input, config$1) {
|
|
4409
|
+
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
4410
|
+
if (dataset.issues) throw new ValiError(dataset.issues);
|
|
4411
|
+
return dataset.value;
|
|
4412
|
+
}
|
|
4413
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
4414
|
+
function pipe(...pipe$1) {
|
|
4415
|
+
return {
|
|
4416
|
+
...pipe$1[0],
|
|
4417
|
+
pipe: pipe$1,
|
|
4418
|
+
get "~standard"() {
|
|
4419
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
4420
|
+
},
|
|
4421
|
+
"~run"(dataset, config$1) {
|
|
4422
|
+
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
4423
|
+
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
4424
|
+
dataset.typed = false;
|
|
4425
|
+
break;
|
|
4426
|
+
}
|
|
4427
|
+
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
|
|
4428
|
+
}
|
|
4429
|
+
return dataset;
|
|
4430
|
+
}
|
|
4431
|
+
};
|
|
4432
|
+
}
|
|
4433
|
+
|
|
4434
|
+
//#endregion
|
|
4435
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/transactions/data/internal.mjs
|
|
3027
4436
|
function safeEnum(options) {
|
|
3028
4437
|
return union(Object.keys(options).map((key) => withKind(key, object({ [key]: options[key] }))));
|
|
3029
4438
|
}
|
|
@@ -3212,7 +4621,7 @@ const TransactionDataSchema = object({
|
|
|
3212
4621
|
});
|
|
3213
4622
|
|
|
3214
4623
|
//#endregion
|
|
3215
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
4624
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/transactions/data/v1.mjs
|
|
3216
4625
|
const ObjectRef = object({
|
|
3217
4626
|
digest: string(),
|
|
3218
4627
|
objectId: string(),
|
|
@@ -3555,7 +4964,7 @@ function parseV1TransactionArgument(arg) {
|
|
|
3555
4964
|
}
|
|
3556
4965
|
|
|
3557
4966
|
//#endregion
|
|
3558
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
4967
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/transactions/hash.mjs
|
|
3559
4968
|
/**
|
|
3560
4969
|
* Generates a Blake2b hash of typed data as a base64 string.
|
|
3561
4970
|
*
|
|
@@ -3571,7 +4980,7 @@ function hashTypedData(typeTag, data) {
|
|
|
3571
4980
|
}
|
|
3572
4981
|
|
|
3573
4982
|
//#endregion
|
|
3574
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
4983
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/transactions/utils.mjs
|
|
3575
4984
|
function getIdFromCallArg(arg) {
|
|
3576
4985
|
if (typeof arg === "string") return normalizeSuiAddress(arg);
|
|
3577
4986
|
if (arg.Object) {
|
|
@@ -3644,7 +5053,7 @@ function remapCommandArguments(command, inputMapping, commandMapping) {
|
|
|
3644
5053
|
}
|
|
3645
5054
|
|
|
3646
5055
|
//#endregion
|
|
3647
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
5056
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/transactions/TransactionData.mjs
|
|
3648
5057
|
function prepareSuiAddress(address) {
|
|
3649
5058
|
return normalizeSuiAddress(address).replace("0x", "");
|
|
3650
5059
|
}
|
|
@@ -3915,7 +5324,7 @@ var TransactionDataBuilder = class TransactionDataBuilder {
|
|
|
3915
5324
|
};
|
|
3916
5325
|
|
|
3917
5326
|
//#endregion
|
|
3918
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
5327
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/client/utils.mjs
|
|
3919
5328
|
const ordinalRules = new Intl.PluralRules("en-US", { type: "ordinal" });
|
|
3920
5329
|
const ordinalSuffixes = /* @__PURE__ */ new Map([
|
|
3921
5330
|
["one", "st"],
|
|
@@ -3963,7 +5372,7 @@ const MinimalTransactionEffectsNoError = suiBcs.enum("MinimalTransactionEffectsN
|
|
|
3963
5372
|
});
|
|
3964
5373
|
|
|
3965
5374
|
//#endregion
|
|
3966
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
5375
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/client/errors.mjs
|
|
3967
5376
|
var SuiClientError = class extends Error {};
|
|
3968
5377
|
var SimulationError = class extends SuiClientError {
|
|
3969
5378
|
constructor(message, options) {
|
|
@@ -3973,7 +5382,7 @@ var SimulationError = class extends SuiClientError {
|
|
|
3973
5382
|
};
|
|
3974
5383
|
|
|
3975
5384
|
//#endregion
|
|
3976
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
5385
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/utils/constants.mjs
|
|
3977
5386
|
const MOVE_STDLIB_ADDRESS = "0x0000000000000000000000000000000000000000000000000000000000000001";
|
|
3978
5387
|
const SUI_FRAMEWORK_ADDRESS = "0x0000000000000000000000000000000000000000000000000000000000000002";
|
|
3979
5388
|
const SUI_CLOCK_OBJECT_ID = "0x0000000000000000000000000000000000000000000000000000000000000006";
|
|
@@ -7222,7 +8631,7 @@ var require_commonjs$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7222
8631
|
}));
|
|
7223
8632
|
|
|
7224
8633
|
//#endregion
|
|
7225
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
8634
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/google/protobuf/struct.mjs
|
|
7226
8635
|
var import_commonjs$2 = require_commonjs$2();
|
|
7227
8636
|
/**
|
|
7228
8637
|
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
@@ -7427,7 +8836,7 @@ var ListValue$Type = class extends import_commonjs$2.MessageType {
|
|
|
7427
8836
|
const ListValue = new ListValue$Type();
|
|
7428
8837
|
|
|
7429
8838
|
//#endregion
|
|
7430
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
8839
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/move_package.mjs
|
|
7431
8840
|
/**
|
|
7432
8841
|
* @generated from protobuf enum sui.rpc.v2.DatatypeDescriptor.DatatypeKind
|
|
7433
8842
|
*/
|
|
@@ -7997,7 +9406,7 @@ var Linkage$Type = class extends import_commonjs$2.MessageType {
|
|
|
7997
9406
|
const Linkage = new Linkage$Type();
|
|
7998
9407
|
|
|
7999
9408
|
//#endregion
|
|
8000
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9409
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/owner.mjs
|
|
8001
9410
|
/**
|
|
8002
9411
|
* @generated from protobuf enum sui.rpc.v2.Owner.OwnerKind
|
|
8003
9412
|
*/
|
|
@@ -8062,7 +9471,7 @@ var Owner$Type = class extends import_commonjs$2.MessageType {
|
|
|
8062
9471
|
const Owner = new Owner$Type();
|
|
8063
9472
|
|
|
8064
9473
|
//#endregion
|
|
8065
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9474
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/argument.mjs
|
|
8066
9475
|
/**
|
|
8067
9476
|
* @generated from protobuf enum sui.rpc.v2.Argument.ArgumentKind
|
|
8068
9477
|
*/
|
|
@@ -8132,7 +9541,7 @@ var Argument$Type = class extends import_commonjs$2.MessageType {
|
|
|
8132
9541
|
const Argument = new Argument$Type();
|
|
8133
9542
|
|
|
8134
9543
|
//#endregion
|
|
8135
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9544
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/input.mjs
|
|
8136
9545
|
/**
|
|
8137
9546
|
* @generated from protobuf enum sui.rpc.v2.Input.InputKind
|
|
8138
9547
|
*/
|
|
@@ -8323,7 +9732,7 @@ var FundsWithdrawal$Type = class extends import_commonjs$2.MessageType {
|
|
|
8323
9732
|
const FundsWithdrawal = new FundsWithdrawal$Type();
|
|
8324
9733
|
|
|
8325
9734
|
//#endregion
|
|
8326
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9735
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/google/protobuf/duration.mjs
|
|
8327
9736
|
var Duration$Type = class extends import_commonjs$2.MessageType {
|
|
8328
9737
|
constructor() {
|
|
8329
9738
|
super("google.protobuf.Duration", [{
|
|
@@ -8381,7 +9790,7 @@ var Duration$Type = class extends import_commonjs$2.MessageType {
|
|
|
8381
9790
|
const Duration = new Duration$Type();
|
|
8382
9791
|
|
|
8383
9792
|
//#endregion
|
|
8384
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9793
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/jwk.mjs
|
|
8385
9794
|
var JwkId$Type = class extends import_commonjs$2.MessageType {
|
|
8386
9795
|
constructor() {
|
|
8387
9796
|
super("sui.rpc.v2.JwkId", [{
|
|
@@ -8443,7 +9852,7 @@ var Jwk$Type = class extends import_commonjs$2.MessageType {
|
|
|
8443
9852
|
const Jwk = new Jwk$Type();
|
|
8444
9853
|
|
|
8445
9854
|
//#endregion
|
|
8446
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9855
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/bcs.mjs
|
|
8447
9856
|
var Bcs$Type = class extends import_commonjs$2.MessageType {
|
|
8448
9857
|
constructor() {
|
|
8449
9858
|
super("sui.rpc.v2.Bcs", [{
|
|
@@ -8467,7 +9876,7 @@ var Bcs$Type = class extends import_commonjs$2.MessageType {
|
|
|
8467
9876
|
const Bcs = new Bcs$Type();
|
|
8468
9877
|
|
|
8469
9878
|
//#endregion
|
|
8470
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
9879
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/object.mjs
|
|
8471
9880
|
var Object$Type = class extends import_commonjs$2.MessageType {
|
|
8472
9881
|
constructor() {
|
|
8473
9882
|
super("sui.rpc.v2.Object", [
|
|
@@ -8609,7 +10018,7 @@ var Display$Type = class extends import_commonjs$2.MessageType {
|
|
|
8609
10018
|
const Display = new Display$Type();
|
|
8610
10019
|
|
|
8611
10020
|
//#endregion
|
|
8612
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
10021
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/google/protobuf/timestamp.mjs
|
|
8613
10022
|
var Timestamp$Type = class extends import_commonjs$2.MessageType {
|
|
8614
10023
|
constructor() {
|
|
8615
10024
|
super("google.protobuf.Timestamp", [{
|
|
@@ -8692,7 +10101,7 @@ var Timestamp$Type = class extends import_commonjs$2.MessageType {
|
|
|
8692
10101
|
const Timestamp = new Timestamp$Type();
|
|
8693
10102
|
|
|
8694
10103
|
//#endregion
|
|
8695
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
10104
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/object_reference.mjs
|
|
8696
10105
|
var ObjectReference$Type = class extends import_commonjs$2.MessageType {
|
|
8697
10106
|
constructor() {
|
|
8698
10107
|
super("sui.rpc.v2.ObjectReference", [
|
|
@@ -8727,7 +10136,7 @@ var ObjectReference$Type = class extends import_commonjs$2.MessageType {
|
|
|
8727
10136
|
const ObjectReference = new ObjectReference$Type();
|
|
8728
10137
|
|
|
8729
10138
|
//#endregion
|
|
8730
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
10139
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/transaction.mjs
|
|
8731
10140
|
/**
|
|
8732
10141
|
* @generated from protobuf enum sui.rpc.v2.TransactionExpiration.TransactionExpirationKind
|
|
8733
10142
|
*/
|
|
@@ -9995,7 +11404,7 @@ var ValidatorExecutionTimeObservation$Type = class extends import_commonjs$2.Mes
|
|
|
9995
11404
|
const ValidatorExecutionTimeObservation = new ValidatorExecutionTimeObservation$Type();
|
|
9996
11405
|
|
|
9997
11406
|
//#endregion
|
|
9998
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
11407
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/client/transaction-resolver.mjs
|
|
9999
11408
|
/**
|
|
10000
11409
|
* Converts CallArg (TypeScript internal format) to gRPC Input format
|
|
10001
11410
|
*/
|
|
@@ -10389,7 +11798,7 @@ function grpcTransactionToTransactionData(grpcTx) {
|
|
|
10389
11798
|
}
|
|
10390
11799
|
|
|
10391
11800
|
//#endregion
|
|
10392
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
11801
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/execution_status.mjs
|
|
10393
11802
|
/**
|
|
10394
11803
|
* @generated from protobuf enum sui.rpc.v2.ExecutionError.ExecutionErrorKind
|
|
10395
11804
|
*/
|
|
@@ -11301,7 +12710,7 @@ var TypeArgumentError$Type = class extends import_commonjs$2.MessageType {
|
|
|
11301
12710
|
const TypeArgumentError = new TypeArgumentError$Type();
|
|
11302
12711
|
|
|
11303
12712
|
//#endregion
|
|
11304
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
12713
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/gas_cost_summary.mjs
|
|
11305
12714
|
var GasCostSummary$Type = class extends import_commonjs$2.MessageType {
|
|
11306
12715
|
constructor() {
|
|
11307
12716
|
super("sui.rpc.v2.GasCostSummary", [
|
|
@@ -11346,7 +12755,7 @@ var GasCostSummary$Type = class extends import_commonjs$2.MessageType {
|
|
|
11346
12755
|
const GasCostSummary = new GasCostSummary$Type();
|
|
11347
12756
|
|
|
11348
12757
|
//#endregion
|
|
11349
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
12758
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/effects.mjs
|
|
11350
12759
|
/**
|
|
11351
12760
|
* @generated from protobuf enum sui.rpc.v2.ChangedObject.InputObjectState
|
|
11352
12761
|
*/
|
|
@@ -11841,7 +13250,7 @@ var UnchangedConsensusObject$Type = class extends import_commonjs$2.MessageType
|
|
|
11841
13250
|
const UnchangedConsensusObject = new UnchangedConsensusObject$Type();
|
|
11842
13251
|
|
|
11843
13252
|
//#endregion
|
|
11844
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
13253
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/signature_scheme.mjs
|
|
11845
13254
|
/**
|
|
11846
13255
|
* Flag use to disambiguate the signature schemes supported by Sui.
|
|
11847
13256
|
*
|
|
@@ -11885,7 +13294,7 @@ let SignatureScheme = /* @__PURE__ */ function(SignatureScheme$1) {
|
|
|
11885
13294
|
}({});
|
|
11886
13295
|
|
|
11887
13296
|
//#endregion
|
|
11888
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
13297
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/signature.mjs
|
|
11889
13298
|
var UserSignature$Type = class extends import_commonjs$2.MessageType {
|
|
11890
13299
|
constructor() {
|
|
11891
13300
|
super("sui.rpc.v2.UserSignature", [
|
|
@@ -12451,7 +13860,7 @@ var ValidatorAggregatedSignature$Type = class extends import_commonjs$2.MessageT
|
|
|
12451
13860
|
const ValidatorAggregatedSignature = new ValidatorAggregatedSignature$Type();
|
|
12452
13861
|
|
|
12453
13862
|
//#endregion
|
|
12454
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
13863
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/balance_change.mjs
|
|
12455
13864
|
var BalanceChange$Type = class extends import_commonjs$2.MessageType {
|
|
12456
13865
|
constructor() {
|
|
12457
13866
|
super("sui.rpc.v2.BalanceChange", [
|
|
@@ -12485,7 +13894,7 @@ var BalanceChange$Type = class extends import_commonjs$2.MessageType {
|
|
|
12485
13894
|
const BalanceChange = new BalanceChange$Type();
|
|
12486
13895
|
|
|
12487
13896
|
//#endregion
|
|
12488
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
13897
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/event.mjs
|
|
12489
13898
|
var TransactionEvents$Type = class extends import_commonjs$2.MessageType {
|
|
12490
13899
|
constructor() {
|
|
12491
13900
|
super("sui.rpc.v2.TransactionEvents", [
|
|
@@ -12568,7 +13977,7 @@ var Event$Type = class extends import_commonjs$2.MessageType {
|
|
|
12568
13977
|
const Event = new Event$Type();
|
|
12569
13978
|
|
|
12570
13979
|
//#endregion
|
|
12571
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
13980
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/executed_transaction.mjs
|
|
12572
13981
|
var ExecutedTransaction$Type = class extends import_commonjs$2.MessageType {
|
|
12573
13982
|
constructor() {
|
|
12574
13983
|
super("sui.rpc.v2.ExecutedTransaction", [
|
|
@@ -12640,7 +14049,7 @@ var ExecutedTransaction$Type = class extends import_commonjs$2.MessageType {
|
|
|
12640
14049
|
const ExecutedTransaction = new ExecutedTransaction$Type();
|
|
12641
14050
|
|
|
12642
14051
|
//#endregion
|
|
12643
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
14052
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/google/protobuf/field_mask.mjs
|
|
12644
14053
|
var FieldMask$Type = class extends import_commonjs$2.MessageType {
|
|
12645
14054
|
constructor() {
|
|
12646
14055
|
super("google.protobuf.FieldMask", [{
|
|
@@ -13920,7 +15329,7 @@ var require_commonjs$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13920
15329
|
}));
|
|
13921
15330
|
|
|
13922
15331
|
//#endregion
|
|
13923
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
15332
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.mjs
|
|
13924
15333
|
var import_commonjs$1 = require_commonjs$1();
|
|
13925
15334
|
/**
|
|
13926
15335
|
* buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
|
|
@@ -14113,7 +15522,7 @@ const TransactionExecutionService = new import_commonjs$1.ServiceType("sui.rpc.v
|
|
|
14113
15522
|
}]);
|
|
14114
15523
|
|
|
14115
15524
|
//#endregion
|
|
14116
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
15525
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/core.mjs
|
|
14117
15526
|
var GrpcCoreClient = class extends CoreClient {
|
|
14118
15527
|
#client;
|
|
14119
15528
|
constructor({ client, ...options }) {
|
|
@@ -14907,7 +16316,7 @@ function parseNormalizedSuiMoveTypeBody(type) {
|
|
|
14907
16316
|
}
|
|
14908
16317
|
|
|
14909
16318
|
//#endregion
|
|
14910
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
16319
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.mjs
|
|
14911
16320
|
/**
|
|
14912
16321
|
* @generated from protobuf service sui.rpc.v2.TransactionExecutionService
|
|
14913
16322
|
*/
|
|
@@ -14937,7 +16346,7 @@ var TransactionExecutionServiceClient = class {
|
|
|
14937
16346
|
};
|
|
14938
16347
|
|
|
14939
16348
|
//#endregion
|
|
14940
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
16349
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/protocol_config.mjs
|
|
14941
16350
|
var ProtocolConfig$Type = class extends import_commonjs$2.MessageType {
|
|
14942
16351
|
constructor() {
|
|
14943
16352
|
super("sui.rpc.v2.ProtocolConfig", [
|
|
@@ -14978,7 +16387,7 @@ var ProtocolConfig$Type = class extends import_commonjs$2.MessageType {
|
|
|
14978
16387
|
const ProtocolConfig = new ProtocolConfig$Type();
|
|
14979
16388
|
|
|
14980
16389
|
//#endregion
|
|
14981
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
16390
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/system_state.mjs
|
|
14982
16391
|
var SystemState$Type = class extends import_commonjs$2.MessageType {
|
|
14983
16392
|
constructor() {
|
|
14984
16393
|
super("sui.rpc.v2.SystemState", [
|
|
@@ -15707,7 +17116,7 @@ var StakingPool$Type = class extends import_commonjs$2.MessageType {
|
|
|
15707
17116
|
const StakingPool = new StakingPool$Type();
|
|
15708
17117
|
|
|
15709
17118
|
//#endregion
|
|
15710
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
17119
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/epoch.mjs
|
|
15711
17120
|
var Epoch$Type = class extends import_commonjs$2.MessageType {
|
|
15712
17121
|
constructor() {
|
|
15713
17122
|
super("sui.rpc.v2.Epoch", [
|
|
@@ -15782,7 +17191,7 @@ var Epoch$Type = class extends import_commonjs$2.MessageType {
|
|
|
15782
17191
|
const Epoch = new Epoch$Type();
|
|
15783
17192
|
|
|
15784
17193
|
//#endregion
|
|
15785
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
17194
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/checkpoint_contents.mjs
|
|
15786
17195
|
var CheckpointContents$Type = class extends import_commonjs$2.MessageType {
|
|
15787
17196
|
constructor() {
|
|
15788
17197
|
super("sui.rpc.v2.CheckpointContents", [
|
|
@@ -15876,7 +17285,7 @@ var AddressAliasesVersion$Type = class extends import_commonjs$2.MessageType {
|
|
|
15876
17285
|
const AddressAliasesVersion = new AddressAliasesVersion$Type();
|
|
15877
17286
|
|
|
15878
17287
|
//#endregion
|
|
15879
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
17288
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/checkpoint_summary.mjs
|
|
15880
17289
|
/**
|
|
15881
17290
|
* @generated from protobuf enum sui.rpc.v2.CheckpointCommitment.CheckpointCommitmentKind
|
|
15882
17291
|
*/
|
|
@@ -16048,7 +17457,7 @@ var CheckpointCommitment$Type = class extends import_commonjs$2.MessageType {
|
|
|
16048
17457
|
const CheckpointCommitment = new CheckpointCommitment$Type();
|
|
16049
17458
|
|
|
16050
17459
|
//#endregion
|
|
16051
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
17460
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/checkpoint.mjs
|
|
16052
17461
|
var Checkpoint$Type = class extends import_commonjs$2.MessageType {
|
|
16053
17462
|
constructor() {
|
|
16054
17463
|
super("sui.rpc.v2.Checkpoint", [
|
|
@@ -16107,7 +17516,7 @@ var Checkpoint$Type = class extends import_commonjs$2.MessageType {
|
|
|
16107
17516
|
const Checkpoint = new Checkpoint$Type();
|
|
16108
17517
|
|
|
16109
17518
|
//#endregion
|
|
16110
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
17519
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/google/protobuf/any.mjs
|
|
16111
17520
|
var Any$Type = class extends import_commonjs$2.MessageType {
|
|
16112
17521
|
constructor() {
|
|
16113
17522
|
super("google.protobuf.Any", [{
|
|
@@ -16204,7 +17613,7 @@ var Any$Type = class extends import_commonjs$2.MessageType {
|
|
|
16204
17613
|
const Any = new Any$Type();
|
|
16205
17614
|
|
|
16206
17615
|
//#endregion
|
|
16207
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
17616
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/google/rpc/status.mjs
|
|
16208
17617
|
var Status$Type = class extends import_commonjs$2.MessageType {
|
|
16209
17618
|
constructor() {
|
|
16210
17619
|
super("google.rpc.Status", [
|
|
@@ -16236,7 +17645,7 @@ var Status$Type = class extends import_commonjs$2.MessageType {
|
|
|
16236
17645
|
const Status = new Status$Type();
|
|
16237
17646
|
|
|
16238
17647
|
//#endregion
|
|
16239
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
17648
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs
|
|
16240
17649
|
var GetServiceInfoRequest$Type = class extends import_commonjs$2.MessageType {
|
|
16241
17650
|
constructor() {
|
|
16242
17651
|
super("sui.rpc.v2.GetServiceInfoRequest", []);
|
|
@@ -16635,7 +18044,7 @@ const LedgerService = new import_commonjs$1.ServiceType("sui.rpc.v2.LedgerServic
|
|
|
16635
18044
|
]);
|
|
16636
18045
|
|
|
16637
18046
|
//#endregion
|
|
16638
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
18047
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/ledger_service.client.mjs
|
|
16639
18048
|
/**
|
|
16640
18049
|
* @generated from protobuf service sui.rpc.v2.LedgerService
|
|
16641
18050
|
*/
|
|
@@ -16707,7 +18116,7 @@ var LedgerServiceClient = class {
|
|
|
16707
18116
|
};
|
|
16708
18117
|
|
|
16709
18118
|
//#endregion
|
|
16710
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
18119
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/move_package_service.mjs
|
|
16711
18120
|
var GetPackageRequest$Type = class extends import_commonjs$2.MessageType {
|
|
16712
18121
|
constructor() {
|
|
16713
18122
|
super("sui.rpc.v2.GetPackageRequest", [{
|
|
@@ -16932,7 +18341,7 @@ const MovePackageService = new import_commonjs$1.ServiceType("sui.rpc.v2.MovePac
|
|
|
16932
18341
|
]);
|
|
16933
18342
|
|
|
16934
18343
|
//#endregion
|
|
16935
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
18344
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/move_package_service.client.mjs
|
|
16936
18345
|
/**
|
|
16937
18346
|
* @generated from protobuf service sui.rpc.v2.MovePackageService
|
|
16938
18347
|
*/
|
|
@@ -16978,7 +18387,7 @@ var MovePackageServiceClient = class {
|
|
|
16978
18387
|
};
|
|
16979
18388
|
|
|
16980
18389
|
//#endregion
|
|
16981
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
18390
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/signature_verification_service.mjs
|
|
16982
18391
|
var VerifySignatureRequest$Type = class extends import_commonjs$2.MessageType {
|
|
16983
18392
|
constructor() {
|
|
16984
18393
|
super("sui.rpc.v2.VerifySignatureRequest", [
|
|
@@ -17047,7 +18456,7 @@ const SignatureVerificationService = new import_commonjs$1.ServiceType("sui.rpc.
|
|
|
17047
18456
|
}]);
|
|
17048
18457
|
|
|
17049
18458
|
//#endregion
|
|
17050
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
18459
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.mjs
|
|
17051
18460
|
/**
|
|
17052
18461
|
* @generated from protobuf service sui.rpc.v2.SignatureVerificationService
|
|
17053
18462
|
*/
|
|
@@ -17071,7 +18480,7 @@ var SignatureVerificationServiceClient = class {
|
|
|
17071
18480
|
};
|
|
17072
18481
|
|
|
17073
18482
|
//#endregion
|
|
17074
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
18483
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/state_service.mjs
|
|
17075
18484
|
/**
|
|
17076
18485
|
* Information about the state of the coin's MetadataCap
|
|
17077
18486
|
*
|
|
@@ -17735,7 +19144,7 @@ const StateService = new import_commonjs$1.ServiceType("sui.rpc.v2.StateService"
|
|
|
17735
19144
|
]);
|
|
17736
19145
|
|
|
17737
19146
|
//#endregion
|
|
17738
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
19147
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/state_service.client.mjs
|
|
17739
19148
|
/**
|
|
17740
19149
|
* @generated from protobuf service sui.rpc.v2.StateService
|
|
17741
19150
|
*/
|
|
@@ -17789,7 +19198,7 @@ var StateServiceClient = class {
|
|
|
17789
19198
|
};
|
|
17790
19199
|
|
|
17791
19200
|
//#endregion
|
|
17792
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
19201
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/subscription_service.mjs
|
|
17793
19202
|
var SubscribeCheckpointsRequest$Type = class extends import_commonjs$2.MessageType {
|
|
17794
19203
|
constructor() {
|
|
17795
19204
|
super("sui.rpc.v2.SubscribeCheckpointsRequest", [{
|
|
@@ -17837,7 +19246,7 @@ const SubscriptionService = new import_commonjs$1.ServiceType("sui.rpc.v2.Subscr
|
|
|
17837
19246
|
}]);
|
|
17838
19247
|
|
|
17839
19248
|
//#endregion
|
|
17840
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
19249
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs
|
|
17841
19250
|
/**
|
|
17842
19251
|
* @generated from protobuf service sui.rpc.v2.SubscriptionService
|
|
17843
19252
|
*/
|
|
@@ -17871,7 +19280,7 @@ var SubscriptionServiceClient = class {
|
|
|
17871
19280
|
};
|
|
17872
19281
|
|
|
17873
19282
|
//#endregion
|
|
17874
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
19283
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/name_service.mjs
|
|
17875
19284
|
var LookupNameRequest$Type = class extends import_commonjs$2.MessageType {
|
|
17876
19285
|
constructor() {
|
|
17877
19286
|
super("sui.rpc.v2.LookupNameRequest", [{
|
|
@@ -18000,7 +19409,7 @@ const NameService = new import_commonjs$1.ServiceType("sui.rpc.v2.NameService",
|
|
|
18000
19409
|
}]);
|
|
18001
19410
|
|
|
18002
19411
|
//#endregion
|
|
18003
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
19412
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/rpc/v2/name_service.client.mjs
|
|
18004
19413
|
/**
|
|
18005
19414
|
* @generated from protobuf service sui.rpc.v2.NameService
|
|
18006
19415
|
*/
|
|
@@ -18030,7 +19439,7 @@ var NameServiceClient = class {
|
|
|
18030
19439
|
};
|
|
18031
19440
|
|
|
18032
19441
|
//#endregion
|
|
18033
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
19442
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/forking/v1alpha/forking_service.mjs
|
|
18034
19443
|
var AdvanceClockRequest$Type = class extends import_commonjs$2.MessageType {
|
|
18035
19444
|
constructor() {
|
|
18036
19445
|
super("sui.forking.v1alpha.AdvanceClockRequest", [{
|
|
@@ -18169,7 +19578,7 @@ const ForkingService = new import_commonjs$1.ServiceType("sui.forking.v1alpha.Fo
|
|
|
18169
19578
|
]);
|
|
18170
19579
|
|
|
18171
19580
|
//#endregion
|
|
18172
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
19581
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/proto/sui/forking/v1alpha/forking_service.client.mjs
|
|
18173
19582
|
/**
|
|
18174
19583
|
* Administrative service for controlling a forked Sui network.
|
|
18175
19584
|
*
|
|
@@ -18875,7 +20284,7 @@ var require_commonjs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18875
20284
|
}));
|
|
18876
20285
|
|
|
18877
20286
|
//#endregion
|
|
18878
|
-
//#region ../../node_modules/.pnpm/@mysten+sui@2.
|
|
20287
|
+
//#region ../../node_modules/.pnpm/@mysten+sui@2.20.1_typescript@6.0.3/node_modules/@mysten/sui/dist/grpc/client.mjs
|
|
18879
20288
|
var import_commonjs = require_commonjs();
|
|
18880
20289
|
const SUI_CLIENT_BRAND = Symbol.for("@mysten/SuiGrpcClient");
|
|
18881
20290
|
var SuiGrpcClient = class extends BaseClient {
|
|
@@ -19484,5 +20893,5 @@ const DEFAULT_LIST = {
|
|
|
19484
20893
|
};
|
|
19485
20894
|
|
|
19486
20895
|
//#endregion
|
|
19487
|
-
export { GetFunctionRequest as $, ChangeEpoch as $n, OpenSignatureBody as $r, Event as $t, CoinMetadata_MetadataCapState as A,
|
|
19488
|
-
//# sourceMappingURL=coin-
|
|
20896
|
+
export { GetFunctionRequest as $, normalizeStructTag as $i, ChangeEpoch as $n, OpenSignatureBody as $r, Event as $t, CoinMetadata_MetadataCapState as A, integer as Ai, UnchangedConsensusObject as An, Object$1 as Ar, CheckpointContents as At, ListBalancesResponse as B, pipe as Bi, ExecutionStatus as Bn, Argument as Br, ValidatorReportRecord as Bt, ReverseLookupNameRequest as C, ObjectRefSchema as Ci, AccumulatorWrite_AccumulatorValue as Cn, TransactionKind_Kind as Cr, LedgerService as Ct, SubscriptionService as D, array as Di, ChangedObject_OutputObjectState as Dn, VersionAssignment as Dr, CheckpointSummary as Dt, SubscribeCheckpointsResponse as E, ValidDuringSchema as Ei, ChangedObject_InputObjectState as En, ValidatorExecutionTimeObservation as Er, CheckpointCommitment_CheckpointCommitmentKind as Et, GetBalanceRequest as F, number as Fi, CommandArgumentError as Fn, FundsWithdrawal as Fr, StakingPool as Ft, RegulatedCoinMetadata as G, union as Gi, PackageUpgradeError_PackageUpgradeErrorKind as Gn, DatatypeDescriptor as Gr, CommandResult as Gt, ListDynamicFieldsResponse as H, string as Hi, MoveAbort as Hn, Owner as Hr, ProtocolConfig as Ht, GetBalanceResponse as I, object as Ii, CommandArgumentError_CommandArgumentErrorKind as In, FundsWithdrawal_Source as Ir, StorageFund as It, SignatureVerificationService as J, replaceNames as Ji, TypeArgumentError_TypeArgumentErrorKind as Jn, FunctionDescriptor as Jr, SimulateTransactionRequest as Jt, RegulatedCoinMetadata_CoinRegulatedState as K, unknown as Ki, SizeError as Kn, DatatypeDescriptor_DatatypeKind as Kr, ExecuteTransactionRequest as Kt, GetCoinInfoRequest as L, optional as Li, CongestedObjects as Ln, Input as Lr, SystemParameters as Lt, CoinTreasury_SupplyState as M, literal as Mi, GasCostSummary as Mn, Bcs as Mr, Epoch as Mt, DynamicField as N, nullable as Ni, CleverError as Nn, Jwk as Nr, MoveTable as Nt, Balance as O, bigint as Oi, EventDigestEntry as On, ObjectReference as Or, EndOfEpochData as Ot, DynamicField_DynamicFieldKind as P, nullish as Pi, CoinDenyListError as Pn, JwkId as Pr, StakeSubsidy as Pt, GetDatatypeResponse as Q, TypeTagSerializer as Qi, CanceledTransaction as Qn, OpenSignature as Qr, ExecutedTransaction as Qt, GetCoinInfoResponse as R, parse as Ri, ExecutionError as Rn, Input_InputKind as Rr, SystemState as Rt, NameService as S, ObjectID as Si, AccumulatorWrite_AccumulatorOperation as Sn, TransactionKind as Sr, GetTransactionResult as St, SubscribeCheckpointsRequest as T, TransactionExpiration$2 as Ti, ChangedObject_IdOperation as Tn, Upgrade as Tr, CheckpointCommitment as Tt, ListOwnedObjectsRequest as U, transform as Ui, MoveLocation as Un, Owner_OwnerKind as Ur, GrpcCoreClient as Ut, ListDynamicFieldsRequest as V, record as Vi, IndexError as Vn, Argument_ArgumentKind as Vr, ValidatorSet as Vt, ListOwnedObjectsResponse as W, tuple as Wi, PackageUpgradeError as Wn, Ability as Wr, CommandOutput as Wt, VerifySignatureResponse as X, suiBcs as Xi, AuthenticatorStateExpire as Xn, Linkage as Xr, SimulateTransactionResponse as Xt, VerifySignatureRequest as Y, deriveDynamicFieldID as Yi, ActiveJwk as Yn, FunctionDescriptor_Visibility as Yr, SimulateTransactionRequest_TransactionChecks as Yt, GetDatatypeRequest as Z, pureBcsSchemaFromTypeName as Zi, AuthenticatorStateUpdate as Zn, Module as Zr, TransactionExecutionService as Zt, GetStatusRequest as _, ArgumentSchema as _i, ZkLoginInputs as _n, SplitCoins as _r, GetObjectResult as _t, initCoinList as a, toHex as aa, VariantDescriptor as ai, MultisigCommittee as an, EndOfEpochTransactionKind_Kind as ar, MovePackageService as at, LookupNameResponse as b, JsonU64 as bi, SignatureScheme as bn, TransactionExpiration as br, GetTransactionRequest as bt, SuiNetwork as c, fromBase58 as ca, SUI_DENY_LIST_OBJECT_ID as ci, MultisigMemberSignature as cn, ExecutionTimeObservations as cr, BatchGetObjectsResponse as ct, SuiGrpcClient as d, SUI_SYSTEM_STATE_OBJECT_ID as di, UserSignature as dn, MakeMoveVector as dr, GetCheckpointRequest as dt, normalizeSuiAddress as ea, OpenSignatureBody_Type as ei, TransactionEvents as en, Command as er, GetFunctionResponse as et, AdvanceCheckpointRequest as f, SUI_TYPE_ARG as fi, ValidatorAggregatedSignature as fn, MergeCoins as fr, GetCheckpointResponse as ft, ForkingService as g, serializeV1TransactionData as gi, ZkLoginClaim as gn, RandomnessStateUpdate as gr, GetObjectResponse as gt, AdvanceClockResponse as h, getIdFromCallArg as hi, ZkLoginAuthenticator as hn, Publish as hr, GetObjectRequest as ht, getPrice as i, fromHex as ia, TypeParameter as ii, MultisigAggregatedSignature as in, EndOfEpochTransactionKind as ir, ListPackageVersionsResponse as it, CoinTreasury as j, is as ji, UnchangedConsensusObject_UnchangedConsensusObjectKind as jn, ObjectSet as jr, CheckpointedTransactionInfo as jt, CoinMetadata as k, boolean as ki, TransactionEffects as kn, Display as kr, AddressAliasesVersion as kt, getClient as l, toBase58 as la, SUI_FRAMEWORK_ADDRESS as li, PasskeyAuthenticator as ln, GasPayment as lr, BatchGetTransactionsRequest as lt, AdvanceClockRequest as m, TransactionDataBuilder as mi, ValidatorCommitteeMember as mn, ProgrammableTransaction as mr, GetEpochResponse as mt, getCoinInfo as n, isSerializedBcs as na, Package as ni, CircomG1 as nn, ConsensusDeterminedVersionAssignments as nr, GetPackageResponse as nt, whiteListed as o, fromBase64 as oa, MOVE_STDLIB_ADDRESS as oi, MultisigMember as on, ExecutionTimeObservation as or, PackageVersion as ot, AdvanceCheckpointResponse as p, SimulationError as pi, ValidatorCommittee as pn, MoveCall as pr, GetEpochRequest as pt, StateService as q, findNamesInTransaction as qi, TypeArgumentError as qn, FieldDescriptor as qr, ExecuteTransactionResponse as qt, getCoinInfoWithFallback as r, chunk as ra, TypeOrigin as ri, CircomG2 as rn, EndOfEpochTransaction as rr, ListPackageVersionsRequest as rt, whitelistCoins as s, toBase64 as sa, SUI_CLOCK_OBJECT_ID as si, MultisigMemberPublicKey as sn, ExecutionTimeObservation_ExecutionTimeObservationKind as sr, BatchGetObjectsRequest as st, calculateValueInUsd as t, normalizeSuiObjectId as ta, OpenSignature_Reference as ti, BalanceChange as tn, ConsensusCommitPrologue as tr, GetPackageRequest as tt, getRpcEndpoint as u, SUI_RANDOM_OBJECT_ID as ui, SimpleSignature as un, GenesisTransaction as ur, BatchGetTransactionsResponse as ut, GetStatusResponse as v, BCSBytes as vi, ZkLoginProof as vn, SystemPackage as vr, GetServiceInfoRequest as vt, ReverseLookupNameResponse as w, SuiAddress as wi, ChangedObject as wn, TransferObjects as wr, Checkpoint as wt, NameRecord as x, NormalizedCallArg$1 as xi, AccumulatorWrite as xn, TransactionExpiration_TransactionExpirationKind as xr, GetTransactionResponse as xt, LookupNameRequest as y, FundsWithdrawalArgSchema as yi, ZkLoginPublicIdentifier as yn, Transaction as yr, GetServiceInfoResponse as yt, ListBalancesRequest as z, picklist as zi, ExecutionError_ExecutionErrorKind as zn, Input_Mutability as zr, Validator as zt };
|
|
20897
|
+
//# sourceMappingURL=coin-CBrx3CpG.js.map
|