@shelby-protocol/sdk 0.3.0 → 0.3.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 +12 -3
- package/dist/browser/index.mjs +3717 -142
- package/dist/core/aptos-explorer.mjs +46 -5
- package/dist/core/blobs.mjs +12 -4
- package/dist/core/chunk.mjs +58 -9
- package/dist/core/clients/ShelbyBlobClient.d.ts +0 -43
- package/dist/core/clients/ShelbyBlobClient.mjs +1084 -17
- package/dist/core/clients/ShelbyClient.d.ts +12 -2
- package/dist/core/clients/ShelbyClient.mjs +2915 -23
- package/dist/core/clients/ShelbyClientConfig.mjs +0 -1
- package/dist/core/clients/ShelbyMetadataClient.d.ts +0 -18
- package/dist/core/clients/ShelbyMetadataClient.mjs +306 -6
- package/dist/core/clients/ShelbyMicropaymentChannelClient.d.ts +7 -49
- package/dist/core/clients/ShelbyMicropaymentChannelClient.mjs +839 -13
- package/dist/core/clients/ShelbyPlacementGroupClient.mjs +307 -8
- package/dist/core/clients/ShelbyRPCClient.d.ts +106 -3
- package/dist/core/clients/ShelbyRPCClient.mjs +1261 -12
- package/dist/core/clients/index.d.ts +2 -1
- package/dist/core/clients/index.mjs +3420 -39
- package/dist/core/clients/utils.mjs +65 -6
- package/dist/core/commitments.mjs +270 -11
- package/dist/core/constants.d.ts +2 -2
- package/dist/core/constants.mjs +39 -16
- package/dist/core/erasure/clay-codes.mjs +129 -4
- package/dist/core/erasure/constants.mjs +33 -10
- package/dist/core/erasure/default.mjs +191 -9
- package/dist/core/erasure/index.mjs +266 -23
- package/dist/core/erasure/reed-solomon.mjs +68 -4
- package/dist/core/erasure/utils.mjs +0 -2
- package/dist/core/errors.mjs +29 -8
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +3711 -142
- package/dist/core/layout.mjs +37 -5
- package/dist/core/networks.mjs +10 -5
- package/dist/core/operations/generated/sdk.d.ts +9 -0
- package/dist/core/operations/generated/sdk.mjs +183 -18
- package/dist/core/operations/index.mjs +284 -24
- package/dist/core/promises.mjs +4 -4
- package/dist/core/rpc-responses.mjs +29 -10
- package/dist/core/shelby-explorer.mjs +31 -6
- package/dist/core/strings.mjs +0 -2
- package/dist/core/types/blobs.mjs +0 -1
- package/dist/core/types/index.mjs +230 -9
- package/dist/core/types/payments.d.ts +6 -6
- package/dist/core/types/payments.mjs +230 -5
- package/dist/core/types/placement_groups.mjs +0 -1
- package/dist/core/types/storage_providers.mjs +0 -1
- package/dist/core/utils.mjs +94 -8
- package/dist/node/clients/ShelbyNodeClient.d.ts +1 -0
- package/dist/node/clients/ShelbyNodeClient.mjs +2919 -24
- package/dist/node/clients/index.d.ts +1 -0
- package/dist/node/clients/index.mjs +2920 -26
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.mjs +3734 -149
- package/dist/node/parallel/commitment_worker.d.ts +9 -0
- package/dist/node/parallel/commitment_worker.mjs +298 -0
- package/dist/node/parallel/commitment_worker_pool.d.ts +35 -0
- package/dist/node/parallel/commitment_worker_pool.mjs +286 -0
- package/dist/node/parallel/default_commitment_worker_pool.d.ts +24 -0
- package/dist/node/parallel/default_commitment_worker_pool.mjs +302 -0
- package/dist/node/parallel/index.d.ts +11 -0
- package/dist/node/parallel/index.mjs +563 -0
- package/dist/node/parallel/parallel_commitments.d.ts +32 -0
- package/dist/node/parallel/parallel_commitments.mjs +561 -0
- package/dist/node/parallel/worker_pool.d.ts +74 -0
- package/dist/node/parallel/worker_pool.mjs +248 -0
- package/dist/node/testUtil.mjs +8 -4
- package/package.json +6 -2
- package/dist/chunk-3NRBHSMQ.mjs +0 -12
- package/dist/chunk-5BVSWXQJ.mjs +0 -801
- package/dist/chunk-6FJNAUU5.mjs +0 -278
- package/dist/chunk-6XSZRDLJ.mjs +0 -375
- package/dist/chunk-7P6ASYW6.mjs +0 -9
- package/dist/chunk-A4IG6GSE.mjs +0 -21
- package/dist/chunk-AD2G3QYD.mjs +0 -0
- package/dist/chunk-AUQDI5BS.mjs +0 -43
- package/dist/chunk-AY3HBWXA.mjs +0 -51
- package/dist/chunk-BDSW5PHM.mjs +0 -37
- package/dist/chunk-C6RQ3AEU.mjs +0 -51
- package/dist/chunk-CQ6QPIZK.mjs +0 -37
- package/dist/chunk-D6GQHO6G.mjs +0 -15
- package/dist/chunk-EM67QTMR.mjs +0 -0
- package/dist/chunk-I6NG5GNL.mjs +0 -8
- package/dist/chunk-JTXYKO3U.mjs +0 -38
- package/dist/chunk-KG2TMLEV.mjs +0 -207
- package/dist/chunk-M3CP5TFP.mjs +0 -39
- package/dist/chunk-M7W43K2Q.mjs +0 -505
- package/dist/chunk-MB7C7VQF.mjs +0 -0
- package/dist/chunk-MNCQBEMS.mjs +0 -55
- package/dist/chunk-MQUVYMNQ.mjs +0 -0
- package/dist/chunk-NEO7Z3ZQ.mjs +0 -49
- package/dist/chunk-NHWWORCH.mjs +0 -72
- package/dist/chunk-OEK24ON7.mjs +0 -135
- package/dist/chunk-QQ57OGQ2.mjs +0 -0
- package/dist/chunk-RNNJXTX2.mjs +0 -154
- package/dist/chunk-S6Q4OG7H.mjs +0 -83
- package/dist/chunk-TET3DJEO.mjs +0 -199
- package/dist/chunk-UEZNZBJO.mjs +0 -104
- package/dist/chunk-V46D5NBW.mjs +0 -11
- package/dist/chunk-V4B3GAMQ.mjs +0 -42
- package/dist/chunk-WFWRBNTW.mjs +0 -412
- package/dist/chunk-WTICJPDB.mjs +0 -0
- package/dist/chunk-XNEIWM4O.mjs +0 -0
- package/dist/chunk-Z4FZ7W6L.mjs +0 -39
- package/dist/chunk-Z7RFCADT.mjs +0 -0
- package/dist/chunk-ZHXCVRZX.mjs +0 -0
|
@@ -5,9 +5,9 @@ import { BlobName } from '../layout.js';
|
|
|
5
5
|
import { WriteBlobCommitmentsOptions, ShelbyBlobClient } from './ShelbyBlobClient.js';
|
|
6
6
|
import { ShelbyClientConfig } from './ShelbyClientConfig.js';
|
|
7
7
|
import { ShelbyMetadataClient } from './ShelbyMetadataClient.js';
|
|
8
|
-
import { ShelbyRPCClient } from './ShelbyRPCClient.js';
|
|
9
|
-
import '@shelby-protocol/clay-codes';
|
|
8
|
+
import { ShelbyRPCClient, BlobOwnerAuth } from './ShelbyRPCClient.js';
|
|
10
9
|
import 'zod';
|
|
10
|
+
import '@shelby-protocol/clay-codes';
|
|
11
11
|
import '../types/blobs.js';
|
|
12
12
|
import '../operations/index.js';
|
|
13
13
|
import 'graphql-request';
|
|
@@ -15,6 +15,7 @@ import '../operations/generated/sdk.js';
|
|
|
15
15
|
import 'graphql';
|
|
16
16
|
import '../networks.js';
|
|
17
17
|
import '../types/storage_providers.js';
|
|
18
|
+
import '../rpc-responses.js';
|
|
18
19
|
import '../types/payments.js';
|
|
19
20
|
|
|
20
21
|
type UploadOptions = WriteBlobCommitmentsOptions;
|
|
@@ -76,6 +77,15 @@ declare class ShelbyClient {
|
|
|
76
77
|
* ```
|
|
77
78
|
*/
|
|
78
79
|
constructor(config: ShelbyClientConfig, provider?: ErasureCodingProvider);
|
|
80
|
+
/**
|
|
81
|
+
* Sign an authentication challenge for blob owner verification.
|
|
82
|
+
*
|
|
83
|
+
* The default implementation delegates to `ShelbyRPCClient.signChallenge`
|
|
84
|
+
* which works for standard Ed25519 accounts. Kits that use derived /
|
|
85
|
+
* abstracted accounts (Solana, Ethereum) should override this method to
|
|
86
|
+
* provide the correct public key bytes and derivation metadata.
|
|
87
|
+
*/
|
|
88
|
+
protected signChallenge(account: Account, challenge: string): BlobOwnerAuth;
|
|
79
89
|
/**
|
|
80
90
|
* Get the erasure coding provider, creating it if necessary.
|
|
81
91
|
* This allows lazy initialization for users who don't provide a provider.
|