UNPKG

@firefly-exchange/library-sui

Version:

Sui library housing helper methods, classes to interact with Bluefin protocol(s) deployed on Sui

15 lines (14 loc) 902 B
import { SuiEvent, SuiTransactionBlockResponse } from "@mysten/sui/client"; import { ObjectsMap } from "./interface"; import { OnChainCallResponse } from "../types"; export declare const TOKEN_DECIMALS = 9; export declare const USDC_DECIMALS = 6; export declare function sleep(timeInMs: number): Promise<void>; export declare function getEvent(txResponse: SuiTransactionBlockResponse, eventName: string): SuiEvent[]; export declare function getCreatedObjectsIDs(txResponse: OnChainCallResponse): ObjectsMap; export declare function readJSONFile(filePath: string): any; export declare function writeJSONFile(filePath: string, content: JSON): void; export declare function hexToUint8Array(hex: string): Uint8Array; export declare function toBase64(bytes: Uint8Array): string; export declare function fromBase64(base64String: string): Uint8Array; export declare function toHex(bytes: Uint8Array): string;