UNPKG

@surec/oracle

Version:

Typescript SDK for the Sure Oracle to be used to bring off-chain data on-chain

38 lines 1.55 kB
import * as anchor from '@project-serum/anchor'; import * as solanaContrib from '@saberhq/solana-contrib'; import { Wallet } from '@project-serum/anchor/dist/esm/provider'; import { Oracle } from './idls/oracle'; import { Proposal } from './proposal'; import { Vote } from './vote'; import { PDA } from './pda'; import { Config } from './config'; import { ConfirmOptions, Connection, TransactionInstruction } from '@solana/web3.js'; export declare type ProviderProps = { connection: anchor.web3.Connection; wallet: Wallet; opts: anchor.web3.ConfirmOptions; }; export declare class Provider { readonly connection: anchor.web3.Connection; readonly wallet: Wallet; readonly opts: anchor.web3.ConfirmOptions; constructor(connection: anchor.web3.Connection, wallet: Wallet, opts: anchor.web3.ConfirmOptions); static init({ connection, wallet, opts }: ProviderProps): Provider; } export declare class SureOracleSDK { readonly provider: solanaContrib.AugmentedProvider; readonly program: anchor.Program<Oracle>; readonly pda: PDA; constructor(provider: solanaContrib.AugmentedProvider, program: anchor.Program<Oracle>, pda: PDA); static init({ connection, wallet, opts, }: { connection: Connection; wallet: Wallet; opts?: ConfirmOptions; }): SureOracleSDK; static pda(): PDA; config(): Config; proposal(): Proposal; vote(): Vote; executeTransactionInstructions(tx: TransactionInstruction[]): solanaContrib.TransactionEnvelope; } //# sourceMappingURL=sdk.d.ts.map