solidity-codecs 0.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/codecs/Bytes.d.ts +6 -0
- package/dist/codecs/Enum.d.ts +57 -0
- package/dist/codecs/Option.d.ts +6 -0
- package/dist/codecs/Result.d.ts +22 -0
- package/dist/codecs/Struct.d.ts +25 -0
- package/dist/codecs/Tuple.d.ts +25 -0
- package/dist/codecs/Vector.d.ts +14 -0
- package/dist/codecs/bool.d.ts +2 -0
- package/dist/codecs/bytes.d.ts +6 -0
- package/dist/codecs/call.d.ts +6 -0
- package/dist/codecs/compact.d.ts +2 -0
- package/dist/codecs/fixed-width-ints.d.ts +11 -0
- package/dist/codecs/fixed.d.ts +3 -0
- package/dist/codecs/index.d.ts +10 -0
- package/dist/codecs/int.d.ts +6 -0
- package/dist/codecs/str.d.ts +1 -0
- package/dist/codecs/struct.d.ts +6 -0
- package/dist/codecs/tuple.d.ts +6 -0
- package/dist/codecs/uint.d.ts +2 -0
- package/dist/codecs/vector.d.ts +6 -0
- package/dist/codecs/void.d.ts +2 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/scale-ts.cjs.development.js +427 -0
- package/dist/scale-ts.cjs.development.js.map +7 -0
- package/dist/scale-ts.cjs.production.min.js +318 -0
- package/dist/scale-ts.cjs.production.min.js.map +7 -0
- package/dist/scale-ts.es2017.js +403 -0
- package/dist/scale-ts.es2017.js.map +7 -0
- package/dist/scale-ts.es2019.mjs +348 -0
- package/dist/scale-ts.es2019.mjs.map +7 -0
- package/dist/solidity-codecs.cjs.development.js +404 -0
- package/dist/solidity-codecs.cjs.development.js.map +7 -0
- package/dist/solidity-codecs.cjs.production.min.js +2 -0
- package/dist/solidity-codecs.cjs.production.min.js.map +7 -0
- package/dist/solidity-codecs.js +384 -0
- package/dist/solidity-codecs.js.map +7 -0
- package/dist/solidity-codecs.mjs +384 -0
- package/dist/solidity-codecs.mjs.map +7 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/types.d.ts +21 -0
- package/dist/utils.d.ts +5 -0
- package/package.json +49 -0
@@ -0,0 +1,318 @@
|
|
1
|
+
var l = Object.defineProperty
|
2
|
+
var Y = Object.getOwnPropertyDescriptor
|
3
|
+
var Z = Object.getOwnPropertyNames
|
4
|
+
var z = Object.prototype.hasOwnProperty
|
5
|
+
var ee = (e, t, n) =>
|
6
|
+
t in e
|
7
|
+
? l(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n })
|
8
|
+
: (e[t] = n)
|
9
|
+
var te = (e, t) => {
|
10
|
+
for (var n in t) l(e, n, { get: t[n], enumerable: !0 })
|
11
|
+
},
|
12
|
+
ne = (e, t, n, r) => {
|
13
|
+
if ((t && typeof t == "object") || typeof t == "function")
|
14
|
+
for (let o of Z(t))
|
15
|
+
!z.call(e, o) &&
|
16
|
+
o !== n &&
|
17
|
+
l(e, o, {
|
18
|
+
get: () => t[o],
|
19
|
+
enumerable: !(r = Y(t, o)) || r.enumerable,
|
20
|
+
})
|
21
|
+
return e
|
22
|
+
}
|
23
|
+
var re = (e) => ne(l({}, "__esModule", { value: !0 }), e)
|
24
|
+
var I = (e, t, n) => (ee(e, typeof t != "symbol" ? t + "" : t, n), n)
|
25
|
+
var Ae = {}
|
26
|
+
te(Ae, {
|
27
|
+
Bytes: () => E,
|
28
|
+
Enum: () => T,
|
29
|
+
Option: () => A,
|
30
|
+
Result: () => C,
|
31
|
+
Struct: () => K,
|
32
|
+
Tuple: () => y,
|
33
|
+
Vector: () => w,
|
34
|
+
_void: () => j,
|
35
|
+
bool: () => D,
|
36
|
+
compact: () => f,
|
37
|
+
createCodec: () => c,
|
38
|
+
enhanceCodec: () => k,
|
39
|
+
enhanceDecoder: () => g,
|
40
|
+
enhanceEncoder: () => x,
|
41
|
+
i128: () => pe,
|
42
|
+
i16: () => ae,
|
43
|
+
i32: () => ue,
|
44
|
+
i64: () => me,
|
45
|
+
i8: () => ie,
|
46
|
+
str: () => h,
|
47
|
+
u128: () => fe,
|
48
|
+
u16: () => B,
|
49
|
+
u32: () => v,
|
50
|
+
u64: () => se,
|
51
|
+
u8: () => a,
|
52
|
+
})
|
53
|
+
module.exports = re(Ae)
|
54
|
+
var c = (e, t) => {
|
55
|
+
let n = [e, t]
|
56
|
+
return (n.enc = e), (n.dec = t), n
|
57
|
+
},
|
58
|
+
x = (e, t) => (n) => e(t(n)),
|
59
|
+
g = (e, t) => (n) => t(e(n)),
|
60
|
+
k = ([e, t], n, r) => c(x(e, n), g(t, r))
|
61
|
+
var U = {
|
62
|
+
0: 0,
|
63
|
+
1: 1,
|
64
|
+
2: 2,
|
65
|
+
3: 3,
|
66
|
+
4: 4,
|
67
|
+
5: 5,
|
68
|
+
6: 6,
|
69
|
+
7: 7,
|
70
|
+
8: 8,
|
71
|
+
9: 9,
|
72
|
+
a: 10,
|
73
|
+
b: 11,
|
74
|
+
c: 12,
|
75
|
+
d: 13,
|
76
|
+
e: 14,
|
77
|
+
f: 15,
|
78
|
+
A: 10,
|
79
|
+
B: 11,
|
80
|
+
C: 12,
|
81
|
+
D: 13,
|
82
|
+
E: 14,
|
83
|
+
F: 15,
|
84
|
+
}
|
85
|
+
function oe(e) {
|
86
|
+
let t = e.length % 2,
|
87
|
+
n = (e[1] === "x" ? 2 : 0) + t,
|
88
|
+
r = (e.length - n) / 2 + t,
|
89
|
+
o = new Uint8Array(r)
|
90
|
+
t && (o[0] = 0 | U[e[2]])
|
91
|
+
for (let d = 0; d < r; ) {
|
92
|
+
let u = n + d * 2,
|
93
|
+
p = U[e[u]],
|
94
|
+
Q = U[e[u + 1]]
|
95
|
+
o[t + d++] = (p << 4) | Q
|
96
|
+
}
|
97
|
+
return o
|
98
|
+
}
|
99
|
+
var b = class extends Uint8Array {
|
100
|
+
constructor(n) {
|
101
|
+
super(n)
|
102
|
+
I(this, "i", 0)
|
103
|
+
I(this, "v")
|
104
|
+
this.v = new DataView(n)
|
105
|
+
}
|
106
|
+
},
|
107
|
+
s = (e) => (t) =>
|
108
|
+
e(
|
109
|
+
t instanceof b
|
110
|
+
? t
|
111
|
+
: new b(
|
112
|
+
typeof t == "string"
|
113
|
+
? oe(t).buffer
|
114
|
+
: t instanceof Uint8Array
|
115
|
+
? t.buffer
|
116
|
+
: t,
|
117
|
+
),
|
118
|
+
)
|
119
|
+
var i = (...e) => {
|
120
|
+
let t = e.reduce((r, o) => r + o.byteLength, 0),
|
121
|
+
n = new Uint8Array(t)
|
122
|
+
for (let r = 0, o = 0; r < e.length; r++) {
|
123
|
+
let d = e[r]
|
124
|
+
n.set(d, o), (o += d.byteLength)
|
125
|
+
}
|
126
|
+
return n
|
127
|
+
}
|
128
|
+
function O(e, t) {
|
129
|
+
return Object.fromEntries(Object.entries(e).map(([n, r]) => [n, t(r, n)]))
|
130
|
+
}
|
131
|
+
function ce(e, t) {
|
132
|
+
return s((n) => {
|
133
|
+
let r = n.v[t](n.i, !0)
|
134
|
+
return (n.i += e), r
|
135
|
+
})
|
136
|
+
}
|
137
|
+
function de(e, t) {
|
138
|
+
return (n) => {
|
139
|
+
let r = new Uint8Array(e)
|
140
|
+
return new DataView(r.buffer)[t](0, n, !0), r
|
141
|
+
}
|
142
|
+
}
|
143
|
+
function m(e, t, n) {
|
144
|
+
return c(de(e, n), ce(e, t))
|
145
|
+
}
|
146
|
+
var a = m(1, "getUint8", "setUint8"),
|
147
|
+
B = m(2, "getUint16", "setUint16"),
|
148
|
+
v = m(4, "getUint32", "setUint32"),
|
149
|
+
se = m(8, "getBigUint64", "setBigUint64"),
|
150
|
+
ie = m(1, "getInt8", "setInt8"),
|
151
|
+
ae = m(2, "getInt16", "setInt16"),
|
152
|
+
ue = m(4, "getInt32", "setInt32"),
|
153
|
+
me = m(8, "getBigInt64", "setBigInt64"),
|
154
|
+
R = (e) => {
|
155
|
+
let t = new Uint8Array(16),
|
156
|
+
n = new DataView(t.buffer)
|
157
|
+
return n.setBigInt64(0, e, !0), n.setBigInt64(8, e >> 64n, !0), t
|
158
|
+
},
|
159
|
+
V = (e) =>
|
160
|
+
s((t) => {
|
161
|
+
let { v: n, i: r } = t,
|
162
|
+
o = n.getBigUint64(r, !0),
|
163
|
+
d = n[e ? "getBigInt64" : "getBigUint64"](r + 8, !0)
|
164
|
+
return (t.i += 16), (d << 64n) | o
|
165
|
+
}),
|
166
|
+
fe = c(R, V()),
|
167
|
+
pe = c(R, V(1))
|
168
|
+
var ye = (e) => (e ? 1 : 0),
|
169
|
+
D = k(a, ye, Boolean)
|
170
|
+
var Oe = { [1]: a[1], [2]: B[1], [4]: v[1] },
|
171
|
+
De = s((e) => {
|
172
|
+
let t = e.i,
|
173
|
+
n = e[t],
|
174
|
+
r = n & 3
|
175
|
+
if (r !== 3) {
|
176
|
+
let p = r === 2 ? 4 : r + 1
|
177
|
+
return Oe[p](e) >>> 2
|
178
|
+
}
|
179
|
+
let o = (n >>> 2) + 4,
|
180
|
+
d = t + 1
|
181
|
+
e.i += o + 1
|
182
|
+
let u = 0n
|
183
|
+
for (let p = o - 1; p >= 0; p--) u = (u << 8n) | BigInt(e[d + p])
|
184
|
+
return u
|
185
|
+
}),
|
186
|
+
le = (e) => {
|
187
|
+
if (e < 0) throw new Error(`Wrong Compat input (${e})`)
|
188
|
+
if (e < 1 << 6) {
|
189
|
+
let r = new Uint8Array(1)
|
190
|
+
return (r[0] = Number(e) << 2), r
|
191
|
+
}
|
192
|
+
if (e < 1 << 14) {
|
193
|
+
let r = new Uint8Array(2),
|
194
|
+
o = (Number(e) << 2) + 1
|
195
|
+
return new DataView(r.buffer).setUint16(0, o, !0), r
|
196
|
+
}
|
197
|
+
if (e < 1 << 30) {
|
198
|
+
let r = new Uint8Array(4),
|
199
|
+
o = (Number(e) << 2) + 2
|
200
|
+
return new DataView(r.buffer).setUint32(0, o, !0), r
|
201
|
+
}
|
202
|
+
let t = [],
|
203
|
+
n = BigInt(e)
|
204
|
+
for (; n > 0; ) t.push(Number(n)), (n >>= 8n)
|
205
|
+
return t.unshift(((t.length - 4) << 2) + 3), new Uint8Array(t)
|
206
|
+
},
|
207
|
+
f = c(le, De)
|
208
|
+
var xe = new TextEncoder(),
|
209
|
+
ge = (e) => {
|
210
|
+
let t = xe.encode(e)
|
211
|
+
return i(f.enc(t.length), t)
|
212
|
+
},
|
213
|
+
be = new TextDecoder(),
|
214
|
+
Ee = s((e) => {
|
215
|
+
let t = f.dec(e),
|
216
|
+
n = new DataView(e.buffer, e.i, t)
|
217
|
+
return (e.i += t), be.decode(n)
|
218
|
+
}),
|
219
|
+
h = c(ge, Ee)
|
220
|
+
var Te = new Uint8Array(0),
|
221
|
+
j = c(() => Te, Function.prototype)
|
222
|
+
var S = (e) => (t) => t.length === e ? t : t.slice(0, e),
|
223
|
+
P = (e) =>
|
224
|
+
s((t) => {
|
225
|
+
let n = t.i,
|
226
|
+
r = e !== 1 / 0 ? e : t.byteLength - n,
|
227
|
+
o = new Uint8Array(t.buffer, n, r)
|
228
|
+
return (t.i += r), o
|
229
|
+
}),
|
230
|
+
E = (e) => c(S(e), P(e))
|
231
|
+
E.enc = S
|
232
|
+
E.dec = P
|
233
|
+
var N = (e) => {
|
234
|
+
let t = Object.keys(e)
|
235
|
+
return ({ tag: n, value: r }) => {
|
236
|
+
let o = t.indexOf(n)
|
237
|
+
return i(a.enc(o), e[n](r))
|
238
|
+
}
|
239
|
+
},
|
240
|
+
L = (e) => {
|
241
|
+
let t = Object.entries(e)
|
242
|
+
return s((n) => {
|
243
|
+
let r = a.dec(n),
|
244
|
+
[o, d] = t[r],
|
245
|
+
u = d(n)
|
246
|
+
return { tag: o, value: u }
|
247
|
+
})
|
248
|
+
},
|
249
|
+
T = (e) => c(N(O(e, ([t]) => t)), L(O(e, ([, t]) => t)))
|
250
|
+
T.enc = N
|
251
|
+
T.dec = L
|
252
|
+
var _ = (e) =>
|
253
|
+
s((t) => {
|
254
|
+
let n = a.dec(t)
|
255
|
+
if (n !== 0) return e === D[1] ? n === 1 : e(t)
|
256
|
+
}),
|
257
|
+
F = (e) => (t) => {
|
258
|
+
let n = new Uint8Array(1)
|
259
|
+
return t === void 0
|
260
|
+
? ((n[0] = 0), n)
|
261
|
+
: ((n[0] = 1), e === D[0] ? ((n[0] = t ? 1 : 2), n) : i(n, e(t)))
|
262
|
+
},
|
263
|
+
A = (e) => c(F(e[0]), _(e[1]))
|
264
|
+
A.enc = F
|
265
|
+
A.dec = _
|
266
|
+
var H = (e, t) =>
|
267
|
+
s((n) => {
|
268
|
+
let o = a[1](n) === 0,
|
269
|
+
u = (o ? e : t)(n)
|
270
|
+
return { success: o, value: u }
|
271
|
+
}),
|
272
|
+
M =
|
273
|
+
(e, t) =>
|
274
|
+
({ success: n, value: r }) =>
|
275
|
+
i(a[0](n ? 0 : 1), (n ? e : t)(r)),
|
276
|
+
C = (e, t) => c(M(e[0], t[0]), H(e[1], t[1]))
|
277
|
+
C.dec = H
|
278
|
+
C.enc = M
|
279
|
+
var W = (...e) => s((t) => e.map((n) => n(t))),
|
280
|
+
X =
|
281
|
+
(...e) =>
|
282
|
+
(t) =>
|
283
|
+
i(...t.map((n, r) => e[r](n))),
|
284
|
+
y = (...e) => c(X(...e.map(([t]) => t)), W(...e.map(([, t]) => t)))
|
285
|
+
y.enc = X
|
286
|
+
y.dec = W
|
287
|
+
var $ = (e) => {
|
288
|
+
let t = Object.keys(e)
|
289
|
+
return x(y.enc(...Object.values(e)), (n) => t.map((r) => n[r]))
|
290
|
+
},
|
291
|
+
q = (e) => {
|
292
|
+
let t = Object.keys(e)
|
293
|
+
return g(y.dec(...Object.values(e)), (n) =>
|
294
|
+
Object.fromEntries(n.map((r, o) => [t[o], r])),
|
295
|
+
)
|
296
|
+
},
|
297
|
+
K = (e) => c($(O(e, (t) => t[0])), q(O(e, (t) => t[1])))
|
298
|
+
K.enc = $
|
299
|
+
K.dec = q
|
300
|
+
var G = (e, t) =>
|
301
|
+
t > 0 ? (n) => i(...n.map(e)) : (n) => i(f.enc(n.length), ...n.map(e))
|
302
|
+
function J(e, t) {
|
303
|
+
return s((n) => {
|
304
|
+
let r = t > 0 ? t : f.dec(n),
|
305
|
+
o = new Array(r)
|
306
|
+
for (let d = 0; d < r; d++) {
|
307
|
+
let u = e(n)
|
308
|
+
o[d] = u
|
309
|
+
}
|
310
|
+
return o
|
311
|
+
})
|
312
|
+
}
|
313
|
+
function w(e, t) {
|
314
|
+
return c(G(e[0], t), J(e[1], t))
|
315
|
+
}
|
316
|
+
w.enc = G
|
317
|
+
w.dec = J
|
318
|
+
//# sourceMappingURL=scale-ts.cjs.production.min.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/index.ts", "../src/utils.ts", "../src/internal/toInternalBytes.ts", "../src/internal/mergeUint8.ts", "../src/internal/mapObject.ts", "../src/codecs/fixed-width-ints.ts", "../src/codecs/bool.ts", "../src/codecs/compact.ts", "../src/codecs/str.ts", "../src/codecs/void.ts", "../src/codecs/Bytes.ts", "../src/codecs/Enum.ts", "../src/codecs/Option.ts", "../src/codecs/Result.ts", "../src/codecs/Tuple.ts", "../src/codecs/Struct.ts", "../src/codecs/Vector.ts"],
|
4
|
+
"sourcesContent": ["export * from \"./utils\"\nexport * from \"./types\"\nexport * from \"./codecs\"\n", "import type { Codec, Decoder, Encoder } from \"./types\"\n\nexport const createCodec = <T>(\n encoder: Encoder<T>,\n decoder: Decoder<T>,\n): Codec<T> => {\n const result = [encoder, decoder] as any\n result.enc = encoder\n result.dec = decoder\n return result\n}\n\nexport const enhanceEncoder =\n <I, O>(encoder: Encoder<I>, mapper: (value: O) => I): Encoder<O> =>\n (value) =>\n encoder(mapper(value))\n\nexport const enhanceDecoder =\n <I, O>(decoder: Decoder<I>, mapper: (value: I) => O): Decoder<O> =>\n (value) =>\n mapper(decoder(value))\n\nexport const enhanceCodec = <I, O>(\n [encoder, decoder]: Codec<I>,\n toFrom: (value: O) => I,\n fromTo: (value: I) => O,\n): Codec<O> =>\n createCodec(enhanceEncoder(encoder, toFrom), enhanceDecoder(decoder, fromTo))\n", "import { Decoder } from \"../types\"\n\n// https://jsben.ch/URe1X\nconst HEX_MAP: Record<string, number> = {\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3,\n 4: 4,\n 5: 5,\n 6: 6,\n 7: 7,\n 8: 8,\n 9: 9,\n a: 10,\n b: 11,\n c: 12,\n d: 13,\n e: 14,\n f: 15,\n A: 10,\n B: 11,\n C: 12,\n D: 13,\n E: 14,\n F: 15,\n}\nexport function fromHex(hexString: string): Uint8Array {\n const isOdd = hexString.length % 2\n const base = (hexString[1] === \"x\" ? 2 : 0) + isOdd\n const nBytes = (hexString.length - base) / 2 + isOdd\n const bytes = new Uint8Array(nBytes)\n\n if (isOdd) bytes[0] = 0 | HEX_MAP[hexString[2]]\n\n for (let i = 0; i < nBytes; ) {\n const idx = base + i * 2\n const a = HEX_MAP[hexString[idx]]\n const b = HEX_MAP[hexString[idx + 1]]\n bytes[isOdd + i++] = (a << 4) | b\n }\n\n return bytes\n}\n\nclass InternalUint8Array extends Uint8Array {\n i: number = 0\n v: DataView\n\n constructor(buffer: ArrayBuffer) {\n super(buffer)\n this.v = new DataView(buffer)\n }\n}\n\nexport const toInternalBytes =\n <T>(fn: (input: InternalUint8Array) => T): Decoder<T> =>\n (buffer: string | ArrayBuffer | Uint8Array | InternalUint8Array) =>\n fn(\n buffer instanceof InternalUint8Array\n ? buffer\n : new InternalUint8Array(\n typeof buffer === \"string\"\n ? fromHex(buffer).buffer\n : buffer instanceof Uint8Array\n ? buffer.buffer\n : buffer,\n ),\n )\n", "export const mergeUint8 = (...inputs: Array<Uint8Array>): Uint8Array => {\n const totalLen = inputs.reduce((acc, a) => acc + a.byteLength, 0)\n const result = new Uint8Array(totalLen)\n\n for (let idx = 0, at = 0; idx < inputs.length; idx++) {\n const current = inputs[idx]\n result.set(current, at)\n at += current.byteLength\n }\n\n return result\n}\n", "export function mapObject<K extends string | number | symbol, I, O>(\n input: Record<K, I>,\n mapper: (i: I, k: K) => O,\n): Record<K, O>\n\nexport function mapObject<K extends string | number | symbol, I, O>(\n input: Record<K, I>,\n mapper: (i: I, k?: K) => O,\n): Record<K, O> {\n return Object.fromEntries(\n Object.entries(input).map(\n ([key, value]: any) => [key, mapper(value, key)] as const,\n ),\n ) as any\n}\n", "import { createCodec } from \"../utils\"\nimport { Codec, Decoder, Encoder } from \"../types\"\nimport { toInternalBytes } from \"../internal\"\n\nfunction decodeInt(nBytes: 8, getter: keyof DataView): Decoder<bigint>\nfunction decodeInt(nBytes: number, getter: keyof DataView): Decoder<number>\nfunction decodeInt(\n nBytes: number,\n getter: keyof DataView,\n): Decoder<number> | Decoder<bigint> {\n return toInternalBytes((bytes) => {\n const result = (bytes.v[getter] as any)(bytes.i, true) as number\n bytes.i += nBytes\n return result\n })\n}\n\nfunction encodeInt(nBytes: 8, setter: keyof DataView): Encoder<bigint>\nfunction encodeInt(nBytes: number, setter: keyof DataView): Encoder<number>\nfunction encodeInt(\n nBytes: number,\n setter: keyof DataView,\n): Encoder<number> | Encoder<bigint> {\n return (input: number | bigint) => {\n const result = new Uint8Array(nBytes)\n const dv = new DataView(result.buffer)\n ;(dv[setter] as any)(0, input, true)\n return result\n }\n}\n\nfunction intCodec(\n nBytes: 8,\n getter: keyof DataView,\n setter: keyof DataView,\n): Codec<bigint>\nfunction intCodec(\n nBytes: number,\n getter: keyof DataView,\n setter: keyof DataView,\n): Codec<number>\nfunction intCodec(\n nBytes: number,\n getter: keyof DataView,\n setter: keyof DataView,\n): Codec<bigint> | Codec<number> {\n return createCodec(encodeInt(nBytes, setter), decodeInt(nBytes, getter))\n}\n\nexport const u8 = intCodec(1, \"getUint8\", \"setUint8\")\nexport const u16 = intCodec(2, \"getUint16\", \"setUint16\")\nexport const u32 = intCodec(4, \"getUint32\", \"setUint32\")\nexport const u64 = intCodec(8, \"getBigUint64\", \"setBigUint64\")\nexport const i8 = intCodec(1, \"getInt8\", \"setInt8\")\nexport const i16 = intCodec(2, \"getInt16\", \"setInt16\")\nexport const i32 = intCodec(4, \"getInt32\", \"setInt32\")\nexport const i64 = intCodec(8, \"getBigInt64\", \"setBigInt64\")\n\nconst x128Enc: Encoder<bigint> = (value) => {\n const result = new Uint8Array(16)\n const dv = new DataView(result.buffer)\n dv.setBigInt64(0, value, true)\n dv.setBigInt64(8, value >> 64n, true)\n return result\n}\n\nconst create128Dec = (isSigned?: number): Decoder<bigint> =>\n toInternalBytes((input) => {\n const { v, i } = input\n const right = v.getBigUint64(i, true)\n const left = v[isSigned ? \"getBigInt64\" : \"getBigUint64\"](i + 8, true)\n input.i += 16\n return (left << 64n) | right\n })\n\nexport const u128 = createCodec(x128Enc, create128Dec())\nexport const i128 = createCodec(x128Enc, create128Dec(1))\n", "import { Codec } from \"../types\"\nimport { enhanceCodec } from \"../\"\nimport { u8 } from \"./fixed-width-ints\"\n\nconst booleanToNumber = (value: boolean) => (value ? 1 : 0)\n\nexport const bool: Codec<boolean> = enhanceCodec(u8, booleanToNumber, Boolean)\n", "import { createCodec } from \"../\"\nimport { toInternalBytes } from \"../internal\"\nimport { u8, u16, u32 } from \"./fixed-width-ints\"\nimport { Decoder, Encoder, Codec } from \"../types\"\n\nconst bytesToIntType = {\n [1]: u8[1],\n [2]: u16[1],\n [4]: u32[1],\n} as const\n\nconst compactDec: Decoder<number | bigint> = toInternalBytes<number | bigint>(\n (bytes) => {\n let usedBytes = bytes.i\n const init = bytes[usedBytes]\n\n const kind = init & 3\n\n if (kind !== 3) {\n const nBytes = kind === 2 ? 4 : kind + 1\n return bytesToIntType[nBytes as 1 | 2 | 4](bytes) >>> 2\n }\n\n const nBytes = (init >>> 2) + 4\n const start = usedBytes + 1\n bytes.i += nBytes + 1\n\n let result = 0n\n for (let i = nBytes - 1; i >= 0; i--)\n result = (result << 8n) | BigInt(bytes[start + i])\n\n return result\n },\n)\n\nconst compactEnc: Encoder<number | bigint> = (input) => {\n if (input < 0) {\n throw new Error(`Wrong Compat input (${input})`)\n }\n if (input < 1 << 6) {\n const temp = new Uint8Array(1)\n temp[0] = Number(input) << 2\n return temp\n }\n if (input < 1 << 14) {\n const temp = new Uint8Array(2)\n let pInput = (Number(input) << 2) + 1\n const dv = new DataView(temp.buffer)\n dv.setUint16(0, pInput, true)\n return temp\n }\n if (input < 1 << 30) {\n const temp = new Uint8Array(4)\n let pInput = (Number(input) << 2) + 2\n const dv = new DataView(temp.buffer)\n dv.setUint32(0, pInput, true)\n return temp\n }\n\n const result: number[] = []\n let tmp = BigInt(input)\n while (tmp > 0) {\n result.push(Number(tmp))\n tmp >>= 8n\n }\n result.unshift(((result.length - 4) << 2) + 3)\n return new Uint8Array(result)\n}\n\nexport const compact: Codec<number | bigint> = createCodec(\n compactEnc,\n compactDec,\n)\n", "import { createCodec, Decoder, Encoder } from \"../\"\nimport { toInternalBytes, mergeUint8 } from \"../internal\"\nimport { compact } from \"./compact\"\n\nconst textEncoder = new TextEncoder()\nconst strEnc: Encoder<string> = (str) => {\n const val = textEncoder.encode(str)\n return mergeUint8(compact.enc(val.length), val)\n}\n\nconst textDecoder = new TextDecoder()\nconst strDec: Decoder<string> = toInternalBytes((bytes) => {\n let nElements = compact.dec(bytes) as number\n const dv = new DataView(bytes.buffer, bytes.i, nElements)\n bytes.i += nElements\n return textDecoder.decode(dv)\n})\n\nexport const str = createCodec(strEnc, strDec)\n", "import { Codec } from \"../types\"\nimport { createCodec } from \"../\"\n\nconst emptyArr = new Uint8Array(0)\nexport const _void: Codec<undefined> = createCodec(\n () => emptyArr,\n Function.prototype as () => undefined,\n)\n", "import { Encoder, Decoder, Codec } from \"../types\"\nimport { createCodec } from \"../\"\nimport { toInternalBytes } from \"../internal\"\n\nconst BytesEnc =\n (nBytes: number): Encoder<Uint8Array> =>\n (bytes) =>\n bytes.length === nBytes ? bytes : bytes.slice(0, nBytes)\n\nconst BytesDec = (nBytes: number): Decoder<Uint8Array> =>\n toInternalBytes((bytes) => {\n const nUsedBytes = bytes.i\n const len = nBytes !== Infinity ? nBytes : bytes.byteLength - nUsedBytes\n const result = new Uint8Array(bytes.buffer, nUsedBytes, len)\n bytes.i += len\n return result\n })\n\nexport const Bytes = (nBytes: number): Codec<Uint8Array> =>\n createCodec(BytesEnc(nBytes), BytesDec(nBytes))\n\nBytes.enc = BytesEnc\nBytes.dec = BytesDec\n", "import { Codec, Decoder, Encoder, StringRecord } from \"../types\"\nimport { toInternalBytes, mapObject, mergeUint8 } from \"../internal\"\nimport { createCodec, u8 } from \"../\"\n\nconst enumEnc = <\n O extends StringRecord<Encoder<any>>,\n OT extends {\n [K in keyof O]: O[K] extends Encoder<infer D>\n ? D extends undefined\n ? { tag: K; value?: undefined }\n : { tag: K; value: D }\n : unknown\n },\n>(\n inner: O,\n): Encoder<OT[keyof O]> => {\n const keys = Object.keys(inner)\n return ({ tag, value }: any) => {\n const idx = keys.indexOf(tag)\n return mergeUint8(u8.enc(idx), (inner as any)[tag](value))\n }\n}\n\nconst enumDec = <\n O extends StringRecord<Decoder<any>>,\n OT extends {\n [K in keyof O]: O[K] extends Decoder<infer D>\n ? D extends undefined\n ? { tag: K; value?: undefined }\n : { tag: K; value: D }\n : unknown\n },\n>(\n inner: O,\n): Decoder<OT[keyof O]> => {\n const entries = Object.entries(inner)\n\n return toInternalBytes((bytes) => {\n const idx = u8.dec(bytes)\n const [tag, innerDecoder] = entries[idx]\n const innerResult = innerDecoder(bytes)\n\n return {\n tag,\n value: innerResult,\n } as OT[keyof O]\n })\n}\n\nexport const Enum = <\n O extends StringRecord<Codec<any>>,\n OT extends {\n [K in keyof O]: O[K] extends Codec<infer D>\n ? D extends undefined\n ? { tag: K; value?: undefined }\n : { tag: K; value: D }\n : unknown\n },\n>(\n inner: O,\n): Codec<OT[keyof O]> =>\n createCodec<OT[keyof O]>(\n enumEnc(mapObject(inner, ([encoder]) => encoder) as any) as any,\n enumDec(mapObject(inner, ([, decoder]) => decoder) as any),\n )\n\nEnum.enc = enumEnc\nEnum.dec = enumDec\n", "import { Decoder, Encoder, Codec } from \"../types\"\nimport { toInternalBytes, mergeUint8 } from \"../internal\"\nimport { createCodec } from \"../utils\"\nimport { u8 } from \"./fixed-width-ints\"\nimport { bool } from \"./bool\"\n\nconst OptionDec = <T>(inner: Decoder<T>): Decoder<T | undefined | void> =>\n toInternalBytes<T | undefined>((bytes) => {\n const val = u8.dec(bytes)\n if (val === 0) return undefined\n\n return inner === (bool[1] as any)\n ? ((val === 1) as unknown as T)\n : inner(bytes)\n })\n\nconst OptionEnc =\n <T>(inner: Encoder<T>): Encoder<T | undefined | void> =>\n (value) => {\n const result = new Uint8Array(1)\n if (value === undefined) {\n result[0] = 0\n return result\n }\n\n result[0] = 1\n if (inner === (bool[0] as any)) {\n result[0] = value ? 1 : 2\n return result\n }\n\n return mergeUint8(result, inner(value))\n }\n\nexport const Option = <T>(inner: Codec<T>): Codec<T | undefined | void> =>\n createCodec(OptionEnc(inner[0]), OptionDec(inner[1]))\n\nOption.enc = OptionEnc\nOption.dec = OptionDec\n", "import { createCodec } from \"../utils\"\nimport { mergeUint8, toInternalBytes } from \"../internal\"\nimport { Decoder, Encoder, Codec } from \"../types\"\nimport { u8 } from \"./fixed-width-ints\"\n\ntype ResultPayload<OK, KO> =\n | { success: true; value: OK }\n | { success: false; value: KO }\n\nconst ResultDec = <OK, KO>(\n okDecoder: Decoder<OK>,\n koDecoder: Decoder<KO>,\n): Decoder<ResultPayload<OK, KO>> =>\n toInternalBytes((bytes) => {\n const val = u8[1](bytes)\n const success = val === 0\n const decoder = success ? okDecoder : koDecoder\n const value = decoder(bytes)\n return { success, value } as ResultPayload<OK, KO>\n })\n\nconst ResultEnc =\n <OK, KO>(\n okEncoder: Encoder<OK>,\n koEncoder: Encoder<KO>,\n ): Encoder<ResultPayload<OK, KO>> =>\n ({ success, value }) =>\n mergeUint8(\n u8[0](success ? 0 : 1),\n (success ? okEncoder : koEncoder)(value as any),\n )\n\nexport const Result = <OK, KO>(\n okCodec: Codec<OK>,\n koCodec: Codec<KO>,\n): Codec<ResultPayload<OK, KO>> =>\n createCodec(\n ResultEnc(okCodec[0], koCodec[0]),\n ResultDec(okCodec[1], koCodec[1]),\n )\n\nResult.dec = ResultDec\nResult.enc = ResultEnc\n", "import { Codec, Decoder, Encoder } from \"../types\"\nimport { mergeUint8, toInternalBytes } from \"../internal\"\nimport { createCodec } from \"../utils\"\n\nconst TupleDec = <\n A extends Array<Decoder<any>>,\n OT extends { [K in keyof A]: A[K] extends Decoder<infer D> ? D : unknown },\n>(\n ...decoders: A\n): Decoder<[...OT]> =>\n toInternalBytes(\n (bytes) => decoders.map((decoder) => decoder(bytes)) as [...OT],\n )\n\nconst TupleEnc =\n <\n A extends Array<Encoder<any>>,\n OT extends { [K in keyof A]: A[K] extends Encoder<infer D> ? D : unknown },\n >(\n ...encoders: A\n ): Encoder<[...OT]> =>\n (values) =>\n mergeUint8(...values.map((value, idx) => encoders[idx](value)))\n\nexport const Tuple = <\n A extends Array<Codec<any>>,\n OT extends { [K in keyof A]: A[K] extends Codec<infer D> ? D : unknown },\n>(\n ...codecs: A\n): Codec<[...OT]> =>\n createCodec(\n TupleEnc(...codecs.map(([encoder]) => encoder)),\n TupleDec(...codecs.map(([, decoder]) => decoder)),\n )\n\nTuple.enc = TupleEnc\nTuple.dec = TupleDec\n", "import { mapObject } from \"../internal\"\nimport { Codec, Decoder, Encoder, StringRecord } from \"../types\"\nimport { createCodec, enhanceDecoder, enhanceEncoder } from \"../utils\"\nimport { Tuple } from \"./Tuple\"\n\nconst StructEnc = <\n A extends StringRecord<Encoder<any>>,\n OT extends { [K in keyof A]: A[K] extends Encoder<infer D> ? D : unknown },\n>(\n encoders: A,\n): Encoder<OT> => {\n const keys = Object.keys(encoders)\n return enhanceEncoder(Tuple.enc(...Object.values(encoders)), (input: OT) =>\n keys.map((k) => input[k]),\n )\n}\n\nconst StructDec = <\n A extends StringRecord<Decoder<any>>,\n OT extends { [K in keyof A]: A[K] extends Decoder<infer D> ? D : unknown },\n>(\n decoders: A,\n): Decoder<OT> => {\n const keys = Object.keys(decoders)\n return enhanceDecoder(\n Tuple.dec(...Object.values(decoders)),\n (tuple: Array<any>) =>\n Object.fromEntries(tuple.map((value, idx) => [keys[idx], value])) as OT,\n )\n}\n\nexport const Struct = <\n A extends StringRecord<Codec<any>>,\n OT extends { [K in keyof A]: A[K] extends Codec<infer D> ? D : unknown },\n>(\n codecs: A,\n): Codec<OT> =>\n createCodec(\n StructEnc(mapObject(codecs, (x) => x[0]) as any),\n StructDec(mapObject(codecs, (x) => x[1]) as any),\n )\n\nStruct.enc = StructEnc\nStruct.dec = StructDec\n", "import { toInternalBytes, mergeUint8 } from \"../internal\"\nimport { createCodec } from \"../utils\"\nimport { Codec, Decoder, Encoder } from \"../types\"\nimport { compact } from \"./compact\"\n\nconst VectorEnc = <T>(inner: Encoder<T>, size?: number): Encoder<Array<T>> =>\n size! > 0\n ? (value) => mergeUint8(...value.map(inner))\n : (value) => mergeUint8(compact.enc(value.length), ...value.map(inner))\n\nfunction VectorDec<T>(getter: Decoder<T>, size?: number): Decoder<Array<T>> {\n return toInternalBytes((bytes) => {\n const nElements = size! > 0 ? size! : compact.dec(bytes)\n const result = new Array(nElements as number)\n\n for (let i = 0; i < nElements; i++) {\n const current = getter(bytes)\n result[i] = current\n }\n\n return result\n })\n}\n\nexport function Vector<T>(inner: Codec<T>, size?: number): Codec<Array<T>> {\n return createCodec(VectorEnc(inner[0], size), VectorDec(inner[1], size))\n}\n\nVector.enc = VectorEnc\nVector.dec = VectorDec\n"],
|
5
|
+
"mappings": "8iBAAA,yWCEO,GAAM,GAAc,CACzB,EACA,IACa,CACb,GAAM,GAAS,CAAC,EAAS,CAAO,EAChC,SAAO,IAAM,EACb,EAAO,IAAM,EACN,CACT,EAEa,EACX,CAAO,EAAqB,IAC5B,AAAC,GACC,EAAQ,EAAO,CAAK,CAAC,EAEZ,EACX,CAAO,EAAqB,IAC5B,AAAC,GACC,EAAO,EAAQ,CAAK,CAAC,EAEZ,EAAe,CAC1B,CA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