@cardanowall/sdk-ts 0.0.0 → 0.1.0
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 +15 -11
- package/dist/conformance/cli.cjs +18 -18
- package/dist/conformance/cli.cjs.map +1 -1
- package/dist/conformance/cli.js +18 -18
- package/dist/conformance/cli.js.map +1 -1
- package/dist/index.cjs +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/verifier/index.cjs +18 -18
- package/dist/verifier/index.cjs.map +1 -1
- package/dist/verifier/index.js +18 -18
- package/dist/verifier/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -1372,11 +1372,7 @@ function validateOneUri(chunks, path, errors) {
|
|
|
1372
1372
|
const uri = reconstructed.uri;
|
|
1373
1373
|
if (uri.includes("#")) {
|
|
1374
1374
|
errors.push(
|
|
1375
|
-
issue(
|
|
1376
|
-
"INVALID_URI",
|
|
1377
|
-
path,
|
|
1378
|
-
"URI contains a fragment identifier ('#'), which is forbidden"
|
|
1379
|
-
)
|
|
1375
|
+
issue("INVALID_URI", path, "URI contains a fragment identifier ('#'), which is forbidden")
|
|
1380
1376
|
);
|
|
1381
1377
|
return;
|
|
1382
1378
|
}
|
|
@@ -1406,21 +1402,13 @@ function validateOneUri(chunks, path, errors) {
|
|
|
1406
1402
|
const cid = slashIdx === -1 ? rest : rest.slice(0, slashIdx);
|
|
1407
1403
|
if (!validateCidProfile(cid)) {
|
|
1408
1404
|
errors.push(
|
|
1409
|
-
issue(
|
|
1410
|
-
"INVALID_URI",
|
|
1411
|
-
path,
|
|
1412
|
-
"ipfs:// URI is not a valid CID under the CIP-309 profile"
|
|
1413
|
-
)
|
|
1405
|
+
issue("INVALID_URI", path, "ipfs:// URI is not a valid CID under the CIP-309 profile")
|
|
1414
1406
|
);
|
|
1415
1407
|
}
|
|
1416
1408
|
return;
|
|
1417
1409
|
}
|
|
1418
1410
|
errors.push(
|
|
1419
|
-
issue(
|
|
1420
|
-
"INVALID_URI",
|
|
1421
|
-
path,
|
|
1422
|
-
"unsupported URI scheme; v1 PoE URI set is {ar://, ipfs://}"
|
|
1423
|
-
)
|
|
1411
|
+
issue("INVALID_URI", path, "unsupported URI scheme; v1 PoE URI set is {ar://, ipfs://}")
|
|
1424
1412
|
);
|
|
1425
1413
|
}
|
|
1426
1414
|
function checkItemEnc(item, idx, errors) {
|
|
@@ -3814,7 +3802,9 @@ async function tryDecryptions(args) {
|
|
|
3814
3802
|
let plaintext = null;
|
|
3815
3803
|
let failure = null;
|
|
3816
3804
|
if (reqHasSecret) {
|
|
3817
|
-
const envelope = sealedEnvelopeFromParsed(
|
|
3805
|
+
const envelope = sealedEnvelopeFromParsed(
|
|
3806
|
+
enc
|
|
3807
|
+
);
|
|
3818
3808
|
if (envelope === null) {
|
|
3819
3809
|
out.push({
|
|
3820
3810
|
item_index: idx,
|
|
@@ -4995,7 +4985,8 @@ function decodeTxSummary(txBodyBytes, witnessSetBytes, network) {
|
|
|
4995
4985
|
else if (typeof invalidBefore === "bigint") summary.invalid_before = Number(invalidBefore);
|
|
4996
4986
|
const invalidHereafter = body.get(BODY_KEY_INVALID_HEREAFTER);
|
|
4997
4987
|
if (typeof invalidHereafter === "number") summary.invalid_hereafter = invalidHereafter;
|
|
4998
|
-
else if (typeof invalidHereafter === "bigint")
|
|
4988
|
+
else if (typeof invalidHereafter === "bigint")
|
|
4989
|
+
summary.invalid_hereafter = Number(invalidHereafter);
|
|
4999
4990
|
if (requiredSigners.length > 0) summary.required_signer_key_hashes = requiredSigners;
|
|
5000
4991
|
const networkId = body.get(BODY_KEY_NETWORK_ID);
|
|
5001
4992
|
if (typeof networkId === "number") summary.network_id = networkId;
|
|
@@ -5207,7 +5198,16 @@ async function verifyResolved(input) {
|
|
|
5207
5198
|
return report;
|
|
5208
5199
|
}
|
|
5209
5200
|
async function verifyResolvedRecord(args) {
|
|
5210
|
-
const {
|
|
5201
|
+
const {
|
|
5202
|
+
input,
|
|
5203
|
+
metadataBytes,
|
|
5204
|
+
txCbor,
|
|
5205
|
+
numConfirmations,
|
|
5206
|
+
blockTime,
|
|
5207
|
+
blockSlot,
|
|
5208
|
+
httpCalls,
|
|
5209
|
+
fetchFn
|
|
5210
|
+
} = args;
|
|
5211
5211
|
const profile = input.profile ?? DEFAULT_PROFILE;
|
|
5212
5212
|
const threshold = input.confirmationDepthThreshold ?? CONFIRMATION_DEPTH_THRESHOLD_DEFAULT;
|
|
5213
5213
|
const txDescription = txCbor !== void 0 ? decodeTxDescription(txCbor, input) : {};
|