Issuer Guide (SDK)
Monitoring
AMP2 provides SDK operations for asset state, wallet balances, transaction history, and restriction policies. Use monitoring data for reconciliation, dashboards, and alerting.
AMP2 provides SDK operations for tracking asset state, wallet balances, transaction history, and restriction policies. Use these for reconciliation, dashboards, and operational alerting.
Pagination
All list endpoints accept offset and limit parameters and return a total_count field. The default limit is 20. See the Pagination section in the SDK reference for the full list of paginated endpoints.
const assetsPage = await broadcastRequest<
typeof AmpActions.listAssets
>({
action: 'get',
resource: '/amp/assets',
details: { offset: 0, limit: 50 },
}, broadcaster);
console.log(`Showing ${assetsPage.details.assets.length} of ${assetsPage.details.total_count}`);Example: fetch restrictions
import { AmpActions } from '@blockstream/amp-registry';
const restrictionsResult = await broadcastRequest<
typeof AmpActions.getAssetRestrictionsV2
>({
action: 'get',
resource: `/amp/assets/v2/${assetId}/restrictions`,
}, broadcaster);
if (restrictionsResult.status !== 'success') {
throw new Error('Failed to get asset restrictions');
}
console.log('Restriction groups:', restrictionsResult.details);Example: check unconfirmed transactions
const unconfirmedTxs = await broadcastRequest<
typeof AmpActions.listAssetUnconfirmedTxs
>({
action: 'get',
resource: `/amp/assets/${assetId}/txs/unconfirmed`,
}, broadcaster);Suggested observability fields
Include these fields in your logging and monitoring systems for full traceability:
| Field | Source | Purpose |
|---|---|---|
| Request ID | Your application | Correlate request/response pairs |
| Issuer username | SDK / device context | Identify the acting user |
| Device UUID | Invite data | Identify the device |
| Asset ID | Operation parameter | Track which asset was affected |
| Wallet ID (WID) | Operation parameter | Track which wallet was affected |
| Transaction ID | Broadcast response | Link to on chain transaction |
| Confirmation status | /txs or /txs/unconfirmed | Track settlement state |
| Error code | Response payload | Diagnose failures |
| Policy rejection reason | Cosign response | Debug restriction violations |
Next steps
- Best Practices: operational recommendations
- Architecture: infrastructure components