Skip to content

Commit 443f145

Browse files
authored
support string (#1447)
1 parent c727195 commit 443f145

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

target_chains/solana/sdk/js/pyth_solana_receiver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-solana-receiver",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "Pyth solana receiver SDK",
55
"homepage": "https://pyth.network",
66
"main": "lib/index.js",

target_chains/solana/sdk/js/pyth_solana_receiver/src/PythSolanaReceiver.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,12 +709,12 @@ export class PythSolanaReceiver {
709709
/**
710710
* Fetch the contents of a price feed account
711711
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
712-
* @param priceFeedId The price feed ID.
712+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
713713
* @returns The contents of the deserialized price feed account or `null` if the account doesn't exist
714714
*/
715715
async fetchPriceFeedAccount(
716716
shardId: number,
717-
priceFeedId: Buffer
717+
priceFeedId: Buffer | string
718718
): Promise<PriceUpdateAccount | null> {
719719
return this.receiver.account.priceUpdateV2.fetchNullable(
720720
this.getPriceFeedAccountAddress(shardId, priceFeedId)
@@ -724,7 +724,7 @@ export class PythSolanaReceiver {
724724
/**
725725
* Derive the address of a price feed account
726726
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
727-
* @param priceFeedId The price feed ID.
727+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
728728
* @returns The address of the price feed account
729729
*/
730730
getPriceFeedAccountAddress(
@@ -742,7 +742,7 @@ export class PythSolanaReceiver {
742742
/**
743743
* Derive the address of a price feed account
744744
* @param shardId The shard ID of the set of price feed accounts. This shard ID allows for multiple price feed accounts for the same price feed id to exist.
745-
* @param priceFeedId The price feed ID.
745+
* @param priceFeedId The price feed ID, as either a 32-byte buffer or hexadecimal string with or without a leading "0x" prefix.
746746
* @param pushOracleProgramId The program ID of the Pyth Push Oracle program. If not provided, the default deployment will be used.
747747
* @returns The address of the price feed account
748748
*/

0 commit comments

Comments
 (0)