Mortal -> Extrinsic, expand for decoding start (#212)

* Mortal -> Extrinsic, expand for decoding start

* Method, Section -> Rpc{Method, Section}

* Only expose callIndex

* CallIndex -> MethodIndex in spec
This commit is contained in:
Jaco Greeff
2018-10-05 12:29:06 +02:00
committed by GitHub
parent ff8aeb02f7
commit 82dbc93f79
28 changed files with 312 additions and 333 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
// of the ISC license. See the LICENSE file for details.
import { RxApiInterface, RxApiInterface$Method, RxApiInterface$Section } from '@polkadot/api-rx/types';
import { Method } from '@polkadot/jsonrpc/types';
import { RpcMethod } from '@polkadot/jsonrpc/types';
import { EMPTY, Observable, combineLatest, from } from 'rxjs';
import { defaultIfEmpty, map } from 'rxjs/operators';
@@ -83,7 +83,7 @@ export default class ApiBase {
return this._api.isConnected();
}
rawCall = <T> ({ method, section }: Method, ...params: Array<any>): Observable<T> => {
rawCall = <T> ({ method, section }: RpcMethod, ...params: Array<any>): Observable<T> => {
const apiSection = this._api[section as keyof RxApiInterface] as RxApiInterface$Section;
assert(apiSection, `Unable to find 'api.${section}'`);