Data types

ENUMs

AccountProvider

export enum AccountProvider {
    Hedera = "Hedera",
    Magic = "Magic",
}

CryptoFlowServiceStrategy

export enum CryptoFlowServiceStrategy {
    BUY = "Buy",
    SELL = "Sell",
    SWAP = "Swap",
}

CryptoKeyType

export enum CryptoKeyType {
    ECDSA_SECP256K1 = "ECDSA_SECP256K1",
    ED25519 = "ED25519",
}

IPFSProvider

export enum IPFSProvider {
    pinata = "pinata",
}

KeyType

export enum KeyType {
    admin = "admin",
    kyc = "kyc",
    freeze = "freeze",
    wipe = "wipe",
    pause = "pause",
    feeSchedule = "feeSchedule",
}

MirrorNodeTransactionType

export enum MirrorNodeTransactionType {
    CONSENSUSCREATETOPIC = "CONSENSUSCREATETOPIC",
    CONSENSUSDELETETOPIC = "CONSENSUSDELETETOPIC",
    CONSENSUSSUBMITMESSAGE = "CONSENSUSSUBMITMESSAGE",
    CONSENSUSUPDATETOPIC = "CONSENSUSUPDATETOPIC",
    CONTRACTCALL = "CONTRACTCALL",
    CONTRACTCREATEINSTANCE = "CONTRACTCREATEINSTANCE",
    CONTRACTDELETEINSTANCE = "CONTRACTDELETEINSTANCE",
    CONTRACTUPDATEINSTANCE = "CONTRACTUPDATEINSTANCE",
    CRYPTOADDLIVEHASH = "CRYPTOADDLIVEHASH",
    CRYPTOCREATEACCOUNT = "CRYPTOCREATEACCOUNT",
    CRYPTODELETE = "CRYPTODELETE",
    CRYPTODELETELIVEHASH = "CRYPTODELETELIVEHASH",
    CRYPTOTRANSFER = "CRYPTOTRANSFER",
    CRYPTOUPDATEACCOUNT = "CRYPTOUPDATEACCOUNT",
    FILEAPPEND = "FILEAPPEND",
    FILECREATE = "FILECREATE",
    FILEDELETE = "FILEDELETE",
    FILEUPDATE = "FILEUPDATE",
    FREEZE = "FREEZE",
    SCHEDULECREATE = "SCHEDULECREATE",
    SCHEDULEDELETE = "SCHEDULEDELETE",
    SCHEDULESIGN = "SCHEDULESIGN",
    SYSTEMDELETE = "SYSTEMDELETE",
    SYSTEMUNDELETE = "SYSTEMUNDELETE",
    TOKENASSOCIATE = "TOKENASSOCIATE",
    TOKENBURN = "TOKENBURN",
    TOKENCREATION = "TOKENCREATION",
    TOKENDELETION = "TOKENDELETION",
    TOKENDISSOCIATE = "TOKENDISSOCIATE",
    TOKENFEESCHEDULEUPDATE = "TOKENFEESCHEDULEUPDATE",
    TOKENFREEZE = "TOKENFREEZE",
    TOKENGRANTKYC = "TOKENGRANTKYC",
    TOKENMINT = "TOKENMINT",
    TOKENPAUSE = "TOKENPAUSE",
    TOKENREVOKEKYC = "TOKENREVOKEKYC",
    TOKENUNFREEZE = "TOKENUNFREEZE",
    TOKENUNPAUSE = "TOKENUNPAUSE",
    TOKENUPDATE = "TOKENUPDATE",
    TOKENWIPE = "TOKENWIPE",
    UNCHECKEDSUBMIT = "UNCHECKEDSUBMIT",
}

ScheduleTransactionType

export enum ScheduleTransactionType {
    TRANSFER = "TRANSFER",
    SUBMIT_MESSAGE = "SUBMIT_MESSAGE",
    APPROVE_ALLOWANCE = "APPROVE_ALLOWANCE",
    TOKEN_MINT = "TOKEN_MINT",
    TOKEN_BURN = "TOKEN_BURN"
}

ScheduleTransferType

export enum ScheduleTransferType {
    HBAR = "HBAR",
    FT = "FT",
    NFT = "NFT"
}

SdkEnvironment

export enum SdkEnvironment {
    Prod = "Prod",
    CI = "CI",
    Test = "Test",
}

Data types

AccountInfoData

export interface AccountInfoData {
    accountId: string;
    publicKey: string;
    evmAddress: string;
    stakingInfo: {
        pendingReward: number;
        stakedNodeId: number | null;
        stakePeriodStart: string | null;
    };
    calculatedEvmAddress?: string;
}

AccountPrivateData

export interface AccountPrivateData {
    accounts: AccountPrivateRecord[];
}

AccountPrivateRecord

export interface AccountPrivateRecord {
    privateKey: string;
    publicKey: string;
    evmAddress: string;
    address: string;
    path: string;
    keyType: CryptoKeyType;
}

BalanceData

export interface BalanceData {
    hbars: number;
    tokens: {
        tokenId: string;
        balance: number;
    }[];
}

CoinData

export interface CoinData {
    // partial
    id: string;
    symbol: string;
    name: string;
    web_slug: string;
    description: {
        en: string;
    };
    image: {
        thumb: string;
        small: string;
        large: string;
    };
    platforms: {
        name: string;
        address: string;
    }[];
    market_data: {
        current_price: {
            [key: string]: number;
        };
    };
}

