BGL <- WBGL, swap BGL and recive WBGL to your bitgesell address,

Constructors

Properties

bglRpcNode: string

Bitgesell RPC Node to interact with

bglWallet: BGLWallet

an Instance of Bitgesell Wallet to use Signs transactions to approve and transfer BGL to the Bridge in exchange for WBGL

Link

Read More: https://bglswap.com/

bridgeEndpoint: string

Current Bridge Endpoint: https://bglswap.com/app/

chainName: string

Chain Names for Network to interract with: BSC, Ethereum, Note: Arbitrum and Optimism (L2s) are not supported yet.

minTxFee: number = ...

Minimum Fee in satoshi units for BGL transaction

Methods

  • Parameters

    • txObject: Record<string, string>

      transaction object to broadcast. see implementation of building a txObject

    Returns Promise<any>

    a response from the Bitgesell RPC node.

  • Parameters

    • bglFromPublicAddress: string
    • bglAmountToSwap: number
    • bridgeBGLaddress: string
    • privateKey: string
    • bglTxFee: number

    Returns Promise<any>

  • Parameters

    • bglAddress: string

    Returns Promise<any>

  • Parameters

    • bglAddress: string

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • headers: Record<string, string>
    • payload: {
          address: string;
          chain: string;
      }
      • address: string
      • chain: string

    Returns Promise<any>

  • Parameters

    • receivingAddress: string
    • chainName: string

    Returns Promise<IBridgeResponse>

  • Send BGL to recieve WBGL tokens to complete the swap

    Parameters

    Returns Promise<{
        bglBridgeAddress: string;
        bglTxHash: string;
        currentWBGLBridgeBalance: string;
        msg: string;
        rpcResult: BGlSwapSuccessResult;
    }>

Generated using TypeDoc