ark-dex-adapter

1.1.0 • Public • Published

Ark DEX Adapter

DEX adapter module for the Ark blockchain.

Options:

const moduleAdapter = new ArkAdapter({
  options: {
    // OPTIONAL
    alias: 'NameOfDexAdaptor', // Default: 'ark_dex_adapter'
    // OPTIONAL
    logger: console, // Default: console
    config: {
      // REQUIRED
      dexWalletAddress: 'DRFp1KVCuCMFLPFrHzbH8eYdPUoNwTXWzV',
      // OPTIONAL
      chainSymbol: 'ark', // Default: 'ark'
      // OPTIONAL
      apiURL: 'https://dapi.ark.io/api', // Default: 'https://api.ark.io/api'
      // OPTIONAL
      // Interval to which the adapter polls the API to get new blocks
      pollingInterval: 2000, // Default: 10000
    },
  },
});

Actions

getMultisigWalletMembers({ walletAddress })

Method: GET

getMinMultisigRequiredSignatures({ walletAddress })

Method: GET

getOutboundTransactions({ walletAddress, fromTimestamp, limit })

Method: GET

Notes:

  • The Unix fromTimestamp will need to be converted to Ark's native timestamp format fromEpochTimestamp
  • Use timestamp.to parameter for fetching the data in the reverse order - In that case, fromEpochTimestamp would need to be -1.

getInboundTransactionsFromBlock({ walletAddress, blockId })

Method: GET

getOutboundTransactionsFromBlock({ walletAddress, blockId })

Method: GET

getLastBlockAtTimestamp({ timestamp })

Method: GET

getMaxBlockHeight()

Method: GET

getBlocksBetweenHeights({ fromHeight, toHeight, limit })

Method: GET

getBlockAtHeight({ height })

Method: GET

postTransaction

Method: POST


Events

bootstrap

chainChanges

Readme

Keywords

Package Sidebar

Install

npm i ark-dex-adapter

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

47.7 kB

Total Files

9

Last publish

Collaborators

  • topcloudsystems