@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,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Akash Network Placement Attribute Constants
|
|
3
|
+
*
|
|
4
|
+
* **Important Note on Official Schema vs Reality:**
|
|
5
|
+
* The official Akash provider-attributes.json schema defines standardized values
|
|
6
|
+
* (e.g., 'na-us-west', 'location-region'), but **actual providers use different values**
|
|
7
|
+
* in practice (e.g., 'us-west', 'region'). These constants reflect **actual provider usage**
|
|
8
|
+
* queried from the Akash mainnet blockchain, not the official schema.
|
|
9
|
+
*
|
|
10
|
+
* **Official Sources (for reference only):**
|
|
11
|
+
* - Provider attributes schema: https://github.com/akash-network/console/blob/main/config/provider-attributes.json
|
|
12
|
+
* - SDL placement documentation: https://akash.network/docs/getting-started/stack-definition-language/#profilesplacement
|
|
13
|
+
* - Provider attributes guide: https://github.com/akash-network/community/blob/main/provider-attributes/README.md
|
|
14
|
+
*
|
|
15
|
+
* **Actual Provider Behavior:**
|
|
16
|
+
* These constants are derived from querying active providers on Akash mainnet using:
|
|
17
|
+
* ```bash
|
|
18
|
+
* provider-services query provider list --node https://akash-rpc.polkachu.com:443 --output json
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* **Usage in SDL:**
|
|
22
|
+
* Placement attributes are specified in the `profiles.placement.<name>.attributes`
|
|
23
|
+
* section of the SDL and control which providers can bid on your deployment.
|
|
24
|
+
*
|
|
25
|
+
* @see https://github.com/akash-network/console/blob/main/config/provider-attributes.json
|
|
26
|
+
* @module targets/akash/constants
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Valid geographic regions actually used by Akash providers
|
|
30
|
+
*
|
|
31
|
+
* Providers advertise their 'region' attribute to indicate where their
|
|
32
|
+
* infrastructure is physically located. These are the actual values used
|
|
33
|
+
* by providers on Akash mainnet (not the official schema values).
|
|
34
|
+
*
|
|
35
|
+
* **Provider Count (as of query):**
|
|
36
|
+
* - us-west: 5 providers
|
|
37
|
+
* - us-central: 4 providers
|
|
38
|
+
* - us-east: 3 providers
|
|
39
|
+
* - eu-central: 2 providers
|
|
40
|
+
* - Others: 1-2 providers each
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const profile: AkashDeploymentProfile = {
|
|
45
|
+
* placement: {
|
|
46
|
+
* region: 'us-west' // Target US West Coast providers
|
|
47
|
+
* }
|
|
48
|
+
* };
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare const AKASH_REGIONS: {
|
|
52
|
+
readonly 'us-west': "Western United States (California, Oregon, Washington, Nevada)";
|
|
53
|
+
readonly 'us-central': "Central United States (Texas, Oklahoma, Kansas, Nebraska)";
|
|
54
|
+
readonly 'us-east': "Eastern United States (New York, Virginia, Florida, etc.)";
|
|
55
|
+
readonly 'us-west-1': "US West Coast (specific providers)";
|
|
56
|
+
readonly us: "United States (unspecified region)";
|
|
57
|
+
readonly 'ca-central': "Central Canada (Ontario, Quebec)";
|
|
58
|
+
readonly 'ca-east': "Eastern Canada";
|
|
59
|
+
readonly ca: "Canada (unspecified region)";
|
|
60
|
+
readonly 'eu-central': "Central Europe (Germany, Austria, Switzerland)";
|
|
61
|
+
readonly 'eu-west': "Western Europe (France, UK, Netherlands)";
|
|
62
|
+
readonly 'eu-east': "Eastern Europe (Poland, Czech Republic, etc.)";
|
|
63
|
+
readonly europe: "Europe (unspecified region)";
|
|
64
|
+
readonly eu: "Europe (short form)";
|
|
65
|
+
readonly 'asia-east': "Eastern Asia (China, Japan, Korea)";
|
|
66
|
+
readonly singapore: "Singapore";
|
|
67
|
+
readonly westmidlands: "UK West Midlands";
|
|
68
|
+
readonly westeurope: "Western Europe";
|
|
69
|
+
readonly westcoast: "West Coast (US or other)";
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Type representing all valid Akash region identifiers
|
|
73
|
+
*
|
|
74
|
+
* This type is derived from the AKASH_REGIONS constant object and ensures
|
|
75
|
+
* type safety when specifying regions in placement attributes.
|
|
76
|
+
*/
|
|
77
|
+
export type AkashRegion = keyof typeof AKASH_REGIONS;
|
|
78
|
+
/**
|
|
79
|
+
* Valid location types for Akash providers
|
|
80
|
+
*
|
|
81
|
+
* Indicates the type of facility where the provider's infrastructure is hosted.
|
|
82
|
+
* This helps deployments target appropriate infrastructure based on reliability
|
|
83
|
+
* and performance requirements.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const profile: AkashDeploymentProfile = {
|
|
88
|
+
* placement: {
|
|
89
|
+
* 'location-type': 'datacenter' // Professional datacenter only
|
|
90
|
+
* }
|
|
91
|
+
* };
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare const AKASH_LOCATION_TYPES: {
|
|
95
|
+
readonly datacenter: "Professional datacenter with enterprise-grade infrastructure";
|
|
96
|
+
readonly colo: "Co-location facility (shared datacenter space)";
|
|
97
|
+
readonly home: "Home-based server (residential location)";
|
|
98
|
+
readonly office: "Office-based server (business location)";
|
|
99
|
+
readonly 'server-room': "Dedicated server room within an organization";
|
|
100
|
+
readonly mix: "Mix of multiple location types";
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Type representing all valid Akash location types
|
|
104
|
+
*/
|
|
105
|
+
export type AkashLocationType = keyof typeof AKASH_LOCATION_TYPES;
|
|
106
|
+
/**
|
|
107
|
+
* Valid provider tier classifications
|
|
108
|
+
*
|
|
109
|
+
* Providers advertise their tier to indicate service level and reliability.
|
|
110
|
+
* This is one of the most commonly used attributes (37+ providers use this).
|
|
111
|
+
*
|
|
112
|
+
* **Provider Count (as of query):**
|
|
113
|
+
* - community: 35 providers (most common)
|
|
114
|
+
* - premium: 2 providers
|
|
115
|
+
*
|
|
116
|
+
* **Use Cases:**
|
|
117
|
+
* - Production workloads: Target 'premium' tier for higher SLAs
|
|
118
|
+
* - Cost optimization: Target 'community' tier for cheaper rates
|
|
119
|
+
* - Development/testing: Either tier is fine
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```typescript
|
|
123
|
+
* const profile: AkashDeploymentProfile = {
|
|
124
|
+
* placement: {
|
|
125
|
+
* tier: 'premium' // Target premium providers for production
|
|
126
|
+
* }
|
|
127
|
+
* };
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare const AKASH_TIERS: {
|
|
131
|
+
readonly community: "Community-tier providers (standard pricing, good for most workloads)";
|
|
132
|
+
readonly premium: "Premium-tier providers (higher SLA, enterprise support)";
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Type representing all valid Akash tier identifiers
|
|
136
|
+
*/
|
|
137
|
+
export type AkashTier = keyof typeof AKASH_TIERS;
|
|
138
|
+
/**
|
|
139
|
+
* Valid timezone identifiers (UTC offsets)
|
|
140
|
+
*
|
|
141
|
+
* **Note:** Timezone is RARELY used by providers in practice.
|
|
142
|
+
* Consider using 'region' instead for geographic targeting.
|
|
143
|
+
*
|
|
144
|
+
* Represents the timezone where the provider's infrastructure is located.
|
|
145
|
+
* Useful for ensuring data residency or minimizing latency to specific
|
|
146
|
+
* time zones.
|
|
147
|
+
*
|
|
148
|
+
* @see https://www.timeanddate.com/time/map/
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* const profile: AkashDeploymentProfile = {
|
|
153
|
+
* placement: {
|
|
154
|
+
* timezone: 'utc-8' // US Pacific Time
|
|
155
|
+
* }
|
|
156
|
+
* };
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
export declare const AKASH_TIMEZONES: {
|
|
160
|
+
readonly 'utc-12': "UTC-12 (Baker Island)";
|
|
161
|
+
readonly 'utc-11': "UTC-11 (American Samoa)";
|
|
162
|
+
readonly 'utc-10': "UTC-10 (Hawaii)";
|
|
163
|
+
readonly 'utc-9': "UTC-9 (Alaska)";
|
|
164
|
+
readonly 'utc-8': "UTC-8 (Pacific Time)";
|
|
165
|
+
readonly 'utc-7': "UTC-7 (Mountain Time)";
|
|
166
|
+
readonly 'utc-6': "UTC-6 (Central Time)";
|
|
167
|
+
readonly 'utc-5': "UTC-5 (Eastern Time)";
|
|
168
|
+
readonly 'utc-4': "UTC-4 (Atlantic Time)";
|
|
169
|
+
readonly 'utc-3': "UTC-3 (Argentina, Brazil)";
|
|
170
|
+
readonly 'utc-2': "UTC-2 (Mid-Atlantic)";
|
|
171
|
+
readonly 'utc-1': "UTC-1 (Azores)";
|
|
172
|
+
readonly 'utc+0': "UTC+0 (GMT, London)";
|
|
173
|
+
readonly 'utc+1': "UTC+1 (Central European Time)";
|
|
174
|
+
readonly 'utc+2': "UTC+2 (Eastern European Time)";
|
|
175
|
+
readonly 'utc+3': "UTC+3 (Moscow)";
|
|
176
|
+
readonly 'utc+4': "UTC+4 (Dubai)";
|
|
177
|
+
readonly 'utc+5': "UTC+5 (Pakistan)";
|
|
178
|
+
readonly 'utc+5-30': "UTC+5:30 (India)";
|
|
179
|
+
readonly 'utc+6': "UTC+6 (Bangladesh)";
|
|
180
|
+
readonly 'utc+7': "UTC+7 (Bangkok)";
|
|
181
|
+
readonly 'utc+8': "UTC+8 (China, Singapore)";
|
|
182
|
+
readonly 'utc+9': "UTC+9 (Japan, Korea)";
|
|
183
|
+
readonly 'utc+10': "UTC+10 (Australia East)";
|
|
184
|
+
readonly 'utc+11': "UTC+11 (Solomon Islands)";
|
|
185
|
+
readonly 'utc+12': "UTC+12 (New Zealand)";
|
|
186
|
+
readonly 'utc+13': "UTC+13 (Tonga)";
|
|
187
|
+
readonly 'utc+14': "UTC+14 (Line Islands)";
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Type representing all valid Akash timezone identifiers
|
|
191
|
+
*/
|
|
192
|
+
export type AkashTimezone = keyof typeof AKASH_TIMEZONES;
|
|
193
|
+
/**
|
|
194
|
+
* Helper function to get all region keys as an array
|
|
195
|
+
*
|
|
196
|
+
* Useful for validation, error messages, or dynamic UI generation.
|
|
197
|
+
*
|
|
198
|
+
* @returns Array of all valid region identifiers
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* const allRegions = getAkashRegions();
|
|
203
|
+
* console.log(allRegions.length); // 48
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
export declare function getAkashRegions(): readonly AkashRegion[];
|
|
207
|
+
/**
|
|
208
|
+
* Helper function to get all location type keys as an array
|
|
209
|
+
*
|
|
210
|
+
* @returns Array of all valid location type identifiers
|
|
211
|
+
*/
|
|
212
|
+
export declare function getAkashLocationTypes(): readonly AkashLocationType[];
|
|
213
|
+
/**
|
|
214
|
+
* Helper function to get all timezone keys as an array
|
|
215
|
+
*
|
|
216
|
+
* @returns Array of all valid timezone identifiers
|
|
217
|
+
*/
|
|
218
|
+
export declare function getAkashTimezones(): readonly AkashTimezone[];
|
|
219
|
+
/**
|
|
220
|
+
* Helper function to get all tier keys as an array
|
|
221
|
+
*
|
|
222
|
+
* @returns Array of all valid tier identifiers
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* const allTiers = getAkashTiers();
|
|
227
|
+
* console.log(allTiers); // ['community', 'premium']
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
export declare function getAkashTiers(): readonly AkashTier[];
|
|
231
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/targets/akash/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;CA4BhB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,aAAa,CAAC;AAErD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB;;;;;;;CAOvB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,WAAW,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,eAAe,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,IAAI,SAAS,WAAW,EAAE,CAExD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,SAAS,iBAAiB,EAAE,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,aAAa,EAAE,CAE5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,SAAS,SAAS,EAAE,CAEpD"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Akash Network Placement Attribute Constants
|
|
3
|
+
*
|
|
4
|
+
* **Important Note on Official Schema vs Reality:**
|
|
5
|
+
* The official Akash provider-attributes.json schema defines standardized values
|
|
6
|
+
* (e.g., 'na-us-west', 'location-region'), but **actual providers use different values**
|
|
7
|
+
* in practice (e.g., 'us-west', 'region'). These constants reflect **actual provider usage**
|
|
8
|
+
* queried from the Akash mainnet blockchain, not the official schema.
|
|
9
|
+
*
|
|
10
|
+
* **Official Sources (for reference only):**
|
|
11
|
+
* - Provider attributes schema: https://github.com/akash-network/console/blob/main/config/provider-attributes.json
|
|
12
|
+
* - SDL placement documentation: https://akash.network/docs/getting-started/stack-definition-language/#profilesplacement
|
|
13
|
+
* - Provider attributes guide: https://github.com/akash-network/community/blob/main/provider-attributes/README.md
|
|
14
|
+
*
|
|
15
|
+
* **Actual Provider Behavior:**
|
|
16
|
+
* These constants are derived from querying active providers on Akash mainnet using:
|
|
17
|
+
* ```bash
|
|
18
|
+
* provider-services query provider list --node https://akash-rpc.polkachu.com:443 --output json
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* **Usage in SDL:**
|
|
22
|
+
* Placement attributes are specified in the `profiles.placement.<name>.attributes`
|
|
23
|
+
* section of the SDL and control which providers can bid on your deployment.
|
|
24
|
+
*
|
|
25
|
+
* @see https://github.com/akash-network/console/blob/main/config/provider-attributes.json
|
|
26
|
+
* @module targets/akash/constants
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Valid geographic regions actually used by Akash providers
|
|
30
|
+
*
|
|
31
|
+
* Providers advertise their 'region' attribute to indicate where their
|
|
32
|
+
* infrastructure is physically located. These are the actual values used
|
|
33
|
+
* by providers on Akash mainnet (not the official schema values).
|
|
34
|
+
*
|
|
35
|
+
* **Provider Count (as of query):**
|
|
36
|
+
* - us-west: 5 providers
|
|
37
|
+
* - us-central: 4 providers
|
|
38
|
+
* - us-east: 3 providers
|
|
39
|
+
* - eu-central: 2 providers
|
|
40
|
+
* - Others: 1-2 providers each
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const profile: AkashDeploymentProfile = {
|
|
45
|
+
* placement: {
|
|
46
|
+
* region: 'us-west' // Target US West Coast providers
|
|
47
|
+
* }
|
|
48
|
+
* };
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export const AKASH_REGIONS = {
|
|
52
|
+
// United States (most common)
|
|
53
|
+
'us-west': 'Western United States (California, Oregon, Washington, Nevada)',
|
|
54
|
+
'us-central': 'Central United States (Texas, Oklahoma, Kansas, Nebraska)',
|
|
55
|
+
'us-east': 'Eastern United States (New York, Virginia, Florida, etc.)',
|
|
56
|
+
'us-west-1': 'US West Coast (specific providers)',
|
|
57
|
+
'us': 'United States (unspecified region)',
|
|
58
|
+
// Canada
|
|
59
|
+
'ca-central': 'Central Canada (Ontario, Quebec)',
|
|
60
|
+
'ca-east': 'Eastern Canada',
|
|
61
|
+
'ca': 'Canada (unspecified region)',
|
|
62
|
+
// Europe
|
|
63
|
+
'eu-central': 'Central Europe (Germany, Austria, Switzerland)',
|
|
64
|
+
'eu-west': 'Western Europe (France, UK, Netherlands)',
|
|
65
|
+
'eu-east': 'Eastern Europe (Poland, Czech Republic, etc.)',
|
|
66
|
+
'europe': 'Europe (unspecified region)',
|
|
67
|
+
'eu': 'Europe (short form)',
|
|
68
|
+
// Asia
|
|
69
|
+
'asia-east': 'Eastern Asia (China, Japan, Korea)',
|
|
70
|
+
'singapore': 'Singapore',
|
|
71
|
+
// Other regions (less common)
|
|
72
|
+
'westmidlands': 'UK West Midlands',
|
|
73
|
+
'westeurope': 'Western Europe',
|
|
74
|
+
'westcoast': 'West Coast (US or other)',
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Valid location types for Akash providers
|
|
78
|
+
*
|
|
79
|
+
* Indicates the type of facility where the provider's infrastructure is hosted.
|
|
80
|
+
* This helps deployments target appropriate infrastructure based on reliability
|
|
81
|
+
* and performance requirements.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const profile: AkashDeploymentProfile = {
|
|
86
|
+
* placement: {
|
|
87
|
+
* 'location-type': 'datacenter' // Professional datacenter only
|
|
88
|
+
* }
|
|
89
|
+
* };
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export const AKASH_LOCATION_TYPES = {
|
|
93
|
+
'datacenter': 'Professional datacenter with enterprise-grade infrastructure',
|
|
94
|
+
'colo': 'Co-location facility (shared datacenter space)',
|
|
95
|
+
'home': 'Home-based server (residential location)',
|
|
96
|
+
'office': 'Office-based server (business location)',
|
|
97
|
+
'server-room': 'Dedicated server room within an organization',
|
|
98
|
+
'mix': 'Mix of multiple location types',
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Valid provider tier classifications
|
|
102
|
+
*
|
|
103
|
+
* Providers advertise their tier to indicate service level and reliability.
|
|
104
|
+
* This is one of the most commonly used attributes (37+ providers use this).
|
|
105
|
+
*
|
|
106
|
+
* **Provider Count (as of query):**
|
|
107
|
+
* - community: 35 providers (most common)
|
|
108
|
+
* - premium: 2 providers
|
|
109
|
+
*
|
|
110
|
+
* **Use Cases:**
|
|
111
|
+
* - Production workloads: Target 'premium' tier for higher SLAs
|
|
112
|
+
* - Cost optimization: Target 'community' tier for cheaper rates
|
|
113
|
+
* - Development/testing: Either tier is fine
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* const profile: AkashDeploymentProfile = {
|
|
118
|
+
* placement: {
|
|
119
|
+
* tier: 'premium' // Target premium providers for production
|
|
120
|
+
* }
|
|
121
|
+
* };
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export const AKASH_TIERS = {
|
|
125
|
+
'community': 'Community-tier providers (standard pricing, good for most workloads)',
|
|
126
|
+
'premium': 'Premium-tier providers (higher SLA, enterprise support)',
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Valid timezone identifiers (UTC offsets)
|
|
130
|
+
*
|
|
131
|
+
* **Note:** Timezone is RARELY used by providers in practice.
|
|
132
|
+
* Consider using 'region' instead for geographic targeting.
|
|
133
|
+
*
|
|
134
|
+
* Represents the timezone where the provider's infrastructure is located.
|
|
135
|
+
* Useful for ensuring data residency or minimizing latency to specific
|
|
136
|
+
* time zones.
|
|
137
|
+
*
|
|
138
|
+
* @see https://www.timeanddate.com/time/map/
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* const profile: AkashDeploymentProfile = {
|
|
143
|
+
* placement: {
|
|
144
|
+
* timezone: 'utc-8' // US Pacific Time
|
|
145
|
+
* }
|
|
146
|
+
* };
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
export const AKASH_TIMEZONES = {
|
|
150
|
+
'utc-12': 'UTC-12 (Baker Island)',
|
|
151
|
+
'utc-11': 'UTC-11 (American Samoa)',
|
|
152
|
+
'utc-10': 'UTC-10 (Hawaii)',
|
|
153
|
+
'utc-9': 'UTC-9 (Alaska)',
|
|
154
|
+
'utc-8': 'UTC-8 (Pacific Time)',
|
|
155
|
+
'utc-7': 'UTC-7 (Mountain Time)',
|
|
156
|
+
'utc-6': 'UTC-6 (Central Time)',
|
|
157
|
+
'utc-5': 'UTC-5 (Eastern Time)',
|
|
158
|
+
'utc-4': 'UTC-4 (Atlantic Time)',
|
|
159
|
+
'utc-3': 'UTC-3 (Argentina, Brazil)',
|
|
160
|
+
'utc-2': 'UTC-2 (Mid-Atlantic)',
|
|
161
|
+
'utc-1': 'UTC-1 (Azores)',
|
|
162
|
+
'utc+0': 'UTC+0 (GMT, London)',
|
|
163
|
+
'utc+1': 'UTC+1 (Central European Time)',
|
|
164
|
+
'utc+2': 'UTC+2 (Eastern European Time)',
|
|
165
|
+
'utc+3': 'UTC+3 (Moscow)',
|
|
166
|
+
'utc+4': 'UTC+4 (Dubai)',
|
|
167
|
+
'utc+5': 'UTC+5 (Pakistan)',
|
|
168
|
+
'utc+5-30': 'UTC+5:30 (India)',
|
|
169
|
+
'utc+6': 'UTC+6 (Bangladesh)',
|
|
170
|
+
'utc+7': 'UTC+7 (Bangkok)',
|
|
171
|
+
'utc+8': 'UTC+8 (China, Singapore)',
|
|
172
|
+
'utc+9': 'UTC+9 (Japan, Korea)',
|
|
173
|
+
'utc+10': 'UTC+10 (Australia East)',
|
|
174
|
+
'utc+11': 'UTC+11 (Solomon Islands)',
|
|
175
|
+
'utc+12': 'UTC+12 (New Zealand)',
|
|
176
|
+
'utc+13': 'UTC+13 (Tonga)',
|
|
177
|
+
'utc+14': 'UTC+14 (Line Islands)',
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Helper function to get all region keys as an array
|
|
181
|
+
*
|
|
182
|
+
* Useful for validation, error messages, or dynamic UI generation.
|
|
183
|
+
*
|
|
184
|
+
* @returns Array of all valid region identifiers
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```typescript
|
|
188
|
+
* const allRegions = getAkashRegions();
|
|
189
|
+
* console.log(allRegions.length); // 48
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
export function getAkashRegions() {
|
|
193
|
+
return Object.keys(AKASH_REGIONS);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Helper function to get all location type keys as an array
|
|
197
|
+
*
|
|
198
|
+
* @returns Array of all valid location type identifiers
|
|
199
|
+
*/
|
|
200
|
+
export function getAkashLocationTypes() {
|
|
201
|
+
return Object.keys(AKASH_LOCATION_TYPES);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Helper function to get all timezone keys as an array
|
|
205
|
+
*
|
|
206
|
+
* @returns Array of all valid timezone identifiers
|
|
207
|
+
*/
|
|
208
|
+
export function getAkashTimezones() {
|
|
209
|
+
return Object.keys(AKASH_TIMEZONES);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Helper function to get all tier keys as an array
|
|
213
|
+
*
|
|
214
|
+
* @returns Array of all valid tier identifiers
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```typescript
|
|
218
|
+
* const allTiers = getAkashTiers();
|
|
219
|
+
* console.log(allTiers); // ['community', 'premium']
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
export function getAkashTiers() {
|
|
223
|
+
return Object.keys(AKASH_TIERS);
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/targets/akash/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,8BAA8B;IAC9B,SAAS,EAAE,gEAAgE;IAC3E,YAAY,EAAE,2DAA2D;IACzE,SAAS,EAAE,2DAA2D;IACtE,WAAW,EAAE,oCAAoC;IACjD,IAAI,EAAE,oCAAoC;IAE1C,SAAS;IACT,YAAY,EAAE,kCAAkC;IAChD,SAAS,EAAE,gBAAgB;IAC3B,IAAI,EAAE,6BAA6B;IAEnC,SAAS;IACT,YAAY,EAAE,gDAAgD;IAC9D,SAAS,EAAE,0CAA0C;IACrD,SAAS,EAAE,+CAA+C;IAC1D,QAAQ,EAAE,6BAA6B;IACvC,IAAI,EAAE,qBAAqB;IAE3B,OAAO;IACP,WAAW,EAAE,oCAAoC;IACjD,WAAW,EAAE,WAAW;IAExB,8BAA8B;IAC9B,cAAc,EAAE,kBAAkB;IAClC,YAAY,EAAE,gBAAgB;IAC9B,WAAW,EAAE,0BAA0B;CAC/B,CAAC;AAUX;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY,EAAE,8DAA8D;IAC5E,MAAM,EAAE,gDAAgD;IACxD,MAAM,EAAE,0CAA0C;IAClD,QAAQ,EAAE,yCAAyC;IACnD,aAAa,EAAE,8CAA8C;IAC7D,KAAK,EAAE,gCAAgC;CAC/B,CAAC;AAOX;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,WAAW,EAAE,sEAAsE;IACnF,SAAS,EAAE,yDAAyD;CAC5D,CAAC;AAOX;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,uBAAuB;IACjC,QAAQ,EAAE,yBAAyB;IACnC,QAAQ,EAAE,iBAAiB;IAC3B,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,eAAe;IACxB,OAAO,EAAE,kBAAkB;IAC3B,UAAU,EAAE,kBAAkB;IAC9B,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,sBAAsB;IAC/B,QAAQ,EAAE,yBAAyB;IACnC,QAAQ,EAAE,0BAA0B;IACpC,QAAQ,EAAE,sBAAsB;IAChC,QAAQ,EAAE,gBAAgB;IAC1B,QAAQ,EAAE,uBAAuB;CACzB,CAAC;AAOX;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAkB,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAwB,CAAC;AAClE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,eAAe,CAAoB,CAAC;AACzD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAgB,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Akash Deployment Orchestrator
|
|
3
|
+
*
|
|
4
|
+
* High-level helper that glues together the lower-level modules:
|
|
5
|
+
* - profile loading
|
|
6
|
+
* - SDL generation
|
|
7
|
+
* - blockchain deployment workflow (create deployment → wait for bids → create lease)
|
|
8
|
+
* - provider manifest delivery and optional readiness monitoring
|
|
9
|
+
*
|
|
10
|
+
* This mirrors the legacy kadi-deploy deployment flow while embracing the
|
|
11
|
+
* composable building blocks exposed by deploy-ability.
|
|
12
|
+
*
|
|
13
|
+
* @module targets/akash/deployer
|
|
14
|
+
*/
|
|
15
|
+
import { type AkashDeploymentOptions, type AkashDeploymentResult } from '../../types/index.js';
|
|
16
|
+
import type { BidSelector } from './bid-types.js';
|
|
17
|
+
import type { AkashProviderTlsCertificate, WalletContext } from './types.js';
|
|
18
|
+
/**
|
|
19
|
+
* Additional parameters required to execute a deployment.
|
|
20
|
+
*
|
|
21
|
+
* For dry-run mode, wallet and certificate are optional (only SDL generation needed).
|
|
22
|
+
* For actual deployments, wallet, certificate, and bidSelector are all required.
|
|
23
|
+
*
|
|
24
|
+
* **Breaking Change (Alpha):**
|
|
25
|
+
* As of v0.x, `bidSelector` is now REQUIRED. This gives developers full control
|
|
26
|
+
* over provider selection instead of automatically accepting the first bid.
|
|
27
|
+
*
|
|
28
|
+
* Callers can use wallet-manager and certificate-manager modules to obtain wallet/certificate,
|
|
29
|
+
* and can use the pre-built selection strategies from `bid-selectors.ts` or implement custom logic.
|
|
30
|
+
*/
|
|
31
|
+
export interface AkashDeploymentExecution extends AkashDeploymentOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Connected wallet with offline signer
|
|
34
|
+
*
|
|
35
|
+
* Optional for dry-run mode (dryRun: true).
|
|
36
|
+
* Required for actual deployments.
|
|
37
|
+
*/
|
|
38
|
+
readonly wallet?: WalletContext;
|
|
39
|
+
/**
|
|
40
|
+
* TLS certificate bundle for provider communication
|
|
41
|
+
*
|
|
42
|
+
* Optional for dry-run mode (dryRun: true).
|
|
43
|
+
* Required for actual deployments (providers require mTLS).
|
|
44
|
+
*/
|
|
45
|
+
readonly certificate?: AkashProviderTlsCertificate;
|
|
46
|
+
/**
|
|
47
|
+
* Bid selection function
|
|
48
|
+
*
|
|
49
|
+
* Called with all available bids after waiting for provider responses.
|
|
50
|
+
* Must return the selected bid or null if none are acceptable.
|
|
51
|
+
*
|
|
52
|
+
* Optional for dry-run mode (dryRun: true).
|
|
53
|
+
* Required for actual deployments.
|
|
54
|
+
*
|
|
55
|
+
* **Pre-built Selectors:**
|
|
56
|
+
* - `selectCheapestBid` - Choose lowest price
|
|
57
|
+
* - `selectMostReliableBid` - Choose highest uptime
|
|
58
|
+
* - `selectBalancedBid` - Weighted price + reliability
|
|
59
|
+
* - `filterBids` + selector - Apply criteria then select
|
|
60
|
+
*
|
|
61
|
+
* @example Using cheapest bid selector
|
|
62
|
+
* ```typescript
|
|
63
|
+
* import { deployToAkash, selectCheapestBid} from 'deploy-ability/akash';
|
|
64
|
+
*
|
|
65
|
+
* const result = await deployToAkash({
|
|
66
|
+
* wallet,
|
|
67
|
+
* certificate,
|
|
68
|
+
* projectRoot: './',
|
|
69
|
+
* profile: 'production',
|
|
70
|
+
* bidSelector: selectCheapestBid
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @example Custom interactive selector
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const result = await deployToAkash({
|
|
77
|
+
* wallet,
|
|
78
|
+
* certificate,
|
|
79
|
+
* projectRoot: './',
|
|
80
|
+
* profile: 'production',
|
|
81
|
+
* bidSelector: async (bids) => {
|
|
82
|
+
* console.log('Available providers:');
|
|
83
|
+
* bids.forEach((bid, i) => {
|
|
84
|
+
* console.log(`${i + 1}. ${bid.provider.name || bid.provider.owner}`);
|
|
85
|
+
* console.log(` Price: ${bid.pricing.akt.perMonth.toFixed(2)} AKT/month`);
|
|
86
|
+
* console.log(` Uptime: ${bid.provider.reliability?.uptime7d || 'N/A'}`);
|
|
87
|
+
* });
|
|
88
|
+
* const choice = await promptUser('Select provider: ');
|
|
89
|
+
* return bids[parseInt(choice) - 1] || null;
|
|
90
|
+
* }
|
|
91
|
+
* });
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
readonly bidSelector?: BidSelector;
|
|
95
|
+
/**
|
|
96
|
+
* Timeout for provider bidding phase (milliseconds)
|
|
97
|
+
*
|
|
98
|
+
* If no providers bid within this time, the deployment is automatically
|
|
99
|
+
* closed and the escrow deposit is returned to your wallet.
|
|
100
|
+
*
|
|
101
|
+
* **Why this matters:**
|
|
102
|
+
* After creating a deployment, providers need time to see it on the blockchain
|
|
103
|
+
* and submit bids. This usually takes 30-60 seconds. However, if your resource
|
|
104
|
+
* requirements are too specific or impossible to fulfill, you may receive no bids.
|
|
105
|
+
*
|
|
106
|
+
* **What happens on timeout:**
|
|
107
|
+
* - Deployment is closed automatically (MsgCloseDeployment transaction)
|
|
108
|
+
* - Escrow deposit (typically 5 AKT) is returned to your wallet
|
|
109
|
+
* - Error returned with code 'BID_TIMEOUT' and helpful suggestions
|
|
110
|
+
*
|
|
111
|
+
* **Recommended values:**
|
|
112
|
+
* - Development/testing: 120000 (2 minutes)
|
|
113
|
+
* - Production: 180000 (3 minutes) - default
|
|
114
|
+
* - Complex requirements: 300000 (5 minutes)
|
|
115
|
+
*
|
|
116
|
+
* @default 180000 (3 minutes)
|
|
117
|
+
*
|
|
118
|
+
* @example With custom bid timeout
|
|
119
|
+
* ```typescript
|
|
120
|
+
* const result = await deployToAkash({
|
|
121
|
+
* wallet,
|
|
122
|
+
* certificate,
|
|
123
|
+
* projectRoot: './',
|
|
124
|
+
* profile: 'production',
|
|
125
|
+
* bidSelector: selectCheapestBid,
|
|
126
|
+
* bidTimeout: 300000 // 5 minutes for specialized hardware
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
readonly bidTimeout?: number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Executes a full Akash deployment.
|
|
134
|
+
*/
|
|
135
|
+
export declare function deployToAkash(params: AkashDeploymentExecution): Promise<AkashDeploymentResult>;
|
|
136
|
+
//# sourceMappingURL=deployer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/targets/akash/deployer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAK3B,MAAM,sBAAsB,CAAC;AAoB9B,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAkB/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK7E;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAEhC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CAmfhC"}
|