@le-space/core 0.4.4 → 0.4.5
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/index.d.ts +40 -2
- package/index.js +1108 -901
- package/package.json +11 -3
package/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { RootfsResolution, RootfsManifest, RootfsManifestState, CrnRecord, Rootf
|
|
|
4
4
|
declare const DEFAULT_ALEPH_CHANNEL = "TEST";
|
|
5
5
|
|
|
6
6
|
declare const ITEM_HASH_RE: RegExp;
|
|
7
|
-
declare const DEFAULT_ALEPH_API_HOST = "https://
|
|
7
|
+
declare const DEFAULT_ALEPH_API_HOST = "https://api.aleph.im";
|
|
8
8
|
declare const DEFAULT_IPFS_GATEWAY_BASE_URL = "https://ipfs.aleph.cloud/ipfs/";
|
|
9
9
|
interface FetchLikeResponse {
|
|
10
10
|
ok: boolean;
|
|
@@ -223,6 +223,35 @@ declare function broadcastAlephMessage(message: AlephBroadcastMessage, options:
|
|
|
223
223
|
httpStatus: number;
|
|
224
224
|
}>;
|
|
225
225
|
|
|
226
|
+
interface CrnResolutionResult {
|
|
227
|
+
crnUrl: string | null;
|
|
228
|
+
crnHash: string | null;
|
|
229
|
+
source: 'provided' | 'scheduler' | 'manual' | 'missing';
|
|
230
|
+
}
|
|
231
|
+
interface CrnEraseResult extends CrnResolutionResult {
|
|
232
|
+
status: 'erased' | 'missing' | 'skipped';
|
|
233
|
+
}
|
|
234
|
+
declare function resolveInstanceCrn(args: {
|
|
235
|
+
instanceHash: string;
|
|
236
|
+
fetch: FetchLike;
|
|
237
|
+
apiHost?: string;
|
|
238
|
+
crnUrl?: string | null;
|
|
239
|
+
crnHash?: string | null;
|
|
240
|
+
crnListUrl?: string;
|
|
241
|
+
schedulerAllocationUrl?: string;
|
|
242
|
+
}): Promise<CrnResolutionResult>;
|
|
243
|
+
declare function eraseInstanceOnCrn(args: {
|
|
244
|
+
sender: string;
|
|
245
|
+
signer: MessageSigner;
|
|
246
|
+
instanceHash: string;
|
|
247
|
+
fetch: FetchLike;
|
|
248
|
+
apiHost?: string;
|
|
249
|
+
crnUrl?: string | null;
|
|
250
|
+
crnHash?: string | null;
|
|
251
|
+
crnListUrl?: string;
|
|
252
|
+
schedulerAllocationUrl?: string;
|
|
253
|
+
}): Promise<CrnEraseResult>;
|
|
254
|
+
|
|
226
255
|
declare function createUnsignedForgetMessage(args: {
|
|
227
256
|
sender: string;
|
|
228
257
|
hashes?: string[];
|
|
@@ -317,6 +346,8 @@ declare function retainSuccessfulDeployments(args: {
|
|
|
317
346
|
reason?: string;
|
|
318
347
|
channel?: string;
|
|
319
348
|
apiHost?: string;
|
|
349
|
+
crnListUrl?: string;
|
|
350
|
+
schedulerAllocationUrl?: string;
|
|
320
351
|
now?: number;
|
|
321
352
|
}): Promise<{
|
|
322
353
|
sender: string;
|
|
@@ -348,6 +379,13 @@ declare function retainSuccessfulDeployments(args: {
|
|
|
348
379
|
forgetStageResults: {
|
|
349
380
|
stage: "instances" | "dependents";
|
|
350
381
|
hashes: string[];
|
|
382
|
+
eraseResults?: Array<{
|
|
383
|
+
hash: string;
|
|
384
|
+
status: "erased" | "missing" | "skipped";
|
|
385
|
+
crnUrl: string | null;
|
|
386
|
+
crnHash: string | null;
|
|
387
|
+
source: "provided" | "scheduler" | "manual" | "missing";
|
|
388
|
+
}>;
|
|
351
389
|
skipped?: boolean;
|
|
352
390
|
skippedReason?: string;
|
|
353
391
|
forgottenHashes: string[];
|
|
@@ -904,4 +942,4 @@ declare function reconcileOwnerRelayBootstrapRegistrations(args: {
|
|
|
904
942
|
} | null;
|
|
905
943
|
}): Promise<OwnerRelayBootstrapReconcileResult>;
|
|
906
944
|
|
|
907
|
-
export { type CrnCapacitySpec, DEFAULT_ALEPH_API_HOST, DEFAULT_ALEPH_CHANNEL, DEFAULT_COUNTRY_LOOKUP_BASE_URL, DEFAULT_CRN_LIST_URL, DEFAULT_DNS_RESOLVE_URL, DEFAULT_INSTANCE_PORT_FORWARDS, DEFAULT_IPFS_GATEWAY_BASE_URL, DEFAULT_SCHEDULER_ALLOCATION_URL, DEFAULT_TWO_N_SIX_HASH_URL, type FetchLike, type FetchLikeResponse, type HttpProbeResult, ITEM_HASH_RE, type JsonFetchLike$1 as JsonFetchLike, type JsonFetchLikeResponse, type OwnerRelayBootstrapReconcileResult, type PaymentQuote, type RelayBootstrapPublicationResult, type RelayBootstrapVisibilityResult, type RelayMetadataShape, type RetentionRecord, SSH_PUBLIC_KEY_PATTERN, SUCCESSFUL_DEPLOYMENTS_AGGREGATE_KEY, type TcpProbeResult, type TierSpec, VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY, VM_BOOTSTRAP_CONFIG_HISTORY_RETENTION_MS, VM_BOOTSTRAP_CONFIG_SIGNAL_POST_TYPE, VM_BOOTSTRAP_CONFIG_SIGNAL_REF, appendDeploymentTokenToSshPublicKey, broadcastAlephMessage, buildPaymentQuote, cleanupFailedDeployment, configureOrbitdbRelaySetup, configureUcGoPeer, createDeploymentIntent, createDeploymentToken, createInstanceContent, createPortForwardAggregateContent, createRelayBootstrapRegistrationId, createReleaseMetadata, createUnsignedAggregateMessage, createUnsignedForgetMessage, createUnsignedInstanceMessage, createVmBootstrapConfigAggregateContent, deleteVmBootstrapConfig, deployInstance, describeRejectedDeployment, describeRuntimeAvailability, enrichCrnsWithGeo, ensureInstancePortForwards, extractInsufficientBalanceMessage, extractProxyUrl, extractReferenceHashes, fetch2n6WebAccessUrl, fetchAggregateKey, fetchCrnExecutionMap, fetchCrns, fetchMessageEnvelope, fetchPortForwardAggregate, fetchRelayMetadataForRuntime, fetchSchedulerAllocation, fetchUcGoPeerMetadata, fetchVmBootstrapConfigAggregate, fetchVmBootstrapConfigSignals, fetchVmRuntime, filterDeployableCrns, findCrnByHash, forgetAlephMessages, inspectDeploymentResult, inspectMessageResult, isInvalidMessageFormatResponse, isRetryableBroadcastFailure, isValidSshPublicKey, listGeocodedCrns, listStaleVmBootstrapConfigAggregateMessageHashes, mergePortFlagMaps, mergeRequiredPortForwards, messageTypeFromEnvelope, normalizeBroadcastStatus, normalizeExecution, normalizeExistingPortForwardEntry, normalizeMessageStatus, normalizeProxyUrl, normalizeSshPublicKey, notifyCrnAllocation, notifyCrnAllocationWithRetry, portForwardLabel, postBroadcastPayload, probeRootfsGateway, publishAggregateKey, publishRelayBootstrapRegistration, publishVmBootstrapConfig, quoteRequiredBudgetUnits, rankCandidateCrns, reconcileOwnerRelayBootstrapRegistrations, requestedPortFlags, requiredInstancePortForwards, resolveRootfsReference, retainSuccessfulDeployments, selectPreferredCrn, selectedTier, signAlephMessage, signaturePayload, tierSpec, validateRootfsManifest, verifyRootfsExists, verifyUcGoPeerReachability, waitForDeploymentResult, waitForRelayBootstrapRegistration, waitForSetupEndpoint, waitForVmBootstrapConfigSignal, waitForVmRuntime };
|
|
945
|
+
export { type CrnCapacitySpec, type CrnEraseResult, type CrnResolutionResult, DEFAULT_ALEPH_API_HOST, DEFAULT_ALEPH_CHANNEL, DEFAULT_COUNTRY_LOOKUP_BASE_URL, DEFAULT_CRN_LIST_URL, DEFAULT_DNS_RESOLVE_URL, DEFAULT_INSTANCE_PORT_FORWARDS, DEFAULT_IPFS_GATEWAY_BASE_URL, DEFAULT_SCHEDULER_ALLOCATION_URL, DEFAULT_TWO_N_SIX_HASH_URL, type FetchLike, type FetchLikeResponse, type HttpProbeResult, ITEM_HASH_RE, type JsonFetchLike$1 as JsonFetchLike, type JsonFetchLikeResponse, type OwnerRelayBootstrapReconcileResult, type PaymentQuote, type RelayBootstrapPublicationResult, type RelayBootstrapVisibilityResult, type RelayMetadataShape, type RetentionRecord, SSH_PUBLIC_KEY_PATTERN, SUCCESSFUL_DEPLOYMENTS_AGGREGATE_KEY, type TcpProbeResult, type TierSpec, VM_BOOTSTRAP_CONFIG_AGGREGATE_KEY, VM_BOOTSTRAP_CONFIG_HISTORY_RETENTION_MS, VM_BOOTSTRAP_CONFIG_SIGNAL_POST_TYPE, VM_BOOTSTRAP_CONFIG_SIGNAL_REF, appendDeploymentTokenToSshPublicKey, broadcastAlephMessage, buildPaymentQuote, cleanupFailedDeployment, configureOrbitdbRelaySetup, configureUcGoPeer, createDeploymentIntent, createDeploymentToken, createInstanceContent, createPortForwardAggregateContent, createRelayBootstrapRegistrationId, createReleaseMetadata, createUnsignedAggregateMessage, createUnsignedForgetMessage, createUnsignedInstanceMessage, createVmBootstrapConfigAggregateContent, deleteVmBootstrapConfig, deployInstance, describeRejectedDeployment, describeRuntimeAvailability, enrichCrnsWithGeo, ensureInstancePortForwards, eraseInstanceOnCrn, extractInsufficientBalanceMessage, extractProxyUrl, extractReferenceHashes, fetch2n6WebAccessUrl, fetchAggregateKey, fetchCrnExecutionMap, fetchCrns, fetchMessageEnvelope, fetchPortForwardAggregate, fetchRelayMetadataForRuntime, fetchSchedulerAllocation, fetchUcGoPeerMetadata, fetchVmBootstrapConfigAggregate, fetchVmBootstrapConfigSignals, fetchVmRuntime, filterDeployableCrns, findCrnByHash, forgetAlephMessages, inspectDeploymentResult, inspectMessageResult, isInvalidMessageFormatResponse, isRetryableBroadcastFailure, isValidSshPublicKey, listGeocodedCrns, listStaleVmBootstrapConfigAggregateMessageHashes, mergePortFlagMaps, mergeRequiredPortForwards, messageTypeFromEnvelope, normalizeBroadcastStatus, normalizeExecution, normalizeExistingPortForwardEntry, normalizeMessageStatus, normalizeProxyUrl, normalizeSshPublicKey, notifyCrnAllocation, notifyCrnAllocationWithRetry, portForwardLabel, postBroadcastPayload, probeRootfsGateway, publishAggregateKey, publishRelayBootstrapRegistration, publishVmBootstrapConfig, quoteRequiredBudgetUnits, rankCandidateCrns, reconcileOwnerRelayBootstrapRegistrations, requestedPortFlags, requiredInstancePortForwards, resolveInstanceCrn, resolveRootfsReference, retainSuccessfulDeployments, selectPreferredCrn, selectedTier, signAlephMessage, signaturePayload, tierSpec, validateRootfsManifest, verifyRootfsExists, verifyUcGoPeerReachability, waitForDeploymentResult, waitForRelayBootstrapRegistration, waitForSetupEndpoint, waitForVmBootstrapConfigSignal, waitForVmRuntime };
|