Blockstream Enterprise
ReferenceAPI ReferenceAssets

Get Asset Restrictions Assets

Get Asset Restrictions Assets.

Request

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

Prop

Type

Response

AssetsGetAssetRestrictionsResponse_success
interface AssetsGetAssetRestrictionsResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    whitelist: string[]
    can_burn: boolean
    wid: string | undefined
  } []
  metadata: unknown
}

Prop

Type

AssetsGetAssetRestrictionsResponse_failed | pending | unauthorized | rejected
interface AssetsGetAssetRestrictionsResponse_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 { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof resourceSchema.shape.assets.shape.getAssetRestrictions
>(
  {
    action: 'get',
    resource: '/assets/{aid}/restrictions',
  },
  blockstream,
)

On this page