@storagehub/api-augment 0.1.0 → 0.2.2
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/LICENSE +674 -0
- package/biome.json +2 -9
- package/dist/parachain/index.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-consts.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-errors.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-events.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-query.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-rpc.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-runtime.js.map +1 -0
- package/dist/parachain/interfaces/augment-api-tx.js.map +1 -0
- package/dist/parachain/interfaces/augment-api.js.map +1 -0
- package/dist/parachain/interfaces/augment-types.js.map +1 -0
- package/dist/parachain/interfaces/definitions.js.map +1 -0
- package/dist/parachain/interfaces/index.js.map +1 -0
- package/dist/{interfaces → parachain/interfaces}/lookup.js +1465 -813
- package/dist/parachain/interfaces/lookup.js.map +1 -0
- package/dist/parachain/interfaces/registry.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/definitions.js +7 -0
- package/dist/parachain/interfaces/storagehubclient/definitions.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/index.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/runtime.js.map +1 -0
- package/dist/parachain/interfaces/storagehubclient/types.js.map +1 -0
- package/dist/parachain/interfaces/types-lookup.js.map +1 -0
- package/dist/parachain/interfaces/types.js.map +1 -0
- package/dist/solochain-evm/index.js +4 -0
- package/dist/solochain-evm/index.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-consts.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-consts.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-errors.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-errors.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-events.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-events.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-query.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-query.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-rpc.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-rpc.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-runtime.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-runtime.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api-tx.js +6 -0
- package/dist/solochain-evm/interfaces/augment-api-tx.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-api.js +10 -0
- package/dist/solochain-evm/interfaces/augment-api.js.map +1 -0
- package/dist/solochain-evm/interfaces/augment-types.js +6 -0
- package/dist/solochain-evm/interfaces/augment-types.js.map +1 -0
- package/dist/solochain-evm/interfaces/definitions.js +2 -0
- package/dist/solochain-evm/interfaces/definitions.js.map +1 -0
- package/dist/solochain-evm/interfaces/index.js +4 -0
- package/dist/solochain-evm/interfaces/index.js.map +1 -0
- package/dist/solochain-evm/interfaces/lookup.js +3744 -0
- package/dist/solochain-evm/interfaces/lookup.js.map +1 -0
- package/dist/solochain-evm/interfaces/registry.js +6 -0
- package/dist/solochain-evm/interfaces/registry.js.map +1 -0
- package/dist/solochain-evm/interfaces/storagehubclient/definitions.js +7 -0
- package/dist/solochain-evm/interfaces/storagehubclient/definitions.js.map +1 -0
- package/dist/solochain-evm/interfaces/storagehubclient/index.js +4 -0
- package/dist/solochain-evm/interfaces/storagehubclient/index.js.map +1 -0
- package/dist/solochain-evm/interfaces/storagehubclient/types.js +4 -0
- package/dist/solochain-evm/interfaces/storagehubclient/types.js.map +1 -0
- package/dist/solochain-evm/interfaces/types-lookup.js +6 -0
- package/dist/solochain-evm/interfaces/types-lookup.js.map +1 -0
- package/dist/solochain-evm/interfaces/types.js +4 -0
- package/dist/solochain-evm/interfaces/types.js.map +1 -0
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-consts.d.ts +147 -20
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-errors.d.ts +235 -8
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-events.d.ts +542 -118
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-query.d.ts +208 -118
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-rpc.d.ts +61 -4
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-runtime.d.ts +105 -8
- package/dist/types/{interfaces → parachain/interfaces}/augment-api-tx.d.ts +356 -181
- package/dist/types/{interfaces → parachain/interfaces}/augment-types.d.ts +145 -11
- package/dist/types/{interfaces → parachain/interfaces}/lookup.d.ts +1067 -513
- package/dist/types/parachain/interfaces/registry.d.ts +311 -0
- package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/types.d.ts +135 -18
- package/dist/types/{interfaces → parachain/interfaces}/types-lookup.d.ts +1619 -887
- package/dist/types/solochain-evm/interfaces/augment-api-consts.d.ts +641 -0
- package/dist/types/solochain-evm/interfaces/augment-api-errors.d.ts +1260 -0
- package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +2058 -0
- package/dist/types/solochain-evm/interfaces/augment-api-query.d.ts +1317 -0
- package/dist/types/solochain-evm/interfaces/augment-api-rpc.d.ts +775 -0
- package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +543 -0
- package/dist/types/solochain-evm/interfaces/augment-api-tx.d.ts +2381 -0
- package/dist/types/solochain-evm/interfaces/augment-api.d.ts +7 -0
- package/dist/types/solochain-evm/interfaces/augment-types.d.ts +1419 -0
- package/dist/types/solochain-evm/interfaces/index.d.ts +1 -0
- package/dist/types/solochain-evm/interfaces/lookup.d.ts +3363 -0
- package/dist/types/solochain-evm/interfaces/registry.d.ts +252 -0
- package/dist/types/solochain-evm/interfaces/storagehubclient/definitions.d.ts +6 -0
- package/dist/types/solochain-evm/interfaces/storagehubclient/index.d.ts +1 -0
- package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +325 -0
- package/dist/types/solochain-evm/interfaces/types-lookup.d.ts +3577 -0
- package/dist/types/solochain-evm/interfaces/types.d.ts +1 -0
- package/metadata-sh-parachain.json +5 -0
- package/metadata-sh-solochain-evm.json +5 -0
- package/package.json +41 -26
- package/scripts/scrapeMetadata.ts +41 -29
- package/src/parachain/index.ts +3 -0
- package/src/{interfaces → parachain/interfaces}/augment-api-consts.ts +147 -20
- package/src/{interfaces → parachain/interfaces}/augment-api-errors.ts +235 -8
- package/src/{interfaces → parachain/interfaces}/augment-api-events.ts +527 -137
- package/src/{interfaces → parachain/interfaces}/augment-api-query.ts +272 -145
- package/src/{interfaces → parachain/interfaces}/augment-api-rpc.ts +123 -5
- package/src/{interfaces → parachain/interfaces}/augment-api-runtime.ts +202 -8
- package/src/{interfaces → parachain/interfaces}/augment-api-tx.ts +374 -182
- package/src/{interfaces → parachain/interfaces}/augment-types.ts +280 -12
- package/src/parachain/interfaces/definitions.ts +1 -0
- package/src/{interfaces → parachain/interfaces}/lookup.ts +1497 -813
- package/src/{interfaces → parachain/interfaces}/registry.ts +176 -98
- package/src/parachain/interfaces/storagehubclient/definitions.ts +7 -0
- package/src/{interfaces → parachain/interfaces}/storagehubclient/types.ts +165 -18
- package/src/{interfaces → parachain/interfaces}/types-lookup.ts +1970 -896
- package/src/solochain-evm/index.ts +3 -0
- package/src/solochain-evm/interfaces/augment-api-consts.ts +655 -0
- package/src/solochain-evm/interfaces/augment-api-errors.ts +1268 -0
- package/src/solochain-evm/interfaces/augment-api-events.ts +1813 -0
- package/src/solochain-evm/interfaces/augment-api-query.ts +1838 -0
- package/src/solochain-evm/interfaces/augment-api-rpc.ts +1319 -0
- package/src/solochain-evm/interfaces/augment-api-runtime.ts +977 -0
- package/src/solochain-evm/interfaces/augment-api-tx.ts +2818 -0
- package/src/solochain-evm/interfaces/augment-api.ts +10 -0
- package/src/solochain-evm/interfaces/augment-types.ts +2776 -0
- package/src/solochain-evm/interfaces/definitions.ts +1 -0
- package/src/solochain-evm/interfaces/index.ts +4 -0
- package/src/solochain-evm/interfaces/lookup.ts +3788 -0
- package/src/solochain-evm/interfaces/registry.ts +506 -0
- package/src/solochain-evm/interfaces/storagehubclient/definitions.ts +7 -0
- package/src/solochain-evm/interfaces/storagehubclient/index.ts +4 -0
- package/src/solochain-evm/interfaces/storagehubclient/types.ts +398 -0
- package/src/solochain-evm/interfaces/types-lookup.ts +4616 -0
- package/src/solochain-evm/interfaces/types.ts +4 -0
- package/tsconfig.json +17 -20
- package/tsconfig.parachain.json +17 -0
- package/tsconfig.solochain-evm.json +17 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/dist/index.js.map +0 -1
- package/dist/interfaces/augment-api-consts.js.map +0 -1
- package/dist/interfaces/augment-api-errors.js.map +0 -1
- package/dist/interfaces/augment-api-events.js.map +0 -1
- package/dist/interfaces/augment-api-query.js.map +0 -1
- package/dist/interfaces/augment-api-rpc.js.map +0 -1
- package/dist/interfaces/augment-api-runtime.js.map +0 -1
- package/dist/interfaces/augment-api-tx.js.map +0 -1
- package/dist/interfaces/augment-api.js.map +0 -1
- package/dist/interfaces/augment-types.js.map +0 -1
- package/dist/interfaces/definitions.js.map +0 -1
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/lookup.js.map +0 -1
- package/dist/interfaces/registry.js.map +0 -1
- package/dist/interfaces/storagehubclient/definitions.js +0 -7
- package/dist/interfaces/storagehubclient/definitions.js.map +0 -1
- package/dist/interfaces/storagehubclient/index.js.map +0 -1
- package/dist/interfaces/storagehubclient/runtime.js.map +0 -1
- package/dist/interfaces/storagehubclient/types.js.map +0 -1
- package/dist/interfaces/types-lookup.js.map +0 -1
- package/dist/interfaces/types.js.map +0 -1
- package/dist/types/interfaces/registry.d.ts +0 -272
- package/src/interfaces/storagehubclient/definitions.ts +0 -7
- package/storagehub.json +0 -1
- /package/dist/{index.js → parachain/index.js} +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-consts.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-errors.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-events.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-query.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-rpc.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-runtime.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api-tx.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-api.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/augment-types.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/definitions.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/index.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/registry.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/storagehubclient/index.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/storagehubclient/runtime.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/storagehubclient/types.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/types-lookup.js +0 -0
- /package/dist/{interfaces → parachain/interfaces}/types.js +0 -0
- /package/dist/types/{index.d.ts → parachain/index.d.ts} +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/augment-api.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/definitions.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/index.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/definitions.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/index.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/runtime.d.ts +0 -0
- /package/dist/types/{interfaces → parachain/interfaces}/types.d.ts +0 -0
- /package/{src/index.ts → dist/types/solochain-evm/index.d.ts} +0 -0
- /package/{src/interfaces/definitions.ts → dist/types/solochain-evm/interfaces/definitions.d.ts} +0 -0
- /package/src/{interfaces → parachain/interfaces}/augment-api.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/index.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/storagehubclient/index.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/storagehubclient/runtime.ts +0 -0
- /package/src/{interfaces → parachain/interfaces}/types.ts +0 -0
|
@@ -19,11 +19,11 @@ import type { MmrHash, MmrLeafBatchProof } from "@polkadot/types/interfaces/mmr"
|
|
|
19
19
|
import type { StorageKind } from "@polkadot/types/interfaces/offchain";
|
|
20
20
|
import type { FeeDetails, RuntimeDispatchInfoV1 } from "@polkadot/types/interfaces/payment";
|
|
21
21
|
import type { RpcMethods } from "@polkadot/types/interfaces/rpc";
|
|
22
|
-
import type { AccountId,
|
|
22
|
+
import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from "@polkadot/types/interfaces/runtime";
|
|
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 { FileMetadata, GetFileFromFileStorageResult, SaveFileToDisk } from "@storagehub/api-augment/interfaces/storagehubclient";
|
|
26
|
+
import type { AddFilesToForestStorageResult, CheckpointChallenge, FileMetadata, GetFileFromFileStorageResult, LoadFileInStorageResult, RemoveFilesFromForestStorageResult, 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 {
|
|
@@ -467,6 +467,10 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
467
467
|
version: AugmentedRpc<() => Observable<Text>>;
|
|
468
468
|
};
|
|
469
469
|
offchain: {
|
|
470
|
+
/**
|
|
471
|
+
* Clear offchain local storage under given key and prefix
|
|
472
|
+
**/
|
|
473
|
+
localStorageClear: AugmentedRpc<(kind: StorageKind | "PERSISTENT" | "LOCAL" | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Null>>;
|
|
470
474
|
/**
|
|
471
475
|
* Get offchain local storage under given key and prefix
|
|
472
476
|
**/
|
|
@@ -583,10 +587,39 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
583
587
|
trieMigrationStatus: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MigrationStatusResult>>;
|
|
584
588
|
};
|
|
585
589
|
storagehubclient: {
|
|
590
|
+
/**
|
|
591
|
+
* Add files to the forest storage. Useful when doing manual maintenance.
|
|
592
|
+
**/
|
|
593
|
+
addFilesToForestStorage: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string, metadata_of_files_to_add: Vec<FileMetadata> | (FileMetadata | {
|
|
594
|
+
owner?: any;
|
|
595
|
+
bucket_id?: any;
|
|
596
|
+
location?: any;
|
|
597
|
+
file_size?: any;
|
|
598
|
+
fingerprint?: any;
|
|
599
|
+
} | string | Uint8Array)[]) => Observable<AddFilesToForestStorageResult>>;
|
|
600
|
+
/**
|
|
601
|
+
* Add key to exclude list. Exclude type can be `file`, `user`, `bucket` and `fingerprint`.
|
|
602
|
+
**/
|
|
603
|
+
addToExcludeList: AugmentedRpc<(key: H256 | string | Uint8Array, exclude_type: Text | string) => Observable<ITuple<[]>>>;
|
|
604
|
+
/**
|
|
605
|
+
* Generate a SCALE-encoded proof for a file key to allow a BSP to confirm storing it.
|
|
606
|
+
**/
|
|
607
|
+
generateFileKeyProofBspConfirm: AugmentedRpc<(bsp_id: H256 | string | Uint8Array, file_key: H256 | string | Uint8Array) => Observable<Bytes>>;
|
|
608
|
+
/**
|
|
609
|
+
* Generate a SCALE-encoded proof for a file key to allow a MSP to accept storing it.
|
|
610
|
+
**/
|
|
611
|
+
generateFileKeyProofMspAccept: AugmentedRpc<(msp_id: H256 | string | Uint8Array, file_key: H256 | string | Uint8Array) => Observable<Bytes>>;
|
|
586
612
|
/**
|
|
587
613
|
* Generate a SCALE-encoded proof for a group of file keys that might or might not be in the forest.
|
|
588
614
|
**/
|
|
589
615
|
generateForestProof: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string, challenged_file_keys: Vec<H256> | (H256 | string | Uint8Array)[]) => Observable<Bytes>>;
|
|
616
|
+
/**
|
|
617
|
+
* Generate a SCALE-encoded proof for a group of file keys that might or might not be in the forest, alongside their key proofs.
|
|
618
|
+
**/
|
|
619
|
+
generateProof: AugmentedRpc<(provider_id: H256 | string | Uint8Array, seed: H256 | string | Uint8Array, checkpoint_challenges: Option<Vec<CheckpointChallenge>> | null | Uint8Array | Vec<CheckpointChallenge> | (CheckpointChallenge | {
|
|
620
|
+
file_key?: any;
|
|
621
|
+
should_remove_file?: any;
|
|
622
|
+
} | string | Uint8Array)[]) => Observable<Bytes>>;
|
|
590
623
|
/**
|
|
591
624
|
* Get the metadata of a file from the Forest storage.
|
|
592
625
|
**/
|
|
@@ -594,7 +627,7 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
594
627
|
/**
|
|
595
628
|
* Get the root of the forest trie.
|
|
596
629
|
**/
|
|
597
|
-
getForestRoot: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<H256
|
|
630
|
+
getForestRoot: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>>;
|
|
598
631
|
/**
|
|
599
632
|
* Generate and insert new keys of type BCSV into the keystore.
|
|
600
633
|
**/
|
|
@@ -607,14 +640,38 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
|
|
|
607
640
|
* Check if a file is in the forest.
|
|
608
641
|
**/
|
|
609
642
|
isFileInForest: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string, file_key: H256 | string | Uint8Array) => Observable<bool>>;
|
|
643
|
+
/**
|
|
644
|
+
* Check whether this node is currently expecting to receive the given file key
|
|
645
|
+
**/
|
|
646
|
+
isFileKeyExpected: AugmentedRpc<(file_key: H256 | string | Uint8Array) => Observable<bool>>;
|
|
610
647
|
/**
|
|
611
648
|
* Load a file in the local storage. This is the first step when uploading a file.
|
|
612
649
|
**/
|
|
613
|
-
loadFileInStorage: AugmentedRpc<(file_path: Text | string, location: Text | string,
|
|
650
|
+
loadFileInStorage: AugmentedRpc<(file_path: Text | string, location: Text | string, owner_account_id_hex: Text | string, bucket_id: H256 | string | Uint8Array) => Observable<LoadFileInStorageResult>>;
|
|
651
|
+
/**
|
|
652
|
+
* Send a FileKeyProof with one or more chunks to be processed locally by the node
|
|
653
|
+
**/
|
|
654
|
+
receiveBackendFileChunks: AugmentedRpc<(file_key: H256 | string | Uint8Array, file_key_proof: Bytes | string | Uint8Array) => Observable<Bytes>>;
|
|
614
655
|
/**
|
|
615
656
|
* Remove keys of BCSV type for the Blockchain Service.
|
|
616
657
|
**/
|
|
617
658
|
removeBcsvKeys: AugmentedRpc<(keystore_path: Text | string) => Observable<ITuple<[]>>>;
|
|
659
|
+
/**
|
|
660
|
+
* Remove a list of files from the file storage. Useful when doing manual maintenance.
|
|
661
|
+
**/
|
|
662
|
+
removeFilesFromFileStorage: AugmentedRpc<(file_keys: Vec<H256> | (H256 | string | Uint8Array)[]) => Observable<ITuple<[]>>>;
|
|
663
|
+
/**
|
|
664
|
+
* Remove files from the forest storage. Useful when doing manual maintenance.
|
|
665
|
+
**/
|
|
666
|
+
removeFilesFromForestStorage: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string, file_keys: Vec<H256> | (H256 | string | Uint8Array)[]) => Observable<RemoveFilesFromForestStorageResult>>;
|
|
667
|
+
/**
|
|
668
|
+
* Remove all files under a prefix from the file storage. Useful when doing manual maintenance.
|
|
669
|
+
**/
|
|
670
|
+
removeFilesWithPrefixFromFileStorage: AugmentedRpc<(prefix: H256 | string | Uint8Array) => Observable<ITuple<[]>>>;
|
|
671
|
+
/**
|
|
672
|
+
* Remove key from exclude list
|
|
673
|
+
**/
|
|
674
|
+
removeFromExcludeList: AugmentedRpc<(key: H256 | string | Uint8Array, exclude_type: Text | string) => Observable<ITuple<[]>>>;
|
|
618
675
|
/**
|
|
619
676
|
* Save a file from the local storage to the disk.
|
|
620
677
|
**/
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import "@polkadot/api-base/types/calls";
|
|
2
2
|
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from "@polkadot/api-base/types";
|
|
3
|
-
import type { Bytes, Null, Option, Result, Vec, bool, u128, u32 } from "@polkadot/types-codec";
|
|
3
|
+
import type { BTreeMap, Bytes, Null, Option, Result, Vec, bool, u128, u32 } from "@polkadot/types-codec";
|
|
4
4
|
import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types";
|
|
5
5
|
import type { CheckInherentsResult, InherentData } from "@polkadot/types/interfaces/blockbuilder";
|
|
6
6
|
import type { BlockHash } from "@polkadot/types/interfaces/chain";
|
|
7
7
|
import type { AuthorityId } from "@polkadot/types/interfaces/consensus";
|
|
8
8
|
import type { CollationInfo } from "@polkadot/types/interfaces/cumulus";
|
|
9
|
+
import type { CallDryRunEffects, XcmDryRunApiError, XcmDryRunEffects } from "@polkadot/types/interfaces/dryRunApi";
|
|
9
10
|
import type { Extrinsic } from "@polkadot/types/interfaces/extrinsics";
|
|
10
11
|
import type { GenesisBuildErr } from "@polkadot/types/interfaces/genesisBuilder";
|
|
11
12
|
import type { OpaqueMetadata } from "@polkadot/types/interfaces/metadata";
|
|
12
13
|
import type { FeeDetails, RuntimeDispatchInfo } from "@polkadot/types/interfaces/payment";
|
|
13
|
-
import type { AccountId, Balance, Block, BlockNumber, Call, ExtrinsicInclusionMode, H256, Header, Index, KeyTypeId, Slot, SlotDuration, Weight, WeightV2 } from "@polkadot/types/interfaces/runtime";
|
|
14
|
+
import type { AccountId, Balance, Block, BlockNumber, Call, ExtrinsicInclusionMode, H256, Header, Index, KeyTypeId, OriginCaller, RuntimeCall, Slot, SlotDuration, Weight, WeightV2 } from "@polkadot/types/interfaces/runtime";
|
|
14
15
|
import type { RuntimeVersion } from "@polkadot/types/interfaces/state";
|
|
15
16
|
import type { ApplyExtrinsicResult, Key } from "@polkadot/types/interfaces/system";
|
|
16
17
|
import type { TransactionSource, TransactionValidity } from "@polkadot/types/interfaces/txqueue";
|
|
18
|
+
import type { VersionedMultiLocation, VersionedXcm } from "@polkadot/types/interfaces/xcm";
|
|
17
19
|
import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi";
|
|
18
20
|
import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi";
|
|
19
21
|
import type { XcmVersionedAssetId, XcmVersionedLocation, XcmVersionedXcm } from "@polkadot/types/lookup";
|
|
20
22
|
import type { IExtrinsic, Observable } from "@polkadot/types/types";
|
|
21
|
-
import type { BackupStorageProvider, BackupStorageProviderId, ChunkId, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError,
|
|
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";
|
|
22
24
|
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
|
|
23
25
|
export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<ApiType>;
|
|
24
26
|
declare module "@polkadot/api-base/types/calls" {
|
|
@@ -135,20 +137,85 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
135
137
|
**/
|
|
136
138
|
[key: string]: DecoratedCallBase<ApiType>;
|
|
137
139
|
};
|
|
140
|
+
/** 0x91b1c8b16328eb92/2 */
|
|
141
|
+
dryRunApi: {
|
|
142
|
+
/**
|
|
143
|
+
* Dry run call
|
|
144
|
+
**/
|
|
145
|
+
dryRunCall: AugmentedCall<ApiType, (origin: OriginCaller | {
|
|
146
|
+
System: any;
|
|
147
|
+
} | string | Uint8Array, call: RuntimeCall | IMethod | string | Uint8Array, resultXcmsVersion: u32 | AnyNumber | Uint8Array) => Observable<Result<CallDryRunEffects, XcmDryRunApiError>>>;
|
|
148
|
+
/**
|
|
149
|
+
* Dry run XCM program
|
|
150
|
+
**/
|
|
151
|
+
dryRunXcm: AugmentedCall<ApiType, (originLocation: VersionedMultiLocation | {
|
|
152
|
+
V0: any;
|
|
153
|
+
} | {
|
|
154
|
+
V1: any;
|
|
155
|
+
} | {
|
|
156
|
+
V2: any;
|
|
157
|
+
} | {
|
|
158
|
+
V3: any;
|
|
159
|
+
} | {
|
|
160
|
+
V4: any;
|
|
161
|
+
} | {
|
|
162
|
+
v5: any;
|
|
163
|
+
} | string | Uint8Array, xcm: VersionedXcm | {
|
|
164
|
+
V0: any;
|
|
165
|
+
} | {
|
|
166
|
+
V1: any;
|
|
167
|
+
} | {
|
|
168
|
+
V2: any;
|
|
169
|
+
} | {
|
|
170
|
+
V3: any;
|
|
171
|
+
} | {
|
|
172
|
+
V4: any;
|
|
173
|
+
} | {
|
|
174
|
+
V5: any;
|
|
175
|
+
} | string | Uint8Array) => Observable<Result<XcmDryRunEffects, XcmDryRunApiError>>>;
|
|
176
|
+
/**
|
|
177
|
+
* Generic call
|
|
178
|
+
**/
|
|
179
|
+
[key: string]: DecoratedCallBase<ApiType>;
|
|
180
|
+
};
|
|
138
181
|
/** 0xb9e7717ace5b45cd/1 */
|
|
139
182
|
fileSystemApi: {
|
|
183
|
+
/**
|
|
184
|
+
* Decodes the BucketId expected to be found in the event info of a generic apply delta.
|
|
185
|
+
**/
|
|
186
|
+
decodeGenericApplyDeltaEventInfo: AugmentedCall<ApiType, (encodedEventInfo: Bytes | string | Uint8Array) => Observable<Result<BucketId, GenericApplyDeltaEventInfoError>>>;
|
|
187
|
+
/**
|
|
188
|
+
* Check if a storage request is open to volunteers.
|
|
189
|
+
**/
|
|
190
|
+
isStorageRequestOpenToVolunteers: AugmentedCall<ApiType, (fileKey: H256 | string | Uint8Array) => Observable<Result<bool, IsStorageRequestOpenToVolunteersError>>>;
|
|
191
|
+
/**
|
|
192
|
+
* Get pending storage requests for a Main Storage Provider.
|
|
193
|
+
**/
|
|
194
|
+
pendingStorageRequestsByMsp: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array) => Observable<BTreeMap<H256, StorageRequestMetadata>>>;
|
|
140
195
|
/**
|
|
141
196
|
* Query the chunks that a BSP needs to prove to confirm that it is storing a file.
|
|
142
197
|
**/
|
|
143
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>>>;
|
|
144
203
|
/**
|
|
145
204
|
* Query the earliest tick number that a BSP can volunteer for a file.
|
|
146
205
|
**/
|
|
147
206
|
queryEarliestFileVolunteerTick: AugmentedCall<ApiType, (bspId: BackupStorageProviderId | string | Uint8Array, fileKey: H256 | string | Uint8Array) => Observable<Result<BlockNumber, QueryFileEarliestVolunteerBlockError>>>;
|
|
207
|
+
/**
|
|
208
|
+
* Query incomplete storage request metadata for a file key.
|
|
209
|
+
**/
|
|
210
|
+
queryIncompleteStorageRequestMetadata: AugmentedCall<ApiType, (fileKey: H256 | string | Uint8Array) => Observable<Result<IncompleteStorageRequestMetadataResponse, QueryIncompleteStorageRequestMetadataError>>>;
|
|
148
211
|
/**
|
|
149
212
|
* Query the chunks that a MSP needs to prove to confirm that it is storing a file.
|
|
150
213
|
**/
|
|
151
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>>>;
|
|
152
219
|
/**
|
|
153
220
|
* Generic call
|
|
154
221
|
**/
|
|
@@ -175,11 +242,11 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
175
242
|
* Converts `Location` to `AccountId`
|
|
176
243
|
**/
|
|
177
244
|
convertLocation: AugmentedCall<ApiType, (location: XcmVersionedLocation | {
|
|
178
|
-
V2: any;
|
|
179
|
-
} | {
|
|
180
245
|
V3: any;
|
|
181
246
|
} | {
|
|
182
247
|
V4: any;
|
|
248
|
+
} | {
|
|
249
|
+
V5: any;
|
|
183
250
|
} | string | Uint8Array) => Observable<Result<AccountId, Error>>>;
|
|
184
251
|
/**
|
|
185
252
|
* Generic call
|
|
@@ -224,6 +291,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
224
291
|
};
|
|
225
292
|
/** 0x1078d7ac24a07b0e/1 */
|
|
226
293
|
paymentStreamsApi: {
|
|
294
|
+
/**
|
|
295
|
+
* Get the Providers that have at least one payment stream with a specific user.
|
|
296
|
+
**/
|
|
297
|
+
getProvidersWithPaymentStreamsWithUser: AugmentedCall<ApiType, (userAccount: AccountId | string | Uint8Array) => Observable<Vec<ProviderId>>>;
|
|
227
298
|
/**
|
|
228
299
|
* Get the payment streams of a provider.
|
|
229
300
|
**/
|
|
@@ -274,11 +345,15 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
274
345
|
/**
|
|
275
346
|
* Get the last tick for which the submitter submitted a proof.
|
|
276
347
|
**/
|
|
277
|
-
getLastTickProviderSubmittedProof: AugmentedCall<ApiType, (providerId: ProviderId | string | Uint8Array) => Observable<Result<BlockNumber,
|
|
348
|
+
getLastTickProviderSubmittedProof: AugmentedCall<ApiType, (providerId: ProviderId | string | Uint8Array) => Observable<Result<BlockNumber, GetProofSubmissionRecordError>>>;
|
|
278
349
|
/**
|
|
279
350
|
* Get the next deadline tick.
|
|
280
351
|
**/
|
|
281
352
|
getNextDeadlineTick: AugmentedCall<ApiType, (providerId: ProviderId | string | Uint8Array) => Observable<Result<BlockNumber, GetNextDeadlineTickError>>>;
|
|
353
|
+
/**
|
|
354
|
+
* Get the next tick for which the submitter should submit a proof.
|
|
355
|
+
**/
|
|
356
|
+
getNextTickToSubmitProofFor: AugmentedCall<ApiType, (providerId: ProviderId | string | Uint8Array) => Observable<Result<BlockNumber, GetProofSubmissionRecordError>>>;
|
|
282
357
|
/**
|
|
283
358
|
* Generic call
|
|
284
359
|
**/
|
|
@@ -301,10 +376,18 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
301
376
|
};
|
|
302
377
|
/** 0x966604ffe78eb092/1 */
|
|
303
378
|
storageProvidersApi: {
|
|
379
|
+
/**
|
|
380
|
+
* Check if a provider can be deleted.
|
|
381
|
+
**/
|
|
382
|
+
canDeleteProvider: AugmentedCall<ApiType, (providerId: ProviderId | string | Uint8Array) => Observable<bool>>;
|
|
304
383
|
/**
|
|
305
384
|
* Get the BSP info for a given BSP ID.
|
|
306
385
|
**/
|
|
307
386
|
getBspInfo: AugmentedCall<ApiType, (bspId: BackupStorageProviderId | string | Uint8Array) => Observable<Result<BackupStorageProvider, GetBspInfoError>>>;
|
|
387
|
+
/**
|
|
388
|
+
* Get the stake of a BSP.
|
|
389
|
+
**/
|
|
390
|
+
getBspStake: AugmentedCall<ApiType, (bspId: BackupStorageProviderId | string | Uint8Array) => Observable<Result<Balance, GetStakeError>>>;
|
|
308
391
|
/**
|
|
309
392
|
* Get the slashable amount corresponding to the configured max file size.
|
|
310
393
|
**/
|
|
@@ -321,6 +404,14 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
321
404
|
* Query the available storage capacity.
|
|
322
405
|
**/
|
|
323
406
|
queryAvailableStorageCapacity: AugmentedCall<ApiType, (providerId: ProviderId | string | Uint8Array) => Observable<Result<StorageDataUnit, QueryAvailableStorageCapacityError>>>;
|
|
407
|
+
/**
|
|
408
|
+
* Get the Buckets that an MSP is storing.
|
|
409
|
+
**/
|
|
410
|
+
queryBucketsForMsp: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array) => Observable<Result<Vec<BucketId>, QueryBucketsForMspError>>>;
|
|
411
|
+
/**
|
|
412
|
+
* Query the buckets stored by an MSP that belong to a specific user.
|
|
413
|
+
**/
|
|
414
|
+
queryBucketsOfUserStoredByMsp: AugmentedCall<ApiType, (mspId: ProviderId | string | Uint8Array, user: AccountId | string | Uint8Array) => Observable<Result<Vec<H256>, QueryBucketsOfUserStoredByMspError>>>;
|
|
324
415
|
/**
|
|
325
416
|
* Query the earliest block number that a BSP can change its capacity.
|
|
326
417
|
**/
|
|
@@ -337,6 +428,10 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
337
428
|
* Query the storage provider capacity.
|
|
338
429
|
**/
|
|
339
430
|
queryStorageProviderCapacity: AugmentedCall<ApiType, (providerId: ProviderId | string | Uint8Array) => Observable<Result<StorageDataUnit, QueryStorageProviderCapacityError>>>;
|
|
431
|
+
/**
|
|
432
|
+
* Query the value propositions for a MSP.
|
|
433
|
+
**/
|
|
434
|
+
queryValuePropositionsForMsp: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array) => Observable<Vec<ValuePropositionWithId>>>;
|
|
340
435
|
/**
|
|
341
436
|
* Generic call
|
|
342
437
|
**/
|
|
@@ -421,16 +516,18 @@ declare module "@polkadot/api-base/types/calls" {
|
|
|
421
516
|
V3: any;
|
|
422
517
|
} | {
|
|
423
518
|
V4: any;
|
|
519
|
+
} | {
|
|
520
|
+
V5: any;
|
|
424
521
|
} | string | Uint8Array) => Observable<Result<u128, XcmPaymentApiError>>>;
|
|
425
522
|
/**
|
|
426
523
|
*
|
|
427
524
|
**/
|
|
428
525
|
queryXcmWeight: AugmentedCall<ApiType, (message: XcmVersionedXcm | {
|
|
429
|
-
V2: any;
|
|
430
|
-
} | {
|
|
431
526
|
V3: any;
|
|
432
527
|
} | {
|
|
433
528
|
V4: any;
|
|
529
|
+
} | {
|
|
530
|
+
V5: any;
|
|
434
531
|
} | string | Uint8Array) => Observable<Result<WeightV2, XcmPaymentApiError>>>;
|
|
435
532
|
/**
|
|
436
533
|
* Generic call
|