1<!DOCTYPE html><html data-vocs="true" lang="en" style="color-scheme:light dark;--vocs-color-accent:light-dark(#ff9318, #ffc517)"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="image" href="/icon-light.png"/><link rel="preload" as="image" href="/icon-dark.png"/><link rel="preload" href="/assets/index-xG7LXTGW.css" as="stylesheet"/><link rel="preload" href="/assets/_root-DFMI9o3Y.css" as="stylesheet"/><link rel="preload" href="/assets/vocs-group-icons-0d967a23f5e5.css" as="stylesheet"/><link rel="modulepreload" href="/assets/client-Cl5Q5dYe.js" crossorigin=""/><link rel="modulepreload" href="/assets/index-PiQp26Sx.js" crossorigin=""/><link rel="modulepreload" href="/assets/Head-Dw62s8sl.js" crossorigin=""/><link rel="modulepreload" href="/assets/useConfig-BizQAhBk.js" crossorigin=""/><link rel="modulepreload" href="/assets/config-DMNlh4Xr.js" crossorigin=""/><link rel="modulepreload" href="/assets/MdxPageContext-D-E0n1OU.js" crossorigin=""/><link rel="modulepreload" href="/assets/main-SXS5LLZM.js" crossorigin=""/><link rel="modulepreload" href="/assets/Root.client-j1_FcRcl.js" crossorigin=""/><link rel="modulepreload" href="/assets/context-C4spomkL-BVeGV7-1.js" crossorigin=""/><link rel="modulepreload" href="/assets/anchor-navigation.client-Dajxwjuw.js" crossorigin=""/><link rel="modulepreload" href="/assets/Layout.client-BtIB2gqE.js" crossorigin=""/><link rel="modulepreload" href="/assets/external-link-CNRT44Zn.js" crossorigin=""/><link rel="modulepreload" href="/assets/dist-CAI68jx6.js" crossorigin=""/><link rel="modulepreload" href="/assets/useOpenChangeComplete-BPOosvtI.js" crossorigin=""/><link rel="modulepreload" href="/assets/clsx-DBr6wyP7.js" crossorigin=""/><link rel="modulepreload" href="/assets/Badge-efmfDD57.js" crossorigin=""/><link rel="modulepreload" href="/assets/floating-ui.dom-CJXPXXm7.js" crossorigin=""/><link rel="modulepreload" href="/assets/Link-CmKvPgTb.js" crossorigin=""/><link rel="modulepreload" href="/assets/x-mqnQ7KMq.js" crossorigin=""/><link rel="modulepreload" href="/assets/Changelog.client-DDINedKU.js" crossorigin=""/><link rel="modulepreload" href="/assets/TabsList-DqXq_jK4.js" crossorigin=""/><link rel="modulepreload" href="/assets/useColorScheme-BppqUZZs.js" crossorigin=""/><meta name="generator" content="Waku"/><meta name="color-scheme" content="light dark"/><title>Getting Started · Viem</title><link rel="canonical" href="https://viem.sh/docs/getting-started"/><link rel="icon" href="/favicons/light.png" type="image/png"/><link rel="icon" href="/favicons/dark.png" type="image/png" media="(prefers-color-scheme: dark)"/><meta name="robots" content="index, follow"/><meta name="description" content="Get started with viem in just a few lines of code."/><meta property="og:type" content="website"/><meta property="og:title" content="Getting Started"/><meta property="og:site_name" content="Viem"/><meta property="og:url" content="https://viem.sh/docs/getting-started"/><meta property="og:description" content="Get started with viem in just a few lines of code."/><meta property="og:image" content="https://viem.sh/api/og?logo=https://viem.sh/icon-dark.png&title=Getting%20Started&description=Get%20started%20with%20viem%20in%20just%20a%20few%20lines%20of%20code."/><meta property="article:modified_time" content="2026-09-29T14:06:55-04:00"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Getting Started"/><meta name="twitter:description" content="Get started with viem in just a few lines of code."/><meta name="twitter:image" content="https://viem.sh/api/og?logo=https://viem.sh/icon-dark.png&title=Getting%20Started&description=Get%20started%20with%20viem%20in%20just%20a%20few%20lines%20of%20code."/><link rel="stylesheet" href="/assets/index-xG7LXTGW.css"/><link rel="stylesheet" href="/assets/_root-DFMI9o3Y.css"/><link rel="stylesheet" href="/assets/vocs-group-icons-0d967a23f5e5.css"/>
1<script>(function(){try{var e=document.documentElement;var s=function(t){e.setAttribute('data-vocs-theme',t);e.style.colorScheme=t};var t=localStorage.getItem('vocs-theme');if(t==='light'||t==='dark'){s(t)}else if(window.matchMedia('(prefers-color-scheme:dark)').matches){s('dark')}else if(window.matchMedia('(prefers-color-scheme:light)').matches){s('light')}else{s('dark')}}catch(e){}})()</script>
1<base href="https://viem.sh"/></head><body data-version="1.0">
1<script src="https://cdn.usefathom.com/script.js" data-site="BYCJMNBD" defer=""></script>
1<script>(function(){try{var e=document.documentElement;var s=function(t){e.setAttribute('data-vocs-theme',t);e.style.colorScheme=t};var t=localStorage.getItem('vocs-theme');if(t==='light'||t==='dark'){s(t)}else if(window.matchMedia('(prefers-color-scheme:dark)').matches){s('dark')}else if(window.matchMedia('(prefers-color-scheme:light)').matches){s('light')}else{s('dark')}}catch(e){}})()</script>
1<base href="https://viem.sh"/>
1<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Getting Started","description":"Get started with viem in just a few lines of code.","mainEntityOfPage":{"@id":"https://viem.sh/docs/getting-started","@type":"WebPage"},"url":"https://viem.sh/docs/getting-started","dateModified":"2026-09-29T14:06:55-04:00","isPartOf":{"@type":"WebSite","name":"Viem","url":"https://viem.sh"}}</script>
1<div data-layout="full" data-v-sidebar="true" data-v-topnav="true"><a class="vocs:fixed vocs:top-3 vocs:left-3 vocs:z-50 vocs:px-4 vocs:py-2 vocs:text-accent8 vocs:text-sm vocs:font-medium vocs:bg-surface vocs:border-2 vocs:border-dashed vocs:border-accent8 vocs:rounded-lg vocs:outline-none vocs:opacity-0 vocs:pointer-events-none vocs:-translate-y-full vocs:focus:opacity-100 vocs:focus:pointer-events-auto vocs:focus:translate-y-0 vocs:transition-all vocs:duration-150" data-v-skip-to-content="true" href="/docs/getting-started#vocs-content">Skip to content</a><div class="vocs:flex vocs:max-lg:hidden vocs:justify-end vocs:fixed vocs:h-topNav vocs:w-logo vocs:min-w-fit vocs:max-lg:w-fit vocs:z-20" data-v-gutter-logo="true"><div class="vocs:w-sidebar vocs:px-sidebar-px vocs:py-3 vocs:min-w-fit" data-v-logo="true"><a class="vocs:flex vocs:h-full vocs:w-fit" href="/"><div class="vocs:flex vocs:items-center vocs:h-full" data-v-logo="true"><img alt="Logo" class="vocs:h-full vocs:max-h-7 vocs:dark:hidden" data-v-logo-image="true" src="/icon-light.png"/><img alt="Logo" class="vocs:h-full vocs:max-h-7 vocs:hidden vocs:dark:block" data-v-logo-image="true" src="/icon-dark.png"/></div></a></div></div><div class="vocs:bg-primary vocs:flex vocs:justify-end vocs:fixed vocs:w-gutter vocs:h-screen vocs:z-10 vocs:max-lg:hidden" data-v-gutter-left="true"><aside class="vocs:w-sidebar vocs:px-sidebar-px vocs:py-sidebar-py vocs:h-full vocs:flex vocs:flex-col vocs:justify-between vocs:overflow-y-auto" data-v-sidebar-container="true"><div class="vocs:bg-linear-to-t vocs:from-transparent vocs:to-dark vocs:min-h-4 vocs:top-0 vocs:w-full vocs:sticky" data-v-sidebar-curtain="true"></div><nav class="vocs:flex-1 vocs:flex vocs:flex-col vocs:text-sm vocs:font-[450] vocs:[&>*:not(:last-child)[data-collapsed='false']]:mb-4 vocs:pb-8 vocs:[&>*:first-child>[data-empty]]:h-0" data-v-sidebar="true"><section data-collapsed="false" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="false" data-collapsable="false" data-v-sidebar-section-header="true"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Introduction</span></span></div><div class="" data-v-sidebar-section-content="true"><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/introduction"><span class="vocs:min-w-0 vocs:truncate">Why Viem</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/installation"><span class="vocs:min-w-0 vocs:truncate">Installation</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" data-active="true" href="/docs/getting-started">
1<span class="vocs:min-w-0 vocs:truncate">Getting Started</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/compatibility"><span class="vocs:min-w-0 vocs:truncate">Platform Compatibility</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/faq"><span class="vocs:min-w-0 vocs:truncate">FAQ</span></a></div></section><section data-collapsed="false" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="false" data-collapsable="false" data-v-sidebar-section-header="true"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Guides</span></span></div><div class="" data-v-sidebar-section-content="true"><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/migration-guide"><span class="vocs:min-w-0 vocs:truncate">Migration Guide</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/ethers-migration"><span class="vocs:min-w-0 vocs:truncate">Ethers v5 â viem</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/typescript"><span class="vocs:min-w-0 vocs:truncate">TypeScript</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/error-handling">
1<span class="vocs:min-w-0 vocs:truncate">Error Handling</span></a><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem] vocs:data-[collapsable=true]:hover:text-accent vocs:data-[collapsable=true]:hover:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">EIP-7702</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/guides/blob-transactions"><span class="vocs:min-w-0 vocs:truncate">Blob Transactions</span></a></div></section><section data-collapsed="false" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="false" data-collapsable="false" data-v-sidebar-section-header="true"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Clients & Transports</span></span></div><div class="" data-v-sidebar-section-content="true"><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/clients/intro"><span class="vocs:min-w-0 vocs:truncate">Introduction</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/clients/public"><span class="vocs:min-w-0 vocs:truncate">Public Client</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/clients/wallet">
1<span class="vocs:min-w-0 vocs:truncate">Wallet Client</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/clients/test"><span class="vocs:min-w-0 vocs:truncate">Test Client</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/clients/custom"><span class="vocs:min-w-0 vocs:truncate">Build your own Client</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="false" data-link="true" data-v-sidebar-item="true" href="/docs/clients/resolve"><span class="vocs:min-w-0 vocs:truncate">Resolving Clients</span></a><section data-collapsed="false" data-v-sidebar-section="true"><div class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem] vocs:data-[collapsable=true]:hover:text-accent vocs:data-[collapsable=true]:hover:cursor-pointer" data-condensed="false" data-collapsed="false" data-collapsable="false" data-v-sidebar-section-header="true"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Transports</span></span></div><div class="vocs:pl-4 vocs:border-l vocs:border-primary" data-v-sidebar-section-content="true"><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="true" data-link="true" data-v-sidebar-item="true" href="/docs/clients/transports/http"><span class="vocs:min-w-0 vocs:truncate">HTTP</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="true" data-link="true" data-v-sidebar-item="true" href="/docs/clients/transports/websocket"><span class="vocs:min-w-0 vocs:truncate">WebSocket</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="true" data-link="true" data-v-sidebar-item="true" href="/docs/clients/transports/custom">
1<span class="vocs:min-w-0 vocs:truncate">Custom (EIP-1193)</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="true" data-link="true" data-v-sidebar-item="true" href="/docs/clients/transports/ipc"><span class="vocs:min-w-0 vocs:truncate">IPC</span></a><a class="vocs:flex vocs:data-link:hover:text-heading vocs:not-data-link:cursor-default vocs:justify-between vocs:-mx-3 vocs:px-3 vocs:py-1.5 vocs:text-primary/80 vocs:-my-0.5 vocs:items-center vocs:rounded-md vocs:data-active:bg-accenta3 vocs:data-active:text-accent8! vocs:aria-disabled:opacity-60 vocs:aria-disabled:cursor-not-allowed vocs:aria-disabled:pointer-events-none vocs:data-[condensed=true]:text-[13px] vocs:data-[condensed=true]:py-[0.3rem]" data-condensed="true" data-link="true" data-v-sidebar-item="true" href="/docs/clients/transports/fallback"><span class="vocs:min-w-0 vocs:truncate">Fallback</span></a></div></section></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Public Actions</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Wallet Actions</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Test Actions</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Accounts</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Chains</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Contract</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">ENS</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">SIWE</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">ABI</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">EIP-7702</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Utilities</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section><section data-collapsed="true" data-v-sidebar-section="true"><div class="vocs:h-[2.5em] vocs:px-3 vocs:-mx-3 vocs:rounded-md vocs:flex vocs:items-center vocs:justify-between vocs:text-heading vocs:font-medium vocs:data-[collapsable=true]:cursor-pointer" data-condensed="false" data-collapsed="true" data-collapsable="true" data-v-sidebar-section-header="true" role="button" tabindex="0"><span class="vocs:inline-flex vocs:items-center vocs:min-w-0"><span class="vocs:truncate">Glossary</span></span><div class="vocs:text-secondary/80"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:data-collapsed:rotate-90 vocs:transition-transform vocs:duration-200 vocs:ease-in-out"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"></path></svg></div></div></section></nav><div class="vocs:sticky vocs:bottom-0" data-v-sidebar-footer="true"><div class="vocs:bg-linear-to-b vocs:from-transparent vocs:to-primary vocs:min-h-4 vocs:bottom-0 vocs:w-full vocs:sticky" data-v-sidebar-footer-curtain="true"></div><div class="vocs:bg-primary vocs:pb-2 vocs:flex vocs:justify-between vocs:items-center" data-v-sidebar-footer-content="true"><div class="vocs:flex vocs:items-center vocs:h-7 " data-v-socials="true"><a aria-label="GitHub" class="vocs:flex vocs:items-center vocs:justify-center vocs:size-7 vocs:text-primary/60 vocs:hover:text-primary vocs:transition-colors vocs:duration-150" href="https://github.com/wevm/viem" rel="noopener noreferrer" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-[18px]">
1<path fill="currentColor" d="M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path></svg></a><div class="vocs:w-px vocs:h-4 vocs:bg-primary vocs:mx-1"></div><a aria-label="Discord" class="vocs:flex vocs:items-center vocs:justify-center vocs:size-7 vocs:text-primary/60 vocs:hover:text-primary vocs:transition-colors vocs:duration-150" href="https://discord.gg/xCUz9FRcXD" rel="noopener noreferrer" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-[18px]"><path fill="currentColor" d="M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0a13 13 0 0 0-.617-1.25a.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.08.08 0 0 0 .084-.028a14 14 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13 13 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10 10 0 0 0 .372-.292a.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01q.181.149.373.292a.077.077 0 0 1-.006.127a12.3 12.3 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028a19.8 19.8 0 0 0 6.002-3.03a.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418"></path></svg></a><div class="vocs:w-px vocs:h-4 vocs:bg-primary vocs:mx-1"></div><a aria-label="X (Twitter)" class="vocs:flex vocs:items-center vocs:justify-center vocs:size-7 vocs:text-primary/60 vocs:hover:text-primary vocs:transition-colors vocs:duration-150" href="https://x.com/wevm_dev" rel="noopener noreferrer" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-[18px]"><path fill="currentColor" d="M14.234 10.162L22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299l-.929-1.329L3.076 1.56h3.182l5.965 8.532l.929 1.329l7.754 11.09h-3.182z"></path></svg></a></div></div></div></aside></div><div class="vocs:bg-primary vocs:fixed vocs:flex vocs:justify-between vocs:h-topNav vocs:px-4 vocs:max-lg:w-full vocs:max-lg:left-0 vocs:max-lg:pr-0 vocs:max-md:border-b vocs:max-md:border-primary" data-v-gutter-top="true"><div class="vocs:flex vocs:gap-2 vocs:h-full vocs:py-2" data-v-gutter-top-left="true"><a class="vocs:py-0.5 vocs:flex" data-v-logo-link="true" href="/"><div class="vocs:flex vocs:items-center vocs:h-full" data-v-logo="true"><img alt="Logo" class="vocs:h-full vocs:max-h-7 vocs:dark:hidden" data-v-logo-image="true" src="/icon-light.png"/><img alt="Logo" class="vocs:h-full vocs:max-h-7 vocs:hidden vocs:dark:block" data-v-logo-image="true" src="/icon-dark.png"/></div></a><div class="vocs:w-1"></div><div class="vocs:max-lg:w-[180px] vocs:w-[240px] vocs:max-md:hidden"><button class="vocs:flex vocs:items-center vocs:justify-between vocs:cursor-pointer vocs:pl-3 vocs:pr-2 vocs:text-sm vocs:text-secondary vocs:hover:text-primary vocs:w-full vocs:h-full vocs:bg-surface vocs:hover:bg-surfaceTint vocs:border vocs:border-primary vocs:rounded-xl vocs:transition-colors vocs:duration-100 vocs:w-full vocs:h-full" t
1ype="button" tabindex="0" data-base-ui-click-trigger="" id="base-ui-_R_rqmkq_" aria-haspopup="dialog" aria-expanded="false"><div class="vocs:flex vocs:items-center vocs:gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-4"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m21 21l-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></g></svg>Search...</div><div class="vocs:flex vocs:items-center vocs:gap-0.5"><div class="vocs:bg-primary vocs:text-xs vocs:flex vocs:items-center vocs:justify-center vocs:h-5 vocs:w-auto vocs:px-0.75 vocs:border vocs:border-primary vocs:rounded-sm">â</div> <div class="vocs:bg-primary vocs:text-xs vocs:flex vocs:items-center vocs:justify-center vocs:h-5 vocs:w-auto vocs:px-0.75 vocs:border vocs:border-primary vocs:rounded-sm">K</div></div></button></div></div><nav class="vocs:flex vocs:max-lg:hidden vocs:px-2"><ul class="vocs:flex vocs:items-center vocs:h-full vocs:list-none vocs:m-0 vocs:p-0 vocs:-mb-px"><li class="vocs:h-full"><a data-v-active="true" class="vocs:flex vocs:items-center vocs:h-full vocs:cursor-pointer vocs:hover:text-heading vocs:px-2 vocs:border-b-2 vocs:text-primary/80 vocs:data-[v-active=true]:text-accent6 vocs:text-[14px] vocs:font-[450] vocs:border-transparent vocs:data-[v-active=true]:border-accent" href="/docs/getting-started">Docs</a></li><li class="vocs:h-full"><a data-v-active="false" class="vocs:flex vocs:items-center vocs:h-full vocs:cursor-pointer vocs:hover:text-heading vocs:px-2 vocs:border-b-2 vocs:text-primary/80 vocs:data-[v-active=true]:text-accent6 vocs:text-[14px] vocs:font-[450] vocs:border-transparent vocs:data-[v-active=true]:border-accent" href="/tokens">Tokens</a></li><li class="vocs:h-full"><a data-v-active="false" class="vocs:flex vocs:items-center vocs:h-full vocs:cursor-pointer vocs:hover:text-heading vocs:px-2 vocs:border-b-2 vocs:text-primary/80 vocs:data-[v-active=true]:text-accent6 vocs:text-[14px] vocs:font-[450] vocs:border-transparent vocs:data-[v-active=true]:border-accent" href="/tempo">Tempo</a></li><li class="vocs:h-full"><button type="button" aria-disabled="false" tabindex="0" aria-expanded="false" data-base-ui-navigation-menu-trigger="" data-v-active="false" class="vocs:flex vocs:items-center vocs:h-full vocs:cursor-pointer vocs:hover:text-heading vocs:px-2 vocs:border-b-2 vocs:text-primary/80 vocs:data-[v-active=true]:text-accent6 vocs:text-[14px] vocs:font-[450] vocs:border-transparent vocs:data-[v-active=true]:border-accent">Extensions<span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:text-secondary/80 vocs:ml-1 vocs:transition-transform vocs:duration-150 vocs:in-data-popup-open:rotate-180"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"></path></svg></span></button></li><li class="vocs:h-full"><button type="button" aria-disabled="false" tabindex="0" aria-expanded="false" data-base-ui-navigation-menu-trigger="" data-v-active="false" class="vocs:flex vocs:items-center vocs:h-full vocs:cursor-pointer vocs:hover:text-heading vocs:px-2 vocs:border-b-2 vocs:text-primary/80 vocs:data-[v-active=true]:text-accent6 vocs:text-[14px] vocs:font-[450] vocs:border-transparent vocs:data-[v-active=true]:border-accent">2.57.2<span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:text-secondary/80 vocs:ml-1 vocs:transition-transform vocs:duration-150 vocs:in-data-popup-open:rotate-180"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"></path></svg></span></button></li></ul></nav><div class="vocs:lg:hidden vocs:flex vocs:items-center vocs:px-3 vocs:gap-1"><button aria-label="Search" class="vocs:flex vocs:md:hidden vocs:items-center vocs:justify-center vocs:cursor-pointer vocs:size-8" type="button" tabindex="0" data-base-ui-click-trigger="" id="base-ui-_R_remkq_" aria-haspopup="dialog" aria-expanded="false"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m21 21l-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></g></svg></button><button type="button" tabindex="0" data-base-ui-click-trigger="" id="base-ui-_R_dmmkq_" aria-haspopup="dialog" aria-expanded="false" aria-label="Open menu" class="vocs:flex vocs:items-center vocs:justify-center vocs:cursor-pointer vocs:size-8"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
1<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5h18M3 12h18M3 19h18"></path></svg></button></div></div><div class="vocs:max-md:hidden vocs:fixed vocs:bg-surface vocs:lg:border-l vocs:border-t vocs:border-primary vocs:w-full vocs:h-full vocs:max-lg:w-full vocs:max-w-screen vocs:ml-gutter" data-v-surface-bg="true"></div><main class="vocs:isolate vocs:max-w-screen vocs:h-full vocs:pb-20" data-v-main="true" id="vocs-content"><article class="vocs:px-content-px vocs:py-content-py vocs:relative vocs:w-full vocs:space-y-6 vocs:max-md:overflow-x-hidden vocs:max-w-content" data-v-content="true"><hgroup data-v=""><h1 data-v="" id="getting-started">Getting Started</h1><p data-v="">Get started with viem in just a few lines of code.</p></hgroup> 2<h2 data-v="" id="overview">Overview<a aria-label="Copy link and go to this section" class="heading-anchor" title="Copy link and go to this section" href="/docs/getting-started#overview" data-v-link="true" data-v="true"><svg class="heading-anchor-icon" xmlns="http://www.w3.org/2000/svg" width="0.75em" height="0.75em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2> 3<p data-v="">viem is a TypeScript interface for Ethereum that provides low-level stateless primitives for interacting with Ethereum. viem is focused on developer experience, stability, bundle size, and performance:</p> 4<ul data-v=""> 5<li data-v=""><strong data-v="">Developer experience</strong> Automatic <a href="/docs/typescript" data-v="true" data-v-link="true">type safety and inference</a>, comprehensive documentation, composable APIs.</li> 6<li data-v=""><strong data-v="">Stability</strong> Test suite runs against forked Ethereum networks, complete <a href="https://app.codecov.io/gh/wevm/viem" data-v="true" data-v-link="true" rel="noopener noreferrer" target="_blank">test coverage</a>.</li> 7<li data-v=""><strong data-v="">Bundle size</strong> Tree-shakable lightweight modules.</li> 8<li data-v=""><strong data-v="">Performance</strong> Optimized encoding/parsing, async tasks only when necessary.</li> 9</ul> 10<p data-v="">You can learn more about the rationale behind the project in the <a href="/docs/introduction" data-v="true" data-v-link="true">Why viem</a> section.</p> 11<h2 data-v="" id="installation">Installation<a aria-label="Copy link and go to this section" class="heading-anchor" title="Copy link and go to this section" href="/docs/getting-started#installation" data-v-link="true" data-v="true"><svg class="heading-anchor-icon" xmlns="http://www.w3.org/2000/svg" width="0.75em" height="0.75em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2> 12<!-- --> 13<h2 data-v="" id="quick-start">Quick Start<a aria-label="Copy link and go to this section" class="heading-anchor" title="Copy link and go to this section" href="/docs/getting-started#quick-start" data-v-link="true" data-v="true"><svg class="heading-anchor-icon" xmlns="http://www.w3.org/2000/svg" width="0.75em" height="0.75em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2> 14<h3 data-v="" id="1-set-up-your-client--transport">1. Set up your Client & Transport<a aria-label="Copy link and go to this section" class="heading-anchor" title="Copy link and go to this section" href="/docs/getting-started#1-set-up-your-client--transport" data-v-link="true" data-v="true"><svg class="heading-anchor-icon" xmlns="http://www.w3.org/2000/svg" width="0.75em" height="0.75em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3> 15<p data-v="">Firstly, set up your <a href="/docs/clients/intro" data-v="true" data-v-link="true">Client</a> with a desired <a href="/docs/clients/intro" data-v="true" data-v-link="true">Transport</a> & <a href="/docs/chains/introduction" data-v="true" data-v-link="true">Chain</a>.</p> 16<div data-v-code-container="true">
16<pre class="shiki shiki-themes github-light github-dark-dimmed has-focused twoslash lsp vocs:relative vocs:group/code" tabindex="0" data-v="true"><code data-language="ts" data-v="true"><span class="line"><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">import</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> { createPublicClient, http } </span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">from</span><span style="color:light-dark(#032F62, #96D0FF);--shiki-light:#032F62;--shiki-dark:#96D0FF"> 'viem'</span></span> 17<span class="line"><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">import</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> { mainnet } </span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">from</span><span style="color:light-dark(#032F62, #96D0FF);--shiki-light:#032F62;--shiki-dark:#96D0FF"> 'viem/chains'</span></span> 18<span class="line" data-empty-line="true"> </span> 19<span class="line focused"><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">const</span><span style="color:light-dark(#005CC5, #6CB6FF);--shiki-light:#005CC5;--shiki-dark:#6CB6FF"> client</span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067"> =</span><span style="color:light-dark(#6F42C1, #DCBDFB);--shiki-light:#6F42C1;--shiki-dark:#DCBDFB"> createPublicClient</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7">({ </span></span> 20<span class="line focused"><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> chain: mainnet, </span></span> 21<span class="line focused"><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> transport: </span><span style="color:light-dark(#6F42C1, #DCBDFB);--shiki-light:#6F42C1;--shiki-dark:#DCBDFB">http</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7">(), </span></span> 22<span class="line focused"><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7">}) </span></span></code><button aria-label="Copy code" class="vocs:absolute vocs:top-2.5 vocs:data-[single-line=true]:top-1/2 vocs:data-[single-line=true]:-translate-y-1/2 vocs:right-2.5 vocs:p-1.5 vocs:rounded-md vocs:opacity-0 vocs:transition-opacity vocs:duration-150 vocs:text-secondary vocs:hover:text-heading vocs:cursor-pointer vocs:group-hover/code:opacity-100 vocs:data-[copied=true]:opacity-100 vocs:data-[copied=true]:text-success" data-copied="false" data-single-line="false" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-4"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></g></svg></button><span class="vocs:hidden"></span><span class="vocs:hidden"></span></pre></div> 23<aside data-v-callout="true" data-v-context="info" data-v="true" data-v-content="true"><div data-v-callout-icon="true"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4m0-4h.01"></path></g></svg></div><p data-v="">In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Infura, thirdweb, etc). If no URL is provided, viem will default to a public RPC provider. <a href="/docs/clients/transports/http#usage" data-v="true" data-v-link="true">Read more</a>.</p></aside> 24<h3 data-v="" id="2-consume-actions">2. Consume Actions<a aria-label="Copy link and go to this section" class="heading-anchor" title="Copy link and go to this section" href="/docs/getting-started#2-consume-actions" data-v-link="true" data-v="true"><svg class="heading-anchor-icon" xmlns="http://www.w3.org/2000/svg" width="0.75em" height="0.75em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3> 25<p data-v="">Now that you have a Client set up, you can now interact with Ethereum and consume <a href="/docs/actions/public/introduction" data-v="true" data-v-link="true">Actions</a>!</p> 26<div data-v-code-container="true">
26<pre class="shiki shiki-themes github-light github-dark-dimmed has-focused twoslash lsp vocs:relative vocs:group/code" tabindex="0" data-v="true"><code data-language="ts" data-v="true"><span class="line"><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">import</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> { createPublicClient, http } </span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">from</span><span style="color:light-dark(#032F62, #96D0FF);--shiki-light:#032F62;--shiki-dark:#96D0FF"> 'viem'</span></span> 27<span class="line"><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">import</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> { mainnet } </span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">from</span><span style="color:light-dark(#032F62, #96D0FF);--shiki-light:#032F62;--shiki-dark:#96D0FF"> 'viem/chains'</span></span> 28<span class="line" data-empty-line="true"> </span> 29<span class="line"><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">const</span><span style="color:light-dark(#005CC5, #6CB6FF);--shiki-light:#005CC5;--shiki-dark:#6CB6FF"> client</span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067"> =</span><span style="color:light-dark(#6F42C1, #DCBDFB);--shiki-light:#6F42C1;--shiki-dark:#DCBDFB"> createPublicClient</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7">({</span></span> 30<span class="line"><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> chain: mainnet,</span></span> 31<span class="line"><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> transport: </span><span style="color:light-dark(#6F42C1, #DCBDFB);--shiki-light:#6F42C1;--shiki-dark:#DCBDFB">http</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7">(),</span></span> 32<span class="line"><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7">})</span></span> 33<span class="line" data-empty-line="true"> </span> 34<span class="line focused"><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067">const</span><span style="color:light-dark(#005CC5, #6CB6FF);--shiki-light:#005CC5;--shiki-dark:#6CB6FF"> blockNumber</span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067"> =</span><span style="color:light-dark(#D73A49, #F47067);--shiki-light:#D73A49;--shiki-dark:#F47067"> await</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7"> client.</span><span style="color:light-dark(#6F42C1, #DCBDFB);--shiki-light:#6F42C1;--shiki-dark:#DCBDFB">getBlockNumber</span><span style="color:light-dark(#24292E, #ADBAC7);--shiki-light:#24292E;--shiki-dark:#ADBAC7">() </span></span></code><button aria-label="Copy code" class="vocs:absolute vocs:top-2.5 vocs:data-[single-line=true]:top-1/2 vocs:data-[single-line=true]:-translate-y-1/2 vocs:right-2.5 vocs:p-1.5 vocs:rounded-md vocs:opacity-0 vocs:transition-opacity vocs:duration-150 vocs:text-secondary vocs:hover:text-heading vocs:cursor-pointer vocs:group-hover/code:opacity-100 vocs:data-[copied=true]:opacity-100 vocs:data-[copied=true]:text-success" data-copied="false" data-single-line="false" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-4"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></g></svg></button><span class="vocs:hidden"></span><span class="vocs:hidden"></span></pre></div> 35<h2 data-v="" id="live-example">Live example<a aria-label="Copy link and go to this section" class="heading-anchor" title="Copy link and go to this section" href="/docs/getting-started#live-example" data-v-link="true" data-v="true"><svg class="heading-anchor-icon" xmlns="http://www.w3.org/2000/svg" width="0.75em" height="0.75em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2> 36<iframe class="mt-6" width="100%" height="600px" frameBorder="0" src="https://stackblitz.com/edit/viem-getting-started?embed=1&file=index.ts&hideNavigation=1&hideDevTools=true&terminalHeight=1&hideExplorer=1&devtoolsheight=1&ctl=1"></iframe><div class="vocs:mt-8" data-v-content-footer="true">
36<div class="vocs:min-[1376px]:hidden vocs:mb-6"></div><div class="vocs:flex vocs:max-sm:flex-col vocs:justify-between vocs:items-center vocs:max-sm:items-start vocs:gap-2 vocs:mb-4"><a class="vocs:flex vocs:items-center vocs:gap-2 vocs:text-secondary vocs:text-sm vocs:hover:text-heading vocs:transition-colors" data-v-edit-link="true" href="https://github.com/wevm/viem/edit/main/site/pages/docs/getting-started.mdx" rel="noopener noreferrer" target="_blank"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-4"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"></path></g></svg>Suggest changes to this page</a></div><div class="vocs:min-[1376px]:hidden vocs:mb-6"><button aria-label="Copy page content as markdown for AI" class="vocs:flex vocs:items-center vocs:gap-2 vocs:text-[13px] vocs:text-secondary vocs:hover:text-heading vocs:cursor-pointer vocs:disabled:cursor-default vocs:transition-colors vocs:border vocs:border-primary vocs:rounded-lg vocs:px-3 vocs:py-2" data-v-copy-for-ai="true" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-4"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"></rect><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path></g></svg><span>Copy page for AI</span></button></div><div class="vocs:border-t vocs:border-primary vocs:pt-8"><nav aria-label="Pagination" class="vocs:flex vocs:max-sm:flex-col vocs:justify-between vocs:items-start vocs:gap-4" data-v-pagination="true"><a class="vocs:flex vocs:max-sm:w-full vocs:max-sm:border vocs:max-sm:border-primary vocs:max-sm:rounded-lg vocs:max-sm:p-3 vocs:flex-col vocs:gap-1.5 vocs:group" href="/docs/installation"><span class="vocs:flex vocs:items-center vocs:gap-2 vocs:text-heading vocs:text-lg vocs:font-medium vocs:group-hover:text-accent8 vocs:transition-colors"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-4"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 19l-7-7l7-7m7 7H5"></path></svg>Installation</span><span class="vocs:flex vocs:items-center vocs:gap-1.5 vocs:text-secondary vocs:text-xs">Previous<span class="vocs:max-sm:hidden vocs:flex vocs:items-center vocs:gap-1"><kbd class="vocs:bg-surface vocs:border vocs:border-primary vocs:rounded vocs:px-1.5 vocs:py-0.5 vocs:text-xs vocs:font-mono vocs:text-secondary">Shift</kbd><kbd class="vocs:bg-surface vocs:border vocs:border-primary vocs:rounded vocs:px-1.5 vocs:py-0.5 vocs:text-xs vocs:font-mono vocs:text-secondary">â</kbd></span></span></a><a class="vocs:flex vocs:max-sm:w-full vocs:max-sm:border vocs:max-sm:border-primary vocs:max-sm:rounded-lg vocs:max-sm:p-3 vocs:flex-col vocs:items-end vocs:gap-1.5 vocs:group" href="/docs/compatibility"><span class="vocs:flex vocs:items-center vocs:gap-2 vocs:text-heading vocs:text-lg vocs:font-medium vocs:group-hover:text-accent8 vocs:transition-colors">Platform Compatibility<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" class="vocs:size-4"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7-7l7 7l-7 7"></path></svg></span><span class="vocs:flex vocs:items-center vocs:gap-1.5 vocs:text-secondary vocs:text-xs">Next<span class="vocs:max-sm:hidden vocs:flex vocs:items-center vocs:gap-1"><kbd class="vocs:bg-surface vocs:border vocs:border-primary vocs:rounded vocs:px-1.5 vocs:py-0.5 vocs:text-xs vocs:font-mono vocs:text-secondary">Shift</kbd><kbd class="vocs:bg-surface vocs:border vocs:border-primary vocs:rounded vocs:px-1.5 vocs:py-0.5 vocs:text-xs vocs:font-mono vocs:text-secondary">â</kbd></span></span></a></nav></div></div></article></main><div class="vocs:fixed vocs:bottom-6 vocs:max-md:bottom-2 vocs:left-1/2 vocs:-translate-x-1/2 vocs:z-40 vocs:will-change-transform" data-v-ask-ai-container="true"><button type="button" tabindex="0" aria-haspopup="menu" id="base-ui-_R_72kq_" class="vocs:flex vocs:items-center vocs:justify-between vocs:cursor-pointer vocs:pl-3 vocs:pr-2 vocs:text-sm vocs:text-secondary vocs:hover:text-primary vocs:w-full vocs:h-full vocs:bg-surface vocs:hover:bg-surfaceTint vocs:border vocs:border-primary vocs:rounded-xl vocs:transition-colors vocs:duration-100 vocs:w-[290px]! vocs:h-10! vocs:z-50! vocs:bg-surfaceTint/20! vocs:backdrop-blur-md!"><div class="vocs:flex vocs:items-center vocs:gap-2">Ask AI...</div><div class="vocs:flex vocs:items-center vocs:gap-0.5"><div class="vocs:bg-primary vocs:text-xs vocs:flex vocs:items-center vocs:justify-center vocs:h-5 vocs:w-auto vocs:px-0.75 vocs:border vocs:border-primary vocs:rounded-sm">â</div><div class="vocs:bg-primary vocs:text-xs vocs:flex vocs:items-center vocs:justify-center vocs:h-5 vocs:w-auto vocs:px-0.75 vocs:border vocs:border-primary vocs:rounded-sm">I</div></div></button></div></div>
36<script id="_R_"> 37 globalThis.__WAKU_HYDRATE__ = true; 38 globalThis.__WAKU_INITIAL_RSC__ = (() => {const e = {};e.response = Promise.resolve(new Response(new ReadableStream({start(c) {const d = (window.__FLIGHT_DATA ||= []);const t = new TextEncoder();const f = (s) => c.enqueue(typeof s === 'string' ? t.encode(s) : s);d.forEach(f);d.length = 0;d.push = f;const close = () => c.close();if (document.readyState === 'loading') {document.addEventListener('DOMContentLoaded', close);} else {close();}}})));return e;})(); 39 import("/assets/index-PiQp26Sx.js") 40globalThis.__WAKU_ROUTER_PREFETCH__ = (path, callback) => { 41 const ids = []; 42 const path2idxs = {}; 43 const key = Object.keys(path2idxs).find((key) => new RegExp(key).test(path)); 44 for (const idx of path2idxs[key] || []) { 45 callback(ids[idx]); 46 } 47}; 48</script>
48<script>(self.__FLIGHT_DATA||=[]).push("2:I[\"2d33d3ec1607\",[],\"Slot\",1]\n3:I[\"2d33d3ec1607\",[],\"Children\",1]\n4:I[\"72da6faeb29f\",[],\"Provider\",1]\n5:I[\"cee5ba48fc65\",[],\"Head\",1]\n6:I[\"597892daae52\",[],\"Main\",1]\n7:I[\"12286b5f5de7\",[],\"Link\",1]\n8:I[\"1259fba561d3\",[],\"CodeGroup\",1]\n1a:I[\"2ebf132deb85\",[],\"CopyButton\",1]\n1b:I[\"2ebf132deb85\",[],\"ShellLineCopyButtons\",1]\n1c:I[\"0f0e46503fda\",[],\"CollapseHandler\",1]\n1d:I[\"842d15d12800\",[],\"FoldHandler\",1]\n1e:I[\"9911cea834d5\",[],\"Root_client\",1]\n1f:I[\"30bf6e1d1951\",[],\"ScrollRestoration\",1]\n:HL[\"/assets/index-xG7LXTGW.css\",\"stylesheet\"]\n:HL[\"/assets/_root-DFMI9o3Y.css\",\"stylesheet\"]\n:HL[\"/assets/vocs-group-icons-0d967a23f5e5.css\",\"stylesheet\"]\n0:{\"root\":\"$L1\",\"route:/docs/getting-started\":[\"$\",\"$L2\",null,{\"id\":\"layout:/\",\"children\":[\"$\",\"$L2\",null,{\"id\":\"page:/docs/getting-started\"}]}],\"ETAG:route:/docs/getting-started\":1,\"layout:/\":[[\"$\",\"script\",null,{\"src\":\"https://cdn.usefathom.com/script.js\",\"data-site\":\"BYCJMNBD\",\"defer\":true}],[\"$\",\"$L3\",null,{}]],\"ETAG:layout:/\":1,\"page:/docs/getting-started\":[\"$\",\"$L4\",null,{\"frontmatter\":{\"title\":\"Getting Started\",\"description\":\"Get started with viem in just a few lines of code.\",\"lastModified\":\"2026-09-29T14:06:55-04:00\",\"filePath\":\"docs/getting-started.mdx\"},\"children\":[[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{\"children\":[[\"$\",\"hgroup\",null,{\"data-v\":\"\",\"children\":[[\"$\",\"h1\",null,{\"data-v\":\"\",\"id\":\"getting-started\",\"children\":\"Getting Started\"}],[\"$\",\"p\",null,{\"data-v\":\"\",\"children\":\"Get started with viem in just a few lines of code.\"}]]}],\"\\n\",[\"$\",\"h2\",null,{\"data-v\":\"\",\"id\":\"overview\",\"children\":[\"Overview\",[\"$\",\"$L7\",null,{\"aria-label\":\"Copy link and go to this section\",\"className\":\"heading-anchor\",\"title\":\"Copy link and go to this section\",\"href\":\"/docs/getting-started#overview\",\"children\":[\"$\",\"svg\",null,{\"className\":\"heading-anchor-icon\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"0.75em\",\"height\":\"0.75em\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"}],[\"$\",\"path\",null,{\"d\":\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"}]]}],\"data-v-link\":true,\"data-v\":true,\"to\":\"/docs/getting-started#overview\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"data-v\":\"\",\"children\":\"viem is a TypeScript interface for Ethereum that provides low-level stateless primitives for interacting with Ethereum. viem is focused on developer experience, stability, bundle size, and performance:\"}],\"\\n\",[\"$\",\"ul\",null,{\"data-v\":\"\",\"children\":[\"\\n\",[\"$\",\"li\",null,{\"data-v\":\"\",\"children\":[[\"$\",\"strong\",null,{\"data-v\":\"\",\"children\":\"Developer experience\"}],\" Automatic \",[\"$\",\"$L7\",null,{\"href\":\"/docs/typescript\",\"data-v\":true,\"children\":\"type safety and inference\",\"data-v-link\":true,\"to\":\"/docs/typescript\"}],\", comprehensive documentation, composable APIs.\"]}],\"\\n\",[\"$\",\"li\",null,{\"data-v\":\"\",\"children\":[[\"$\",\"strong\",null,{\"data-v\":\"\",\"children\":\"Stability\"}],\" Test suite runs against forked Ethereum networks, complete \",[\"$\",\"$L7\",null,{\"href\":\"https://app.codecov.io/gh/wevm/viem\",\"data-v\":true,\"children\":\"test coverage\",\"data-v-link\":true,\"to\":\"https://app.codecov.io/gh/wevm/viem\"}],\".\"]}],\"\\n\",[\"$\",\"li\",null,{\"data-v\":\"\",\"children\":[[\"$\",\"strong\",null,{\"data-v\":\"\",\"children\":\"Bundle size\"}],\" Tree-shakable lightweight modules.\"]}],\"\\n\",[\"$\",\"li\",null,{\"data-v\":\"\",\"children\":[[\"$\",\"strong\",null,{\"data-v\":\"\",\"children\":\"Performance\"}],\" Optimized encoding/parsing, async tasks only when necessary.\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"data-v\":\"\",\"children\":[\"You can learn more about the rationale behind the project in the \",[\"$\",\"$L7\",null,{\"href\":\"/docs/introduction\",\"data-v\":true,\"children\":\"Why viem\",\"data-v-link\":true,\"to\":\"/docs/introduction\"}],\" section.\"]}],\"\\n\",[\"$\",\"h2\",null,{\"data-v\":\"\",\"id\":\"installation\",\"children\":[\"Installation\",[\"$\",\"$L7\",null,{\"aria-label\":\"Copy link and go to this section\",\"className\":\"heading-anchor\",\"title\":\"Copy link and go to this section\",\"href\":\"/docs/getting-started#installation\",\"children\":[\"$\",\"svg\",null,{\"className\":\"heading-anchor-icon\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"0.75em\",\"height\"
48:\"0.75em\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"}],[\"$\",\"path\",null,{\"d\":\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"}]]}],\"data-v-link\":true,\"data-v\":true,\"to\":\"/docs/getting-started#installation\"}]]}],\"\\n\",[\"$\",\"$L8\",null,{\"data-v-code-group\":\"\",\"data-v\":\"\",\"children\":[[\"$\",\"div\",null,{\"data-v-code-group-item\":\"\",\"data-title\":\"npm\",\"data-v\":\"\",\"children\":[\"$\",\"div\",null,{\"data-v-code-container\":true,\"children\":[[\"$\",\"div\",null,{\"data-v-code-header\":true,\"children\":[\"$\",\"span\",null,{\"data-v-code-title\":true,\"data-title\":\"npm\",\"children\":\"npm\"}]}],[\"$\",\"pre\",null,{\"className\":\"shiki shiki-themes github-light github-dark-dimmed vocs:relative vocs:group/code vocs:rounded-t-none vocs:border-t-0\",\"tabIndex\":\"0\",\"data-v-shell\":\"\",\"data-title\":\"npm\",\"data-v-lang\":\"bash\",\"children\":[\"$L9\",false,\"$La\",\"$Lb\",\"$Lc\",\"$Ld\"],\"data-v\":true}]]}]}],\"$Le\",\"$Lf\"]}],\"\\n\",\"$L10\",\"\\n\",\"$L11\",\"\\n\",\"$L12\",\"\\n\",\"$L13\",\"\\n\",\"$L14\",\"\\n\",\"$L15\",\"\\n\",\"$L16\",\"\\n\",\"$L17\",\"\\n\",\"$L18\",\"\\n\",\"$L19\"]}]]}],\"ETAG:page:/docs/getting-started\":1,\"ROUTE\":[\"/docs/getting-started\",\"\"],\"IS_STATIC\":false,\"HAS404\":true,\"_buildId\":\"wMDQnA77\"}\n9:[\"$\",\"code\",null,{\"data-language\":\"bash\",\"children\":[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #F69D50)\",\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#F69D50\"},\"children\":\"npm\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" i\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" viem\"}]]}],\"data-v\":true}]\na:[\"$\",\"$L1a\",null,{}]\nb:[\"$\",\"$L1b\",null,{}]\nc:[\"$\",\"$L1c\",null,{}]\nd:[\"$\",\"$L1d\",null,{}]\ne:[\"$\",\"div\",null,{\"data-v-code-group-item\":\"\",\"data-title\":\"pnpm\",\"data-v\":\"\",\"children\":[\"$\",\"div\",null,{\"data-v-code-container\":true,\"children\":[[\"$\",\"div\",null,{\"data-v-code-header\":true,\"children\":[\"$\",\"span\",null,{\"data-v-code-title\":true,\"data-title\":\"pnpm\",\"children\":\"pnpm\"}]}],[\"$\",\"pre\",null,{\"className\":\"shiki shiki-themes github-light github-dark-dimmed vocs:relative vocs:group/code vocs:rounded-t-none vocs:border-t-0\",\"tabIndex\":\"0\",\"data-v-shell\":\"\",\"data-title\":\"pnpm\",\"data-v-lang\":\"bash\",\"children\":[[\"$\",\"code\",null,{\"data-language\":\"bash\",\"children\":[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #F69D50)\",\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#F69D50\"},\"children\":\"pnpm\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" i\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" viem\"}]]}],\"data-v\":true}],false,[\"$\",\"$L1a\",null,{}],[\"$\",\"$L1b\",null,{}],[\"$\",\"$L1c\",null,{}],[\"$\",\"$L1d\",null,{}]],\"data-v\":true}]]}]}]\nf:[\"$\",\"div\",null,{\"data-v-code-group-item\":\"\",\"data-title\":\"bun\",\"data-v\":\"\",\"children\":[\"$\",\"div\",null,{\"data-v-code-container\":true,\"children\":[[\"$\",\"div\",null,{\"data-v-code-header\":true,\"children\":[\"$\",\"span\",null,{\"data-v-code-title\":true,\"data-title\":\"bun\",\"children\":\"bun\"}]}],[\"$\",\"pre\",null,{\"className\":\"shiki shiki-themes github-light github-dark-dimmed vocs:relative vocs:group/code vocs:rounded-t-none vocs:border-t-0\",\"tabIndex\":\"0\",\"data-v-shell\":\"\",\"data-title\":\"bun\",\"data-v-lang\":\"bash\",\"children\":[[\"$\",\"code\",null,{\"data-language\":\"bash\",\"children\":[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #F69D50)\",\"--shiki-light\"
48:\"#6F42C1\",\"--shiki-dark\":\"#F69D50\"},\"children\":\"bun\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" i\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" viem\"}]]}],\"data-v\":true}],false,[\"$\",\"$L1a\",null,{}],[\"$\",\"$L1b\",null,{}],[\"$\",\"$L1c\",null,{}],[\"$\",\"$L1d\",null,{}]],\"data-v\":true}]]}]}]\n10:[\"$\",\"h2\",null,{\"data-v\":\"\",\"id\":\"quick-start\",\"children\":[\"Quick Start\",[\"$\",\"$L7\",null,{\"aria-label\":\"Copy link and go to this section\",\"className\":\"heading-anchor\",\"title\":\"Copy link and go to this section\",\"href\":\"/docs/getting-started#quick-start\",\"children\":[\"$\",\"svg\",null,{\"className\":\"heading-anchor-icon\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"0.75em\",\"height\":\"0.75em\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"}],[\"$\",\"path\",null,{\"d\":\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"}]]}],\"data-v-link\":true,\"data-v\":true,\"to\":\"/docs/getting-started#quick-start\"}]]}]\n11:[\"$\",\"h3\",null,{\"data-v\":\"\",\"id\":\"1-set-up-your-client--transport\",\"children\":[\"1. Set up your Client & Transport\",[\"$\",\"$L7\",null,{\"aria-label\":\"Copy link and go to this section\",\"className\":\"heading-anchor\",\"title\":\"Copy link and go to this section\",\"href\":\"/docs/getting-started#1-set-up-your-client--transport\",\"children\":[\"$\",\"svg\",null,{\"className\":\"heading-anchor-icon\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"0.75em\",\"height\":\"0.75em\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"}],[\"$\",\"path\",null,{\"d\":\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"}]]}],\"data-v-link\":true,\"data-v\":true,\"to\":\"/docs/getting-started#1-set-up-your-client--transport\"}]]}]\n12:[\"$\",\"p\",null,{\"data-v\":\"\",\"children\":[\"Firstly, set up your \",[\"$\",\"$L7\",null,{\"href\":\"/docs/clients/intro\",\"data-v\":true,\"children\":\"Client\",\"data-v-link\":true,\"to\":\"/docs/clients/intro\"}],\" with a desired \",[\"$\",\"$L7\",null,{\"href\":\"/docs/clients/intro\",\"data-v\":true,\"children\":\"Transport\",\"data-v-link\":true,\"to\":\"/docs/clients/intro\"}],\" & \",[\"$\",\"$L7\",null,{\"href\":\"/docs/chains/introduction\",\"data-v\":true,\"children\":\"Chain\",\"data-v-link\":true,\"to\":\"/docs/chains/introduction\"}],\".\"]}]\n13:[\"$\",\"div\",null,{\"data-v-code-container\":true,\"children\":[\"$undefined\",[\"$\",\"pre\",null,{\"className\":\"shiki shiki-themes github-light github-dark-dimmed has-focused twoslash lsp vocs:relative vocs:group/code\",\"tabIndex\":\"0\",\"children\":[[\"$\",\"code\",null,{\"data-language\":\"ts\",\"children\":[[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"import\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" { createPublicClient, http } \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"from\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" 'viem'\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\"
48:\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"import\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" { mainnet } \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"from\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" 'viem/chains'\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"data-empty-line\":true,\"children\":\" \"}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line focused\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"const\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#005CC5, #6CB6FF)\",\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#6CB6FF\"},\"children\":\" client\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\" =\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #DCBDFB)\",\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#DCBDFB\"},\"children\":\" createPublicClient\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\"({ \"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line focused\",\"children\":[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" chain: mainnet, \"}]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line focused\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" transport: \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #DCBDFB)\",\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#DCBDFB\"},\"children\":\"http\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\"(), \"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line focused\",\"children\":[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\"}) \"}]}]],\"data-v\":true}],false,[\"$\",\"$L1a\",null,{}],false,[\"$\",\"$L1c\",null,{}],[\"$\",\"$L1d\",null,{}]],\"data-v\":true}]]}]\n14:[\"$\",\"aside\",null,{\"data-v-callout\":true,\"data-v-context\":\"info\",\"data-v\":true,\"data-v-content\":true,\"children\":[[\"$\",\"div\",null,{\"data-v-callout-icon\":true,\"children\":[null,[\"$\",\"svg\",null,{\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"1em\",\"height\":\"1em\",\"viewBox\":\"0 0 24 24\",\"children\":[null,[\"$\",\"g\",null,{\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"strokeWidth\":2,\"children\":[[\"$\",\"circle\",null,{\"cx\":12,\"cy\":12,\"r\":10}],[\"$\",\"path\",null,{\"d\":\"M12 16v-4m0-4h.01\"}]]}]]}],null,null,null,null]}],[\"$\",\"p\",null,{\"data-v\":\"\",\"children\":[\"In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Infura, thirdweb, etc). If no URL is provided, viem will default to a public RPC provider. \",[\"$\",\"$L7\",null,{\"href\":\"/docs/clients/transports/http#usage\",\"data-v\":true,\"children\":\"Read more\",\"data-v-link\":true,\"to\":\"/docs/clients/transports/http#usage\"}],\".\"]}]]}]\n15:[\"$\",\"h3\",null,{\"data-v\":\"\",\"id\":\"2-consume-actions\",\"children\":[\"2. Consume Actions\",[\"$\",\"$L7\",null,{\"aria-label\":\"Copy link and go to this section\",\"className\":\"heading-anchor\",\"title\":\"Copy link and go to this section\",\"href\":\"/docs/getting-started#2-consume-actions\",\"children\":[\"$\",\"svg\",null,{\"className\":\"heading-anchor-icon\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"0.75em\",\"height\"
48:\"0.75em\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"}],[\"$\",\"path\",null,{\"d\":\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"}]]}],\"data-v-link\":true,\"data-v\":true,\"to\":\"/docs/getting-started#2-consume-actions\"}]]}]\n16:[\"$\",\"p\",null,{\"data-v\":\"\",\"children\":[\"Now that you have a Client set up, you can now interact with Ethereum and consume \",[\"$\",\"$L7\",null,{\"href\":\"/docs/actions/public/introduction\",\"data-v\":true,\"children\":\"Actions\",\"data-v-link\":true,\"to\":\"/docs/actions/public/introduction\"}],\"!\"]}]\n17:[\"$\",\"div\",null,{\"data-v-code-container\":true,\"children\":[\"$undefined\",[\"$\",\"pre\",null,{\"className\":\"shiki shiki-themes github-light github-dark-dimmed has-focused twoslash lsp vocs:relative vocs:group/code\",\"tabIndex\":\"0\",\"children\":[[\"$\",\"code\",null,{\"data-language\":\"ts\",\"children\":[[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"import\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" { createPublicClient, http } \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"from\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" 'viem'\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"import\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" { mainnet } \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"from\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#032F62, #96D0FF)\",\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#96D0FF\"},\"children\":\" 'viem/chains'\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"data-empty-line\":true,\"children\":\" \"}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"const\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#005CC5, #6CB6FF)\",\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#6CB6FF\"},\"children\":\" client\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\" =\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #DCBDFB)\",\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#DCBDFB\"},\"children\":\" createPublicClient\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\"({\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" chain: mainnet,\"}]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" transport: \"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #DCBDFB)\",\"--shiki-light\"
48:\"#6F42C1\",\"--shiki-dark\":\"#DCBDFB\"},\"children\":\"http\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\"(),\"}]]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"children\":[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\"})\"}]}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line\",\"data-empty-line\":true,\"children\":\" \"}],\"\\n\",[\"$\",\"span\",null,{\"className\":\"line focused\",\"children\":[[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\"const\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#005CC5, #6CB6FF)\",\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#6CB6FF\"},\"children\":\" blockNumber\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\" =\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#D73A49, #F47067)\",\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F47067\"},\"children\":\" await\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\" client.\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#6F42C1, #DCBDFB)\",\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#DCBDFB\"},\"children\":\"getBlockNumber\"}],[\"$\",\"span\",null,{\"style\":{\"color\":\"light-dark(#24292E, #ADBAC7)\",\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#ADBAC7\"},\"children\":\"() \"}]]}]],\"data-v\":true}],false,[\"$\",\"$L1a\",null,{}],false,[\"$\",\"$L1c\",null,{}],[\"$\",\"$L1d\",null,{}]],\"data-v\":true}]]}]\n18:[\"$\",\"h2\",null,{\"data-v\":\"\",\"id\":\"live-example\",\"children\":[\"Live example\",[\"$\",\"$L7\",null,{\"aria-label\":\"Copy link and go to this section\",\"className\":\"heading-anchor\",\"title\":\"Copy link and go to this section\",\"href\":\"/docs/getting-started#live-example\",\"children\":[\"$\",\"svg\",null,{\"className\":\"heading-anchor-icon\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"width\":\"0.75em\",\"height\":\"0.75em\",\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"stroke\":\"currentColor\",\"strokeWidth\":\"2\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"children\":[[\"$\",\"path\",null,{\"d\":\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"}],[\"$\",\"path\",null,{\"d\":\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"}]]}],\"data-v-link\":true,\"data-v\":true,\"to\":\"/docs/getting-started#live-example\"}]]}]\n19:[\"$\",\"iframe\",null,{\"className\":\"mt-6\",\"width\":\"100%\",\"height\":\"600px\",\"frameBorder\":\"0\",\"src\":\"https://stackblitz.com/edit/viem-getting-started?embed=1&file=index.ts&hideNavigation=1&hideDevTools=true&terminalHeight=1&hideExplorer=1&devtoolsheight=1&ctl=1\"}]\n1:[\"$\",\"html\",null,{\"data-vocs\":true,\"lang\":\"en\",\"style\":{\"colorScheme\":\"light dark\",\"--vocs-color-accent\":\"light-dark(#ff9318, #ffc517)\"},\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"stylesheet\",\"href\":\"/assets/index-xG7LXTGW.css\"}],[\"$\",\"link\",null,{\"rel\":\"stylesheet\",\"href\":\"/assets/_root-DFMI9o3Y.css\"}],[\"$\",\"link\",null,{\"rel\":\"stylesheet\",\"href\":\"/assets/vocs-group-icons-0d967a23f5e5.css\"}],[\"$\",\"$L5\",null,{\"includeJsonLd\":false}]]}],[\"$\",\"body\",null,{\"data-version\":\"1.0\",\"children\":[[\"$\",\"$L1e\",null,{\"children\":[\"$\",\"$L3\",null,{}]}],[\"$\",\"$L1f\",null,{}]]}]]}]\n")</script>
48</body></html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.