@le-space/core 0.4.4 → 0.5.2
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/{_esm-3QBVL5IV.js → _esm-SEGUHZCN.js} +29 -29
- package/{ccip-62HLVIJN.js → ccip-FZJNHKYI.js} +100 -100
- package/{chunk-3CGLGAGR.js → chunk-ZMOPJA7G.js} +4 -4
- package/index.d.ts +41 -2
- package/index.js +1116 -901
- package/package.json +11 -3
- package/{secp256k1-WKIOWUKN.js → secp256k1-UP7VCQDO.js} +10 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// ../../node_modules
|
|
1
|
+
// ../../node_modules/@noble/hashes/esm/cryptoNode.js
|
|
2
2
|
import * as nc from "crypto";
|
|
3
3
|
var crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
|
|
4
4
|
|
|
5
|
-
// ../../node_modules
|
|
5
|
+
// ../../node_modules/@noble/hashes/esm/utils.js
|
|
6
6
|
function isBytes(a) {
|
|
7
7
|
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
8
8
|
}
|
|
@@ -106,7 +106,7 @@ function randomBytes(bytesLength = 32) {
|
|
|
106
106
|
throw new Error("crypto.getRandomValues must be defined");
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
// ../../node_modules
|
|
109
|
+
// ../../node_modules/@noble/curves/esm/abstract/utils.js
|
|
110
110
|
var _0n = /* @__PURE__ */ BigInt(0);
|
|
111
111
|
var _1n = /* @__PURE__ */ BigInt(1);
|
|
112
112
|
function isBytes2(a) {
|
|
@@ -332,7 +332,7 @@ function memoized(fn) {
|
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
// ../../node_modules
|
|
335
|
+
// ../../node_modules/@noble/hashes/esm/_u64.js
|
|
336
336
|
var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
337
337
|
var _32n = /* @__PURE__ */ BigInt(32);
|
|
338
338
|
function fromBig(n, le = false) {
|
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;
|
|
@@ -168,6 +168,7 @@ type MessageEnvelope = {
|
|
|
168
168
|
type?: unknown;
|
|
169
169
|
}> | null;
|
|
170
170
|
};
|
|
171
|
+
declare function isTransientMessageLookupError(error: unknown): boolean;
|
|
171
172
|
declare function fetchMessageEnvelope(itemHash: string, options: {
|
|
172
173
|
apiHost?: string;
|
|
173
174
|
fetch: FetchLike;
|
|
@@ -223,6 +224,35 @@ declare function broadcastAlephMessage(message: AlephBroadcastMessage, options:
|
|
|
223
224
|
httpStatus: number;
|
|
224
225
|
}>;
|
|
225
226
|
|
|
227
|
+
interface CrnResolutionResult {
|
|
228
|
+
crnUrl: string | null;
|
|
229
|
+
crnHash: string | null;
|
|
230
|
+
source: 'provided' | 'scheduler' | 'manual' | 'missing';
|
|
231
|
+
}
|
|
232
|
+
interface CrnEraseResult extends CrnResolutionResult {
|
|
233
|
+
status: 'erased' | 'missing' | 'skipped';
|
|
234
|
+
}
|
|
235
|
+
declare function resolveInstanceCrn(args: {
|
|
236
|
+
instanceHash: string;
|
|
237
|
+
fetch: FetchLike;
|
|
238
|
+
apiHost?: string;
|
|
239
|
+
crnUrl?: string | null;
|
|
240
|
+
crnHash?: string | null;
|
|
241
|
+
crnListUrl?: string;
|
|
242
|
+
schedulerAllocationUrl?: string;
|
|
243
|
+
}): Promise<CrnResolutionResult>;
|
|
244
|
+
declare function eraseInstanceOnCrn(args: {
|
|
245
|
+
sender: string;
|
|
246
|
+
signer: MessageSigner;
|
|
247
|
+
instanceHash: string;
|
|
248
|
+
fetch: FetchLike;
|
|
249
|
+
apiHost?: string;
|
|
250
|
+
crnUrl?: string | null;
|
|
251
|
+
crnHash?: string | null;
|
|
252
|
+
crnListUrl?: string;
|
|
253
|
+
schedulerAllocationUrl?: string;
|
|
254
|
+
}): Promise<CrnEraseResult>;
|
|
255
|
+
|
|
226
256
|
declare function createUnsignedForgetMessage(args: {
|
|
227
257
|
sender: string;
|
|
228
258
|
hashes?: string[];
|
|
@@ -317,6 +347,8 @@ declare function retainSuccessfulDeployments(args: {
|
|
|
317
347
|
reason?: string;
|
|
318
348
|
channel?: string;
|
|
319
349
|
apiHost?: string;
|
|
350
|
+
crnListUrl?: string;
|
|
351
|
+
schedulerAllocationUrl?: string;
|
|
320
352
|
now?: number;
|
|
321
353
|
}): Promise<{
|
|
322
354
|
sender: string;
|
|
@@ -348,6 +380,13 @@ declare function retainSuccessfulDeployments(args: {
|
|
|
348
380
|
forgetStageResults: {
|
|
349
381
|
stage: "instances" | "dependents";
|
|
350
382
|
hashes: string[];
|
|
383
|
+
eraseResults?: Array<{
|
|
384
|
+
hash: string;
|
|
385
|
+
status: "erased" | "missing" | "skipped";
|
|
386
|
+
crnUrl: string | null;
|
|
387
|
+
crnHash: string | null;
|
|
388
|
+
source: "provided" | "scheduler" | "manual" | "missing";
|
|
389
|
+
}>;
|
|
351
390
|
skipped?: boolean;
|
|
352
391
|
skippedReason?: string;
|
|
353
392
|
forgottenHashes: string[];
|
|
@@ -904,4 +943,4 @@ declare function reconcileOwnerRelayBootstrapRegistrations(args: {
|
|
|
904
943
|
} | null;
|
|
905
944
|
}): Promise<OwnerRelayBootstrapReconcileResult>;
|
|
906
945
|
|
|
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 };
|
|
946
|
+
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, isTransientMessageLookupError, 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 };
|