Blockstream Enterprise Custody SDK
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:

FieldSourcePurpose
Request IDYour applicationCorrelate request/response pairs
Issuer usernameSDK / device contextIdentify the acting user
Device UUIDInvite dataIdentify the device
Asset IDOperation parameterTrack which asset was affected
Wallet ID (WID)Operation parameterTrack which wallet was affected
Transaction IDBroadcast responseLink to on chain transaction
Confirmation status/txs or /txs/unconfirmedTrack settlement state
Error codeResponse payloadDiagnose failures
Policy rejection reasonCosign responseDebug restriction violations

Next steps

On this page