Skip to main content

Gas price manager

Use GasPriceManager to fetch and cache gas estimates and pass them to the Write SDK for faster, predictable transaction building:
Stop the manager when your app unmounts:

Gas sponsorship

  • By default, transactions are self-pay (the user pays gas in APT).
  • To sponsor gas via Geomi Gas Station, add gasStationApiKey to your config:

Time synchronization

If client clocks are skewed, set timeDeltaMs to shift local time used when building transactions:
You can compute serverDeltaMs = serverTimeMs - Date.now() using your own time endpoint. The offset applies to every transaction the SDK builds, encrypted ones included. timeDeltaMs can be updated on the instance. To refresh it right before each write is sent, pass beforeSend: every write method awaits it before building its transaction, and if it rejects the transaction is not sent (reported as not-submitted). The build*Tx helpers for custom signing flows don’t call it; refresh timeDeltaMs yourself before calling them.