Abstrakcja kont
Implementuj abstrakcję kont na Chiliz Chain używając AbstractJS i MEE od Biconomy: transakcje bez gas, transakcje wsadowe i międzysieciowe oraz smart accounts dla lepszego UX dApp.
Ostatnia aktualizacja
Czy to było pomocne?
Czy to było pomocne?
npm install @biconomy/abstractjs viemimport { createMeeClient, toMultichainNexusAccount, getMEEVersion, MEEVersion } from "@biconomy/abstractjs";
import { http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { chiliz, spicy } from "viem/chains";
const eoa = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
// Create a Nexus account configured for Chiliz Chain (and Spicy Testnet)
const orchestrator = await toMultichainNexusAccount({
chainConfigurations: [
{ chain: chiliz, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) },
{ chain: spicy, transport: http(), version: getMEEVersion(MEEVersion.V2_1_0) },
],
signer: eoa,
});
// Create the MEE client using your Biconomy dashboard API key
const meeClient = await createMeeClient({
account: orchestrator,
apiKey: "mee_LDxnuNsXYfvNUGsz6sJbHn",
});