eosplayer
Version:
eosplayer is the glue layer of eosjs, which is packaged based on eosjs and provides better usability for the application layer. It can be used on browsers already installed scatter or in Dapp wallets.
27 lines (26 loc) • 688 B
TypeScript
import { IEosClient, IIdentity } from '../types/eos';
/**
* EOSProvider - defined the MUST interfaces of a player
* @author kinghand@foxmail.com
*/
export default class EOSProvider {
private field;
/**
* get or create scatter
* @return {eosAPI}
*/
readonly eosClient: IEosClient;
/**
* getIdentity of cur scatter user
* @return {Promise<{IIdentity}>}
*/
getIdentity(): Promise<IIdentity>;
/**
* get auth structure from identity
* @return {Object} - { authorization : [ 'name@authority' ] }
*/
getAuth(): Promise<{
authorization: string[];
}>;
initFromConf(conf: any, account: IIdentity): void;
}