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.
@@ -1470,23 +1470,7 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
1470
1470
  }
1471
1471
  async createAttestation(payload) {
1472
1472
  try {
1473
- const validateRes = (() => { const _io0 = input => (undefined === input.anchors || Array.isArray(input.anchors) && input.anchors.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io1(elem))) && "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 && _io2(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 && _io3(input.dataIntegrityProof)) && (undefined === input.publicVisibility || "boolean" === typeof input.publicVisibility); const _io1 = input => (undefined === input.txHash || "string" === typeof input.txHash) && (undefined === input.message || "string" === typeof input.message); const _io2 = input => "string" === typeof input.message && "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey); const _io3 = input => "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey) && (undefined === input.isDerived || "boolean" === typeof input.isDerived); const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.anchors || (Array.isArray(input.anchors) || _report(_exceptionable, {
1474
- path: _path + ".anchors",
1475
- expected: "(Array<__type> | undefined)",
1476
- value: input.anchors
1477
- })) && input.anchors.map((elem, _index3) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
1478
- path: _path + ".anchors[" + _index3 + "]",
1479
- expected: "__type",
1480
- value: elem
1481
- })) && _vo1(elem, _path + ".anchors[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
1482
- path: _path + ".anchors[" + _index3 + "]",
1483
- expected: "__type",
1484
- value: elem
1485
- })).every(flag => flag) || _report(_exceptionable, {
1486
- path: _path + ".anchors",
1487
- expected: "(Array<__type> | undefined)",
1488
- value: input.anchors
1489
- }), "string" === typeof input.name || _report(_exceptionable, {
1473
+ 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, {
1490
1474
  path: _path + ".name",
1491
1475
  expected: "string",
1492
1476
  value: input.name
@@ -1504,11 +1488,11 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
1504
1488
  value: input.originalProvider
1505
1489
  }), undefined === input.proofOfIssuance || ("object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance || _report(_exceptionable, {
1506
1490
  path: _path + ".proofOfIssuance",
1507
- expected: "(__type.o1 | undefined)",
1491
+ expected: "(__type | undefined)",
1508
1492
  value: input.proofOfIssuance
1509
- })) && _vo2(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || _report(_exceptionable, {
1493
+ })) && _vo1(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || _report(_exceptionable, {
1510
1494
  path: _path + ".proofOfIssuance",
1511
- expected: "(__type.o1 | undefined)",
1495
+ expected: "(__type | undefined)",
1512
1496
  value: input.proofOfIssuance
1513
1497
  }), "plaintext" === input.messageFormat || "json" === input.messageFormat || _report(_exceptionable, {
1514
1498
  path: _path + ".messageFormat",
@@ -1522,8 +1506,8 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
1522
1506
  path: _path + ".messages",
1523
1507
  expected: "Array<string>",
1524
1508
  value: input.messages
1525
- })) && input.messages.map((elem, _index4) => "string" === typeof elem || _report(_exceptionable, {
1526
- path: _path + ".messages[" + _index4 + "]",
1509
+ })) && input.messages.map((elem, _index3) => "string" === typeof elem || _report(_exceptionable, {
1510
+ path: _path + ".messages[" + _index3 + "]",
1527
1511
  expected: "string",
1528
1512
  value: elem
1529
1513
  })).every(flag => flag) || _report(_exceptionable, {
@@ -1532,25 +1516,33 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
1532
1516
  value: input.messages
1533
1517
  }), undefined === input.dataIntegrityProof || ("object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof || _report(_exceptionable, {
1534
1518
  path: _path + ".dataIntegrityProof",
1535
- expected: "(__type.o2 | undefined)",
1519
+ expected: "(__type.o1 | undefined)",
1536
1520
  value: input.dataIntegrityProof
1537
- })) && _vo3(input.dataIntegrityProof, _path + ".dataIntegrityProof", true && _exceptionable) || _report(_exceptionable, {
1521
+ })) && _vo2(input.dataIntegrityProof, _path + ".dataIntegrityProof", true && _exceptionable) || _report(_exceptionable, {
1538
1522
  path: _path + ".dataIntegrityProof",
1539
- expected: "(__type.o2 | undefined)",
1523
+ expected: "(__type.o1 | undefined)",
1540
1524
  value: input.dataIntegrityProof
1541
1525
  }), undefined === input.publicVisibility || "boolean" === typeof input.publicVisibility || _report(_exceptionable, {
1542
1526
  path: _path + ".publicVisibility",
1543
1527
  expected: "(boolean | undefined)",
1544
1528
  value: input.publicVisibility
1545
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.txHash || "string" === typeof input.txHash || _report(_exceptionable, {
1546
- path: _path + ".txHash",
1547
- expected: "(string | undefined)",
1548
- value: input.txHash
1549
- }), undefined === input.message || "string" === typeof input.message || _report(_exceptionable, {
1550
- path: _path + ".message",
1551
- expected: "(string | undefined)",
1552
- value: input.message
1553
- })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || _report(_exceptionable, {
1529
+ }), undefined === input.anchors || (Array.isArray(input.anchors) || _report(_exceptionable, {
1530
+ path: _path + ".anchors",
1531
+ expected: "(Array<__type> | undefined)",
1532
+ value: input.anchors
1533
+ })) && input.anchors.map((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
1534
+ path: _path + ".anchors[" + _index4 + "]",
1535
+ expected: "__type.o2",
1536
+ value: elem
1537
+ })) && _vo3(elem, _path + ".anchors[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
1538
+ path: _path + ".anchors[" + _index4 + "]",
1539
+ expected: "__type.o2",
1540
+ value: elem
1541
+ })).every(flag => flag) || _report(_exceptionable, {
1542
+ path: _path + ".anchors",
1543
+ expected: "(Array<__type> | undefined)",
1544
+ value: input.anchors
1545
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || _report(_exceptionable, {
1554
1546
  path: _path + ".message",
1555
1547
  expected: "string",
1556
1548
  value: input.message
@@ -1566,7 +1558,7 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
1566
1558
  path: _path + ".publicKey",
1567
1559
  expected: "(string | undefined)",
1568
1560
  value: input.publicKey
1569
- })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.signature || _report(_exceptionable, {
1561
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.signature || _report(_exceptionable, {
1570
1562
  path: _path + ".signature",
1571
1563
  expected: "string",
1572
1564
  value: input.signature
@@ -1582,6 +1574,14 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
1582
1574
  path: _path + ".isDerived",
1583
1575
  expected: "(boolean | undefined)",
1584
1576
  value: input.isDerived
1577
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => [undefined === input.txHash || "string" === typeof input.txHash || _report(_exceptionable, {
1578
+ path: _path + ".txHash",
1579
+ expected: "(string | undefined)",
1580
+ value: input.txHash
1581
+ }), undefined === input.message || "string" === typeof input.message || _report(_exceptionable, {
1582
+ path: _path + ".message",
1583
+ expected: "(string | undefined)",
1584
+ value: input.message
1585
1585
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1586
1586
  if (false === __is(input)) {
1587
1587
  errors = [];
@@ -1859,183 +1859,43 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
1859
1859
  }
1860
1860
  async verifyAttestation(payload) {
1861
1861
  try {
1862
- const validateRes = (() => { const _io0 = input => "object" === typeof input.attestation && null !== input.attestation && _io1(input.attestation); const _io1 = input => Array.isArray(input.updateHistory) && input.updateHistory.every(elem => "object" === typeof elem && null !== elem && _io2(elem)) && "string" === typeof input._docId && (undefined === input._id || "string" === typeof input._id) && ("plaintext" === input.messageFormat || "json" === input.messageFormat) && "string" === typeof input.createdBy && ("string" === typeof input.createdAt || "number" === typeof input.createdAt || "bigint" === typeof input.createdAt) && (Array.isArray(input.entropies) && input.entropies.every(elem => "string" === typeof elem)) && (undefined === input.publicVisibility || "boolean" === typeof input.publicVisibility) && (undefined === input.proofOfIssuance || "object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance && _io3(input.proofOfIssuance)) && "string" === typeof input.attestationId && "string" === typeof input.inviteCode && "string" === typeof input.scheme && (undefined === input.originalProvider || "string" === typeof input.originalProvider) && (Array.isArray(input.messages) && input.messages.every(elem => "string" === typeof elem)) && (undefined === input.dataIntegrityProof || "object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof && _io4(input.dataIntegrityProof)) && "string" === typeof input.name && "string" === typeof input.image && "string" === typeof input.description && (Array.isArray(input.holders) && input.holders.every(elem => "string" === typeof elem)) && (undefined === input.allHolders || Array.isArray(input.allHolders) && input.allHolders.every(elem => "string" === typeof elem)) && (Array.isArray(input.anchors) && input.anchors.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io5(elem))); const _io2 = input => "string" === typeof input.txHash && ("string" === typeof input.block || "number" === typeof input.block || "bigint" === typeof input.block) && ("string" === typeof input.blockTimestamp || "number" === typeof input.blockTimestamp || "bigint" === typeof input.blockTimestamp) && ("string" === typeof input.timestamp || "number" === typeof input.timestamp || "bigint" === typeof input.timestamp); const _io3 = input => "string" === typeof input.message && "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey); const _io4 = input => "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey) && (undefined === input.isDerived || "boolean" === typeof input.isDerived); const _io5 = input => (undefined === input.txHash || "string" === typeof input.txHash) && (undefined === input.message || "string" === typeof input.message); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.attestation && null !== input.attestation || _report(_exceptionable, {
1863
- path: _path + ".attestation",
1864
- expected: "iAttestationDoc<NumberType>",
1865
- value: input.attestation
1866
- })) && _vo1(input.attestation, _path + ".attestation", true && _exceptionable) || _report(_exceptionable, {
1867
- path: _path + ".attestation",
1868
- expected: "iAttestationDoc<NumberType>",
1869
- value: input.attestation
1870
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [(Array.isArray(input.updateHistory) || _report(_exceptionable, {
1871
- path: _path + ".updateHistory",
1872
- expected: "Array<iUpdateHistory<NumberType>>",
1873
- value: input.updateHistory
1874
- })) && input.updateHistory.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1875
- path: _path + ".updateHistory[" + _index7 + "]",
1876
- expected: "iUpdateHistory<NumberType>",
1877
- value: elem
1878
- })) && _vo2(elem, _path + ".updateHistory[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
1879
- path: _path + ".updateHistory[" + _index7 + "]",
1880
- expected: "iUpdateHistory<NumberType>",
1881
- value: elem
1882
- })).every(flag => flag) || _report(_exceptionable, {
1883
- path: _path + ".updateHistory",
1884
- expected: "Array<iUpdateHistory<NumberType>>",
1885
- value: input.updateHistory
1886
- }), "string" === typeof input._docId || _report(_exceptionable, {
1887
- path: _path + "._docId",
1888
- expected: "string",
1889
- value: input._docId
1890
- }), undefined === input._id || "string" === typeof input._id || _report(_exceptionable, {
1891
- path: _path + "._id",
1892
- expected: "(string | undefined)",
1893
- value: input._id
1894
- }), "plaintext" === input.messageFormat || "json" === input.messageFormat || _report(_exceptionable, {
1895
- path: _path + ".messageFormat",
1896
- expected: "(\"json\" | \"plaintext\")",
1897
- value: input.messageFormat
1898
- }), "string" === typeof input.createdBy || _report(_exceptionable, {
1899
- path: _path + ".createdBy",
1900
- expected: "string",
1901
- value: input.createdBy
1902
- }), "string" === typeof input.createdAt || "number" === typeof input.createdAt || "bigint" === typeof input.createdAt || _report(_exceptionable, {
1903
- path: _path + ".createdAt",
1904
- expected: "(bigint | number | string)",
1905
- value: input.createdAt
1906
- }), (Array.isArray(input.entropies) || _report(_exceptionable, {
1907
- path: _path + ".entropies",
1908
- expected: "Array<string>",
1909
- value: input.entropies
1910
- })) && input.entropies.map((elem, _index8) => "string" === typeof elem || _report(_exceptionable, {
1911
- path: _path + ".entropies[" + _index8 + "]",
1912
- expected: "string",
1913
- value: elem
1914
- })).every(flag => flag) || _report(_exceptionable, {
1915
- path: _path + ".entropies",
1916
- expected: "Array<string>",
1917
- value: input.entropies
1918
- }), undefined === input.publicVisibility || "boolean" === typeof input.publicVisibility || _report(_exceptionable, {
1919
- path: _path + ".publicVisibility",
1920
- expected: "(boolean | undefined)",
1921
- value: input.publicVisibility
1922
- }), undefined === input.proofOfIssuance || ("object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance || _report(_exceptionable, {
1923
- path: _path + ".proofOfIssuance",
1924
- expected: "(__type | undefined)",
1925
- value: input.proofOfIssuance
1926
- })) && _vo3(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || _report(_exceptionable, {
1927
- path: _path + ".proofOfIssuance",
1928
- expected: "(__type | undefined)",
1929
- value: input.proofOfIssuance
1930
- }), "string" === typeof input.attestationId || _report(_exceptionable, {
1931
- path: _path + ".attestationId",
1932
- expected: "string",
1933
- value: input.attestationId
1934
- }), "string" === typeof input.inviteCode || _report(_exceptionable, {
1935
- path: _path + ".inviteCode",
1936
- expected: "string",
1937
- value: input.inviteCode
1938
- }), "string" === typeof input.scheme || _report(_exceptionable, {
1862
+ 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, {
1939
1863
  path: _path + ".scheme",
1940
1864
  expected: "string",
1941
1865
  value: input.scheme
1942
- }), undefined === input.originalProvider || "string" === typeof input.originalProvider || _report(_exceptionable, {
1943
- path: _path + ".originalProvider",
1944
- expected: "(string | undefined)",
1945
- value: input.originalProvider
1946
1866
  }), (Array.isArray(input.messages) || _report(_exceptionable, {
1947
1867
  path: _path + ".messages",
1948
1868
  expected: "Array<string>",
1949
1869
  value: input.messages
1950
- })) && input.messages.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
1951
- path: _path + ".messages[" + _index9 + "]",
1870
+ })) && input.messages.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
1871
+ path: _path + ".messages[" + _index2 + "]",
1952
1872
  expected: "string",
1953
1873
  value: elem
1954
1874
  })).every(flag => flag) || _report(_exceptionable, {
1955
1875
  path: _path + ".messages",
1956
1876
  expected: "Array<string>",
1957
1877
  value: input.messages
1878
+ }), "plaintext" === input.messageFormat || "json" === input.messageFormat || _report(_exceptionable, {
1879
+ path: _path + ".messageFormat",
1880
+ expected: "(\"json\" | \"plaintext\")",
1881
+ value: input.messageFormat
1958
1882
  }), undefined === input.dataIntegrityProof || ("object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof || _report(_exceptionable, {
1959
1883
  path: _path + ".dataIntegrityProof",
1960
- expected: "(__type.o1 | undefined)",
1884
+ expected: "(__type | undefined)",
1961
1885
  value: input.dataIntegrityProof
1962
- })) && _vo4(input.dataIntegrityProof, _path + ".dataIntegrityProof", true && _exceptionable) || _report(_exceptionable, {
1886
+ })) && _vo1(input.dataIntegrityProof, _path + ".dataIntegrityProof", true && _exceptionable) || _report(_exceptionable, {
1963
1887
  path: _path + ".dataIntegrityProof",
1964
- expected: "(__type.o1 | undefined)",
1888
+ expected: "(__type | undefined)",
1965
1889
  value: input.dataIntegrityProof
1966
- }), "string" === typeof input.name || _report(_exceptionable, {
1967
- path: _path + ".name",
1968
- expected: "string",
1969
- value: input.name
1970
- }), "string" === typeof input.image || _report(_exceptionable, {
1971
- path: _path + ".image",
1972
- expected: "string",
1973
- value: input.image
1974
- }), "string" === typeof input.description || _report(_exceptionable, {
1975
- path: _path + ".description",
1976
- expected: "string",
1977
- value: input.description
1978
- }), (Array.isArray(input.holders) || _report(_exceptionable, {
1979
- path: _path + ".holders",
1980
- expected: "Array<string>",
1981
- value: input.holders
1982
- })) && input.holders.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
1983
- path: _path + ".holders[" + _index10 + "]",
1984
- expected: "string",
1985
- value: elem
1986
- })).every(flag => flag) || _report(_exceptionable, {
1987
- path: _path + ".holders",
1988
- expected: "Array<string>",
1989
- value: input.holders
1990
- }), undefined === input.allHolders || (Array.isArray(input.allHolders) || _report(_exceptionable, {
1991
- path: _path + ".allHolders",
1992
- expected: "(Array<string> | undefined)",
1993
- value: input.allHolders
1994
- })) && input.allHolders.map((elem, _index11) => "string" === typeof elem || _report(_exceptionable, {
1995
- path: _path + ".allHolders[" + _index11 + "]",
1996
- expected: "string",
1997
- value: elem
1998
- })).every(flag => flag) || _report(_exceptionable, {
1999
- path: _path + ".allHolders",
2000
- expected: "(Array<string> | undefined)",
2001
- value: input.allHolders
2002
- }), (Array.isArray(input.anchors) || _report(_exceptionable, {
2003
- path: _path + ".anchors",
2004
- expected: "Array<__type>",
2005
- value: input.anchors
2006
- })) && input.anchors.map((elem, _index12) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
2007
- path: _path + ".anchors[" + _index12 + "]",
2008
- expected: "__type.o2",
2009
- value: elem
2010
- })) && _vo5(elem, _path + ".anchors[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
2011
- path: _path + ".anchors[" + _index12 + "]",
2012
- expected: "__type.o2",
2013
- value: elem
2014
- })).every(flag => flag) || _report(_exceptionable, {
2015
- path: _path + ".anchors",
2016
- expected: "Array<__type>",
2017
- value: input.anchors
2018
- })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.txHash || _report(_exceptionable, {
2019
- path: _path + ".txHash",
2020
- expected: "string",
2021
- value: input.txHash
2022
- }), "string" === typeof input.block || "number" === typeof input.block || "bigint" === typeof input.block || _report(_exceptionable, {
2023
- path: _path + ".block",
2024
- expected: "(bigint | number | string)",
2025
- value: input.block
2026
- }), "string" === typeof input.blockTimestamp || "number" === typeof input.blockTimestamp || "bigint" === typeof input.blockTimestamp || _report(_exceptionable, {
2027
- path: _path + ".blockTimestamp",
2028
- expected: "(bigint | number | string)",
2029
- value: input.blockTimestamp
2030
- }), "string" === typeof input.timestamp || "number" === typeof input.timestamp || "bigint" === typeof input.timestamp || _report(_exceptionable, {
2031
- path: _path + ".timestamp",
2032
- expected: "(bigint | number | string)",
2033
- value: input.timestamp
2034
- })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || _report(_exceptionable, {
2035
- path: _path + ".message",
2036
- expected: "string",
2037
- value: input.message
2038
- }), "string" === typeof input.signature || _report(_exceptionable, {
1890
+ }), undefined === input.proofOfIssuance || ("object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance || _report(_exceptionable, {
1891
+ path: _path + ".proofOfIssuance",
1892
+ expected: "(__type.o1 | undefined)",
1893
+ value: input.proofOfIssuance
1894
+ })) && _vo2(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || _report(_exceptionable, {
1895
+ path: _path + ".proofOfIssuance",
1896
+ expected: "(__type.o1 | undefined)",
1897
+ value: input.proofOfIssuance
1898
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.signature || _report(_exceptionable, {
2039
1899
  path: _path + ".signature",
2040
1900
  expected: "string",
2041
1901
  value: input.signature
@@ -2047,7 +1907,15 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
2047
1907
  path: _path + ".publicKey",
2048
1908
  expected: "(string | undefined)",
2049
1909
  value: input.publicKey
2050
- })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.signature || _report(_exceptionable, {
1910
+ }), undefined === input.isDerived || "boolean" === typeof input.isDerived || _report(_exceptionable, {
1911
+ path: _path + ".isDerived",
1912
+ expected: "(boolean | undefined)",
1913
+ value: input.isDerived
1914
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || _report(_exceptionable, {
1915
+ path: _path + ".message",
1916
+ expected: "string",
1917
+ value: input.message
1918
+ }), "string" === typeof input.signature || _report(_exceptionable, {
2051
1919
  path: _path + ".signature",
2052
1920
  expected: "string",
2053
1921
  value: input.signature
@@ -2059,18 +1927,6 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
2059
1927
  path: _path + ".publicKey",
2060
1928
  expected: "(string | undefined)",
2061
1929
  value: input.publicKey
2062
- }), undefined === input.isDerived || "boolean" === typeof input.isDerived || _report(_exceptionable, {
2063
- path: _path + ".isDerived",
2064
- expected: "(boolean | undefined)",
2065
- value: input.isDerived
2066
- })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.txHash || "string" === typeof input.txHash || _report(_exceptionable, {
2067
- path: _path + ".txHash",
2068
- expected: "(string | undefined)",
2069
- value: input.txHash
2070
- }), undefined === input.message || "string" === typeof input.message || _report(_exceptionable, {
2071
- path: _path + ".message",
2072
- expected: "(string | undefined)",
2073
- value: input.message
2074
1930
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
2075
1931
  if (false === __is(input)) {
2076
1932
  errors = [];
@@ -3809,10 +3665,18 @@ export class BitBadgesAPI extends BaseBitBadgesApi {
3809
3665
  }
3810
3666
  async getDynamicDataStores(payload) {
3811
3667
  try {
3812
- const validateRes = (() => { const _io0 = input => "string" === typeof input.dynamicDataId && (undefined === input.dataSecret || "string" === typeof input.dataSecret); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.dynamicDataId || _report(_exceptionable, {
3813
- path: _path + ".dynamicDataId",
3668
+ 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, {
3669
+ path: _path + ".dynamicDataIds",
3670
+ expected: "Array<string>",
3671
+ value: input.dynamicDataIds
3672
+ })) && input.dynamicDataIds.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
3673
+ path: _path + ".dynamicDataIds[" + _index2 + "]",
3814
3674
  expected: "string",
3815
- value: input.dynamicDataId
3675
+ value: elem
3676
+ })).every(flag => flag) || _report(_exceptionable, {
3677
+ path: _path + ".dynamicDataIds",
3678
+ expected: "Array<string>",
3679
+ value: input.dynamicDataIds
3816
3680
  }), undefined === input.dataSecret || "string" === typeof input.dataSecret || _report(_exceptionable, {
3817
3681
  path: _path + ".dataSecret",
3818
3682
  expected: "(string | undefined)",