@shelby-protocol/sdk 0.3.1 → 0.4.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/dist/browser/index.d.ts +9 -9
- package/dist/browser/index.mjs +1068 -589
- package/dist/core/clients/ShelbyBlobClient.d.ts +155 -40
- package/dist/core/clients/ShelbyBlobClient.mjs +314 -112
- package/dist/core/clients/ShelbyClient.d.ts +27 -4
- package/dist/core/clients/ShelbyClient.mjs +869 -551
- package/dist/core/clients/ShelbyClientConfig.d.ts +9 -1
- package/dist/core/clients/ShelbyMetadataClient.d.ts +38 -6
- package/dist/core/clients/ShelbyMetadataClient.mjs +95 -13
- package/dist/core/clients/ShelbyMicropaymentChannelClient.d.ts +42 -0
- package/dist/core/clients/ShelbyMicropaymentChannelClient.mjs +62 -7
- package/dist/core/clients/ShelbyPlacementGroupClient.mjs +10 -7
- package/dist/core/clients/ShelbyRPCClient.d.ts +55 -66
- package/dist/core/clients/ShelbyRPCClient.mjs +344 -360
- package/dist/core/clients/index.d.ts +3 -2
- package/dist/core/clients/index.mjs +933 -551
- package/dist/core/clients/utils.mjs +1 -1
- package/dist/core/commitments.d.ts +12 -1
- package/dist/core/commitments.mjs +7 -0
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/constants.mjs +1 -1
- package/dist/core/erasure/constants.d.ts +16 -1
- package/dist/core/erasure/constants.mjs +15 -1
- package/dist/core/erasure/index.d.ts +1 -1
- package/dist/core/erasure/index.mjs +15 -1
- package/dist/core/errors.d.ts +20 -1
- package/dist/core/errors.mjs +29 -0
- package/dist/core/index.d.ts +9 -9
- package/dist/core/index.mjs +1068 -589
- package/dist/core/operations/generated/sdk.d.ts +798 -42
- package/dist/core/operations/generated/sdk.mjs +93 -9
- package/dist/core/operations/index.d.ts +1 -1
- package/dist/core/operations/index.mjs +94 -10
- package/dist/core/rpc-responses.d.ts +1 -57
- package/dist/core/rpc-responses.mjs +1 -21
- package/dist/core/sp/chunk_proof.d.ts +23 -0
- package/dist/core/sp/chunk_proof.mjs +113 -0
- package/dist/core/sp/index.d.ts +3 -0
- package/dist/core/sp/index.mjs +402 -0
- package/dist/core/sp/sp_write_client.d.ts +53 -0
- package/dist/core/sp/sp_write_client.mjs +302 -0
- package/dist/core/types/blobs.d.ts +24 -5
- package/dist/core/types/blobs.mjs +24 -0
- package/dist/core/types/index.d.ts +2 -2
- package/dist/core/types/index.mjs +46 -2
- package/dist/core/types/payments.mjs +1 -1
- package/dist/core/types/storage_providers.d.ts +32 -6
- package/dist/core/types/storage_providers.mjs +22 -0
- package/dist/gen/rpc_server_pb.d.ts +295 -0
- package/dist/gen/rpc_server_pb.mjs +28 -0
- package/dist/node/clients/ShelbyNodeClient.d.ts +1 -0
- package/dist/node/clients/ShelbyNodeClient.mjs +869 -551
- package/dist/node/clients/index.d.ts +1 -0
- package/dist/node/clients/index.mjs +867 -551
- package/dist/node/index.d.ts +9 -9
- package/dist/node/index.mjs +1068 -589
- package/dist/node/parallel/commitment_worker.mjs +36 -249
- package/dist/node/parallel/commitment_worker_pool.mjs +56 -3
- package/dist/node/parallel/coverage_flush.d.ts +16 -0
- package/dist/node/parallel/coverage_flush.mjs +43 -0
- package/dist/node/parallel/default_commitment_worker_pool.mjs +56 -3
- package/dist/node/parallel/index.d.ts +1 -0
- package/dist/node/parallel/index.mjs +72 -4
- package/dist/node/parallel/parallel_commitments.mjs +56 -3
- package/dist/node/parallel/worker_pool.mjs +56 -3
- package/package.json +10 -3
|
@@ -4,7 +4,7 @@ import { AptosConfig } from "@aptos-labs/ts-sdk";
|
|
|
4
4
|
// src/core/constants.ts
|
|
5
5
|
import { Network } from "@aptos-labs/ts-sdk";
|
|
6
6
|
var NetworkToShelbyRPCBaseUrl = {
|
|
7
|
-
[Network.SHELBYNET]: "https://
|
|
7
|
+
[Network.SHELBYNET]: "https://shelby.shelbynet.shelby.xyz/shelby",
|
|
8
8
|
[Network.NETNA]: void 0,
|
|
9
9
|
[Network.DEVNET]: void 0,
|
|
10
10
|
[Network.TESTNET]: "https://api.testnet.shelby.xyz/shelby",
|
|
@@ -42,6 +42,17 @@ declare const ChunksetCommitmentSchema: z.ZodEffects<z.ZodObject<{
|
|
|
42
42
|
}>;
|
|
43
43
|
type ChunksetCommitment = z.infer<typeof ChunksetCommitmentSchema>;
|
|
44
44
|
declare function expectedTotalChunksets(rawSize: number, chunksetSize?: number): number;
|
|
45
|
+
/**
|
|
46
|
+
* Expected number of 32-byte sibling hashes in a chunkset-to-blob inclusion proof.
|
|
47
|
+
*
|
|
48
|
+
* The blob merkle tree uses incremental odd-level zero-hash padding (see
|
|
49
|
+
* `generateMerkleRoot`). A single-chunkset blob is already the root, so the
|
|
50
|
+
* proof is empty (CLI sends header value `"NONE"`).
|
|
51
|
+
*
|
|
52
|
+
* For n > 1 chunksets, the proof length equals the number of levels from leaf
|
|
53
|
+
* to root, which is `ceil(log2(n))` — not `ceil(log2(n)) - 1`.
|
|
54
|
+
*/
|
|
55
|
+
declare function expectedChunksetInclusionProofHashes(numChunksets: number): number;
|
|
45
56
|
/**
|
|
46
57
|
* Represents the (serializable) commitment schema for a single blob.
|
|
47
58
|
*/
|
|
@@ -124,4 +135,4 @@ declare function generateMerkleRoot(leafHashes: Hex[]): Promise<Hex>;
|
|
|
124
135
|
*/
|
|
125
136
|
declare function generateCommitments(provider: ErasureCodingProvider, fullData: ReadableStream<Uint8Array> | Uint8Array, onChunk?: (chunksetIdx: number, chunkIdx: number, chunkData: Uint8Array) => Promise<void> | void): Promise<BlobCommitments>;
|
|
126
137
|
|
|
127
|
-
export { type BlobCommitments, BlobCommitmentsSchema, COMMITMENT_SCHEMA_VERSION, type ChunksetCommitment, ChunksetCommitmentSchema, expectedTotalChunksets, generateCommitments, generateMerkleRoot };
|
|
138
|
+
export { type BlobCommitments, BlobCommitmentsSchema, COMMITMENT_SCHEMA_VERSION, type ChunksetCommitment, ChunksetCommitmentSchema, expectedChunksetInclusionProofHashes, expectedTotalChunksets, generateCommitments, generateMerkleRoot };
|
|
@@ -162,6 +162,12 @@ function expectedTotalChunksets(rawSize, chunksetSize = DEFAULT_CHUNKSET_SIZE_BY
|
|
|
162
162
|
if (rawSize === 0) return 1;
|
|
163
163
|
return Math.ceil(rawSize / chunksetSize);
|
|
164
164
|
}
|
|
165
|
+
function expectedChunksetInclusionProofHashes(numChunksets) {
|
|
166
|
+
if (numChunksets < 1) {
|
|
167
|
+
throw new Error("numChunksets must be positive");
|
|
168
|
+
}
|
|
169
|
+
return Math.ceil(Math.log2(numChunksets));
|
|
170
|
+
}
|
|
165
171
|
var BlobCommitmentsSchema = z.object({
|
|
166
172
|
schema_version: z.string(),
|
|
167
173
|
raw_data_size: z.number(),
|
|
@@ -273,6 +279,7 @@ export {
|
|
|
273
279
|
BlobCommitmentsSchema,
|
|
274
280
|
COMMITMENT_SCHEMA_VERSION,
|
|
275
281
|
ChunksetCommitmentSchema,
|
|
282
|
+
expectedChunksetInclusionProofHashes,
|
|
276
283
|
expectedTotalChunksets,
|
|
277
284
|
generateCommitments,
|
|
278
285
|
generateMerkleRoot
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const DEFAULT_PROJECT_NAME = "shelby";
|
|
2
2
|
declare const DEFAULT_PROJECT_DESCRIPTION = "High performance, decentralized storage";
|
|
3
3
|
declare const NetworkToShelbyRPCBaseUrl: {
|
|
4
|
-
readonly shelbynet: "https://
|
|
4
|
+
readonly shelbynet: "https://shelby.shelbynet.shelby.xyz/shelby";
|
|
5
5
|
readonly netna: undefined;
|
|
6
6
|
readonly devnet: undefined;
|
|
7
7
|
readonly testnet: "https://api.testnet.shelby.xyz/shelby";
|
package/dist/core/constants.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { Network } from "@aptos-labs/ts-sdk";
|
|
|
3
3
|
var DEFAULT_PROJECT_NAME = "shelby";
|
|
4
4
|
var DEFAULT_PROJECT_DESCRIPTION = "High performance, decentralized storage";
|
|
5
5
|
var NetworkToShelbyRPCBaseUrl = {
|
|
6
|
-
[Network.SHELBYNET]: "https://
|
|
6
|
+
[Network.SHELBYNET]: "https://shelby.shelbynet.shelby.xyz/shelby",
|
|
7
7
|
[Network.NETNA]: void 0,
|
|
8
8
|
[Network.DEVNET]: void 0,
|
|
9
9
|
[Network.TESTNET]: "https://api.testnet.shelby.xyz/shelby",
|
|
@@ -36,6 +36,21 @@ declare const ERASURE_CODE_PARAMS: {
|
|
|
36
36
|
readonly enumIndex: 1;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Look up an erasure coding scheme by its total-chunk count (`erasure_n`).
|
|
41
|
+
* Returns the `[scheme, params]` entry, or `undefined` if no scheme matches.
|
|
42
|
+
* Shared by callers that need to recover a scheme's `erasure_k`/`erasure_d`
|
|
43
|
+
* (or its key for {@link ERASURE_CODE_AND_CHUNK_MAPPING}) from `erasure_n`
|
|
44
|
+
* alone, so the lookup stays in one place as schemes are added.
|
|
45
|
+
*/
|
|
46
|
+
declare function findErasureSchemeByErasureN(erasureN: number): [ErasureCodingScheme, ErasureSchemeParams] | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Number of storage-provider acknowledgements required to finalize a blob on
|
|
49
|
+
* chain: the erasure scheme's helper-node count (`erasure_d`), recovered from
|
|
50
|
+
* the scheme's total-chunk count (`erasure_n`). Throws if `erasureN` matches no
|
|
51
|
+
* known scheme.
|
|
52
|
+
*/
|
|
53
|
+
declare function requiredAckCount(erasureN: number): number;
|
|
39
54
|
/**
|
|
40
55
|
* The total number of chunks (data + parity) in the erasure coding scheme.
|
|
41
56
|
*/
|
|
@@ -57,4 +72,4 @@ declare const DEFAULT_ERASURE_M: number;
|
|
|
57
72
|
*/
|
|
58
73
|
declare const DEFAULT_SAMPLE_SIZE = 1024;
|
|
59
74
|
|
|
60
|
-
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, DEFAULT_SAMPLE_SIZE, ERASURE_CODE_PARAMS, type ErasureCodeParams, ErasureCodingScheme, type ErasureSchemeParams };
|
|
75
|
+
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, DEFAULT_SAMPLE_SIZE, ERASURE_CODE_PARAMS, type ErasureCodeParams, ErasureCodingScheme, type ErasureSchemeParams, findErasureSchemeByErasureN, requiredAckCount };
|
|
@@ -26,6 +26,18 @@ var ERASURE_CODE_PARAMS = {
|
|
|
26
26
|
enumIndex: 1
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
+
function findErasureSchemeByErasureN(erasureN) {
|
|
30
|
+
return Object.entries(ERASURE_CODE_PARAMS).find(
|
|
31
|
+
([, params]) => params.erasure_n === erasureN
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function requiredAckCount(erasureN) {
|
|
35
|
+
const scheme = findErasureSchemeByErasureN(erasureN);
|
|
36
|
+
if (!scheme) {
|
|
37
|
+
throw new Error(`Unknown erasure coding scheme with erasure_n=${erasureN}`);
|
|
38
|
+
}
|
|
39
|
+
return scheme[1].erasure_d;
|
|
40
|
+
}
|
|
29
41
|
var DEFAULT_ERASURE_N = ERASURE_CODE_PARAMS["ClayCode_16Total_10Data_13Helper" /* ClayCode_16Total_10Data_13Helper */].erasure_n;
|
|
30
42
|
var DEFAULT_ERASURE_K = ERASURE_CODE_PARAMS["ClayCode_16Total_10Data_13Helper" /* ClayCode_16Total_10Data_13Helper */].erasure_k;
|
|
31
43
|
var DEFAULT_ERASURE_D = ERASURE_CODE_PARAMS["ClayCode_16Total_10Data_13Helper" /* ClayCode_16Total_10Data_13Helper */].erasure_d;
|
|
@@ -38,5 +50,7 @@ export {
|
|
|
38
50
|
DEFAULT_ERASURE_N,
|
|
39
51
|
DEFAULT_SAMPLE_SIZE,
|
|
40
52
|
ERASURE_CODE_PARAMS,
|
|
41
|
-
ErasureCodingScheme
|
|
53
|
+
ErasureCodingScheme,
|
|
54
|
+
findErasureSchemeByErasureN,
|
|
55
|
+
requiredAckCount
|
|
42
56
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { C as ClayErasureCodingProvider, D as DecodeConfig, E as ErasureCodingConfig, a as ErasureCodingProvider, R as ReedSolomonErasureCodingProvider } from '../../clay-codes-DdXABBDx.js';
|
|
2
|
-
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, DEFAULT_SAMPLE_SIZE, ERASURE_CODE_PARAMS, ErasureCodeParams, ErasureCodingScheme, ErasureSchemeParams } from './constants.js';
|
|
2
|
+
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, DEFAULT_SAMPLE_SIZE, ERASURE_CODE_PARAMS, ErasureCodeParams, ErasureCodingScheme, ErasureSchemeParams, findErasureSchemeByErasureN, requiredAckCount } from './constants.js';
|
|
3
3
|
export { createDefaultErasureCodingProvider, defaultErasureCodingConfig, erasureCodingConfig16Total10Data13Helper, erasureCodingConfig4Total2Data3Helper } from './default.js';
|
|
4
4
|
import '@shelby-protocol/clay-codes';
|
|
@@ -130,6 +130,18 @@ var ERASURE_CODE_PARAMS = {
|
|
|
130
130
|
enumIndex: 1
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
+
function findErasureSchemeByErasureN(erasureN) {
|
|
134
|
+
return Object.entries(ERASURE_CODE_PARAMS).find(
|
|
135
|
+
([, params]) => params.erasure_n === erasureN
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function requiredAckCount(erasureN) {
|
|
139
|
+
const scheme = findErasureSchemeByErasureN(erasureN);
|
|
140
|
+
if (!scheme) {
|
|
141
|
+
throw new Error(`Unknown erasure coding scheme with erasure_n=${erasureN}`);
|
|
142
|
+
}
|
|
143
|
+
return scheme[1].erasure_d;
|
|
144
|
+
}
|
|
133
145
|
var DEFAULT_ERASURE_N = ERASURE_CODE_PARAMS["ClayCode_16Total_10Data_13Helper" /* ClayCode_16Total_10Data_13Helper */].erasure_n;
|
|
134
146
|
var DEFAULT_ERASURE_K = ERASURE_CODE_PARAMS["ClayCode_16Total_10Data_13Helper" /* ClayCode_16Total_10Data_13Helper */].erasure_k;
|
|
135
147
|
var DEFAULT_ERASURE_D = ERASURE_CODE_PARAMS["ClayCode_16Total_10Data_13Helper" /* ClayCode_16Total_10Data_13Helper */].erasure_d;
|
|
@@ -278,5 +290,7 @@ export {
|
|
|
278
290
|
createDefaultErasureCodingProvider,
|
|
279
291
|
defaultErasureCodingConfig,
|
|
280
292
|
erasureCodingConfig16Total10Data13Helper,
|
|
281
|
-
erasureCodingConfig4Total2Data3Helper
|
|
293
|
+
erasureCodingConfig4Total2Data3Helper,
|
|
294
|
+
findErasureSchemeByErasureN,
|
|
295
|
+
requiredAckCount
|
|
282
296
|
};
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -54,5 +54,24 @@ declare function isBlobNotFoundError(errorMessage: string): boolean;
|
|
|
54
54
|
* @returns true if the error indicates the blob has expired
|
|
55
55
|
*/
|
|
56
56
|
declare function isBlobExpiredError(errorMessage: string): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Error codes raised while resolving the location a write lands in.
|
|
59
|
+
*
|
|
60
|
+
* @see move/shelby_contract/sources/location.move
|
|
61
|
+
* @see move/shelby_contract/sources/location_preference.move
|
|
62
|
+
*/
|
|
63
|
+
declare const ShelbyLocationErrorCodes: {
|
|
64
|
+
readonly E_LOCATION_NOT_FOUND: "E_LOCATION_NOT_FOUND";
|
|
65
|
+
readonly E_SELECTED_LOCATION_CONFLICTS_WITH_LOCK: "E_SELECTED_LOCATION_CONFLICTS_WITH_LOCK";
|
|
66
|
+
readonly E_NO_LOCATION_SELECTED: "E_NO_LOCATION_SELECTED";
|
|
67
|
+
readonly E_LOCATION_WRITES_FROZEN: "E_LOCATION_WRITES_FROZEN";
|
|
68
|
+
readonly E_LOCATION_NOT_ACTIVATED: "E_LOCATION_NOT_ACTIVATED";
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Translate a failed-write error into a human-readable explanation when it stems
|
|
72
|
+
* from on-chain location resolution, or `undefined` when the failure is unrelated
|
|
73
|
+
* to locations.
|
|
74
|
+
*/
|
|
75
|
+
declare function describeLocationError(errorMessage: string): string | undefined;
|
|
57
76
|
|
|
58
|
-
export { ShelbyErrorCodes, isAccessDeniedError, isBlobAlreadyExistsError, isBlobExpiredError, isBlobNotFoundError };
|
|
77
|
+
export { ShelbyErrorCodes, ShelbyLocationErrorCodes, describeLocationError, isAccessDeniedError, isBlobAlreadyExistsError, isBlobExpiredError, isBlobNotFoundError };
|
package/dist/core/errors.mjs
CHANGED
|
@@ -27,8 +27,37 @@ function isBlobNotFoundError(errorMessage) {
|
|
|
27
27
|
function isBlobExpiredError(errorMessage) {
|
|
28
28
|
return errorMessage.includes(ShelbyErrorCodes.E_BLOB_EXPIRED);
|
|
29
29
|
}
|
|
30
|
+
var ShelbyLocationErrorCodes = {
|
|
31
|
+
E_LOCATION_NOT_FOUND: "E_LOCATION_NOT_FOUND",
|
|
32
|
+
E_SELECTED_LOCATION_CONFLICTS_WITH_LOCK: "E_SELECTED_LOCATION_CONFLICTS_WITH_LOCK",
|
|
33
|
+
E_NO_LOCATION_SELECTED: "E_NO_LOCATION_SELECTED",
|
|
34
|
+
E_LOCATION_WRITES_FROZEN: "E_LOCATION_WRITES_FROZEN",
|
|
35
|
+
E_LOCATION_NOT_ACTIVATED: "E_LOCATION_NOT_ACTIVATED"
|
|
36
|
+
};
|
|
37
|
+
function describeLocationError(errorMessage) {
|
|
38
|
+
if (errorMessage.includes(ShelbyLocationErrorCodes.E_LOCATION_WRITES_FROZEN)) {
|
|
39
|
+
return "Cannot write: the resolved location is frozen and not currently accepting new data.";
|
|
40
|
+
}
|
|
41
|
+
if (errorMessage.includes(ShelbyLocationErrorCodes.E_LOCATION_NOT_ACTIVATED)) {
|
|
42
|
+
return "Cannot write: the resolved location is not activated yet.";
|
|
43
|
+
}
|
|
44
|
+
if (errorMessage.includes(
|
|
45
|
+
ShelbyLocationErrorCodes.E_SELECTED_LOCATION_CONFLICTS_WITH_LOCK
|
|
46
|
+
)) {
|
|
47
|
+
return "Cannot write: the selected location conflicts with the account's locked location preference.";
|
|
48
|
+
}
|
|
49
|
+
if (errorMessage.includes(ShelbyLocationErrorCodes.E_NO_LOCATION_SELECTED)) {
|
|
50
|
+
return "No write location could be resolved: none was selected and the account has no default location or location hint.";
|
|
51
|
+
}
|
|
52
|
+
if (errorMessage.includes(ShelbyLocationErrorCodes.E_LOCATION_NOT_FOUND)) {
|
|
53
|
+
return "Cannot write: the requested location does not exist.";
|
|
54
|
+
}
|
|
55
|
+
return void 0;
|
|
56
|
+
}
|
|
30
57
|
export {
|
|
31
58
|
ShelbyErrorCodes,
|
|
59
|
+
ShelbyLocationErrorCodes,
|
|
60
|
+
describeLocationError,
|
|
32
61
|
isAccessDeniedError,
|
|
33
62
|
isBlobAlreadyExistsError,
|
|
34
63
|
isBlobExpiredError,
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export { getAptosAccountExplorerUrl, getAptosTransactionExplorerUrl } from './aptos-explorer.js';
|
|
2
2
|
export { ShelbyBlob, createBlobKey } from './blobs.js';
|
|
3
3
|
export { CHUNK_SIZE_PARAMS, ChunkSizeScheme, DEFAULT_CHUNKSET_SIZE_BYTES, DEFAULT_CHUNK_SIZE_BYTES, ERASURE_CODE_AND_CHUNK_MAPPING } from './chunk.js';
|
|
4
|
-
export { AckTransactionOptions, BuildOptions, MissingTransactionSubmitterError, ShelbyBlobClient, UsdSponsorOptions, WriteBlobCommitmentsOptions } from './clients/ShelbyBlobClient.js';
|
|
4
|
+
export { AckTransactionOptions, BuildOptions, CommitRejectionReason, MissingTransactionSubmitterError, ObjectCommitRejectedError, ShelbyBlobClient, UsdSponsorOptions, WriteBlobCommitmentsOptions } from './clients/ShelbyBlobClient.js';
|
|
5
5
|
export { ShelbyClient, UploadOptions } from './clients/ShelbyClient.js';
|
|
6
6
|
export { ShelbyClientConfig, ShelbyIndexerConfig, ShelbyRPCConfig } from './clients/ShelbyClientConfig.js';
|
|
7
7
|
export { ShelbyMetadataClient } from './clients/ShelbyMetadataClient.js';
|
|
8
8
|
export { ShelbyMicropaymentChannelClient } from './clients/ShelbyMicropaymentChannelClient.js';
|
|
9
9
|
export { ShelbyPlacementGroupClient } from './clients/ShelbyPlacementGroupClient.js';
|
|
10
|
-
export { AuthScheme, BlobDataSource, BlobOwnerAuth, DerivableBlobOwnerAuth, Ed25519BlobOwnerAuth,
|
|
11
|
-
export { BlobCommitments, BlobCommitmentsSchema, COMMITMENT_SCHEMA_VERSION, ChunksetCommitment, ChunksetCommitmentSchema, expectedTotalChunksets, generateCommitments, generateMerkleRoot } from './commitments.js';
|
|
10
|
+
export { AuthScheme, BlobDataSource, BlobOwnerAuth, DerivableBlobOwnerAuth, Ed25519BlobOwnerAuth, PutBlobChunksetsProgress, PutBlobChunksetsResult, ShelbyRPCClient } from './clients/ShelbyRPCClient.js';
|
|
11
|
+
export { BlobCommitments, BlobCommitmentsSchema, COMMITMENT_SCHEMA_VERSION, ChunksetCommitment, ChunksetCommitmentSchema, expectedChunksetInclusionProofHashes, expectedTotalChunksets, generateCommitments, generateMerkleRoot } from './commitments.js';
|
|
12
12
|
export { DEFAULT_PROJECT_DESCRIPTION, DEFAULT_PROJECT_NAME, MICROPAYMENTS_DEPLOYER, NetworkToGasStationBaseUrl, NetworkToShelbyBlobIndexerBaseUrl, NetworkToShelbyRPCBaseUrl, SHELBYUSD_FA_METADATA_ADDRESS, SHELBYUSD_TOKEN_ADDRESS, SHELBYUSD_TOKEN_MODULE, SHELBYUSD_TOKEN_NAME, SHELBY_DEPLOYER, TOKEN_DEPLOYER, TOKEN_OBJECT_ADDRESS } from './constants.js';
|
|
13
13
|
export { C as ClayErasureCodingProvider, D as DecodeConfig, E as ErasureCodingConfig, a as ErasureCodingProvider, R as ReedSolomonErasureCodingProvider } from '../clay-codes-DdXABBDx.js';
|
|
14
|
-
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, DEFAULT_SAMPLE_SIZE, ERASURE_CODE_PARAMS, ErasureCodeParams, ErasureCodingScheme, ErasureSchemeParams } from './erasure/constants.js';
|
|
14
|
+
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, DEFAULT_SAMPLE_SIZE, ERASURE_CODE_PARAMS, ErasureCodeParams, ErasureCodingScheme, ErasureSchemeParams, findErasureSchemeByErasureN, requiredAckCount } from './erasure/constants.js';
|
|
15
15
|
export { createDefaultErasureCodingProvider, defaultErasureCodingConfig, erasureCodingConfig16Total10Data13Helper, erasureCodingConfig4Total2Data3Helper } from './erasure/default.js';
|
|
16
|
-
export { ShelbyErrorCodes, isAccessDeniedError, isBlobAlreadyExistsError, isBlobExpiredError, isBlobNotFoundError } from './errors.js';
|
|
16
|
+
export { ShelbyErrorCodes, ShelbyLocationErrorCodes, describeLocationError, isAccessDeniedError, isBlobAlreadyExistsError, isBlobExpiredError, isBlobNotFoundError } from './errors.js';
|
|
17
17
|
export { BlobName, BlobNameSchema, ChunkKey } from './layout.js';
|
|
18
18
|
export { ShelbyNetwork, isShelbyNetwork, shelbyNetworks } from './networks.js';
|
|
19
19
|
export { ShelbyIndexerClient, createShelbyIndexerClient, getShelbyIndexerClient } from './operations/index.js';
|
|
20
|
-
export { ChallengeResponse, ChallengeResponseSchema,
|
|
20
|
+
export { ChallengeResponse, ChallengeResponseSchema, RPCErrorResponse, RPCErrorResponseSchema, StaleMicropaymentErrorResponse, StaleMicropaymentErrorResponseSchema } from './rpc-responses.js';
|
|
21
21
|
export { getShelbyAccountBlobsExplorerUrl, getShelbyAccountExplorerUrl, getShelbyBlobExplorerUrl } from './shelby-explorer.js';
|
|
22
|
-
export { BlobActivity, BlobActivityType, BlobEncoding,
|
|
22
|
+
export { BlobActivity, BlobActivityType, BlobEncoding, BlobEncryption, BlobEncryptionMoveEnumIndex, ClayEncoding, FullObjectMetadata, StorageProviderAck, blobEncryptionFromMoveVariant, blobEncryptionToMoveEnumIndex } from './types/blobs.js';
|
|
23
23
|
export { ChannelInfo, SenderBuiltMicropayment, StaleChannelStateError } from './types/payments.js';
|
|
24
24
|
export { PlacementGroupInfo, PlacementGroupSlot, PlacementGroupSlotStatus } from './types/placement_groups.js';
|
|
25
|
-
export { ActiveStateDetails, FrozenStateDetails, StorageProviderInfo, StorageProviderStateDetails, WaitlistedStateDetails } from './types/storage_providers.js';
|
|
25
|
+
export { ActiveProviderCondition, ActiveStateDetails, FrozenStateDetails, StorageProviderInfo, StorageProviderStateDetails, WaitlistedStateDetails, isActiveForTasks, isActiveProviderCondition } from './types/storage_providers.js';
|
|
26
26
|
export { buildRequestUrl, concatHashes, getBlobNameSuffix, normalizeAddress, readInChunks, zeroPadBytes } from './utils.js';
|
|
27
|
-
export { Bigint_Comparison_Exp, Blob_Activities, Blob_Activities_Aggregate, Blob_Activities_Aggregate_Fields, Blob_Activities_Aggregate_FieldsCountArgs, Blob_Activities_Avg_Fields, Blob_Activities_Bool_Exp, Blob_Activities_Max_Fields, Blob_Activities_Min_Fields, Blob_Activities_Order_By, Blob_Activities_Select_Column, Blob_Activities_Stddev_Fields, Blob_Activities_Stddev_Pop_Fields, Blob_Activities_Stddev_Samp_Fields, Blob_Activities_Stream_Cursor_Input, Blob_Activities_Stream_Cursor_Value_Input, Blob_Activities_Sum_Fields, Blob_Activities_Var_Pop_Fields, Blob_Activities_Var_Samp_Fields, Blob_Activities_Variance_Fields, Blobs, BlobsPlacement_Group_SlotsArgs, BlobsPlacement_Group_Slots_AggregateArgs, Blobs_Aggregate, Blobs_Aggregate_Fields, Blobs_Aggregate_FieldsCountArgs, Blobs_Avg_Fields, Blobs_Bool_Exp, Blobs_Max_Fields, Blobs_Min_Fields, Blobs_Order_By, Blobs_Select_Column, Blobs_Stddev_Fields, Blobs_Stddev_Pop_Fields, Blobs_Stddev_Samp_Fields, Blobs_Stream_Cursor_Input, Blobs_Stream_Cursor_Value_Input, Blobs_Sum_Fields, Blobs_Var_Pop_Fields, Blobs_Var_Samp_Fields, Blobs_Variance_Fields, Cursor_Ordering, Exact, GetBlobActivitiesCountDocument, GetBlobActivitiesCountQuery, GetBlobActivitiesCountQueryVariables, GetBlobActivitiesDocument, GetBlobActivitiesQuery, GetBlobActivitiesQueryVariables, GetBlobsCountDocument, GetBlobsCountQuery, GetBlobsCountQueryVariables, GetBlobsDocument, GetBlobsQuery, GetBlobsQueryVariables, GetPlacementGroupSlotsCountDocument, GetPlacementGroupSlotsCountQuery, GetPlacementGroupSlotsCountQueryVariables, GetPlacementGroupSlotsDocument, GetPlacementGroupSlotsQuery, GetPlacementGroupSlotsQueryVariables, GetProcessorStatusDocument, GetProcessorStatusQuery, GetProcessorStatusQueryVariables, GetTotalBlobsSizeDocument, GetTotalBlobsSizeQuery, GetTotalBlobsSizeQueryVariables, Incremental, InputMaybe, Int_Comparison_Exp, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Numeric_Comparison_Exp, Order_By, Placement_Group_Slots, Placement_Group_Slots_Aggregate, Placement_Group_Slots_Aggregate_Bool_Exp, Placement_Group_Slots_Aggregate_Bool_Exp_Count, Placement_Group_Slots_Aggregate_Fields, Placement_Group_Slots_Aggregate_FieldsCountArgs, Placement_Group_Slots_Aggregate_Order_By, Placement_Group_Slots_Avg_Fields, Placement_Group_Slots_Avg_Order_By, Placement_Group_Slots_Bool_Exp, Placement_Group_Slots_Max_Fields, Placement_Group_Slots_Max_Order_By, Placement_Group_Slots_Min_Fields, Placement_Group_Slots_Min_Order_By, Placement_Group_Slots_Order_By, Placement_Group_Slots_Select_Column, Placement_Group_Slots_Stddev_Fields, Placement_Group_Slots_Stddev_Order_By, Placement_Group_Slots_Stddev_Pop_Fields, Placement_Group_Slots_Stddev_Pop_Order_By, Placement_Group_Slots_Stddev_Samp_Fields, Placement_Group_Slots_Stddev_Samp_Order_By, Placement_Group_Slots_Stream_Cursor_Input, Placement_Group_Slots_Stream_Cursor_Value_Input, Placement_Group_Slots_Sum_Fields, Placement_Group_Slots_Sum_Order_By, Placement_Group_Slots_Var_Pop_Fields, Placement_Group_Slots_Var_Pop_Order_By, Placement_Group_Slots_Var_Samp_Fields, Placement_Group_Slots_Var_Samp_Order_By, Placement_Group_Slots_Variance_Fields, Placement_Group_Slots_Variance_Order_By, Processor_Status, Processor_Status_Bool_Exp, Processor_Status_Order_By, Processor_Status_Select_Column, Processor_Status_Stream_Cursor_Input, Processor_Status_Stream_Cursor_Value_Input, Query_Root, Query_RootBlob_ActivitiesArgs, Query_RootBlob_Activities_AggregateArgs, Query_RootBlob_Activities_By_PkArgs, Query_RootBlobsArgs, Query_RootBlobs_AggregateArgs, Query_RootBlobs_By_PkArgs, Query_RootPlacement_Group_SlotsArgs, Query_RootPlacement_Group_Slots_AggregateArgs, Query_RootPlacement_Group_Slots_By_PkArgs, Query_RootProcessor_StatusArgs, Scalars, Sdk, SdkFunctionWrapper, String_Comparison_Exp, Subscription_Root, Subscription_RootBlob_ActivitiesArgs, Subscription_RootBlob_Activities_AggregateArgs, Subscription_RootBlob_Activities_By_PkArgs, Subscription_RootBlob_Activities_StreamArgs, Subscription_RootBlobsArgs, Subscription_RootBlobs_AggregateArgs, Subscription_RootBlobs_By_PkArgs, Subscription_RootBlobs_StreamArgs, Subscription_RootPlacement_Group_SlotsArgs, Subscription_RootPlacement_Group_Slots_AggregateArgs, Subscription_RootPlacement_Group_Slots_By_PkArgs, Subscription_RootPlacement_Group_Slots_StreamArgs, Subscription_RootProcessor_StatusArgs, Subscription_RootProcessor_Status_StreamArgs, Timestamp_Comparison_Exp, getSdk } from './operations/generated/sdk.js';
|
|
27
|
+
export { Bigint_Comparison_Exp, Blob_Activities, Blob_Activities_Aggregate, Blob_Activities_Aggregate_Fields, Blob_Activities_Aggregate_FieldsCountArgs, Blob_Activities_Avg_Fields, Blob_Activities_Bool_Exp, Blob_Activities_Constraint, Blob_Activities_Inc_Input, Blob_Activities_Insert_Input, Blob_Activities_Max_Fields, Blob_Activities_Min_Fields, Blob_Activities_Mutation_Response, Blob_Activities_On_Conflict, Blob_Activities_Order_By, Blob_Activities_Pk_Columns_Input, Blob_Activities_Select_Column, Blob_Activities_Set_Input, Blob_Activities_Stddev_Fields, Blob_Activities_Stddev_Pop_Fields, Blob_Activities_Stddev_Samp_Fields, Blob_Activities_Stream_Cursor_Input, Blob_Activities_Stream_Cursor_Value_Input, Blob_Activities_Sum_Fields, Blob_Activities_Update_Column, Blob_Activities_Updates, Blob_Activities_Var_Pop_Fields, Blob_Activities_Var_Samp_Fields, Blob_Activities_Variance_Fields, Blobs, BlobsPlacement_Group_SlotsArgs, BlobsPlacement_Group_Slots_AggregateArgs, Blobs_Aggregate, Blobs_Aggregate_Fields, Blobs_Aggregate_FieldsCountArgs, Blobs_Avg_Fields, Blobs_Bool_Exp, Blobs_Constraint, Blobs_Inc_Input, Blobs_Insert_Input, Blobs_Max_Fields, Blobs_Min_Fields, Blobs_Mutation_Response, Blobs_On_Conflict, Blobs_Order_By, Blobs_Pk_Columns_Input, Blobs_Select_Column, Blobs_Set_Input, Blobs_Stddev_Fields, Blobs_Stddev_Pop_Fields, Blobs_Stddev_Samp_Fields, Blobs_Stream_Cursor_Input, Blobs_Stream_Cursor_Value_Input, Blobs_Sum_Fields, Blobs_Update_Column, Blobs_Updates, Blobs_Var_Pop_Fields, Blobs_Var_Samp_Fields, Blobs_Variance_Fields, Cursor_Ordering, Exact, GetBlobActivitiesCountDocument, GetBlobActivitiesCountQuery, GetBlobActivitiesCountQueryVariables, GetBlobActivitiesDocument, GetBlobActivitiesQuery, GetBlobActivitiesQueryVariables, GetBlobsCountDocument, GetBlobsCountQuery, GetBlobsCountQueryVariables, GetBlobsDocument, GetBlobsQuery, GetBlobsQueryVariables, GetPlacementGroupSlotsCountDocument, GetPlacementGroupSlotsCountQuery, GetPlacementGroupSlotsCountQueryVariables, GetPlacementGroupSlotsDocument, GetPlacementGroupSlotsQuery, GetPlacementGroupSlotsQueryVariables, GetProcessorStatusDocument, GetProcessorStatusQuery, GetProcessorStatusQueryVariables, GetTotalBlobsSizeDocument, GetTotalBlobsSizeQuery, GetTotalBlobsSizeQueryVariables, Incremental, InputMaybe, Int_Comparison_Exp, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Mutation_Root, Mutation_RootDelete_Blob_ActivitiesArgs, Mutation_RootDelete_Blob_Activities_By_PkArgs, Mutation_RootDelete_BlobsArgs, Mutation_RootDelete_Blobs_By_PkArgs, Mutation_RootDelete_Placement_Group_SlotsArgs, Mutation_RootDelete_Placement_Group_Slots_By_PkArgs, Mutation_RootDelete_Processor_StatusArgs, Mutation_RootDelete_Processor_Status_By_PkArgs, Mutation_RootInsert_Blob_ActivitiesArgs, Mutation_RootInsert_Blob_Activities_OneArgs, Mutation_RootInsert_BlobsArgs, Mutation_RootInsert_Blobs_OneArgs, Mutation_RootInsert_Placement_Group_SlotsArgs, Mutation_RootInsert_Placement_Group_Slots_OneArgs, Mutation_RootInsert_Processor_StatusArgs, Mutation_RootInsert_Processor_Status_OneArgs, Mutation_RootUpdate_Blob_ActivitiesArgs, Mutation_RootUpdate_Blob_Activities_By_PkArgs, Mutation_RootUpdate_Blob_Activities_ManyArgs, Mutation_RootUpdate_BlobsArgs, Mutation_RootUpdate_Blobs_By_PkArgs, Mutation_RootUpdate_Blobs_ManyArgs, Mutation_RootUpdate_Placement_Group_SlotsArgs, Mutation_RootUpdate_Placement_Group_Slots_By_PkArgs, Mutation_RootUpdate_Placement_Group_Slots_ManyArgs, Mutation_RootUpdate_Processor_StatusArgs, Mutation_RootUpdate_Processor_Status_By_PkArgs, Mutation_RootUpdate_Processor_Status_ManyArgs, Numeric_Comparison_Exp, Order_By, Placement_Group_Slots, Placement_Group_Slots_Aggregate, Placement_Group_Slots_Aggregate_Bool_Exp, Placement_Group_Slots_Aggregate_Bool_Exp_Count, Placement_Group_Slots_Aggregate_Fields, Placement_Group_Slots_Aggregate_FieldsCountArgs, Placement_Group_Slots_Aggregate_Order_By, Placement_Group_Slots_Arr_Rel_Insert_Input, Placement_Group_Slots_Avg_Fields, Placement_Group_Slots_Avg_Order_By, Placement_Group_Slots_Bool_Exp, Placement_Group_Slots_Constraint, Placement_Group_Slots_Inc_Input, Placement_Group_Slots_Insert_Input, Placement_Group_Slots_Max_Fields, Placement_Group_Slots_Max_Order_By, Placement_Group_Slots_Min_Fields, Placement_Group_Slots_Min_Order_By, Placement_Group_Slots_Mutation_Response, Placement_Group_Slots_On_Conflict, Placement_Group_Slots_Order_By, Placement_Group_Slots_Pk_Columns_Input, Placement_Group_Slots_Select_Column, Placement_Group_Slots_Set_Input, Placement_Group_Slots_Stddev_Fields, Placement_Group_Slots_Stddev_Order_By, Placement_Group_Slots_Stddev_Pop_Fields, Placement_Group_Slots_Stddev_Pop_Order_By, Placement_Group_Slots_Stddev_Samp_Fields, Placement_Group_Slots_Stddev_Samp_Order_By, Placement_Group_Slots_Stream_Cursor_Input, Placement_Group_Slots_Stream_Cursor_Value_Input, Placement_Group_Slots_Sum_Fields, Placement_Group_Slots_Sum_Order_By, Placement_Group_Slots_Update_Column, Placement_Group_Slots_Updates, Placement_Group_Slots_Var_Pop_Fields, Placement_Group_Slots_Var_Pop_Order_By, Placement_Group_Slots_Var_Samp_Fields, Placement_Group_Slots_Var_Samp_Order_By, Placement_Group_Slots_Variance_Fields, Placement_Group_Slots_Variance_Order_By, Processor_Status, Processor_Status_Aggregate, Processor_Status_Aggregate_Fields, Processor_Status_Aggregate_FieldsCountArgs, Processor_Status_Avg_Fields, Processor_Status_Bool_Exp, Processor_Status_Constraint, Processor_Status_Inc_Input, Processor_Status_Insert_Input, Processor_Status_Max_Fields, Processor_Status_Min_Fields, Processor_Status_Mutation_Response, Processor_Status_On_Conflict, Processor_Status_Order_By, Processor_Status_Pk_Columns_Input, Processor_Status_Select_Column, Processor_Status_Set_Input, Processor_Status_Stddev_Fields, Processor_Status_Stddev_Pop_Fields, Processor_Status_Stddev_Samp_Fields, Processor_Status_Stream_Cursor_Input, Processor_Status_Stream_Cursor_Value_Input, Processor_Status_Sum_Fields, Processor_Status_Update_Column, Processor_Status_Updates, Processor_Status_Var_Pop_Fields, Processor_Status_Var_Samp_Fields, Processor_Status_Variance_Fields, Query_Root, Query_RootBlob_ActivitiesArgs, Query_RootBlob_Activities_AggregateArgs, Query_RootBlob_Activities_By_PkArgs, Query_RootBlobsArgs, Query_RootBlobs_AggregateArgs, Query_RootBlobs_By_PkArgs, Query_RootPlacement_Group_SlotsArgs, Query_RootPlacement_Group_Slots_AggregateArgs, Query_RootPlacement_Group_Slots_By_PkArgs, Query_RootProcessor_StatusArgs, Query_RootProcessor_Status_AggregateArgs, Query_RootProcessor_Status_By_PkArgs, Scalars, Sdk, SdkFunctionWrapper, String_Comparison_Exp, Subscription_Root, Subscription_RootBlob_ActivitiesArgs, Subscription_RootBlob_Activities_AggregateArgs, Subscription_RootBlob_Activities_By_PkArgs, Subscription_RootBlob_Activities_StreamArgs, Subscription_RootBlobsArgs, Subscription_RootBlobs_AggregateArgs, Subscription_RootBlobs_By_PkArgs, Subscription_RootBlobs_StreamArgs, Subscription_RootPlacement_Group_SlotsArgs, Subscription_RootPlacement_Group_Slots_AggregateArgs, Subscription_RootPlacement_Group_Slots_By_PkArgs, Subscription_RootPlacement_Group_Slots_StreamArgs, Subscription_RootProcessor_StatusArgs, Subscription_RootProcessor_Status_AggregateArgs, Subscription_RootProcessor_Status_By_PkArgs, Subscription_RootProcessor_Status_StreamArgs, Timestamp_Comparison_Exp, getSdk } from './operations/generated/sdk.js';
|
|
28
28
|
import '@aptos-labs/ts-sdk';
|
|
29
29
|
import 'zod';
|
|
30
30
|
import '@shelby-protocol/clay-codes';
|