Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export FireblocksAssetId #160

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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