Skip to content

Commit c31ac1b

Browse files
committed
Add comment
1 parent 6fb0434 commit c31ac1b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/anchor/program.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { Program, AnchorProvider, Idl } from '@coral-xyz/anchor'
33
import { PythOracleCoder } from './coder'
44
import IDL from './idl.json'
55

6+
/** The Pyth program is not fully compatible with Anchor idls.
7+
* However it can be interacted with from Anchor clients by using PythOracleCoder from this library.
8+
* It currently only supports instructions. To deserialize accounts one can use the non-Anchor
9+
* parsing functions from this package.
10+
*/
611
export function pythOracleProgram(programId: PublicKey, provider: AnchorProvider): Program<PythOracle> {
712
return new Program<PythOracle>(IDL as PythOracle, programId, provider, new PythOracleCoder(IDL as Idl))
813
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,4 @@ export const parsePriceData = (data: Buffer, currentSlot?: number): PriceData =>
370370
export { PythConnection } from './PythConnection'
371371
export { PythHttpClient } from './PythHttpClient'
372372
export { getPythProgramKeyForCluster } from './cluster'
373-
export { pythOracleProgram, PythOracleCoder } from './anchor'
373+
export { pythOracleProgram, PythOracleCoder } from './anchor'

0 commit comments

Comments
 (0)