Shopier

Architecture

Three programs, four agents

Shopier buys clothes on Solana. The agent has its own wallet, its own spending policy, its own keys. Every purchase runs through the policy before settling. The page below covers the programs that enforce that and the agents that run inside them.

The four agents

Your agent + the supporting cast

Styling agent

no wallet · compute only

Policy: API rate limits

Acts: Vision decompose · twin-aware fit commentary · live retailer matching

Twin agent (your agent)primary

your wallet + your digital twin · Phantom-signed

Policy: spending_policy PDA on Solana

Acts: Decisions tuned to your measurements, palette, and taste · pays USDC under the policy · auto-approves below threshold · hard-blocks above max-per-tx

Operator agent

Shopier treasury keypair

Policy: hardcoded route caps + signature verification

Acts: Activations · pay rent for new users · paymaster for onboarding bundles

Creator agent

creator's wallet

Policy: ed25519-signed look attestations · on-chain cut

Acts: Curate looks · earn 70% net affiliate · run subscription tier · attest provenance

Each agent's authority is enforced by a different Solana program.

Programs, live

Three Anchor programs on Solana devnet. The panel below pulls accounts directly from devnet RPC. Click any program ID for the explorer.

Live on-chain state

fetched 13:43:02 UTC · devnet
spending_policylive

Trust container — spending bounds, session-key delegation

2S7hJm57s4VBmBBpqe59XFFibKR9L2ykstMCm8xWreRt

balance

0.001 SOL

data

36 B

program-data

2.022 SOL

instr count

6

initializecheck_spendrecord_spendset_delegaterevoke_delegaterecord_spend_as_delegate
digital_twinlive

Privacy substrate — encrypted likeness, watch policies

Dt3SWQmsAT1vDJyPRCPgMPXi2Rg47niXDVUzo6boFBCU

balance

0.001 SOL

data

36 B

program-data

1.983 SOL

instr count

8

create_twinupdate_twindelete_twininit_pending_twincomplete_twin_encryptedupdate_twin_encryptedset_watch_policyclear_watch_policy
stylist_marketplacelive

Creator economy — signed looks + subscription splits

G5FE1NnanqQJGNCyqLnKqKonYFWVzyzoAeZ9rUtf8F5e

balance

0.001 SOL

data

36 B

program-data

1.741 SOL

instr count

5

create_stylist_profileupdate_stylist_profilesubscribeunsubscribeattest_look

These accounts are fetched from https://api.devnet.solana.comat request time. Click any program ID to verify in Solana Explorer. The instruction list reflects what's callable on the deployed binary — including the new session-key delegation (record_spend_as_delegate) and watch policy (set_watch_policy) primitives that power Shopier's 30-second auto-buy.

The 30-second auto-buy flow

Three on-chain primitives: set_watch_policy, set_delegate, and record_spend_as_delegate. The user signs each one ahead of time. When a match arrives, the agent buys without re-prompting Phantom.

1

Watch signed

set_watch_policy

User picks celebs, sets a per-look cap, picks notify or auto-buy mode. Phantom signs once. Lives in the WatchPolicy PDA on digital_twin.

2

Delegate signed

set_delegate

User authorizes an Ed25519 session keypair for N hours, max-per-tx Y. Phantom signs once. Lives in the Delegation PDA on spending_policy.

3

Auto-buy fires

record_spend_as_delegate

Match arrives. 30s cancel window. If user does nothing, the session key signs the buy — no Phantom prompt. spending_policy re-validates bounds atomically with the USDC transfer.

If our backend is compromised, max loss is the spending-policy cap. If the session key leaks, max loss is max_per_tx × N until the delegation is revoked. Both caps are checked in the program, not in our service.

Policy semantics

Off-chain components

Fulfillment bridges

Shopier's programs cover trust, identity, spending caps, and creator splits. They don't cover merchant fulfillment — Nordstrom doesn't take USDC. Two bridges fill the gap, both integrations with existing Solana-ecosystem products.

Bridge A — user-payment

USDC wallet → fiat merchant checkout

User holds USDC; merchant takes Visa/Mastercard. The bridge converts USDC to a fiat-spending instrument (virtual Visa card) at checkout.

Bridge B — revenue → creator

fiat affiliate commission → on-chain creator USDC payouts

Skimlinks pays Shopier USD wires monthly for affiliate-attributed sales. Creators are owed their cut (70/30 of net commission) in USDC. The bridge swaps fiat to USDC via Coinbase Prime or Kraken OTC and batches on-chain payouts to creator wallets.

v0 vs v1

Today: agent USDC settlement on devnet routes to a Shopier-managed merchant address. No real hoodie ships. The on-chain primitives are real; fulfillment is mocked.

v1: replace the mock with a Raenest deposit + virtual card flow for African users, or Crossmint Headless Checkout for other markets. Bridge A code path lives at src/app/api/agent/purchase/route.ts.

Open the agent →← Home
Demo build · illustrative imagery