Skip to content

Wallet Plugins

Wallet plugins are smart contracts that extend what an ARC-58 wallet can do. Each plugin provides specific capabilities and is invoked through wallet.usePlugin().

Each plugin SDK class follows a consistent pattern:

  1. Initialize the plugin SDK with an AlgorandClient
  2. Call a method on the plugin to get a transaction builder
  3. Pass it to wallet.usePlugin() which handles rekey, execution, and verification
import { WalletSDK, PayPluginSDK } from '@akta/sdk/wallet'
const wallet = new WalletSDK({ algorand })
const payPlugin = new PayPluginSDK({ algorand })
// Execute a payment through the wallet
await wallet.usePlugin({
name: 'pay',
escrow: 'my-escrow',
calls: [
payPlugin.pay({
payments: [
{ receiver: recipientAddr, amount: 1_000_000n, asset: 0n }
],
})
],
fundsRequest: [{ asset: 0n, amount: 1_000_000n }],
})

Send ALGO and ASA payments.

import { PayPluginSDK } from '@akta/sdk/wallet'
const payPlugin = new PayPluginSDK({ algorand })
// Build a payment
payPlugin.pay({
payments: [
{ receiver: 'ADDR...', amount: 1_000_000n, asset: 0n }, // 1 ALGO
{ receiver: 'ADDR...', amount: 500_000n, asset: aktaId }, // 0.5 AKTA
],
})

Opt the wallet into receiving new assets.

import { OptInPluginSDK } from '@akta/sdk/wallet'
const optinPlugin = new OptInPluginSDK({ algorand })

Create (mint) new Algorand Standard Assets.

import { AsaMintPluginSDK } from '@akta/sdk/wallet'
const mintPlugin = new AsaMintPluginSDK({ algorand })

Stake and withdraw tokens.

import { StakingPluginSDK } from '@akta/sdk/wallet'
const stakingPlugin = new StakingPluginSDK({ algorand })

Claim staking and participation rewards.

import { RewardsPluginSDK } from '@akta/sdk/wallet'
const rewardsPlugin = new RewardsPluginSDK({ algorand })

Participate in DAO governance (proposals, voting).

import { DaoPluginSDK } from '@akta/sdk/wallet'
const daoPlugin = new DaoPluginSDK({ algorand })

Social platform interactions (posts, reactions, follows).

import { SocialPluginSDK } from '@akta/sdk/wallet'
const socialPlugin = new SocialPluginSDK({ algorand })

NFT marketplace operations (list, buy, delist).

import { MarketplacePluginSDK } from '@akta/sdk/wallet'
const marketplacePlugin = new MarketplacePluginSDK({ algorand })

Token swaps via the HyperSwap system.

import { HyperSwapPluginSDK } from '@akta/sdk/wallet'
const swapPlugin = new HyperSwapPluginSDK({ algorand })

Place bids in auctions.

import { AuctionPluginSDK } from '@akta/sdk/wallet'
const auctionPlugin = new AuctionPluginSDK({ algorand })

Enter raffles.

import { RafflePluginSDK } from '@akta/sdk/wallet'
const rafflePlugin = new RafflePluginSDK({ algorand })

Vote in community polls.

import { PollPluginSDK } from '@akta/sdk/wallet'
const pollPlugin = new PollPluginSDK({ algorand })

Subscribe to services and trigger payments.

import { SubscriptionsPluginSDK } from '@akta/sdk/wallet'
const subsPlugin = new SubscriptionsPluginSDK({ algorand })

Enforce access control checks.

import { GatePluginSDK } from '@akta/sdk/wallet'
const gatePlugin = new GatePluginSDK({ algorand })

Interact with staking pools.

import { StakingPoolPluginSDK } from '@akta/sdk/wallet'
const poolPlugin = new StakingPoolPluginSDK({ algorand })

Lock equal portions of AKTA and BONES for governance voting power. Voting power decays as the unlock date approaches, rewarding ongoing commitment.

import { DualStakePluginSDK } from '@akta/sdk/wallet'
const dualStakePlugin = new DualStakePluginSDK({ algorand })

NFD (Non-Fungible Domain) operations.

import { NfdPluginSDK } from '@akta/sdk/wallet'
const nfdPlugin = new NfdPluginSDK({ algorand })

Automates daily distribution of protocol revenue from dedicated revenue sub-accounts into recipient sub-accounts (treasury, locked stakers, governance participants, moderators, etc.).

import { RevenueManagerPluginSDK } from '@akta/sdk/wallet'
const revenuePlugin = new RevenueManagerPluginSDK({ algorand })

A restricted pay plugin where you define which addresses are allowed to be paid. Useful for constraining payment destinations on sub-accounts.

import { PaySiloPluginSDK, PaySiloFactoryPluginSDK } from '@akta/sdk/wallet'
const paySiloPlugin = new PaySiloPluginSDK({ algorand })
const paySiloFactoryPlugin = new PaySiloFactoryPluginSDK({ algorand })

When installing a plugin, you can restrict which methods it can call:

await wallet.addPlugin({
client: payPlugin,
global: true,
escrow: 'my-escrow',
methods: [
{ name: payPlugin.pay, cooldown: 0n }, // Only allow the 'pay' method
],
})

The name field accepts either:

  • A plugin method reference — e.g., payPlugin.pay (returns selectors automatically)
  • Raw ABI selectorsUint8Array[] of 4-byte method selectors

Each plugin method can be called in two ways:

// Without args — returns method selectors (for plugin installation)
const selectors = payPlugin.pay()
// { appId, selectors, getTxns }
// With args — returns a transaction builder (for usePlugin)
const txnBuilder = payPlugin.pay({ payments: [...] })
// Used in wallet.usePlugin({ calls: [txnBuilder] })