@polywrap/ethereum-wallet-js
The Ethereum Wallet plugin implements the ethereum-wallet-interface
@ wrapscan.io/polywrap/ethereum-wallet@1.0 (see ../../interface/polywrap.graphql). It handles Ethereum wallet transaction signatures and sends JSON RPC requests for the Ethereum wrapper.
Usage
1. Configure Client
When creating your Polywrap JS client, add the ethereum wallet plugin:
import { PolywrapClient } from "@polywrap/client-js";
import { ethereumWalletPlugin } from "@polywrap/ethereum-wallet-js";
const client = new PolywrapClient({
packages: [{
uri: "plugin/ethereum-wallet",
package: ethereumWalletPlugin({ })
}],
interfaces: [{
interface: "wrapscan.io/polywrap/ethereum-wallet@1.0",
implementations: ["plugin/ethereum-wallet"]
}],
});
2. Invoke The Ethereum Wrapper
Invocations to the Ethereum wrapper may trigger sub-invocations to the Ethereum Wallet plugin:
await client.invoke({
uri: "wrapscan.io/polywrap/ethers@1.0",
method: "getSignerAddress",
});