@exodus/blockchain-metadata
TypeScript icon, indicating that this package has built-in type declarations

15.10.1 • Public • Published

@exodus/blockchain-metadata

This feature stores and manages transaction logs as well as account states of wallet accounts in a central location.

Install

yarn add @exodus/blockchain-metadata

Usage

This feature is designed to be used together with @exodus/headless. See using the sdk.

API Side

See using the sdk for more details on how features plug into the SDK and the API interface in the type declaration.

If you're building a feature that needs to write transaction logs or account states you can also use the batching feature of blockchain-metadata, which will only emit once after all updates are processed. Depend on the blockchainMetadata node and use the batch method to queue up updates:

await blockchainMetadata
  .batch()
  .updateAccountState({
    assetName: 'bitcoin',
    walletAccount: 'exodus_0',
    newData: { cursor: 'some cursor' },
  })
  .updateAccountState({
    assetName: 'ethereum',
    walletAccount: 'exodus_0',
    newData: { cursor: 'some cursor' },
  })
  .updateTxs({
    assetName: 'ethereum',
    walletAccount: 'exodus_0',
    txs: [{ id: '123', confirmations: 42 }],
  })
  .commit()

Readme

Keywords

none

Package Sidebar

Install

npm i @exodus/blockchain-metadata

Weekly Downloads

1,725

Version

15.10.1

License

MIT

Unpacked Size

81.9 kB

Total Files

42

Last publish

Collaborators

  • joshuabot