1.0.4 • Published 5 months ago

@amax/amaxup v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

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();
1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago