@fullon/flonjs
v1.0.0
Published
flonjs
Readme
FLON JS
Client
Transaction
import { Client } from "@fullon/flonjs";
const client = new Client();
await client.transact(actions);Signature
import { Client } from "@fullon/flonjs";
const client = new Client();
await client.signMessage(
"这里是签名内容!" + new Date()
);RPC Request
import { Client } from "@fullon/flonjs";
const client = new Client();
await client.rpc.get_abi('flon');Get an account, get a FullOn login account
import { Client } from "@fullon/flonjs";
const client = new Client();
await client.getAccount();Listen for push account, FullOn web will push the account to dapp, push it when initializing, and push it when the FullOn account changes.
import { Client, Account, ServerEventType } from "@fullon/flonjs";
const client = new Client();
client.on(ServerEventType.ACCOUNTS_CHANGED, (account: Account) => {
// ...
})Other
import { Client } from "@fullon/flonjs";
const client = new Client();
client.isInIframe();