pyth_sui_dart 3.0.0
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 #
SuiPriceServiceConnectionfetches from Hermes (/v2/updates/price/latest) directly and no longer extendsprice_service_client'sPriceServiceConnection; the inherited methods (getLatestVaas,getVaa,getPriceFeed,getPriceFeedIds, websocket subscriptions) are gone.getPriceFeedsUpdateDataandgetLatestPriceFeedskeep their signatures.Price,PriceFeed, andPriceServiceConnectionConfigare now defined and exported by this package instead of re-used fromprice_service_client.
Changed #
- Drop the
price_service_clientdependency; addhttpanddecimal. - Bump
sui_dartto^0.8.1andbcs_dartto^0.2.0.
2.0.1 #
- Widen the
sui_dartconstraint to^0.5.0. - Reject empty (and multiple) accumulator messages with a clear
ArgumentErrorinstead of crashing withBad 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 runnableexample/.
2.0.0 #
- BREAKING:
SuiPythClientnow reads on-chain state via gRPC (SuiGrpcClientfromsui_dart) instead of JSON-RPCSuiClient. 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.