Skip to main content

Rust SDK API Reference / Domain registration / get_pyth_feed_account_key

Function: get_pyth_feed_account_key()

pub fn get_pyth_feed_account_key(shard: u16, price_feed: &[u8; 32]) -> Pubkey

Defined in: register_domain.rs:221

Derives the Pyth push-feed PDA from a little-endian shard number and a 32-byte price-feed identifier.

Parameters

ParameterTypeDescription
shardu16Pyth shard number.
price_feed&[u8; 32]Price-feed identifier.

Returns

The derived feed-account Pubkey.

Example

use sns_sdk::bindings::register_domain::get_pyth_feed_account_key;

let key = get_pyth_feed_account_key(0, &[0; 32]);