@zoralabs/protocol-sdk 0.12.0 → 0.12.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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs +29 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -12
- package/dist/index.js.map +1 -1
- package/dist/preminter.d.ts +5 -5
- package/dist/preminter.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6589,7 +6589,7 @@ function isArweaveURL(url) {
|
|
|
6589
6589
|
return url && typeof url === "string" ? url.startsWith("ar://") : false;
|
|
6590
6590
|
}
|
|
6591
6591
|
|
|
6592
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
6592
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/bytes.js
|
|
6593
6593
|
var empty = new Uint8Array(0);
|
|
6594
6594
|
function equals(aa, bb) {
|
|
6595
6595
|
if (aa === bb)
|
|
@@ -6615,7 +6615,7 @@ function coerce3(o) {
|
|
|
6615
6615
|
throw new Error("Unknown type, must be binary type");
|
|
6616
6616
|
}
|
|
6617
6617
|
|
|
6618
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
6618
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/vendor/base-x.js
|
|
6619
6619
|
function base3(ALPHABET, name) {
|
|
6620
6620
|
if (ALPHABET.length >= 255) {
|
|
6621
6621
|
throw new TypeError("Alphabet too long");
|
|
@@ -6751,7 +6751,7 @@ var src = base3;
|
|
|
6751
6751
|
var _brrp__multiformats_scope_baseX = src;
|
|
6752
6752
|
var base_x_default = _brrp__multiformats_scope_baseX;
|
|
6753
6753
|
|
|
6754
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
6754
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/bases/base.js
|
|
6755
6755
|
var Encoder = class {
|
|
6756
6756
|
constructor(name, prefix, baseEncode) {
|
|
6757
6757
|
__publicField(this, "name");
|
|
@@ -6777,10 +6777,11 @@ var Decoder = class {
|
|
|
6777
6777
|
__publicField(this, "prefixCodePoint");
|
|
6778
6778
|
this.name = name;
|
|
6779
6779
|
this.prefix = prefix;
|
|
6780
|
-
|
|
6780
|
+
const prefixCodePoint = prefix.codePointAt(0);
|
|
6781
|
+
if (prefixCodePoint === void 0) {
|
|
6781
6782
|
throw new Error("Invalid prefix character");
|
|
6782
6783
|
}
|
|
6783
|
-
this.prefixCodePoint =
|
|
6784
|
+
this.prefixCodePoint = prefixCodePoint;
|
|
6784
6785
|
this.baseDecode = baseDecode;
|
|
6785
6786
|
}
|
|
6786
6787
|
decode(text) {
|
|
@@ -6922,7 +6923,7 @@ function rfc4648({ name, prefix, bitsPerChar, alphabet }) {
|
|
|
6922
6923
|
});
|
|
6923
6924
|
}
|
|
6924
6925
|
|
|
6925
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
6926
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/bases/base32.js
|
|
6926
6927
|
var base32 = rfc4648({
|
|
6927
6928
|
prefix: "b",
|
|
6928
6929
|
name: "base32",
|
|
@@ -6978,7 +6979,19 @@ var base32z = rfc4648({
|
|
|
6978
6979
|
bitsPerChar: 5
|
|
6979
6980
|
});
|
|
6980
6981
|
|
|
6981
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
6982
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/bases/base36.js
|
|
6983
|
+
var base36 = baseX({
|
|
6984
|
+
prefix: "k",
|
|
6985
|
+
name: "base36",
|
|
6986
|
+
alphabet: "0123456789abcdefghijklmnopqrstuvwxyz"
|
|
6987
|
+
});
|
|
6988
|
+
var base36upper = baseX({
|
|
6989
|
+
prefix: "K",
|
|
6990
|
+
name: "base36upper",
|
|
6991
|
+
alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
6992
|
+
});
|
|
6993
|
+
|
|
6994
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/bases/base58.js
|
|
6982
6995
|
var base58btc = baseX({
|
|
6983
6996
|
name: "base58btc",
|
|
6984
6997
|
prefix: "z",
|
|
@@ -6990,7 +7003,7 @@ var base58flickr = baseX({
|
|
|
6990
7003
|
alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
|
|
6991
7004
|
});
|
|
6992
7005
|
|
|
6993
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
7006
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/vendor/varint.js
|
|
6994
7007
|
var encode_1 = encode2;
|
|
6995
7008
|
var MSB = 128;
|
|
6996
7009
|
var REST = 127;
|
|
@@ -7049,7 +7062,7 @@ var varint = {
|
|
|
7049
7062
|
var _brrp_varint = varint;
|
|
7050
7063
|
var varint_default = _brrp_varint;
|
|
7051
7064
|
|
|
7052
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
7065
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/varint.js
|
|
7053
7066
|
function decode3(data, offset = 0) {
|
|
7054
7067
|
const code = varint_default.decode(data, offset);
|
|
7055
7068
|
return [code, varint_default.decode.bytes];
|
|
@@ -7062,7 +7075,7 @@ function encodingLength(int) {
|
|
|
7062
7075
|
return varint_default.encodingLength(int);
|
|
7063
7076
|
}
|
|
7064
7077
|
|
|
7065
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
7078
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/hashes/digest.js
|
|
7066
7079
|
function create(code, digest) {
|
|
7067
7080
|
const size = digest.byteLength;
|
|
7068
7081
|
const sizeOffset = encodingLength(code);
|
|
@@ -7107,7 +7120,7 @@ var Digest = class {
|
|
|
7107
7120
|
}
|
|
7108
7121
|
};
|
|
7109
7122
|
|
|
7110
|
-
// ../../node_modules/.pnpm/multiformats@13.
|
|
7123
|
+
// ../../node_modules/.pnpm/multiformats@13.3.1/node_modules/multiformats/dist/src/cid.js
|
|
7111
7124
|
function format(link, base4) {
|
|
7112
7125
|
const { bytes, version } = link;
|
|
7113
7126
|
switch (version) {
|
|
@@ -7393,9 +7406,13 @@ function parseCIDtoBytes(source, base4) {
|
|
|
7393
7406
|
const decoder = base4 ?? base32;
|
|
7394
7407
|
return [base32.prefix, decoder.decode(source)];
|
|
7395
7408
|
}
|
|
7409
|
+
case base36.prefix: {
|
|
7410
|
+
const decoder = base4 ?? base36;
|
|
7411
|
+
return [base36.prefix, decoder.decode(source)];
|
|
7412
|
+
}
|
|
7396
7413
|
default: {
|
|
7397
7414
|
if (base4 == null) {
|
|
7398
|
-
throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");
|
|
7415
|
+
throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");
|
|
7399
7416
|
}
|
|
7400
7417
|
return [source[0], base4.decode(source)];
|
|
7401
7418
|
}
|