Blockstream Enterprise
ReferenceAPI ReferenceUsers

Edit Device Users

Edit Device Users.

Request

UsersEditDeviceRequest
interface UsersEditDeviceRequest {
  action: 'edit'
  resource: string
  details: {
    ecdsa_pubkey: string
    rsa_pubkey: string
  }
}

Prop

Type

Response

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

Prop

Type

UsersEditDeviceResponse_pending
interface UsersEditDeviceResponse_pending {
  status: 'pending'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    proposal_id: string
  }
}

Prop

Type

UsersEditDeviceResponse_failed | unauthorized | rejected
interface UsersEditDeviceResponse_failed | unauthorized | rejected {
  status: 'failed' | '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.users.shape.edit-device
>(
  {
    action: 'edit',
    resource: '/users/{uid}/devices/{did}',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page