@storagehub/api-augment 0.2.11 → 0.2.14
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/augment-api-consts.js +1 -1
- package/dist/parachain/interfaces/augment-api-errors.js +1 -1
- package/dist/parachain/interfaces/augment-api-events.js +1 -1
- package/dist/parachain/interfaces/augment-api-query.js +1 -1
- package/dist/parachain/interfaces/augment-api-rpc.js +1 -1
- package/dist/parachain/interfaces/augment-api-runtime.js +1 -1
- package/dist/parachain/interfaces/augment-api-tx.js +1 -1
- package/dist/parachain/interfaces/augment-api.js +7 -7
- package/dist/parachain/interfaces/augment-types.js +1 -1
- package/dist/parachain/interfaces/index.js +1 -1
- package/dist/parachain/interfaces/lookup.js +2406 -2871
- package/dist/parachain/interfaces/lookup.js.map +1 -1
- package/dist/parachain/interfaces/registry.js +1 -1
- package/dist/parachain/interfaces/storagehubclient/index.js +1 -1
- package/dist/parachain/interfaces/types-lookup.js +1 -1
- package/dist/parachain/interfaces/types.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-consts.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-errors.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-events.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-query.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-rpc.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-runtime.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-tx.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api.js +7 -7
- package/dist/solochain-evm/interfaces/augment-types.js +1 -1
- package/dist/solochain-evm/interfaces/index.js +1 -1
- package/dist/solochain-evm/interfaces/lookup.js +1686 -2109
- package/dist/solochain-evm/interfaces/lookup.js.map +1 -1
- package/dist/solochain-evm/interfaces/registry.js +1 -1
- package/dist/solochain-evm/interfaces/storagehubclient/index.js +1 -1
- package/dist/solochain-evm/interfaces/types-lookup.js +1 -1
- package/dist/solochain-evm/interfaces/types.js +1 -1
- package/dist/types/parachain/interfaces/augment-api-consts.d.ts +7 -7
- package/dist/types/parachain/interfaces/augment-api-errors.d.ts +3 -111
- package/dist/types/parachain/interfaces/augment-api-events.d.ts +185 -917
- package/dist/types/parachain/interfaces/augment-api-query.d.ts +112 -319
- package/dist/types/parachain/interfaces/augment-api-rpc.d.ts +32 -32
- package/dist/types/parachain/interfaces/augment-api-runtime.d.ts +25 -25
- package/dist/types/parachain/interfaces/augment-api-tx.d.ts +212 -637
- package/dist/types/parachain/interfaces/augment-api.d.ts +7 -7
- package/dist/types/parachain/interfaces/augment-types.d.ts +76 -75
- package/dist/types/parachain/interfaces/index.d.ts +1 -1
- package/dist/types/parachain/interfaces/lookup.d.ts +289 -326
- package/dist/types/parachain/interfaces/registry.d.ts +4 -4
- package/dist/types/parachain/interfaces/storagehubclient/index.d.ts +1 -1
- package/dist/types/parachain/interfaces/storagehubclient/types.d.ts +46 -36
- package/dist/types/parachain/interfaces/types-lookup.d.ts +525 -714
- package/dist/types/parachain/interfaces/types.d.ts +1 -1
- package/dist/types/solochain-evm/interfaces/augment-api-consts.d.ts +7 -7
- package/dist/types/solochain-evm/interfaces/augment-api-errors.d.ts +3 -111
- package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +150 -763
- package/dist/types/solochain-evm/interfaces/augment-api-query.d.ts +100 -291
- package/dist/types/solochain-evm/interfaces/augment-api-rpc.d.ts +32 -32
- package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +25 -25
- package/dist/types/solochain-evm/interfaces/augment-api-tx.d.ts +195 -582
- package/dist/types/solochain-evm/interfaces/augment-api.d.ts +7 -7
- package/dist/types/solochain-evm/interfaces/augment-types.d.ts +76 -75
- package/dist/types/solochain-evm/interfaces/index.d.ts +1 -1
- package/dist/types/solochain-evm/interfaces/lookup.d.ts +239 -276
- package/dist/types/solochain-evm/interfaces/registry.d.ts +4 -4
- package/dist/types/solochain-evm/interfaces/storagehubclient/index.d.ts +1 -1
- package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +47 -37
- package/dist/types/solochain-evm/interfaces/types-lookup.d.ts +425 -584
- package/dist/types/solochain-evm/interfaces/types.d.ts +1 -1
- package/metadata-sh-parachain.json +1 -1
- package/metadata-sh-solochain-evm.json +1 -1
- package/package.json +2 -2
- package/src/parachain/interfaces/augment-api-errors.ts +0 -108
- package/src/parachain/interfaces/augment-api-events.ts +14 -113
- package/src/parachain/interfaces/augment-api-tx.ts +63 -10
- package/src/parachain/interfaces/augment-types.ts +2 -0
- package/src/parachain/interfaces/lookup.ts +326 -390
- package/src/parachain/interfaces/registry.ts +2 -2
- package/src/parachain/interfaces/storagehubclient/types.ts +14 -4
- package/src/parachain/interfaces/types-lookup.ts +388 -490
- package/src/solochain-evm/interfaces/augment-api-errors.ts +0 -108
- package/src/solochain-evm/interfaces/augment-api-events.ts +14 -113
- package/src/solochain-evm/interfaces/augment-api-tx.ts +63 -10
- package/src/solochain-evm/interfaces/augment-types.ts +2 -0
- package/src/solochain-evm/interfaces/lookup.ts +276 -340
- package/src/solochain-evm/interfaces/registry.ts +2 -2
- package/src/solochain-evm/interfaces/storagehubclient/types.ts +14 -4
- package/src/solochain-evm/interfaces/types-lookup.ts +338 -440
- package/storagehub-api-augment-0.2.14.tgz +0 -0
|
@@ -182,10 +182,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
182
182
|
[key: string]: AugmentedError<ApiType>;
|
|
183
183
|
};
|
|
184
184
|
fileSystem: {
|
|
185
|
-
/**
|
|
186
|
-
* BSP did not succeed threshold check.
|
|
187
|
-
**/
|
|
188
|
-
AboveThreshold: AugmentedError<ApiType>;
|
|
189
185
|
/**
|
|
190
186
|
* Batch file deletion must contain files from a single bucket only.
|
|
191
187
|
**/
|
|
@@ -194,18 +190,10 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
194
190
|
* BSP has already confirmed storing the given file.
|
|
195
191
|
**/
|
|
196
192
|
BspAlreadyConfirmed: AugmentedError<ApiType>;
|
|
197
|
-
/**
|
|
198
|
-
* BSP is already a data server for the move bucket request.
|
|
199
|
-
**/
|
|
200
|
-
BspAlreadyDataServer: AugmentedError<ApiType>;
|
|
201
193
|
/**
|
|
202
194
|
* BSP already volunteered to store the given file.
|
|
203
195
|
**/
|
|
204
196
|
BspAlreadyVolunteered: AugmentedError<ApiType>;
|
|
205
|
-
/**
|
|
206
|
-
* Too many registered data servers for the move bucket request.
|
|
207
|
-
**/
|
|
208
|
-
BspDataServersExceeded: AugmentedError<ApiType>;
|
|
209
197
|
/**
|
|
210
198
|
* BSP has not confirmed storing the given file.
|
|
211
199
|
**/
|
|
@@ -222,10 +210,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
222
210
|
* Action not allowed while the bucket is being moved.
|
|
223
211
|
**/
|
|
224
212
|
BucketIsBeingMoved: AugmentedError<ApiType>;
|
|
225
|
-
/**
|
|
226
|
-
* Bucket is not private. Call `update_bucket_privacy` to make it private.
|
|
227
|
-
**/
|
|
228
|
-
BucketIsNotPrivate: AugmentedError<ApiType>;
|
|
229
213
|
/**
|
|
230
214
|
* Bucket is not empty.
|
|
231
215
|
**/
|
|
@@ -242,10 +226,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
242
226
|
* Collection ID was not found.
|
|
243
227
|
**/
|
|
244
228
|
CollectionNotFound: AugmentedError<ApiType>;
|
|
245
|
-
/**
|
|
246
|
-
* Divided by 0
|
|
247
|
-
**/
|
|
248
|
-
DividedByZero: AugmentedError<ApiType>;
|
|
249
229
|
/**
|
|
250
230
|
* Duplicate file key detected within the same batch deletion request.
|
|
251
231
|
**/
|
|
@@ -270,18 +250,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
270
250
|
* Failed to create file metadata
|
|
271
251
|
**/
|
|
272
252
|
FailedToCreateFileMetadata: AugmentedError<ApiType>;
|
|
273
|
-
/**
|
|
274
|
-
* Failed to decode threshold.
|
|
275
|
-
**/
|
|
276
|
-
FailedToDecodeThreshold: AugmentedError<ApiType>;
|
|
277
|
-
/**
|
|
278
|
-
* Failed to encode BSP id as slice.
|
|
279
|
-
**/
|
|
280
|
-
FailedToEncodeBsp: AugmentedError<ApiType>;
|
|
281
|
-
/**
|
|
282
|
-
* Failed to encode fingerprint as slice.
|
|
283
|
-
**/
|
|
284
|
-
FailedToEncodeFingerprint: AugmentedError<ApiType>;
|
|
285
253
|
/**
|
|
286
254
|
* Failed to get owner account of ID of provider
|
|
287
255
|
**/
|
|
@@ -306,10 +274,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
306
274
|
* Failed to query earliest volunteer tick
|
|
307
275
|
**/
|
|
308
276
|
FailedToQueryEarliestFileVolunteerTick: AugmentedError<ApiType>;
|
|
309
|
-
/**
|
|
310
|
-
* Failed to convert to primitive type.
|
|
311
|
-
**/
|
|
312
|
-
FailedTypeConversion: AugmentedError<ApiType>;
|
|
313
277
|
/**
|
|
314
278
|
* File has an active storage request and as such is not eligible for deletion.
|
|
315
279
|
* The user should use the `revoke_storage_request` extrinsic to revoke it first.
|
|
@@ -319,18 +283,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
319
283
|
* File has an `IncompleteStorageRequest` associated with it and as such is not eligible for a new storage request
|
|
320
284
|
**/
|
|
321
285
|
FileHasIncompleteStorageRequest: AugmentedError<ApiType>;
|
|
322
|
-
/**
|
|
323
|
-
* File key already pending deletion.
|
|
324
|
-
**/
|
|
325
|
-
FileKeyAlreadyPendingDeletion: AugmentedError<ApiType>;
|
|
326
|
-
/**
|
|
327
|
-
* File key computed from metadata doesn't match the provided file key.
|
|
328
|
-
**/
|
|
329
|
-
FileKeyMismatch: AugmentedError<ApiType>;
|
|
330
|
-
/**
|
|
331
|
-
* File key not found in pending deletion requests.
|
|
332
|
-
**/
|
|
333
|
-
FileKeyNotPendingDeletion: AugmentedError<ApiType>;
|
|
334
286
|
/**
|
|
335
287
|
* The bounded vector that holds file metadata to process it is full but there's still more to process.
|
|
336
288
|
**/
|
|
@@ -343,10 +295,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
343
295
|
* Failed to fetch the rate for the payment stream.
|
|
344
296
|
**/
|
|
345
297
|
FixedRatePaymentStreamNotFound: AugmentedError<ApiType>;
|
|
346
|
-
/**
|
|
347
|
-
* Forest proof verification failed.
|
|
348
|
-
**/
|
|
349
|
-
ForestProofVerificationFailed: AugmentedError<ApiType>;
|
|
350
298
|
/**
|
|
351
299
|
* Failed to get value when just checked it existed.
|
|
352
300
|
**/
|
|
@@ -355,10 +303,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
355
303
|
* Incomplete storage request not found.
|
|
356
304
|
**/
|
|
357
305
|
IncompleteStorageRequestNotFound: AugmentedError<ApiType>;
|
|
358
|
-
/**
|
|
359
|
-
* Key already exists in mapping when it should not.
|
|
360
|
-
**/
|
|
361
|
-
InconsistentStateKeyAlreadyExists: AugmentedError<ApiType>;
|
|
362
306
|
/**
|
|
363
307
|
* SP does not have enough storage capacity to store the file.
|
|
364
308
|
**/
|
|
@@ -383,23 +327,11 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
383
327
|
* Invalid signed operation provided.
|
|
384
328
|
**/
|
|
385
329
|
InvalidSignedOperation: AugmentedError<ApiType>;
|
|
386
|
-
/**
|
|
387
|
-
* Maximum threshold cannot be zero.
|
|
388
|
-
**/
|
|
389
|
-
MaximumThresholdCannotBeZero: AugmentedError<ApiType>;
|
|
390
|
-
/**
|
|
391
|
-
* Max replication target cannot be smaller than default replication target.
|
|
392
|
-
**/
|
|
393
|
-
MaxReplicationTargetSmallerThanDefault: AugmentedError<ApiType>;
|
|
394
330
|
/**
|
|
395
331
|
* Error created in 2024. If you see this, you are well beyond the singularity and should
|
|
396
332
|
* probably stop using this pallet.
|
|
397
333
|
**/
|
|
398
334
|
MaxTickNumberReached: AugmentedError<ApiType>;
|
|
399
|
-
/**
|
|
400
|
-
* Max number of user pending deletion requests reached.
|
|
401
|
-
**/
|
|
402
|
-
MaxUserPendingDeletionRequestsReached: AugmentedError<ApiType>;
|
|
403
335
|
/**
|
|
404
336
|
* Minimum amount of blocks between the request opening and being able to confirm it not reached.
|
|
405
337
|
**/
|
|
@@ -436,10 +368,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
436
368
|
* No global reputation weight set.
|
|
437
369
|
**/
|
|
438
370
|
NoGlobalReputationWeightSet: AugmentedError<ApiType>;
|
|
439
|
-
/**
|
|
440
|
-
* Privacy update results in no change
|
|
441
|
-
**/
|
|
442
|
-
NoPrivacyChange: AugmentedError<ApiType>;
|
|
443
371
|
/**
|
|
444
372
|
* Account is not a BSP.
|
|
445
373
|
**/
|
|
@@ -456,10 +384,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
456
384
|
* Operation failed because the account is not the owner of the bucket.
|
|
457
385
|
**/
|
|
458
386
|
NotBucketOwner: AugmentedError<ApiType>;
|
|
459
|
-
/**
|
|
460
|
-
* Unauthorized operation, signer does not own the file.
|
|
461
|
-
**/
|
|
462
|
-
NotFileOwner: AugmentedError<ApiType>;
|
|
463
387
|
/**
|
|
464
388
|
* The MSP is trying to confirm to store a file from a storage request is not the one selected to store it.
|
|
465
389
|
**/
|
|
@@ -468,10 +392,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
468
392
|
* Operations not allowed for insolvent provider
|
|
469
393
|
**/
|
|
470
394
|
OperationNotAllowedForInsolventProvider: AugmentedError<ApiType>;
|
|
471
|
-
/**
|
|
472
|
-
* Operations not allowed while bucket is not being stored by an MSP
|
|
473
|
-
**/
|
|
474
|
-
OperationNotAllowedWhileBucketIsNotStoredByMsp: AugmentedError<ApiType>;
|
|
475
395
|
/**
|
|
476
396
|
* Certain operations (such as issuing new storage requests) are not allowed when interacting with insolvent users.
|
|
477
397
|
**/
|
|
@@ -488,10 +408,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
488
408
|
* Provider is not storing the file.
|
|
489
409
|
**/
|
|
490
410
|
ProviderNotStoringFile: AugmentedError<ApiType>;
|
|
491
|
-
/**
|
|
492
|
-
* Root of the provider not found.
|
|
493
|
-
**/
|
|
494
|
-
ProviderRootNotFound: AugmentedError<ApiType>;
|
|
495
411
|
/**
|
|
496
412
|
* Replication target cannot be zero.
|
|
497
413
|
**/
|
|
@@ -520,10 +436,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
520
436
|
* Operation not allowed while the storage request exists.
|
|
521
437
|
**/
|
|
522
438
|
StorageRequestExists: AugmentedError<ApiType>;
|
|
523
|
-
/**
|
|
524
|
-
* No slot available found in ticks to insert storage request expiration time.
|
|
525
|
-
**/
|
|
526
|
-
StorageRequestExpiredNoSlotAvailable: AugmentedError<ApiType>;
|
|
527
439
|
/**
|
|
528
440
|
* Not authorized to delete the storage request.
|
|
529
441
|
**/
|
|
@@ -532,34 +444,14 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
532
444
|
* Storage request not registered for the given file.
|
|
533
445
|
**/
|
|
534
446
|
StorageRequestNotFound: AugmentedError<ApiType>;
|
|
535
|
-
/**
|
|
536
|
-
* Operation not allowed while the storage request is not being revoked.
|
|
537
|
-
**/
|
|
538
|
-
StorageRequestNotRevoked: AugmentedError<ApiType>;
|
|
539
447
|
/**
|
|
540
448
|
* Arithmetic error in threshold calculation.
|
|
541
449
|
**/
|
|
542
450
|
ThresholdArithmeticError: AugmentedError<ApiType>;
|
|
543
|
-
/**
|
|
544
|
-
* BSPs assignment threshold cannot be below asymptote.
|
|
545
|
-
**/
|
|
546
|
-
ThresholdBelowAsymptote: AugmentedError<ApiType>;
|
|
547
|
-
/**
|
|
548
|
-
* Tick range to maximum threshold cannot be zero.
|
|
549
|
-
**/
|
|
550
|
-
TickRangeToMaximumThresholdCannotBeZero: AugmentedError<ApiType>;
|
|
551
|
-
/**
|
|
552
|
-
* Too many batch responses to process.
|
|
553
|
-
**/
|
|
554
|
-
TooManyBatchResponses: AugmentedError<ApiType>;
|
|
555
451
|
/**
|
|
556
452
|
* Too many storage request responses.
|
|
557
453
|
**/
|
|
558
454
|
TooManyStorageRequestResponses: AugmentedError<ApiType>;
|
|
559
|
-
/**
|
|
560
|
-
* Number of removed BSPs volunteered from storage request prefix did not match the expected number.
|
|
561
|
-
**/
|
|
562
|
-
UnexpectedNumberOfRemovedVolunteeredBsps: AugmentedError<ApiType>;
|
|
563
455
|
/**
|
|
564
456
|
* A SP tried to stop storing files from a user that was supposedly insolvent, but the user is not insolvent.
|
|
565
457
|
**/
|
|
@@ -26,7 +26,6 @@ import type {
|
|
|
26
26
|
FpAccountEthereumSignature,
|
|
27
27
|
FrameSupportTokensMiscBalanceStatus,
|
|
28
28
|
FrameSystemDispatchEventInfo,
|
|
29
|
-
PalletFileSystemEitherAccountIdOrMspId,
|
|
30
29
|
PalletFileSystemFileOperationIntention,
|
|
31
30
|
PalletFileSystemRejectedStorageRequestReason,
|
|
32
31
|
PalletNftsAttributeNamespace,
|
|
@@ -427,45 +426,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
427
426
|
[who: AccountId20, bucketId: H256, collectionId: Option<u32>, private: bool],
|
|
428
427
|
{ who: AccountId20; bucketId: H256; collectionId: Option<u32>; private: bool }
|
|
429
428
|
>;
|
|
430
|
-
/**
|
|
431
|
-
* Failed to decrease MSP's used capacity for expired file deletion request
|
|
432
|
-
**/
|
|
433
|
-
FailedToDecreaseMspUsedCapacity: AugmentedEvent<
|
|
434
|
-
ApiType,
|
|
435
|
-
[
|
|
436
|
-
user: AccountId20,
|
|
437
|
-
mspId: H256,
|
|
438
|
-
fileKey: H256,
|
|
439
|
-
fileSize: u64,
|
|
440
|
-
error: SpRuntimeDispatchError
|
|
441
|
-
],
|
|
442
|
-
{
|
|
443
|
-
user: AccountId20;
|
|
444
|
-
mspId: H256;
|
|
445
|
-
fileKey: H256;
|
|
446
|
-
fileSize: u64;
|
|
447
|
-
error: SpRuntimeDispatchError;
|
|
448
|
-
}
|
|
449
|
-
>;
|
|
450
|
-
/**
|
|
451
|
-
* Failed to get the MSP owner of the bucket for an expired file deletion request
|
|
452
|
-
* This is different from the bucket not having a MSP, which is allowed and won't error
|
|
453
|
-
**/
|
|
454
|
-
FailedToGetMspOfBucket: AugmentedEvent<
|
|
455
|
-
ApiType,
|
|
456
|
-
[bucketId: H256, error: SpRuntimeDispatchError],
|
|
457
|
-
{ bucketId: H256; error: SpRuntimeDispatchError }
|
|
458
|
-
>;
|
|
459
|
-
/**
|
|
460
|
-
* Notifies that a priority challenge with a trie remove mutation failed to be queued in the `on_idle` hook.
|
|
461
|
-
* This can happen if the priority challenge queue is full, and the failed challenge should be manually
|
|
462
|
-
* queued at a later time.
|
|
463
|
-
**/
|
|
464
|
-
FailedToQueuePriorityChallenge: AugmentedEvent<
|
|
465
|
-
ApiType,
|
|
466
|
-
[fileKey: H256, error: SpRuntimeDispatchError],
|
|
467
|
-
{ fileKey: H256; error: SpRuntimeDispatchError }
|
|
468
|
-
>;
|
|
469
429
|
/**
|
|
470
430
|
* Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
|
|
471
431
|
* the return of that storage request's deposit to the user failed.
|
|
@@ -475,49 +435,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
475
435
|
[fileKey: H256, owner: AccountId20, amountToReturn: u128, error: SpRuntimeDispatchError],
|
|
476
436
|
{ fileKey: H256; owner: AccountId20; amountToReturn: u128; error: SpRuntimeDispatchError }
|
|
477
437
|
>;
|
|
478
|
-
/**
|
|
479
|
-
* Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
|
|
480
|
-
* the transfer of a part of that storage request's deposit to one of the volunteered BSPs failed.
|
|
481
|
-
**/
|
|
482
|
-
FailedToTransferDepositFundsToBsp: AugmentedEvent<
|
|
483
|
-
ApiType,
|
|
484
|
-
[
|
|
485
|
-
fileKey: H256,
|
|
486
|
-
owner: AccountId20,
|
|
487
|
-
bspId: H256,
|
|
488
|
-
amountToTransfer: u128,
|
|
489
|
-
error: SpRuntimeDispatchError
|
|
490
|
-
],
|
|
491
|
-
{
|
|
492
|
-
fileKey: H256;
|
|
493
|
-
owner: AccountId20;
|
|
494
|
-
bspId: H256;
|
|
495
|
-
amountToTransfer: u128;
|
|
496
|
-
error: SpRuntimeDispatchError;
|
|
497
|
-
}
|
|
498
|
-
>;
|
|
499
|
-
/**
|
|
500
|
-
* Notifies that a file will be deleted.
|
|
501
|
-
**/
|
|
502
|
-
FileDeletionRequest: AugmentedEvent<
|
|
503
|
-
ApiType,
|
|
504
|
-
[
|
|
505
|
-
user: AccountId20,
|
|
506
|
-
fileKey: H256,
|
|
507
|
-
fileSize: u64,
|
|
508
|
-
bucketId: H256,
|
|
509
|
-
mspId: H256,
|
|
510
|
-
proofOfInclusion: bool
|
|
511
|
-
],
|
|
512
|
-
{
|
|
513
|
-
user: AccountId20;
|
|
514
|
-
fileKey: H256;
|
|
515
|
-
fileSize: u64;
|
|
516
|
-
bucketId: H256;
|
|
517
|
-
mspId: H256;
|
|
518
|
-
proofOfInclusion: bool;
|
|
519
|
-
}
|
|
520
|
-
>;
|
|
521
438
|
/**
|
|
522
439
|
* Notifies that a file deletion has been requested.
|
|
523
440
|
* Contains a signed intention that allows any actor to execute the actual deletion.
|
|
@@ -540,6 +457,20 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
540
457
|
* the file key from the BSPs and/or Bucket storing that file from their forest.
|
|
541
458
|
**/
|
|
542
459
|
IncompleteStorageRequest: AugmentedEvent<ApiType, [fileKey: H256], { fileKey: H256 }>;
|
|
460
|
+
/**
|
|
461
|
+
* Notifies that an incomplete storage request has been fully cleaned up.
|
|
462
|
+
*
|
|
463
|
+
* This event is emitted in two scenarios:
|
|
464
|
+
* 1. When an incomplete storage request is created but there are no providers to clean
|
|
465
|
+
* (e.g., MSP confirmed with inclusion proof and no BSPs confirmed).
|
|
466
|
+
* 2. When the file has been removed from all providers and the incomplete storage
|
|
467
|
+
* request entry is removed from storage.
|
|
468
|
+
**/
|
|
469
|
+
IncompleteStorageRequestCleanedUp: AugmentedEvent<
|
|
470
|
+
ApiType,
|
|
471
|
+
[fileKey: H256],
|
|
472
|
+
{ fileKey: H256 }
|
|
473
|
+
>;
|
|
543
474
|
/**
|
|
544
475
|
* Notifies that a bucket has been moved to a new MSP under a new value proposition.
|
|
545
476
|
**/
|
|
@@ -660,36 +591,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
660
591
|
expiresAt: u32;
|
|
661
592
|
}
|
|
662
593
|
>;
|
|
663
|
-
/**
|
|
664
|
-
* Notifies that a file key has been queued for a priority challenge for file deletion.
|
|
665
|
-
**/
|
|
666
|
-
PriorityChallengeForFileDeletionQueued: AugmentedEvent<
|
|
667
|
-
ApiType,
|
|
668
|
-
[issuer: PalletFileSystemEitherAccountIdOrMspId, fileKey: H256],
|
|
669
|
-
{ issuer: PalletFileSystemEitherAccountIdOrMspId; fileKey: H256 }
|
|
670
|
-
>;
|
|
671
|
-
/**
|
|
672
|
-
* Notifies that a proof has been submitted for a pending file deletion request.
|
|
673
|
-
**/
|
|
674
|
-
ProofSubmittedForPendingFileDeletionRequest: AugmentedEvent<
|
|
675
|
-
ApiType,
|
|
676
|
-
[
|
|
677
|
-
user: AccountId20,
|
|
678
|
-
fileKey: H256,
|
|
679
|
-
fileSize: u64,
|
|
680
|
-
bucketId: H256,
|
|
681
|
-
mspId: H256,
|
|
682
|
-
proofOfInclusion: bool
|
|
683
|
-
],
|
|
684
|
-
{
|
|
685
|
-
user: AccountId20;
|
|
686
|
-
fileKey: H256;
|
|
687
|
-
fileSize: u64;
|
|
688
|
-
bucketId: H256;
|
|
689
|
-
mspId: H256;
|
|
690
|
-
proofOfInclusion: bool;
|
|
691
|
-
}
|
|
692
|
-
>;
|
|
693
594
|
/**
|
|
694
595
|
* Notifies that a SP has stopped storing a file because its owner has become insolvent.
|
|
695
596
|
**/
|
|
@@ -422,11 +422,31 @@ declare module "@polkadot/api-base/types/submittable" {
|
|
|
422
422
|
};
|
|
423
423
|
fileSystem: {
|
|
424
424
|
/**
|
|
425
|
-
* Executed by a BSP to confirm
|
|
425
|
+
* Executed by a BSP to confirm stopping storage of a file and remove it from their forest.
|
|
426
426
|
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
427
|
+
* This is the second step of the two-phase stop storing process. The BSP must have previously
|
|
428
|
+
* called [`bsp_request_stop_storing`] to open a pending stop storing request.
|
|
429
|
+
*
|
|
430
|
+
* A minimum waiting period ([`MinWaitForStopStoring`]) must pass between the request and this
|
|
431
|
+
* confirmation. This prevents a BSP from immediately dropping a file when challenged for it,
|
|
432
|
+
* ensuring they can't avoid slashing by quickly calling stop storing upon receiving a challenge.
|
|
433
|
+
*
|
|
434
|
+
* ## What this extrinsic does
|
|
435
|
+
*
|
|
436
|
+
* 1. Verifies the pending stop storing request exists and the minimum wait time has passed
|
|
437
|
+
* 2. Verifies the file is still in the BSP's forest via the inclusion proof
|
|
438
|
+
* 3. **Removes the file from the BSP's forest and updates their root**
|
|
439
|
+
* 4. Decreases the BSP's used capacity
|
|
440
|
+
* 5. Stops challenge/randomness cycles if the BSP has no more files
|
|
441
|
+
*
|
|
442
|
+
* Note: The payment stream was already updated in [`bsp_request_stop_storing`].
|
|
443
|
+
*
|
|
444
|
+
* ## Errors
|
|
445
|
+
*
|
|
446
|
+
* - [`PendingStopStoringRequestNotFound`]: No pending request exists for this BSP and file
|
|
447
|
+
* - [`MinWaitForStopStoringNotReached`]: The minimum waiting period hasn't passed yet
|
|
448
|
+
* - [`OperationNotAllowedWithInsolventUser`]: The file owner is insolvent (the BSP should use
|
|
449
|
+
* [`stop_storing_for_insolvent_user`] instead)
|
|
430
450
|
**/
|
|
431
451
|
bspConfirmStopStoring: AugmentedSubmittable<
|
|
432
452
|
(
|
|
@@ -463,12 +483,45 @@ declare module "@polkadot/api-base/types/submittable" {
|
|
|
463
483
|
/**
|
|
464
484
|
* Executed by a BSP to request to stop storing a file.
|
|
465
485
|
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
* This
|
|
471
|
-
*
|
|
486
|
+
* This is the first step of a two-phase process for a BSP to voluntarily stop storing a file.
|
|
487
|
+
* The BSP must later call [`bsp_confirm_stop_storing`] after a minimum waiting period to
|
|
488
|
+
* complete the process and actually remove the file from their forest.
|
|
489
|
+
*
|
|
490
|
+
* **Important**: This extrinsic does NOT modify the BSP's forest root. The file remains in the
|
|
491
|
+
* BSP's forest until [`bsp_confirm_stop_storing`] is called.
|
|
492
|
+
*
|
|
493
|
+
* The BSP is required to provide the file metadata (bucket_id, location, owner, fingerprint, size)
|
|
494
|
+
* to reconstruct and verify the file key. The BSP can get this metadata from its file storage, but
|
|
495
|
+
* it providing it is not a proof that the BSP actually has the file, since this metadata can be obtained
|
|
496
|
+
* from the original storage request or from the assigned MSP if the storage request no longer exists.
|
|
497
|
+
*
|
|
498
|
+
* ## Behavior based on storage request state
|
|
499
|
+
*
|
|
500
|
+
* 1. **Storage request exists and BSP has confirmed storing it**: The BSP is removed from the
|
|
501
|
+
* storage request's confirmed and volunteered lists and the confirmed/volunteered counts are decremented.
|
|
502
|
+
* The BSP is also removed from the storage request as a data server.
|
|
503
|
+
*
|
|
504
|
+
* 2. **Storage request exists but BSP is not a volunteer**: The `bsps_required` count is
|
|
505
|
+
* incremented to compensate for the BSP leaving.
|
|
506
|
+
*
|
|
507
|
+
* 3. **No storage request exists**: A new storage request is created with `bsps_required = 1`
|
|
508
|
+
* so another BSP can pick up the file and maintain its replication target. If `can_serve` is true,
|
|
509
|
+
* the requesting BSP is added as a data server to help the new volunteer download the file.
|
|
510
|
+
*
|
|
511
|
+
* ## Fees
|
|
512
|
+
*
|
|
513
|
+
* The BSP is charged a penalty fee ([`BspStopStoringFilePenalty`]) which is transferred to the treasury.
|
|
514
|
+
*
|
|
515
|
+
* ## Payment Stream
|
|
516
|
+
*
|
|
517
|
+
* The payment stream with the file owner is **updated immediately** in this extrinsic (not in
|
|
518
|
+
* [`bsp_confirm_stop_storing`]). This removes any financial incentive for the BSP to delay or
|
|
519
|
+
* skip the confirmation, as they stop getting paid as soon as they announce their intent to stop storing.
|
|
520
|
+
*
|
|
521
|
+
* ## Restrictions
|
|
522
|
+
*
|
|
523
|
+
* This extrinsic will fail with [`FileHasIncompleteStorageRequest`] if an `IncompleteStorageRequest`
|
|
524
|
+
* exists for the file key. The BSP must wait until fisherman nodes clean up the incomplete request.
|
|
472
525
|
**/
|
|
473
526
|
bspRequestStopStoring: AugmentedSubmittable<
|
|
474
527
|
(
|
|
@@ -1401,6 +1401,7 @@ import type {
|
|
|
1401
1401
|
LoadFileInStorageResult,
|
|
1402
1402
|
MainStorageProviderId,
|
|
1403
1403
|
MerklePatriciaRoot,
|
|
1404
|
+
MspStorageRequestStatus,
|
|
1404
1405
|
Multiaddresses,
|
|
1405
1406
|
ProviderId,
|
|
1406
1407
|
QueryAvailableStorageCapacityError,
|
|
@@ -2137,6 +2138,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
2137
2138
|
MomentOf: MomentOf;
|
|
2138
2139
|
MoreAttestations: MoreAttestations;
|
|
2139
2140
|
MortalEra: MortalEra;
|
|
2141
|
+
MspStorageRequestStatus: MspStorageRequestStatus;
|
|
2140
2142
|
MultiAddress: MultiAddress;
|
|
2141
2143
|
Multiaddresses: Multiaddresses;
|
|
2142
2144
|
MultiAsset: MultiAsset;
|