Next Act JavaScript / TypeScript SDK Quickstart
The Next Act SDK is split into two security domains: a browser-side Solana payment layer and a server-side Next Act API layer.
Browser
@verseos/solana
wallet signs payment
↓ signature
Your server
@verseos/sdk
vos_live_... API key
↓
Next Act /v1Install the server SDK
After building and packing the SDK workspace, install the generated tarball into your server project:
npm install C:\path\to\verseos-sdk-0.1.1.tgzCreate a Next Act client
import { VerseOS } from '@verseos/sdk';
const nextAct = new VerseOS({
apiKey: process.env.NEXT_ACT_API_KEY!,
baseUrl: 'https://nextact.fun',
});Set your private-beta API key in PowerShell:
$env:NEXT_ACT_API_KEY = "vos_live_YOUR_TEST_KEY"For local development, use:
baseUrl: 'http://localhost:3000'Discover assets
const assets = await nextAct.assets.list({
verification_status: 'verified',
licensable: true,
});
console.dir(assets, { depth: null });Useful discovery methods:
await nextAct.assets.list({
type: 'character',
verification_status: 'verified',
licensable: true,
});
await nextAct.rights.list({
medium: 'game',
max_price_usdc: 1000,
});Read one asset's rights
const offers = await nextAct.assets.rights(
'VRS-C9A739A09131'
);Or inspect one right directly:
const right = await nextAct.rights.get(
'RGT-794B30A19A22'
);Create a license intent
const intent = await nextAct.licenses.createIntent(
'RGT-794B30A19A22'
);
console.dir(intent, { depth: null });The current standard checkout snapshots the exact USDC settlement plan for the license.
Next Act applies the 2.5% platform fee first, then distributes the remaining 97.5% net proceeds according to the revenue split configured on the right.
A right may pay one creator or multiple collaborators.
Pay in the browser
Install the browser-side helper package generated from the SDK workspace:
npm install C:\path\to\verseos-solana-0.1.1.tgzThen use the connected wallet signer and your existing Solana client:
import { payLicenseIntent } from '@verseos/solana';
const payment = await payLicenseIntent({
client,
signer: connectedWallet.signer,
usdcMint: process.env.NEXT_PUBLIC_USDC_MINT!,
intent,
});
console.log(payment.signature);@verseos/solana:
- constructs the required collaborator/creator USDC transfers from the intent snapshot
- constructs the Next Act platform-fee transfer
- creates recipient ATAs if needed
- submits the transfers in one Solana transaction through the connected wallet
- returns the Solana signature
- does not contain a Next Act API key
- does not independently issue the Next Act license
Verify payment on your server
Send the signature back to your server, then call:
const result = await nextAct.payments.verify({
signature: payment.signature,
licenseIntentId: intent.public_id,
});
console.dir(result, { depth: null });Next Act independently verifies the confirmed Solana transaction, including the expected settlement-recipient transfers and platform-fee transfer, and issues LIC-... only after the payment matches the license intent.
Retrieve the license
const license = await nextAct.licenses.get(
result.license.public_id
);Verification record
const record = await nextAct.verify.record(
'VRS-C9A739A09131'
);This can expose evidence hashes, provenance attestations, and available rights.
Supported server SDK methods
| SDK method | Endpoint |
|---|---|
nextAct.assets.list() | GET /v1/assets |
nextAct.assets.get(id) | GET /v1/assets/:id |
nextAct.assets.create(input) | POST /v1/assets |
nextAct.assets.rights(id) | GET /v1/assets/:id/rights |
nextAct.rights.list() | GET /v1/rights |
nextAct.rights.get(id) | GET /v1/rights/:id |
nextAct.licenses.createIntent(rightId) | POST /v1/license-intents |
nextAct.licenses.get(id) | GET /v1/licenses/:id |
nextAct.payments.verify(input) | POST /v1/payments/verify |
nextAct.verify.record(id) | GET /v1/verify/:id |
Private-beta warning
The server SDK methods above have been exercised successfully against the Next Act Developer API.
The separate @verseos/solana browser payment helper should still receive a dedicated external SDK end-to-end browser test before Next Act calls the entire standard external checkout path production-ready.
The first-party Next Act checkout has already exercised the generalized multi-recipient settlement path, but the packaged browser helper should be verified independently before V1 freeze.
Before V1 freeze
The remaining SDK-facing naming and contract decisions include:
- whether to publish new package names under the Next Act brand
- whether to rename the exported Next Act client class
- whether to change the
vos_live_...API-key prefix - finalizing canonical public IDs and response relation names
- normalizing error envelopes and idempotency behavior
- completing the external browser-helper end-to-end test
