@shelby-protocol/sdk 0.1.0 → 0.2.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 +5 -4
- package/dist/browser/index.mjs +32 -24
- package/dist/{chunk-RLRI2533.mjs → chunk-2WEX3K7C.mjs} +3 -3
- package/dist/{chunk-FLLOQZVD.mjs → chunk-4ZOFT75Q.mjs} +12 -2
- package/dist/{chunk-W6YL46DT.mjs → chunk-7PN65RDX.mjs} +27 -6
- package/dist/{chunk-LZSIZJYR.mjs → chunk-AUQDI5BS.mjs} +14 -1
- package/dist/{chunk-3ZL3FSNA.mjs → chunk-CGYJLKBU.mjs} +1 -1
- package/dist/{chunk-VRLIOKWG.mjs → chunk-D6GQHO6G.mjs} +5 -1
- package/dist/{chunk-66GI734H.mjs → chunk-E5QCRTBU.mjs} +2 -2
- package/dist/chunk-HPPMI7DC.mjs +56 -0
- package/dist/{chunk-67F5YZ25.mjs → chunk-JTXYKO3U.mjs} +10 -0
- package/dist/{chunk-YZXIPUVQ.mjs → chunk-MV6FNYAU.mjs} +10 -10
- package/dist/{chunk-PZF2VTGP.mjs → chunk-NHWWORCH.mjs} +3 -1
- package/dist/{chunk-UCDAABAS.mjs → chunk-OGKZ575S.mjs} +6 -19
- package/dist/{chunk-ZAM2EUVN.mjs → chunk-PJVWGMVI.mjs} +5 -5
- package/dist/{chunk-AGRRYZWV.mjs → chunk-SRV4YWFH.mjs} +27 -13
- package/dist/{chunk-MSCUDBMH.mjs → chunk-W37FZSMA.mjs} +1 -1
- package/dist/chunk-Z4FZ7W6L.mjs +39 -0
- package/dist/{chunk-DI2K6OUG.mjs → chunk-ZEDD2MPU.mjs} +1 -1
- package/dist/{clay-codes-pdZFxI_B.d.ts → clay-codes-DHP-bYcP.d.ts} +6 -2
- package/dist/core/blobs.d.ts +2 -0
- package/dist/core/chunk.d.ts +10 -1
- package/dist/core/chunk.mjs +2 -2
- package/dist/core/clients/ShelbyBlobClient.d.ts +5 -1
- package/dist/core/clients/ShelbyBlobClient.mjs +9 -9
- package/dist/core/clients/ShelbyClient.d.ts +7 -1
- package/dist/core/clients/ShelbyClient.mjs +13 -12
- package/dist/{node → core}/clients/ShelbyMetadataClient.d.ts +3 -3
- package/dist/{node → core}/clients/ShelbyMetadataClient.mjs +2 -2
- package/dist/core/clients/ShelbyMicropaymentChannelClient.mjs +3 -3
- package/dist/core/clients/ShelbyPlacementGroupClient.mjs +3 -3
- package/dist/core/clients/ShelbyRPCClient.d.ts +2 -0
- package/dist/core/clients/ShelbyRPCClient.mjs +4 -6
- package/dist/core/clients/index.d.ts +4 -2
- package/dist/core/clients/index.mjs +19 -15
- package/dist/core/commitments.d.ts +1 -1
- package/dist/core/commitments.mjs +3 -3
- package/dist/core/constants.d.ts +15 -3
- package/dist/core/constants.mjs +3 -1
- package/dist/core/erasure/clay-codes.d.ts +1 -1
- package/dist/core/erasure/clay-codes.mjs +5 -5
- package/dist/core/erasure/constants.d.ts +10 -2
- package/dist/core/erasure/constants.mjs +1 -1
- package/dist/core/erasure/default.d.ts +5 -2
- package/dist/core/erasure/default.mjs +12 -6
- package/dist/core/erasure/index.d.ts +2 -2
- package/dist/core/erasure/index.mjs +13 -7
- package/dist/core/erasure/provider.d.ts +1 -1
- package/dist/core/erasure/reed-solomon.d.ts +1 -1
- package/dist/core/erasure/reed-solomon.mjs +1 -1
- package/dist/core/erasure/utils.d.ts +1 -1
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.mjs +32 -24
- package/dist/core/layout.d.ts +5 -16
- package/dist/core/layout.mjs +3 -9
- package/dist/core/networks.d.ts +1 -1
- package/dist/core/networks.mjs +1 -1
- package/dist/core/operations/index.mjs +2 -2
- package/dist/core/types/blobs.d.ts +1 -1
- package/dist/core/types/encodings.d.ts +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/node/clients/ShelbyNodeClient.d.ts +5 -3
- package/dist/node/clients/ShelbyNodeClient.mjs +14 -13
- package/dist/node/clients/index.d.ts +3 -3
- package/dist/node/clients/index.mjs +15 -15
- package/dist/node/index.d.ts +5 -5
- package/dist/node/index.mjs +32 -28
- package/package.json +1 -1
- package/dist/chunk-OMZOR2ZF.mjs +0 -29
- package/dist/chunk-W5NRGZEP.mjs +0 -86
- package/dist/core/operations/generated/types.d.ts +0 -908
- package/dist/core/operations/generated/types.mjs +0 -63
- /package/dist/{chunk-FGUK6IBA.mjs → chunk-WTICJPDB.mjs} +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultErasureCodingConfig
|
|
3
|
+
} from "./chunk-HPPMI7DC.mjs";
|
|
1
4
|
import {
|
|
2
5
|
getShelbyIndexerClient
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CGYJLKBU.mjs";
|
|
4
7
|
import {
|
|
5
8
|
getAptosConfig
|
|
6
9
|
} from "./chunk-AABBONAF.mjs";
|
|
@@ -9,20 +12,19 @@ import {
|
|
|
9
12
|
} from "./chunk-OTBLZL2S.mjs";
|
|
10
13
|
import {
|
|
11
14
|
expectedTotalChunksets
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2WEX3K7C.mjs";
|
|
13
16
|
import {
|
|
14
17
|
getBlobNameSuffix
|
|
15
18
|
} from "./chunk-4JZO2D7T.mjs";
|
|
16
19
|
import {
|
|
17
|
-
DEFAULT_CHUNKSET_SIZE_BYTES,
|
|
18
20
|
ERASURE_CODE_AND_CHUNK_MAPPING
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JTXYKO3U.mjs";
|
|
20
22
|
import {
|
|
21
23
|
ERASURE_CODE_PARAMS
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AUQDI5BS.mjs";
|
|
23
25
|
import {
|
|
24
26
|
SHELBY_DEPLOYER
|
|
25
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4ZOFT75Q.mjs";
|
|
26
28
|
|
|
27
29
|
// src/core/clients/ShelbyBlobClient.ts
|
|
28
30
|
import {
|
|
@@ -150,6 +152,14 @@ var ShelbyBlobClient = class _ShelbyBlobClient {
|
|
|
150
152
|
const metadata = rawMetadata[0].vec[0];
|
|
151
153
|
let encoding;
|
|
152
154
|
if (metadata.encoding.__variant__ === "ClayCode_16Total_10Data_13Helper") {
|
|
155
|
+
console.log("read blob metadata with ClayCode_16Total_10Data_13Helper");
|
|
156
|
+
encoding = {
|
|
157
|
+
variant: "clay",
|
|
158
|
+
...ERASURE_CODE_PARAMS[metadata.encoding.__variant__],
|
|
159
|
+
...ERASURE_CODE_AND_CHUNK_MAPPING[metadata.encoding.__variant__]
|
|
160
|
+
};
|
|
161
|
+
} else if (metadata.encoding.__variant__ === "ClayCode_4Total_2Data_3Helper") {
|
|
162
|
+
console.log("read blob metadata with ClayCode_4Total_2Data_3Helper");
|
|
153
163
|
encoding = {
|
|
154
164
|
variant: "clay",
|
|
155
165
|
...ERASURE_CODE_PARAMS[metadata.encoding.__variant__],
|
|
@@ -357,7 +367,8 @@ var ShelbyBlobClient = class _ShelbyBlobClient {
|
|
|
357
367
|
async registerBlob(params) {
|
|
358
368
|
const options = this.mergeOptions(params.options);
|
|
359
369
|
this.validateUsdSponsorConfig(options.usdSponsor, options.submit);
|
|
360
|
-
const
|
|
370
|
+
const config = params.config ?? defaultErasureCodingConfig();
|
|
371
|
+
const chunksetSize = config.chunkSizeBytes * config.erasure_k;
|
|
361
372
|
const buildArgs = {
|
|
362
373
|
...options.build,
|
|
363
374
|
data: _ShelbyBlobClient.createRegisterBlobPayload({
|
|
@@ -368,7 +379,8 @@ var ShelbyBlobClient = class _ShelbyBlobClient {
|
|
|
368
379
|
blobMerkleRoot: params.blobMerkleRoot,
|
|
369
380
|
numChunksets: expectedTotalChunksets(params.size, chunksetSize),
|
|
370
381
|
expirationMicros: params.expirationMicros,
|
|
371
|
-
useSponsoredUsdVariant: options.usdSponsor !== void 0
|
|
382
|
+
useSponsoredUsdVariant: options.usdSponsor !== void 0,
|
|
383
|
+
encoding: config.enumIndex
|
|
372
384
|
}),
|
|
373
385
|
sender: params.account.accountAddress
|
|
374
386
|
};
|
|
@@ -541,7 +553,8 @@ var ShelbyBlobClient = class _ShelbyBlobClient {
|
|
|
541
553
|
async batchRegisterBlobs(params) {
|
|
542
554
|
const options = this.mergeOptions(params.options);
|
|
543
555
|
this.validateUsdSponsorConfig(options.usdSponsor, options.submit);
|
|
544
|
-
const
|
|
556
|
+
const config = params.config ?? defaultErasureCodingConfig();
|
|
557
|
+
const chunksetSize = config.chunkSizeBytes * config.erasure_k;
|
|
545
558
|
const buildArgs = {
|
|
546
559
|
...options.build,
|
|
547
560
|
sender: params.account.accountAddress,
|
|
@@ -555,7 +568,8 @@ var ShelbyBlobClient = class _ShelbyBlobClient {
|
|
|
555
568
|
blobMerkleRoot: blob.blobMerkleRoot,
|
|
556
569
|
numChunksets: expectedTotalChunksets(blob.blobSize, chunksetSize)
|
|
557
570
|
})),
|
|
558
|
-
useSponsoredUsdVariant: options.usdSponsor !== void 0
|
|
571
|
+
useSponsoredUsdVariant: options.usdSponsor !== void 0,
|
|
572
|
+
encoding: config.enumIndex
|
|
559
573
|
})
|
|
560
574
|
};
|
|
561
575
|
const transaction = options.usdSponsor ? await this.aptos.transaction.build.multiAgent({
|
|
@@ -599,8 +613,7 @@ var ShelbyBlobClient = class _ShelbyBlobClient {
|
|
|
599
613
|
// TODO
|
|
600
614
|
0,
|
|
601
615
|
// payment tier
|
|
602
|
-
|
|
603
|
-
// encoding
|
|
616
|
+
params.encoding
|
|
604
617
|
]
|
|
605
618
|
};
|
|
606
619
|
}
|
|
@@ -645,7 +658,8 @@ var ShelbyBlobClient = class _ShelbyBlobClient {
|
|
|
645
658
|
blobSizes,
|
|
646
659
|
// TODO
|
|
647
660
|
0,
|
|
648
|
-
|
|
661
|
+
// payment tier
|
|
662
|
+
params.encoding
|
|
649
663
|
]
|
|
650
664
|
};
|
|
651
665
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/core/layout.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var BlobNameSchema = z.string().min(1, "Blob name path parameter cannot be empty.").max(1024, "Blob name cannot exceed 1024 characters.").refine((name) => !name.endsWith("/"), {
|
|
4
|
+
message: "Blob name cannot end with a slash"
|
|
5
|
+
});
|
|
6
|
+
var ChunkKey = class {
|
|
7
|
+
constructor(account, blobName, chunksetIdx, chunkIdx, config) {
|
|
8
|
+
this.account = account;
|
|
9
|
+
this.blobName = blobName;
|
|
10
|
+
this.chunksetIdx = chunksetIdx;
|
|
11
|
+
this.chunkIdx = chunkIdx;
|
|
12
|
+
this.config = config;
|
|
13
|
+
if (chunkIdx >= config.erasure_n) {
|
|
14
|
+
throw new Error(
|
|
15
|
+
`Cannot create a chunk with idx ${chunkIdx}. M+K=${config.erasure_n}`
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
key() {
|
|
20
|
+
return `${this.account.toString()}.${this.blobName}.${this.chunksetIdx}.${this.chunkIdx}`;
|
|
21
|
+
}
|
|
22
|
+
// Returns the range in the blob that this key represents, or "parity" if this is parity chunk.
|
|
23
|
+
range() {
|
|
24
|
+
if (this.chunkIdx >= this.config.erasure_k) {
|
|
25
|
+
return "parity";
|
|
26
|
+
}
|
|
27
|
+
const chunksetStart = this.chunksetIdx * this.config.chunkSizeBytes * this.config.erasure_k;
|
|
28
|
+
const chunkStart = chunksetStart + this.chunkIdx * this.config.chunkSizeBytes;
|
|
29
|
+
return {
|
|
30
|
+
start: chunkStart,
|
|
31
|
+
end: chunkStart + this.config.chunkSizeBytes
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
BlobNameSchema,
|
|
38
|
+
ChunkKey
|
|
39
|
+
};
|
|
@@ -31,6 +31,8 @@ interface ErasureCodingConfig {
|
|
|
31
31
|
erasure_k: number;
|
|
32
32
|
/** Size in bytes of every chunk. */
|
|
33
33
|
chunkSizeBytes: number;
|
|
34
|
+
/** Index for the erasure code enum in the smart contract. */
|
|
35
|
+
enumIndex: number;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* Union of all supported erasure coding configurations.
|
|
@@ -117,7 +119,7 @@ declare class ClayErasureCodingProvider implements ErasureCodingProvider {
|
|
|
117
119
|
/**
|
|
118
120
|
* Static factory method to create an initialized ClayErasureCodingProvider
|
|
119
121
|
*/
|
|
120
|
-
static create
|
|
122
|
+
static create(config: ClayConfig): Promise<ClayErasureCodingProvider>;
|
|
121
123
|
encode(data: Uint8Array): ChunkCollection;
|
|
122
124
|
decode(available: Uint8Array[], config: ClayDecodeConfig): ChunkCollection;
|
|
123
125
|
getChunkMerkleRoots(): Uint8Array[];
|
|
@@ -132,5 +134,7 @@ declare class ClayErasureCodingProvider implements ErasureCodingProvider {
|
|
|
132
134
|
*/
|
|
133
135
|
requiresPadding(dataSize: number): boolean;
|
|
134
136
|
}
|
|
137
|
+
type ClayConfigInput = Required<ClayConfig>;
|
|
138
|
+
declare function buildClayConfig(input: ClayConfigInput): ClayConfig;
|
|
135
139
|
|
|
136
|
-
export { ClayErasureCodingProvider as C, type DecodeConfig as D, type ErasureCodingConfig as E, type InitConfig as I, ReedSolomonErasureCodingProvider as R, type ErasureCodingProvider as a, type
|
|
140
|
+
export { ClayErasureCodingProvider as C, type DecodeConfig as D, type ErasureCodingConfig as E, type InitConfig as I, ReedSolomonErasureCodingProvider as R, type ErasureCodingProvider as a, type ClayConfig as b, type ClayProviderOptions as c, type ReedSolomonConfig as d, type ReedSolomonProviderOptions as e, type ClayErasureCodeParams as f, type ClayDecodeConfig as g, buildClayConfig as h };
|
package/dist/core/blobs.d.ts
CHANGED
package/dist/core/chunk.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Chunk and chunkset size configurations supported by Shelby.
|
|
3
3
|
*/
|
|
4
4
|
declare enum ChunkSizeScheme {
|
|
5
|
-
ChunkSet10MiB_Chunk1MiB = "ChunkSet10MiB_Chunk1MiB"
|
|
5
|
+
ChunkSet10MiB_Chunk1MiB = "ChunkSet10MiB_Chunk1MiB",
|
|
6
|
+
ChunkSet2MiB_Chunk1MiB = "ChunkSet2MiB_Chunk1MiB"
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* Parameters for chunk and chunkset sizes in bytes.
|
|
@@ -12,6 +13,10 @@ declare const CHUNK_SIZE_PARAMS: {
|
|
|
12
13
|
readonly chunkSizeBytes: number;
|
|
13
14
|
readonly chunksetSizeBytes: number;
|
|
14
15
|
};
|
|
16
|
+
readonly ChunkSet2MiB_Chunk1MiB: {
|
|
17
|
+
readonly chunkSizeBytes: number;
|
|
18
|
+
readonly chunksetSizeBytes: number;
|
|
19
|
+
};
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
17
22
|
* The default size of a chunk in bytes.
|
|
@@ -29,6 +34,10 @@ declare const ERASURE_CODE_AND_CHUNK_MAPPING: {
|
|
|
29
34
|
readonly chunkSizeBytes: number;
|
|
30
35
|
readonly chunksetSizeBytes: number;
|
|
31
36
|
};
|
|
37
|
+
readonly ClayCode_4Total_2Data_3Helper: {
|
|
38
|
+
readonly chunkSizeBytes: number;
|
|
39
|
+
readonly chunksetSizeBytes: number;
|
|
40
|
+
};
|
|
32
41
|
};
|
|
33
42
|
|
|
34
43
|
export { CHUNK_SIZE_PARAMS, ChunkSizeScheme, DEFAULT_CHUNKSET_SIZE_BYTES, DEFAULT_CHUNK_SIZE_BYTES, ERASURE_CODE_AND_CHUNK_MAPPING };
|
package/dist/core/chunk.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
DEFAULT_CHUNKSET_SIZE_BYTES,
|
|
5
5
|
DEFAULT_CHUNK_SIZE_BYTES,
|
|
6
6
|
ERASURE_CODE_AND_CHUNK_MAPPING
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-JTXYKO3U.mjs";
|
|
8
|
+
import "../chunk-AUQDI5BS.mjs";
|
|
9
9
|
import "../chunk-7P6ASYW6.mjs";
|
|
10
10
|
export {
|
|
11
11
|
CHUNK_SIZE_PARAMS,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InputGenerateTransactionOptions, Aptos, AccountAddress, InputTransactionPluginData, AccountAddressInput, Account, PendingTransactionResponse, InputGenerateTransactionPayloadData } from '@aptos-labs/ts-sdk';
|
|
2
2
|
import { BlobName } from '../layout.js';
|
|
3
3
|
import { BlobMetadata, BlobActivity, StorageProviderAck } from '../types/blobs.js';
|
|
4
|
+
import { E as ErasureCodingConfig } from '../../clay-codes-DHP-bYcP.js';
|
|
4
5
|
import { ShelbyIndexerClient } from '../operations/index.js';
|
|
5
6
|
import { Blobs_Order_By, Blobs_Bool_Exp, Blob_Activities_Bool_Exp, Blob_Activities_Order_By } from '../operations/generated/sdk.js';
|
|
6
7
|
import { ShelbyClientConfig } from './ShelbyClientConfig.js';
|
|
7
8
|
import 'zod';
|
|
8
|
-
import '../../clay-codes-pdZFxI_B.js';
|
|
9
9
|
import '@shelby-protocol/clay-codes';
|
|
10
10
|
import 'graphql-request';
|
|
11
11
|
import 'graphql';
|
|
@@ -250,6 +250,7 @@ declare class ShelbyBlobClient {
|
|
|
250
250
|
blobMerkleRoot: string;
|
|
251
251
|
size: number;
|
|
252
252
|
expirationMicros: number;
|
|
253
|
+
config?: ErasureCodingConfig;
|
|
253
254
|
options?: WriteBlobCommitmentsOptions;
|
|
254
255
|
}): Promise<{
|
|
255
256
|
transaction: PendingTransactionResponse;
|
|
@@ -390,6 +391,7 @@ declare class ShelbyBlobClient {
|
|
|
390
391
|
blobSize: number;
|
|
391
392
|
blobMerkleRoot: string;
|
|
392
393
|
}[];
|
|
394
|
+
config?: ErasureCodingConfig;
|
|
393
395
|
options?: WriteBlobCommitmentsOptions;
|
|
394
396
|
}): Promise<{
|
|
395
397
|
transaction: PendingTransactionResponse;
|
|
@@ -419,6 +421,7 @@ declare class ShelbyBlobClient {
|
|
|
419
421
|
expirationMicros: number;
|
|
420
422
|
numChunksets: number;
|
|
421
423
|
useSponsoredUsdVariant?: boolean;
|
|
424
|
+
encoding: number;
|
|
422
425
|
}): InputGenerateTransactionPayloadData;
|
|
423
426
|
/**
|
|
424
427
|
* Creates a transaction payload to register multiple blobs on the blockchain.
|
|
@@ -448,6 +451,7 @@ declare class ShelbyBlobClient {
|
|
|
448
451
|
numChunksets: number;
|
|
449
452
|
}[];
|
|
450
453
|
useSponsoredUsdVariant?: boolean;
|
|
454
|
+
encoding: number;
|
|
451
455
|
}): InputGenerateTransactionPayloadData;
|
|
452
456
|
/**
|
|
453
457
|
* Creates a transaction payload to delete a blob on the blockchain.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MissingTransactionSubmitterError,
|
|
3
3
|
ShelbyBlobClient
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-SRV4YWFH.mjs";
|
|
5
5
|
import "../../chunk-XNEIWM4O.mjs";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-HPPMI7DC.mjs";
|
|
7
|
+
import "../../chunk-OGKZ575S.mjs";
|
|
8
|
+
import "../../chunk-NHWWORCH.mjs";
|
|
9
|
+
import "../../chunk-CGYJLKBU.mjs";
|
|
10
10
|
import "../../chunk-KJ24NKPH.mjs";
|
|
11
11
|
import "../../chunk-AABBONAF.mjs";
|
|
12
12
|
import "../../chunk-OTBLZL2S.mjs";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-2WEX3K7C.mjs";
|
|
14
14
|
import "../../chunk-4JZO2D7T.mjs";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-
|
|
17
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-JTXYKO3U.mjs";
|
|
16
|
+
import "../../chunk-AUQDI5BS.mjs";
|
|
17
|
+
import "../../chunk-4ZOFT75Q.mjs";
|
|
18
18
|
import "../../chunk-7P6ASYW6.mjs";
|
|
19
19
|
export {
|
|
20
20
|
MissingTransactionSubmitterError,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Aptos, Account, AccountAddressInput } from '@aptos-labs/ts-sdk';
|
|
2
2
|
import { ShelbyBlob } from '../blobs.js';
|
|
3
|
-
import { a as ErasureCodingProvider } from '../../clay-codes-
|
|
3
|
+
import { a as ErasureCodingProvider } from '../../clay-codes-DHP-bYcP.js';
|
|
4
4
|
import { BlobName } from '../layout.js';
|
|
5
5
|
import { WriteBlobCommitmentsOptions, ShelbyBlobClient } from './ShelbyBlobClient.js';
|
|
6
6
|
import { ShelbyClientConfig } from './ShelbyClientConfig.js';
|
|
7
|
+
import { ShelbyMetadataClient } from './ShelbyMetadataClient.js';
|
|
7
8
|
import { ShelbyRPCClient } from './ShelbyRPCClient.js';
|
|
8
9
|
import 'zod';
|
|
9
10
|
import '@shelby-protocol/clay-codes';
|
|
@@ -13,6 +14,7 @@ import 'graphql-request';
|
|
|
13
14
|
import '../operations/generated/sdk.js';
|
|
14
15
|
import 'graphql';
|
|
15
16
|
import '../networks.js';
|
|
17
|
+
import '../types/storage_providers.js';
|
|
16
18
|
import '../types/payments.js';
|
|
17
19
|
|
|
18
20
|
type UploadOptions = WriteBlobCommitmentsOptions;
|
|
@@ -22,6 +24,10 @@ declare class ShelbyClient {
|
|
|
22
24
|
* and metadata for blobs.
|
|
23
25
|
*/
|
|
24
26
|
readonly coordination: ShelbyBlobClient;
|
|
27
|
+
/**
|
|
28
|
+
* The metadata client is used for protocol-level metadata queries.
|
|
29
|
+
*/
|
|
30
|
+
readonly metadata: ShelbyMetadataClient;
|
|
25
31
|
/**
|
|
26
32
|
* The RPC client is used to interact with the Shelby RPC node which can be responsible for storing,
|
|
27
33
|
* confirming, and retrieving blobs from the storage layer.
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ShelbyClient
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-7PN65RDX.mjs";
|
|
4
|
+
import "../../chunk-SRV4YWFH.mjs";
|
|
5
5
|
import "../../chunk-XNEIWM4O.mjs";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-HPPMI7DC.mjs";
|
|
7
|
+
import "../../chunk-OGKZ575S.mjs";
|
|
8
|
+
import "../../chunk-NHWWORCH.mjs";
|
|
9
|
+
import "../../chunk-MV6FNYAU.mjs";
|
|
10
|
+
import "../../chunk-PJVWGMVI.mjs";
|
|
10
11
|
import "../../chunk-4MG4XGY4.mjs";
|
|
11
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-CGYJLKBU.mjs";
|
|
12
13
|
import "../../chunk-KJ24NKPH.mjs";
|
|
13
14
|
import "../../chunk-AABBONAF.mjs";
|
|
14
|
-
import "../../chunk-W5NRGZEP.mjs";
|
|
15
15
|
import "../../chunk-I6NG5GNL.mjs";
|
|
16
16
|
import "../../chunk-IE6LYVIA.mjs";
|
|
17
17
|
import "../../chunk-OTBLZL2S.mjs";
|
|
18
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-2WEX3K7C.mjs";
|
|
19
19
|
import "../../chunk-4JZO2D7T.mjs";
|
|
20
|
-
import "../../chunk-
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
20
|
+
import "../../chunk-JTXYKO3U.mjs";
|
|
21
|
+
import "../../chunk-AUQDI5BS.mjs";
|
|
22
|
+
import "../../chunk-4ZOFT75Q.mjs";
|
|
23
|
+
import "../../chunk-Z4FZ7W6L.mjs";
|
|
23
24
|
import "../../chunk-7P6ASYW6.mjs";
|
|
24
25
|
export {
|
|
25
26
|
ShelbyClient
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Aptos, AccountAddress, AccountAddressInput } from '@aptos-labs/ts-sdk';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
2
|
+
import { StorageProviderInfo } from '../types/storage_providers.js';
|
|
3
|
+
import { ShelbyClientConfig } from './ShelbyClientConfig.js';
|
|
4
|
+
import '../networks.js';
|
|
5
5
|
|
|
6
6
|
declare class ShelbyMetadataClient {
|
|
7
7
|
readonly aptos: Aptos;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ShelbyMetadataClient
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-MV6FNYAU.mjs";
|
|
4
4
|
import "../../chunk-AABBONAF.mjs";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-4ZOFT75Q.mjs";
|
|
6
6
|
import "../../chunk-7P6ASYW6.mjs";
|
|
7
7
|
export {
|
|
8
8
|
ShelbyMetadataClient
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ShelbyMicropaymentChannelClient
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-E5QCRTBU.mjs";
|
|
4
4
|
import "../../chunk-QQ57OGQ2.mjs";
|
|
5
5
|
import "../../chunk-ZHXCVRZX.mjs";
|
|
6
6
|
import "../../chunk-AD2G3QYD.mjs";
|
|
7
7
|
import "../../chunk-MQUVYMNQ.mjs";
|
|
8
8
|
import "../../chunk-4MG4XGY4.mjs";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-CGYJLKBU.mjs";
|
|
10
10
|
import "../../chunk-KJ24NKPH.mjs";
|
|
11
11
|
import "../../chunk-AABBONAF.mjs";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-4ZOFT75Q.mjs";
|
|
13
13
|
import "../../chunk-7P6ASYW6.mjs";
|
|
14
14
|
export {
|
|
15
15
|
ShelbyMicropaymentChannelClient
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ShelbyPlacementGroupClient
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-W37FZSMA.mjs";
|
|
4
|
+
import "../../chunk-CGYJLKBU.mjs";
|
|
5
5
|
import "../../chunk-KJ24NKPH.mjs";
|
|
6
6
|
import "../../chunk-AABBONAF.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-4ZOFT75Q.mjs";
|
|
8
8
|
import "../../chunk-7P6ASYW6.mjs";
|
|
9
9
|
export {
|
|
10
10
|
ShelbyPlacementGroupClient
|
|
@@ -5,6 +5,8 @@ import { ShelbyIndexerClient } from '../operations/index.js';
|
|
|
5
5
|
import { SenderBuiltMicropayment } from '../types/payments.js';
|
|
6
6
|
import { ShelbyRPCConfig, ShelbyClientConfig } from './ShelbyClientConfig.js';
|
|
7
7
|
import 'zod';
|
|
8
|
+
import '../../clay-codes-DHP-bYcP.js';
|
|
9
|
+
import '@shelby-protocol/clay-codes';
|
|
8
10
|
import 'graphql-request';
|
|
9
11
|
import '../operations/generated/sdk.js';
|
|
10
12
|
import 'graphql';
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ShelbyRPCClient
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-PJVWGMVI.mjs";
|
|
4
4
|
import "../../chunk-4MG4XGY4.mjs";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-CGYJLKBU.mjs";
|
|
6
6
|
import "../../chunk-KJ24NKPH.mjs";
|
|
7
7
|
import "../../chunk-AABBONAF.mjs";
|
|
8
|
-
import "../../chunk-W5NRGZEP.mjs";
|
|
9
8
|
import "../../chunk-I6NG5GNL.mjs";
|
|
10
9
|
import "../../chunk-IE6LYVIA.mjs";
|
|
11
10
|
import "../../chunk-4JZO2D7T.mjs";
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-FLLOQZVD.mjs";
|
|
11
|
+
import "../../chunk-4ZOFT75Q.mjs";
|
|
12
|
+
import "../../chunk-Z4FZ7W6L.mjs";
|
|
15
13
|
import "../../chunk-7P6ASYW6.mjs";
|
|
16
14
|
export {
|
|
17
15
|
ShelbyRPCClient
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
export { AckTransactionOptions, BuildOptions, MissingTransactionSubmitterError, ShelbyBlobClient, UsdSponsorOptions, WriteBlobCommitmentsOptions } from './ShelbyBlobClient.js';
|
|
2
2
|
export { ShelbyClient, UploadOptions } from './ShelbyClient.js';
|
|
3
3
|
export { ShelbyClientConfig, ShelbyIndexerConfig, ShelbyRPCConfig } from './ShelbyClientConfig.js';
|
|
4
|
+
export { ShelbyMetadataClient } from './ShelbyMetadataClient.js';
|
|
4
5
|
export { ShelbyMicropaymentChannelClient } from './ShelbyMicropaymentChannelClient.js';
|
|
5
6
|
export { ShelbyPlacementGroupClient } from './ShelbyPlacementGroupClient.js';
|
|
6
7
|
export { BlobDataSource, PutBlobProgress, ShelbyRPCClient } from './ShelbyRPCClient.js';
|
|
7
8
|
import '@aptos-labs/ts-sdk';
|
|
8
9
|
import '../layout.js';
|
|
9
10
|
import 'zod';
|
|
10
|
-
import '
|
|
11
|
-
import '../../clay-codes-pdZFxI_B.js';
|
|
11
|
+
import '../../clay-codes-DHP-bYcP.js';
|
|
12
12
|
import '@shelby-protocol/clay-codes';
|
|
13
|
+
import '../types/blobs.js';
|
|
13
14
|
import '../operations/index.js';
|
|
14
15
|
import 'graphql-request';
|
|
15
16
|
import '../operations/generated/sdk.js';
|
|
16
17
|
import 'graphql';
|
|
17
18
|
import '../blobs.js';
|
|
18
19
|
import '../networks.js';
|
|
20
|
+
import '../types/storage_providers.js';
|
|
19
21
|
import '../types/payments.js';
|
|
20
22
|
import '../types/placement_groups.js';
|
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-WTICJPDB.mjs";
|
|
2
2
|
import {
|
|
3
3
|
ShelbyClient
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-7PN65RDX.mjs";
|
|
5
5
|
import {
|
|
6
6
|
MissingTransactionSubmitterError,
|
|
7
7
|
ShelbyBlobClient
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-SRV4YWFH.mjs";
|
|
9
9
|
import "../../chunk-XNEIWM4O.mjs";
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-HPPMI7DC.mjs";
|
|
11
|
+
import "../../chunk-OGKZ575S.mjs";
|
|
12
|
+
import "../../chunk-NHWWORCH.mjs";
|
|
13
13
|
import "../../chunk-Z7RFCADT.mjs";
|
|
14
|
+
import {
|
|
15
|
+
ShelbyMetadataClient
|
|
16
|
+
} from "../../chunk-MV6FNYAU.mjs";
|
|
14
17
|
import {
|
|
15
18
|
ShelbyMicropaymentChannelClient
|
|
16
|
-
} from "../../chunk-
|
|
19
|
+
} from "../../chunk-E5QCRTBU.mjs";
|
|
17
20
|
import "../../chunk-QQ57OGQ2.mjs";
|
|
18
21
|
import "../../chunk-ZHXCVRZX.mjs";
|
|
19
22
|
import "../../chunk-AD2G3QYD.mjs";
|
|
20
23
|
import "../../chunk-MQUVYMNQ.mjs";
|
|
21
24
|
import {
|
|
22
25
|
ShelbyPlacementGroupClient
|
|
23
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-W37FZSMA.mjs";
|
|
24
27
|
import {
|
|
25
28
|
ShelbyRPCClient
|
|
26
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-PJVWGMVI.mjs";
|
|
27
30
|
import "../../chunk-4MG4XGY4.mjs";
|
|
28
|
-
import "../../chunk-
|
|
31
|
+
import "../../chunk-CGYJLKBU.mjs";
|
|
29
32
|
import "../../chunk-KJ24NKPH.mjs";
|
|
30
33
|
import "../../chunk-AABBONAF.mjs";
|
|
31
|
-
import "../../chunk-W5NRGZEP.mjs";
|
|
32
34
|
import "../../chunk-I6NG5GNL.mjs";
|
|
33
35
|
import "../../chunk-IE6LYVIA.mjs";
|
|
34
36
|
import "../../chunk-OTBLZL2S.mjs";
|
|
35
|
-
import "../../chunk-
|
|
37
|
+
import "../../chunk-2WEX3K7C.mjs";
|
|
36
38
|
import "../../chunk-4JZO2D7T.mjs";
|
|
37
|
-
import "../../chunk-
|
|
38
|
-
import "../../chunk-
|
|
39
|
-
import "../../chunk-
|
|
39
|
+
import "../../chunk-JTXYKO3U.mjs";
|
|
40
|
+
import "../../chunk-AUQDI5BS.mjs";
|
|
41
|
+
import "../../chunk-4ZOFT75Q.mjs";
|
|
42
|
+
import "../../chunk-Z4FZ7W6L.mjs";
|
|
40
43
|
import "../../chunk-7P6ASYW6.mjs";
|
|
41
44
|
export {
|
|
42
45
|
MissingTransactionSubmitterError,
|
|
43
46
|
ShelbyBlobClient,
|
|
44
47
|
ShelbyClient,
|
|
48
|
+
ShelbyMetadataClient,
|
|
45
49
|
ShelbyMicropaymentChannelClient,
|
|
46
50
|
ShelbyPlacementGroupClient,
|
|
47
51
|
ShelbyRPCClient
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
expectedTotalChunksets,
|
|
6
6
|
generateCommitments,
|
|
7
7
|
generateMerkleRoot
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-2WEX3K7C.mjs";
|
|
9
9
|
import "../chunk-4JZO2D7T.mjs";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-JTXYKO3U.mjs";
|
|
11
|
+
import "../chunk-AUQDI5BS.mjs";
|
|
12
12
|
import "../chunk-7P6ASYW6.mjs";
|
|
13
13
|
export {
|
|
14
14
|
BlobCommitmentsSchema,
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare const NetworkToShelbyRPCBaseUrl: {
|
|
|
4
4
|
readonly shelbynet: "https://api.shelbynet.shelby.xyz/shelby";
|
|
5
5
|
readonly netna: undefined;
|
|
6
6
|
readonly devnet: undefined;
|
|
7
|
-
readonly testnet:
|
|
7
|
+
readonly testnet: "https://api.testnet.shelby.xyz/shelby";
|
|
8
8
|
readonly mainnet: undefined;
|
|
9
9
|
readonly local: undefined;
|
|
10
10
|
readonly custom: undefined;
|
|
@@ -16,7 +16,19 @@ declare const NetworkToShelbyBlobIndexerBaseUrl: {
|
|
|
16
16
|
readonly shelbynet: "https://api.shelbynet.aptoslabs.com/nocode/v1/public/cmforrguw0042s601fn71f9l2/v1/graphql";
|
|
17
17
|
readonly netna: undefined;
|
|
18
18
|
readonly devnet: undefined;
|
|
19
|
-
readonly testnet:
|
|
19
|
+
readonly testnet: "https://api.testnet.aptoslabs.com/nocode/v1/public/cmlfqs5wt00qrs601zt5s4kfj/v1/graphql";
|
|
20
|
+
readonly mainnet: undefined;
|
|
21
|
+
readonly local: undefined;
|
|
22
|
+
readonly custom: undefined;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Mapping of Aptos networks to gas station URL.
|
|
26
|
+
*/
|
|
27
|
+
declare const NetworkToGasStationBaseUrl: {
|
|
28
|
+
readonly shelbynet: "https://api.shelbynet.shelby.xyz/gs/v1";
|
|
29
|
+
readonly netna: undefined;
|
|
30
|
+
readonly devnet: undefined;
|
|
31
|
+
readonly testnet: "https://api.testnet.shelby.xyz/gs/v1";
|
|
20
32
|
readonly mainnet: undefined;
|
|
21
33
|
readonly local: undefined;
|
|
22
34
|
readonly custom: undefined;
|
|
@@ -30,4 +42,4 @@ declare const SHELBYUSD_TOKEN_MODULE = "shelby_usd";
|
|
|
30
42
|
declare const SHELBYUSD_TOKEN_NAME = "ShelbyUSD";
|
|
31
43
|
declare const SHELBYUSD_FA_METADATA_ADDRESS = "0x1b18363a9f1fe5e6ebf247daba5cc1c18052bb232efdc4c50f556053922d98e1";
|
|
32
44
|
|
|
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 };
|
|
45
|
+
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 };
|