Queries/SDK: Update Solana SDK (#4180)
This commit is contained in:
parent
db19128b6a
commit
6c484440ed
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@wormhole-foundation/wormhole-query-sdk",
|
"name": "@wormhole-foundation/wormhole-query-sdk",
|
||||||
"version": "0.0.13",
|
"version": "0.0.14",
|
||||||
"description": "Wormhole cross-chain query SDK",
|
"description": "Wormhole cross-chain query SDK",
|
||||||
"homepage": "https://wormhole.com",
|
"homepage": "https://wormhole.com",
|
||||||
"main": "./lib/cjs/index.js",
|
"main": "./lib/cjs/index.js",
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ethersproject/keccak256": "^5.7.0",
|
"@ethersproject/keccak256": "^5.7.0",
|
||||||
"@solana/web3.js": "^1.66.2",
|
"@solana/addresses": "^2.0.0",
|
||||||
"@types/elliptic": "^6.4.14",
|
"@types/elliptic": "^6.4.14",
|
||||||
"axios": "^1.6.7",
|
"axios": "^1.6.7",
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
} from "../query";
|
} from "../query";
|
||||||
import { BinaryWriter } from "../query/BinaryWriter";
|
import { BinaryWriter } from "../query/BinaryWriter";
|
||||||
|
|
||||||
import { PublicKey } from "@solana/web3.js";
|
import { getAddressDecoder, getProgramDerivedAddress } from "@solana/addresses";
|
||||||
|
|
||||||
// (2**64)-1
|
// (2**64)-1
|
||||||
const SOLANA_MAX_RENT_EPOCH = BigInt("18446744073709551615");
|
const SOLANA_MAX_RENT_EPOCH = BigInt("18446744073709551615");
|
||||||
|
@ -515,18 +515,18 @@ export class QueryProxyMock {
|
||||||
|
|
||||||
let accounts: string[] = [];
|
let accounts: string[] = [];
|
||||||
let bumps: number[] = [];
|
let bumps: number[] = [];
|
||||||
query.pdas.forEach((pda) => {
|
for (const pda of query.pdas) {
|
||||||
if (pda.programAddress.length != 32) {
|
if (pda.programAddress.length != 32) {
|
||||||
throw new Error(`invalid program address length`);
|
throw new Error(`invalid program address length`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const [acct, bump] = PublicKey.findProgramAddressSync(
|
const [acct, bump] = await getProgramDerivedAddress({
|
||||||
pda.seeds,
|
programAddress: getAddressDecoder().decode(pda.programAddress),
|
||||||
new PublicKey(pda.programAddress)
|
seeds: pda.seeds,
|
||||||
);
|
});
|
||||||
accounts.push(acct.toString());
|
accounts.push(acct);
|
||||||
bumps.push(bump);
|
bumps.push(bump);
|
||||||
});
|
}
|
||||||
|
|
||||||
let opts: SolanaGetMultipleAccountsOpts = {
|
let opts: SolanaGetMultipleAccountsOpts = {
|
||||||
commitment: query.commitment,
|
commitment: query.commitment,
|
||||||
|
|
Loading…
Reference in New Issue