@kilnfi/sdk
Version:
JavaScript sdk for Kiln API
42 lines • 2.48 kB
TypeScript
import type { CreateTransactionResponse, Fireblocks, TransactionResponse } from '@fireblocks/ts-sdk';
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' | 'ETH_TEST5' | 'ETH_TEST_HOODI' | 'ETH' | 'ATOM_COS' | 'OSMO_TEST' | 'OSMO' | 'ADA_TEST' | 'ADA' | 'NEAR_TEST' | 'NEAR' | 'XTZ' | 'DOT' | 'KSM' | 'DV4TNT_TEST' | 'DYDX_DYDX' | 'CELESTIA' | 'INJ_INJ' | 'TON_TEST' | 'TON' | 'KAVA_KAVA' | 'TRX' | 'BTC';
export declare class FireblocksSigner {
protected fireblocks: Fireblocks;
protected vaultId: `${number}`;
constructor(fireblocks: Fireblocks, vaultId: `${number}`);
/**
* Wait for given transaction to be completed
* @param fbTx fireblocks transaction
*/
protected waitForTxCompletion(fbTx: CreateTransactionResponse): Promise<TransactionResponse>;
/**
* Sign a transaction with fireblocks using Fireblocks raw message signing feature
* @param payloadToSign transaction data in hexadecimal
* @param assetId fireblocks asset id
* @param note optional fireblocks custom note
*/
sign(payloadToSign: object, assetId?: FireblocksAssetId, note?: string): Promise<TransactionResponse>;
/**
* Sign an EIP-712 Ethereum typed message with fireblocks
* @param eip712message eip712message to sign
* @param assetId fireblocks asset id
* @param note optional fireblocks custom note
*/
signTypedMessage(eip712message: object, assetId: 'ETH' | 'ETH_TEST5' | 'ETH_TEST_HOODI', note?: string): Promise<TransactionResponse>;
/**
* Sign and broadcast a transaction with fireblocks using Fireblocks contract call feature
* @param payloadToSign transaction data in hexadecimal
* @param assetId fireblocks asset id
* @param note optional fireblocks custom note
* @param tx Ethereum transaction
* @param destinationId Fireblocks destination id, this corresponds to the Fireblocks whitelisted contract address id
* @param sendAmount send the amount in tx to smart contract
*/
signAndBroadcastWith(payloadToSign: object, assetId: FireblocksAssetId, tx: components['schemas']['ETHUnsignedTx'] | components['schemas']['POLUnsignedTx'], destinationId: string, sendAmount?: boolean, note?: string): Promise<TransactionResponse>;
}
//# sourceMappingURL=fireblocks_signer.d.ts.map