Blockstream Enterprise
ReferenceAPI ReferenceAmp

Get Asset Details Amp

Get Asset Details Amp.

Request

AmpGetAssetDetailsRequest
interface AmpGetAssetDetailsRequest {
  action: 'get'
  resource: string
}

Prop

Type

Response

AmpGetAssetDetailsResponse_success
interface AmpGetAssetDetailsResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    asset_id: string
    issuer: string
    name: string
    contract: {
      name: string
      ticker: string
      entity: {
        domain: string
      }
      precision: number
      version: number
      issuer_pubkey: string
    }
    notes: unknown | undefined
    locked: boolean
    reissuance_token_id: string | undefined
    reissuance_token_locked: boolean
  }
  metadata: unknown
}

Prop

Type

AmpGetAssetDetailsResponse_failed | pending | unauthorized | rejected
interface AmpGetAssetDetailsResponse_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-js-sdk'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof AmpActionsSchema.shape.getAssetDetails
>(
  {
    action: 'get',
    resource: '/amp/assets/{assetId}',
  },
  blockstream,
)

On this page