@storagehub/api-augment 0.2.2 → 0.2.4
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-rpc.d.ts +14 -2
- package/dist/types/parachain/interfaces/augment-api-runtime.d.ts +4 -0
- package/dist/types/parachain/interfaces/augment-types.d.ts +3 -1
- package/dist/types/parachain/interfaces/storagehubclient/types.d.ts +16 -0
- package/dist/types/solochain-evm/interfaces/augment-api-rpc.d.ts +14 -2
- package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +4 -0
- package/dist/types/solochain-evm/interfaces/augment-types.d.ts +3 -1
- package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +16 -0
- package/package.json +2 -2
- package/src/parachain/interfaces/augment-api-rpc.ts +15 -0
- package/src/parachain/interfaces/augment-api-runtime.ts +4 -0
- package/src/parachain/interfaces/augment-types.ts +4 -0
- package/src/parachain/interfaces/storagehubclient/types.ts +18 -0
- package/src/solochain-evm/interfaces/augment-api-rpc.ts +15 -0
- package/src/solochain-evm/interfaces/augment-api-runtime.ts +4 -0
- package/src/solochain-evm/interfaces/augment-types.ts +4 -0
- package/src/solochain-evm/interfaces/storagehubclient/types.ts +18 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@polkadot/rpc-core/types/jsonrpc";
|
|
2
2
|
import type { AugmentedRpc } from "@polkadot/rpc-core/types";
|
|
3
3
|
import type { Metadata, StorageKey } from "@polkadot/types";
|
|
4
|
-
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u32, u64 } from "@polkadot/types-codec";
|
|
4
|
+
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u128, u32, u64 } from "@polkadot/types-codec";
|
|
5
5
|
import type { AnyNumber, Codec, ITuple } from "@polkadot/types-codec/types";
|
|
6
6
|
import type { ExtrinsicOrHash, ExtrinsicStatus } from "@polkadot/types/interfaces/author";
|
|
7
7
|
import type { EpochAuthorship } from "@polkadot/types/interfaces/babe";
|
|
@@ -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 {
|
|
@@ -620,6 +620,10 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
620
620
|
file_key?: any;
|
|
621
621
|
should_remove_file?: any;
|
|
622
622
|
} | string | Uint8Array)[]) => Observable<Bytes>>;
|
|
623
|
+
/**
|
|
624
|
+
* Get the current price per giga unit per tick from the payment streams pallet
|
|
625
|
+
**/
|
|
626
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedRpc<() => Observable<u128>>;
|
|
623
627
|
/**
|
|
624
628
|
* Get the metadata of a file from the Forest storage.
|
|
625
629
|
**/
|
|
@@ -628,6 +632,14 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
628
632
|
* Get the root of the forest trie.
|
|
629
633
|
**/
|
|
630
634
|
getForestRoot: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>>;
|
|
635
|
+
/**
|
|
636
|
+
* Get the provider ID of the current node, if any.
|
|
637
|
+
**/
|
|
638
|
+
getProviderId: AugmentedRpc<() => Observable<RpcProviderId>>;
|
|
639
|
+
/**
|
|
640
|
+
* Get the value propositions of the node if it's an MSP; otherwise a NotAnMsp/Error enum.
|
|
641
|
+
**/
|
|
642
|
+
getValuePropositions: AugmentedRpc<() => Observable<GetValuePropositionsResult>>;
|
|
631
643
|
/**
|
|
632
644
|
* Generate and insert new keys of type BCSV into the keystore.
|
|
633
645
|
**/
|
|
@@ -291,6 +291,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
291
291
|
};
|
|
292
292
|
/** 0x1078d7ac24a07b0e/1 */
|
|
293
293
|
paymentStreamsApi: {
|
|
294
|
+
/**
|
|
295
|
+
* Get the current price per giga unit per tick
|
|
296
|
+
**/
|
|
297
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedCall<ApiType, () => Observable<Balance>>;
|
|
294
298
|
/**
|
|
295
299
|
* Get the Providers that have at least one payment stream with a specific user.
|
|
296
300
|
**/
|
|
@@ -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, QueryBspsVolunteeredForFileError, 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;
|
|
@@ -1055,6 +1056,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
1055
1056
|
RoundSnapshot: RoundSnapshot;
|
|
1056
1057
|
RoundState: RoundState;
|
|
1057
1058
|
RpcMethods: RpcMethods;
|
|
1059
|
+
RpcProviderId: RpcProviderId;
|
|
1058
1060
|
RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;
|
|
1059
1061
|
RuntimeApiMetadataV15: RuntimeApiMetadataV15;
|
|
1060
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;
|
|
@@ -254,6 +261,15 @@ export interface RemoveFilesFromForestStorageResult extends Enum {
|
|
|
254
261
|
/** @name ReputationWeightType */
|
|
255
262
|
export interface ReputationWeightType extends u32 {
|
|
256
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
|
+
}
|
|
257
273
|
/** @name SaveFileToDisk */
|
|
258
274
|
export interface SaveFileToDisk extends Enum {
|
|
259
275
|
readonly isFileNotFound: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@polkadot/rpc-core/types/jsonrpc";
|
|
2
2
|
import type { AugmentedRpc } from "@polkadot/rpc-core/types";
|
|
3
3
|
import type { Metadata, StorageKey } from "@polkadot/types";
|
|
4
|
-
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u32, u64 } from "@polkadot/types-codec";
|
|
4
|
+
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u128, u32, u64 } from "@polkadot/types-codec";
|
|
5
5
|
import type { AnyNumber, Codec, ITuple } from "@polkadot/types-codec/types";
|
|
6
6
|
import type { ExtrinsicOrHash, ExtrinsicStatus } from "@polkadot/types/interfaces/author";
|
|
7
7
|
import type { EpochAuthorship } from "@polkadot/types/interfaces/babe";
|
|
@@ -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 {
|
|
@@ -620,6 +620,10 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
620
620
|
file_key?: any;
|
|
621
621
|
should_remove_file?: any;
|
|
622
622
|
} | string | Uint8Array)[]) => Observable<Bytes>>;
|
|
623
|
+
/**
|
|
624
|
+
* Get the current price per giga unit per tick from the payment streams pallet
|
|
625
|
+
**/
|
|
626
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedRpc<() => Observable<u128>>;
|
|
623
627
|
/**
|
|
624
628
|
* Get the metadata of a file from the Forest storage.
|
|
625
629
|
**/
|
|
@@ -628,6 +632,14 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
628
632
|
* Get the root of the forest trie.
|
|
629
633
|
**/
|
|
630
634
|
getForestRoot: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>>;
|
|
635
|
+
/**
|
|
636
|
+
* Get the provider ID of the current node, if any.
|
|
637
|
+
**/
|
|
638
|
+
getProviderId: AugmentedRpc<() => Observable<RpcProviderId>>;
|
|
639
|
+
/**
|
|
640
|
+
* Get the value propositions of the node if it's an MSP; otherwise a NotAnMsp/Error enum.
|
|
641
|
+
**/
|
|
642
|
+
getValuePropositions: AugmentedRpc<() => Observable<GetValuePropositionsResult>>;
|
|
631
643
|
/**
|
|
632
644
|
* Generate and insert new keys of type BCSV into the keystore.
|
|
633
645
|
**/
|
|
@@ -330,6 +330,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
330
330
|
};
|
|
331
331
|
/** 0x1078d7ac24a07b0e/1 */
|
|
332
332
|
paymentStreamsApi: {
|
|
333
|
+
/**
|
|
334
|
+
* Get the current price per giga unit per tick
|
|
335
|
+
**/
|
|
336
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedCall<ApiType, () => Observable<Balance>>;
|
|
333
337
|
/**
|
|
334
338
|
* Get the Providers that have at least one payment stream with a specific user.
|
|
335
339
|
**/
|
|
@@ -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, QueryBspsVolunteeredForFileError, 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;
|
|
@@ -1055,6 +1056,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
1055
1056
|
RoundSnapshot: RoundSnapshot;
|
|
1056
1057
|
RoundState: RoundState;
|
|
1057
1058
|
RpcMethods: RpcMethods;
|
|
1059
|
+
RpcProviderId: RpcProviderId;
|
|
1058
1060
|
RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;
|
|
1059
1061
|
RuntimeApiMetadataV15: RuntimeApiMetadataV15;
|
|
1060
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;
|
|
@@ -264,6 +271,15 @@ export interface RemoveFilesFromForestStorageResult extends Enum {
|
|
|
264
271
|
/** @name ReputationWeightType */
|
|
265
272
|
export interface ReputationWeightType extends u32 {
|
|
266
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
|
+
}
|
|
267
283
|
/** @name SaveFileToDisk */
|
|
268
284
|
export interface SaveFileToDisk extends Enum {
|
|
269
285
|
readonly isFileNotFound: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storagehub/api-augment",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@polkadot/types-codec": "^16.4.7",
|
|
35
35
|
"tsx": "4.20.5",
|
|
36
36
|
"typescript": "^5.9.2",
|
|
37
|
-
"@storagehub/types-bundle": "0.2.
|
|
37
|
+
"@storagehub/types-bundle": "0.2.4"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"scrape": "pnpm tsx scripts/scrapeMetadata.ts",
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
Vec,
|
|
20
20
|
bool,
|
|
21
21
|
f64,
|
|
22
|
+
u128,
|
|
22
23
|
u32,
|
|
23
24
|
u64
|
|
24
25
|
} from "@polkadot/types-codec";
|
|
@@ -101,8 +102,10 @@ import type {
|
|
|
101
102
|
CheckpointChallenge,
|
|
102
103
|
FileMetadata,
|
|
103
104
|
GetFileFromFileStorageResult,
|
|
105
|
+
GetValuePropositionsResult,
|
|
104
106
|
LoadFileInStorageResult,
|
|
105
107
|
RemoveFilesFromForestStorageResult,
|
|
108
|
+
RpcProviderId,
|
|
106
109
|
SaveFileToDisk
|
|
107
110
|
} from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
|
|
108
111
|
|
|
@@ -1113,6 +1116,10 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
1113
1116
|
)[]
|
|
1114
1117
|
) => Observable<Bytes>
|
|
1115
1118
|
>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Get the current price per giga unit per tick from the payment streams pallet
|
|
1121
|
+
**/
|
|
1122
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedRpc<() => Observable<u128>>;
|
|
1116
1123
|
/**
|
|
1117
1124
|
* Get the metadata of a file from the Forest storage.
|
|
1118
1125
|
**/
|
|
@@ -1128,6 +1135,14 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
1128
1135
|
getForestRoot: AugmentedRpc<
|
|
1129
1136
|
(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>
|
|
1130
1137
|
>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Get the provider ID of the current node, if any.
|
|
1140
|
+
**/
|
|
1141
|
+
getProviderId: AugmentedRpc<() => Observable<RpcProviderId>>;
|
|
1142
|
+
/**
|
|
1143
|
+
* Get the value propositions of the node if it's an MSP; otherwise a NotAnMsp/Error enum.
|
|
1144
|
+
**/
|
|
1145
|
+
getValuePropositions: AugmentedRpc<() => Observable<GetValuePropositionsResult>>;
|
|
1131
1146
|
/**
|
|
1132
1147
|
* Generate and insert new keys of type BCSV into the keystore.
|
|
1133
1148
|
**/
|
|
@@ -487,6 +487,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
487
487
|
};
|
|
488
488
|
/** 0x1078d7ac24a07b0e/1 */
|
|
489
489
|
paymentStreamsApi: {
|
|
490
|
+
/**
|
|
491
|
+
* Get the current price per giga unit per tick
|
|
492
|
+
**/
|
|
493
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedCall<ApiType, () => Observable<Balance>>;
|
|
490
494
|
/**
|
|
491
495
|
* Get the Providers that have at least one payment stream with a specific user.
|
|
492
496
|
**/
|
|
@@ -1394,6 +1394,7 @@ import type {
|
|
|
1394
1394
|
GetProofSubmissionRecordError,
|
|
1395
1395
|
GetStakeError,
|
|
1396
1396
|
GetUsersWithDebtOverThresholdError,
|
|
1397
|
+
GetValuePropositionsResult,
|
|
1397
1398
|
IncompleteFileStatus,
|
|
1398
1399
|
IncompleteStorageRequestMetadataResponse,
|
|
1399
1400
|
IsStorageRequestOpenToVolunteersError,
|
|
@@ -1418,6 +1419,7 @@ import type {
|
|
|
1418
1419
|
RandomnessOutput,
|
|
1419
1420
|
RemoveFilesFromForestStorageResult,
|
|
1420
1421
|
ReputationWeightType,
|
|
1422
|
+
RpcProviderId,
|
|
1421
1423
|
SaveFileToDisk,
|
|
1422
1424
|
ShouldRemoveFile,
|
|
1423
1425
|
StorageDataUnit,
|
|
@@ -1938,6 +1940,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
1938
1940
|
GetProofSubmissionRecordError: GetProofSubmissionRecordError;
|
|
1939
1941
|
GetStakeError: GetStakeError;
|
|
1940
1942
|
GetUsersWithDebtOverThresholdError: GetUsersWithDebtOverThresholdError;
|
|
1943
|
+
GetValuePropositionsResult: GetValuePropositionsResult;
|
|
1941
1944
|
GiltBid: GiltBid;
|
|
1942
1945
|
GlobalValidationData: GlobalValidationData;
|
|
1943
1946
|
GlobalValidationSchedule: GlobalValidationSchedule;
|
|
@@ -2412,6 +2415,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
2412
2415
|
RoundSnapshot: RoundSnapshot;
|
|
2413
2416
|
RoundState: RoundState;
|
|
2414
2417
|
RpcMethods: RpcMethods;
|
|
2418
|
+
RpcProviderId: RpcProviderId;
|
|
2415
2419
|
RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;
|
|
2416
2420
|
RuntimeApiMetadataV15: RuntimeApiMetadataV15;
|
|
2417
2421
|
RuntimeApiMetadataV16: RuntimeApiMetadataV16;
|
|
@@ -156,6 +156,14 @@ export interface GetUsersWithDebtOverThresholdError extends Enum {
|
|
|
156
156
|
| "InternalApiError";
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
/** @name GetValuePropositionsResult */
|
|
160
|
+
export interface GetValuePropositionsResult extends Enum {
|
|
161
|
+
readonly isSuccess: boolean;
|
|
162
|
+
readonly asSuccess: Vec<Bytes>;
|
|
163
|
+
readonly isNotAnMsp: boolean;
|
|
164
|
+
readonly type: "Success" | "NotAnMsp";
|
|
165
|
+
}
|
|
166
|
+
|
|
159
167
|
/** @name IncompleteFileStatus */
|
|
160
168
|
export interface IncompleteFileStatus extends Struct {
|
|
161
169
|
readonly file_metadata: FileMetadata;
|
|
@@ -322,6 +330,16 @@ export interface RemoveFilesFromForestStorageResult extends Enum {
|
|
|
322
330
|
/** @name ReputationWeightType */
|
|
323
331
|
export interface ReputationWeightType extends u32 {}
|
|
324
332
|
|
|
333
|
+
/** @name RpcProviderId */
|
|
334
|
+
export interface RpcProviderId extends Enum {
|
|
335
|
+
readonly isNotAProvider: boolean;
|
|
336
|
+
readonly isBsp: boolean;
|
|
337
|
+
readonly asBsp: H256;
|
|
338
|
+
readonly isMsp: boolean;
|
|
339
|
+
readonly asMsp: H256;
|
|
340
|
+
readonly type: "NotAProvider" | "Bsp" | "Msp";
|
|
341
|
+
}
|
|
342
|
+
|
|
325
343
|
/** @name SaveFileToDisk */
|
|
326
344
|
export interface SaveFileToDisk extends Enum {
|
|
327
345
|
readonly isFileNotFound: boolean;
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
Vec,
|
|
20
20
|
bool,
|
|
21
21
|
f64,
|
|
22
|
+
u128,
|
|
22
23
|
u32,
|
|
23
24
|
u64
|
|
24
25
|
} from "@polkadot/types-codec";
|
|
@@ -101,8 +102,10 @@ import type {
|
|
|
101
102
|
CheckpointChallenge,
|
|
102
103
|
FileMetadata,
|
|
103
104
|
GetFileFromFileStorageResult,
|
|
105
|
+
GetValuePropositionsResult,
|
|
104
106
|
LoadFileInStorageResult,
|
|
105
107
|
RemoveFilesFromForestStorageResult,
|
|
108
|
+
RpcProviderId,
|
|
106
109
|
SaveFileToDisk
|
|
107
110
|
} from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
|
|
108
111
|
|
|
@@ -1113,6 +1116,10 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
1113
1116
|
)[]
|
|
1114
1117
|
) => Observable<Bytes>
|
|
1115
1118
|
>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Get the current price per giga unit per tick from the payment streams pallet
|
|
1121
|
+
**/
|
|
1122
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedRpc<() => Observable<u128>>;
|
|
1116
1123
|
/**
|
|
1117
1124
|
* Get the metadata of a file from the Forest storage.
|
|
1118
1125
|
**/
|
|
@@ -1128,6 +1135,14 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
1128
1135
|
getForestRoot: AugmentedRpc<
|
|
1129
1136
|
(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>
|
|
1130
1137
|
>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Get the provider ID of the current node, if any.
|
|
1140
|
+
**/
|
|
1141
|
+
getProviderId: AugmentedRpc<() => Observable<RpcProviderId>>;
|
|
1142
|
+
/**
|
|
1143
|
+
* Get the value propositions of the node if it's an MSP; otherwise a NotAnMsp/Error enum.
|
|
1144
|
+
**/
|
|
1145
|
+
getValuePropositions: AugmentedRpc<() => Observable<GetValuePropositionsResult>>;
|
|
1131
1146
|
/**
|
|
1132
1147
|
* Generate and insert new keys of type BCSV into the keystore.
|
|
1133
1148
|
**/
|
|
@@ -598,6 +598,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
598
598
|
};
|
|
599
599
|
/** 0x1078d7ac24a07b0e/1 */
|
|
600
600
|
paymentStreamsApi: {
|
|
601
|
+
/**
|
|
602
|
+
* Get the current price per giga unit per tick
|
|
603
|
+
**/
|
|
604
|
+
getCurrentPricePerGigaUnitPerTick: AugmentedCall<ApiType, () => Observable<Balance>>;
|
|
601
605
|
/**
|
|
602
606
|
* Get the Providers that have at least one payment stream with a specific user.
|
|
603
607
|
**/
|
|
@@ -1394,6 +1394,7 @@ import type {
|
|
|
1394
1394
|
GetProofSubmissionRecordError,
|
|
1395
1395
|
GetStakeError,
|
|
1396
1396
|
GetUsersWithDebtOverThresholdError,
|
|
1397
|
+
GetValuePropositionsResult,
|
|
1397
1398
|
IncompleteFileStatus,
|
|
1398
1399
|
IncompleteStorageRequestMetadataResponse,
|
|
1399
1400
|
IsStorageRequestOpenToVolunteersError,
|
|
@@ -1418,6 +1419,7 @@ import type {
|
|
|
1418
1419
|
RandomnessOutput,
|
|
1419
1420
|
RemoveFilesFromForestStorageResult,
|
|
1420
1421
|
ReputationWeightType,
|
|
1422
|
+
RpcProviderId,
|
|
1421
1423
|
SaveFileToDisk,
|
|
1422
1424
|
ShouldRemoveFile,
|
|
1423
1425
|
StorageDataUnit,
|
|
@@ -1938,6 +1940,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
1938
1940
|
GetProofSubmissionRecordError: GetProofSubmissionRecordError;
|
|
1939
1941
|
GetStakeError: GetStakeError;
|
|
1940
1942
|
GetUsersWithDebtOverThresholdError: GetUsersWithDebtOverThresholdError;
|
|
1943
|
+
GetValuePropositionsResult: GetValuePropositionsResult;
|
|
1941
1944
|
GiltBid: GiltBid;
|
|
1942
1945
|
GlobalValidationData: GlobalValidationData;
|
|
1943
1946
|
GlobalValidationSchedule: GlobalValidationSchedule;
|
|
@@ -2412,6 +2415,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
2412
2415
|
RoundSnapshot: RoundSnapshot;
|
|
2413
2416
|
RoundState: RoundState;
|
|
2414
2417
|
RpcMethods: RpcMethods;
|
|
2418
|
+
RpcProviderId: RpcProviderId;
|
|
2415
2419
|
RuntimeApiMetadataLatest: RuntimeApiMetadataLatest;
|
|
2416
2420
|
RuntimeApiMetadataV15: RuntimeApiMetadataV15;
|
|
2417
2421
|
RuntimeApiMetadataV16: RuntimeApiMetadataV16;
|
|
@@ -163,6 +163,14 @@ export interface GetUsersWithDebtOverThresholdError extends Enum {
|
|
|
163
163
|
| "InternalApiError";
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
/** @name GetValuePropositionsResult */
|
|
167
|
+
export interface GetValuePropositionsResult extends Enum {
|
|
168
|
+
readonly isSuccess: boolean;
|
|
169
|
+
readonly asSuccess: Vec<Bytes>;
|
|
170
|
+
readonly isNotAnMsp: boolean;
|
|
171
|
+
readonly type: "Success" | "NotAnMsp";
|
|
172
|
+
}
|
|
173
|
+
|
|
166
174
|
/** @name IncompleteFileStatus */
|
|
167
175
|
export interface IncompleteFileStatus extends Struct {
|
|
168
176
|
readonly file_metadata: FileMetadata;
|
|
@@ -332,6 +340,16 @@ export interface RemoveFilesFromForestStorageResult extends Enum {
|
|
|
332
340
|
/** @name ReputationWeightType */
|
|
333
341
|
export interface ReputationWeightType extends u32 {}
|
|
334
342
|
|
|
343
|
+
/** @name RpcProviderId */
|
|
344
|
+
export interface RpcProviderId extends Enum {
|
|
345
|
+
readonly isNotAProvider: boolean;
|
|
346
|
+
readonly isBsp: boolean;
|
|
347
|
+
readonly asBsp: H256;
|
|
348
|
+
readonly isMsp: boolean;
|
|
349
|
+
readonly asMsp: H256;
|
|
350
|
+
readonly type: "NotAProvider" | "Bsp" | "Msp";
|
|
351
|
+
}
|
|
352
|
+
|
|
335
353
|
/** @name SaveFileToDisk */
|
|
336
354
|
export interface SaveFileToDisk extends Enum {
|
|
337
355
|
readonly isFileNotFound: boolean;
|