Skip to content

Commit ce4760c

Browse files
committed
export FireblocksAssetId (#160)
* export FireblocksAssetId * add comment * bump version
1 parent 45f41d7 commit ce4760c

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kilnfi/sdk",
3-
"version": "3.1.18",
3+
"version": "3.1.19",
44
"autor": "Kiln <[email protected]> (https://kiln.fi)",
55
"license": "BUSL-1.1",
66
"description": "JavaScript sdk for Kiln API",

src/fireblocks_signer.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import {
1111
import { formatEther, formatUnits } from 'viem';
1212
import type { components } from './openapi/schema.js';
1313

14-
export type AssetId =
14+
/**
15+
* Fireblocks asset id
16+
* ref: https://github.com/fireblocks/fireblocks-web3-provider/blob/main/src/constants.ts
17+
*/
18+
export type FireblocksAssetId =
1519
| 'SOL_TEST'
1620
| 'SOL'
1721
| 'ETH_TEST5'
@@ -81,7 +85,7 @@ export class FireblocksSigner {
8185
* @param assetId fireblocks asset id
8286
* @param note optional fireblocks custom note
8387
*/
84-
public async sign(payloadToSign: object, assetId?: AssetId, note = ''): Promise<TransactionResponse> {
88+
public async sign(payloadToSign: object, assetId?: FireblocksAssetId, note = ''): Promise<TransactionResponse> {
8589
try {
8690
const assetArgs = assetId
8791
? {
@@ -155,7 +159,7 @@ export class FireblocksSigner {
155159
*/
156160
public async signAndBroadcastWith(
157161
payloadToSign: object,
158-
assetId: AssetId,
162+
assetId: FireblocksAssetId,
159163
tx: components['schemas']['ETHUnsignedTx'] | components['schemas']['POLUnsignedTx'],
160164
destinationId: string,
161165
sendAmount = true,

src/kiln.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export * from './validators.js';
66
export * from './openapi/schema.js';
77
export * from './utils.js';
88
export type { FireblocksIntegration } from './fireblocks.js';
9+
export type { FireblocksAssetId } from './fireblocks_signer.js';
910

1011
type Config = {
1112
baseUrl: string;

0 commit comments

Comments
 (0)