@kadi.build/deploy-ability 0.0.1
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 +523 -0
- package/dist/constants.d.ts +82 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +82 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors/certificate-error.d.ts +95 -0
- package/dist/errors/certificate-error.d.ts.map +1 -0
- package/dist/errors/certificate-error.js +111 -0
- package/dist/errors/certificate-error.js.map +1 -0
- package/dist/errors/deployment-error.d.ts +122 -0
- package/dist/errors/deployment-error.d.ts.map +1 -0
- package/dist/errors/deployment-error.js +185 -0
- package/dist/errors/deployment-error.js.map +1 -0
- package/dist/errors/index.d.ts +13 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +18 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/profile-error.d.ts +106 -0
- package/dist/errors/profile-error.d.ts.map +1 -0
- package/dist/errors/profile-error.js +127 -0
- package/dist/errors/profile-error.js.map +1 -0
- package/dist/errors/provider-error.d.ts +104 -0
- package/dist/errors/provider-error.d.ts.map +1 -0
- package/dist/errors/provider-error.js +120 -0
- package/dist/errors/provider-error.js.map +1 -0
- package/dist/errors/wallet-error.d.ts +131 -0
- package/dist/errors/wallet-error.d.ts.map +1 -0
- package/dist/errors/wallet-error.js +154 -0
- package/dist/errors/wallet-error.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/targets/akash/bid-selectors.d.ts +251 -0
- package/dist/targets/akash/bid-selectors.d.ts.map +1 -0
- package/dist/targets/akash/bid-selectors.js +322 -0
- package/dist/targets/akash/bid-selectors.js.map +1 -0
- package/dist/targets/akash/bid-types.d.ts +297 -0
- package/dist/targets/akash/bid-types.d.ts.map +1 -0
- package/dist/targets/akash/bid-types.js +89 -0
- package/dist/targets/akash/bid-types.js.map +1 -0
- package/dist/targets/akash/blockchain-client.d.ts +577 -0
- package/dist/targets/akash/blockchain-client.d.ts.map +1 -0
- package/dist/targets/akash/blockchain-client.js +803 -0
- package/dist/targets/akash/blockchain-client.js.map +1 -0
- package/dist/targets/akash/certificate-manager.d.ts +228 -0
- package/dist/targets/akash/certificate-manager.d.ts.map +1 -0
- package/dist/targets/akash/certificate-manager.js +395 -0
- package/dist/targets/akash/certificate-manager.js.map +1 -0
- package/dist/targets/akash/constants.d.ts +231 -0
- package/dist/targets/akash/constants.d.ts.map +1 -0
- package/dist/targets/akash/constants.js +225 -0
- package/dist/targets/akash/constants.js.map +1 -0
- package/dist/targets/akash/deployer.d.ts +136 -0
- package/dist/targets/akash/deployer.d.ts.map +1 -0
- package/dist/targets/akash/deployer.js +599 -0
- package/dist/targets/akash/deployer.js.map +1 -0
- package/dist/targets/akash/environment.d.ts +241 -0
- package/dist/targets/akash/environment.d.ts.map +1 -0
- package/dist/targets/akash/environment.js +245 -0
- package/dist/targets/akash/environment.js.map +1 -0
- package/dist/targets/akash/index.d.ts +1113 -0
- package/dist/targets/akash/index.d.ts.map +1 -0
- package/dist/targets/akash/index.js +909 -0
- package/dist/targets/akash/index.js.map +1 -0
- package/dist/targets/akash/lease-monitor.d.ts +51 -0
- package/dist/targets/akash/lease-monitor.d.ts.map +1 -0
- package/dist/targets/akash/lease-monitor.js +110 -0
- package/dist/targets/akash/lease-monitor.js.map +1 -0
- package/dist/targets/akash/logs.d.ts +71 -0
- package/dist/targets/akash/logs.d.ts.map +1 -0
- package/dist/targets/akash/logs.js +311 -0
- package/dist/targets/akash/logs.js.map +1 -0
- package/dist/targets/akash/logs.types.d.ts +102 -0
- package/dist/targets/akash/logs.types.d.ts.map +1 -0
- package/dist/targets/akash/logs.types.js +9 -0
- package/dist/targets/akash/logs.types.js.map +1 -0
- package/dist/targets/akash/pricing.d.ts +247 -0
- package/dist/targets/akash/pricing.d.ts.map +1 -0
- package/dist/targets/akash/pricing.js +246 -0
- package/dist/targets/akash/pricing.js.map +1 -0
- package/dist/targets/akash/provider-client.d.ts +114 -0
- package/dist/targets/akash/provider-client.d.ts.map +1 -0
- package/dist/targets/akash/provider-client.js +318 -0
- package/dist/targets/akash/provider-client.js.map +1 -0
- package/dist/targets/akash/provider-metadata.d.ts +228 -0
- package/dist/targets/akash/provider-metadata.d.ts.map +1 -0
- package/dist/targets/akash/provider-metadata.js +14 -0
- package/dist/targets/akash/provider-metadata.js.map +1 -0
- package/dist/targets/akash/provider-service.d.ts +133 -0
- package/dist/targets/akash/provider-service.d.ts.map +1 -0
- package/dist/targets/akash/provider-service.js +391 -0
- package/dist/targets/akash/provider-service.js.map +1 -0
- package/dist/targets/akash/query-client.d.ts +125 -0
- package/dist/targets/akash/query-client.d.ts.map +1 -0
- package/dist/targets/akash/query-client.js +332 -0
- package/dist/targets/akash/query-client.js.map +1 -0
- package/dist/targets/akash/sdl-generator.d.ts +31 -0
- package/dist/targets/akash/sdl-generator.d.ts.map +1 -0
- package/dist/targets/akash/sdl-generator.js +279 -0
- package/dist/targets/akash/sdl-generator.js.map +1 -0
- package/dist/targets/akash/types.d.ts +285 -0
- package/dist/targets/akash/types.d.ts.map +1 -0
- package/dist/targets/akash/types.js +54 -0
- package/dist/targets/akash/types.js.map +1 -0
- package/dist/targets/akash/wallet-manager.d.ts +526 -0
- package/dist/targets/akash/wallet-manager.d.ts.map +1 -0
- package/dist/targets/akash/wallet-manager.js +953 -0
- package/dist/targets/akash/wallet-manager.js.map +1 -0
- package/dist/targets/local/compose-generator.d.ts +244 -0
- package/dist/targets/local/compose-generator.d.ts.map +1 -0
- package/dist/targets/local/compose-generator.js +324 -0
- package/dist/targets/local/compose-generator.js.map +1 -0
- package/dist/targets/local/deployer.d.ts +82 -0
- package/dist/targets/local/deployer.d.ts.map +1 -0
- package/dist/targets/local/deployer.js +367 -0
- package/dist/targets/local/deployer.js.map +1 -0
- package/dist/targets/local/engine-manager.d.ts +155 -0
- package/dist/targets/local/engine-manager.d.ts.map +1 -0
- package/dist/targets/local/engine-manager.js +250 -0
- package/dist/targets/local/engine-manager.js.map +1 -0
- package/dist/targets/local/index.d.ts +40 -0
- package/dist/targets/local/index.d.ts.map +1 -0
- package/dist/targets/local/index.js +43 -0
- package/dist/targets/local/index.js.map +1 -0
- package/dist/targets/local/network-manager.d.ts +160 -0
- package/dist/targets/local/network-manager.d.ts.map +1 -0
- package/dist/targets/local/network-manager.js +337 -0
- package/dist/targets/local/network-manager.js.map +1 -0
- package/dist/targets/local/types.d.ts +327 -0
- package/dist/targets/local/types.d.ts.map +1 -0
- package/dist/targets/local/types.js +9 -0
- package/dist/targets/local/types.js.map +1 -0
- package/dist/types/common.d.ts +585 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +13 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/options.d.ts +329 -0
- package/dist/types/options.d.ts.map +1 -0
- package/dist/types/options.js +10 -0
- package/dist/types/options.js.map +1 -0
- package/dist/types/profiles.d.ts +329 -0
- package/dist/types/profiles.d.ts.map +1 -0
- package/dist/types/profiles.js +27 -0
- package/dist/types/profiles.js.map +1 -0
- package/dist/types/results.d.ts +443 -0
- package/dist/types/results.d.ts.map +1 -0
- package/dist/types/results.js +64 -0
- package/dist/types/results.js.map +1 -0
- package/dist/types/validators.d.ts +118 -0
- package/dist/types/validators.d.ts.map +1 -0
- package/dist/types/validators.js +198 -0
- package/dist/types/validators.js.map +1 -0
- package/dist/utils/command-runner.d.ts +128 -0
- package/dist/utils/command-runner.d.ts.map +1 -0
- package/dist/utils/command-runner.js +210 -0
- package/dist/utils/command-runner.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +10 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +68 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +93 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/profile-loader.d.ts +76 -0
- package/dist/utils/profile-loader.d.ts.map +1 -0
- package/dist/utils/profile-loader.js +194 -0
- package/dist/utils/profile-loader.js.map +1 -0
- package/dist/utils/registry/index.d.ts +27 -0
- package/dist/utils/registry/index.d.ts.map +1 -0
- package/dist/utils/registry/index.js +29 -0
- package/dist/utils/registry/index.js.map +1 -0
- package/dist/utils/registry/manager.d.ts +319 -0
- package/dist/utils/registry/manager.d.ts.map +1 -0
- package/dist/utils/registry/manager.js +671 -0
- package/dist/utils/registry/manager.js.map +1 -0
- package/dist/utils/registry/setup.d.ts +135 -0
- package/dist/utils/registry/setup.d.ts.map +1 -0
- package/dist/utils/registry/setup.js +207 -0
- package/dist/utils/registry/setup.js.map +1 -0
- package/dist/utils/registry/transformer.d.ts +92 -0
- package/dist/utils/registry/transformer.d.ts.map +1 -0
- package/dist/utils/registry/transformer.js +131 -0
- package/dist/utils/registry/transformer.js.map +1 -0
- package/dist/utils/registry/types.d.ts +241 -0
- package/dist/utils/registry/types.d.ts.map +1 -0
- package/dist/utils/registry/types.js +10 -0
- package/dist/utils/registry/types.js.map +1 -0
- package/docs/EXAMPLES.md +293 -0
- package/docs/PLACEMENT.md +433 -0
- package/docs/STORAGE.md +318 -0
- package/docs/building-provider-reliability-tracker.md +2581 -0
- package/package.json +109 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Akash Provider Client Utilities
|
|
3
|
+
*
|
|
4
|
+
* This module contains helper functions for interacting with Akash providers
|
|
5
|
+
* over HTTPS after a lease has been created on-chain. Responsibilities include:
|
|
6
|
+
*
|
|
7
|
+
* 1. Delivering the deployment manifest to the selected provider via mTLS
|
|
8
|
+
* 2. Querying provider status endpoints to monitor container readiness
|
|
9
|
+
*
|
|
10
|
+
* Design principles:
|
|
11
|
+
* - All operations return Result<T, DeploymentError> for explicit error handling
|
|
12
|
+
* - No `any` usage – every response is normalised into typed objects
|
|
13
|
+
* - Verbose comments explaining each stage for maintainability
|
|
14
|
+
*
|
|
15
|
+
* @module targets/akash/provider-client
|
|
16
|
+
*/
|
|
17
|
+
import type { Result } from '../../types/index.js';
|
|
18
|
+
import { ProviderError } from '../../errors/index.js';
|
|
19
|
+
import type { AkashProviderTlsCertificate } from './types.js';
|
|
20
|
+
/**
|
|
21
|
+
* Minimal lease identifier required for provider API operations
|
|
22
|
+
*/
|
|
23
|
+
export interface LeaseReference {
|
|
24
|
+
/** Deployment sequence number */
|
|
25
|
+
readonly dseq: string | number;
|
|
26
|
+
/** Group sequence number */
|
|
27
|
+
readonly gseq: number;
|
|
28
|
+
/** Order sequence number */
|
|
29
|
+
readonly oseq: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Options for manifest delivery
|
|
33
|
+
*/
|
|
34
|
+
export interface ManifestDeliveryOptions {
|
|
35
|
+
/** Provider HTTPS endpoint (e.g., https://provider.example.com:8443) */
|
|
36
|
+
readonly providerUri: string;
|
|
37
|
+
/** Lease reference identifying the deployment */
|
|
38
|
+
readonly lease: LeaseReference;
|
|
39
|
+
/** SDL manifest encoded as JSON (sorted output from akashjs) */
|
|
40
|
+
readonly manifest: string;
|
|
41
|
+
/** Certificate bundle for mutual TLS authentication */
|
|
42
|
+
readonly certificate: AkashProviderTlsCertificate;
|
|
43
|
+
/** Request timeout in milliseconds (default: 30s) */
|
|
44
|
+
readonly timeoutMs?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Status information for a single service reported by the provider
|
|
48
|
+
*/
|
|
49
|
+
export interface ProviderServiceStatus {
|
|
50
|
+
readonly name: string;
|
|
51
|
+
readonly available: number;
|
|
52
|
+
readonly total: number;
|
|
53
|
+
readonly ready: number;
|
|
54
|
+
readonly uris: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Forwarded port definition (useful when provider maps ports externally)
|
|
58
|
+
*/
|
|
59
|
+
export interface ProviderForwardedPort {
|
|
60
|
+
readonly port: number;
|
|
61
|
+
readonly externalPort: number;
|
|
62
|
+
readonly host: string;
|
|
63
|
+
readonly available: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Assigned IP metadata reported by provider
|
|
67
|
+
*/
|
|
68
|
+
export interface ProviderAssignedIp {
|
|
69
|
+
readonly ip: string;
|
|
70
|
+
readonly port: number;
|
|
71
|
+
readonly externalPort: number;
|
|
72
|
+
readonly protocol: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Normalised provider lease status response
|
|
76
|
+
*/
|
|
77
|
+
export interface ProviderLeaseStatus {
|
|
78
|
+
readonly services: Readonly<Record<string, ProviderServiceStatus>>;
|
|
79
|
+
readonly forwardedPorts?: Readonly<Record<string, readonly ProviderForwardedPort[]>>;
|
|
80
|
+
readonly assignedIps?: Readonly<Record<string, readonly ProviderAssignedIp[]>>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Options for querying provider container status
|
|
84
|
+
*/
|
|
85
|
+
export interface ProviderStatusOptions {
|
|
86
|
+
readonly providerUri: string;
|
|
87
|
+
readonly lease: LeaseReference;
|
|
88
|
+
readonly certificate: AkashProviderTlsCertificate;
|
|
89
|
+
readonly timeoutMs?: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Sends the deployment manifest to the provider over mTLS.
|
|
93
|
+
*
|
|
94
|
+
* The provider uses this manifest to start containers for the newly created lease.
|
|
95
|
+
* The workflow mirrors the steps outlined in the Akash Console deployment flow.
|
|
96
|
+
*
|
|
97
|
+
* Steps performed:
|
|
98
|
+
* 1. Validate and normalise the provider URI (must be HTTPS)
|
|
99
|
+
* 2. Construct the manifest delivery path `/deployment/{dseq}/manifest`
|
|
100
|
+
* 3. Send a PUT request with the manifest JSON using mutual TLS authentication
|
|
101
|
+
* 4. Resolve with a success Result when the provider accepts the manifest
|
|
102
|
+
*
|
|
103
|
+
* @param options - Manifest delivery configuration
|
|
104
|
+
* @returns Result signalling success or a ProviderError on failure
|
|
105
|
+
*/
|
|
106
|
+
export declare function sendManifestToProvider(options: ManifestDeliveryOptions): Promise<Result<void, ProviderError>>;
|
|
107
|
+
/**
|
|
108
|
+
* Queries the provider status endpoint for container readiness information.
|
|
109
|
+
*
|
|
110
|
+
* @param options - Provider status request configuration
|
|
111
|
+
* @returns Result containing normalised provider status data
|
|
112
|
+
*/
|
|
113
|
+
export declare function fetchProviderLeaseStatus(options: ProviderStatusOptions): Promise<Result<ProviderLeaseStatus, ProviderError>>;
|
|
114
|
+
//# sourceMappingURL=provider-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-client.d.ts","sourceRoot":"","sources":["../../../src/targets/akash/provider-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EACL,aAAa,EAId,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,2BAA2B,CAAC;I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7B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,2BAA2B,CAAC;IAClD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAyCD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CA4FtC;AAmKD;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC,CAmDrD"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Akash Provider Client Utilities
|
|
3
|
+
*
|
|
4
|
+
* This module contains helper functions for interacting with Akash providers
|
|
5
|
+
* over HTTPS after a lease has been created on-chain. Responsibilities include:
|
|
6
|
+
*
|
|
7
|
+
* 1. Delivering the deployment manifest to the selected provider via mTLS
|
|
8
|
+
* 2. Querying provider status endpoints to monitor container readiness
|
|
9
|
+
*
|
|
10
|
+
* Design principles:
|
|
11
|
+
* - All operations return Result<T, DeploymentError> for explicit error handling
|
|
12
|
+
* - No `any` usage – every response is normalised into typed objects
|
|
13
|
+
* - Verbose comments explaining each stage for maintainability
|
|
14
|
+
*
|
|
15
|
+
* @module targets/akash/provider-client
|
|
16
|
+
*/
|
|
17
|
+
import https from 'node:https';
|
|
18
|
+
import { URL } from 'node:url';
|
|
19
|
+
import axios from 'axios';
|
|
20
|
+
import { success, failure } from '../../types/index.js';
|
|
21
|
+
import { ProviderError, ProviderErrorCodes, providerUnreachableError, manifestRejectedError, } from '../../errors/index.js';
|
|
22
|
+
/**
|
|
23
|
+
* Normalises a provider URI string and ensures it uses HTTPS.
|
|
24
|
+
*/
|
|
25
|
+
function normaliseProviderUri(uri) {
|
|
26
|
+
const parsed = new URL(uri);
|
|
27
|
+
if (parsed.protocol !== 'https:') {
|
|
28
|
+
throw new ProviderError(`Provider URI must use HTTPS: ${uri}`, ProviderErrorCodes.PROVIDER_ERROR, { uri }, false, 'Ensure the provider URI begins with https://');
|
|
29
|
+
}
|
|
30
|
+
// Force trailing slash removal for consistent downstream concatenation
|
|
31
|
+
parsed.pathname = parsed.pathname.replace(/\/$/, '');
|
|
32
|
+
return parsed.toString();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Builds the HTTPS agent used for mutual TLS authentication with the provider.
|
|
36
|
+
*
|
|
37
|
+
* CRITICAL: Sets servername to empty string to disable SNI (Server Name Indication).
|
|
38
|
+
* Some providers use SNI to route requests, and when SNI contains a hostname, they
|
|
39
|
+
* route mTLS requests to a non-mTLS handler that returns 401 "unauthorized access".
|
|
40
|
+
* This matches Akash Console behavior and is required for compatibility with all providers.
|
|
41
|
+
*/
|
|
42
|
+
function createMtlsAgent(certificate) {
|
|
43
|
+
return new https.Agent({
|
|
44
|
+
cert: certificate.cert,
|
|
45
|
+
key: certificate.privateKey,
|
|
46
|
+
ca: certificate.chain,
|
|
47
|
+
rejectUnauthorized: false, // Providers often use self-signed certificates
|
|
48
|
+
servername: '', // Disable SNI for mTLS authentication (required by some providers)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Sends the deployment manifest to the provider over mTLS.
|
|
53
|
+
*
|
|
54
|
+
* The provider uses this manifest to start containers for the newly created lease.
|
|
55
|
+
* The workflow mirrors the steps outlined in the Akash Console deployment flow.
|
|
56
|
+
*
|
|
57
|
+
* Steps performed:
|
|
58
|
+
* 1. Validate and normalise the provider URI (must be HTTPS)
|
|
59
|
+
* 2. Construct the manifest delivery path `/deployment/{dseq}/manifest`
|
|
60
|
+
* 3. Send a PUT request with the manifest JSON using mutual TLS authentication
|
|
61
|
+
* 4. Resolve with a success Result when the provider accepts the manifest
|
|
62
|
+
*
|
|
63
|
+
* @param options - Manifest delivery configuration
|
|
64
|
+
* @returns Result signalling success or a ProviderError on failure
|
|
65
|
+
*/
|
|
66
|
+
export async function sendManifestToProvider(options) {
|
|
67
|
+
const { providerUri, lease, manifest, certificate, timeoutMs = 30_000, } = options;
|
|
68
|
+
let normalised;
|
|
69
|
+
try {
|
|
70
|
+
normalised = normaliseProviderUri(providerUri);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
return failure(error);
|
|
74
|
+
}
|
|
75
|
+
const parsed = new URL(normalised);
|
|
76
|
+
const path = `/deployment/${String(lease.dseq)}/manifest`;
|
|
77
|
+
const agent = createMtlsAgent(certificate);
|
|
78
|
+
return new Promise((resolve) => {
|
|
79
|
+
const request = https.request({
|
|
80
|
+
protocol: parsed.protocol,
|
|
81
|
+
hostname: parsed.hostname,
|
|
82
|
+
port: parsed.port || '8443',
|
|
83
|
+
method: 'PUT',
|
|
84
|
+
path,
|
|
85
|
+
headers: {
|
|
86
|
+
'Content-Type': 'application/json',
|
|
87
|
+
Accept: 'application/json',
|
|
88
|
+
'Content-Length': Buffer.byteLength(manifest, 'utf8'),
|
|
89
|
+
},
|
|
90
|
+
agent,
|
|
91
|
+
timeout: timeoutMs,
|
|
92
|
+
}, (response) => {
|
|
93
|
+
const statusCode = response.statusCode ?? 0;
|
|
94
|
+
// Fast-path success: provider accepted the manifest (200/202)
|
|
95
|
+
if (statusCode >= 200 && statusCode < 300) {
|
|
96
|
+
resolve(success(undefined));
|
|
97
|
+
response.resume();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
// Collect error body for diagnostics
|
|
101
|
+
const chunks = [];
|
|
102
|
+
response.on('data', (chunk) => chunks.push(Buffer.from(chunk)));
|
|
103
|
+
response.on('end', () => {
|
|
104
|
+
const body = Buffer.concat(chunks).toString('utf8');
|
|
105
|
+
if (statusCode === 400 || statusCode === 422) {
|
|
106
|
+
resolve(failure(manifestRejectedError(parsed.hostname, body.trim() || undefined)));
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
resolve(failure(new ProviderError(`Provider returned ${statusCode} while sending manifest`, ProviderErrorCodes.MANIFEST_SEND_FAILED, {
|
|
110
|
+
providerUri: normalised,
|
|
111
|
+
statusCode,
|
|
112
|
+
body: body.trim() || undefined,
|
|
113
|
+
}, true, 'Retry the deployment or choose another provider')));
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
request.on('timeout', () => {
|
|
118
|
+
request.destroy(providerUnreachableError(parsed.host, new Error('Manifest delivery timed out')));
|
|
119
|
+
});
|
|
120
|
+
request.on('error', (error) => {
|
|
121
|
+
// Network errors are wrapped as provider unreachable for caller clarity
|
|
122
|
+
resolve(failure(providerUnreachableError(parsed.host, error)));
|
|
123
|
+
});
|
|
124
|
+
request.write(manifest, 'utf8');
|
|
125
|
+
request.end();
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Builds the provider lease status endpoint URL.
|
|
130
|
+
*/
|
|
131
|
+
function buildLeaseStatusUrl(providerUri, lease) {
|
|
132
|
+
const base = new URL(providerUri);
|
|
133
|
+
base.pathname = `/lease/${String(lease.dseq)}/${lease.gseq}/${lease.oseq}/status`;
|
|
134
|
+
return base.toString();
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Normalises provider service status objects returned by the provider API.
|
|
138
|
+
*/
|
|
139
|
+
function normaliseServices(rawServices) {
|
|
140
|
+
if (!rawServices) {
|
|
141
|
+
return {};
|
|
142
|
+
}
|
|
143
|
+
const entries = [];
|
|
144
|
+
for (const [name, raw] of Object.entries(rawServices)) {
|
|
145
|
+
if (!raw || typeof raw !== 'object') {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const record = raw;
|
|
149
|
+
const available = normaliseNumber(record.available ?? record.available_replicas, 0);
|
|
150
|
+
const total = normaliseNumber(record.total ?? record.replicas, 0);
|
|
151
|
+
const ready = normaliseNumber(record.ready_replicas, available);
|
|
152
|
+
const uris = Array.isArray(record.uris)
|
|
153
|
+
? record.uris.filter((uri) => typeof uri === 'string')
|
|
154
|
+
: [];
|
|
155
|
+
entries.push([
|
|
156
|
+
name,
|
|
157
|
+
{
|
|
158
|
+
name,
|
|
159
|
+
available,
|
|
160
|
+
total,
|
|
161
|
+
ready,
|
|
162
|
+
uris,
|
|
163
|
+
},
|
|
164
|
+
]);
|
|
165
|
+
}
|
|
166
|
+
return Object.freeze(Object.fromEntries(entries));
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Normalises forwarded ports section of provider response.
|
|
170
|
+
*/
|
|
171
|
+
function normaliseForwardedPorts(raw) {
|
|
172
|
+
if (!raw) {
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
const entries = [];
|
|
176
|
+
for (const [service, value] of Object.entries(raw)) {
|
|
177
|
+
if (!Array.isArray(value)) {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
const ports = value
|
|
181
|
+
.map((item) => {
|
|
182
|
+
if (!item || typeof item !== 'object') {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
const record = item;
|
|
186
|
+
const port = normaliseNumber(record.port, 0);
|
|
187
|
+
const externalPort = normaliseNumber(record.externalPort, port);
|
|
188
|
+
const host = typeof record.host === 'string' ? record.host : '';
|
|
189
|
+
const available = normaliseNumber(record.available, 0);
|
|
190
|
+
if (!host) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
port,
|
|
195
|
+
externalPort,
|
|
196
|
+
host,
|
|
197
|
+
available,
|
|
198
|
+
};
|
|
199
|
+
})
|
|
200
|
+
.filter((value) => value !== null);
|
|
201
|
+
if (ports.length > 0) {
|
|
202
|
+
entries.push([service, Object.freeze(ports)]);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return entries.length > 0 ? Object.freeze(Object.fromEntries(entries)) : undefined;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Normalises assigned IPs section of provider response.
|
|
209
|
+
*/
|
|
210
|
+
function normaliseAssignedIps(raw) {
|
|
211
|
+
if (!raw) {
|
|
212
|
+
return undefined;
|
|
213
|
+
}
|
|
214
|
+
const entries = [];
|
|
215
|
+
for (const [service, value] of Object.entries(raw)) {
|
|
216
|
+
if (!Array.isArray(value)) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
const ips = value
|
|
220
|
+
.map((item) => {
|
|
221
|
+
if (!item || typeof item !== 'object') {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
const record = item;
|
|
225
|
+
const ip = typeof record.IP === 'string' ? record.IP : undefined;
|
|
226
|
+
if (!ip) {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
return {
|
|
230
|
+
ip,
|
|
231
|
+
port: normaliseNumber(record.Port, 0),
|
|
232
|
+
externalPort: normaliseNumber(record.ExternalPort, 0),
|
|
233
|
+
protocol: typeof record.Protocol === 'string' ? record.Protocol : 'TCP',
|
|
234
|
+
};
|
|
235
|
+
})
|
|
236
|
+
.filter((value) => value !== null);
|
|
237
|
+
if (ips.length > 0) {
|
|
238
|
+
entries.push([service, Object.freeze(ips)]);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return entries.length > 0 ? Object.freeze(Object.fromEntries(entries)) : undefined;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Converts various number representations into a safe integer with fallback.
|
|
245
|
+
*/
|
|
246
|
+
function normaliseNumber(value, fallback) {
|
|
247
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
248
|
+
return value;
|
|
249
|
+
}
|
|
250
|
+
if (typeof value === 'string') {
|
|
251
|
+
const parsed = Number.parseInt(value, 10);
|
|
252
|
+
if (Number.isFinite(parsed)) {
|
|
253
|
+
return parsed;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return fallback;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Queries the provider status endpoint for container readiness information.
|
|
260
|
+
*
|
|
261
|
+
* @param options - Provider status request configuration
|
|
262
|
+
* @returns Result containing normalised provider status data
|
|
263
|
+
*/
|
|
264
|
+
export async function fetchProviderLeaseStatus(options) {
|
|
265
|
+
const { providerUri, lease, certificate, timeoutMs = 10_000 } = options;
|
|
266
|
+
let normalised;
|
|
267
|
+
try {
|
|
268
|
+
normalised = normaliseProviderUri(providerUri);
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
return failure(error);
|
|
272
|
+
}
|
|
273
|
+
const statusUrl = buildLeaseStatusUrl(normalised, lease);
|
|
274
|
+
try {
|
|
275
|
+
const response = await axios.get(statusUrl, {
|
|
276
|
+
httpsAgent: createMtlsAgent(certificate),
|
|
277
|
+
timeout: timeoutMs,
|
|
278
|
+
headers: { Accept: 'application/json' },
|
|
279
|
+
transitional: { clarifyTimeoutError: true },
|
|
280
|
+
});
|
|
281
|
+
const data = response.data;
|
|
282
|
+
const services = normaliseServices(data?.services);
|
|
283
|
+
const forwardedPorts = normaliseForwardedPorts(data?.forwarded_ports);
|
|
284
|
+
const assignedIps = normaliseAssignedIps(data?.ips);
|
|
285
|
+
return success(Object.freeze({
|
|
286
|
+
services,
|
|
287
|
+
forwardedPorts,
|
|
288
|
+
assignedIps,
|
|
289
|
+
}));
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
// Axios wraps network errors into AxiosError, inspect to categorise
|
|
293
|
+
if (axios.isAxiosError(error)) {
|
|
294
|
+
return failure(handleAxiosError(error, normalised));
|
|
295
|
+
}
|
|
296
|
+
return failure(new ProviderError(`Failed to query provider status: ${error.message}`, ProviderErrorCodes.PROVIDER_STATUS_ERROR, { providerUri: normalised }, true, 'Retry in a few moments – providers may need time to start the deployment'));
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Maps Axios errors to ProviderError instances with helpful context.
|
|
301
|
+
*/
|
|
302
|
+
function handleAxiosError(error, providerUri) {
|
|
303
|
+
if (error.code === 'ECONNREFUSED' || error.code === 'ENOTFOUND') {
|
|
304
|
+
return providerUnreachableError(providerUri, error);
|
|
305
|
+
}
|
|
306
|
+
if (error.code === 'ETIMEDOUT' || error.message.includes('timeout')) {
|
|
307
|
+
return new ProviderError(`Provider ${providerUri} did not respond in time`, ProviderErrorCodes.PROVIDER_TIMEOUT, { providerUri }, true, 'The provider may be busy. Consider retrying the request.');
|
|
308
|
+
}
|
|
309
|
+
if (error.response) {
|
|
310
|
+
const status = error.response.status;
|
|
311
|
+
const body = typeof error.response.data === 'string'
|
|
312
|
+
? error.response.data
|
|
313
|
+
: JSON.stringify(error.response.data);
|
|
314
|
+
return new ProviderError(`Provider ${providerUri} returned ${status} when querying status`, ProviderErrorCodes.PROVIDER_STATUS_ERROR, { providerUri, statusCode: status, body }, true, 'Inspect the provider logs or retry with a different provider');
|
|
315
|
+
}
|
|
316
|
+
return new ProviderError(`Unknown provider error: ${error.message}`, ProviderErrorCodes.PROVIDER_STATUS_ERROR, { providerUri }, true, 'Retry the request or choose another provider', 'error', error);
|
|
317
|
+
}
|
|
318
|
+
//# sourceMappingURL=provider-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-client.js","sourceRoot":"","sources":["../../../src/targets/akash/provider-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAA0B,MAAM,OAAO,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAiF/B;;GAEG;AACH,SAAS,oBAAoB,CAAC,GAAW;IACvC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;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ash Network provider information including
|
|
5
|
+
* location, reliability metrics, and general provider details.
|
|
6
|
+
*
|
|
7
|
+
* These types are used to enrich bid information so developers can make
|
|
8
|
+
* informed decisions about which provider to choose based on uptime,
|
|
9
|
+
* location, audit status, and other factors.
|
|
10
|
+
*
|
|
11
|
+
* @module targets/akash/provider-metadata
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Geographic location information for a provider
|
|
15
|
+
*
|
|
16
|
+
* Provides detailed location data to help developers choose providers
|
|
17
|
+
* based on geographic proximity, regulatory requirements, or latency needs.
|
|
18
|
+
*
|
|
19
|
+
* Location data typically comes from IP geolocation services and may not
|
|
20
|
+
* always be 100% accurate, but is generally reliable for country/region.
|
|
21
|
+
*
|
|
22
|
+
* @example Provider in California, USA
|
|
23
|
+
* ```typescript
|
|
24
|
+
* {
|
|
25
|
+
* region: "California",
|
|
26
|
+
* regionCode: "CA",
|
|
27
|
+
* country: "United States",
|
|
28
|
+
* countryCode: "US",
|
|
29
|
+
* latitude: "37.7749",
|
|
30
|
+
* longitude: "-122.4194"
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export interface ProviderLocation {
|
|
35
|
+
/**
|
|
36
|
+
* Full name of the region/state
|
|
37
|
+
* @example "California", "Tokyo", "Bavaria"
|
|
38
|
+
*/
|
|
39
|
+
readonly region: string;
|
|
40
|
+
/**
|
|
41
|
+
* Short code for the region/state
|
|
42
|
+
* @example "CA", "13" (Tokyo), "BY" (Bavaria)
|
|
43
|
+
*/
|
|
44
|
+
readonly regionCode: string;
|
|
45
|
+
/**
|
|
46
|
+
* Full name of the country
|
|
47
|
+
* @example "United States", "Japan", "Germany"
|
|
48
|
+
*/
|
|
49
|
+
readonly country: string;
|
|
50
|
+
/**
|
|
51
|
+
* ISO 3166-1 alpha-2 country code
|
|
52
|
+
* @example "US", "JP", "DE"
|
|
53
|
+
*/
|
|
54
|
+
readonly countryCode: string;
|
|
55
|
+
/**
|
|
56
|
+
* Latitude coordinate (optional)
|
|
57
|
+
* @example "37.7749"
|
|
58
|
+
*/
|
|
59
|
+
readonly latitude?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Longitude coordinate (optional)
|
|
62
|
+
* @example "-122.4194"
|
|
63
|
+
*/
|
|
64
|
+
readonly longitude?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Provider reliability and uptime metrics
|
|
68
|
+
*
|
|
69
|
+
* Tracks provider availability over different time periods. Uptime values
|
|
70
|
+
* are percentages expressed as decimals (0.0 to 1.0).
|
|
71
|
+
*
|
|
72
|
+
* These metrics are calculated by the Akash indexer which periodically
|
|
73
|
+
* checks provider availability. A provider is considered "online" if its
|
|
74
|
+
* status endpoint responds successfully.
|
|
75
|
+
*
|
|
76
|
+
* **Important**: Not all providers may have reliability data, especially
|
|
77
|
+
* newly registered providers. Always check if reliability data exists
|
|
78
|
+
* before using it in selection logic.
|
|
79
|
+
*
|
|
80
|
+
* @example High reliability provider
|
|
81
|
+
* ```typescript
|
|
82
|
+
* {
|
|
83
|
+
* uptime1d: 1.0, // 100% uptime in last day
|
|
84
|
+
* uptime7d: 0.9987, // 99.87% uptime in last 7 days
|
|
85
|
+
* uptime30d: 0.9954, // 99.54% uptime in last 30 days
|
|
86
|
+
* isOnline: true,
|
|
87
|
+
* lastCheckDate: new Date("2025-10-15T10:30:00Z")
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export interface ProviderReliability {
|
|
92
|
+
/**
|
|
93
|
+
* Uptime percentage for the last 1 day
|
|
94
|
+
* Range: 0.0 (0%) to 1.0 (100%)
|
|
95
|
+
*/
|
|
96
|
+
readonly uptime1d: number;
|
|
97
|
+
/**
|
|
98
|
+
* Uptime percentage for the last 7 days
|
|
99
|
+
* Range: 0.0 (0%) to 1.0 (100%)
|
|
100
|
+
*/
|
|
101
|
+
readonly uptime7d: number;
|
|
102
|
+
/**
|
|
103
|
+
* Uptime percentage for the last 30 days
|
|
104
|
+
* Range: 0.0 (0%) to 1.0 (100%)
|
|
105
|
+
*/
|
|
106
|
+
readonly uptime30d: number;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the provider is currently online
|
|
109
|
+
*
|
|
110
|
+
* Based on the most recent status check. A provider is online if
|
|
111
|
+
* its status endpoint responded successfully to the last ping.
|
|
112
|
+
*/
|
|
113
|
+
readonly isOnline: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Timestamp of the last uptime check (optional)
|
|
116
|
+
*
|
|
117
|
+
* Useful for understanding how fresh the reliability data is.
|
|
118
|
+
*/
|
|
119
|
+
readonly lastCheckDate?: Date;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Complete provider information
|
|
123
|
+
*
|
|
124
|
+
* Aggregates all available information about an Akash provider including
|
|
125
|
+
* identity, location, reliability, and audit status.
|
|
126
|
+
*
|
|
127
|
+
* This is the primary interface for representing provider data throughout
|
|
128
|
+
* the deployment process. Not all fields will be present for all providers
|
|
129
|
+
* (e.g., some may not have location data, or may be too new to have
|
|
130
|
+
* reliability metrics).
|
|
131
|
+
*
|
|
132
|
+
* **Provider Auditing:**
|
|
133
|
+
* Audited providers have been verified by recognized community auditors
|
|
134
|
+
* (like Overclock Labs) to meet certain standards for hardware, uptime,
|
|
135
|
+
* and operational practices. Audited status generally indicates higher
|
|
136
|
+
* reliability but also potentially higher prices.
|
|
137
|
+
*
|
|
138
|
+
* @example Complete provider info
|
|
139
|
+
* ```typescript
|
|
140
|
+
* {
|
|
141
|
+
* owner: "akash1...",
|
|
142
|
+
* hostUri: "https://provider.europlots.com:8443",
|
|
143
|
+
* name: "Europlots Provider",
|
|
144
|
+
* email: "support@europlots.com",
|
|
145
|
+
* website: "https://europlots.com",
|
|
146
|
+
* isAudited: true,
|
|
147
|
+
* location: {
|
|
148
|
+
* region: "Frankfurt",
|
|
149
|
+
* regionCode: "HE",
|
|
150
|
+
* country: "Germany",
|
|
151
|
+
* countryCode: "DE"
|
|
152
|
+
* },
|
|
153
|
+
* reliability: {
|
|
154
|
+
* uptime1d: 1.0,
|
|
155
|
+
* uptime7d: 0.998,
|
|
156
|
+
* uptime30d: 0.995,
|
|
157
|
+
* isOnline: true
|
|
158
|
+
* },
|
|
159
|
+
* akashVersion: "0.6.0"
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
export interface ProviderInfo {
|
|
164
|
+
/**
|
|
165
|
+
* Provider's Akash account address (owner)
|
|
166
|
+
*
|
|
167
|
+
* This is the unique blockchain identifier for the provider.
|
|
168
|
+
* @example "akash1..."
|
|
169
|
+
*/
|
|
170
|
+
readonly owner: string;
|
|
171
|
+
/**
|
|
172
|
+
* Provider's API endpoint (host URI)
|
|
173
|
+
*
|
|
174
|
+
* This is the HTTPS endpoint where the provider's API is accessible.
|
|
175
|
+
* Used for sending manifests and querying deployment status.
|
|
176
|
+
* @example "https://provider.europlots.com:8443"
|
|
177
|
+
*/
|
|
178
|
+
readonly hostUri: string;
|
|
179
|
+
/**
|
|
180
|
+
* Human-readable provider name (optional)
|
|
181
|
+
*
|
|
182
|
+
* A friendly name for the provider, if registered.
|
|
183
|
+
* @example "Europlots Provider", "Akash Cloud Services"
|
|
184
|
+
*/
|
|
185
|
+
readonly name?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Provider contact email (optional)
|
|
188
|
+
* @example "support@provider.com"
|
|
189
|
+
*/
|
|
190
|
+
readonly email?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Provider website URL (optional)
|
|
193
|
+
* @example "https://provider.com"
|
|
194
|
+
*/
|
|
195
|
+
readonly website?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Whether the provider is audited by a recognized auditor
|
|
198
|
+
*
|
|
199
|
+
* Audited providers have been verified to meet community standards
|
|
200
|
+
* for hardware quality, uptime, and operational practices.
|
|
201
|
+
*/
|
|
202
|
+
readonly isAudited: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Geographic location information (optional)
|
|
205
|
+
*
|
|
206
|
+
* May not be available for all providers, especially those using VPNs
|
|
207
|
+
* or privacy-focused infrastructure.
|
|
208
|
+
*/
|
|
209
|
+
readonly location?: ProviderLocation;
|
|
210
|
+
/**
|
|
211
|
+
* Reliability and uptime metrics (optional)
|
|
212
|
+
*
|
|
213
|
+
* May not be available for newly registered providers or if the
|
|
214
|
+
* indexer hasn't collected enough data yet.
|
|
215
|
+
*/
|
|
216
|
+
readonly reliability?: ProviderReliability;
|
|
217
|
+
/**
|
|
218
|
+
* Akash provider software version (optional)
|
|
219
|
+
* @example "0.6.0", "0.5.5"
|
|
220
|
+
*/
|
|
221
|
+
readonly akashVersion?: string;
|
|
222
|
+
/**
|
|
223
|
+
* Cosmos SDK version the provider is running (optional)
|
|
224
|
+
* @example "0.47.5"
|
|
225
|
+
*/
|
|
226
|
+
readonly cosmosSdkVersion?: string;
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=provider-metadata.d.ts.map
|