
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@polymarket/abstract-signer
Advanced tools
Abstraction over the ethers v5 Wallet, ethers v5 JsonRpcSigner or Viem WalletClient
Abstraction over the ethers v5 Wallet, ethers v5 JsonRpcSigner or Viem WalletClient
pnpm install @polymarket/abstract-signer
import { ethers } from "ethers";
import { createWalletClient, http} from "viem";
import { privateKeyToAccount } from 'viem/accounts';
import { createAbstractSigner, IAbstractSigner, Transaction } from "@polymarket/abstract-signer";
const chainId = parseInt(`${process.env.CHAIN_ID}`);
// ethers
// Instantiate an ethers Wallet
const provider = new ethers.providers.JsonRpcProvider(`${process.env.RPC_URL}`);
const pk = new ethers.Wallet(`${process.env.PK}`);
const wallet = pk.connect(provider);
// viem
// Instantiate a Viem wallet
const account = privateKeyToAccount(`${process.env.PK}`);
const wallet = createWalletClient({
account: account,
transport: http(`${process.env.RPC_URL}`)
});
const abstractSigner: IAbstractSigner = createAbstractSigner(chainId, wallet);
const tx : Transaction = {
to: await abstractSigner.getAddress(),
value: 10000000000000000n,
gasPrice: 100000000000n,
};
const txHash = await abstractSigner.sendTransaction(tx);
console.log(`Tx hash: ${txHash}`);
const receipt = await abstractSigner.waitTillMined(txHash);
console.log(receipt);
FAQs
Abstraction over the ethers v5 Wallet, ethers v5 JsonRpcSigner or Viem WalletClient
We found that @polymarket/abstract-signer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.