sdk/ccq: refine dependencies
This commit is contained in:
parent
5a5946e7c4
commit
e3471a952e
|
@ -1,3 +1,11 @@
|
||||||
|
## 0.0.3
|
||||||
|
|
||||||
|
Explicitly import buffer
|
||||||
|
|
||||||
|
## 0.0.2
|
||||||
|
|
||||||
|
Switch out web3.utils.keccak256 for @ethersproject/keccak256
|
||||||
|
|
||||||
## 0.0.1
|
## 0.0.1
|
||||||
|
|
||||||
Initial release
|
Initial release
|
||||||
|
|
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.1",
|
"version": "0.0.3",
|
||||||
"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",
|
||||||
|
@ -28,12 +28,14 @@
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
"ts-jest": "^29.1.0",
|
"ts-jest": "^29.1.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.1.3"
|
"typescript": "^5.1.3",
|
||||||
|
"web3": "^4.1.2"
|
||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ethersproject/keccak256": "^5.7.0",
|
||||||
"@types/elliptic": "^6.4.14",
|
"@types/elliptic": "^6.4.14",
|
||||||
"elliptic": "^6.5.4",
|
"buffer": "^6.0.3",
|
||||||
"web3": "^4.1.2"
|
"elliptic": "^6.5.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { Buffer } from "buffer";
|
||||||
|
|
||||||
// BinaryWriter appends data to the end of a buffer, resizing the buffer as needed
|
// BinaryWriter appends data to the end of a buffer, resizing the buffer as needed
|
||||||
// Numbers are encoded as big endian
|
// Numbers are encoded as big endian
|
||||||
export class BinaryWriter {
|
export class BinaryWriter {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Buffer } from "buffer";
|
||||||
import { BinaryWriter } from "./BinaryWriter";
|
import { BinaryWriter } from "./BinaryWriter";
|
||||||
import { HexString } from "./consts";
|
import { HexString } from "./consts";
|
||||||
import { ChainQueryType, ChainSpecificQuery } from "./request";
|
import { ChainQueryType, ChainSpecificQuery } from "./request";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Buffer } from "buffer";
|
||||||
import { BinaryWriter } from "./BinaryWriter";
|
import { BinaryWriter } from "./BinaryWriter";
|
||||||
import { BlockTag, EthCallData } from "./ethCall";
|
import { BlockTag, EthCallData } from "./ethCall";
|
||||||
import { ChainQueryType, ChainSpecificQuery } from "./request";
|
import { ChainQueryType, ChainSpecificQuery } from "./request";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { keccak256 } from "@ethersproject/keccak256";
|
||||||
|
import { Buffer } from "buffer";
|
||||||
import { BinaryWriter } from "./BinaryWriter";
|
import { BinaryWriter } from "./BinaryWriter";
|
||||||
import { Network } from "./consts";
|
import { Network } from "./consts";
|
||||||
import { utils } from "web3";
|
|
||||||
import { hexToUint8Array } from "./utils";
|
import { hexToUint8Array } from "./utils";
|
||||||
|
|
||||||
export const MAINNET_QUERY_REQUEST_PREFIX =
|
export const MAINNET_QUERY_REQUEST_PREFIX =
|
||||||
|
@ -41,7 +42,7 @@ export class QueryRequest {
|
||||||
static digest(network: Network, bytes: Uint8Array): Uint8Array {
|
static digest(network: Network, bytes: Uint8Array): Uint8Array {
|
||||||
const prefix = getPrefix(network);
|
const prefix = getPrefix(network);
|
||||||
const data = Buffer.concat([Buffer.from(prefix), bytes]);
|
const data = Buffer.concat([Buffer.from(prefix), bytes]);
|
||||||
return hexToUint8Array(utils.keccak256(data).slice(2));
|
return hexToUint8Array(keccak256(data).slice(2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Buffer } from "buffer";
|
||||||
import * as elliptic from "elliptic";
|
import * as elliptic from "elliptic";
|
||||||
|
|
||||||
export function isValidHexString(s: string): boolean {
|
export function isValidHexString(s: string): boolean {
|
||||||
|
|
Loading…
Reference in New Issue