solana.js: published 2.0.36
This commit is contained in:
parent
caa6ca1476
commit
e60a2d56cd
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@switchboard-xyz/solana.js",
|
"name": "@switchboard-xyz/solana.js",
|
||||||
"version": "2.0.35",
|
"version": "2.0.36",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@switchboard-xyz/solana.js",
|
"name": "@switchboard-xyz/solana.js",
|
||||||
"version": "2.0.35",
|
"version": "2.0.36",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@project-serum/anchor": "^0.25.0",
|
"@project-serum/anchor": "^0.25.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@switchboard-xyz/solana.js",
|
"name": "@switchboard-xyz/solana.js",
|
||||||
"version": "2.0.35",
|
"version": "2.0.36",
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "API wrapper for integrating with the Switchboard V2 program on Solana",
|
"description": "API wrapper for integrating with the Switchboard V2 program on Solana",
|
||||||
|
|
|
@ -145,18 +145,18 @@ export class SwitchboardTestContext {
|
||||||
const programState = await accounts.programState.account.loadData();
|
const programState = await accounts.programState.account.loadData();
|
||||||
|
|
||||||
return new SwitchboardTestEnvironment({
|
return new SwitchboardTestEnvironment({
|
||||||
programId: program.programId,
|
switchboardProgramId: program.programId,
|
||||||
programDataAddress: programDataAddress,
|
switchboardProgramDataAddress: programDataAddress,
|
||||||
idlAddress: idlAddress,
|
switchboardIdlAddress: idlAddress,
|
||||||
programState: accounts.programState.account.publicKey,
|
switchboardProgramState: accounts.programState.account.publicKey,
|
||||||
switchboardVault: programState.tokenVault,
|
switchboardVault: programState.tokenVault,
|
||||||
switchboardMint: programState.tokenMint.equals(PublicKey.default)
|
switchboardMint: programState.tokenMint.equals(PublicKey.default)
|
||||||
? Mint.native
|
? Mint.native
|
||||||
: programState.tokenMint,
|
: programState.tokenMint,
|
||||||
tokenWallet: userTokenWallet,
|
tokenWallet: userTokenWallet,
|
||||||
queue: accounts.queueAccount.publicKey,
|
oracleQueue: accounts.queueAccount.publicKey,
|
||||||
queueAuthority: program.walletPubkey,
|
oracleQueueAuthority: program.walletPubkey,
|
||||||
queueBuffer: dataBufferKeypair.publicKey,
|
oracleQueueBuffer: dataBufferKeypair.publicKey,
|
||||||
crank: crank.publicKey,
|
crank: crank.publicKey,
|
||||||
crankBuffer: crankBufferKeypair.publicKey,
|
crankBuffer: crankBufferKeypair.publicKey,
|
||||||
oracle: oracle.account.publicKey,
|
oracle: oracle.account.publicKey,
|
||||||
|
@ -169,16 +169,16 @@ export class SwitchboardTestContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISwitchboardTestEnvironment {
|
export interface ISwitchboardTestEnvironment {
|
||||||
programId: PublicKey;
|
switchboardProgramId: PublicKey;
|
||||||
programDataAddress: PublicKey;
|
switchboardProgramDataAddress: PublicKey;
|
||||||
idlAddress: PublicKey;
|
switchboardIdlAddress: PublicKey;
|
||||||
programState: PublicKey;
|
switchboardProgramState: PublicKey;
|
||||||
switchboardVault: PublicKey;
|
switchboardVault: PublicKey;
|
||||||
switchboardMint: PublicKey;
|
switchboardMint: PublicKey;
|
||||||
tokenWallet: PublicKey;
|
tokenWallet: PublicKey;
|
||||||
queue: PublicKey;
|
oracleQueue: PublicKey;
|
||||||
queueAuthority: PublicKey;
|
oracleQueueAuthority: PublicKey;
|
||||||
queueBuffer: PublicKey;
|
oracleQueueBuffer: PublicKey;
|
||||||
crank: PublicKey;
|
crank: PublicKey;
|
||||||
crankBuffer: PublicKey;
|
crankBuffer: PublicKey;
|
||||||
oracle: PublicKey;
|
oracle: PublicKey;
|
||||||
|
@ -189,16 +189,16 @@ export interface ISwitchboardTestEnvironment {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SwitchboardTestEnvironment implements ISwitchboardTestEnvironment {
|
export class SwitchboardTestEnvironment implements ISwitchboardTestEnvironment {
|
||||||
programId: PublicKey;
|
switchboardProgramId: PublicKey;
|
||||||
programDataAddress: PublicKey;
|
switchboardProgramDataAddress: PublicKey;
|
||||||
idlAddress: PublicKey;
|
switchboardIdlAddress: PublicKey;
|
||||||
programState: PublicKey;
|
switchboardProgramState: PublicKey;
|
||||||
switchboardVault: PublicKey;
|
switchboardVault: PublicKey;
|
||||||
switchboardMint: PublicKey;
|
switchboardMint: PublicKey;
|
||||||
tokenWallet: PublicKey;
|
tokenWallet: PublicKey;
|
||||||
queue: PublicKey;
|
oracleQueue: PublicKey;
|
||||||
queueAuthority: PublicKey;
|
oracleQueueAuthority: PublicKey;
|
||||||
queueBuffer: PublicKey;
|
oracleQueueBuffer: PublicKey;
|
||||||
crank: PublicKey;
|
crank: PublicKey;
|
||||||
crankBuffer: PublicKey;
|
crankBuffer: PublicKey;
|
||||||
oracle: PublicKey;
|
oracle: PublicKey;
|
||||||
|
@ -208,16 +208,16 @@ export class SwitchboardTestEnvironment implements ISwitchboardTestEnvironment {
|
||||||
payerKeypairPath: string;
|
payerKeypairPath: string;
|
||||||
|
|
||||||
constructor(ctx: ISwitchboardTestEnvironment) {
|
constructor(ctx: ISwitchboardTestEnvironment) {
|
||||||
this.programId = ctx.programId;
|
this.switchboardProgramId = ctx.switchboardProgramId;
|
||||||
this.programDataAddress = ctx.programDataAddress;
|
this.switchboardProgramDataAddress = ctx.switchboardProgramDataAddress;
|
||||||
this.idlAddress = ctx.idlAddress;
|
this.switchboardIdlAddress = ctx.switchboardIdlAddress;
|
||||||
this.programState = ctx.programState;
|
this.switchboardProgramState = ctx.switchboardProgramState;
|
||||||
this.switchboardVault = ctx.switchboardVault;
|
this.switchboardVault = ctx.switchboardVault;
|
||||||
this.switchboardMint = ctx.switchboardMint;
|
this.switchboardMint = ctx.switchboardMint;
|
||||||
this.tokenWallet = ctx.tokenWallet;
|
this.tokenWallet = ctx.tokenWallet;
|
||||||
this.queue = ctx.queue;
|
this.oracleQueue = ctx.oracleQueue;
|
||||||
this.queueAuthority = ctx.queueAuthority;
|
this.oracleQueueAuthority = ctx.oracleQueueAuthority;
|
||||||
this.queueBuffer = ctx.queueBuffer;
|
this.oracleQueueBuffer = ctx.oracleQueueBuffer;
|
||||||
this.crank = ctx.crank;
|
this.crank = ctx.crank;
|
||||||
this.crankBuffer = ctx.crankBuffer;
|
this.crankBuffer = ctx.crankBuffer;
|
||||||
this.oracle = ctx.oracle;
|
this.oracle = ctx.oracle;
|
||||||
|
@ -317,16 +317,16 @@ docker-compose -f "$script_dir"/docker-compose.switchboard.yml up`;
|
||||||
|
|
||||||
public toJSON(): ISwitchboardTestEnvironment {
|
public toJSON(): ISwitchboardTestEnvironment {
|
||||||
return {
|
return {
|
||||||
programId: this.programId,
|
switchboardProgramId: this.switchboardProgramId,
|
||||||
programDataAddress: this.programDataAddress,
|
switchboardProgramDataAddress: this.switchboardProgramDataAddress,
|
||||||
idlAddress: this.idlAddress,
|
switchboardIdlAddress: this.switchboardIdlAddress,
|
||||||
programState: this.programState,
|
switchboardProgramState: this.switchboardProgramState,
|
||||||
switchboardVault: this.switchboardVault,
|
switchboardVault: this.switchboardVault,
|
||||||
switchboardMint: this.switchboardMint,
|
switchboardMint: this.switchboardMint,
|
||||||
tokenWallet: this.tokenWallet,
|
tokenWallet: this.tokenWallet,
|
||||||
queue: this.queue,
|
oracleQueue: this.oracleQueue,
|
||||||
queueAuthority: this.queueAuthority,
|
oracleQueueAuthority: this.oracleQueueAuthority,
|
||||||
queueBuffer: this.queueBuffer,
|
oracleQueueBuffer: this.oracleQueueBuffer,
|
||||||
crank: this.crank,
|
crank: this.crank,
|
||||||
crankBuffer: this.crankBuffer,
|
crankBuffer: this.crankBuffer,
|
||||||
oracle: this.oracle,
|
oracle: this.oracle,
|
||||||
|
|
Loading…
Reference in New Issue