Blockstream Enterprise
ReferenceAPI ReferenceAmp

Get Asset Restrictions V2 Amp

Get Asset Restrictions V2 Amp.

Request

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

Prop

Type

Response

AmpGetAssetRestrictionsV2Response_success
interface AmpGetAssetRestrictionsV2Response_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    group_type: 'multiple'
    group_id: string
    use_to_whitelist: boolean
    to_whitelist: string[]
    can_burn: boolean
    wids: string[]
  } | { group_type: 'single'; group_id: string; use_to_whitelist: boolean; to_whitelist: string[]; can_burn: boolean; wid: string }[]
  metadata: unknown
}

Prop

Type

AmpGetAssetRestrictionsV2Response_failed | pending | unauthorized | rejected
interface AmpGetAssetRestrictionsV2Response_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.getAssetRestrictionsV2
>(
  {
    action: 'get',
    resource: '/amp/assets/v2/{aid}/restrictions',
  },
  blockstream,
)

On this page