Blockstream Enterprise
ReferenceAPI ReferencePsets

Get Psets

Get Psets.

Request

PsetsGetRequest
interface PsetsGetRequest {
  action: 'get'
  resource: string
  details?: {} | undefined
}

Prop

Type

Response

PsetsGetResponse_success
interface PsetsGetResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    id: string
    spend_request_ids: string[]
    version: number
    pset: string
    status: string
    txid: string | undefined
    created_at: number
    updated_at: number
  }
  metadata: unknown
}

Prop

Type

PsetsGetResponse_failed | pending | unauthorized | rejected
interface PsetsGetResponse_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.psets.shape.get
>(
  {
    action: 'get',
    resource: '/psets/{id}',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page