bitbadgesjs-sdk 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api-indexer/BitBadgesApi.js +74 -210
- package/dist/cjs/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/cjs/api-indexer/requests/requests.d.ts +5 -5
- package/dist/cjs/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/cjs/api-indexer/requests/requests.js.map +1 -1
- package/dist/cjs/api-indexer/requests/routes.d.ts +0 -2
- package/dist/cjs/api-indexer/requests/routes.d.ts.map +1 -1
- package/dist/cjs/api-indexer/requests/routes.js +0 -2
- package/dist/cjs/api-indexer/requests/routes.js.map +1 -1
- package/dist/cjs/attestations/attestations.d.ts +3 -4
- package/dist/cjs/attestations/attestations.d.ts.map +1 -1
- package/dist/cjs/attestations/attestations.js.map +1 -1
- package/dist/esm/api-indexer/BitBadgesApi.js +74 -210
- package/dist/esm/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/esm/api-indexer/requests/requests.d.ts +5 -5
- package/dist/esm/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/esm/api-indexer/requests/requests.js.map +1 -1
- package/dist/esm/api-indexer/requests/routes.d.ts +0 -2
- package/dist/esm/api-indexer/requests/routes.d.ts.map +1 -1
- package/dist/esm/api-indexer/requests/routes.js +0 -2
- package/dist/esm/api-indexer/requests/routes.js.map +1 -1
- package/dist/esm/attestations/attestations.d.ts +3 -4
- package/dist/esm/attestations/attestations.d.ts.map +1 -1
- package/dist/esm/attestations/attestations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1509,23 +1509,7 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
async createAttestation(payload) {
|
|
1511
1511
|
try {
|
|
1512
|
-
const validateRes = (() => { const _io0 = input =>
|
|
1513
|
-
path: _path + ".anchors",
|
|
1514
|
-
expected: "(Array<__type> | undefined)",
|
|
1515
|
-
value: input.anchors
|
|
1516
|
-
})) && input.anchors.map((elem, _index3) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
|
|
1517
|
-
path: _path + ".anchors[" + _index3 + "]",
|
|
1518
|
-
expected: "__type",
|
|
1519
|
-
value: elem
|
|
1520
|
-
})) && _vo1(elem, _path + ".anchors[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1521
|
-
path: _path + ".anchors[" + _index3 + "]",
|
|
1522
|
-
expected: "__type",
|
|
1523
|
-
value: elem
|
|
1524
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1525
|
-
path: _path + ".anchors",
|
|
1526
|
-
expected: "(Array<__type> | undefined)",
|
|
1527
|
-
value: input.anchors
|
|
1528
|
-
}), "string" === typeof input.name || _report(_exceptionable, {
|
|
1512
|
+
const validateRes = (() => { const _io0 = input => "string" === typeof input.name && "string" === typeof input.description && "string" === typeof input.image && (undefined === input.originalProvider || "string" === typeof input.originalProvider) && (undefined === input.proofOfIssuance || "object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance && _io1(input.proofOfIssuance)) && ("plaintext" === input.messageFormat || "json" === input.messageFormat) && "string" === typeof input.scheme && (Array.isArray(input.messages) && input.messages.every(elem => "string" === typeof elem)) && (undefined === input.dataIntegrityProof || "object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof && _io2(input.dataIntegrityProof)) && (undefined === input.publicVisibility || "boolean" === typeof input.publicVisibility) && (undefined === input.anchors || Array.isArray(input.anchors) && input.anchors.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io3(elem))); const _io1 = input => "string" === typeof input.message && "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey); const _io2 = input => "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey) && (undefined === input.isDerived || "boolean" === typeof input.isDerived); const _io3 = input => (undefined === input.txHash || "string" === typeof input.txHash) && (undefined === input.message || "string" === typeof input.message); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
1529
1513
|
path: _path + ".name",
|
|
1530
1514
|
expected: "string",
|
|
1531
1515
|
value: input.name
|
|
@@ -1543,11 +1527,11 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1543
1527
|
value: input.originalProvider
|
|
1544
1528
|
}), undefined === input.proofOfIssuance || ("object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance || _report(_exceptionable, {
|
|
1545
1529
|
path: _path + ".proofOfIssuance",
|
|
1546
|
-
expected: "(__type
|
|
1530
|
+
expected: "(__type | undefined)",
|
|
1547
1531
|
value: input.proofOfIssuance
|
|
1548
|
-
})) &&
|
|
1532
|
+
})) && _vo1(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || _report(_exceptionable, {
|
|
1549
1533
|
path: _path + ".proofOfIssuance",
|
|
1550
|
-
expected: "(__type
|
|
1534
|
+
expected: "(__type | undefined)",
|
|
1551
1535
|
value: input.proofOfIssuance
|
|
1552
1536
|
}), "plaintext" === input.messageFormat || "json" === input.messageFormat || _report(_exceptionable, {
|
|
1553
1537
|
path: _path + ".messageFormat",
|
|
@@ -1561,8 +1545,8 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1561
1545
|
path: _path + ".messages",
|
|
1562
1546
|
expected: "Array<string>",
|
|
1563
1547
|
value: input.messages
|
|
1564
|
-
})) && input.messages.map((elem,
|
|
1565
|
-
path: _path + ".messages[" +
|
|
1548
|
+
})) && input.messages.map((elem, _index3) => "string" === typeof elem || _report(_exceptionable, {
|
|
1549
|
+
path: _path + ".messages[" + _index3 + "]",
|
|
1566
1550
|
expected: "string",
|
|
1567
1551
|
value: elem
|
|
1568
1552
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1571,25 +1555,33 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1571
1555
|
value: input.messages
|
|
1572
1556
|
}), undefined === input.dataIntegrityProof || ("object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof || _report(_exceptionable, {
|
|
1573
1557
|
path: _path + ".dataIntegrityProof",
|
|
1574
|
-
expected: "(__type.
|
|
1558
|
+
expected: "(__type.o1 | undefined)",
|
|
1575
1559
|
value: input.dataIntegrityProof
|
|
1576
|
-
})) &&
|
|
1560
|
+
})) && _vo2(input.dataIntegrityProof, _path + ".dataIntegrityProof", true && _exceptionable) || _report(_exceptionable, {
|
|
1577
1561
|
path: _path + ".dataIntegrityProof",
|
|
1578
|
-
expected: "(__type.
|
|
1562
|
+
expected: "(__type.o1 | undefined)",
|
|
1579
1563
|
value: input.dataIntegrityProof
|
|
1580
1564
|
}), undefined === input.publicVisibility || "boolean" === typeof input.publicVisibility || _report(_exceptionable, {
|
|
1581
1565
|
path: _path + ".publicVisibility",
|
|
1582
1566
|
expected: "(boolean | undefined)",
|
|
1583
1567
|
value: input.publicVisibility
|
|
1584
|
-
})
|
|
1585
|
-
path: _path + ".
|
|
1586
|
-
expected: "(
|
|
1587
|
-
value: input.
|
|
1588
|
-
})
|
|
1589
|
-
path: _path + ".
|
|
1590
|
-
expected: "
|
|
1591
|
-
value:
|
|
1592
|
-
})
|
|
1568
|
+
}), undefined === input.anchors || (Array.isArray(input.anchors) || _report(_exceptionable, {
|
|
1569
|
+
path: _path + ".anchors",
|
|
1570
|
+
expected: "(Array<__type> | undefined)",
|
|
1571
|
+
value: input.anchors
|
|
1572
|
+
})) && input.anchors.map((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
|
|
1573
|
+
path: _path + ".anchors[" + _index4 + "]",
|
|
1574
|
+
expected: "__type.o2",
|
|
1575
|
+
value: elem
|
|
1576
|
+
})) && _vo3(elem, _path + ".anchors[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1577
|
+
path: _path + ".anchors[" + _index4 + "]",
|
|
1578
|
+
expected: "__type.o2",
|
|
1579
|
+
value: elem
|
|
1580
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1581
|
+
path: _path + ".anchors",
|
|
1582
|
+
expected: "(Array<__type> | undefined)",
|
|
1583
|
+
value: input.anchors
|
|
1584
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || _report(_exceptionable, {
|
|
1593
1585
|
path: _path + ".message",
|
|
1594
1586
|
expected: "string",
|
|
1595
1587
|
value: input.message
|
|
@@ -1605,7 +1597,7 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1605
1597
|
path: _path + ".publicKey",
|
|
1606
1598
|
expected: "(string | undefined)",
|
|
1607
1599
|
value: input.publicKey
|
|
1608
|
-
})].every(flag => flag); const
|
|
1600
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.signature || _report(_exceptionable, {
|
|
1609
1601
|
path: _path + ".signature",
|
|
1610
1602
|
expected: "string",
|
|
1611
1603
|
value: input.signature
|
|
@@ -1621,6 +1613,14 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1621
1613
|
path: _path + ".isDerived",
|
|
1622
1614
|
expected: "(boolean | undefined)",
|
|
1623
1615
|
value: input.isDerived
|
|
1616
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => [undefined === input.txHash || "string" === typeof input.txHash || _report(_exceptionable, {
|
|
1617
|
+
path: _path + ".txHash",
|
|
1618
|
+
expected: "(string | undefined)",
|
|
1619
|
+
value: input.txHash
|
|
1620
|
+
}), undefined === input.message || "string" === typeof input.message || _report(_exceptionable, {
|
|
1621
|
+
path: _path + ".message",
|
|
1622
|
+
expected: "(string | undefined)",
|
|
1623
|
+
value: input.message
|
|
1624
1624
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1625
1625
|
if (false === __is(input)) {
|
|
1626
1626
|
errors = [];
|
|
@@ -1898,183 +1898,43 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
async verifyAttestation(payload) {
|
|
1900
1900
|
try {
|
|
1901
|
-
const validateRes = (() => { const _io0 = input => "
|
|
1902
|
-
path: _path + ".attestation",
|
|
1903
|
-
expected: "iAttestationDoc<NumberType>",
|
|
1904
|
-
value: input.attestation
|
|
1905
|
-
})) && _vo1(input.attestation, _path + ".attestation", true && _exceptionable) || _report(_exceptionable, {
|
|
1906
|
-
path: _path + ".attestation",
|
|
1907
|
-
expected: "iAttestationDoc<NumberType>",
|
|
1908
|
-
value: input.attestation
|
|
1909
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [(Array.isArray(input.updateHistory) || _report(_exceptionable, {
|
|
1910
|
-
path: _path + ".updateHistory",
|
|
1911
|
-
expected: "Array<iUpdateHistory<NumberType>>",
|
|
1912
|
-
value: input.updateHistory
|
|
1913
|
-
})) && input.updateHistory.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1914
|
-
path: _path + ".updateHistory[" + _index7 + "]",
|
|
1915
|
-
expected: "iUpdateHistory<NumberType>",
|
|
1916
|
-
value: elem
|
|
1917
|
-
})) && _vo2(elem, _path + ".updateHistory[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1918
|
-
path: _path + ".updateHistory[" + _index7 + "]",
|
|
1919
|
-
expected: "iUpdateHistory<NumberType>",
|
|
1920
|
-
value: elem
|
|
1921
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1922
|
-
path: _path + ".updateHistory",
|
|
1923
|
-
expected: "Array<iUpdateHistory<NumberType>>",
|
|
1924
|
-
value: input.updateHistory
|
|
1925
|
-
}), "string" === typeof input._docId || _report(_exceptionable, {
|
|
1926
|
-
path: _path + "._docId",
|
|
1927
|
-
expected: "string",
|
|
1928
|
-
value: input._docId
|
|
1929
|
-
}), undefined === input._id || "string" === typeof input._id || _report(_exceptionable, {
|
|
1930
|
-
path: _path + "._id",
|
|
1931
|
-
expected: "(string | undefined)",
|
|
1932
|
-
value: input._id
|
|
1933
|
-
}), "plaintext" === input.messageFormat || "json" === input.messageFormat || _report(_exceptionable, {
|
|
1934
|
-
path: _path + ".messageFormat",
|
|
1935
|
-
expected: "(\"json\" | \"plaintext\")",
|
|
1936
|
-
value: input.messageFormat
|
|
1937
|
-
}), "string" === typeof input.createdBy || _report(_exceptionable, {
|
|
1938
|
-
path: _path + ".createdBy",
|
|
1939
|
-
expected: "string",
|
|
1940
|
-
value: input.createdBy
|
|
1941
|
-
}), "string" === typeof input.createdAt || "number" === typeof input.createdAt || "bigint" === typeof input.createdAt || _report(_exceptionable, {
|
|
1942
|
-
path: _path + ".createdAt",
|
|
1943
|
-
expected: "(bigint | number | string)",
|
|
1944
|
-
value: input.createdAt
|
|
1945
|
-
}), (Array.isArray(input.entropies) || _report(_exceptionable, {
|
|
1946
|
-
path: _path + ".entropies",
|
|
1947
|
-
expected: "Array<string>",
|
|
1948
|
-
value: input.entropies
|
|
1949
|
-
})) && input.entropies.map((elem, _index8) => "string" === typeof elem || _report(_exceptionable, {
|
|
1950
|
-
path: _path + ".entropies[" + _index8 + "]",
|
|
1951
|
-
expected: "string",
|
|
1952
|
-
value: elem
|
|
1953
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
1954
|
-
path: _path + ".entropies",
|
|
1955
|
-
expected: "Array<string>",
|
|
1956
|
-
value: input.entropies
|
|
1957
|
-
}), undefined === input.publicVisibility || "boolean" === typeof input.publicVisibility || _report(_exceptionable, {
|
|
1958
|
-
path: _path + ".publicVisibility",
|
|
1959
|
-
expected: "(boolean | undefined)",
|
|
1960
|
-
value: input.publicVisibility
|
|
1961
|
-
}), undefined === input.proofOfIssuance || ("object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance || _report(_exceptionable, {
|
|
1962
|
-
path: _path + ".proofOfIssuance",
|
|
1963
|
-
expected: "(__type | undefined)",
|
|
1964
|
-
value: input.proofOfIssuance
|
|
1965
|
-
})) && _vo3(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || _report(_exceptionable, {
|
|
1966
|
-
path: _path + ".proofOfIssuance",
|
|
1967
|
-
expected: "(__type | undefined)",
|
|
1968
|
-
value: input.proofOfIssuance
|
|
1969
|
-
}), "string" === typeof input.attestationId || _report(_exceptionable, {
|
|
1970
|
-
path: _path + ".attestationId",
|
|
1971
|
-
expected: "string",
|
|
1972
|
-
value: input.attestationId
|
|
1973
|
-
}), "string" === typeof input.inviteCode || _report(_exceptionable, {
|
|
1974
|
-
path: _path + ".inviteCode",
|
|
1975
|
-
expected: "string",
|
|
1976
|
-
value: input.inviteCode
|
|
1977
|
-
}), "string" === typeof input.scheme || _report(_exceptionable, {
|
|
1901
|
+
const validateRes = (() => { const _io0 = input => "string" === typeof input.scheme && (Array.isArray(input.messages) && input.messages.every(elem => "string" === typeof elem)) && ("plaintext" === input.messageFormat || "json" === input.messageFormat) && (undefined === input.dataIntegrityProof || "object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof && _io1(input.dataIntegrityProof)) && (undefined === input.proofOfIssuance || "object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance && _io2(input.proofOfIssuance)); const _io1 = input => "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey) && (undefined === input.isDerived || "boolean" === typeof input.isDerived); const _io2 = input => "string" === typeof input.message && "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scheme || _report(_exceptionable, {
|
|
1978
1902
|
path: _path + ".scheme",
|
|
1979
1903
|
expected: "string",
|
|
1980
1904
|
value: input.scheme
|
|
1981
|
-
}), undefined === input.originalProvider || "string" === typeof input.originalProvider || _report(_exceptionable, {
|
|
1982
|
-
path: _path + ".originalProvider",
|
|
1983
|
-
expected: "(string | undefined)",
|
|
1984
|
-
value: input.originalProvider
|
|
1985
1905
|
}), (Array.isArray(input.messages) || _report(_exceptionable, {
|
|
1986
1906
|
path: _path + ".messages",
|
|
1987
1907
|
expected: "Array<string>",
|
|
1988
1908
|
value: input.messages
|
|
1989
|
-
})) && input.messages.map((elem,
|
|
1990
|
-
path: _path + ".messages[" +
|
|
1909
|
+
})) && input.messages.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
|
|
1910
|
+
path: _path + ".messages[" + _index2 + "]",
|
|
1991
1911
|
expected: "string",
|
|
1992
1912
|
value: elem
|
|
1993
1913
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
1994
1914
|
path: _path + ".messages",
|
|
1995
1915
|
expected: "Array<string>",
|
|
1996
1916
|
value: input.messages
|
|
1917
|
+
}), "plaintext" === input.messageFormat || "json" === input.messageFormat || _report(_exceptionable, {
|
|
1918
|
+
path: _path + ".messageFormat",
|
|
1919
|
+
expected: "(\"json\" | \"plaintext\")",
|
|
1920
|
+
value: input.messageFormat
|
|
1997
1921
|
}), undefined === input.dataIntegrityProof || ("object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof || _report(_exceptionable, {
|
|
1998
1922
|
path: _path + ".dataIntegrityProof",
|
|
1999
|
-
expected: "(__type
|
|
1923
|
+
expected: "(__type | undefined)",
|
|
2000
1924
|
value: input.dataIntegrityProof
|
|
2001
|
-
})) &&
|
|
1925
|
+
})) && _vo1(input.dataIntegrityProof, _path + ".dataIntegrityProof", true && _exceptionable) || _report(_exceptionable, {
|
|
2002
1926
|
path: _path + ".dataIntegrityProof",
|
|
2003
|
-
expected: "(__type
|
|
1927
|
+
expected: "(__type | undefined)",
|
|
2004
1928
|
value: input.dataIntegrityProof
|
|
2005
|
-
}), "
|
|
2006
|
-
path: _path + ".
|
|
2007
|
-
expected: "
|
|
2008
|
-
value: input.
|
|
2009
|
-
}), "
|
|
2010
|
-
path: _path + ".
|
|
2011
|
-
expected: "
|
|
2012
|
-
value: input.
|
|
2013
|
-
}), "string" === typeof input.
|
|
2014
|
-
path: _path + ".description",
|
|
2015
|
-
expected: "string",
|
|
2016
|
-
value: input.description
|
|
2017
|
-
}), (Array.isArray(input.holders) || _report(_exceptionable, {
|
|
2018
|
-
path: _path + ".holders",
|
|
2019
|
-
expected: "Array<string>",
|
|
2020
|
-
value: input.holders
|
|
2021
|
-
})) && input.holders.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
|
|
2022
|
-
path: _path + ".holders[" + _index10 + "]",
|
|
2023
|
-
expected: "string",
|
|
2024
|
-
value: elem
|
|
2025
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
2026
|
-
path: _path + ".holders",
|
|
2027
|
-
expected: "Array<string>",
|
|
2028
|
-
value: input.holders
|
|
2029
|
-
}), undefined === input.allHolders || (Array.isArray(input.allHolders) || _report(_exceptionable, {
|
|
2030
|
-
path: _path + ".allHolders",
|
|
2031
|
-
expected: "(Array<string> | undefined)",
|
|
2032
|
-
value: input.allHolders
|
|
2033
|
-
})) && input.allHolders.map((elem, _index11) => "string" === typeof elem || _report(_exceptionable, {
|
|
2034
|
-
path: _path + ".allHolders[" + _index11 + "]",
|
|
2035
|
-
expected: "string",
|
|
2036
|
-
value: elem
|
|
2037
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
2038
|
-
path: _path + ".allHolders",
|
|
2039
|
-
expected: "(Array<string> | undefined)",
|
|
2040
|
-
value: input.allHolders
|
|
2041
|
-
}), (Array.isArray(input.anchors) || _report(_exceptionable, {
|
|
2042
|
-
path: _path + ".anchors",
|
|
2043
|
-
expected: "Array<__type>",
|
|
2044
|
-
value: input.anchors
|
|
2045
|
-
})) && input.anchors.map((elem, _index12) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
|
|
2046
|
-
path: _path + ".anchors[" + _index12 + "]",
|
|
2047
|
-
expected: "__type.o2",
|
|
2048
|
-
value: elem
|
|
2049
|
-
})) && _vo5(elem, _path + ".anchors[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2050
|
-
path: _path + ".anchors[" + _index12 + "]",
|
|
2051
|
-
expected: "__type.o2",
|
|
2052
|
-
value: elem
|
|
2053
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
2054
|
-
path: _path + ".anchors",
|
|
2055
|
-
expected: "Array<__type>",
|
|
2056
|
-
value: input.anchors
|
|
2057
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.txHash || _report(_exceptionable, {
|
|
2058
|
-
path: _path + ".txHash",
|
|
2059
|
-
expected: "string",
|
|
2060
|
-
value: input.txHash
|
|
2061
|
-
}), "string" === typeof input.block || "number" === typeof input.block || "bigint" === typeof input.block || _report(_exceptionable, {
|
|
2062
|
-
path: _path + ".block",
|
|
2063
|
-
expected: "(bigint | number | string)",
|
|
2064
|
-
value: input.block
|
|
2065
|
-
}), "string" === typeof input.blockTimestamp || "number" === typeof input.blockTimestamp || "bigint" === typeof input.blockTimestamp || _report(_exceptionable, {
|
|
2066
|
-
path: _path + ".blockTimestamp",
|
|
2067
|
-
expected: "(bigint | number | string)",
|
|
2068
|
-
value: input.blockTimestamp
|
|
2069
|
-
}), "string" === typeof input.timestamp || "number" === typeof input.timestamp || "bigint" === typeof input.timestamp || _report(_exceptionable, {
|
|
2070
|
-
path: _path + ".timestamp",
|
|
2071
|
-
expected: "(bigint | number | string)",
|
|
2072
|
-
value: input.timestamp
|
|
2073
|
-
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || _report(_exceptionable, {
|
|
2074
|
-
path: _path + ".message",
|
|
2075
|
-
expected: "string",
|
|
2076
|
-
value: input.message
|
|
2077
|
-
}), "string" === typeof input.signature || _report(_exceptionable, {
|
|
1929
|
+
}), undefined === input.proofOfIssuance || ("object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance || _report(_exceptionable, {
|
|
1930
|
+
path: _path + ".proofOfIssuance",
|
|
1931
|
+
expected: "(__type.o1 | undefined)",
|
|
1932
|
+
value: input.proofOfIssuance
|
|
1933
|
+
})) && _vo2(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || _report(_exceptionable, {
|
|
1934
|
+
path: _path + ".proofOfIssuance",
|
|
1935
|
+
expected: "(__type.o1 | undefined)",
|
|
1936
|
+
value: input.proofOfIssuance
|
|
1937
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.signature || _report(_exceptionable, {
|
|
2078
1938
|
path: _path + ".signature",
|
|
2079
1939
|
expected: "string",
|
|
2080
1940
|
value: input.signature
|
|
@@ -2086,7 +1946,15 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
2086
1946
|
path: _path + ".publicKey",
|
|
2087
1947
|
expected: "(string | undefined)",
|
|
2088
1948
|
value: input.publicKey
|
|
2089
|
-
})
|
|
1949
|
+
}), undefined === input.isDerived || "boolean" === typeof input.isDerived || _report(_exceptionable, {
|
|
1950
|
+
path: _path + ".isDerived",
|
|
1951
|
+
expected: "(boolean | undefined)",
|
|
1952
|
+
value: input.isDerived
|
|
1953
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || _report(_exceptionable, {
|
|
1954
|
+
path: _path + ".message",
|
|
1955
|
+
expected: "string",
|
|
1956
|
+
value: input.message
|
|
1957
|
+
}), "string" === typeof input.signature || _report(_exceptionable, {
|
|
2090
1958
|
path: _path + ".signature",
|
|
2091
1959
|
expected: "string",
|
|
2092
1960
|
value: input.signature
|
|
@@ -2098,18 +1966,6 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
2098
1966
|
path: _path + ".publicKey",
|
|
2099
1967
|
expected: "(string | undefined)",
|
|
2100
1968
|
value: input.publicKey
|
|
2101
|
-
}), undefined === input.isDerived || "boolean" === typeof input.isDerived || _report(_exceptionable, {
|
|
2102
|
-
path: _path + ".isDerived",
|
|
2103
|
-
expected: "(boolean | undefined)",
|
|
2104
|
-
value: input.isDerived
|
|
2105
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.txHash || "string" === typeof input.txHash || _report(_exceptionable, {
|
|
2106
|
-
path: _path + ".txHash",
|
|
2107
|
-
expected: "(string | undefined)",
|
|
2108
|
-
value: input.txHash
|
|
2109
|
-
}), undefined === input.message || "string" === typeof input.message || _report(_exceptionable, {
|
|
2110
|
-
path: _path + ".message",
|
|
2111
|
-
expected: "(string | undefined)",
|
|
2112
|
-
value: input.message
|
|
2113
1969
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
2114
1970
|
if (false === __is(input)) {
|
|
2115
1971
|
errors = [];
|
|
@@ -3848,10 +3704,18 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
3848
3704
|
}
|
|
3849
3705
|
async getDynamicDataStores(payload) {
|
|
3850
3706
|
try {
|
|
3851
|
-
const validateRes = (() => { const _io0 = input => "string" === typeof
|
|
3852
|
-
path: _path + ".
|
|
3707
|
+
const validateRes = (() => { const _io0 = input => Array.isArray(input.dynamicDataIds) && input.dynamicDataIds.every(elem => "string" === typeof elem) && (undefined === input.dataSecret || "string" === typeof input.dataSecret); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.dynamicDataIds) || _report(_exceptionable, {
|
|
3708
|
+
path: _path + ".dynamicDataIds",
|
|
3709
|
+
expected: "Array<string>",
|
|
3710
|
+
value: input.dynamicDataIds
|
|
3711
|
+
})) && input.dynamicDataIds.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
|
|
3712
|
+
path: _path + ".dynamicDataIds[" + _index2 + "]",
|
|
3853
3713
|
expected: "string",
|
|
3854
|
-
value:
|
|
3714
|
+
value: elem
|
|
3715
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
3716
|
+
path: _path + ".dynamicDataIds",
|
|
3717
|
+
expected: "Array<string>",
|
|
3718
|
+
value: input.dynamicDataIds
|
|
3855
3719
|
}), undefined === input.dataSecret || "string" === typeof input.dataSecret || _report(_exceptionable, {
|
|
3856
3720
|
path: _path + ".dataSecret",
|
|
3857
3721
|
expected: "(string | undefined)",
|