From e4d131e9afa81d48826e5cd55615a8be8ce8e393 Mon Sep 17 00:00:00 2001 From: Martin Saldinger Date: Fri, 22 Nov 2024 09:34:45 +0100 Subject: [PATCH 1/3] export FireblocksAssetId --- src/fireblocks_signer.ts | 6 +++--- src/kiln.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fireblocks_signer.ts b/src/fireblocks_signer.ts index e18f5e2..5e0dd13 100644 --- a/src/fireblocks_signer.ts +++ b/src/fireblocks_signer.ts @@ -11,7 +11,7 @@ import { import { formatEther, formatUnits } from 'viem'; import type { components } from './openapi/schema.js'; -export type AssetId = +export type FireblocksAssetId = | 'SOL_TEST' | 'SOL' | 'ETH_TEST5' @@ -81,7 +81,7 @@ export class FireblocksSigner { * @param assetId fireblocks asset id * @param note optional fireblocks custom note */ - public async sign(payloadToSign: object, assetId?: AssetId, note = ''): Promise { + public async sign(payloadToSign: object, assetId?: FireblocksAssetId, note = ''): Promise { try { const assetArgs = assetId ? { @@ -155,7 +155,7 @@ export class FireblocksSigner { */ public async signAndBroadcastWith( payloadToSign: object, - assetId: AssetId, + assetId: FireblocksAssetId, tx: components['schemas']['ETHUnsignedTx'] | components['schemas']['POLUnsignedTx'], destinationId: string, sendAmount = true, diff --git a/src/kiln.ts b/src/kiln.ts index cc3079a..bfc7de3 100644 --- a/src/kiln.ts +++ b/src/kiln.ts @@ -6,6 +6,7 @@ export * from './validators.js'; export * from './openapi/schema.js'; export * from './utils.js'; export type { FireblocksIntegration } from './fireblocks.js'; +export type { FireblocksAssetId } from './fireblocks_signer.js'; type Config = { baseUrl: string; From 37153fc61d5a3960205be57286ff5535d21ff60b Mon Sep 17 00:00:00 2001 From: Martin Saldinger Date: Fri, 22 Nov 2024 09:37:58 +0100 Subject: [PATCH 2/3] add comment --- src/fireblocks_signer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fireblocks_signer.ts b/src/fireblocks_signer.ts index 5e0dd13..200cfbe 100644 --- a/src/fireblocks_signer.ts +++ b/src/fireblocks_signer.ts @@ -11,6 +11,10 @@ import { import { formatEther, formatUnits } from 'viem'; import type { components } from './openapi/schema.js'; +/** + * Fireblocks asset id + * ref: https://github.com/fireblocks/fireblocks-web3-provider/blob/main/src/constants.ts + */ export type FireblocksAssetId = | 'SOL_TEST' | 'SOL' From fc4d1e539d0c555f5bf3c17ce28451d9d441c546 Mon Sep 17 00:00:00 2001 From: Martin Saldinger Date: Fri, 22 Nov 2024 09:39:19 +0100 Subject: [PATCH 3/3] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a09049f..13d2aac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kilnfi/sdk", - "version": "3.1.18", + "version": "3.1.19", "autor": "Kiln (https://kiln.fi)", "license": "BUSL-1.1", "description": "JavaScript sdk for Kiln API",