Solnet is Solana's .NET integration library, a number of packages that implement features to interact with Solana from .Net applications.
Solnet.Pyth is a package within the same Solnet.
namespace that implements a Client for Pyth, this project is in a
separate repository so it is contained, as the goal for Solnet was to be a core SDK.
- Decoding of Pyth data structures
PythClient
with methods that make it easy to get data and decode it- Factory pattern for
PythClient
- net 6.0
- Solnet.Wallet v6.0.13
- Solnet.Rpc v6.0.13
- Solnet.Programs v6.0.13
The IPythClient
API follows the following structure:
- Gets the given
MappingAccount
. This is an asynchronous operation.
- Gets the given
MappingAccount
.
- Gets the given
ProductAccount
. This is an asynchronous operation.
- Gets the given
ProductAccount
.
GetProductAccountsAsync(MappingAccount mappingAccount, Commitment commitment = Commitment.Finalized);
- Gets a list of
ProductAccount
s from the givenMappingAccount
. This is an asynchronous operation.
- Gets a list of
ProductAccount
s from the givenMappingAccount
.
- Gets the given
PriceDataAccount
. This is an asynchronous operation.
- Gets the given
PriceDataAccount
.
GetPriceDataAccountsAsync(List<ProductAccount> productAccounts, Commitment commitment = Commitment.Finalized);
- Gets a list of
PriceDataAccount
s from the given list ofProductAccount
. This is an asynchronous operation.
GetPriceDataAccounts(List<ProductAccount> productAccounts, Commitment commitment = Commitment.Finalized);
- Gets a list of
PriceDataAccount
s from the given listProductAccount
.
SubscribePriceDataAccountAsync(Action<Subscription, PriceDataAccount, ulong> action, string priceAccountAddress, Commitment commitment = Commitment.Finalized);
- Subscribe to a live feed of a
PriceDataAccount
, the given action is called on every notification received. This is an asynchronous operation.
SubscribePriceDataAccount(Action<Subscription, PriceDataAccount, ulong> action, string priceAccountAddress, Commitment commitment = Commitment.Finalized);
- Subscribe to a live feed of a
PriceDataAccount
, the given action is called on every notification received.
- Unsubscribe to a live feed of a
PriceDataAccount
. This is an asynchronous operation.
- Unsubscribe to a live feed of a
PriceDataAccount
.
The Solnet.Pyth.Examples project features some examples on how to usethe ISerumClient, these examples include:
- Streaming price data
- Retrieving data from the various accounts:
MappingAccount
ProductAccount
PriceDataAccount
We encourage everyone to contribute, submit issues, PRs, discuss. Every kind of help is welcome.
- Hugo - Maintainer - murlokito
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details