Blockstream Enterprise
ReferenceAPI ReferenceAmp

List Asset Utxos Amp

List Asset Utxos Amp.

Request

AmpListAssetUtxosRequest
interface AmpListAssetUtxosRequest {
  action: 'get'
  resource: string
  details?: {
    limit: number | undefined
    offset: number | undefined
    sort_by: 'created_at' | undefined
    sort: 'asc' | 'desc' | undefined
  } | undefined
}

Prop

Type

Response

AmpListAssetUtxosResponse_success
interface AmpListAssetUtxosResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    txid: string
    vout: number
    wid: string
    aid: string
    satoshi: number
    locked: boolean
  } []
  metadata: {
    total_count: number
  }
}

Prop

Type

AmpListAssetUtxosResponse_failed | pending | unauthorized | rejected
interface AmpListAssetUtxosResponse_failed | pending | unauthorized | rejected {
  status: 'failed' | 'pending' | 'unauthorized' | 'rejected'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
}

Prop

Type

Example

Example
import { AmpActionsSchema } from '@blockstream/amp-registry'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof AmpActionsSchema.shape.listAssetUtxos
>(
  {
    action: 'get',
    resource: '/amp/assets/${assetId}/utxos',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page