1.5.0 • Published 12 months ago

@exodus/tx-simulator v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@exodus/tx-simulator

This Exodus SDK feature allows you to simulate the state of an account after a given transaction. It's only supported for a small subset of assets, and simulation parameters depend on the asset.

Install

yarn add @exodus/tx-simulator

Usage

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

import createExodus from '@exodus/headless'
import txSimulator from '@exodus/tx-simulator'

const container = createExodus({ adapters, config, debug })
container.use(txSimulator())

const exodus = container.resolve()
// result shape varies by asset
const result = await exodus.txSimulator.simulate({
  assetName: 'ethereum', // currently 'ethereum' or 'solana'
  // ... asset specific fields
})

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 requires transaction simulation, add a dependency on the txSimulator module and use txSimulator.simulate exactly as you would exodus.txSimulator.simulate.

UI Side

See using the sdk for more details on basic UI-side setup.

1.5.0

12 months ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago