1.0.4 • Published 2 years ago

@amax/amaxup v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years 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

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago