<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>divDown</title>
        <link>https://paragraph.com/@divDown</link>
        <description>where I distill my cross domain learnings into tangible outputs.  </description>
        <lastBuildDate>Fri, 24 Apr 2026 12:04:14 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>divDown</title>
            <url>https://storage.googleapis.com/papyrus_images/41f8596a8529b5bf31a825ff260b94f9cfec5d1bc3f3060e95bf8623c1024394.jpg</url>
            <link>https://paragraph.com/@divDown</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[The Pattern Taking Over Web3 SDKs]]></title>
            <link>https://paragraph.com/@divDown/the-pattern-taking-over-web3-sdks</link>
            <guid>HqnEhCTZspFqjiB7LL7N</guid>
            <pubDate>Sun, 30 Nov 2025 14:27:19 GMT</pubDate>
            <description><![CDATA[A lot of web3 SDKs are moving from an Object based architecture to an Actions-based architecture. A change that reduces bundle size by 80%, and unlocks new possibilities. ]]></description>
            <content:encoded><![CDATA[<p>A lot of web3 SDKs are moving from an Object based architecture to an Actions-based architecture.  A change that reduces bundle size by 80%,  and unlocks new possibilities.</p><p>The main examples include <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.ethers.org/v5/">ethers</a> -&gt; <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://viem.sh/">viem</a> (evm) , <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/solana-foundation/solana-web3.js">web.js</a> -&gt; <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/anza-xyz/kit">kit</a> (solana).</p><h2 id="h-the-unlock" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">The Unlock <span data-name="key" class="emoji" data-type="emoji">🔑</span></h2><p>Separate what you have (data/client) from what you do (actions/functions). This flip enables tree-shaking that OOP prevents. For web3 libraries, that's an 80%+ bundle size reduction.</p><ul><li><p><strong>OOP</strong>: <code>client.getBalance(address)</code> - the client "has" methods</p></li><li><p><strong>Action-based</strong>: <code>getBalance(client, { address })</code> - functions take data</p></li></ul><p><strong>This inversion unlocks:</strong></p><ul><li><p>Tree-shaking (import only what you use)</p></li><li><p>Composition (wrap functions, not extend classes)</p></li><li><p>Adapters (any object with right shape works)</p></li></ul><pre data-type="codeBlock" text="// Traditional OOP
client.sendTransaction({ to, value })

// Action-based
sendTransaction(client, { to, value })
"><code><span class="hljs-comment">// Traditional OOP</span>
client<span class="hljs-selector-class">.sendTransaction</span>({ to, value })

<span class="hljs-comment">// Action-based</span>
<span class="hljs-built_in">sendTransaction</span>(client, { to, value })
</code></pre><h2 id="h-why-it-matters" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Why It Matters</h2><p><strong>Bundle size kills DApps.</strong></p><pre data-type="codeBlock" text="// Ethers (OOP)
import { Provider } from 'ethers'
// ~116KB - ALL methods bundled

// Viem (Action-based)
import { getBalance, sendTransaction } from 'viem/actions'
// ~15KB - only what you use
"><code><span class="hljs-comment">// Ethers (OOP)</span>
<span class="hljs-keyword">import</span> { <span class="hljs-title class_">Provider</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'ethers'</span>
<span class="hljs-comment">// ~116KB - ALL methods bundled</span>

<span class="hljs-comment">// Viem (Action-based)</span>
<span class="hljs-keyword">import</span> { getBalance, sendTransaction } <span class="hljs-keyword">from</span> <span class="hljs-string">'viem/actions'</span>
<span class="hljs-comment">// ~15KB - only what you use</span>
</code></pre><p><strong>80%+ reduction</strong> from architecture alone.</p><p><strong>Real impact:</strong></p><ul><li><p>Faster load times</p></li><li><p>Better developer experience</p></li><li><p>Better mobile UX</p></li></ul><h2 id="h-pattern-recognition" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Pattern Recognition</h2><p><strong>Same evolution everywhere:</strong></p><table style="min-width: 50px"><colgroup><col><col></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Ethereum</p></th><th colspan="1" rowspan="1"><p>Solana</p></th></tr><tr><td colspan="1" rowspan="1"><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.ethers.org/v5/">ethers</a> → <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://viem.sh/">viem</a></p></td><td colspan="1" rowspan="1"><p><a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/solana-foundation/solana-web3.js">@solana/web3.js</a> → <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/anza-xyz/kit">@solana/kit</a></p></td></tr><tr><td colspan="1" rowspan="1"><p>~116KB → ~35KB</p></td><td colspan="1" rowspan="1"><p>~311KB → ~226KB</p></td></tr></tbody></table><p><strong>Inspired by React too:</strong> Hooks are action-based (<code>useState(value)</code> not <code>this.state</code>)</p><h2 id="h-when-to-use-it" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">When to Use it</h2><p><strong>Good fit:</strong></p><ul><li><p>Building libraries for others</p></li><li><p>Bundle size critical (DApps)</p></li><li><p>Need extensibility (protocols)</p></li></ul><p><strong>Bad fit:</strong></p><ul><li><p>Internal tools (bundle size doesn't matter)</p></li><li><p>Team strongly prefers OOP</p></li><li><p>Need method chaining</p></li></ul><h2 id="h-origins" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Origins</h2><p>It's not a new concept, it's inspired by:</p><ul><li><p>Functional programming (Haskell, Clojure)</p></li><li><p>Systems languages (Go, Rust)</p></li><li><p>React Hooks</p></li></ul><br>]]></content:encoded>
            <author>divdown@newsletter.paragraph.com (tomiiide)</author>
            <category>eth</category>
            <category>web3</category>
            <category>solana</category>
            <category>viem</category>
            <category>oop</category>
            <category>architecture</category>
            <enclosure url="https://storage.googleapis.com/papyrus_images/58f91a8e5441bb5c7a698bd24a04d2f4063df132f382acb1b7d1f3400704065d.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>