Ordinals Marketplace
List, buy, send, and cancel ordinals with @1sat/actions (OrdLock).
Actions (id-first)
| Action | Description |
|---|---|
listOrdinals |
List wallet ordinals (metadata/tags default; optional BEEF) |
sendOrdinals |
Send ordinals (id per transfer, or pre-loaded row) |
sellOrdinal |
Put on market ({ id, price, payAddress? }) |
cancelOrdinalListing |
Cancel listing ({ id }) |
buyOrdinal |
Buy external listing ({ outpoint, inputBEEF? }) |
burnOrdinals |
Burn ({ ids } or pre-loaded rows) |
BEEF rules
- Wallet-owned spend: pass
idonly — action loads row + BEEF from the1satbasket. - External (buy):
outpoint+inputBEEFif set; else services fetch; else error.
List
import { listOrdinals, createContext } from '@1sat/actions'
const ctx = createContext(wallet, { services })
const { outputs } = await listOrdinals.execute(ctx, { limit: 100 })
for (const o of outputs) {
const id = o.tags?.find((t) => t.startsWith('id:'))?.slice(3)
console.log(id, o.outpoint, o.tags)
}
Send
import { sendOrdinals } from '@1sat/actions'
await sendOrdinals.execute(ctx, {
transfers: [{ id, counterparty: '02abc...' }],
})
await sendOrdinals.execute(ctx, {
transfers: [{ id, address: '1Recipient...' }],
})
Self-sends carry tags and stay in the 1sat basket (no resolveOrdinalTags for owned filing).
Sell
import { sellOrdinal } from '@1sat/actions'
// payAddress optional — default P1SAT keyID `1sat 0`
await sellOrdinal.execute(ctx, { id, price: 100_000 })
Adds ordlock + price:{n} tags; keeps the 1sat basket.
Buy
import { buyOrdinal } from '@1sat/actions'
await buyOrdinal.execute(ctx, {
outpoint: 'txid_0',
// inputBEEF?: number[]
marketplaceAddress: '1Market...', // optional
marketplaceRate: 0.02,
})
Cancel
import { cancelOrdinalListing } from '@1sat/actions'
await cancelOrdinalListing.execute(ctx, { id })
Burn
import { burnOrdinals } from '@1sat/actions'
await burnOrdinals.execute(ctx, { ids: [id] })
Tags
| Tag | Meaning |
|---|---|
id:{…} |
Tracking id |
ordlock |
Listed |
price:{n} |
List price (sats) |
type:{contentType} |
MIME |
origin:{outpoint} |
Origin |
name:{value} |
MAP name |
Requirements
bun add @1sat/actions @1sat/wallet @bsv/sdk