webmax is intmaxwallet signer library.
yarn add webmax
npm install webmax
Add intmaxWalletSigner to your app first.
Signer can get account from intmaxWallet.
import { IntmaxWalletSigner } from "webmax";
const signer = new IntmaxWalletSigner();
const account = await signer.connectToAccount();
Signer can switch network on intmaxWallet.
import { IntmaxWalletSigner } from "webmax";
const chainId = 1;
const signer = new IntmaxWalletSigner();
const account = await signer.switchChain(chainId);
Signer can sign transactions. You will receive a serialized signature.
import { IntmaxWalletSigner } from "webmax";
const tx = {
to,
value,
gasLimit,
};
const signer = new IntmaxWalletSigner();
const serializedSignature = await signer.signTransaction(tx);
Signer can sign and send transactions. You will receive a receipt.
import { IntmaxWalletSigner } from "webmax";
const tx = {
to,
value,
gasLimit,
};
const signer = new IntmaxWalletSigner();
const receipt = await signer.sendTransaction(tx);
Signer can sign messages. You will receive a signature.
import { IntmaxWalletSigner } from "webmax";
const signer = new IntmaxWalletSigner();
const signature = await signer.signMessage("hello world");
See the demo on the website: