@shelby-protocol/sdk 0.0.8 → 0.1.0
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 +13 -7
- package/dist/browser/index.mjs +102 -49
- package/dist/{chunk-HFGEQP5N.mjs → chunk-3ZL3FSNA.mjs} +4 -4
- package/dist/chunk-4MG4XGY4.mjs +91 -0
- package/dist/chunk-66GI734H.mjs +493 -0
- package/dist/chunk-AABBONAF.mjs +34 -0
- package/dist/{chunk-BBOG5JSX.mjs → chunk-AGRRYZWV.mjs} +215 -44
- package/dist/chunk-CQ6QPIZK.mjs +37 -0
- package/dist/{chunk-LGNWAXBG.mjs → chunk-DI2K6OUG.mjs} +1 -1
- package/dist/{chunk-SEXQTDX6.mjs → chunk-FLLOQZVD.mjs} +4 -0
- package/dist/chunk-IE6LYVIA.mjs +26 -0
- package/dist/{chunk-WJKSPJSS.mjs → chunk-KJ24NKPH.mjs} +46 -0
- package/dist/{chunk-ZPW742E7.mjs → chunk-LZSIZJYR.mjs} +3 -1
- package/dist/chunk-MSCUDBMH.mjs +83 -0
- package/dist/{chunk-CPNZAQVY.mjs → chunk-OMZOR2ZF.mjs} +2 -2
- package/dist/chunk-QQ57OGQ2.mjs +0 -0
- package/dist/{chunk-XWAPNLU6.mjs → chunk-RLRI2533.mjs} +4 -2
- package/dist/{chunk-NLPIHQ7K.mjs → chunk-UCDAABAS.mjs} +1 -1
- package/dist/{chunk-GY5DCVVL.mjs → chunk-W5NRGZEP.mjs} +1 -1
- package/dist/{chunk-MGAN2SBA.mjs → chunk-W6YL46DT.mjs} +28 -14
- package/dist/{chunk-CTGCK3H2.mjs → chunk-YZXIPUVQ.mjs} +32 -8
- package/dist/{chunk-QRGZJBAG.mjs → chunk-ZAM2EUVN.mjs} +165 -36
- package/dist/core/chunk.mjs +1 -1
- package/dist/core/clients/ShelbyBlobClient.d.ts +160 -11
- package/dist/core/clients/ShelbyBlobClient.mjs +11 -9
- package/dist/core/clients/ShelbyClient.d.ts +14 -3
- package/dist/core/clients/ShelbyClient.mjs +15 -13
- package/dist/core/clients/ShelbyClientConfig.d.ts +7 -2
- package/dist/core/clients/ShelbyMicropaymentChannelClient.d.ts +349 -0
- package/dist/core/clients/ShelbyMicropaymentChannelClient.mjs +16 -0
- package/dist/core/clients/ShelbyPlacementGroupClient.d.ts +73 -0
- package/dist/core/clients/ShelbyPlacementGroupClient.mjs +11 -0
- package/dist/core/clients/ShelbyRPCClient.d.ts +28 -4
- package/dist/core/clients/ShelbyRPCClient.mjs +9 -7
- package/dist/core/clients/index.d.ts +7 -3
- package/dist/core/clients/index.mjs +33 -17
- package/dist/core/clients/utils.d.ts +54 -0
- package/dist/core/clients/utils.mjs +1 -1
- package/dist/core/commitments.d.ts +5 -1
- package/dist/core/commitments.mjs +4 -2
- package/dist/core/constants.d.ts +4 -1
- package/dist/core/constants.mjs +3 -1
- package/dist/core/erasure/clay-codes.mjs +2 -2
- package/dist/core/erasure/constants.d.ts +5 -1
- package/dist/core/erasure/constants.mjs +3 -1
- package/dist/core/erasure/default.mjs +3 -3
- package/dist/core/erasure/index.d.ts +1 -1
- package/dist/core/erasure/index.mjs +8 -6
- package/dist/core/errors.d.ts +58 -0
- package/dist/core/errors.mjs +15 -0
- package/dist/core/index.d.ts +13 -7
- package/dist/core/index.mjs +102 -49
- package/dist/core/layout.mjs +2 -2
- package/dist/core/operations/generated/sdk.d.ts +207 -17
- package/dist/core/operations/generated/sdk.mjs +7 -1
- package/dist/core/operations/generated/types.d.ts +908 -0
- package/dist/core/operations/generated/types.mjs +63 -0
- package/dist/core/operations/index.d.ts +9 -3
- package/dist/core/operations/index.mjs +10 -4
- package/dist/core/rpc-responses.d.ts +69 -0
- package/dist/core/rpc-responses.mjs +15 -0
- package/dist/core/types/blobs.d.ts +7 -3
- package/dist/core/types/index.d.ts +3 -1
- package/dist/core/types/index.mjs +12 -2
- package/dist/core/types/payments.d.ts +94 -0
- package/dist/core/types/payments.mjs +9 -0
- package/dist/core/types/placement_groups.d.ts +30 -1
- package/dist/core/types/placement_groups.mjs +1 -0
- package/dist/core/types/storage_providers.d.ts +32 -2
- package/dist/node/clients/ShelbyMetadataClient.mjs +3 -3
- package/dist/node/clients/ShelbyNodeClient.d.ts +4 -3
- package/dist/node/clients/ShelbyNodeClient.mjs +16 -14
- package/dist/node/clients/index.d.ts +4 -3
- package/dist/node/clients/index.mjs +19 -17
- package/dist/node/index.d.ts +13 -7
- package/dist/node/index.mjs +106 -53
- package/package.json +3 -2
- package/dist/chunk-RBFWGDMY.mjs +0 -30
- /package/dist/{chunk-DJJD2AXO.mjs → chunk-AD2G3QYD.mjs} +0 -0
- /package/dist/{chunk-MWDW4ROU.mjs → chunk-EM67QTMR.mjs} +0 -0
- /package/dist/{chunk-RNXGC54D.mjs → chunk-FGUK6IBA.mjs} +0 -0
|
@@ -2,6 +2,60 @@ import { AptosConfig } from '@aptos-labs/ts-sdk';
|
|
|
2
2
|
import { ShelbyClientConfig } from './ShelbyClientConfig.js';
|
|
3
3
|
import '../networks.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Creates an AptosConfig from a ShelbyClientConfig.
|
|
7
|
+
*
|
|
8
|
+
* This function handles the translation between Shelby's configuration format
|
|
9
|
+
* and the Aptos SDK's configuration format.
|
|
10
|
+
*
|
|
11
|
+
* ## Authoritative Settings (cannot be overridden by `config.aptos`)
|
|
12
|
+
*
|
|
13
|
+
* - `network` — always comes from `config.network`
|
|
14
|
+
* - `faucet.authToken` — always maps to `faucetConfig.AUTH_TOKEN`
|
|
15
|
+
*
|
|
16
|
+
* ## Merged Settings (from `config.aptos`)
|
|
17
|
+
*
|
|
18
|
+
* When `config.aptos` is provided, the following are merged:
|
|
19
|
+
* - `clientConfig` — `config.apiKey` provides the default `API_KEY`,
|
|
20
|
+
* but `config.aptos.clientConfig` values (including `API_KEY`) take precedence
|
|
21
|
+
* - `faucetConfig` — `config.aptos.faucetConfig` provides non-AUTH_TOKEN defaults
|
|
22
|
+
* (e.g. HEADERS), but `config.faucet.authToken` always wins for AUTH_TOKEN
|
|
23
|
+
* - All other `AptosSettings` fields (e.g. `fullnode`, `indexer`, `pluginSettings`)
|
|
24
|
+
* are passed through from `config.aptos`
|
|
25
|
+
*
|
|
26
|
+
* @param config - The ShelbyClientConfig to convert
|
|
27
|
+
* @returns An AptosConfig instance configured for the specified network
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* import { Network } from "@aptos-labs/ts-sdk";
|
|
32
|
+
*
|
|
33
|
+
* // Simple usage - network and apiKey only
|
|
34
|
+
* const aptosConfig = getAptosConfig({
|
|
35
|
+
* network: Network.SHELBYNET,
|
|
36
|
+
* apiKey: "your-api-key",
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* // With faucet auth token
|
|
40
|
+
* const aptosConfig = getAptosConfig({
|
|
41
|
+
* network: Network.SHELBYNET,
|
|
42
|
+
* apiKey: "your-api-key",
|
|
43
|
+
* faucet: {
|
|
44
|
+
* authToken: "faucet-auth-token",
|
|
45
|
+
* },
|
|
46
|
+
* });
|
|
47
|
+
*
|
|
48
|
+
* // With custom aptos settings (advanced)
|
|
49
|
+
* const aptosConfig = getAptosConfig({
|
|
50
|
+
* network: Network.SHELBYNET,
|
|
51
|
+
* apiKey: "your-api-key",
|
|
52
|
+
* aptos: {
|
|
53
|
+
* fullnode: "https://custom-fullnode.example.com",
|
|
54
|
+
* clientConfig: { HEADERS: { "X-Custom": "value" } },
|
|
55
|
+
* },
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
5
59
|
declare const getAptosConfig: (config: ShelbyClientConfig) => AptosConfig;
|
|
6
60
|
|
|
7
61
|
export { getAptosConfig };
|
|
@@ -3,6 +3,10 @@ import { z } from 'zod';
|
|
|
3
3
|
import { a as ErasureCodingProvider } from '../clay-codes-pdZFxI_B.js';
|
|
4
4
|
import '@shelby-protocol/clay-codes';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Current schema version for blob commitments
|
|
8
|
+
*/
|
|
9
|
+
declare const COMMITMENT_SCHEMA_VERSION = "1.3";
|
|
6
10
|
/**
|
|
7
11
|
* Defines the schema for the commitment format in commitments.json
|
|
8
12
|
* This is used for `shelby encode` and oher commands
|
|
@@ -129,4 +133,4 @@ declare function generateMerkleRoot(leafHashes: Hex[]): Promise<Hex>;
|
|
|
129
133
|
*/
|
|
130
134
|
declare function generateCommitments(provider: ErasureCodingProvider, fullData: ReadableStream<Uint8Array> | Uint8Array, onChunk?: (chunksetIdx: number, chunkIdx: number, chunkData: Uint8Array) => Promise<void> | void, options?: GenerateCommitmentsOptions): Promise<BlobCommitments>;
|
|
131
135
|
|
|
132
|
-
export { type BlobCommitments, BlobCommitmentsSchema, type ChunksetCommitment, ChunksetCommitmentSchema, type GenerateCommitmentsOptions, expectedTotalChunksets, generateCommitments, generateMerkleRoot };
|
|
136
|
+
export { type BlobCommitments, BlobCommitmentsSchema, COMMITMENT_SCHEMA_VERSION, type ChunksetCommitment, ChunksetCommitmentSchema, type GenerateCommitmentsOptions, expectedTotalChunksets, generateCommitments, generateMerkleRoot };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlobCommitmentsSchema,
|
|
3
|
+
COMMITMENT_SCHEMA_VERSION,
|
|
3
4
|
ChunksetCommitmentSchema,
|
|
4
5
|
expectedTotalChunksets,
|
|
5
6
|
generateCommitments,
|
|
6
7
|
generateMerkleRoot
|
|
7
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-RLRI2533.mjs";
|
|
8
9
|
import "../chunk-4JZO2D7T.mjs";
|
|
9
10
|
import "../chunk-67F5YZ25.mjs";
|
|
10
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-LZSIZJYR.mjs";
|
|
11
12
|
import "../chunk-7P6ASYW6.mjs";
|
|
12
13
|
export {
|
|
13
14
|
BlobCommitmentsSchema,
|
|
15
|
+
COMMITMENT_SCHEMA_VERSION,
|
|
14
16
|
ChunksetCommitmentSchema,
|
|
15
17
|
expectedTotalChunksets,
|
|
16
18
|
generateCommitments,
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ declare const DEFAULT_PROJECT_NAME = "shelby";
|
|
|
2
2
|
declare const DEFAULT_PROJECT_DESCRIPTION = "High performance, decentralized storage";
|
|
3
3
|
declare const NetworkToShelbyRPCBaseUrl: {
|
|
4
4
|
readonly shelbynet: "https://api.shelbynet.shelby.xyz/shelby";
|
|
5
|
+
readonly netna: undefined;
|
|
5
6
|
readonly devnet: undefined;
|
|
6
7
|
readonly testnet: undefined;
|
|
7
8
|
readonly mainnet: undefined;
|
|
@@ -13,6 +14,7 @@ declare const NetworkToShelbyRPCBaseUrl: {
|
|
|
13
14
|
*/
|
|
14
15
|
declare const NetworkToShelbyBlobIndexerBaseUrl: {
|
|
15
16
|
readonly shelbynet: "https://api.shelbynet.aptoslabs.com/nocode/v1/public/cmforrguw0042s601fn71f9l2/v1/graphql";
|
|
17
|
+
readonly netna: undefined;
|
|
16
18
|
readonly devnet: undefined;
|
|
17
19
|
readonly testnet: undefined;
|
|
18
20
|
readonly mainnet: undefined;
|
|
@@ -20,6 +22,7 @@ declare const NetworkToShelbyBlobIndexerBaseUrl: {
|
|
|
20
22
|
readonly custom: undefined;
|
|
21
23
|
};
|
|
22
24
|
declare const SHELBY_DEPLOYER = "0xc63d6a5efb0080a6029403131715bd4971e1149f7cc099aac69bb0069b3ddbf5";
|
|
25
|
+
declare const MICROPAYMENTS_DEPLOYER = "0xb42ac038b6dae86f6171e28e297aab9555ce09909445ec579e4ffe6b8d4d63bf";
|
|
23
26
|
declare const TOKEN_DEPLOYER = "0x33009e852be7f93762dd0bf303383c2cb2c5cab7a30d8238ca5f9f177ae75124";
|
|
24
27
|
declare const TOKEN_OBJECT_ADDRESS = "0x249f5c642a63885ff88a5113b3ba0079840af5a1357706f8c7f3bfc5dd12511f";
|
|
25
28
|
declare const SHELBYUSD_TOKEN_ADDRESS = "0x249f5c642a63885ff88a5113b3ba0079840af5a1357706f8c7f3bfc5dd12511f";
|
|
@@ -27,4 +30,4 @@ declare const SHELBYUSD_TOKEN_MODULE = "shelby_usd";
|
|
|
27
30
|
declare const SHELBYUSD_TOKEN_NAME = "ShelbyUSD";
|
|
28
31
|
declare const SHELBYUSD_FA_METADATA_ADDRESS = "0x1b18363a9f1fe5e6ebf247daba5cc1c18052bb232efdc4c50f556053922d98e1";
|
|
29
32
|
|
|
30
|
-
export { DEFAULT_PROJECT_DESCRIPTION, DEFAULT_PROJECT_NAME, NetworkToShelbyBlobIndexerBaseUrl, NetworkToShelbyRPCBaseUrl, SHELBYUSD_FA_METADATA_ADDRESS, SHELBYUSD_TOKEN_ADDRESS, SHELBYUSD_TOKEN_MODULE, SHELBYUSD_TOKEN_NAME, SHELBY_DEPLOYER, TOKEN_DEPLOYER, TOKEN_OBJECT_ADDRESS };
|
|
33
|
+
export { DEFAULT_PROJECT_DESCRIPTION, DEFAULT_PROJECT_NAME, MICROPAYMENTS_DEPLOYER, NetworkToShelbyBlobIndexerBaseUrl, NetworkToShelbyRPCBaseUrl, SHELBYUSD_FA_METADATA_ADDRESS, SHELBYUSD_TOKEN_ADDRESS, SHELBYUSD_TOKEN_MODULE, SHELBYUSD_TOKEN_NAME, SHELBY_DEPLOYER, TOKEN_DEPLOYER, TOKEN_OBJECT_ADDRESS };
|
package/dist/core/constants.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_PROJECT_DESCRIPTION,
|
|
3
3
|
DEFAULT_PROJECT_NAME,
|
|
4
|
+
MICROPAYMENTS_DEPLOYER,
|
|
4
5
|
NetworkToShelbyBlobIndexerBaseUrl,
|
|
5
6
|
NetworkToShelbyRPCBaseUrl,
|
|
6
7
|
SHELBYUSD_FA_METADATA_ADDRESS,
|
|
@@ -10,11 +11,12 @@ import {
|
|
|
10
11
|
SHELBY_DEPLOYER,
|
|
11
12
|
TOKEN_DEPLOYER,
|
|
12
13
|
TOKEN_OBJECT_ADDRESS
|
|
13
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-FLLOQZVD.mjs";
|
|
14
15
|
import "../chunk-7P6ASYW6.mjs";
|
|
15
16
|
export {
|
|
16
17
|
DEFAULT_PROJECT_DESCRIPTION,
|
|
17
18
|
DEFAULT_PROJECT_NAME,
|
|
19
|
+
MICROPAYMENTS_DEPLOYER,
|
|
18
20
|
NetworkToShelbyBlobIndexerBaseUrl,
|
|
19
21
|
NetworkToShelbyRPCBaseUrl,
|
|
20
22
|
SHELBYUSD_FA_METADATA_ADDRESS,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClayErasureCodingProvider
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-UCDAABAS.mjs";
|
|
4
4
|
import "../../chunk-67F5YZ25.mjs";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-LZSIZJYR.mjs";
|
|
6
6
|
import "../../chunk-7P6ASYW6.mjs";
|
|
7
7
|
export {
|
|
8
8
|
ClayErasureCodingProvider
|
|
@@ -44,5 +44,9 @@ declare const DEFAULT_ERASURE_D: 13;
|
|
|
44
44
|
* The number of parity chunks in the erasure coding scheme (derived as n - k).
|
|
45
45
|
*/
|
|
46
46
|
declare const DEFAULT_ERASURE_M: number;
|
|
47
|
+
/**
|
|
48
|
+
* The size of a sample in a Chunk.
|
|
49
|
+
*/
|
|
50
|
+
declare const DEFAULT_SAMPLE_SIZE = 1024;
|
|
47
51
|
|
|
48
|
-
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, ERASURE_CODE_PARAMS, type ErasureCodeParams, ErasureCodingScheme, type ErasureSchemeParams };
|
|
52
|
+
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, DEFAULT_SAMPLE_SIZE, ERASURE_CODE_PARAMS, type ErasureCodeParams, ErasureCodingScheme, type ErasureSchemeParams };
|
|
@@ -3,15 +3,17 @@ import {
|
|
|
3
3
|
DEFAULT_ERASURE_K,
|
|
4
4
|
DEFAULT_ERASURE_M,
|
|
5
5
|
DEFAULT_ERASURE_N,
|
|
6
|
+
DEFAULT_SAMPLE_SIZE,
|
|
6
7
|
ERASURE_CODE_PARAMS,
|
|
7
8
|
ErasureCodingScheme
|
|
8
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-LZSIZJYR.mjs";
|
|
9
10
|
import "../../chunk-7P6ASYW6.mjs";
|
|
10
11
|
export {
|
|
11
12
|
DEFAULT_ERASURE_D,
|
|
12
13
|
DEFAULT_ERASURE_K,
|
|
13
14
|
DEFAULT_ERASURE_M,
|
|
14
15
|
DEFAULT_ERASURE_N,
|
|
16
|
+
DEFAULT_SAMPLE_SIZE,
|
|
15
17
|
ERASURE_CODE_PARAMS,
|
|
16
18
|
ErasureCodingScheme
|
|
17
19
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createDefaultErasureCodingProvider
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-OMZOR2ZF.mjs";
|
|
4
|
+
import "../../chunk-UCDAABAS.mjs";
|
|
5
5
|
import "../../chunk-67F5YZ25.mjs";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-LZSIZJYR.mjs";
|
|
7
7
|
import "../../chunk-7P6ASYW6.mjs";
|
|
8
8
|
export {
|
|
9
9
|
createDefaultErasureCodingProvider
|
|
@@ -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-pdZFxI_B.js';
|
|
2
|
-
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, 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 } from './constants.js';
|
|
3
3
|
export { createDefaultErasureCodingProvider } from './default.js';
|
|
4
4
|
import '@shelby-protocol/clay-codes';
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import "../../chunk-XNEIWM4O.mjs";
|
|
2
|
-
import {
|
|
3
|
-
ReedSolomonErasureCodingProvider
|
|
4
|
-
} from "../../chunk-PZF2VTGP.mjs";
|
|
5
2
|
import {
|
|
6
3
|
createDefaultErasureCodingProvider
|
|
7
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-OMZOR2ZF.mjs";
|
|
8
5
|
import {
|
|
9
6
|
ClayErasureCodingProvider
|
|
10
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-UCDAABAS.mjs";
|
|
8
|
+
import {
|
|
9
|
+
ReedSolomonErasureCodingProvider
|
|
10
|
+
} from "../../chunk-PZF2VTGP.mjs";
|
|
11
11
|
import "../../chunk-67F5YZ25.mjs";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_ERASURE_D,
|
|
14
14
|
DEFAULT_ERASURE_K,
|
|
15
15
|
DEFAULT_ERASURE_M,
|
|
16
16
|
DEFAULT_ERASURE_N,
|
|
17
|
+
DEFAULT_SAMPLE_SIZE,
|
|
17
18
|
ERASURE_CODE_PARAMS,
|
|
18
19
|
ErasureCodingScheme
|
|
19
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-LZSIZJYR.mjs";
|
|
20
21
|
import "../../chunk-7P6ASYW6.mjs";
|
|
21
22
|
export {
|
|
22
23
|
ClayErasureCodingProvider,
|
|
@@ -24,6 +25,7 @@ export {
|
|
|
24
25
|
DEFAULT_ERASURE_K,
|
|
25
26
|
DEFAULT_ERASURE_M,
|
|
26
27
|
DEFAULT_ERASURE_N,
|
|
28
|
+
DEFAULT_SAMPLE_SIZE,
|
|
27
29
|
ERASURE_CODE_PARAMS,
|
|
28
30
|
ErasureCodingScheme,
|
|
29
31
|
ReedSolomonErasureCodingProvider,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shelby contract error codes from Move modules.
|
|
3
|
+
*
|
|
4
|
+
* These error codes are returned by the Shelby Move contracts when
|
|
5
|
+
* transactions fail due to validation or authorization errors.
|
|
6
|
+
*
|
|
7
|
+
* @see move/shelby_contract/sources/blob_metadata.move
|
|
8
|
+
*/
|
|
9
|
+
declare const ShelbyErrorCodes: {
|
|
10
|
+
readonly E_BLOB_NOT_FOUND: "E_BLOB_NOT_FOUND";
|
|
11
|
+
readonly E_INVALID_EXPIRATION_TIME: "E_INVALID_EXPIRATION_TIME";
|
|
12
|
+
readonly E_TEST_ENCODING_NOT_ALLOWED: "E_TEST_ENCODING_NOT_ALLOWED";
|
|
13
|
+
readonly E_BLOB_NOT_EXPIRED: "E_BLOB_NOT_EXPIRED";
|
|
14
|
+
readonly E_INVALID_CHUNKSET_COUNT: "E_INVALID_CHUNKSET_COUNT";
|
|
15
|
+
readonly E_NOT_BLOB_OWNER: "E_NOT_BLOB_OWNER";
|
|
16
|
+
readonly E_NOT_ADMIN: "E_NOT_ADMIN";
|
|
17
|
+
readonly E_BLOB_EXPIRED: "E_BLOB_EXPIRED";
|
|
18
|
+
readonly E_BLOB_NAME_TOO_LONG: "E_BLOB_NAME_TOO_LONG";
|
|
19
|
+
readonly E_INVALID_PAYMENT_EPOCHS: "E_INVALID_PAYMENT_EPOCHS";
|
|
20
|
+
readonly E_NO_SLICES_AVAILABLE: "E_NO_SLICES_AVAILABLE";
|
|
21
|
+
readonly EALREADY_EXISTS: "EALREADY_EXISTS";
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if an error message indicates a blob already exists on chain.
|
|
25
|
+
*
|
|
26
|
+
* This occurs when trying to register a blob with a name that's already
|
|
27
|
+
* registered under the same account.
|
|
28
|
+
*
|
|
29
|
+
* @param errorMessage - The error message from a failed transaction
|
|
30
|
+
* @returns true if the error indicates the blob already exists
|
|
31
|
+
*/
|
|
32
|
+
declare function isBlobAlreadyExistsError(errorMessage: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Check if an error message indicates an access/permission denied error.
|
|
35
|
+
*
|
|
36
|
+
* This covers scenarios where the caller doesn't have permission to
|
|
37
|
+
* perform the requested operation on a blob or account.
|
|
38
|
+
*
|
|
39
|
+
* @param errorMessage - The error message from a failed transaction
|
|
40
|
+
* @returns true if the error indicates access was denied
|
|
41
|
+
*/
|
|
42
|
+
declare function isAccessDeniedError(errorMessage: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Check if an error message indicates the blob was not found.
|
|
45
|
+
*
|
|
46
|
+
* @param errorMessage - The error message from a failed transaction
|
|
47
|
+
* @returns true if the error indicates the blob doesn't exist
|
|
48
|
+
*/
|
|
49
|
+
declare function isBlobNotFoundError(errorMessage: string): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Check if an error message indicates the blob has expired.
|
|
52
|
+
*
|
|
53
|
+
* @param errorMessage - The error message from a failed transaction
|
|
54
|
+
* @returns true if the error indicates the blob has expired
|
|
55
|
+
*/
|
|
56
|
+
declare function isBlobExpiredError(errorMessage: string): boolean;
|
|
57
|
+
|
|
58
|
+
export { ShelbyErrorCodes, isAccessDeniedError, isBlobAlreadyExistsError, isBlobExpiredError, isBlobNotFoundError };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ShelbyErrorCodes,
|
|
3
|
+
isAccessDeniedError,
|
|
4
|
+
isBlobAlreadyExistsError,
|
|
5
|
+
isBlobExpiredError,
|
|
6
|
+
isBlobNotFoundError
|
|
7
|
+
} from "../chunk-CQ6QPIZK.mjs";
|
|
8
|
+
import "../chunk-7P6ASYW6.mjs";
|
|
9
|
+
export {
|
|
10
|
+
ShelbyErrorCodes,
|
|
11
|
+
isAccessDeniedError,
|
|
12
|
+
isBlobAlreadyExistsError,
|
|
13
|
+
isBlobExpiredError,
|
|
14
|
+
isBlobNotFoundError
|
|
15
|
+
};
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
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 { ShelbyBlobClient } from './clients/ShelbyBlobClient.js';
|
|
4
|
+
export { AckTransactionOptions, BuildOptions, MissingTransactionSubmitterError, 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
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
7
|
+
export { ShelbyMicropaymentChannelClient } from './clients/ShelbyMicropaymentChannelClient.js';
|
|
8
|
+
export { ShelbyPlacementGroupClient } from './clients/ShelbyPlacementGroupClient.js';
|
|
9
|
+
export { BlobDataSource, PutBlobProgress, ShelbyRPCClient } from './clients/ShelbyRPCClient.js';
|
|
10
|
+
export { BlobCommitments, BlobCommitmentsSchema, COMMITMENT_SCHEMA_VERSION, ChunksetCommitment, ChunksetCommitmentSchema, GenerateCommitmentsOptions, expectedTotalChunksets, generateCommitments, generateMerkleRoot } from './commitments.js';
|
|
11
|
+
export { DEFAULT_PROJECT_DESCRIPTION, DEFAULT_PROJECT_NAME, MICROPAYMENTS_DEPLOYER, 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';
|
|
10
12
|
export { C as ClayErasureCodingProvider, D as DecodeConfig, E as ErasureCodingConfig, a as ErasureCodingProvider, R as ReedSolomonErasureCodingProvider } from '../clay-codes-pdZFxI_B.js';
|
|
11
|
-
export { DEFAULT_ERASURE_D, DEFAULT_ERASURE_K, DEFAULT_ERASURE_M, DEFAULT_ERASURE_N, ERASURE_CODE_PARAMS, ErasureCodeParams, ErasureCodingScheme, ErasureSchemeParams } from './erasure/constants.js';
|
|
13
|
+
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';
|
|
12
14
|
export { createDefaultErasureCodingProvider } from './erasure/default.js';
|
|
15
|
+
export { ShelbyErrorCodes, isAccessDeniedError, isBlobAlreadyExistsError, isBlobExpiredError, isBlobNotFoundError } from './errors.js';
|
|
13
16
|
export { BlobName, BlobNameSchema, ChunkKey, allChunksForBlob, roundSize } from './layout.js';
|
|
14
17
|
export { ShelbyNetwork, isShelbyNetwork, shelbyNetworks } from './networks.js';
|
|
15
18
|
export { ShelbyIndexerClient, createShelbyIndexerClient, getShelbyIndexerClient } from './operations/index.js';
|
|
19
|
+
export { CompleteMultipartUploadResponse, CompleteMultipartUploadResponseSchema, RPCErrorResponse, RPCErrorResponseSchema, StaleMicropaymentErrorResponse, StaleMicropaymentErrorResponseSchema, StartMultipartUploadResponse, StartMultipartUploadResponseSchema, UploadPartResponse, UploadPartResponseSchema } from './rpc-responses.js';
|
|
16
20
|
export { getShelbyAccountBlobsExplorerUrl, getShelbyAccountExplorerUrl, getShelbyBlobExplorerUrl } from './shelby-explorer.js';
|
|
17
21
|
export { BlobActivity, BlobActivityType, BlobEncoding, BlobMetadata, ClayEncoding, StorageProviderAck } from './types/blobs.js';
|
|
18
|
-
export {
|
|
22
|
+
export { ChannelInfo, SenderBuiltMicropayment, StaleChannelStateError } from './types/payments.js';
|
|
23
|
+
export { PlacementGroupInfo, PlacementGroupSlot, PlacementGroupSlotStatus } from './types/placement_groups.js';
|
|
24
|
+
export { ActiveStateDetails, FrozenStateDetails, StorageProviderInfo, StorageProviderStateDetails, WaitlistedStateDetails } from './types/storage_providers.js';
|
|
19
25
|
export { buildRequestUrl, concatHashes, getBlobNameSuffix, readInChunks, zeroPadBytes } from './utils.js';
|
|
20
|
-
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, 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, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Numeric_Comparison_Exp, Order_By, Placement_Group_Slots, Placement_Group_Slots_Aggregate_Order_By, Placement_Group_Slots_Avg_Order_By, Placement_Group_Slots_Bool_Exp, Placement_Group_Slots_Max_Order_By, Placement_Group_Slots_Min_Order_By, Placement_Group_Slots_Order_By, Placement_Group_Slots_Select_Column, Placement_Group_Slots_Stddev_Order_By, Placement_Group_Slots_Stddev_Pop_Order_By, Placement_Group_Slots_Stddev_Samp_Order_By, Placement_Group_Slots_Stream_Cursor_Input, Placement_Group_Slots_Stream_Cursor_Value_Input, Placement_Group_Slots_Sum_Order_By, Placement_Group_Slots_Var_Pop_Order_By, Placement_Group_Slots_Var_Samp_Order_By, 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_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_By_PkArgs, Subscription_RootPlacement_Group_Slots_StreamArgs, Subscription_RootProcessor_StatusArgs, Subscription_RootProcessor_Status_StreamArgs, Timestamp_Comparison_Exp, getSdk } from './operations/generated/sdk.js';
|
|
26
|
+
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, 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';
|
|
21
27
|
import '@aptos-labs/ts-sdk';
|
|
22
28
|
import 'zod';
|
|
23
29
|
import '@shelby-protocol/clay-codes';
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import "../chunk-
|
|
3
|
-
import "../chunk-MQUVYMNQ.mjs";
|
|
4
|
-
import "../chunk-ZHXCVRZX.mjs";
|
|
5
|
-
import "../chunk-RNXGC54D.mjs";
|
|
1
|
+
import "../chunk-EM67QTMR.mjs";
|
|
2
|
+
import "../chunk-FGUK6IBA.mjs";
|
|
6
3
|
import {
|
|
7
4
|
ShelbyClient
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-Z7RFCADT.mjs";
|
|
10
|
-
import {
|
|
11
|
-
ShelbyRPCClient
|
|
12
|
-
} from "../chunk-QRGZJBAG.mjs";
|
|
13
|
-
import {
|
|
14
|
-
isShelbyNetwork,
|
|
15
|
-
shelbyNetworks
|
|
16
|
-
} from "../chunk-VRLIOKWG.mjs";
|
|
17
|
-
import "../chunk-I6NG5GNL.mjs";
|
|
18
|
-
import {
|
|
19
|
-
getShelbyAccountBlobsExplorerUrl,
|
|
20
|
-
getShelbyAccountExplorerUrl,
|
|
21
|
-
getShelbyBlobExplorerUrl
|
|
22
|
-
} from "../chunk-BDSW5PHM.mjs";
|
|
5
|
+
} from "../chunk-W6YL46DT.mjs";
|
|
23
6
|
import {
|
|
7
|
+
MissingTransactionSubmitterError,
|
|
24
8
|
ShelbyBlobClient
|
|
25
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-AGRRYZWV.mjs";
|
|
26
10
|
import "../chunk-XNEIWM4O.mjs";
|
|
11
|
+
import {
|
|
12
|
+
createDefaultErasureCodingProvider
|
|
13
|
+
} from "../chunk-OMZOR2ZF.mjs";
|
|
14
|
+
import {
|
|
15
|
+
ClayErasureCodingProvider
|
|
16
|
+
} from "../chunk-UCDAABAS.mjs";
|
|
27
17
|
import {
|
|
28
18
|
ReedSolomonErasureCodingProvider
|
|
29
19
|
} from "../chunk-PZF2VTGP.mjs";
|
|
20
|
+
import "../chunk-Z7RFCADT.mjs";
|
|
21
|
+
import {
|
|
22
|
+
ShelbyMicropaymentChannelClient
|
|
23
|
+
} from "../chunk-66GI734H.mjs";
|
|
24
|
+
import "../chunk-QQ57OGQ2.mjs";
|
|
25
|
+
import "../chunk-ZHXCVRZX.mjs";
|
|
26
|
+
import "../chunk-AD2G3QYD.mjs";
|
|
27
|
+
import "../chunk-MQUVYMNQ.mjs";
|
|
28
|
+
import {
|
|
29
|
+
ShelbyPlacementGroupClient
|
|
30
|
+
} from "../chunk-MSCUDBMH.mjs";
|
|
31
|
+
import {
|
|
32
|
+
ShelbyRPCClient
|
|
33
|
+
} from "../chunk-ZAM2EUVN.mjs";
|
|
34
|
+
import {
|
|
35
|
+
SenderBuiltMicropayment,
|
|
36
|
+
StaleChannelStateError
|
|
37
|
+
} from "../chunk-4MG4XGY4.mjs";
|
|
30
38
|
import {
|
|
31
39
|
createShelbyIndexerClient,
|
|
32
40
|
getShelbyIndexerClient
|
|
33
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-3ZL3FSNA.mjs";
|
|
34
42
|
import {
|
|
35
43
|
Blob_Activities_Select_Column,
|
|
36
44
|
Blobs_Select_Column,
|
|
@@ -39,18 +47,38 @@ import {
|
|
|
39
47
|
GetBlobActivitiesDocument,
|
|
40
48
|
GetBlobsCountDocument,
|
|
41
49
|
GetBlobsDocument,
|
|
50
|
+
GetPlacementGroupSlotsCountDocument,
|
|
51
|
+
GetPlacementGroupSlotsDocument,
|
|
52
|
+
GetProcessorStatusDocument,
|
|
42
53
|
Order_By,
|
|
43
54
|
Placement_Group_Slots_Select_Column,
|
|
44
55
|
Processor_Status_Select_Column,
|
|
45
56
|
getSdk
|
|
46
|
-
} from "../chunk-
|
|
47
|
-
import "../chunk-
|
|
57
|
+
} from "../chunk-KJ24NKPH.mjs";
|
|
58
|
+
import "../chunk-AABBONAF.mjs";
|
|
48
59
|
import {
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
BlobNameSchema,
|
|
61
|
+
ChunkKey,
|
|
62
|
+
allChunksForBlob,
|
|
63
|
+
roundSize
|
|
64
|
+
} from "../chunk-W5NRGZEP.mjs";
|
|
51
65
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
66
|
+
isShelbyNetwork,
|
|
67
|
+
shelbyNetworks
|
|
68
|
+
} from "../chunk-VRLIOKWG.mjs";
|
|
69
|
+
import "../chunk-I6NG5GNL.mjs";
|
|
70
|
+
import {
|
|
71
|
+
CompleteMultipartUploadResponseSchema,
|
|
72
|
+
RPCErrorResponseSchema,
|
|
73
|
+
StaleMicropaymentErrorResponseSchema,
|
|
74
|
+
StartMultipartUploadResponseSchema,
|
|
75
|
+
UploadPartResponseSchema
|
|
76
|
+
} from "../chunk-IE6LYVIA.mjs";
|
|
77
|
+
import {
|
|
78
|
+
getShelbyAccountBlobsExplorerUrl,
|
|
79
|
+
getShelbyAccountExplorerUrl,
|
|
80
|
+
getShelbyBlobExplorerUrl
|
|
81
|
+
} from "../chunk-BDSW5PHM.mjs";
|
|
54
82
|
import {
|
|
55
83
|
getAptosAccountExplorerUrl,
|
|
56
84
|
getAptosTransactionExplorerUrl
|
|
@@ -60,11 +88,12 @@ import {
|
|
|
60
88
|
} from "../chunk-OTBLZL2S.mjs";
|
|
61
89
|
import {
|
|
62
90
|
BlobCommitmentsSchema,
|
|
91
|
+
COMMITMENT_SCHEMA_VERSION,
|
|
63
92
|
ChunksetCommitmentSchema,
|
|
64
93
|
expectedTotalChunksets,
|
|
65
94
|
generateCommitments,
|
|
66
95
|
generateMerkleRoot
|
|
67
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-RLRI2533.mjs";
|
|
68
97
|
import {
|
|
69
98
|
buildRequestUrl,
|
|
70
99
|
concatHashes,
|
|
@@ -72,25 +101,6 @@ import {
|
|
|
72
101
|
readInChunks,
|
|
73
102
|
zeroPadBytes
|
|
74
103
|
} from "../chunk-4JZO2D7T.mjs";
|
|
75
|
-
import {
|
|
76
|
-
DEFAULT_PROJECT_DESCRIPTION,
|
|
77
|
-
DEFAULT_PROJECT_NAME,
|
|
78
|
-
NetworkToShelbyBlobIndexerBaseUrl,
|
|
79
|
-
NetworkToShelbyRPCBaseUrl,
|
|
80
|
-
SHELBYUSD_FA_METADATA_ADDRESS,
|
|
81
|
-
SHELBYUSD_TOKEN_ADDRESS,
|
|
82
|
-
SHELBYUSD_TOKEN_MODULE,
|
|
83
|
-
SHELBYUSD_TOKEN_NAME,
|
|
84
|
-
SHELBY_DEPLOYER,
|
|
85
|
-
TOKEN_DEPLOYER,
|
|
86
|
-
TOKEN_OBJECT_ADDRESS
|
|
87
|
-
} from "../chunk-SEXQTDX6.mjs";
|
|
88
|
-
import {
|
|
89
|
-
BlobNameSchema,
|
|
90
|
-
ChunkKey,
|
|
91
|
-
allChunksForBlob,
|
|
92
|
-
roundSize
|
|
93
|
-
} from "../chunk-GY5DCVVL.mjs";
|
|
94
104
|
import {
|
|
95
105
|
CHUNK_SIZE_PARAMS,
|
|
96
106
|
ChunkSizeScheme,
|
|
@@ -103,9 +113,31 @@ import {
|
|
|
103
113
|
DEFAULT_ERASURE_K,
|
|
104
114
|
DEFAULT_ERASURE_M,
|
|
105
115
|
DEFAULT_ERASURE_N,
|
|
116
|
+
DEFAULT_SAMPLE_SIZE,
|
|
106
117
|
ERASURE_CODE_PARAMS,
|
|
107
118
|
ErasureCodingScheme
|
|
108
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-LZSIZJYR.mjs";
|
|
120
|
+
import {
|
|
121
|
+
DEFAULT_PROJECT_DESCRIPTION,
|
|
122
|
+
DEFAULT_PROJECT_NAME,
|
|
123
|
+
MICROPAYMENTS_DEPLOYER,
|
|
124
|
+
NetworkToShelbyBlobIndexerBaseUrl,
|
|
125
|
+
NetworkToShelbyRPCBaseUrl,
|
|
126
|
+
SHELBYUSD_FA_METADATA_ADDRESS,
|
|
127
|
+
SHELBYUSD_TOKEN_ADDRESS,
|
|
128
|
+
SHELBYUSD_TOKEN_MODULE,
|
|
129
|
+
SHELBYUSD_TOKEN_NAME,
|
|
130
|
+
SHELBY_DEPLOYER,
|
|
131
|
+
TOKEN_DEPLOYER,
|
|
132
|
+
TOKEN_OBJECT_ADDRESS
|
|
133
|
+
} from "../chunk-FLLOQZVD.mjs";
|
|
134
|
+
import {
|
|
135
|
+
ShelbyErrorCodes,
|
|
136
|
+
isAccessDeniedError,
|
|
137
|
+
isBlobAlreadyExistsError,
|
|
138
|
+
isBlobExpiredError,
|
|
139
|
+
isBlobNotFoundError
|
|
140
|
+
} from "../chunk-CQ6QPIZK.mjs";
|
|
109
141
|
import "../chunk-7P6ASYW6.mjs";
|
|
110
142
|
export {
|
|
111
143
|
BlobCommitmentsSchema,
|
|
@@ -113,10 +145,12 @@ export {
|
|
|
113
145
|
Blob_Activities_Select_Column,
|
|
114
146
|
Blobs_Select_Column,
|
|
115
147
|
CHUNK_SIZE_PARAMS,
|
|
148
|
+
COMMITMENT_SCHEMA_VERSION,
|
|
116
149
|
ChunkKey,
|
|
117
150
|
ChunkSizeScheme,
|
|
118
151
|
ChunksetCommitmentSchema,
|
|
119
152
|
ClayErasureCodingProvider,
|
|
153
|
+
CompleteMultipartUploadResponseSchema,
|
|
120
154
|
Cursor_Ordering,
|
|
121
155
|
DEFAULT_CHUNKSET_SIZE_BYTES,
|
|
122
156
|
DEFAULT_CHUNK_SIZE_BYTES,
|
|
@@ -126,6 +160,7 @@ export {
|
|
|
126
160
|
DEFAULT_ERASURE_N,
|
|
127
161
|
DEFAULT_PROJECT_DESCRIPTION,
|
|
128
162
|
DEFAULT_PROJECT_NAME,
|
|
163
|
+
DEFAULT_SAMPLE_SIZE,
|
|
129
164
|
ERASURE_CODE_AND_CHUNK_MAPPING,
|
|
130
165
|
ERASURE_CODE_PARAMS,
|
|
131
166
|
ErasureCodingScheme,
|
|
@@ -133,22 +168,36 @@ export {
|
|
|
133
168
|
GetBlobActivitiesDocument,
|
|
134
169
|
GetBlobsCountDocument,
|
|
135
170
|
GetBlobsDocument,
|
|
171
|
+
GetPlacementGroupSlotsCountDocument,
|
|
172
|
+
GetPlacementGroupSlotsDocument,
|
|
173
|
+
GetProcessorStatusDocument,
|
|
174
|
+
MICROPAYMENTS_DEPLOYER,
|
|
175
|
+
MissingTransactionSubmitterError,
|
|
136
176
|
NetworkToShelbyBlobIndexerBaseUrl,
|
|
137
177
|
NetworkToShelbyRPCBaseUrl,
|
|
138
178
|
Order_By,
|
|
139
179
|
Placement_Group_Slots_Select_Column,
|
|
140
180
|
Processor_Status_Select_Column,
|
|
181
|
+
RPCErrorResponseSchema,
|
|
141
182
|
ReedSolomonErasureCodingProvider,
|
|
142
183
|
SHELBYUSD_FA_METADATA_ADDRESS,
|
|
143
184
|
SHELBYUSD_TOKEN_ADDRESS,
|
|
144
185
|
SHELBYUSD_TOKEN_MODULE,
|
|
145
186
|
SHELBYUSD_TOKEN_NAME,
|
|
146
187
|
SHELBY_DEPLOYER,
|
|
188
|
+
SenderBuiltMicropayment,
|
|
147
189
|
ShelbyBlobClient,
|
|
148
190
|
ShelbyClient,
|
|
191
|
+
ShelbyErrorCodes,
|
|
192
|
+
ShelbyMicropaymentChannelClient,
|
|
193
|
+
ShelbyPlacementGroupClient,
|
|
149
194
|
ShelbyRPCClient,
|
|
195
|
+
StaleChannelStateError,
|
|
196
|
+
StaleMicropaymentErrorResponseSchema,
|
|
197
|
+
StartMultipartUploadResponseSchema,
|
|
150
198
|
TOKEN_DEPLOYER,
|
|
151
199
|
TOKEN_OBJECT_ADDRESS,
|
|
200
|
+
UploadPartResponseSchema,
|
|
152
201
|
allChunksForBlob,
|
|
153
202
|
buildRequestUrl,
|
|
154
203
|
concatHashes,
|
|
@@ -166,6 +215,10 @@ export {
|
|
|
166
215
|
getShelbyAccountExplorerUrl,
|
|
167
216
|
getShelbyBlobExplorerUrl,
|
|
168
217
|
getShelbyIndexerClient,
|
|
218
|
+
isAccessDeniedError,
|
|
219
|
+
isBlobAlreadyExistsError,
|
|
220
|
+
isBlobExpiredError,
|
|
221
|
+
isBlobNotFoundError,
|
|
169
222
|
isShelbyNetwork,
|
|
170
223
|
readInChunks,
|
|
171
224
|
roundSize,
|
package/dist/core/layout.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
ChunkKey,
|
|
4
4
|
allChunksForBlob,
|
|
5
5
|
roundSize
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-W5NRGZEP.mjs";
|
|
7
7
|
import "../chunk-67F5YZ25.mjs";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-LZSIZJYR.mjs";
|
|
9
9
|
import "../chunk-7P6ASYW6.mjs";
|
|
10
10
|
export {
|
|
11
11
|
BlobNameSchema,
|