Constructors

Properties

defaultRPC: string = 'https://rpc.bglwallet.io'
index: number
privateKeyOrSeed: string
rpc: string

Methods

  • Parameters

    • txObject: string

    Returns Promise<string | {
        error: string;
    }>

  • Parameters

    • __namedParameters: ITransaction
    • privateKey: string

    Returns Promise<{
        balance: number;
        error?: undefined;
        txObject: any;
    } | {
        balance?: undefined;
        error: string;
        txObject?: undefined;
    }>

  • Parameters

    • bglAddress: string

    Returns Promise<any>

  • Parameters

    • bglAddress: string

    Returns Promise<any>

  • Private

    importWalletFromMnemonic imports from Bitgesell Mainnet seedphrase

    Returns Promise<{
        address: any;
        privateKey: any;
        wallet: any;
    }>

  • createWallet imports a wallet from privateKey or Mnemonic

    Returns Promise<{
        address: any;
        privateKey: any;
        wallet: any;
    }>

  • Parameters

    • privatekey: string

    Returns Promise<any>

  • createWallet imports a wallet from privateKey or Mnemonic

    Returns Promise<IWalletProperties>

  • getAccountHistory returns the account transaction history

    Returns Promise<{
        error?: undefined;
        txHistory: TransactionHistoryItem[];
    } | {
        error: string;
        txHistory?: undefined;
    }>

  • getAccountUTXO returns the current unspent transaction ouputs for the account.

    Returns Promise<any>

  • getAddress returns the current wallet address

    Returns Promise<string>

  • getBalance returns the current BGL balance of the wallet

    Returns Promise<any>

  • sendTransaction signs and broadcasts a raw transaction to the Bitgesesll blockchain network

    Parameters

    • transaction: ITransaction

    Returns Promise<{
        balance: number;
        error?: undefined;
        rpc_result: ITransactionRecipt;
        success: boolean;
        txHash: string;
    } | {
        balance?: undefined;
        error: string;
        rpc_result?: undefined;
        success: boolean;
        txHash?: undefined;
    }>

  • signTransaction signs a transaction and returns the hex format

    Parameters

    • transaction: ITransaction

    Returns Promise<any>