@goat-sdk/wallet-viem
TypeScript icon, indicating that this package has built-in type declarations

0.2.12 • Public • Published

Viem Wallet for GOAT

Installation

npm install @goat-sdk/wallet-viem
yarn add @goat-sdk/wallet-viem
pnpm add @goat-sdk/wallet-viem

Usage

import { createWalletClient } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { sepolia } from "viem/chains";
import { http } from "viem";

import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai";
import { viem } from "@goat-sdk/wallet-viem";

const account = privateKeyToAccount(
    process.env.WALLET_PRIVATE_KEY as `0x${string}`
);

const walletClient = createWalletClient({
    account: account,
    transport: http(process.env.ALCHEMY_API_KEY),
    chain: sepolia,
});

const tools = await getOnChainTools({
    wallet: viem(walletClient),
});


Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.12142latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.12142
0.2.11114
0.2.1012
0.2.910
0.2.846
0.2.79
0.2.6504
0.2.53
0.2.42
0.2.381
0.2.22
0.2.11
0.2.01,286
0.1.82
0.1.71
0.1.61
0.1.42
0.1.31,219
0.1.21
0.1.12
0.1.02

Package Sidebar

Install

npm i @goat-sdk/wallet-viem

Homepage

ohmygoat.dev

Weekly Downloads

3,442

Version

0.2.12

License

MIT

Unpacked Size

12.5 kB

Total Files

12

Last publish

Collaborators

  • aigustin
  • mpaella