Skip to content

Commit

Permalink
export FireblocksAssetId (#160)
Browse files Browse the repository at this point in the history
* export FireblocksAssetId

* add comment

* bump version
  • Loading branch information
LeTamanoir committed Nov 22, 2024
1 parent 45f41d7 commit ce4760c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kilnfi/sdk",
"version": "3.1.18",
"version": "3.1.19",
"autor": "Kiln <[email protected]> (https://kiln.fi)",
"license": "BUSL-1.1",
"description": "JavaScript sdk for Kiln API",
Expand Down
10 changes: 7 additions & 3 deletions src/fireblocks_signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import {
import { formatEther, formatUnits } from 'viem';
import type { components } from './openapi/schema.js';

export type AssetId =
/**
* Fireblocks asset id
* ref: https://github.com/fireblocks/fireblocks-web3-provider/blob/main/src/constants.ts
*/
export type FireblocksAssetId =
| 'SOL_TEST'
| 'SOL'
| 'ETH_TEST5'
Expand Down Expand Up @@ -81,7 +85,7 @@ export class FireblocksSigner {
* @param assetId fireblocks asset id
* @param note optional fireblocks custom note
*/
public async sign(payloadToSign: object, assetId?: AssetId, note = ''): Promise<TransactionResponse> {
public async sign(payloadToSign: object, assetId?: FireblocksAssetId, note = ''): Promise<TransactionResponse> {
try {
const assetArgs = assetId
? {
Expand Down Expand Up @@ -155,7 +159,7 @@ export class FireblocksSigner {
*/
public async signAndBroadcastWith(
payloadToSign: object,
assetId: AssetId,
assetId: FireblocksAssetId,
tx: components['schemas']['ETHUnsignedTx'] | components['schemas']['POLUnsignedTx'],
destinationId: string,
sendAmount = true,
Expand Down
1 change: 1 addition & 0 deletions src/kiln.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ce4760c

Please sign in to comment.