@cardanowall/sdk-ts 0.4.0 → 0.6.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/dist/client/index.cjs +9 -3
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +8 -4
- package/dist/client/index.d.ts +8 -4
- package/dist/client/index.js +9 -3
- package/dist/client/index.js.map +1 -1
- package/dist/conformance/cli.cjs +6 -6
- package/dist/conformance/cli.cjs.map +1 -1
- package/dist/conformance/cli.js +6 -6
- package/dist/conformance/cli.js.map +1 -1
- package/dist/identity/index.cjs.map +1 -1
- package/dist/identity/index.d.cts +1 -1
- package/dist/identity/index.d.ts +1 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/index.cjs +15 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/{types-Dp4wUSFI.d.cts → types-DNu_IrWZ.d.cts} +16 -6
- package/dist/{types-Dp4wUSFI.d.ts → types-DNu_IrWZ.d.ts} +16 -6
- package/dist/verifier/index.cjs +6 -6
- package/dist/verifier/index.cjs.map +1 -1
- package/dist/verifier/index.js +6 -6
- package/dist/verifier/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -423,13 +423,23 @@ interface RecordsListResponse {
|
|
|
423
423
|
interface AccountBalance {
|
|
424
424
|
readonly balanceUsdMicros: string;
|
|
425
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* Request body for the hosted verify endpoint.
|
|
428
|
+
*
|
|
429
|
+
* The endpoint is a PUBLIC verifier — structural validation plus record-level
|
|
430
|
+
* signature verification over public chain data. It accepts no decryption
|
|
431
|
+
* credentials: a body carrying any is rejected with 400 validation-failed,
|
|
432
|
+
* and sealed (enc-bearing) items report as unverifiable without decryption.
|
|
433
|
+
* Recipient verification (sealed-envelope decrypt + plaintext-hash recheck)
|
|
434
|
+
* runs locally — use the `verifier` module's `decryption` input, which never
|
|
435
|
+
* leaves the process.
|
|
436
|
+
*
|
|
437
|
+
* `fetch_content` is the master content-fetch switch (item URIs and Merkle
|
|
438
|
+
* leaves lists alike). The server defaults it to `true`; pass `false` to skip
|
|
439
|
+
* content re-fetching — affected claims then report `not_checked`.
|
|
440
|
+
*/
|
|
426
441
|
interface PoeVerifyInput {
|
|
427
|
-
readonly
|
|
428
|
-
readonly decryption?: ReadonlyArray<{
|
|
429
|
-
readonly item_idx: number;
|
|
430
|
-
readonly recipient_secret_key?: string;
|
|
431
|
-
readonly passphrase?: string;
|
|
432
|
-
}>;
|
|
442
|
+
readonly fetch_content?: boolean;
|
|
433
443
|
}
|
|
434
444
|
/**
|
|
435
445
|
* Pluggable Ed25519 signer for the high-level publish helpers. The SDK does
|
|
@@ -423,13 +423,23 @@ interface RecordsListResponse {
|
|
|
423
423
|
interface AccountBalance {
|
|
424
424
|
readonly balanceUsdMicros: string;
|
|
425
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* Request body for the hosted verify endpoint.
|
|
428
|
+
*
|
|
429
|
+
* The endpoint is a PUBLIC verifier — structural validation plus record-level
|
|
430
|
+
* signature verification over public chain data. It accepts no decryption
|
|
431
|
+
* credentials: a body carrying any is rejected with 400 validation-failed,
|
|
432
|
+
* and sealed (enc-bearing) items report as unverifiable without decryption.
|
|
433
|
+
* Recipient verification (sealed-envelope decrypt + plaintext-hash recheck)
|
|
434
|
+
* runs locally — use the `verifier` module's `decryption` input, which never
|
|
435
|
+
* leaves the process.
|
|
436
|
+
*
|
|
437
|
+
* `fetch_content` is the master content-fetch switch (item URIs and Merkle
|
|
438
|
+
* leaves lists alike). The server defaults it to `true`; pass `false` to skip
|
|
439
|
+
* content re-fetching — affected claims then report `not_checked`.
|
|
440
|
+
*/
|
|
426
441
|
interface PoeVerifyInput {
|
|
427
|
-
readonly
|
|
428
|
-
readonly decryption?: ReadonlyArray<{
|
|
429
|
-
readonly item_idx: number;
|
|
430
|
-
readonly recipient_secret_key?: string;
|
|
431
|
-
readonly passphrase?: string;
|
|
432
|
-
}>;
|
|
442
|
+
readonly fetch_content?: boolean;
|
|
433
443
|
}
|
|
434
444
|
/**
|
|
435
445
|
* Pluggable Ed25519 signer for the high-level publish helpers. The SDK does
|
package/dist/verifier/index.cjs
CHANGED
|
@@ -4684,13 +4684,13 @@ function readVarint(bytes, start) {
|
|
|
4684
4684
|
function decodeMultibase(prefix, body) {
|
|
4685
4685
|
switch (prefix) {
|
|
4686
4686
|
case "b":
|
|
4687
|
-
return decodeBase32(body
|
|
4687
|
+
return decodeBase32(body, "rfc4648-lower");
|
|
4688
4688
|
case "B":
|
|
4689
|
-
return decodeBase32(body
|
|
4689
|
+
return decodeBase32(body, "rfc4648-upper");
|
|
4690
4690
|
case "f":
|
|
4691
|
-
return decodeBase16(body
|
|
4691
|
+
return decodeBase16(body, "lower");
|
|
4692
4692
|
case "F":
|
|
4693
|
-
return decodeBase16(body
|
|
4693
|
+
return decodeBase16(body, "upper");
|
|
4694
4694
|
case "z":
|
|
4695
4695
|
return decodeBase58btc(body);
|
|
4696
4696
|
default:
|
|
@@ -4699,10 +4699,10 @@ function decodeMultibase(prefix, body) {
|
|
|
4699
4699
|
}
|
|
4700
4700
|
var BASE16_LOWER = "0123456789abcdef";
|
|
4701
4701
|
var BASE16_UPPER = "0123456789ABCDEF";
|
|
4702
|
-
function decodeBase16(s) {
|
|
4702
|
+
function decodeBase16(s, variant) {
|
|
4703
4703
|
if (s.length % 2 !== 0) throw new Error("base16: odd-length");
|
|
4704
|
+
const alphabet = variant === "lower" ? BASE16_LOWER : BASE16_UPPER;
|
|
4704
4705
|
const out = new Uint8Array(s.length / 2);
|
|
4705
|
-
const alphabet = s === s.toLowerCase() ? BASE16_LOWER : BASE16_UPPER;
|
|
4706
4706
|
for (let i = 0; i < out.length; i++) {
|
|
4707
4707
|
const hi = alphabet.indexOf(s[i * 2]);
|
|
4708
4708
|
const lo = alphabet.indexOf(s[i * 2 + 1]);
|