@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/conformance/cli.js
CHANGED
|
@@ -879,11 +879,7 @@ function validateOneUri(chunks, path, errors) {
|
|
|
879
879
|
const uri = reconstructed.uri;
|
|
880
880
|
if (uri.includes("#")) {
|
|
881
881
|
errors.push(
|
|
882
|
-
issue(
|
|
883
|
-
"INVALID_URI",
|
|
884
|
-
path,
|
|
885
|
-
"URI contains a fragment identifier ('#'), which is forbidden"
|
|
886
|
-
)
|
|
882
|
+
issue("INVALID_URI", path, "URI contains a fragment identifier ('#'), which is forbidden")
|
|
887
883
|
);
|
|
888
884
|
return;
|
|
889
885
|
}
|
|
@@ -913,21 +909,13 @@ function validateOneUri(chunks, path, errors) {
|
|
|
913
909
|
const cid = slashIdx === -1 ? rest : rest.slice(0, slashIdx);
|
|
914
910
|
if (!validateCidProfile(cid)) {
|
|
915
911
|
errors.push(
|
|
916
|
-
issue(
|
|
917
|
-
"INVALID_URI",
|
|
918
|
-
path,
|
|
919
|
-
"ipfs:// URI is not a valid CID under the CIP-309 profile"
|
|
920
|
-
)
|
|
912
|
+
issue("INVALID_URI", path, "ipfs:// URI is not a valid CID under the CIP-309 profile")
|
|
921
913
|
);
|
|
922
914
|
}
|
|
923
915
|
return;
|
|
924
916
|
}
|
|
925
917
|
errors.push(
|
|
926
|
-
issue(
|
|
927
|
-
"INVALID_URI",
|
|
928
|
-
path,
|
|
929
|
-
"unsupported URI scheme; v1 PoE URI set is {ar://, ipfs://}"
|
|
930
|
-
)
|
|
918
|
+
issue("INVALID_URI", path, "unsupported URI scheme; v1 PoE URI set is {ar://, ipfs://}")
|
|
931
919
|
);
|
|
932
920
|
}
|
|
933
921
|
function checkItemEnc(item, idx, errors) {
|
|
@@ -3288,7 +3276,9 @@ async function tryDecryptions(args) {
|
|
|
3288
3276
|
let plaintext = null;
|
|
3289
3277
|
let failure = null;
|
|
3290
3278
|
if (reqHasSecret) {
|
|
3291
|
-
const envelope = sealedEnvelopeFromParsed(
|
|
3279
|
+
const envelope = sealedEnvelopeFromParsed(
|
|
3280
|
+
enc
|
|
3281
|
+
);
|
|
3292
3282
|
if (envelope === null) {
|
|
3293
3283
|
out.push({
|
|
3294
3284
|
item_index: idx,
|
|
@@ -4413,7 +4403,8 @@ function decodeTxSummary(txBodyBytes, witnessSetBytes, network) {
|
|
|
4413
4403
|
else if (typeof invalidBefore === "bigint") summary.invalid_before = Number(invalidBefore);
|
|
4414
4404
|
const invalidHereafter = body.get(BODY_KEY_INVALID_HEREAFTER);
|
|
4415
4405
|
if (typeof invalidHereafter === "number") summary.invalid_hereafter = invalidHereafter;
|
|
4416
|
-
else if (typeof invalidHereafter === "bigint")
|
|
4406
|
+
else if (typeof invalidHereafter === "bigint")
|
|
4407
|
+
summary.invalid_hereafter = Number(invalidHereafter);
|
|
4417
4408
|
if (requiredSigners.length > 0) summary.required_signer_key_hashes = requiredSigners;
|
|
4418
4409
|
const networkId = body.get(BODY_KEY_NETWORK_ID);
|
|
4419
4410
|
if (typeof networkId === "number") summary.network_id = networkId;
|
|
@@ -4593,7 +4584,16 @@ async function verifyTx(input) {
|
|
|
4593
4584
|
});
|
|
4594
4585
|
}
|
|
4595
4586
|
async function verifyResolvedRecord(args) {
|
|
4596
|
-
const {
|
|
4587
|
+
const {
|
|
4588
|
+
input,
|
|
4589
|
+
metadataBytes,
|
|
4590
|
+
txCbor,
|
|
4591
|
+
numConfirmations,
|
|
4592
|
+
blockTime,
|
|
4593
|
+
blockSlot,
|
|
4594
|
+
httpCalls,
|
|
4595
|
+
fetchFn
|
|
4596
|
+
} = args;
|
|
4597
4597
|
const profile = input.profile ?? DEFAULT_PROFILE;
|
|
4598
4598
|
const threshold = input.confirmationDepthThreshold ?? CONFIRMATION_DEPTH_THRESHOLD_DEFAULT;
|
|
4599
4599
|
const txDescription = txCbor !== void 0 ? decodeTxDescription(txCbor, input) : {};
|