CoinInfoData

export interface CoinInfoData {
    coin: CoinData;
    priceUsd: number;
    price: number | null;
    currency: string;
}

CoinListData

export interface CoinListData {
    coins: {
        id: string;
        symbol: string;
        name: string;
        platforms: {
            name: string;
            address: string;
        }[];
    }[];
}

ContractCallQueryRecord

export interface ContractCallQueryRecord {
    type: string;
    value: string | number | boolean;
}

ContractCallQueryRecordsData

export interface ContractCallQueryRecordsData {
    values: ContractCallQueryRecord[];
    gasUsed: number;
}

CreateAccountData

export interface CreateAccountData {
    seedPhrase: string;
    publicKey: string;
    privateKey: string;
    accountId: string | null;
    evmAddress: string;
    transactionId?: string | null;
    status: string;
    queueNumber?: number;
}

CreateTokenResult

export interface CreateTokenResult {
    tokenId: string;
}

EmergencyTransferData

export interface EmergencyTransferData {
    isValid: boolean,
    transferStatus: string
}

IAssetQuote

export interface IAssetQuote {
    asset: ICryptoFlowAsset;
    amountExpected: number;
    totalFee: number | null;
}

ICryptoFlowAsset

export interface ICryptoFlowAsset {
    name: string;
    code: string;
    type: string;
    // crypto only
    address?: string;
    chainId?: number;
    decimals?: number;
    minAmount?: number;
    maxAmount?: number;
    // fiat only
    symbol?: string;
    // both
    imageUrl?: string;
}

ICryptoFlowQuote

export interface ICryptoFlowQuote {
    service: {
        id: string;
        name: string;
        logo: string;
        description?: string;
    };
    source: IAssetQuote;
    target: IAssetQuote;
    rate: number | null;
    widgetUrl: string;
    paymentMethods?: string[];
    path?: { tokenId: string, fee?: number }[];
}

InfoData

export interface InfoData {
    apiKey: string;
    dAppCode: string;
    network: string;
    visitorId: string;
    sdkEnvironment: SdkEnvironment;
    sdkVersion: string;
    nonce: number;
}

IntegrationUrlData

export interface IntegrationUrlData {
    url: string;
}

IPFSProviderConfig

export interface IPFSProviderConfig {
    provider: IPFSProvider;
    token: string;
}

KeyRecord

export interface KeyRecord {
    privateKey: string;
    type: KeyType;
}

NodeListData

export interface NodeListData {
    nodes: NodeInfo[];
}

PrivateKeyData

export interface PrivateKeyData {
    privateKey: string;
    publicKey: string;
    accounts: string[];
    evmAddress: string;
}

ScheduleResult

export interface ScheduleResult {
    scheduleId: string;
}

ScheduleTransactionTransfer

export interface ScheduleTransactionTransfer {
    type: ScheduleTransferType;
    sender: string;
    receiver: string;
    value?: number;
    tokenId?: string;
    serial?: number;
}

SignMessageData

export interface SignMessageData {
    signedMessage: string;
}

SignVerifyMessageData

export interface SignVerifyMessageData {
    valid: boolean;
}

SplitSignatureData

export interface SplitSignatureData {
    v: number;
    r: string;
    s: string;
}

StatusResult

export interface StatusResult {
    success: boolean
}

SwapQuotesData

export interface SwapQuotesData {
    quotes: ICryptoFlowQuote[];
}

SwapResult

export interface SwapResult {
    success: boolean;
    sourceAddress: string;
    targetAddress: string;
    balance: BalanceData;
}

TokenDropData

export interface TokenDropData {
    status: string;
    statusCode: number;
    timestamp: string;
    executionStatus: string;
    requestId: string;
    accountId: string;
    redirectUrl: string;
}

TokenInfoData

export interface TokenInfoData {
    token: TokenInfo;
    nft: NftInfo | null;
    metadata: NftMetadata | null;
}

TransactionData

export interface TransactionData {
    transactionId: string;
    type: MirrorNodeTransactionType;
    time: Date;
    transfers: TransferData[];
    nftTransfers?: [];
    memo?: string;
    fee?: number;
    showDetailed?: boolean;
    plainData?: any;
    consensusTimestamp: string;
}

TransactionReceiptData

export interface TransactionReceiptData {
    status: string;
    contractId?: string;
    topicSequenceNumber?: string;
    totalSupply?: string;
    serials: string[];
}

TransactionsHistoryData

export interface TransactionsHistoryData {
    transactions: TransactionData[];
    nextPage: string | null;
}

TransakOrderInfo

export interface TransakOrderInfo {
    orderId: string;
    status: string;
    walletAddress?: string;
    createdAt: string;
    autoExpiresAt: string;
    isBuyOrSell: string;
    network: string;
    notes?: string[];
    fiatCurrency: string;
    fiatAmount: number;
    cryptoCurrency: string;
    cryptoAmount: number;
    conversionPrice?: number;
    slippage?: number;
    totalFeeInFiat: number;
    totalFee?: number;
}

TransferData

export interface TransferData {
    amount: number;
    account: string;
    token_id?: string;
}

UserInfoData

export interface UserInfoData {
    accountId: string;
    accountProvider: AccountProvider | null;
    userPrivateKey: string;
    userPublicKey: string;
}

Last updated