Acc contracts_getStorage (#1603)
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, Metadata, StorageData, StorageKey, Text, u64 } from '@polkadot/types';
|
||||
import { Option, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, H256, Metadata, StorageData, StorageKey, Text, u64 } from '@polkadot/types';
|
||||
import { AccountId, BlockNumber, Extrinsic, Hash, Header, Index, SignedBlock } from '@polkadot/types/interfaces/runtime';
|
||||
import { ContractCallRequest, ContractExecResult } from '@polkadot/types/interfaces/contracts';
|
||||
import { ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, Health, NetworkState, PeerInfo, RpcMethods, RuntimeDispatchInfo, RuntimeVersion, StorageChangeSet } from '@polkadot/types/interfaces/rpc';
|
||||
import { BlockHash, ChainProperties, ExtrinsicOrHash, ExtrinsicStatus, Health, NetworkState, PeerInfo, RpcMethods, RuntimeDispatchInfo, RuntimeVersion, StorageChangeSet } from '@polkadot/types/interfaces/rpc';
|
||||
import { Codec, IExtrinsic } from '@polkadot/types/types';
|
||||
|
||||
export interface RpcInterface {
|
||||
@@ -22,35 +22,36 @@ export interface RpcInterface {
|
||||
submitExtrinsic(extrinsic: IExtrinsic): Observable<Hash>;
|
||||
};
|
||||
chain: {
|
||||
getBlock(hash?: Hash | Uint8Array | string): Observable<SignedBlock>;
|
||||
getBlockHash(blockNumber?: BlockNumber | Uint8Array | number | string): Observable<Hash>;
|
||||
getFinalizedHead(): Observable<Hash>;
|
||||
getHeader(hash?: Hash | Uint8Array | string): Observable<Header>;
|
||||
getBlock(hash?: BlockHash | Uint8Array | string): Observable<SignedBlock>;
|
||||
getBlockHash(blockNumber?: BlockNumber | Uint8Array | number | string): Observable<BlockHash>;
|
||||
getFinalizedHead(): Observable<BlockHash>;
|
||||
getHeader(hash?: BlockHash | Uint8Array | string): Observable<Header>;
|
||||
subscribeFinalizedHeads(): Observable<Header>;
|
||||
subscribeNewHeads(): Observable<Header>;
|
||||
};
|
||||
contracts: {
|
||||
call(callRequest: ContractCallRequest, at?: Hash | Uint8Array | string): Observable<ContractExecResult>;
|
||||
call(callRequest: ContractCallRequest, at?: BlockHash | Uint8Array | string): Observable<ContractExecResult>;
|
||||
getStorage(address: AccountId | Uint8Array | string, key: H256 | Uint8Array | string, at?: BlockHash | Uint8Array | string): Observable<Option<Bytes>>;
|
||||
};
|
||||
payment: {
|
||||
queryInfo(extrinsic: Bytes | Uint8Array | string, hash?: Hash | Uint8Array | string): Observable<RuntimeDispatchInfo>;
|
||||
queryInfo(extrinsic: Bytes | Uint8Array | string, at?: BlockHash | Uint8Array | string): Observable<RuntimeDispatchInfo>;
|
||||
};
|
||||
rpc: {
|
||||
methods(): Observable<RpcMethods>;
|
||||
};
|
||||
state: {
|
||||
call(method: Text | string, data: Bytes | Uint8Array | string, block?: Hash | Uint8Array | string): Observable<Bytes>;
|
||||
getChildKeys(childStorageKey: any, key: any, block?: Hash | Uint8Array | string): Observable<Vec<StorageKey>>;
|
||||
getChildStorage(childStorageKey: any, key: any, block?: Hash | Uint8Array | string): Observable<StorageData>;
|
||||
getChildStorageHash(childStorageKey: any, key: any, block?: Hash | Uint8Array | string): Observable<Hash>;
|
||||
getChildStorageSize(childStorageKey: any, key: any, block?: Hash | Uint8Array | string): Observable<u64>;
|
||||
getKeys(key: any, block?: Hash | Uint8Array | string): Observable<Vec<StorageKey>>;
|
||||
getMetadata(block?: Hash | Uint8Array | string): Observable<Metadata>;
|
||||
getRuntimeVersion(hash?: Hash | Uint8Array | string): Observable<RuntimeVersion>;
|
||||
call(method: Text | string, data: Bytes | Uint8Array | string, at?: BlockHash | Uint8Array | string): Observable<Bytes>;
|
||||
getChildKeys(childStorageKey: any, key: any, at?: BlockHash | Uint8Array | string): Observable<Vec<StorageKey>>;
|
||||
getChildStorage(childStorageKey: any, key: any, at?: BlockHash | Uint8Array | string): Observable<StorageData>;
|
||||
getChildStorageHash(childStorageKey: any, key: any, at?: BlockHash | Uint8Array | string): Observable<Hash>;
|
||||
getChildStorageSize(childStorageKey: any, key: any, at?: BlockHash | Uint8Array | string): Observable<u64>;
|
||||
getKeys(key: any, at?: BlockHash | Uint8Array | string): Observable<Vec<StorageKey>>;
|
||||
getMetadata(at?: BlockHash | Uint8Array | string): Observable<Metadata>;
|
||||
getRuntimeVersion(at?: BlockHash | Uint8Array | string): Observable<RuntimeVersion>;
|
||||
getStorage<T = Codec>(key: any, block?: Hash | Uint8Array | string): Observable<T>;
|
||||
getStorageHash(key: any, block?: Hash | Uint8Array | string): Observable<Hash>;
|
||||
getStorageSize(key: any, block?: Hash | Uint8Array | string): Observable<u64>;
|
||||
queryStorage(keys: (any)[], startBlock: Hash | Uint8Array | string, block?: Hash | Uint8Array | string): Observable<Vec<StorageChangeSet>>;
|
||||
getStorageHash(key: any, at?: BlockHash | Uint8Array | string): Observable<Hash>;
|
||||
getStorageSize(key: any, at?: BlockHash | Uint8Array | string): Observable<u64>;
|
||||
queryStorage(keys: (any)[], startBlock: Hash | Uint8Array | string, at?: BlockHash | Uint8Array | string): Observable<Vec<StorageChangeSet>>;
|
||||
subscribeRuntimeVersion(): Observable<RuntimeVersion>;
|
||||
subscribeStorage<T = Codec[]>(keys: any[]): Observable<T>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user