@storagehub/api-augment 0.2.6 → 0.2.7
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/parachain/interfaces/lookup.js +245 -239
- package/dist/parachain/interfaces/lookup.js.map +1 -1
- package/dist/solochain-evm/interfaces/lookup.js +195 -189
- package/dist/solochain-evm/interfaces/lookup.js.map +1 -1
- package/dist/types/parachain/interfaces/augment-api-consts.d.ts +4 -0
- package/dist/types/parachain/interfaces/augment-api-errors.d.ts +24 -0
- package/dist/types/parachain/interfaces/augment-api-events.d.ts +10 -24
- package/dist/types/parachain/interfaces/augment-api-tx.d.ts +27 -29
- package/dist/types/parachain/interfaces/lookup.d.ts +239 -239
- package/dist/types/parachain/interfaces/registry.d.ts +2 -1
- package/dist/types/parachain/interfaces/types-lookup.d.ts +247 -244
- package/dist/types/solochain-evm/interfaces/augment-api-consts.d.ts +4 -0
- package/dist/types/solochain-evm/interfaces/augment-api-errors.d.ts +24 -0
- package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +10 -24
- package/dist/types/solochain-evm/interfaces/augment-api-tx.d.ts +27 -23
- package/dist/types/solochain-evm/interfaces/lookup.d.ts +189 -189
- package/dist/types/solochain-evm/interfaces/registry.d.ts +2 -1
- package/dist/types/solochain-evm/interfaces/types-lookup.d.ts +197 -194
- package/metadata-sh-parachain.json +1 -1
- package/metadata-sh-solochain-evm.json +1 -1
- package/package.json +1 -1
- package/src/parachain/interfaces/augment-api-consts.ts +4 -0
- package/src/parachain/interfaces/augment-api-errors.ts +24 -0
- package/src/parachain/interfaces/augment-api-events.ts +8 -32
- package/src/parachain/interfaces/augment-api-tx.ts +36 -41
- package/src/parachain/interfaces/lookup.ts +245 -239
- package/src/parachain/interfaces/registry.ts +2 -0
- package/src/parachain/interfaces/types-lookup.ts +255 -246
- package/src/solochain-evm/interfaces/augment-api-consts.ts +4 -0
- package/src/solochain-evm/interfaces/augment-api-errors.ts +24 -0
- package/src/solochain-evm/interfaces/augment-api-events.ts +8 -32
- package/src/solochain-evm/interfaces/augment-api-tx.ts +36 -35
- package/src/solochain-evm/interfaces/lookup.ts +195 -189
- package/src/solochain-evm/interfaces/registry.ts +2 -0
- package/src/solochain-evm/interfaces/types-lookup.ts +205 -196
package/package.json
CHANGED
|
@@ -117,6 +117,10 @@ declare module "@polkadot/api-base/types/consts" {
|
|
|
117
117
|
* Maximum number of expired items (per type) to clean up in a single tick.
|
|
118
118
|
**/
|
|
119
119
|
maxExpiredItemsInTick: u32 & AugmentedConst<ApiType>;
|
|
120
|
+
/**
|
|
121
|
+
* Maximum number of file deletions that can be processed in a single extrinsic call for `delete_files` and `delete_files_for_incomplete_storage_request`.
|
|
122
|
+
**/
|
|
123
|
+
maxFileDeletionsPerExtrinsic: u32 & AugmentedConst<ApiType>;
|
|
120
124
|
/**
|
|
121
125
|
* Maximum byte size of a file path.
|
|
122
126
|
**/
|
|
@@ -166,6 +166,10 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
166
166
|
* BSP did not succeed threshold check.
|
|
167
167
|
**/
|
|
168
168
|
AboveThreshold: AugmentedError<ApiType>;
|
|
169
|
+
/**
|
|
170
|
+
* Batch file deletion must contain files from a single bucket only.
|
|
171
|
+
**/
|
|
172
|
+
BatchFileDeletionMustContainSingleBucket: AugmentedError<ApiType>;
|
|
169
173
|
/**
|
|
170
174
|
* BSP has already confirmed storing the given file.
|
|
171
175
|
**/
|
|
@@ -222,6 +226,10 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
222
226
|
* Divided by 0
|
|
223
227
|
**/
|
|
224
228
|
DividedByZero: AugmentedError<ApiType>;
|
|
229
|
+
/**
|
|
230
|
+
* Duplicate file key detected within the same batch deletion request.
|
|
231
|
+
**/
|
|
232
|
+
DuplicateFileKeyInBatchFileDeletion: AugmentedError<ApiType>;
|
|
225
233
|
/**
|
|
226
234
|
* Failed to fetch the dynamic-rate payment stream.
|
|
227
235
|
**/
|
|
@@ -262,6 +270,18 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
262
270
|
* Failed to get the payment account of the provider.
|
|
263
271
|
**/
|
|
264
272
|
FailedToGetPaymentAccount: AugmentedError<ApiType>;
|
|
273
|
+
/**
|
|
274
|
+
* Failed to push file key to bounded vector during BSP file deletion
|
|
275
|
+
**/
|
|
276
|
+
FailedToPushFileKeyToBspDeletionVector: AugmentedError<ApiType>;
|
|
277
|
+
/**
|
|
278
|
+
* Failed to push file key to bounded vector during bucket file deletion
|
|
279
|
+
**/
|
|
280
|
+
FailedToPushFileKeyToBucketDeletionVector: AugmentedError<ApiType>;
|
|
281
|
+
/**
|
|
282
|
+
* Failed to push user to bounded vector during BSP file deletion
|
|
283
|
+
**/
|
|
284
|
+
FailedToPushUserToBspDeletionVector: AugmentedError<ApiType>;
|
|
265
285
|
/**
|
|
266
286
|
* Failed to query earliest volunteer tick
|
|
267
287
|
**/
|
|
@@ -379,6 +399,10 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
379
399
|
* No file keys to confirm storing
|
|
380
400
|
**/
|
|
381
401
|
NoFileKeysToConfirm: AugmentedError<ApiType>;
|
|
402
|
+
/**
|
|
403
|
+
* Requires at least 1 file key to be deleted.
|
|
404
|
+
**/
|
|
405
|
+
NoFileKeysToDelete: AugmentedError<ApiType>;
|
|
382
406
|
/**
|
|
383
407
|
* No global reputation weight set.
|
|
384
408
|
**/
|
|
@@ -438,26 +438,12 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
438
438
|
{ bspId: H256; fileKey: H256; newRoot: H256 }
|
|
439
439
|
>;
|
|
440
440
|
/**
|
|
441
|
-
* Notifies that
|
|
441
|
+
* Notifies that file deletions have been completed successfully for a BSP.
|
|
442
442
|
**/
|
|
443
|
-
|
|
443
|
+
BspFileDeletionsCompleted: AugmentedEvent<
|
|
444
444
|
ApiType,
|
|
445
|
-
[
|
|
446
|
-
|
|
447
|
-
fileKey: H256,
|
|
448
|
-
fileSize: u64,
|
|
449
|
-
bspId: H256,
|
|
450
|
-
oldRoot: H256,
|
|
451
|
-
newRoot: H256
|
|
452
|
-
],
|
|
453
|
-
{
|
|
454
|
-
user: AccountId32;
|
|
455
|
-
fileKey: H256;
|
|
456
|
-
fileSize: u64;
|
|
457
|
-
bspId: H256;
|
|
458
|
-
oldRoot: H256;
|
|
459
|
-
newRoot: H256;
|
|
460
|
-
}
|
|
445
|
+
[users: Vec<AccountId32>, fileKeys: Vec<H256>, bspId: H256, oldRoot: H256, newRoot: H256],
|
|
446
|
+
{ users: Vec<AccountId32>; fileKeys: Vec<H256>; bspId: H256; oldRoot: H256; newRoot: H256 }
|
|
461
447
|
>;
|
|
462
448
|
BspRequestedToStopStoring: AugmentedEvent<
|
|
463
449
|
ApiType,
|
|
@@ -473,14 +459,13 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
473
459
|
{ who: AccountId32; bucketId: H256; maybeCollectionId: Option<u32> }
|
|
474
460
|
>;
|
|
475
461
|
/**
|
|
476
|
-
* Notifies that
|
|
462
|
+
* Notifies that file deletions have been completed successfully for a Bucket.
|
|
477
463
|
**/
|
|
478
|
-
|
|
464
|
+
BucketFileDeletionsCompleted: AugmentedEvent<
|
|
479
465
|
ApiType,
|
|
480
466
|
[
|
|
481
467
|
user: AccountId32,
|
|
482
|
-
|
|
483
|
-
fileSize: u64,
|
|
468
|
+
fileKeys: Vec<H256>,
|
|
484
469
|
bucketId: H256,
|
|
485
470
|
mspId: Option<H256>,
|
|
486
471
|
oldRoot: H256,
|
|
@@ -488,8 +473,7 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
488
473
|
],
|
|
489
474
|
{
|
|
490
475
|
user: AccountId32;
|
|
491
|
-
|
|
492
|
-
fileSize: u64;
|
|
476
|
+
fileKeys: Vec<H256>;
|
|
493
477
|
bucketId: H256;
|
|
494
478
|
mspId: Option<H256>;
|
|
495
479
|
oldRoot: H256;
|
|
@@ -573,14 +557,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
573
557
|
error: SpRuntimeDispatchError;
|
|
574
558
|
}
|
|
575
559
|
>;
|
|
576
|
-
/**
|
|
577
|
-
* Notifies that a file has been deleted from a rejected storage request.
|
|
578
|
-
**/
|
|
579
|
-
FileDeletedFromIncompleteStorageRequest: AugmentedEvent<
|
|
580
|
-
ApiType,
|
|
581
|
-
[fileKey: H256, bspId: Option<H256>],
|
|
582
|
-
{ fileKey: H256; bspId: Option<H256> }
|
|
583
|
-
>;
|
|
584
560
|
/**
|
|
585
561
|
* Notifies that a file will be deleted.
|
|
586
562
|
**/
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
CumulusPrimitivesParachainInherentParachainInherentData,
|
|
20
20
|
PalletBalancesAdjustmentDirection,
|
|
21
21
|
PalletFileSystemBucketMoveRequestResponse,
|
|
22
|
+
PalletFileSystemFileDeletionRequest,
|
|
22
23
|
PalletFileSystemFileKeyWithProof,
|
|
23
24
|
PalletFileSystemFileOperationIntention,
|
|
24
25
|
PalletFileSystemReplicationTarget,
|
|
@@ -529,63 +530,57 @@ declare module "@polkadot/api-base/types/submittable" {
|
|
|
529
530
|
[H256]
|
|
530
531
|
>;
|
|
531
532
|
/**
|
|
532
|
-
* Deletes
|
|
533
|
+
* Deletes files from a provider's forest, changing its root
|
|
533
534
|
*
|
|
534
535
|
* This extrinsic allows any actor to execute file deletion based on signed intentions
|
|
535
|
-
* from the `FileDeletionRequested` event. It requires a valid forest proof showing that
|
|
536
|
-
*
|
|
536
|
+
* from the `FileDeletionRequested` event. It requires a valid forest proof showing that
|
|
537
|
+
* all files exist in the specified provider's forest before allowing deletion.
|
|
537
538
|
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
539
|
+
* Multiple files can be deleted in a single call using one forest proof bounded by [`MaxFileDeletionsPerExtrinsic`](Config::MaxFileDeletionsPerExtrinsic).
|
|
540
|
+
*
|
|
541
|
+
* If `bsp_id` is `None`, files will be deleted from the bucket forest.
|
|
542
|
+
* If `bsp_id` is `Some(id)`, files will be deleted from the specified BSP's forest.
|
|
540
543
|
**/
|
|
541
|
-
|
|
544
|
+
deleteFiles: AugmentedSubmittable<
|
|
542
545
|
(
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
fingerprint: H256 | string | Uint8Array,
|
|
546
|
+
fileDeletions:
|
|
547
|
+
| Vec<PalletFileSystemFileDeletionRequest>
|
|
548
|
+
| (
|
|
549
|
+
| PalletFileSystemFileDeletionRequest
|
|
550
|
+
| {
|
|
551
|
+
fileOwner?: any;
|
|
552
|
+
signedIntention?: any;
|
|
553
|
+
signature?: any;
|
|
554
|
+
bucketId?: any;
|
|
555
|
+
location?: any;
|
|
556
|
+
size_?: any;
|
|
557
|
+
fingerprint?: any;
|
|
558
|
+
}
|
|
559
|
+
| string
|
|
560
|
+
| Uint8Array
|
|
561
|
+
)[],
|
|
560
562
|
bspId: Option<H256> | null | Uint8Array | H256 | string,
|
|
561
563
|
forestProof: SpTrieStorageProofCompactProof | { encodedNodes?: any } | string | Uint8Array
|
|
562
564
|
) => SubmittableExtrinsic<ApiType>,
|
|
563
|
-
[
|
|
564
|
-
AccountId32,
|
|
565
|
-
PalletFileSystemFileOperationIntention,
|
|
566
|
-
SpRuntimeMultiSignature,
|
|
567
|
-
H256,
|
|
568
|
-
Bytes,
|
|
569
|
-
u64,
|
|
570
|
-
H256,
|
|
571
|
-
Option<H256>,
|
|
572
|
-
SpTrieStorageProofCompactProof
|
|
573
|
-
]
|
|
565
|
+
[Vec<PalletFileSystemFileDeletionRequest>, Option<H256>, SpTrieStorageProofCompactProof]
|
|
574
566
|
>;
|
|
575
567
|
/**
|
|
576
|
-
* Delete
|
|
568
|
+
* Delete files from an incomplete (rejected, expired or revoked) storage request.
|
|
569
|
+
*
|
|
570
|
+
* This extrinsic allows fisherman nodes to delete files from providers when IncompleteStorageRequestMetadata
|
|
571
|
+
* for the given file keys exist in the IncompleteStorageRequests mapping. It validates that the metadata exists
|
|
572
|
+
* for each file, that the provider has the files in its Merkle Patricia Forest, and verifies the file keys match
|
|
573
|
+
* the metadata.
|
|
577
574
|
*
|
|
578
|
-
*
|
|
579
|
-
* exist in the IncompleteStorageRequests mapping. It validates that the IncompleteStorageRequestMetadata exists,
|
|
580
|
-
* that the provider has the file in its Merkle Patricia Forest, and verifies the file key matches the metadata.
|
|
575
|
+
* Multiple files can be deleted in a single call using one forest proof bounded by [`MaxFileDeletionsPerExtrinsic`](Config::MaxFileDeletionsPerExtrinsic).
|
|
581
576
|
**/
|
|
582
|
-
|
|
577
|
+
deleteFilesForIncompleteStorageRequest: AugmentedSubmittable<
|
|
583
578
|
(
|
|
584
|
-
|
|
579
|
+
fileKeys: Vec<H256> | (H256 | string | Uint8Array)[],
|
|
585
580
|
bspId: Option<H256> | null | Uint8Array | H256 | string,
|
|
586
581
|
forestProof: SpTrieStorageProofCompactProof | { encodedNodes?: any } | string | Uint8Array
|
|
587
582
|
) => SubmittableExtrinsic<ApiType>,
|
|
588
|
-
[H256
|
|
583
|
+
[Vec<H256>, Option<H256>, SpTrieStorageProofCompactProof]
|
|
589
584
|
>;
|
|
590
585
|
/**
|
|
591
586
|
* Issue a new storage request for a file
|