@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.js
CHANGED
|
@@ -1350,11 +1350,7 @@ function validateOneUri(chunks, path, errors) {
|
|
|
1350
1350
|
const uri = reconstructed.uri;
|
|
1351
1351
|
if (uri.includes("#")) {
|
|
1352
1352
|
errors.push(
|
|
1353
|
-
issue(
|
|
1354
|
-
"INVALID_URI",
|
|
1355
|
-
path,
|
|
1356
|
-
"URI contains a fragment identifier ('#'), which is forbidden"
|
|
1357
|
-
)
|
|
1353
|
+
issue("INVALID_URI", path, "URI contains a fragment identifier ('#'), which is forbidden")
|
|
1358
1354
|
);
|
|
1359
1355
|
return;
|
|
1360
1356
|
}
|
|
@@ -1384,21 +1380,13 @@ function validateOneUri(chunks, path, errors) {
|
|
|
1384
1380
|
const cid = slashIdx === -1 ? rest : rest.slice(0, slashIdx);
|
|
1385
1381
|
if (!validateCidProfile(cid)) {
|
|
1386
1382
|
errors.push(
|
|
1387
|
-
issue(
|
|
1388
|
-
"INVALID_URI",
|
|
1389
|
-
path,
|
|
1390
|
-
"ipfs:// URI is not a valid CID under the CIP-309 profile"
|
|
1391
|
-
)
|
|
1383
|
+
issue("INVALID_URI", path, "ipfs:// URI is not a valid CID under the CIP-309 profile")
|
|
1392
1384
|
);
|
|
1393
1385
|
}
|
|
1394
1386
|
return;
|
|
1395
1387
|
}
|
|
1396
1388
|
errors.push(
|
|
1397
|
-
issue(
|
|
1398
|
-
"INVALID_URI",
|
|
1399
|
-
path,
|
|
1400
|
-
"unsupported URI scheme; v1 PoE URI set is {ar://, ipfs://}"
|
|
1401
|
-
)
|
|
1389
|
+
issue("INVALID_URI", path, "unsupported URI scheme; v1 PoE URI set is {ar://, ipfs://}")
|
|
1402
1390
|
);
|
|
1403
1391
|
}
|
|
1404
1392
|
function checkItemEnc(item, idx, errors) {
|
|
@@ -3792,7 +3780,9 @@ async function tryDecryptions(args) {
|
|
|
3792
3780
|
let plaintext = null;
|
|
3793
3781
|
let failure = null;
|
|
3794
3782
|
if (reqHasSecret) {
|
|
3795
|
-
const envelope = sealedEnvelopeFromParsed(
|
|
3783
|
+
const envelope = sealedEnvelopeFromParsed(
|
|
3784
|
+
enc
|
|
3785
|
+
);
|
|
3796
3786
|
if (envelope === null) {
|
|
3797
3787
|
out.push({
|
|
3798
3788
|
item_index: idx,
|
|
@@ -4973,7 +4963,8 @@ function decodeTxSummary(txBodyBytes, witnessSetBytes, network) {
|
|
|
4973
4963
|
else if (typeof invalidBefore === "bigint") summary.invalid_before = Number(invalidBefore);
|
|
4974
4964
|
const invalidHereafter = body.get(BODY_KEY_INVALID_HEREAFTER);
|
|
4975
4965
|
if (typeof invalidHereafter === "number") summary.invalid_hereafter = invalidHereafter;
|
|
4976
|
-
else if (typeof invalidHereafter === "bigint")
|
|
4966
|
+
else if (typeof invalidHereafter === "bigint")
|
|
4967
|
+
summary.invalid_hereafter = Number(invalidHereafter);
|
|
4977
4968
|
if (requiredSigners.length > 0) summary.required_signer_key_hashes = requiredSigners;
|
|
4978
4969
|
const networkId = body.get(BODY_KEY_NETWORK_ID);
|
|
4979
4970
|
if (typeof networkId === "number") summary.network_id = networkId;
|
|
@@ -5185,7 +5176,16 @@ async function verifyResolved(input) {
|
|
|
5185
5176
|
return report;
|
|
5186
5177
|
}
|
|
5187
5178
|
async function verifyResolvedRecord(args) {
|
|
5188
|
-
const {
|
|
5179
|
+
const {
|
|
5180
|
+
input,
|
|
5181
|
+
metadataBytes,
|
|
5182
|
+
txCbor,
|
|
5183
|
+
numConfirmations,
|
|
5184
|
+
blockTime,
|
|
5185
|
+
blockSlot,
|
|
5186
|
+
httpCalls,
|
|
5187
|
+
fetchFn
|
|
5188
|
+
} = args;
|
|
5189
5189
|
const profile = input.profile ?? DEFAULT_PROFILE;
|
|
5190
5190
|
const threshold = input.confirmationDepthThreshold ?? CONFIRMATION_DEPTH_THRESHOLD_DEFAULT;
|
|
5191
5191
|
const txDescription = txCbor !== void 0 ? decodeTxDescription(txCbor, input) : {};
|