@storagehub/api-augment 0.2.1 → 0.2.3
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/types/parachain/interfaces/augment-api-events.d.ts +4 -4
- package/dist/types/parachain/interfaces/augment-api-rpc.d.ts +9 -1
- package/dist/types/parachain/interfaces/augment-api-runtime.d.ts +9 -1
- package/dist/types/parachain/interfaces/augment-types.d.ts +4 -1
- package/dist/types/parachain/interfaces/storagehubclient/types.d.ts +22 -0
- package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +4 -4
- package/dist/types/solochain-evm/interfaces/augment-api-rpc.d.ts +9 -1
- package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +9 -1
- package/dist/types/solochain-evm/interfaces/augment-types.d.ts +4 -1
- package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +22 -0
- 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-events.ts +4 -4
- package/src/parachain/interfaces/augment-api-rpc.ts +10 -0
- package/src/parachain/interfaces/augment-api-runtime.ts +19 -0
- package/src/parachain/interfaces/augment-types.ts +6 -0
- package/src/parachain/interfaces/storagehubclient/types.ts +25 -0
- package/src/solochain-evm/interfaces/augment-api-events.ts +4 -4
- package/src/solochain-evm/interfaces/augment-api-rpc.ts +10 -0
- package/src/solochain-evm/interfaces/augment-api-runtime.ts +19 -0
- package/src/solochain-evm/interfaces/augment-types.ts +6 -0
- package/src/solochain-evm/interfaces/storagehubclient/types.ts +25 -0
|
@@ -845,8 +845,8 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
845
845
|
/**
|
|
846
846
|
* Notifies that a storage request has either been directly rejected by the MSP or
|
|
847
847
|
* the MSP did not respond to the storage request in time.
|
|
848
|
-
* Note:
|
|
849
|
-
*
|
|
848
|
+
* Note: the storage request will be marked as "incomplete", and it is expected that fisherman
|
|
849
|
+
* nodes will pick it up and delete the file from the confirmed BSPs as well as the Bucket.
|
|
850
850
|
**/
|
|
851
851
|
StorageRequestRejected: AugmentedEvent<ApiType, [
|
|
852
852
|
fileKey: H256,
|
|
@@ -857,8 +857,8 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
857
857
|
}>;
|
|
858
858
|
/**
|
|
859
859
|
* Notifies that a storage request has been revoked by the user who initiated it.
|
|
860
|
-
* Note: the
|
|
861
|
-
* file.
|
|
860
|
+
* Note: the storage request will be marked as "incomplete", and it is expected that fisherman
|
|
861
|
+
* nodes will pick it up and delete the file from the confirmed BSPs as well as the Bucket.
|
|
862
862
|
**/
|
|
863
863
|
StorageRequestRevoked: AugmentedEvent<ApiType, [fileKey: H256], {
|
|
864
864
|
fileKey: H256;
|
|
@@ -23,7 +23,7 @@ import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Just
|
|
|
23
23
|
import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from "@polkadot/types/interfaces/state";
|
|
24
24
|
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from "@polkadot/types/interfaces/system";
|
|
25
25
|
import type { IExtrinsic, Observable } from "@polkadot/types/types";
|
|
26
|
-
import type { AddFilesToForestStorageResult, CheckpointChallenge, FileMetadata, GetFileFromFileStorageResult, LoadFileInStorageResult, RemoveFilesFromForestStorageResult, SaveFileToDisk } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
|
|
26
|
+
import type { AddFilesToForestStorageResult, CheckpointChallenge, FileMetadata, GetFileFromFileStorageResult, GetValuePropositionsResult, LoadFileInStorageResult, RemoveFilesFromForestStorageResult, RpcProviderId, SaveFileToDisk } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
|
|
27
27
|
export type __AugmentedRpc = AugmentedRpc<() => unknown>;
|
|
28
28
|
declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
29
29
|
interface RpcInterface {
|
|
@@ -628,6 +628,14 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
628
628
|
* Get the root of the forest trie.
|
|
629
629
|
**/
|
|
630
630
|
getForestRoot: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>>;
|
|
631
|
+
/**
|
|
632
|
+
* Get the provider ID of the current node, if any.
|
|
633
|
+
**/
|
|
634
|
+
getProviderId: AugmentedRpc<() => Observable<RpcProviderId>>;
|
|
635
|
+
/**
|
|
636
|
+
* Get the value propositions of the node if it's an MSP; otherwise a NotAnMsp/Error enum.
|
|
637
|
+
**/
|
|
638
|
+
getValuePropositions: AugmentedRpc<() => Observable<GetValuePropositionsResult>>;
|
|
631
639
|
/**
|
|
632
640
|
* Generate and insert new keys of type BCSV into the keystore.
|
|
633
641
|
**/
|
|
@@ -20,7 +20,7 @@ import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentAp
|
|
|
20
20
|
import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi";
|
|
21
21
|
import type { XcmVersionedAssetId, XcmVersionedLocation, XcmVersionedXcm } from "@polkadot/types/lookup";
|
|
22
22
|
import type { IExtrinsic, Observable } from "@polkadot/types/types";
|
|
23
|
-
import type { BackupStorageProvider, BackupStorageProviderId, BucketId, ChunkId, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, MainStorageProviderId, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropositionWithId } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
|
|
23
|
+
import type { BackupStorageProvider, BackupStorageProviderId, BucketId, ChunkId, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, MainStorageProviderId, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBspsVolunteeredForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropositionWithId } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
|
|
24
24
|
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
|
25
25
|
export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<ApiType>;
|
|
26
26
|
declare module "@polkadot/api-base/types/calls" {
|
|
@@ -196,6 +196,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
196
196
|
* Query the chunks that a BSP needs to prove to confirm that it is storing a file.
|
|
197
197
|
**/
|
|
198
198
|
queryBspConfirmChunksToProveForFile: AugmentedCall<ApiType, (bspId: BackupStorageProviderId | string | Uint8Array, fileKey: H256 | string | Uint8Array) => Observable<Result<Vec<ChunkId>, QueryBspConfirmChunksToProveForFileError>>>;
|
|
199
|
+
/**
|
|
200
|
+
* Query the BSPs that volunteered for a file.
|
|
201
|
+
**/
|
|
202
|
+
queryBspsVolunteeredForFile: AugmentedCall<ApiType, (fileKey: H256 | string | Uint8Array) => Observable<Result<Vec<BackupStorageProviderId>, QueryBspsVolunteeredForFileError>>>;
|
|
199
203
|
/**
|
|
200
204
|
* Query the earliest tick number that a BSP can volunteer for a file.
|
|
201
205
|
**/
|
|
@@ -208,6 +212,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
208
212
|
* Query the chunks that a MSP needs to prove to confirm that it is storing a file.
|
|
209
213
|
**/
|
|
210
214
|
queryMspConfirmChunksToProveForFile: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array, fileKey: H256 | string | Uint8Array) => Observable<Result<Vec<ChunkId>, QueryMspConfirmChunksToProveForFileError>>>;
|
|
215
|
+
/**
|
|
216
|
+
* Get the storage requests for a given MSP.
|
|
217
|
+
**/
|
|
218
|
+
storageRequestsByMsp: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array) => Observable<BTreeMap<H256, StorageRequestMetadata>>>;
|
|
211
219
|
/**
|
|
212
220
|
* Generic call
|
|
213
221
|
**/
|
|
@@ -71,7 +71,7 @@ import type { VestingInfo } from "@polkadot/types/interfaces/vesting";
|
|
|
71
71
|
import type { AssetIdV2, AssetIdV3, AssetIdV4, AssetIdV5, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, AssetInstanceV3, AssetInstanceV4, AssetInstanceV5, BodyId, BodyIdV2, BodyIdV3, BodyPart, BodyPartV2, BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, FungibilityV3, FungibilityV4, FungibilityV5, HintV5, InboundStatus, InstructionV2, InstructionV3, InstructionV4, InstructionV5, InteriorMultiLocation, InteriorMultiLocationV2, InteriorMultiLocationV3, InteriorMultiLocationV5, Junction, JunctionV0, JunctionV1, JunctionV2, JunctionV3, JunctionV4, JunctionV5, Junctions, JunctionsV1, JunctionsV2, JunctionsV3, JunctionsV4, JunctionsV5, MaxPalletNameLen, MaxPalletsInfo, MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetFilterV3, MultiAssetFilterV4, MultiAssetFilterV5, MultiAssetTransferFilterV5, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssetV3, MultiAssetV4, MultiAssetV5, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiAssetsV3, MultiAssetsV4, MultiAssetsV5, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, MultiLocationV3, MultiLocationV4, MultiLocationV5, NetworkId, NetworkIdV2, NetworkIdV3, NetworkIdV4, NetworkIdV5, OriginKindV0, OriginKindV1, OriginKindV2, OriginKindV3, OriginKindV4, OutboundStatus, Outcome, OutcomeV4, PalletInfoV3, PalletInfoV4, PalletInfoV5, QueryId, QueryResponseInfoV3, QueryResponseInfoV4, QueryResponseInfoV5, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV3, ResponseV3Error, ResponseV3Result, ResponseV4, ResponseV5, UncheckedFungibilityV4, UncheckedFungibilityV5, VersionMigrationStage, VersionV3, VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, WildFungibilityV3, WildFungibilityV4, WildFungibilityV5, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, WildMultiAssetV3, WildMultiAssetV4, WildMultiAssetV5, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmErrorV3, XcmErrorV4, XcmErrorV5, XcmOrderV0, XcmOrderV1, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmV3, XcmV4, XcmV5, XcmVersion, XcmpMessageFormat } from "@polkadot/types/interfaces/xcm";
|
|
72
72
|
import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi";
|
|
73
73
|
import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi";
|
|
74
|
-
import type { AddFilesToForestStorageResult, BackupStorageProvider, BackupStorageProviderId, BucketId, CheckpointChallenge, ChunkId, FileMetadata, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetFileFromFileStorageResult, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, IncompleteFileStatus, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, LoadFileInStorageResult, MainStorageProviderId, MerklePatriciaRoot, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryConfirmChunksToProveForFileError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, RemoveFilesFromForestStorageResult, ReputationWeightType, SaveFileToDisk, ShouldRemoveFile, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropId, ValueProposition, ValuePropositionWithId } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
|
|
74
|
+
import type { AddFilesToForestStorageResult, BackupStorageProvider, BackupStorageProviderId, BucketId, CheckpointChallenge, ChunkId, FileMetadata, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetFileFromFileStorageResult, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, GetValuePropositionsResult, IncompleteFileStatus, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, LoadFileInStorageResult, MainStorageProviderId, MerklePatriciaRoot, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBspsVolunteeredForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryConfirmChunksToProveForFileError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, RemoveFilesFromForestStorageResult, ReputationWeightType, RpcProviderId, SaveFileToDisk, ShouldRemoveFile, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropId, ValueProposition, ValuePropositionWithId } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
|
|
75
75
|
declare module "@polkadot/types/types/registry" {
|
|
76
76
|
interface InterfaceTypes {
|
|
77
77
|
AbridgedCandidateReceipt: AbridgedCandidateReceipt;
|
|
@@ -581,6 +581,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
581
581
|
GetProofSubmissionRecordError: GetProofSubmissionRecordError;
|
|
582
582
|
GetStakeError: GetStakeError;
|
|
583
583
|
GetUsersWithDebtOverThresholdError: GetUsersWithDebtOverThresholdError;
|
|
584
|
+
GetValuePropositionsResult: GetValuePropositionsResult;
|
|
584
585
|
GiltBid: GiltBid;
|
|
585
586
|
GlobalValidationData: GlobalValidationData;
|
|
586
587
|
GlobalValidationSchedule: GlobalValidationSchedule;
|
|
@@ -969,6 +970,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
969
970
|
PvfPrepTimeoutKind: PvfPrepTimeoutKind;
|
|
970
971
|
QueryAvailableStorageCapacityError: QueryAvailableStorageCapacityError;
|
|
971
972
|
QueryBspConfirmChunksToProveForFileError: QueryBspConfirmChunksToProveForFileError;
|
|
973
|
+
QueryBspsVolunteeredForFileError: QueryBspsVolunteeredForFileError;
|
|
972
974
|
QueryBucketsForMspError: QueryBucketsForMspError;
|
|
973
975
|
QueryBucketsOfUserStoredByMspError: QueryBucketsOfUserStoredByMspError;
|
|
974
976
|
QueryConfirmChunksToProveForFileError: QueryConfirmChunksToProveForFileError;
|
|
@@ -1054,6 +1056,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
1054
1056
|
RoundSnapshot: RoundSnapshot;
|
|
1055
1057
|
RoundState: RoundState;
|
|
1056
1058
|
RpcMethods: RpcMethods;
|
|
1059
|
+
RpcProviderId: RpcProviderId;
|
|
1057
1060
|
RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;
|
|
1058
1061
|
RuntimeApiMetadataV15: RuntimeApiMetadataV15;
|
|
1059
1062
|
RuntimeApiMetadataV16: RuntimeApiMetadataV16;
|
|
@@ -114,6 +114,13 @@ export interface GetUsersWithDebtOverThresholdError extends Enum {
|
|
|
114
114
|
readonly isInternalApiError: boolean;
|
|
115
115
|
readonly type: "ProviderNotRegistered" | "ProviderWithoutPaymentStreams" | "AmountToChargeOverflow" | "AmountToChargeUnderflow" | "DebtOverflow" | "InternalApiError";
|
|
116
116
|
}
|
|
117
|
+
/** @name GetValuePropositionsResult */
|
|
118
|
+
export interface GetValuePropositionsResult extends Enum {
|
|
119
|
+
readonly isSuccess: boolean;
|
|
120
|
+
readonly asSuccess: Vec<Bytes>;
|
|
121
|
+
readonly isNotAnMsp: boolean;
|
|
122
|
+
readonly type: "Success" | "NotAnMsp";
|
|
123
|
+
}
|
|
117
124
|
/** @name IncompleteFileStatus */
|
|
118
125
|
export interface IncompleteFileStatus extends Struct {
|
|
119
126
|
readonly file_metadata: FileMetadata;
|
|
@@ -170,6 +177,12 @@ export interface QueryBspConfirmChunksToProveForFileError extends Enum {
|
|
|
170
177
|
readonly isInternalError: boolean;
|
|
171
178
|
readonly type: "StorageRequestNotFound" | "ConfirmChunks" | "InternalError";
|
|
172
179
|
}
|
|
180
|
+
/** @name QueryBspsVolunteeredForFileError */
|
|
181
|
+
export interface QueryBspsVolunteeredForFileError extends Enum {
|
|
182
|
+
readonly isStorageRequestNotFound: boolean;
|
|
183
|
+
readonly isInternalError: boolean;
|
|
184
|
+
readonly type: "StorageRequestNotFound" | "InternalError";
|
|
185
|
+
}
|
|
173
186
|
/** @name QueryBucketsForMspError */
|
|
174
187
|
export interface QueryBucketsForMspError extends Enum {
|
|
175
188
|
readonly isProviderNotRegistered: boolean;
|
|
@@ -248,6 +261,15 @@ export interface RemoveFilesFromForestStorageResult extends Enum {
|
|
|
248
261
|
/** @name ReputationWeightType */
|
|
249
262
|
export interface ReputationWeightType extends u32 {
|
|
250
263
|
}
|
|
264
|
+
/** @name RpcProviderId */
|
|
265
|
+
export interface RpcProviderId extends Enum {
|
|
266
|
+
readonly isNotAProvider: boolean;
|
|
267
|
+
readonly isBsp: boolean;
|
|
268
|
+
readonly asBsp: H256;
|
|
269
|
+
readonly isMsp: boolean;
|
|
270
|
+
readonly asMsp: H256;
|
|
271
|
+
readonly type: "NotAProvider" | "Bsp" | "Msp";
|
|
272
|
+
}
|
|
251
273
|
/** @name SaveFileToDisk */
|
|
252
274
|
export interface SaveFileToDisk extends Enum {
|
|
253
275
|
readonly isFileNotFound: boolean;
|
|
@@ -789,8 +789,8 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
789
789
|
/**
|
|
790
790
|
* Notifies that a storage request has either been directly rejected by the MSP or
|
|
791
791
|
* the MSP did not respond to the storage request in time.
|
|
792
|
-
* Note:
|
|
793
|
-
*
|
|
792
|
+
* Note: the storage request will be marked as "incomplete", and it is expected that fisherman
|
|
793
|
+
* nodes will pick it up and delete the file from the confirmed BSPs as well as the Bucket.
|
|
794
794
|
**/
|
|
795
795
|
StorageRequestRejected: AugmentedEvent<ApiType, [
|
|
796
796
|
fileKey: H256,
|
|
@@ -801,8 +801,8 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
801
801
|
}>;
|
|
802
802
|
/**
|
|
803
803
|
* Notifies that a storage request has been revoked by the user who initiated it.
|
|
804
|
-
* Note: the
|
|
805
|
-
* file.
|
|
804
|
+
* Note: the storage request will be marked as "incomplete", and it is expected that fisherman
|
|
805
|
+
* nodes will pick it up and delete the file from the confirmed BSPs as well as the Bucket.
|
|
806
806
|
**/
|
|
807
807
|
StorageRequestRevoked: AugmentedEvent<ApiType, [fileKey: H256], {
|
|
808
808
|
fileKey: H256;
|
|
@@ -23,7 +23,7 @@ import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Just
|
|
|
23
23
|
import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from "@polkadot/types/interfaces/state";
|
|
24
24
|
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from "@polkadot/types/interfaces/system";
|
|
25
25
|
import type { IExtrinsic, Observable } from "@polkadot/types/types";
|
|
26
|
-
import type { AddFilesToForestStorageResult, CheckpointChallenge, FileMetadata, GetFileFromFileStorageResult, LoadFileInStorageResult, RemoveFilesFromForestStorageResult, SaveFileToDisk } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
|
|
26
|
+
import type { AddFilesToForestStorageResult, CheckpointChallenge, FileMetadata, GetFileFromFileStorageResult, GetValuePropositionsResult, LoadFileInStorageResult, RemoveFilesFromForestStorageResult, RpcProviderId, SaveFileToDisk } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
|
|
27
27
|
export type __AugmentedRpc = AugmentedRpc<() => unknown>;
|
|
28
28
|
declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
29
29
|
interface RpcInterface {
|
|
@@ -628,6 +628,14 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
628
628
|
* Get the root of the forest trie.
|
|
629
629
|
**/
|
|
630
630
|
getForestRoot: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>>;
|
|
631
|
+
/**
|
|
632
|
+
* Get the provider ID of the current node, if any.
|
|
633
|
+
**/
|
|
634
|
+
getProviderId: AugmentedRpc<() => Observable<RpcProviderId>>;
|
|
635
|
+
/**
|
|
636
|
+
* Get the value propositions of the node if it's an MSP; otherwise a NotAnMsp/Error enum.
|
|
637
|
+
**/
|
|
638
|
+
getValuePropositions: AugmentedRpc<() => Observable<GetValuePropositionsResult>>;
|
|
631
639
|
/**
|
|
632
640
|
* Generate and insert new keys of type BCSV into the keystore.
|
|
633
641
|
**/
|
|
@@ -18,7 +18,7 @@ import type { RuntimeVersion } from "@polkadot/types/interfaces/state";
|
|
|
18
18
|
import type { ApplyExtrinsicResult, DispatchError, Key } from "@polkadot/types/interfaces/system";
|
|
19
19
|
import type { TransactionSource, TransactionValidity } from "@polkadot/types/interfaces/txqueue";
|
|
20
20
|
import type { IExtrinsic, Observable } from "@polkadot/types/types";
|
|
21
|
-
import type { BackupStorageProvider, BackupStorageProviderId, BucketId, ChunkId, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, MainStorageProviderId, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropositionWithId } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
|
|
21
|
+
import type { BackupStorageProvider, BackupStorageProviderId, BucketId, ChunkId, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, MainStorageProviderId, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBspsVolunteeredForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropositionWithId } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
|
|
22
22
|
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
|
23
23
|
export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<ApiType>;
|
|
24
24
|
declare module "@polkadot/api-base/types/calls" {
|
|
@@ -226,6 +226,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
226
226
|
* Query the chunks that a BSP needs to prove to confirm that it is storing a file.
|
|
227
227
|
**/
|
|
228
228
|
queryBspConfirmChunksToProveForFile: AugmentedCall<ApiType, (bspId: BackupStorageProviderId | string | Uint8Array, fileKey: H256 | string | Uint8Array) => Observable<Result<Vec<ChunkId>, QueryBspConfirmChunksToProveForFileError>>>;
|
|
229
|
+
/**
|
|
230
|
+
* Query the BSPs that volunteered for a file.
|
|
231
|
+
**/
|
|
232
|
+
queryBspsVolunteeredForFile: AugmentedCall<ApiType, (fileKey: H256 | string | Uint8Array) => Observable<Result<Vec<BackupStorageProviderId>, QueryBspsVolunteeredForFileError>>>;
|
|
229
233
|
/**
|
|
230
234
|
* Query the earliest tick number that a BSP can volunteer for a file.
|
|
231
235
|
**/
|
|
@@ -238,6 +242,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
238
242
|
* Query the chunks that a MSP needs to prove to confirm that it is storing a file.
|
|
239
243
|
**/
|
|
240
244
|
queryMspConfirmChunksToProveForFile: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array, fileKey: H256 | string | Uint8Array) => Observable<Result<Vec<ChunkId>, QueryMspConfirmChunksToProveForFileError>>>;
|
|
245
|
+
/**
|
|
246
|
+
* Get the storage requests for a given MSP.
|
|
247
|
+
**/
|
|
248
|
+
storageRequestsByMsp: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array) => Observable<BTreeMap<H256, StorageRequestMetadata>>>;
|
|
241
249
|
/**
|
|
242
250
|
* Generic call
|
|
243
251
|
**/
|
|
@@ -71,7 +71,7 @@ import type { VestingInfo } from "@polkadot/types/interfaces/vesting";
|
|
|
71
71
|
import type { AssetIdV2, AssetIdV3, AssetIdV4, AssetIdV5, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, AssetInstanceV3, AssetInstanceV4, AssetInstanceV5, BodyId, BodyIdV2, BodyIdV3, BodyPart, BodyPartV2, BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, FungibilityV3, FungibilityV4, FungibilityV5, HintV5, InboundStatus, InstructionV2, InstructionV3, InstructionV4, InstructionV5, InteriorMultiLocation, InteriorMultiLocationV2, InteriorMultiLocationV3, InteriorMultiLocationV5, Junction, JunctionV0, JunctionV1, JunctionV2, JunctionV3, JunctionV4, JunctionV5, Junctions, JunctionsV1, JunctionsV2, JunctionsV3, JunctionsV4, JunctionsV5, MaxPalletNameLen, MaxPalletsInfo, MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetFilterV3, MultiAssetFilterV4, MultiAssetFilterV5, MultiAssetTransferFilterV5, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssetV3, MultiAssetV4, MultiAssetV5, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiAssetsV3, MultiAssetsV4, MultiAssetsV5, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, MultiLocationV3, MultiLocationV4, MultiLocationV5, NetworkId, NetworkIdV2, NetworkIdV3, NetworkIdV4, NetworkIdV5, OriginKindV0, OriginKindV1, OriginKindV2, OriginKindV3, OriginKindV4, OutboundStatus, Outcome, OutcomeV4, PalletInfoV3, PalletInfoV4, PalletInfoV5, QueryId, QueryResponseInfoV3, QueryResponseInfoV4, QueryResponseInfoV5, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV3, ResponseV3Error, ResponseV3Result, ResponseV4, ResponseV5, UncheckedFungibilityV4, UncheckedFungibilityV5, VersionMigrationStage, VersionV3, VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, WildFungibilityV3, WildFungibilityV4, WildFungibilityV5, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, WildMultiAssetV3, WildMultiAssetV4, WildMultiAssetV5, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmErrorV3, XcmErrorV4, XcmErrorV5, XcmOrderV0, XcmOrderV1, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmV3, XcmV4, XcmV5, XcmVersion, XcmpMessageFormat } from "@polkadot/types/interfaces/xcm";
|
|
72
72
|
import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi";
|
|
73
73
|
import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi";
|
|
74
|
-
import type { AddFilesToForestStorageResult, BackupStorageProvider, BackupStorageProviderId, BucketId, CheckpointChallenge, ChunkId, FileMetadata, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetFileFromFileStorageResult, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, IncompleteFileStatus, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, LoadFileInStorageResult, MainStorageProviderId, MerklePatriciaRoot, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryConfirmChunksToProveForFileError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, RemoveFilesFromForestStorageResult, ReputationWeightType, SaveFileToDisk, ShouldRemoveFile, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropId, ValueProposition, ValuePropositionWithId } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
|
|
74
|
+
import type { AddFilesToForestStorageResult, BackupStorageProvider, BackupStorageProviderId, BucketId, CheckpointChallenge, ChunkId, FileMetadata, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetFileFromFileStorageResult, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, GetValuePropositionsResult, IncompleteFileStatus, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, LoadFileInStorageResult, MainStorageProviderId, MerklePatriciaRoot, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBspsVolunteeredForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryConfirmChunksToProveForFileError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, RemoveFilesFromForestStorageResult, ReputationWeightType, RpcProviderId, SaveFileToDisk, ShouldRemoveFile, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropId, ValueProposition, ValuePropositionWithId } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
|
|
75
75
|
declare module "@polkadot/types/types/registry" {
|
|
76
76
|
interface InterfaceTypes {
|
|
77
77
|
AbridgedCandidateReceipt: AbridgedCandidateReceipt;
|
|
@@ -581,6 +581,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
581
581
|
GetProofSubmissionRecordError: GetProofSubmissionRecordError;
|
|
582
582
|
GetStakeError: GetStakeError;
|
|
583
583
|
GetUsersWithDebtOverThresholdError: GetUsersWithDebtOverThresholdError;
|
|
584
|
+
GetValuePropositionsResult: GetValuePropositionsResult;
|
|
584
585
|
GiltBid: GiltBid;
|
|
585
586
|
GlobalValidationData: GlobalValidationData;
|
|
586
587
|
GlobalValidationSchedule: GlobalValidationSchedule;
|
|
@@ -969,6 +970,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
969
970
|
PvfPrepTimeoutKind: PvfPrepTimeoutKind;
|
|
970
971
|
QueryAvailableStorageCapacityError: QueryAvailableStorageCapacityError;
|
|
971
972
|
QueryBspConfirmChunksToProveForFileError: QueryBspConfirmChunksToProveForFileError;
|
|
973
|
+
QueryBspsVolunteeredForFileError: QueryBspsVolunteeredForFileError;
|
|
972
974
|
QueryBucketsForMspError: QueryBucketsForMspError;
|
|
973
975
|
QueryBucketsOfUserStoredByMspError: QueryBucketsOfUserStoredByMspError;
|
|
974
976
|
QueryConfirmChunksToProveForFileError: QueryConfirmChunksToProveForFileError;
|
|
@@ -1054,6 +1056,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
1054
1056
|
RoundSnapshot: RoundSnapshot;
|
|
1055
1057
|
RoundState: RoundState;
|
|
1056
1058
|
RpcMethods: RpcMethods;
|
|
1059
|
+
RpcProviderId: RpcProviderId;
|
|
1057
1060
|
RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;
|
|
1058
1061
|
RuntimeApiMetadataV15: RuntimeApiMetadataV15;
|
|
1059
1062
|
RuntimeApiMetadataV16: RuntimeApiMetadataV16;
|
|
@@ -121,6 +121,13 @@ export interface GetUsersWithDebtOverThresholdError extends Enum {
|
|
|
121
121
|
readonly isInternalApiError: boolean;
|
|
122
122
|
readonly type: "ProviderNotRegistered" | "ProviderWithoutPaymentStreams" | "AmountToChargeOverflow" | "AmountToChargeUnderflow" | "DebtOverflow" | "InternalApiError";
|
|
123
123
|
}
|
|
124
|
+
/** @name GetValuePropositionsResult */
|
|
125
|
+
export interface GetValuePropositionsResult extends Enum {
|
|
126
|
+
readonly isSuccess: boolean;
|
|
127
|
+
readonly asSuccess: Vec<Bytes>;
|
|
128
|
+
readonly isNotAnMsp: boolean;
|
|
129
|
+
readonly type: "Success" | "NotAnMsp";
|
|
130
|
+
}
|
|
124
131
|
/** @name IncompleteFileStatus */
|
|
125
132
|
export interface IncompleteFileStatus extends Struct {
|
|
126
133
|
readonly file_metadata: FileMetadata;
|
|
@@ -180,6 +187,12 @@ export interface QueryBspConfirmChunksToProveForFileError extends Enum {
|
|
|
180
187
|
readonly isInternalError: boolean;
|
|
181
188
|
readonly type: "StorageRequestNotFound" | "ConfirmChunks" | "InternalError";
|
|
182
189
|
}
|
|
190
|
+
/** @name QueryBspsVolunteeredForFileError */
|
|
191
|
+
export interface QueryBspsVolunteeredForFileError extends Enum {
|
|
192
|
+
readonly isStorageRequestNotFound: boolean;
|
|
193
|
+
readonly isInternalError: boolean;
|
|
194
|
+
readonly type: "StorageRequestNotFound" | "InternalError";
|
|
195
|
+
}
|
|
183
196
|
/** @name QueryBucketsForMspError */
|
|
184
197
|
export interface QueryBucketsForMspError extends Enum {
|
|
185
198
|
readonly isProviderNotRegistered: boolean;
|
|
@@ -258,6 +271,15 @@ export interface RemoveFilesFromForestStorageResult extends Enum {
|
|
|
258
271
|
/** @name ReputationWeightType */
|
|
259
272
|
export interface ReputationWeightType extends u32 {
|
|
260
273
|
}
|
|
274
|
+
/** @name RpcProviderId */
|
|
275
|
+
export interface RpcProviderId extends Enum {
|
|
276
|
+
readonly isNotAProvider: boolean;
|
|
277
|
+
readonly isBsp: boolean;
|
|
278
|
+
readonly asBsp: H256;
|
|
279
|
+
readonly isMsp: boolean;
|
|
280
|
+
readonly asMsp: H256;
|
|
281
|
+
readonly type: "NotAProvider" | "Bsp" | "Msp";
|
|
282
|
+
}
|
|
261
283
|
/** @name SaveFileToDisk */
|
|
262
284
|
export interface SaveFileToDisk extends Enum {
|
|
263
285
|
readonly isFileNotFound: boolean;
|