Blockstream Enterprise
ReferenceAPI ReferenceAmp

Unlock Asset Amp

Unlock Asset Amp.

Request

AmpUnlockAssetRequest
interface AmpUnlockAssetRequest {
  action: 'edit'
  resource: string
}

Prop

Type

Response

AmpUnlockAssetResponse_success
interface AmpUnlockAssetResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    pset: string
  }
  metadata: unknown
}

Prop

Type

AmpUnlockAssetResponse_failed | pending | unauthorized | rejected
interface AmpUnlockAssetResponse_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.unlockAsset
>(
  {
    action: 'edit',
    resource: '/amp/assets/{assetId}/unlock',
  },
  blockstream,
)

On this page