@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
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ export { DenyHostsFetchOptions, HttpCall, denyHostsFetch } from './fetch/index.c
|
|
|
3
3
|
export { C as ContentCheck, D as DecryptionCredential, a as DecryptionOutcome, E as EXIT_CODE_FOR_VERDICT, b as ExitCode, I as ItemReportEntry, M as MerkleReportEntry, P as PROFILE_RANK, c as Profile, S as SignatureFailureReason, d as SignatureVerdict, e as SignerType, V as Verdict, f as VerifyRecordSignature, g as VerifyReport, h as VerifyResolvedInput, i as VerifyTxInput, j as VerifyTxOutput, k as VerifyTxSummary, l as VerifyTxWitness } from './types-Cexm4VH9.cjs';
|
|
4
4
|
export { ARWEAVE_GATEWAY_DEFAULTS, BLOCKFROST_MAINNET_HOST, CONFIRMATION_DEPTH_THRESHOLD_DEFAULT, CidBindingOutcome, DEFAULT_PROFILE, IssuePath, IssueSink, KOIOS_MAINNET_URL, ParsedCid, ResolveFailureCode, ResolveOutcome, ResolvedTx, TxBindingResult, TxComponents, UnwrappedAuxiliaryData, auxiliaryDataHashFromTxBody, bindTransactionBytes, compareIssuePaths, decodeTxSummary, decodeTxWitnesses, detectConformanceProfile, exitCodeForVerdict, issueOf, parseCid, planProfileSkips, profileImplements, resolveCardanoTx, sliceTxComponents, sortIssues, unwrapAuxiliaryData, verifyIpfsCidBinding, verifyRecordSignatures, verifyReportToDict, verifyResolved, verifyTx } from './verifier/index.cjs';
|
|
5
5
|
export { AccountNamespace, AssembleCoseSign1Args, AssembleCoseSign1Result, BatchEmptyError, BatchTooLargeError, DEFAULT_RESUMABLE_CHUNK_BYTES, DEFAULT_RESUMABLE_THRESHOLD_BYTES, ForbiddenError, IdempotencyConflictError, InsufficientFundsError, InsufficientScopeError, InternalServerError, InvalidBodyError, InvalidClientConfigError, Label309Client, Label309HttpError, Label309HttpErrorInit, MalformedCborError, NotFoundError, OffHostSignError, OffHostSignErrorCode, PartialUploadError, PoeNamespace, PrepareSigStructureArgs, PrepareSigStructureHashedResult, PrepareSigStructureResult, ProblemDetails, ProblemErrorEntry, PublishError, QuoteAlreadyConsumedError, QuoteExpiredError, QuoteNotFoundError, RateLimitedError, RecordNotFoundError, RecordsNamespace, ResumableUploadError, ServiceUnavailableError, UnauthorizedError, ValidationFailedError, assembleCoseSign1, assembleCoseSign1Hashed, buildToSign, parseHttpError, prepareSigStructure, prepareSigStructureHashed } from './client/index.cjs';
|
|
6
|
-
export { A as AccountBalance, C as ConformanceProfile, F as FetchImpl, L as Label309ClientConfig, P as PoeItemResponse, a as PoeStatus, b as PoeVerifyInput, c as PublishBatchEntry, d as PublishBatchFailureEntry, e as PublishBatchFailureError, f as PublishBatchInput, g as PublishBatchResponse, h as PublishBatchResultEntry, i as PublishBatchSuccessEntry, j as PublishContentInput, k as PublishInput, l as PublishMerkleInput, m as PublishMerkleResponse, n as PublishPrehashedInput, o as PublishResponse, p as PublishSealedInput, Q as QuoteInput, q as QuoteResponse, R as RecordResource, r as RecordScheme, s as RecordSignature, t as RecordStatus, u as RecordsListInput, v as RecordsListResponse, w as ResumableSource, x as ResumableSourceInput, S as Signer, y as StorageTarget, z as SupportedHashAlg, U as UploadAttemptCommitted, B as UploadAttemptReleaseReason, D as UploadAttemptReleased, E as UploadAttemptReserved, G as UploadAttemptState, H as UploadAttemptStatus, I as UploadEntry, J as UploadFailureEntry, K as UploadResumableInput, M as UploadResumableResult, N as UploadSessionAcceptedResponse, O as UploadSessionChunkResponse, T as UploadSessionCompleteResponse, V as UploadSessionCompletedResponse, W as UploadSessionCreateRequest, X as UploadSessionCreateResponse, Y as UploadSessionDeduplicatedResponse, Z as UploadSessionState, _ as UploadSessionStatus, $ as UploadSuccessEntry, a0 as UploadsInput, a1 as UploadsResponse, a2 as toResumableSource } from './types-
|
|
6
|
+
export { A as AccountBalance, C as ConformanceProfile, F as FetchImpl, L as Label309ClientConfig, P as PoeItemResponse, a as PoeStatus, b as PoeVerifyInput, c as PublishBatchEntry, d as PublishBatchFailureEntry, e as PublishBatchFailureError, f as PublishBatchInput, g as PublishBatchResponse, h as PublishBatchResultEntry, i as PublishBatchSuccessEntry, j as PublishContentInput, k as PublishInput, l as PublishMerkleInput, m as PublishMerkleResponse, n as PublishPrehashedInput, o as PublishResponse, p as PublishSealedInput, Q as QuoteInput, q as QuoteResponse, R as RecordResource, r as RecordScheme, s as RecordSignature, t as RecordStatus, u as RecordsListInput, v as RecordsListResponse, w as ResumableSource, x as ResumableSourceInput, S as Signer, y as StorageTarget, z as SupportedHashAlg, U as UploadAttemptCommitted, B as UploadAttemptReleaseReason, D as UploadAttemptReleased, E as UploadAttemptReserved, G as UploadAttemptState, H as UploadAttemptStatus, I as UploadEntry, J as UploadFailureEntry, K as UploadResumableInput, M as UploadResumableResult, N as UploadSessionAcceptedResponse, O as UploadSessionChunkResponse, T as UploadSessionCompleteResponse, V as UploadSessionCompletedResponse, W as UploadSessionCreateRequest, X as UploadSessionCreateResponse, Y as UploadSessionDeduplicatedResponse, Z as UploadSessionState, _ as UploadSessionStatus, $ as UploadSuccessEntry, a0 as UploadsInput, a1 as UploadsResponse, a2 as toResumableSource } from './types-DNu_IrWZ.cjs';
|
|
7
7
|
export { CROCKFORD_ENCODED_LENGTH_FOR_UUID, POE_ID_PATTERN, POE_ID_PREFIX, PoeIdSchema, PrefixedId, decodeCrockfordBase32, decodePrefixedId, encodeBytesVariableLength, encodeCrockfordBase32, encodePrefixedId, isPrefixedId } from './ids/index.cjs';
|
|
8
8
|
export { i as merkle } from './index-Cg1QqVmA.cjs';
|
|
9
9
|
export { i as hash } from './index-BhnlWJAY.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { DenyHostsFetchOptions, HttpCall, denyHostsFetch } from './fetch/index.j
|
|
|
3
3
|
export { C as ContentCheck, D as DecryptionCredential, a as DecryptionOutcome, E as EXIT_CODE_FOR_VERDICT, b as ExitCode, I as ItemReportEntry, M as MerkleReportEntry, P as PROFILE_RANK, c as Profile, S as SignatureFailureReason, d as SignatureVerdict, e as SignerType, V as Verdict, f as VerifyRecordSignature, g as VerifyReport, h as VerifyResolvedInput, i as VerifyTxInput, j as VerifyTxOutput, k as VerifyTxSummary, l as VerifyTxWitness } from './types-CgoBub9J.js';
|
|
4
4
|
export { ARWEAVE_GATEWAY_DEFAULTS, BLOCKFROST_MAINNET_HOST, CONFIRMATION_DEPTH_THRESHOLD_DEFAULT, CidBindingOutcome, DEFAULT_PROFILE, IssuePath, IssueSink, KOIOS_MAINNET_URL, ParsedCid, ResolveFailureCode, ResolveOutcome, ResolvedTx, TxBindingResult, TxComponents, UnwrappedAuxiliaryData, auxiliaryDataHashFromTxBody, bindTransactionBytes, compareIssuePaths, decodeTxSummary, decodeTxWitnesses, detectConformanceProfile, exitCodeForVerdict, issueOf, parseCid, planProfileSkips, profileImplements, resolveCardanoTx, sliceTxComponents, sortIssues, unwrapAuxiliaryData, verifyIpfsCidBinding, verifyRecordSignatures, verifyReportToDict, verifyResolved, verifyTx } from './verifier/index.js';
|
|
5
5
|
export { AccountNamespace, AssembleCoseSign1Args, AssembleCoseSign1Result, BatchEmptyError, BatchTooLargeError, DEFAULT_RESUMABLE_CHUNK_BYTES, DEFAULT_RESUMABLE_THRESHOLD_BYTES, ForbiddenError, IdempotencyConflictError, InsufficientFundsError, InsufficientScopeError, InternalServerError, InvalidBodyError, InvalidClientConfigError, Label309Client, Label309HttpError, Label309HttpErrorInit, MalformedCborError, NotFoundError, OffHostSignError, OffHostSignErrorCode, PartialUploadError, PoeNamespace, PrepareSigStructureArgs, PrepareSigStructureHashedResult, PrepareSigStructureResult, ProblemDetails, ProblemErrorEntry, PublishError, QuoteAlreadyConsumedError, QuoteExpiredError, QuoteNotFoundError, RateLimitedError, RecordNotFoundError, RecordsNamespace, ResumableUploadError, ServiceUnavailableError, UnauthorizedError, ValidationFailedError, assembleCoseSign1, assembleCoseSign1Hashed, buildToSign, parseHttpError, prepareSigStructure, prepareSigStructureHashed } from './client/index.js';
|
|
6
|
-
export { A as AccountBalance, C as ConformanceProfile, F as FetchImpl, L as Label309ClientConfig, P as PoeItemResponse, a as PoeStatus, b as PoeVerifyInput, c as PublishBatchEntry, d as PublishBatchFailureEntry, e as PublishBatchFailureError, f as PublishBatchInput, g as PublishBatchResponse, h as PublishBatchResultEntry, i as PublishBatchSuccessEntry, j as PublishContentInput, k as PublishInput, l as PublishMerkleInput, m as PublishMerkleResponse, n as PublishPrehashedInput, o as PublishResponse, p as PublishSealedInput, Q as QuoteInput, q as QuoteResponse, R as RecordResource, r as RecordScheme, s as RecordSignature, t as RecordStatus, u as RecordsListInput, v as RecordsListResponse, w as ResumableSource, x as ResumableSourceInput, S as Signer, y as StorageTarget, z as SupportedHashAlg, U as UploadAttemptCommitted, B as UploadAttemptReleaseReason, D as UploadAttemptReleased, E as UploadAttemptReserved, G as UploadAttemptState, H as UploadAttemptStatus, I as UploadEntry, J as UploadFailureEntry, K as UploadResumableInput, M as UploadResumableResult, N as UploadSessionAcceptedResponse, O as UploadSessionChunkResponse, T as UploadSessionCompleteResponse, V as UploadSessionCompletedResponse, W as UploadSessionCreateRequest, X as UploadSessionCreateResponse, Y as UploadSessionDeduplicatedResponse, Z as UploadSessionState, _ as UploadSessionStatus, $ as UploadSuccessEntry, a0 as UploadsInput, a1 as UploadsResponse, a2 as toResumableSource } from './types-
|
|
6
|
+
export { A as AccountBalance, C as ConformanceProfile, F as FetchImpl, L as Label309ClientConfig, P as PoeItemResponse, a as PoeStatus, b as PoeVerifyInput, c as PublishBatchEntry, d as PublishBatchFailureEntry, e as PublishBatchFailureError, f as PublishBatchInput, g as PublishBatchResponse, h as PublishBatchResultEntry, i as PublishBatchSuccessEntry, j as PublishContentInput, k as PublishInput, l as PublishMerkleInput, m as PublishMerkleResponse, n as PublishPrehashedInput, o as PublishResponse, p as PublishSealedInput, Q as QuoteInput, q as QuoteResponse, R as RecordResource, r as RecordScheme, s as RecordSignature, t as RecordStatus, u as RecordsListInput, v as RecordsListResponse, w as ResumableSource, x as ResumableSourceInput, S as Signer, y as StorageTarget, z as SupportedHashAlg, U as UploadAttemptCommitted, B as UploadAttemptReleaseReason, D as UploadAttemptReleased, E as UploadAttemptReserved, G as UploadAttemptState, H as UploadAttemptStatus, I as UploadEntry, J as UploadFailureEntry, K as UploadResumableInput, M as UploadResumableResult, N as UploadSessionAcceptedResponse, O as UploadSessionChunkResponse, T as UploadSessionCompleteResponse, V as UploadSessionCompletedResponse, W as UploadSessionCreateRequest, X as UploadSessionCreateResponse, Y as UploadSessionDeduplicatedResponse, Z as UploadSessionState, _ as UploadSessionStatus, $ as UploadSuccessEntry, a0 as UploadsInput, a1 as UploadsResponse, a2 as toResumableSource } from './types-DNu_IrWZ.js';
|
|
7
7
|
export { CROCKFORD_ENCODED_LENGTH_FOR_UUID, POE_ID_PATTERN, POE_ID_PREFIX, PoeIdSchema, PrefixedId, decodeCrockfordBase32, decodePrefixedId, encodeBytesVariableLength, encodeCrockfordBase32, encodePrefixedId, isPrefixedId } from './ids/index.js';
|
|
8
8
|
export { i as merkle } from './index-Cg1QqVmA.js';
|
|
9
9
|
export { i as hash } from './index-BhnlWJAY.js';
|
package/dist/index.js
CHANGED
|
@@ -5324,13 +5324,13 @@ function readVarint(bytes, start) {
|
|
|
5324
5324
|
function decodeMultibase(prefix, body) {
|
|
5325
5325
|
switch (prefix) {
|
|
5326
5326
|
case "b":
|
|
5327
|
-
return decodeBase32(body
|
|
5327
|
+
return decodeBase32(body, "rfc4648-lower");
|
|
5328
5328
|
case "B":
|
|
5329
|
-
return decodeBase32(body
|
|
5329
|
+
return decodeBase32(body, "rfc4648-upper");
|
|
5330
5330
|
case "f":
|
|
5331
|
-
return decodeBase16(body
|
|
5331
|
+
return decodeBase16(body, "lower");
|
|
5332
5332
|
case "F":
|
|
5333
|
-
return decodeBase16(body
|
|
5333
|
+
return decodeBase16(body, "upper");
|
|
5334
5334
|
case "z":
|
|
5335
5335
|
return decodeBase58btc(body);
|
|
5336
5336
|
default:
|
|
@@ -5339,10 +5339,10 @@ function decodeMultibase(prefix, body) {
|
|
|
5339
5339
|
}
|
|
5340
5340
|
var BASE16_LOWER = "0123456789abcdef";
|
|
5341
5341
|
var BASE16_UPPER = "0123456789ABCDEF";
|
|
5342
|
-
function decodeBase16(s) {
|
|
5342
|
+
function decodeBase16(s, variant) {
|
|
5343
5343
|
if (s.length % 2 !== 0) throw new Error("base16: odd-length");
|
|
5344
|
+
const alphabet = variant === "lower" ? BASE16_LOWER : BASE16_UPPER;
|
|
5344
5345
|
const out = new Uint8Array(s.length / 2);
|
|
5345
|
-
const alphabet = s === s.toLowerCase() ? BASE16_LOWER : BASE16_UPPER;
|
|
5346
5346
|
for (let i = 0; i < out.length; i++) {
|
|
5347
5347
|
const hi = alphabet.indexOf(s[i * 2]);
|
|
5348
5348
|
const lo = alphabet.indexOf(s[i * 2 + 1]);
|
|
@@ -9556,16 +9556,22 @@ var RecordsNamespace = class {
|
|
|
9556
9556
|
* between.
|
|
9557
9557
|
*
|
|
9558
9558
|
* Auth required (Bearer with `poe:read` scope, or NextAuth session
|
|
9559
|
-
* cookie).
|
|
9560
|
-
*
|
|
9559
|
+
* cookie). This is the hosted PUBLIC verifier: it accepts no decryption
|
|
9560
|
+
* credentials, and sealed items report as unverifiable without decryption.
|
|
9561
|
+
* To verify as a recipient (decrypt + plaintext-hash recheck), run the
|
|
9562
|
+
* `verifier` module locally with its `decryption` input — keys never leave
|
|
9563
|
+
* the process. Optional `fetch_content: false` skips content re-fetching;
|
|
9564
|
+
* affected claims report `not_checked`.
|
|
9561
9565
|
*/
|
|
9562
9566
|
async verify(txHash, input) {
|
|
9567
|
+
const body = {};
|
|
9568
|
+
if (input?.fetch_content !== void 0) body.fetch_content = input.fetch_content;
|
|
9563
9569
|
const response = await this.config.fetch(
|
|
9564
9570
|
`${this.config.baseUrl}/api/v1/records/${encodeURIComponent(txHash)}/verify`,
|
|
9565
9571
|
{
|
|
9566
9572
|
method: "POST",
|
|
9567
9573
|
headers: buildHeaders2(this.config.apiKey),
|
|
9568
|
-
body: JSON.stringify(
|
|
9574
|
+
body: JSON.stringify(body)
|
|
9569
9575
|
}
|
|
9570
9576
|
);
|
|
9571
9577
|
await throwIfNotOk(response);
|