rice.gift

For builders

Drop purpose-bound gifting into checkout — or give an agent a budget it can't overspend.

rice.gift is one primitive for two surfaces: ecommerce gifting and agentic commerce. Spend scope and allow-lists are enforced on-chain, so the rules hold no matter who's spending.

What you get

  • One integration for both human checkout and agent-driven spend.
  • On-chain guardrails — spend scope and merchant allow-lists are part of the asset, not your app logic.
  • Sui-native rails — Seal-encrypted codes, sponsored gas (Enoki), and zkLogin onboarding out of the box.

The two rails

Gift voucher — payment channel

USDC escrowed in a merchant's vault opens a Spilman channel; the holder spends in local currency via off-chain signed micro-spends, and the merchant batch-settles on-chain. Closed-loop.

Gift code — Seal-encrypted

A USDC-backed code encrypted with Seal so only the owner can unseal it. Reveal and redeem are separate; redeem releases the full backing to the brand.

Agentic commerce

Give an AI agent a scoped, capped gift instead of raw keys. It can spend only at the merchant you allow, up to the amount funded — enforced on-chain at redemption, so a misbehaving agent can't overspend or cash out.

// Illustrative: issue a merchant-scoped gift for an agent to spend.
const gift = await riceGift.issue({
  rail: "voucher",
  merchant: "mercury-drug",
  amountLocal: 580,         // PHP the recipient receives
  fundedWith: "USDC",       // you pay in stablecoin
  recipient: agentAddress,  // a zkLogin / agent identity
});
// The agent can redeem at `mercury-drug` only — never elsewhere, never as cash.

Closed-loop by design

There is no function that pays a holder arbitrary cash. The only exits are redeem → the scoped merchant, or refund → the original funder. Build on that guarantee instead of re-implementing it.

Onboarding & gas

  • zkLogin turns a social login into a Sui address — no seed phrase for your users.
  • Sponsored gas (Enoki) means recipients never need to hold SUI to open or spend a gift.

Live on Sui testnet

Two Move packages (Move 2024) back the rails:

  • gift_channel_voucher0x322f44ebc2b3e4badfda911c84ce03673695dc049d07983e4727eafdc984893a
  • gift_channel_code0xd1fe1bf83150d0cf109bba63e4c8cf7bbd70aa1502861f088e73d17e5e4ecb98

Backed by native testnet USDC; code decryption uses Mysten Seal key servers.

On this page