crypto-client
Version:
An unified client for all cryptocurrency exchanges.
32 lines (31 loc) • 1.23 kB
TypeScript
import { Serialize } from 'eosjs';
export declare function sendTransaction(actions: Serialize.Action[], privateKey: string): Promise<{
transaction_id: string;
block_id: string;
block_num: number;
processed: {
[key: string]: any;
};
} | Error>;
/**
* Create a transfer action.
*
* @param from The sender's EOS account
* @param to The receiver's EOS account
* @param symbol The currency symbol, e.g., EOS, USDT, EIDOS, DICE, KEY, etc.
* @param quantity The quantity to send
* @param memo memo
*/
export declare function createTransferAction(from: string, to: string, symbol: string, quantity: string, memo?: string): Serialize.Action;
/**
* Transfer EOS or EOS token to another account.
*
* @param from The sender's EOS account
* @param privateKey The sender's EOS private key
* @param to The receiver's EOS account
* @param symbol The currency symbol, e.g., EOS, USDT, EIDOS, DICE, KEY, etc.
* @param quantity The quantity to send
* @param memo memo
*/
export declare function transfer(from: string, privateKey: string, to: string, symbol: string, quantity: string, memo?: string): Promise<any>;
export declare function getCurrencyBalance(account: string, symbol: string): Promise<number>;