Skip to content

Latest commit

 

History

History
591 lines (388 loc) · 25.3 KB

KeyLinkBetaApi.md

File metadata and controls

591 lines (388 loc) · 25.3 KB

KeyLinkBetaApi

All URIs are relative to https://developers.fireblocks.com/reference/

Method HTTP request Description
createSigningKey POST /key_link/signing_keys Add a new signing key
createValidationKey POST /key_link/validation_keys Add a new validation key
disableValidationKey PATCH /key_link/validation_keys/{keyId} Disables a validation key
getSigningKey GET /key_link/signing_keys/{keyId} Get a signing key by `keyId`
getSigningKeysList GET /key_link/signing_keys Get list of signing keys
getValidationKey GET /key_link/validation_keys/{keyId} Get a validation key by `keyId`
getValidationKeysList GET /key_link/validation_keys Get list of registered validation keys
setAgentId PATCH /key_link/signing_keys/{keyId}/agent_user_id Set agent user id that can sign with the signing key identified by the Fireblocks provided `keyId`
updateSigningKey PATCH /key_link/signing_keys/{keyId} Modify the signing by Fireblocks provided `keyId`

createSigningKey

SigningKeyDto createSigningKey(createSigningKeyDto)

Adds a new signing key to the workspace. The added key will be linked to the specific Fireblocks agent user ID. The same user will receive the proof of ownership message to be signed, and upon successful proof, the key will become enabled. Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiCreateSigningKeyRequest, SigningKeyDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiCreateSigningKeyRequest = {
  // CreateSigningKeyDto
  createSigningKeyDto: param_value,
  // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
  idempotencyKey: idempotencyKey_example,
};

