clients/js: Update wormhole-sdk to 0.9.8
This commit is contained in:
parent
cf5187b90c
commit
26ee5e8e10
|
@ -29,11 +29,8 @@ import { NETWORKS } from "./networks";
|
||||||
import base58 from "bs58";
|
import base58 from "bs58";
|
||||||
import { sha3_256 } from "js-sha3";
|
import { sha3_256 } from "js-sha3";
|
||||||
import { isOutdated } from "./cmds/update";
|
import { isOutdated } from "./cmds/update";
|
||||||
import { setDefaultWasm } from "@certusone/wormhole-sdk/lib/cjs/solana/wasm";
|
|
||||||
import { assertChain, assertEVMChain, ChainName, CHAINS, CONTRACTS as SDK_CONTRACTS, isCosmWasmChain, isEVMChain, isTerraChain, toChainId, toChainName } from "@certusone/wormhole-sdk/lib/cjs/utils/consts";
|
import { assertChain, assertEVMChain, ChainName, CHAINS, CONTRACTS as SDK_CONTRACTS, isCosmWasmChain, isEVMChain, isTerraChain, toChainId, toChainName } from "@certusone/wormhole-sdk/lib/cjs/utils/consts";
|
||||||
|
|
||||||
setDefaultWasm("node");
|
|
||||||
|
|
||||||
if (isOutdated()) {
|
if (isOutdated()) {
|
||||||
console.error(
|
console.error(
|
||||||
"\x1b[33m%s\x1b[0m",
|
"\x1b[33m%s\x1b[0m",
|
||||||
|
@ -886,6 +883,8 @@ yargs(hideBin(process.argv))
|
||||||
);
|
);
|
||||||
} else if (chain === "wormchain") {
|
} else if (chain === "wormchain") {
|
||||||
throw Error("Wormchain is not supported yet");
|
throw Error("Wormchain is not supported yet");
|
||||||
|
} else if (chain === "btc") {
|
||||||
|
throw Error("BTC is not supported yet")
|
||||||
} else {
|
} else {
|
||||||
// If you get a type error here, hover over `chain`'s type and it tells you
|
// If you get a type error here, hover over `chain`'s type and it tells you
|
||||||
// which cases are not handled
|
// which cases are not handled
|
||||||
|
@ -931,6 +930,8 @@ function parseAddress(chain: ChainName, address: string): string {
|
||||||
} else if (chain === "wormchain") {
|
} else if (chain === "wormchain") {
|
||||||
const sdk = require("@certusone/wormhole-sdk/lib/cjs/utils/array")
|
const sdk = require("@certusone/wormhole-sdk/lib/cjs/utils/array")
|
||||||
return "0x" + sdk.tryNativeToHexString(address, chain);
|
return "0x" + sdk.tryNativeToHexString(address, chain);
|
||||||
|
} else if (chain == "btc") {
|
||||||
|
throw Error("BTC is not supported yet")
|
||||||
} else {
|
} else {
|
||||||
impossible(chain);
|
impossible(chain);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
||||||
"@certusone/wormhole-sdk": "^0.9.2",
|
"@certusone/wormhole-sdk": "^0.9.8",
|
||||||
"@cosmjs/encoding": "^0.26.2",
|
"@cosmjs/encoding": "^0.26.2",
|
||||||
"@injectivelabs/networks": "^1.0.52",
|
"@injectivelabs/networks": "^1.0.52",
|
||||||
"@injectivelabs/sdk-ts": "^1.0.289",
|
"@injectivelabs/sdk-ts": "^1.0.289",
|
||||||
|
@ -524,13 +524,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@certusone/wormhole-sdk": {
|
"node_modules/@certusone/wormhole-sdk": {
|
||||||
"version": "0.9.2",
|
"version": "0.9.8",
|
||||||
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.9.8.tgz",
|
||||||
"integrity": "sha512-Ffpn4ialdgpN/0q+IyduKlhecrwysRh/kGkpLPn+ox0QF1i8Q5cByWLwhoGY+kNONTEcHhwkUEhFdrMrMR7PRw==",
|
"integrity": "sha512-Ck93es/4TxsYTVcFxEOQumXlxJm10AHMuDdUzwg+wNGYXLKlHEksrWdEUoeJ0o1HIEnIAT33g0q/bmCq8rlWzg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certusone/wormhole-sdk-proto-web": "0.0.6",
|
"@certusone/wormhole-sdk-proto-web": "0.0.6",
|
||||||
"@certusone/wormhole-sdk-wasm": "^0.0.1",
|
"@certusone/wormhole-sdk-wasm": "^0.0.1",
|
||||||
"@injectivelabs/sdk-ts": "^1.0.211",
|
"@coral-xyz/borsh": "0.2.6",
|
||||||
|
"@injectivelabs/networks": "^1.0.52",
|
||||||
|
"@injectivelabs/sdk-ts": "1.0.289",
|
||||||
|
"@injectivelabs/utils": "1.0.45",
|
||||||
"@project-serum/anchor": "^0.25.0",
|
"@project-serum/anchor": "^0.25.0",
|
||||||
"@solana/spl-token": "^0.3.5",
|
"@solana/spl-token": "^0.3.5",
|
||||||
"@solana/web3.js": "^1.66.2",
|
"@solana/web3.js": "^1.66.2",
|
||||||
|
@ -541,6 +544,7 @@
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"bech32": "^2.0.0",
|
"bech32": "^2.0.0",
|
||||||
"binary-parser": "^2.2.1",
|
"binary-parser": "^2.2.1",
|
||||||
|
"bs58": "^4.0.1",
|
||||||
"elliptic": "^6.5.4",
|
"elliptic": "^6.5.4",
|
||||||
"js-base64": "^3.6.1",
|
"js-base64": "^3.6.1",
|
||||||
"near-api-js": "^1.0.0"
|
"near-api-js": "^1.0.0"
|
||||||
|
@ -640,6 +644,21 @@
|
||||||
"tweetnacl": "^1.0.1"
|
"tweetnacl": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@coral-xyz/borsh": {
|
||||||
|
"version": "0.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.2.6.tgz",
|
||||||
|
"integrity": "sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==",
|
||||||
|
"dependencies": {
|
||||||
|
"bn.js": "^5.1.2",
|
||||||
|
"buffer-layout": "^1.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@solana/web3.js": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@cosmjs/encoding": {
|
"node_modules/@cosmjs/encoding": {
|
||||||
"version": "0.26.8",
|
"version": "0.26.8",
|
||||||
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.8.tgz",
|
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.8.tgz",
|
||||||
|
@ -9341,13 +9360,16 @@
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
"@certusone/wormhole-sdk": {
|
"@certusone/wormhole-sdk": {
|
||||||
"version": "0.9.2",
|
"version": "0.9.8",
|
||||||
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/@certusone/wormhole-sdk/-/wormhole-sdk-0.9.8.tgz",
|
||||||
"integrity": "sha512-Ffpn4ialdgpN/0q+IyduKlhecrwysRh/kGkpLPn+ox0QF1i8Q5cByWLwhoGY+kNONTEcHhwkUEhFdrMrMR7PRw==",
|
"integrity": "sha512-Ck93es/4TxsYTVcFxEOQumXlxJm10AHMuDdUzwg+wNGYXLKlHEksrWdEUoeJ0o1HIEnIAT33g0q/bmCq8rlWzg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@certusone/wormhole-sdk-proto-web": "0.0.6",
|
"@certusone/wormhole-sdk-proto-web": "0.0.6",
|
||||||
"@certusone/wormhole-sdk-wasm": "^0.0.1",
|
"@certusone/wormhole-sdk-wasm": "^0.0.1",
|
||||||
"@injectivelabs/sdk-ts": "^1.0.211",
|
"@coral-xyz/borsh": "0.2.6",
|
||||||
|
"@injectivelabs/networks": "^1.0.52",
|
||||||
|
"@injectivelabs/sdk-ts": "1.0.289",
|
||||||
|
"@injectivelabs/utils": "1.0.45",
|
||||||
"@project-serum/anchor": "^0.25.0",
|
"@project-serum/anchor": "^0.25.0",
|
||||||
"@solana/spl-token": "^0.3.5",
|
"@solana/spl-token": "^0.3.5",
|
||||||
"@solana/web3.js": "^1.66.2",
|
"@solana/web3.js": "^1.66.2",
|
||||||
|
@ -9358,6 +9380,7 @@
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"bech32": "^2.0.0",
|
"bech32": "^2.0.0",
|
||||||
"binary-parser": "^2.2.1",
|
"binary-parser": "^2.2.1",
|
||||||
|
"bs58": "^4.0.1",
|
||||||
"elliptic": "^6.5.4",
|
"elliptic": "^6.5.4",
|
||||||
"js-base64": "^3.6.1",
|
"js-base64": "^3.6.1",
|
||||||
"near-api-js": "^1.0.0"
|
"near-api-js": "^1.0.0"
|
||||||
|
@ -9451,6 +9474,15 @@
|
||||||
"@types/node": "^18.0.3"
|
"@types/node": "^18.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@coral-xyz/borsh": {
|
||||||
|
"version": "0.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.2.6.tgz",
|
||||||
|
"integrity": "sha512-y6nmHw1bFcJib7sMHsQPpC8r47xhqDZVvhUdna7NUPzpSbOZG6f46N21+aXsQ2w/tG8Ggls488J/ZmwbgVmyjg==",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "^5.1.2",
|
||||||
|
"buffer-layout": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@cosmjs/encoding": {
|
"@cosmjs/encoding": {
|
||||||
"version": "0.26.8",
|
"version": "0.26.8",
|
||||||
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.8.tgz",
|
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.8.tgz",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
||||||
"@certusone/wormhole-sdk": "^0.9.2",
|
"@certusone/wormhole-sdk": "^0.9.8",
|
||||||
"@cosmjs/encoding": "^0.26.2",
|
"@cosmjs/encoding": "^0.26.2",
|
||||||
"@injectivelabs/networks": "^1.0.52",
|
"@injectivelabs/networks": "^1.0.52",
|
||||||
"@injectivelabs/sdk-ts": "^1.0.289",
|
"@injectivelabs/sdk-ts": "^1.0.289",
|
||||||
|
|
Loading…
Reference in New Issue