@firefly-exchange/library-sui
Version:
Sui library housing helper methods, classes to interact with Bluefin protocol(s) deployed on Sui
53 lines (52 loc) • 2.52 kB
TypeScript
import BigNumber from "bignumber.js";
import { Secp256k1Keypair, Secp256k1PublicKey } from "@mysten/sui/keypairs/secp256k1";
import { Ed25519Keypair, Ed25519PublicKey } from "@mysten/sui/keypairs/ed25519";
import { Secp256r1Keypair, Secp256r1PublicKey } from "@mysten/sui/keypairs/secp256r1";
import { Signer, SignatureWithBytes } from "@mysten/sui/cryptography";
import BN from "bn.js";
import { toB64 } from "@mysten/bcs";
import { decodeSuiPrivateKey } from "@mysten/sui/cryptography";
import { Transaction as TransactionBlock, UpgradePolicy } from "@mysten/sui/transactions";
import { SuiTransactionBlockResponse, DryRunTransactionBlockResponse, OwnedObjectRef, SuiTransactionBlockResponseOptions, PaginatedCoins } from "@mysten/sui/client";
import { Keypair } from "@mysten/sui/cryptography";
import { SuiClient, CoinStruct } from "@mysten/sui/client";
import { SignatureScheme } from "@mysten/sui/cryptography";
import { getZkLoginSignature } from "@mysten/zklogin";
export type BigNumberable = BigNumber | number | string;
export type SignedNumber = {
sign: boolean;
value: string;
};
export type SuiAddress = string;
export type address = string;
export type TypedSignature = string;
export type MarketSymbol = string;
export type Interval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d" | "3d" | "1w" | "1M";
export type MinifiedCandleStick = [
number,
string,
string,
string,
string,
string,
number,
string,
number,
string,
string,
string
];
export type DAPIKlineResponse = Array<MinifiedCandleStick>;
export { SuiClient, Keypair, BigNumber, SuiTransactionBlockResponse, DryRunTransactionBlockResponse, SuiTransactionBlockResponseOptions, TransactionBlock, OwnedObjectRef, Ed25519Keypair, Secp256k1Keypair, Secp256r1Keypair, Ed25519PublicKey, Secp256k1PublicKey, Secp256r1PublicKey, SignatureScheme, Signer, SignatureWithBytes, PaginatedCoins, CoinStruct, BN, UpgradePolicy, toB64, decodeSuiPrivateKey };
export type SigPK = {
signature: string;
publicKey?: string;
publicAddress?: string;
};
export type PartialZkLoginSignature = Omit<Parameters<typeof getZkLoginSignature>["0"]["inputs"], "addressSeed">;
export type Address = string;
export type ID = string;
export type SigStr = string;
export type Serialized = string;
export type NumStr = number | string;
export type OnChainCallResponse = SuiTransactionBlockResponse | DryRunTransactionBlockResponse | TransactionBlock | SignatureWithBytes;