pyth_sui_dart 3.0.0 copy "pyth_sui_dart: ^3.0.0" to clipboard
pyth_sui_dart: ^3.0.0 copied to clipboard

A Dart SDK for fetching Pyth price updates from Hermes and building Sui transactions that verify Wormhole VAAs and update or create Pyth price feeds on-chain.

3.0.0 #

Breaking #

  • SuiPriceServiceConnection fetches from Hermes (/v2/updates/price/latest) directly and no longer extends price_service_client's PriceServiceConnection; the inherited methods (getLatestVaas, getVaa, getPriceFeed, getPriceFeedIds, websocket subscriptions) are gone. getPriceFeedsUpdateData and getLatestPriceFeeds keep their signatures.
  • Price, PriceFeed, and PriceServiceConnectionConfig are now defined and exported by this package instead of re-used from price_service_client.

Changed #

  • Drop the price_service_client dependency; add http and decimal.
  • Bump sui_dart to ^0.8.1 and bcs_dart to ^0.2.0.

2.0.1 #

  • Widen the sui_dart constraint to ^0.5.0.
  • Reject empty (and multiple) accumulator messages with a clear ArgumentError instead of crashing with Bad state: No element.
  • Validate that a feed id has an even number of hex digits before decoding, instead of throwing RangeError.
  • Fix the README quick-start to use the gRPC SuiGrpcClient / client: API and add a runnable example/.

2.0.0 #

  • BREAKING: SuiPythClient now reads on-chain state via gRPC (SuiGrpcClient from sui_dart) instead of JSON-RPC SuiClient. Sui's JSON-RPC API is deprecated.
  • Constructor parameter renamed: provider: SuiClient -> client: SuiGrpcClient.
  • Dynamic field lookup is now implemented via listDynamicFields + client-side BCS name matching (paginated). Per-feed object IDs are still cached in-memory after the first lookup.

Migration guide:

// Before
final client = SuiPythClient(
  provider: SuiClient('https://fullnode.mainnet.sui.io:443'),
  pythStateId: '...',
  wormholeStateId: '...',
);

// After
final client = SuiPythClient(
  client: SuiGrpcClient(SuiGrpcClientOptions(
    baseUrl: 'fullnode.mainnet.sui.io',
    port: 443,
  )),
  pythStateId: '...',
  wormholeStateId: '...',
);

1.0.2 #

  • Fix minor bugs

1.0.1 #

  • Update transaction result types and method names

1.0.0 #

  • Initial version.
1
likes
160
points
211
downloads

Documentation

API reference

Publisher

verified publisherscallop.io

Weekly Downloads

A Dart SDK for fetching Pyth price updates from Hermes and building Sui transactions that verify Wormhole VAAs and update or create Pyth price feeds on-chain.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

bcs_dart, decimal, http, sui_dart

More

Packages that depend on pyth_sui_dart