Blockstream Enterprise
ReferenceAPI ReferenceAmp

Sign Amp

Sign Amp.

Request

AmpSignRequest
interface AmpSignRequest {
  action: 'add'
  resource: string
  details: {
    pset: string
  }
}

Prop

Type

Response

AmpSignResponse_success
interface AmpSignResponse_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

AmpSignResponse_failed | pending | unauthorized | rejected
interface AmpSignResponse_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.sign
>(
  {
    action: 'add',
    resource: '/sign',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page