Blockstream Enterprise
ReferenceAPI ReferenceWallets

Edit Wallets

Edit Wallets.

Request

WalletsEditRequest
interface WalletsEditRequest {
  action: 'edit'
  resource: string
  details: {
    name: string | undefined
    locked: boolean | undefined
  }
}

Prop

Type

Response

WalletsEditResponse_success
interface WalletsEditResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    wid: string
    id: string
    name: string | undefined
    type: 'amp' | 'kofn_multisig' | 'single_sig'
    descriptor: string
    k: number
    n: number
    locked: boolean
    address: string | undefined
    network: 'liquid' | 'bitcoin'
    slip77_hex: string | undefined
    created_at: string
    updated_at: string
    created_by: string
    updated_by: string
  }
  metadata: unknown
}

Prop

Type

WalletsEditResponse_pending
interface WalletsEditResponse_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

WalletsEditResponse_failed | unauthorized | rejected
interface WalletsEditResponse_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.wallets.shape.edit
>(
  {
    action: 'edit',
    resource: '/wallets/{id}',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page