fireblocks.keyLinkBeta.createSigningKey(body).then((res: FireblocksResponse<SigningKeyDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createSigningKeyDto CreateSigningKeyDto
idempotencyKey [string] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) defaults to undefined

Return type

SigningKeyDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Newly created signing key * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createValidationKey

CreateValidationKeyResponseDto createValidationKey(createValidationKeyDto)

Adds a new validation key used to validate signing keys. The new validation key will undergo an approval process by the workspace quorum. Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiCreateValidationKeyRequest, CreateValidationKeyResponseDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiCreateValidationKeyRequest = {
  // CreateValidationKeyDto
  createValidationKeyDto: param_value,
  // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
  idempotencyKey: idempotencyKey_example,
};

fireblocks.keyLinkBeta.createValidationKey(body).then((res: FireblocksResponse<CreateValidationKeyResponseDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createValidationKeyDto CreateValidationKeyDto
idempotencyKey [string] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) defaults to undefined

Return type

CreateValidationKeyResponseDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 The validation key that was added and is pending approval. * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

disableValidationKey

ValidationKeyDto disableValidationKey(modifyValidationKeyDto, )

Allows disabling validation key even if it has not expired yet. It is not allowed to enable the validation key back. Another key has to be used for future validations. Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiDisableValidationKeyRequest, ValidationKeyDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiDisableValidationKeyRequest = {
  // ModifyValidationKeyDto
  modifyValidationKeyDto: param_value,
  // string | The unique identifier for the validation key provided by Fireblocks
  keyId: 46a92767-5f93-4a46-9eed-f012196bb4fc,
};

fireblocks.keyLinkBeta.disableValidationKey(body).then((res: FireblocksResponse<ValidationKeyDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
modifyValidationKeyDto ModifyValidationKeyDto
keyId [string] The unique identifier for the validation key provided by Fireblocks defaults to undefined

Return type

ValidationKeyDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Modified validation key data * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSigningKey

SigningKeyDto getSigningKey()

Returns a signing key if it exists, identified by the specified Fireblocks provided keyId. Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiGetSigningKeyRequest, SigningKeyDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiGetSigningKeyRequest = {
  // string | The unique identifier for the signing key provided by Fireblocks
  keyId: 46a92767-5f93-4a46-9eed-f012196bb4fc,
};

fireblocks.keyLinkBeta.getSigningKey(body).then((res: FireblocksResponse<SigningKeyDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
keyId [string] The unique identifier for the signing key provided by Fireblocks defaults to undefined

Return type

SigningKeyDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Requested signing key data * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSigningKeysList

GetSigningKeyResponseDto getSigningKeysList()

Returns the list of signing keys in the workspace Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiGetSigningKeysListRequest, GetSigningKeyResponseDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiGetSigningKeysListRequest = {
  // string | Cursor to the next page (optional)
  pageCursor: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==,
  // number | Amount of results to return in the next page (optional)
  pageSize: 8.14,
  // 'createdAt' | Field(s) to use for sorting (optional)
  sortBy: sortBy_example,
  // 'ASC' | 'DESC' | Is the order ascending or descending (optional)
  order: order_example,
};

fireblocks.keyLinkBeta.getSigningKeysList(body).then((res: FireblocksResponse<GetSigningKeyResponseDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
pageCursor [string] Cursor to the next page (optional) defaults to undefined
pageSize [number] Amount of results to return in the next page (optional) defaults to 10
sortBy ['createdAt']Array<'createdAt'> Field(s) to use for sorting (optional) defaults to 'createdAt'
order [**'ASC' 'DESC'**]Array<'ASC' | 'DESC'> Is the order ascending or descending

Return type

GetSigningKeyResponseDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 List of signing keys and a data that allows requesting the next page if applicable * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getValidationKey

ValidationKeyDto getValidationKey()

Returns a validation key if it exists, identified by the specified keyId. Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiGetValidationKeyRequest, ValidationKeyDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiGetValidationKeyRequest = {
  // string
  keyId: keyId_example,
};

fireblocks.keyLinkBeta.getValidationKey(body).then((res: FireblocksResponse<ValidationKeyDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
keyId [string] defaults to undefined

Return type

ValidationKeyDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The requested validation key data * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getValidationKeysList

GetValidationKeyResponseDto getValidationKeysList()

Returns the list of validation keys in the workspace Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiGetValidationKeysListRequest, GetValidationKeyResponseDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiGetValidationKeysListRequest = {
  // string | Cursor to the next page (optional)
  pageCursor: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==,
  // number | Amount of results to return in the next page (optional)
  pageSize: 8.14,
  // 'createdAt' | Field(s) to use for sorting (optional)
  sortBy: sortBy_example,
  // 'ASC' | 'DESC' | Is the order ascending or descending (optional)
  order: order_example,
};

fireblocks.keyLinkBeta.getValidationKeysList(body).then((res: FireblocksResponse<GetValidationKeyResponseDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
pageCursor [string] Cursor to the next page (optional) defaults to undefined
pageSize [number] Amount of results to return in the next page (optional) defaults to 10
sortBy ['createdAt']Array<'createdAt'> Field(s) to use for sorting (optional) defaults to 'createdAt'
order [**'ASC' 'DESC'**]Array<'ASC' | 'DESC'> Is the order ascending or descending

Return type

GetValidationKeyResponseDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Validation keys list along with data required to request the next page if applicable * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setAgentId

setAgentId(modifySigningKeyAgentIdDto, )

Can modify existing signing key id if the key is not enabled. The change done in background and will be visible once applied. If key is already enabled (after proof of ownership) the user cannot be changed. Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiSetAgentIdRequest } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiSetAgentIdRequest = {
  // ModifySigningKeyAgentIdDto
  modifySigningKeyAgentIdDto: param_value,
  // string | The unique identifier for the signing key provided by Fireblocks
  keyId: 46a92767-5f93-4a46-9eed-f012196bb4fc,
};

fireblocks.keyLinkBeta.setAgentId(body).then((res: FireblocksResponse<any>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
modifySigningKeyAgentIdDto ModifySigningKeyAgentIdDto
keyId [string] The unique identifier for the signing key provided by Fireblocks defaults to undefined

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Agent user id modification process has started in background. * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateSigningKey

SigningKeyDto updateSigningKey(modifySigningKeyDto, )

Allows assigning the signing key to a vault account, if it hasn't been assigned to any other vault accounts yet. Please note that this endpoint is available only for Key Link enabled workspaces. Note: This endpoint is currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Key Link, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, KeyLinkBetaApiUpdateSigningKeyRequest, SigningKeyDto } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: KeyLinkBetaApiUpdateSigningKeyRequest = {
  // ModifySigningKeyDto
  modifySigningKeyDto: param_value,
  // string | The unique identifier for the signing key provided by Fireblocks
  keyId: 46a92767-5f93-4a46-9eed-f012196bb4fc,
};

fireblocks.keyLinkBeta.updateSigningKey(body).then((res: FireblocksResponse<SigningKeyDto>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
modifySigningKeyDto ModifySigningKeyDto
keyId [string] The unique identifier for the signing key provided by Fireblocks defaults to undefined

Return type

SigningKeyDto

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Modified signing key data * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]