@amax/amaxup
v1.0.4
Published
amaxup
Downloads
50
Readme
AMAX UP Wallet
Client
交易
import { Client } from "@amax/amaxup";
const client = new Client();
await client.transact(actions);
签名
import { Client } from "@amax/amaxup";
const client = new Client();
await client.signMessage(
"这里是签名内容!" + new Date()
);
rpc请求
import { Client } from "@amax/amaxup";
const client = new Client();
await client.rpc.get_abi('amax');
获取帐号,获取amaxup登录帐号
import { Client } from "@amax/amaxup";
const client = new Client();
await client.getAccount();
监听推送account, amaxup web会推送帐号至dapp中,初始化会推送,当amaxup帐号发生改变也会推送。
import { Client, Account, ServerEventType } from "@amax/amaxup";
const client = new Client();
client.on(ServerEventType.ACCOUNTS_CHANGED, (account: Account) => {
// ...
})
其它
import { Client } from "@amax/amaxup";
const client = new Client();
client.isInIframe();