@cardanowall/sdk-ts 0.0.0 → 0.2.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 +23 -19
- package/dist/client/index.cjs +34 -34
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +52 -52
- package/dist/client/index.d.ts +52 -52
- package/dist/client/index.js +33 -33
- package/dist/client/index.js.map +1 -1
- package/dist/conformance/cli.cjs +34 -34
- package/dist/conformance/cli.cjs.map +1 -1
- package/dist/conformance/cli.js +34 -34
- 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/ids/index.cjs.map +1 -1
- package/dist/ids/index.js.map +1 -1
- package/dist/index.cjs +67 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +65 -65
- package/dist/index.js.map +1 -1
- package/dist/merkle/index.cjs +1 -1
- package/dist/merkle/index.cjs.map +1 -1
- package/dist/merkle/index.js +1 -1
- package/dist/merkle/index.js.map +1 -1
- package/dist/{types-BQMtbRCb.d.cts → types-DGsZTMuZ.d.cts} +6 -6
- package/dist/{types-BQMtbRCb.d.ts → types-DGsZTMuZ.d.ts} +6 -6
- package/dist/verifier/index.cjs +34 -34
- package/dist/verifier/index.cjs.map +1 -1
- package/dist/verifier/index.d.cts +3 -3
- package/dist/verifier/index.d.ts +3 -3
- package/dist/verifier/index.js +34 -34
- package/dist/verifier/index.js.map +1 -1
- package/package.json +10 -9
package/dist/client/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PoeRecord, SigEntry } from '@cardanowall/poe-standard';
|
|
2
|
-
import { F as FetchImpl, A as AccountBalance, Q as QuoteInput,
|
|
3
|
-
export {
|
|
2
|
+
import { F as FetchImpl, A as AccountBalance, Q as QuoteInput, q as QuoteResponse, B as UploadsInput, D as UploadsResponse, k as PublishInput, o as PublishResponse, f as PublishBatchInput, g as PublishBatchResponse, j as PublishContentInput, n as PublishPrehashedInput, p as PublishSealedInput, l as PublishMerkleInput, m as PublishMerkleResponse, u as RecordsListInput, v as RecordsListResponse, R as RecordResource, b as PoeVerifyInput, L as Label309ClientConfig, y as UploadFailureEntry } from '../types-DGsZTMuZ.cjs';
|
|
3
|
+
export { C as ConformanceProfile, P as PoeItemResponse, a as PoeStatus, c as PublishBatchEntry, d as PublishBatchFailureEntry, e as PublishBatchFailureError, h as PublishBatchResultEntry, i as PublishBatchSuccessEntry, r as RecordScheme, s as RecordSignature, t as RecordStatus, S as Signer, w as StorageTarget, x as SupportedHashAlg, U as UploadEntry, z as UploadSuccessEntry } from '../types-DGsZTMuZ.cjs';
|
|
4
4
|
import { g as VerifyReport } from '../types-CLXdbjqr.cjs';
|
|
5
5
|
import '../fetch-outbound-BT5-NiYN.cjs';
|
|
6
6
|
|
|
@@ -91,7 +91,7 @@ declare class PoeNamespace {
|
|
|
91
91
|
* publish time against the locked price snapshot.
|
|
92
92
|
*
|
|
93
93
|
* On HTTP-level failure (auth, rate limit, malformed request) this throws
|
|
94
|
-
* a typed `
|
|
94
|
+
* a typed `Label309HttpError` subclass. Per-file failures inside a 200
|
|
95
95
|
* response are NOT thrown by `uploads()` itself — the response body is
|
|
96
96
|
* returned verbatim so the caller can decide how to react. The
|
|
97
97
|
* higher-level helpers (`publishSealed`, `publishMerkle`) treat any failed
|
|
@@ -119,7 +119,7 @@ declare class PoeNamespace {
|
|
|
119
119
|
publishBatch(input: PublishBatchInput): Promise<PublishBatchResponse>;
|
|
120
120
|
/**
|
|
121
121
|
* High-level hash-only publish: hash the supplied content, build a
|
|
122
|
-
* single-item
|
|
122
|
+
* single-item Label 309 record, optionally sign it with the caller-supplied
|
|
123
123
|
* signer, and submit. No Arweave, no storage round-trip — anchors the
|
|
124
124
|
* digest only.
|
|
125
125
|
*/
|
|
@@ -133,7 +133,7 @@ declare class PoeNamespace {
|
|
|
133
133
|
/**
|
|
134
134
|
* Sealed-PoE: encrypt the supplied content to the recipient X25519 public
|
|
135
135
|
* keys (age-style sealed envelope), upload the ciphertext to Arweave via
|
|
136
|
-
* /uploads, build a
|
|
136
|
+
* /uploads, build a Label 309 record with the resulting `ar://` URI, sign
|
|
137
137
|
* it (optional), and submit via /publish.
|
|
138
138
|
*
|
|
139
139
|
* The sender SHOULD include their own X25519 public key in `recipients`
|
|
@@ -183,7 +183,7 @@ declare class RecordsNamespace {
|
|
|
183
183
|
*/
|
|
184
184
|
get(txHash: string): Promise<RecordResource>;
|
|
185
185
|
/**
|
|
186
|
-
* Run the canonical
|
|
186
|
+
* Run the canonical Label 309 verifier against the record at `txHash`.
|
|
187
187
|
* Returns the same `VerifyReport` shape the standalone verifier emits —
|
|
188
188
|
* `VerifyReport` IS the wire body of this endpoint, with no transformer in
|
|
189
189
|
* between.
|
|
@@ -195,12 +195,12 @@ declare class RecordsNamespace {
|
|
|
195
195
|
verify(txHash: string, input?: PoeVerifyInput): Promise<VerifyReport>;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
declare class
|
|
198
|
+
declare class Label309Client {
|
|
199
199
|
readonly poe: PoeNamespace;
|
|
200
200
|
readonly records: RecordsNamespace;
|
|
201
201
|
readonly account: AccountNamespace;
|
|
202
202
|
/**
|
|
203
|
-
* Construct a client against a
|
|
203
|
+
* Construct a client against a Label 309 gateway.
|
|
204
204
|
*
|
|
205
205
|
* `config.baseUrl` is required — there is no default deployment. The
|
|
206
206
|
* `config.apiKey`, when supplied, is an opaque bearer token sent verbatim as
|
|
@@ -210,7 +210,7 @@ declare class Cip309Client {
|
|
|
210
210
|
* via `client.poe.quote(...)` first; the resulting `quote_id` is consumed by
|
|
211
211
|
* the publish call.
|
|
212
212
|
*/
|
|
213
|
-
constructor(config:
|
|
213
|
+
constructor(config: Label309ClientConfig);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
declare class PublishError extends Error {
|
|
@@ -236,7 +236,7 @@ interface ProblemErrorEntry {
|
|
|
236
236
|
readonly detail: string;
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
|
-
* RFC 7807 `application/problem+json` document as emitted by every
|
|
239
|
+
* RFC 7807 `application/problem+json` document as emitted by every Label 309
|
|
240
240
|
* gateway `/api/v1/*` route.
|
|
241
241
|
*
|
|
242
242
|
* Canonical fields (`type`, `title`, `status`, `detail`, `code`, `trace_id`)
|
|
@@ -244,7 +244,7 @@ interface ProblemErrorEntry {
|
|
|
244
244
|
* `instance` is optional per RFC 7807 §3.1.
|
|
245
245
|
*
|
|
246
246
|
* Additional top-level fields are RFC 7807 §3.2 extension members and are
|
|
247
|
-
* preserved verbatim on `
|
|
247
|
+
* preserved verbatim on `Label309HttpError.extensions`.
|
|
248
248
|
*/
|
|
249
249
|
interface ProblemDetails {
|
|
250
250
|
readonly type: string;
|
|
@@ -258,7 +258,7 @@ interface ProblemDetails {
|
|
|
258
258
|
/** RFC 7807 §3.2 extension members. */
|
|
259
259
|
readonly [extension: string]: unknown;
|
|
260
260
|
}
|
|
261
|
-
interface
|
|
261
|
+
interface Label309HttpErrorInit {
|
|
262
262
|
/** The verbatim problem document. */
|
|
263
263
|
readonly problem: ProblemDetails;
|
|
264
264
|
/** Pre-split extension members. Computed from `problem` when omitted. */
|
|
@@ -279,7 +279,7 @@ interface Cip309HttpErrorInit {
|
|
|
279
279
|
* - `instanceof <SpecificError>` — see the subclasses re-exported from
|
|
280
280
|
* `@cardanowall/sdk-ts`
|
|
281
281
|
*/
|
|
282
|
-
declare class
|
|
282
|
+
declare class Label309HttpError extends Error {
|
|
283
283
|
readonly problem: ProblemDetails;
|
|
284
284
|
readonly code: string;
|
|
285
285
|
readonly httpStatus: number;
|
|
@@ -292,25 +292,25 @@ declare class Cip309HttpError extends Error {
|
|
|
292
292
|
readonly extensions: Record<string, unknown>;
|
|
293
293
|
readonly requestId: string;
|
|
294
294
|
readonly retryAfterSeconds: number | undefined;
|
|
295
|
-
constructor(init:
|
|
295
|
+
constructor(init: Label309HttpErrorInit);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
declare class BatchEmptyError extends
|
|
299
|
-
constructor(init:
|
|
298
|
+
declare class BatchEmptyError extends Label309HttpError {
|
|
299
|
+
constructor(init: Label309HttpErrorInit);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
declare class BatchTooLargeError extends
|
|
302
|
+
declare class BatchTooLargeError extends Label309HttpError {
|
|
303
303
|
readonly max: number | undefined;
|
|
304
304
|
readonly got: number | undefined;
|
|
305
|
-
constructor(init:
|
|
305
|
+
constructor(init: Label309HttpErrorInit);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
declare class ForbiddenError extends
|
|
309
|
-
constructor(init:
|
|
308
|
+
declare class ForbiddenError extends Label309HttpError {
|
|
309
|
+
constructor(init: Label309HttpErrorInit);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
declare class IdempotencyConflictError extends
|
|
313
|
-
constructor(init:
|
|
312
|
+
declare class IdempotencyConflictError extends Label309HttpError {
|
|
313
|
+
constructor(init: Label309HttpErrorInit);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
declare class InvalidClientConfigError extends Error {
|
|
@@ -318,70 +318,70 @@ declare class InvalidClientConfigError extends Error {
|
|
|
318
318
|
constructor(message: string);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
declare class InsufficientFundsError extends
|
|
321
|
+
declare class InsufficientFundsError extends Label309HttpError {
|
|
322
322
|
readonly balanceUsdMicros: bigint | undefined;
|
|
323
323
|
readonly requiredUsdMicros: bigint | undefined;
|
|
324
324
|
readonly topUpUrl: string | undefined;
|
|
325
|
-
constructor(init:
|
|
325
|
+
constructor(init: Label309HttpErrorInit);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
declare class InsufficientScopeError extends
|
|
328
|
+
declare class InsufficientScopeError extends Label309HttpError {
|
|
329
329
|
readonly requiredScopes: ReadonlyArray<string>;
|
|
330
330
|
readonly grantedScopes: ReadonlyArray<string>;
|
|
331
|
-
constructor(init:
|
|
331
|
+
constructor(init: Label309HttpErrorInit);
|
|
332
332
|
/** Convenience for the single-scope case; first entry of `requiredScopes`. */
|
|
333
333
|
get requiredScope(): string | undefined;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
declare class InternalServerError extends
|
|
337
|
-
constructor(init:
|
|
336
|
+
declare class InternalServerError extends Label309HttpError {
|
|
337
|
+
constructor(init: Label309HttpErrorInit);
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
declare class InvalidBodyError extends
|
|
341
|
-
constructor(init:
|
|
340
|
+
declare class InvalidBodyError extends Label309HttpError {
|
|
341
|
+
constructor(init: Label309HttpErrorInit);
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
declare class MalformedCborError extends
|
|
345
|
-
constructor(init:
|
|
344
|
+
declare class MalformedCborError extends Label309HttpError {
|
|
345
|
+
constructor(init: Label309HttpErrorInit);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
declare class NotFoundError extends
|
|
349
|
-
constructor(init:
|
|
348
|
+
declare class NotFoundError extends Label309HttpError {
|
|
349
|
+
constructor(init: Label309HttpErrorInit);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
declare class QuoteAlreadyConsumedError extends
|
|
352
|
+
declare class QuoteAlreadyConsumedError extends Label309HttpError {
|
|
353
353
|
readonly quoteId: string | undefined;
|
|
354
|
-
constructor(init:
|
|
354
|
+
constructor(init: Label309HttpErrorInit);
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
declare class QuoteExpiredError extends
|
|
357
|
+
declare class QuoteExpiredError extends Label309HttpError {
|
|
358
358
|
readonly quoteId: string | undefined;
|
|
359
|
-
constructor(init:
|
|
359
|
+
constructor(init: Label309HttpErrorInit);
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
-
declare class QuoteNotFoundError extends
|
|
362
|
+
declare class QuoteNotFoundError extends Label309HttpError {
|
|
363
363
|
readonly quoteId: string | undefined;
|
|
364
|
-
constructor(init:
|
|
364
|
+
constructor(init: Label309HttpErrorInit);
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
declare class RateLimitedError extends
|
|
368
|
-
constructor(init:
|
|
367
|
+
declare class RateLimitedError extends Label309HttpError {
|
|
368
|
+
constructor(init: Label309HttpErrorInit);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
declare class RecordNotFoundError extends
|
|
372
|
-
constructor(init:
|
|
371
|
+
declare class RecordNotFoundError extends Label309HttpError {
|
|
372
|
+
constructor(init: Label309HttpErrorInit);
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
declare class ServiceUnavailableError extends
|
|
376
|
-
constructor(init:
|
|
375
|
+
declare class ServiceUnavailableError extends Label309HttpError {
|
|
376
|
+
constructor(init: Label309HttpErrorInit);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
declare class UnauthorizedError extends
|
|
380
|
-
constructor(init:
|
|
379
|
+
declare class UnauthorizedError extends Label309HttpError {
|
|
380
|
+
constructor(init: Label309HttpErrorInit);
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
declare class ValidationFailedError extends
|
|
384
|
-
constructor(init:
|
|
383
|
+
declare class ValidationFailedError extends Label309HttpError {
|
|
384
|
+
constructor(init: Label309HttpErrorInit);
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
interface ParseHttpErrorArgs {
|
|
@@ -392,6 +392,6 @@ interface ParseHttpErrorArgs {
|
|
|
392
392
|
/** `Retry-After` header from the response, parsed as integer seconds. */
|
|
393
393
|
readonly retryAfterSeconds?: number | undefined;
|
|
394
394
|
}
|
|
395
|
-
declare function parseHttpError(args: ParseHttpErrorArgs):
|
|
395
|
+
declare function parseHttpError(args: ParseHttpErrorArgs): Label309HttpError;
|
|
396
396
|
|
|
397
|
-
export { AccountBalance, AccountNamespace, type AssembleCoseSign1Args, type AssembleCoseSign1Result, BatchEmptyError, BatchTooLargeError,
|
|
397
|
+
export { AccountBalance, AccountNamespace, type AssembleCoseSign1Args, type AssembleCoseSign1Result, BatchEmptyError, BatchTooLargeError, FetchImpl, ForbiddenError, IdempotencyConflictError, InsufficientFundsError, InsufficientScopeError, InternalServerError, InvalidBodyError, InvalidClientConfigError, Label309Client, Label309ClientConfig, Label309HttpError, type Label309HttpErrorInit, MalformedCborError, NotFoundError, OffHostSignError, type OffHostSignErrorCode, PartialUploadError, PoeNamespace, PoeVerifyInput, type PrepareSigStructureArgs, type PrepareSigStructureHashedResult, type PrepareSigStructureResult, type ProblemDetails, type ProblemErrorEntry, PublishBatchInput, PublishBatchResponse, PublishContentInput, PublishError, PublishInput, PublishMerkleInput, PublishMerkleResponse, PublishPrehashedInput, PublishResponse, PublishSealedInput, QuoteAlreadyConsumedError, QuoteExpiredError, QuoteInput, QuoteNotFoundError, QuoteResponse, RateLimitedError, RecordNotFoundError, RecordResource, RecordsListInput, RecordsListResponse, RecordsNamespace, ServiceUnavailableError, UnauthorizedError, UploadFailureEntry, UploadsInput, UploadsResponse, ValidationFailedError, assembleCoseSign1, assembleCoseSign1Hashed, buildToSign, parseHttpError, prepareSigStructure, prepareSigStructureHashed };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PoeRecord, SigEntry } from '@cardanowall/poe-standard';
|
|
2
|
-
import { F as FetchImpl, A as AccountBalance, Q as QuoteInput,
|
|
3
|
-
export {
|
|
2
|
+
import { F as FetchImpl, A as AccountBalance, Q as QuoteInput, q as QuoteResponse, B as UploadsInput, D as UploadsResponse, k as PublishInput, o as PublishResponse, f as PublishBatchInput, g as PublishBatchResponse, j as PublishContentInput, n as PublishPrehashedInput, p as PublishSealedInput, l as PublishMerkleInput, m as PublishMerkleResponse, u as RecordsListInput, v as RecordsListResponse, R as RecordResource, b as PoeVerifyInput, L as Label309ClientConfig, y as UploadFailureEntry } from '../types-DGsZTMuZ.js';
|
|
3
|
+
export { C as ConformanceProfile, P as PoeItemResponse, a as PoeStatus, c as PublishBatchEntry, d as PublishBatchFailureEntry, e as PublishBatchFailureError, h as PublishBatchResultEntry, i as PublishBatchSuccessEntry, r as RecordScheme, s as RecordSignature, t as RecordStatus, S as Signer, w as StorageTarget, x as SupportedHashAlg, U as UploadEntry, z as UploadSuccessEntry } from '../types-DGsZTMuZ.js';
|
|
4
4
|
import { g as VerifyReport } from '../types-B8Q3gW54.js';
|
|
5
5
|
import '../fetch-outbound-BT5-NiYN.js';
|
|
6
6
|
|
|
@@ -91,7 +91,7 @@ declare class PoeNamespace {
|
|
|
91
91
|
* publish time against the locked price snapshot.
|
|
92
92
|
*
|
|
93
93
|
* On HTTP-level failure (auth, rate limit, malformed request) this throws
|
|
94
|
-
* a typed `
|
|
94
|
+
* a typed `Label309HttpError` subclass. Per-file failures inside a 200
|
|
95
95
|
* response are NOT thrown by `uploads()` itself — the response body is
|
|
96
96
|
* returned verbatim so the caller can decide how to react. The
|
|
97
97
|
* higher-level helpers (`publishSealed`, `publishMerkle`) treat any failed
|
|
@@ -119,7 +119,7 @@ declare class PoeNamespace {
|
|
|
119
119
|
publishBatch(input: PublishBatchInput): Promise<PublishBatchResponse>;
|
|
120
120
|
/**
|
|
121
121
|
* High-level hash-only publish: hash the supplied content, build a
|
|
122
|
-
* single-item
|
|
122
|
+
* single-item Label 309 record, optionally sign it with the caller-supplied
|
|
123
123
|
* signer, and submit. No Arweave, no storage round-trip — anchors the
|
|
124
124
|
* digest only.
|
|
125
125
|
*/
|
|
@@ -133,7 +133,7 @@ declare class PoeNamespace {
|
|
|
133
133
|
/**
|
|
134
134
|
* Sealed-PoE: encrypt the supplied content to the recipient X25519 public
|
|
135
135
|
* keys (age-style sealed envelope), upload the ciphertext to Arweave via
|
|
136
|
-
* /uploads, build a
|
|
136
|
+
* /uploads, build a Label 309 record with the resulting `ar://` URI, sign
|
|
137
137
|
* it (optional), and submit via /publish.
|
|
138
138
|
*
|
|
139
139
|
* The sender SHOULD include their own X25519 public key in `recipients`
|
|
@@ -183,7 +183,7 @@ declare class RecordsNamespace {
|
|
|
183
183
|
*/
|
|
184
184
|
get(txHash: string): Promise<RecordResource>;
|
|
185
185
|
/**
|
|
186
|
-
* Run the canonical
|
|
186
|
+
* Run the canonical Label 309 verifier against the record at `txHash`.
|
|
187
187
|
* Returns the same `VerifyReport` shape the standalone verifier emits —
|
|
188
188
|
* `VerifyReport` IS the wire body of this endpoint, with no transformer in
|
|
189
189
|
* between.
|
|
@@ -195,12 +195,12 @@ declare class RecordsNamespace {
|
|
|
195
195
|
verify(txHash: string, input?: PoeVerifyInput): Promise<VerifyReport>;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
declare class
|
|
198
|
+
declare class Label309Client {
|
|
199
199
|
readonly poe: PoeNamespace;
|
|
200
200
|
readonly records: RecordsNamespace;
|
|
201
201
|
readonly account: AccountNamespace;
|
|
202
202
|
/**
|
|
203
|
-
* Construct a client against a
|
|
203
|
+
* Construct a client against a Label 309 gateway.
|
|
204
204
|
*
|
|
205
205
|
* `config.baseUrl` is required — there is no default deployment. The
|
|
206
206
|
* `config.apiKey`, when supplied, is an opaque bearer token sent verbatim as
|
|
@@ -210,7 +210,7 @@ declare class Cip309Client {
|
|
|
210
210
|
* via `client.poe.quote(...)` first; the resulting `quote_id` is consumed by
|
|
211
211
|
* the publish call.
|
|
212
212
|
*/
|
|
213
|
-
constructor(config:
|
|
213
|
+
constructor(config: Label309ClientConfig);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
declare class PublishError extends Error {
|
|
@@ -236,7 +236,7 @@ interface ProblemErrorEntry {
|
|
|
236
236
|
readonly detail: string;
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
|
-
* RFC 7807 `application/problem+json` document as emitted by every
|
|
239
|
+
* RFC 7807 `application/problem+json` document as emitted by every Label 309
|
|
240
240
|
* gateway `/api/v1/*` route.
|
|
241
241
|
*
|
|
242
242
|
* Canonical fields (`type`, `title`, `status`, `detail`, `code`, `trace_id`)
|
|
@@ -244,7 +244,7 @@ interface ProblemErrorEntry {
|
|
|
244
244
|
* `instance` is optional per RFC 7807 §3.1.
|
|
245
245
|
*
|
|
246
246
|
* Additional top-level fields are RFC 7807 §3.2 extension members and are
|
|
247
|
-
* preserved verbatim on `
|
|
247
|
+
* preserved verbatim on `Label309HttpError.extensions`.
|
|
248
248
|
*/
|
|
249
249
|
interface ProblemDetails {
|
|
250
250
|
readonly type: string;
|
|
@@ -258,7 +258,7 @@ interface ProblemDetails {
|
|
|
258
258
|
/** RFC 7807 §3.2 extension members. */
|
|
259
259
|
readonly [extension: string]: unknown;
|
|
260
260
|
}
|
|
261
|
-
interface
|
|
261
|
+
interface Label309HttpErrorInit {
|
|
262
262
|
/** The verbatim problem document. */
|
|
263
263
|
readonly problem: ProblemDetails;
|
|
264
264
|
/** Pre-split extension members. Computed from `problem` when omitted. */
|
|
@@ -279,7 +279,7 @@ interface Cip309HttpErrorInit {
|
|
|
279
279
|
* - `instanceof <SpecificError>` — see the subclasses re-exported from
|
|
280
280
|
* `@cardanowall/sdk-ts`
|
|
281
281
|
*/
|
|
282
|
-
declare class
|
|
282
|
+
declare class Label309HttpError extends Error {
|
|
283
283
|
readonly problem: ProblemDetails;
|
|
284
284
|
readonly code: string;
|
|
285
285
|
readonly httpStatus: number;
|
|
@@ -292,25 +292,25 @@ declare class Cip309HttpError extends Error {
|
|
|
292
292
|
readonly extensions: Record<string, unknown>;
|
|
293
293
|
readonly requestId: string;
|
|
294
294
|
readonly retryAfterSeconds: number | undefined;
|
|
295
|
-
constructor(init:
|
|
295
|
+
constructor(init: Label309HttpErrorInit);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
declare class BatchEmptyError extends
|
|
299
|
-
constructor(init:
|
|
298
|
+
declare class BatchEmptyError extends Label309HttpError {
|
|
299
|
+
constructor(init: Label309HttpErrorInit);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
declare class BatchTooLargeError extends
|
|
302
|
+
declare class BatchTooLargeError extends Label309HttpError {
|
|
303
303
|
readonly max: number | undefined;
|
|
304
304
|
readonly got: number | undefined;
|
|
305
|
-
constructor(init:
|
|
305
|
+
constructor(init: Label309HttpErrorInit);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
declare class ForbiddenError extends
|
|
309
|
-
constructor(init:
|
|
308
|
+
declare class ForbiddenError extends Label309HttpError {
|
|
309
|
+
constructor(init: Label309HttpErrorInit);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
declare class IdempotencyConflictError extends
|
|
313
|
-
constructor(init:
|
|
312
|
+
declare class IdempotencyConflictError extends Label309HttpError {
|
|
313
|
+
constructor(init: Label309HttpErrorInit);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
declare class InvalidClientConfigError extends Error {
|
|
@@ -318,70 +318,70 @@ declare class InvalidClientConfigError extends Error {
|
|
|
318
318
|
constructor(message: string);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
declare class InsufficientFundsError extends
|
|
321
|
+
declare class InsufficientFundsError extends Label309HttpError {
|
|
322
322
|
readonly balanceUsdMicros: bigint | undefined;
|
|
323
323
|
readonly requiredUsdMicros: bigint | undefined;
|
|
324
324
|
readonly topUpUrl: string | undefined;
|
|
325
|
-
constructor(init:
|
|
325
|
+
constructor(init: Label309HttpErrorInit);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
declare class InsufficientScopeError extends
|
|
328
|
+
declare class InsufficientScopeError extends Label309HttpError {
|
|
329
329
|
readonly requiredScopes: ReadonlyArray<string>;
|
|
330
330
|
readonly grantedScopes: ReadonlyArray<string>;
|
|
331
|
-
constructor(init:
|
|
331
|
+
constructor(init: Label309HttpErrorInit);
|
|
332
332
|
/** Convenience for the single-scope case; first entry of `requiredScopes`. */
|
|
333
333
|
get requiredScope(): string | undefined;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
declare class InternalServerError extends
|
|
337
|
-
constructor(init:
|
|
336
|
+
declare class InternalServerError extends Label309HttpError {
|
|
337
|
+
constructor(init: Label309HttpErrorInit);
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
declare class InvalidBodyError extends
|
|
341
|
-
constructor(init:
|
|
340
|
+
declare class InvalidBodyError extends Label309HttpError {
|
|
341
|
+
constructor(init: Label309HttpErrorInit);
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
declare class MalformedCborError extends
|
|
345
|
-
constructor(init:
|
|
344
|
+
declare class MalformedCborError extends Label309HttpError {
|
|
345
|
+
constructor(init: Label309HttpErrorInit);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
declare class NotFoundError extends
|
|
349
|
-
constructor(init:
|
|
348
|
+
declare class NotFoundError extends Label309HttpError {
|
|
349
|
+
constructor(init: Label309HttpErrorInit);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
declare class QuoteAlreadyConsumedError extends
|
|
352
|
+
declare class QuoteAlreadyConsumedError extends Label309HttpError {
|
|
353
353
|
readonly quoteId: string | undefined;
|
|
354
|
-
constructor(init:
|
|
354
|
+
constructor(init: Label309HttpErrorInit);
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
declare class QuoteExpiredError extends
|
|
357
|
+
declare class QuoteExpiredError extends Label309HttpError {
|
|
358
358
|
readonly quoteId: string | undefined;
|
|
359
|
-
constructor(init:
|
|
359
|
+
constructor(init: Label309HttpErrorInit);
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
-
declare class QuoteNotFoundError extends
|
|
362
|
+
declare class QuoteNotFoundError extends Label309HttpError {
|
|
363
363
|
readonly quoteId: string | undefined;
|
|
364
|
-
constructor(init:
|
|
364
|
+
constructor(init: Label309HttpErrorInit);
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
declare class RateLimitedError extends
|
|
368
|
-
constructor(init:
|
|
367
|
+
declare class RateLimitedError extends Label309HttpError {
|
|
368
|
+
constructor(init: Label309HttpErrorInit);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
declare class RecordNotFoundError extends
|
|
372
|
-
constructor(init:
|
|
371
|
+
declare class RecordNotFoundError extends Label309HttpError {
|
|
372
|
+
constructor(init: Label309HttpErrorInit);
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
declare class ServiceUnavailableError extends
|
|
376
|
-
constructor(init:
|
|
375
|
+
declare class ServiceUnavailableError extends Label309HttpError {
|
|
376
|
+
constructor(init: Label309HttpErrorInit);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
declare class UnauthorizedError extends
|
|
380
|
-
constructor(init:
|
|
379
|
+
declare class UnauthorizedError extends Label309HttpError {
|
|
380
|
+
constructor(init: Label309HttpErrorInit);
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
declare class ValidationFailedError extends
|
|
384
|
-
constructor(init:
|
|
383
|
+
declare class ValidationFailedError extends Label309HttpError {
|
|
384
|
+
constructor(init: Label309HttpErrorInit);
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
interface ParseHttpErrorArgs {
|
|
@@ -392,6 +392,6 @@ interface ParseHttpErrorArgs {
|
|
|
392
392
|
/** `Retry-After` header from the response, parsed as integer seconds. */
|
|
393
393
|
readonly retryAfterSeconds?: number | undefined;
|
|
394
394
|
}
|
|
395
|
-
declare function parseHttpError(args: ParseHttpErrorArgs):
|
|
395
|
+
declare function parseHttpError(args: ParseHttpErrorArgs): Label309HttpError;
|
|
396
396
|
|
|
397
|
-
export { AccountBalance, AccountNamespace, type AssembleCoseSign1Args, type AssembleCoseSign1Result, BatchEmptyError, BatchTooLargeError,
|
|
397
|
+
export { AccountBalance, AccountNamespace, type AssembleCoseSign1Args, type AssembleCoseSign1Result, BatchEmptyError, BatchTooLargeError, FetchImpl, ForbiddenError, IdempotencyConflictError, InsufficientFundsError, InsufficientScopeError, InternalServerError, InvalidBodyError, InvalidClientConfigError, Label309Client, Label309ClientConfig, Label309HttpError, type Label309HttpErrorInit, MalformedCborError, NotFoundError, OffHostSignError, type OffHostSignErrorCode, PartialUploadError, PoeNamespace, PoeVerifyInput, type PrepareSigStructureArgs, type PrepareSigStructureHashedResult, type PrepareSigStructureResult, type ProblemDetails, type ProblemErrorEntry, PublishBatchInput, PublishBatchResponse, PublishContentInput, PublishError, PublishInput, PublishMerkleInput, PublishMerkleResponse, PublishPrehashedInput, PublishResponse, PublishSealedInput, QuoteAlreadyConsumedError, QuoteExpiredError, QuoteInput, QuoteNotFoundError, QuoteResponse, RateLimitedError, RecordNotFoundError, RecordResource, RecordsListInput, RecordsListResponse, RecordsNamespace, ServiceUnavailableError, UnauthorizedError, UploadFailureEntry, UploadsInput, UploadsResponse, ValidationFailedError, assembleCoseSign1, assembleCoseSign1Hashed, buildToSign, parseHttpError, prepareSigStructure, prepareSigStructureHashed };
|