@seedprotocol/arweave 0.7.6-next.920.gdd0b533 → 0.7.6-next.957.g6bb7768
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/gateway/transactionStatus.d.ts +21 -0
- package/dist/gateway/transactionStatus.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +82 -480
- package/dist/index.js.map +1 -1
- package/dist/node/ArweaveClient.d.ts.map +1 -1
- package/dist/node.js +25 -43
- package/dist/node.js.map +1 -1
- package/dist/transactionStatus-BpYIaQyY.js +1021 -0
- package/dist/transactionStatus-BpYIaQyY.js.map +1 -0
- package/package.json +1 -1
- package/dist/queries-t-LwBKFl.js +0 -581
- package/dist/queries-t-LwBKFl.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TransactionStatus } from '../types/arweave.js';
|
|
2
|
+
/** Per-gateway timeout for a status check. A gateway can take minutes on an id it doesn't have. */
|
|
3
|
+
export declare const DEFAULT_TRANSACTION_STATUS_TIMEOUT_MS = 10000;
|
|
4
|
+
/** Time budget for a status check across all gateways. */
|
|
5
|
+
export declare const DEFAULT_TRANSACTION_STATUS_TOTAL_TIMEOUT_MS = 20000;
|
|
6
|
+
export type TransactionStatusFetchOptions = {
|
|
7
|
+
timeoutMs?: number;
|
|
8
|
+
totalTimeoutMs?: number;
|
|
9
|
+
/** Base URLs to try in order. Defaults to {@link getArweaveReadBaseUrls}. */
|
|
10
|
+
baseUrls?: readonly string[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* HTTP status of `GET {gateway}/{id}`, trying read gateways in order
|
|
14
|
+
* ({@link getArweaveReadBaseUrls}: preferred, then the configured host, then public fallbacks; only
|
|
15
|
+
* the proxy or sidecar when one is the active path). A gateway's 2xx-4xx answer is returned as is
|
|
16
|
+
* (a 404 isn't retried elsewhere). A timeout, network error, 5xx or 429 moves on to the next
|
|
17
|
+
* gateway, and gateways whose circuit is open are skipped. When none answers within the total
|
|
18
|
+
* budget the status is 504 if the last attempt timed out, otherwise that attempt's status.
|
|
19
|
+
*/
|
|
20
|
+
export declare function fetchTransactionStatusAcrossGateways(transactionId: string, options?: TransactionStatusFetchOptions): Promise<TransactionStatus>;
|
|
21
|
+
//# sourceMappingURL=transactionStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactionStatus.d.ts","sourceRoot":"","sources":["../../src/gateway/transactionStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAQ5D,mGAAmG;AACnG,eAAO,MAAM,qCAAqC,QAAS,CAAA;AAE3D,0DAA0D;AAC1D,eAAO,MAAM,2CAA2C,QAAS,CAAA;AAEjE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7B,CAAA;AA4BD;;;;;;;GAOG;AACH,wBAAsB,oCAAoC,CACxD,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,iBAAiB,CAAC,CAuB5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,5 +20,6 @@ export * from './gateway/gatewayCircuitBreaker.js';
|
|
|
20
20
|
export * from './gateway/resolveSeedGatewayEndpoints.js';
|
|
21
21
|
export * from './gateway/seedGatewayConfig.js';
|
|
22
22
|
export * from './gateway/readBaseUrls.js';
|
|
23
|
+
export * from './gateway/transactionStatus.js';
|
|
23
24
|
export * from './content/arweaveContent.js';
|
|
24
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index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