sdk/js: injective package bump

This commit is contained in:
Bojan Angjelkoski 2022-12-14 13:53:35 +01:00 committed by Evan Gray
parent c8da62e383
commit 612ae1a7e5
10 changed files with 320 additions and 993 deletions

View File

@ -1,12 +1,12 @@
import { getNetworkInfo, Network } from "@injectivelabs/networks";
import { DEFAULT_STD_FEE } from "@injectivelabs/utils";
import {
MsgExecuteContract,
DEFAULT_STD_FEE,
privateKeyToPublicKeyBase64,
ChainRestAuthApi,
PrivateKey,
TxGrpcClient,
ChainRestAuthApi,
createTransaction,
MsgExecuteContract,
} from "@injectivelabs/sdk-ts";
import { createTransaction, MsgArg, TxGrpcClient } from "@injectivelabs/tx-ts";
import { fromUint8Array } from "js-base64";
import { impossible, Payload } from "./vaa";
import { NETWORKS } from "./networks";
@ -31,11 +31,9 @@ export async function execute_injective(
const network = getNetworkInfo(endPoint);
const walletPKHash = n.key;
const walletPK = PrivateKey.fromPrivateKey(walletPKHash);
const walletPK = PrivateKey.fromHex(walletPKHash);
const walletInjAddr = walletPK.toBech32();
const walletPublicKey = privateKeyToPublicKeyBase64(
Buffer.from(walletPKHash, "hex")
);
const walletPublicKey = walletPK.toPublicKey().toBase64();
let target_contract: string;
let action: string;
@ -130,10 +128,10 @@ export async function execute_injective(
const transaction = MsgExecuteContract.fromJSON({
sender: walletInjAddr,
contractAddress: target_contract,
msg: {
exec: {
action,
...execute_msg[action],
},
action,
});
console.log("transaction:", transaction);
@ -143,7 +141,10 @@ export async function execute_injective(
const { signBytes, txRaw } = createTransaction({
message: transaction.toDirectSign(),
memo: "",
fee: DEFAULT_STD_FEE,
fee: {
...DEFAULT_STD_FEE,
gas: (parseInt(DEFAULT_STD_FEE.gas, 10) * 2.5).toString(),
},
pubKey: walletPublicKey,
sequence: parseInt(accountDetails.account.base_account.sequence, 10),
accountNumber: parseInt(
@ -186,7 +187,7 @@ export async function execute_injective(
console.log(`Transaction failed: ${txResponse.rawLog}`);
} else {
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
}
}

View File

@ -11,9 +11,9 @@
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
"@certusone/wormhole-sdk": "^0.9.2",
"@cosmjs/encoding": "^0.26.2",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/sdk-ts": "^1.0.211",
"@injectivelabs/tx-ts": "^1.0.43",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/sdk-ts": "^1.0.289",
"@injectivelabs/utils": "^1.0.45",
"@solana/web3.js": "^1.22.0",
"@terra-money/terra.js": "^3.1.3",
"@types/config": "^3.3.0",
@ -640,51 +640,6 @@
"tweetnacl": "^1.0.1"
}
},
"node_modules/@cosmjs/amino": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.4.tgz",
"integrity": "sha512-b8y5gFC0eGrH0IoYSNtDmTdsTgeQ1KFZ5YVOeIiKmzF91MeiciYO/MNqc027kctacZ+UbnVWGEUGyRBPi9ta/g==",
"dependencies": {
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4"
}
},
"node_modules/@cosmjs/amino/node_modules/@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"dependencies": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
}
},
"node_modules/@cosmjs/crypto": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.4.tgz",
"integrity": "sha512-JRxNLlED3DDh9d04A0RcRw3mYkoobN7q7wafUFy3vI1TjoyWx33v0gqqaYE6/hoo9ghUrJSVOfzVihl8fZajJA==",
"dependencies": {
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"@noble/hashes": "^1",
"bn.js": "^5.2.0",
"elliptic": "^6.5.3",
"libsodium-wrappers": "^0.7.6"
}
},
"node_modules/@cosmjs/crypto/node_modules/@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"dependencies": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
}
},
"node_modules/@cosmjs/encoding": {
"version": "0.26.8",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.8.tgz",
@ -704,69 +659,6 @@
"xstream": "^11.14.0"
}
},
"node_modules/@cosmjs/math": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.4.tgz",
"integrity": "sha512-wsWjbxFXvk46Dsx8jQ5vsBZOIQuiUIyaaZbUvxsgIhAMpuuBnV5O/drK87+B+4cL+umTelFqTbWnkqueVCIFxQ==",
"dependencies": {
"bn.js": "^5.2.0"
}
},
"node_modules/@cosmjs/proto-signing": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.4.tgz",
"integrity": "sha512-4vgCLK9gOsdWzD78V5XbAsupSSyntPEzokWYhgRQNwgVTcKX1kg0eKZqUvF5ua5iL9x6MevfH/sgwPyiYleMBw==",
"dependencies": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"cosmjs-types": "^0.4.0",
"long": "^4.0.0",
"protobufjs": "~6.10.2"
}
},
"node_modules/@cosmjs/proto-signing/node_modules/@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"dependencies": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
}
},
"node_modules/@cosmjs/proto-signing/node_modules/@types/node": {
"version": "13.13.52",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz",
"integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ=="
},
"node_modules/@cosmjs/proto-signing/node_modules/protobufjs": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.3.tgz",
"integrity": "sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==",
"hasInstallScript": true,
"dependencies": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
"@protobufjs/codegen": "^2.0.4",
"@protobufjs/eventemitter": "^1.1.0",
"@protobufjs/fetch": "^1.1.0",
"@protobufjs/float": "^1.0.2",
"@protobufjs/inquire": "^1.1.0",
"@protobufjs/path": "^1.1.2",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0",
"@types/long": "^4.0.1",
"@types/node": "^13.7.0",
"long": "^4.0.0"
},
"bin": {
"pbjs": "bin/pbjs",
"pbts": "bin/pbts"
}
},
"node_modules/@cosmjs/socket": {
"version": "0.29.3",
"resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.29.3.tgz",
@ -848,11 +740,6 @@
"follow-redirects": "^1.14.0"
}
},
"node_modules/@cosmjs/utils": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.4.tgz",
"integrity": "sha512-lb3TU6833arPoPZF8HTeG9V418CpurvqH5Aa/ls0I0wYdPDEMO6622+PQNQhQ8Vw8Az2MXoSyc8jsqrgawT84Q=="
},
"node_modules/@cspotcode/source-map-consumer": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz",
@ -2012,9 +1899,9 @@
}
},
"node_modules/@injectivelabs/chain-api": {
"version": "1.8.2-no-tse",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2-no-tse.tgz",
"integrity": "sha512-ccFdkApkyKqAqhv6J8bUg9UFdtZelMEJyjk7RflxfxK3te8kKvIC4wA65sDKSVO1dZkrZFeKjunnIuW+dydNdA==",
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.3.tgz",
"integrity": "sha512-BIg87F9BTA5njxtvOkEOIHl/gpmsqnFpHJm1SrN6IHUsW97/Zj3jXdYOy9p4WCfgxC2VZC/5IOPnwyrLwSyCWg==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
@ -2032,13 +1919,13 @@
}
},
"node_modules/@injectivelabs/exceptions": {
"version": "1.0.27",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.27.tgz",
"integrity": "sha512-0IAQRMGI0v2CxEO6F7DlTDKjIiXxgEu7S12RWtTwNLLIM7XsoM8QaU4iW3J9yVdoZ3fR1PtSJP29HjXCF7kk2Q==",
"version": "1.0.32",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.32.tgz",
"integrity": "sha512-g+7UIoVL6v5OIdRrJSWLoyfHYIpey3BpWwxeUpFwXyRBkzalHPkVyYnmx1twOJd6lZyhfZWG0k9M5PcJBsrDIw==",
"hasInstallScript": true,
"dependencies": {
"@improbable-eng/grpc-web": "^0.15.0",
"@injectivelabs/ts-types": "^1.0.16",
"@injectivelabs/ts-types": "^1.0.18",
"http-status-codes": "^2.2.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
@ -2056,30 +1943,40 @@
}
},
"node_modules/@injectivelabs/indexer-api": {
"version": "1.0.31",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.31.tgz",
"integrity": "sha512-OtUiAsj41fIOfLQFQTAUBG/vJj5eKwzPNcUjCLBoiYZmGSwaWXVe9aTqtlbIP0Z+vmKreI1v6cwacNaxZnACVw==",
"version": "1.0.32-rc",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.32-rc.tgz",
"integrity": "sha512-LNU4lZMhVXN4b9w72SAcVIesyD9We3Oq466KHDOd2S9asnNjO6EuQ4EtA2l4qiIvIat9Gh9/VZOfSXguTlVp8g==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/networks": {
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.37.tgz",
"integrity": "sha512-OUXMrJpOls18ksOhJJU00di1YXmaEQfIGo0BKVv9XFFAbi5d10hV4mrVfL/7Pnt4dALmBeXn8B0IalEr4HeCOw==",
"version": "1.0.52",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.52.tgz",
"integrity": "sha512-Uyo+4betZY3+jqc2rTVu6SjVTrdojP5fFgE0ItRlszmWfk9vcU15cxKS2o5M+wukKAYdeUSeeWTgOds20QIxnw==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/ninja-api": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@injectivelabs/ninja-api/-/ninja-api-1.0.10.tgz",
"integrity": "sha512-S5XCB97mCHEAgGzFAaI3n3uYx07RF6ch21chASekVBN9tNnSAgCKK8uOZ5rR838Yro+YgjENUCYiQcoMMIO1xg==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/sdk-ts": {
"version": "1.0.211",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.211.tgz",
"integrity": "sha512-3gSniUGTC4qkBj23sAfvpUkP65hgLj3a07HF7xHQZRRuy17REuRXh1FZUjKbVn3ygWYMN46xy6eMVs/nw6ImtQ==",
"version": "1.0.289",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.289.tgz",
"integrity": "sha512-O1cTY50hnowiSkBCmafomFcWlhsuXvb7f8oXXvBscPiT0talPLwm2iASQ8FKu1xspKwU5s6VTkTGL4Bk8XAzTQ==",
"hasInstallScript": true,
"dependencies": {
"@apollo/client": "^3.5.8",
@ -2090,13 +1987,14 @@
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@improbable-eng/grpc-web-react-native-transport": "^0.15.0",
"@injectivelabs/chain-api": "1.8.2-no-tse",
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/indexer-api": "1.0.31",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/token-metadata": "^1.0.51",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/chain-api": "1.8.3",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/indexer-api": "1.0.32-rc",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ninja-api": "^1.0.10",
"@injectivelabs/token-metadata": "^1.0.77",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"@metamask/eth-sig-util": "^4.0.1",
"@types/google-protobuf": "^3.15.5",
"axios": "^0.27.2",
@ -2542,18 +2440,6 @@
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/sdk-ts/node_modules/@injectivelabs/networks": {
"version": "1.0.39",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.39.tgz",
"integrity": "sha512-vRm/br12A4jwm8+0P7aMxNUMgCI6M0Ywi7ov7KMQKm55AE8AfKvxhe9ENUkp5iI2mV2cyTRLA5eu6WMQn4nYjw==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/exceptions": "^1.0.27",
"@injectivelabs/utils": "^1.0.33",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/sdk-ts/node_modules/axios": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
@ -2673,13 +2559,13 @@
}
},
"node_modules/@injectivelabs/token-metadata": {
"version": "1.0.53",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.53.tgz",
"integrity": "sha512-pv4FHjyYhuHxAuiCxTvAfVt8utJxlQIWQdhwsenSdFyY5lU6Hbp/hh1CYZQbUoEswuQiJI4xLzO09lG9m+9plA==",
"version": "1.0.77",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.77.tgz",
"integrity": "sha512-Mto59nTro4bHgLSkOJl7gkmKVGj32VvHSxE6MsMHjHa5OEZPt+BlLLYIb/WLE7KgaTbOpG9BUAutrHjghmxVlg==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/networks": "^1.0.39",
"@injectivelabs/ts-types": "^1.0.16",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ts-types": "^1.0.18",
"@types/lodash.values": "^4.3.6",
"copyfiles": "^2.4.1",
"jsonschema": "^1.4.0",
@ -2689,88 +2575,24 @@
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/token-metadata/node_modules/@injectivelabs/networks": {
"version": "1.0.39",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.39.tgz",
"integrity": "sha512-vRm/br12A4jwm8+0P7aMxNUMgCI6M0Ywi7ov7KMQKm55AE8AfKvxhe9ENUkp5iI2mV2cyTRLA5eu6WMQn4nYjw==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/exceptions": "^1.0.27",
"@injectivelabs/utils": "^1.0.33",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/ts-types": {
"version": "1.0.16",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.16.tgz",
"integrity": "sha512-hoHqr4DeUGUt7Ljh7V6+2twW9Lb6YvORzOXO+vbWFwMamlY8FxxM1C4CPFR5qcx44QFRd6EHVK1NzBay6+4UBQ==",
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.18.tgz",
"integrity": "sha512-fffgHjSmssLXBiI6Z/K7JuBOKTnsDm3h6ysQ5KRasmSY3NDuMCAQ5URForvdOQ38SKvhMquxQus5a+tZIWnHfg==",
"hasInstallScript": true,
"dependencies": {
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/tx-ts": {
"version": "1.0.43",
"resolved": "https://registry.npmjs.org/@injectivelabs/tx-ts/-/tx-ts-1.0.43.tgz",
"integrity": "sha512-1agBb1qq1NmmIuVVn2ay1CP9TcGBon0JA3STse+/IxnQ3YD+I9/X7bqEPANYldlJARzwmlJIlVgb8p/PYX4fTw==",
"hasInstallScript": true,
"dependencies": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/proto-signing": "0.28.4",
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@injectivelabs/chain-api": "^1.8.0-rc8",
"@injectivelabs/ts-types": "^1.0.13",
"@injectivelabs/utils": "^1.0.20",
"google-protobuf": "^3.20.1",
"jscrypto": "^1.0.3",
"keccak256": "^1.0.6",
"link-module-alias": "^1.2.0",
"sha3": "^2.1.4",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/tx-ts/node_modules/@improbable-eng/grpc-web": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz",
"integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==",
"dependencies": {
"browser-headers": "^0.4.1"
},
"peerDependencies": {
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/tx-ts/node_modules/@injectivelabs/chain-api": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2.tgz",
"integrity": "sha512-XJ6GXTxVnpgRLEWdEvemqJkFzxwjUFbPwR6fQN6XZ0P7kWFN0GlFbayNek38Jk79n3ue39tdRAnZ69yQKTce5w==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
}
},
"node_modules/@injectivelabs/tx-ts/node_modules/@injectivelabs/chain-api/node_modules/@improbable-eng/grpc-web": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz",
"integrity": "sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg==",
"dependencies": {
"browser-headers": "^0.4.0"
},
"peerDependencies": {
"google-protobuf": "^3.2.0"
}
},
"node_modules/@injectivelabs/utils": {
"version": "1.0.33",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.33.tgz",
"integrity": "sha512-GDhtu3Vc0ZXRMQ8cUuImPiUMmQJwyLONDYs7VW/Ln262wHNvbImeuGGeJ+HQjON7feRfA0xXCqv2ZISdfVBIIg==",
"version": "1.0.45",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.45.tgz",
"integrity": "sha512-ndmsKAMrQVbwh6BU5HMbuZQilfpMZVNwwO8m8OjQtvUm0lQ0HyEkugJd20HwcX2K3k+fSq/OlVy0F9gab8Cp6Q==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/exceptions": "^1.0.27",
"@injectivelabs/ts-types": "^1.0.16",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"axios": "^0.21.1",
"bignumber.js": "^9.0.1",
"link-module-alias": "^1.2.0",
@ -4392,15 +4214,6 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"node_modules/cosmjs-types": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
"integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
"dependencies": {
"long": "^4.0.0",
"protobufjs": "~6.11.2"
}
},
"node_modules/crc-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",
@ -9638,55 +9451,6 @@
"@types/node": "^18.0.3"
}
},
"@cosmjs/amino": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.4.tgz",
"integrity": "sha512-b8y5gFC0eGrH0IoYSNtDmTdsTgeQ1KFZ5YVOeIiKmzF91MeiciYO/MNqc027kctacZ+UbnVWGEUGyRBPi9ta/g==",
"requires": {
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4"
},
"dependencies": {
"@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"requires": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
}
}
}
},
"@cosmjs/crypto": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.4.tgz",
"integrity": "sha512-JRxNLlED3DDh9d04A0RcRw3mYkoobN7q7wafUFy3vI1TjoyWx33v0gqqaYE6/hoo9ghUrJSVOfzVihl8fZajJA==",
"requires": {
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"@noble/hashes": "^1",
"bn.js": "^5.2.0",
"elliptic": "^6.5.3",
"libsodium-wrappers": "^0.7.6"
},
"dependencies": {
"@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"requires": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
}
}
}
},
"@cosmjs/encoding": {
"version": "0.26.8",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.8.tgz",
@ -9706,66 +9470,6 @@
"xstream": "^11.14.0"
}
},
"@cosmjs/math": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.4.tgz",
"integrity": "sha512-wsWjbxFXvk46Dsx8jQ5vsBZOIQuiUIyaaZbUvxsgIhAMpuuBnV5O/drK87+B+4cL+umTelFqTbWnkqueVCIFxQ==",
"requires": {
"bn.js": "^5.2.0"
}
},
"@cosmjs/proto-signing": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.4.tgz",
"integrity": "sha512-4vgCLK9gOsdWzD78V5XbAsupSSyntPEzokWYhgRQNwgVTcKX1kg0eKZqUvF5ua5iL9x6MevfH/sgwPyiYleMBw==",
"requires": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"cosmjs-types": "^0.4.0",
"long": "^4.0.0",
"protobufjs": "~6.10.2"
},
"dependencies": {
"@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"requires": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
}
},
"@types/node": {
"version": "13.13.52",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz",
"integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ=="
},
"protobufjs": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.3.tgz",
"integrity": "sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==",
"requires": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
"@protobufjs/codegen": "^2.0.4",
"@protobufjs/eventemitter": "^1.1.0",
"@protobufjs/fetch": "^1.1.0",
"@protobufjs/float": "^1.0.2",
"@protobufjs/inquire": "^1.1.0",
"@protobufjs/path": "^1.1.2",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0",
"@types/long": "^4.0.1",
"@types/node": "^13.7.0",
"long": "^4.0.0"
}
}
}
},
"@cosmjs/socket": {
"version": "0.29.3",
"resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.29.3.tgz",
@ -9849,11 +9553,6 @@
}
}
},
"@cosmjs/utils": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.4.tgz",
"integrity": "sha512-lb3TU6833arPoPZF8HTeG9V418CpurvqH5Aa/ls0I0wYdPDEMO6622+PQNQhQ8Vw8Az2MXoSyc8jsqrgawT84Q=="
},
"@cspotcode/source-map-consumer": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz",
@ -10515,9 +10214,9 @@
"requires": {}
},
"@injectivelabs/chain-api": {
"version": "1.8.2-no-tse",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2-no-tse.tgz",
"integrity": "sha512-ccFdkApkyKqAqhv6J8bUg9UFdtZelMEJyjk7RflxfxK3te8kKvIC4wA65sDKSVO1dZkrZFeKjunnIuW+dydNdA==",
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.3.tgz",
"integrity": "sha512-BIg87F9BTA5njxtvOkEOIHl/gpmsqnFpHJm1SrN6IHUsW97/Zj3jXdYOy9p4WCfgxC2VZC/5IOPnwyrLwSyCWg==",
"requires": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
@ -10534,12 +10233,12 @@
}
},
"@injectivelabs/exceptions": {
"version": "1.0.27",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.27.tgz",
"integrity": "sha512-0IAQRMGI0v2CxEO6F7DlTDKjIiXxgEu7S12RWtTwNLLIM7XsoM8QaU4iW3J9yVdoZ3fR1PtSJP29HjXCF7kk2Q==",
"version": "1.0.32",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.32.tgz",
"integrity": "sha512-g+7UIoVL6v5OIdRrJSWLoyfHYIpey3BpWwxeUpFwXyRBkzalHPkVyYnmx1twOJd6lZyhfZWG0k9M5PcJBsrDIw==",
"requires": {
"@improbable-eng/grpc-web": "^0.15.0",
"@injectivelabs/ts-types": "^1.0.16",
"@injectivelabs/ts-types": "^1.0.18",
"http-status-codes": "^2.2.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
@ -10556,29 +10255,39 @@
}
},
"@injectivelabs/indexer-api": {
"version": "1.0.31",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.31.tgz",
"integrity": "sha512-OtUiAsj41fIOfLQFQTAUBG/vJj5eKwzPNcUjCLBoiYZmGSwaWXVe9aTqtlbIP0Z+vmKreI1v6cwacNaxZnACVw==",
"version": "1.0.32-rc",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.32-rc.tgz",
"integrity": "sha512-LNU4lZMhVXN4b9w72SAcVIesyD9We3Oq466KHDOd2S9asnNjO6EuQ4EtA2l4qiIvIat9Gh9/VZOfSXguTlVp8g==",
"requires": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"@injectivelabs/networks": {
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.37.tgz",
"integrity": "sha512-OUXMrJpOls18ksOhJJU00di1YXmaEQfIGo0BKVv9XFFAbi5d10hV4mrVfL/7Pnt4dALmBeXn8B0IalEr4HeCOw==",
"version": "1.0.52",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.52.tgz",
"integrity": "sha512-Uyo+4betZY3+jqc2rTVu6SjVTrdojP5fFgE0ItRlszmWfk9vcU15cxKS2o5M+wukKAYdeUSeeWTgOds20QIxnw==",
"requires": {
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"@injectivelabs/ninja-api": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@injectivelabs/ninja-api/-/ninja-api-1.0.10.tgz",
"integrity": "sha512-S5XCB97mCHEAgGzFAaI3n3uYx07RF6ch21chASekVBN9tNnSAgCKK8uOZ5rR838Yro+YgjENUCYiQcoMMIO1xg==",
"requires": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"@injectivelabs/sdk-ts": {
"version": "1.0.211",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.211.tgz",
"integrity": "sha512-3gSniUGTC4qkBj23sAfvpUkP65hgLj3a07HF7xHQZRRuy17REuRXh1FZUjKbVn3ygWYMN46xy6eMVs/nw6ImtQ==",
"version": "1.0.289",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.289.tgz",
"integrity": "sha512-O1cTY50hnowiSkBCmafomFcWlhsuXvb7f8oXXvBscPiT0talPLwm2iASQ8FKu1xspKwU5s6VTkTGL4Bk8XAzTQ==",
"requires": {
"@apollo/client": "^3.5.8",
"@cosmjs/amino": "^0.29.0",
@ -10588,13 +10297,14 @@
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@improbable-eng/grpc-web-react-native-transport": "^0.15.0",
"@injectivelabs/chain-api": "1.8.2-no-tse",
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/indexer-api": "1.0.31",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/token-metadata": "^1.0.51",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/chain-api": "1.8.3",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/indexer-api": "1.0.32-rc",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ninja-api": "^1.0.10",
"@injectivelabs/token-metadata": "^1.0.77",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"@metamask/eth-sig-util": "^4.0.1",
"@types/google-protobuf": "^3.15.5",
"axios": "^0.27.2",
@ -10901,17 +10611,6 @@
"browser-headers": "^0.4.1"
}
},
"@injectivelabs/networks": {
"version": "1.0.39",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.39.tgz",
"integrity": "sha512-vRm/br12A4jwm8+0P7aMxNUMgCI6M0Ywi7ov7KMQKm55AE8AfKvxhe9ENUkp5iI2mV2cyTRLA5eu6WMQn4nYjw==",
"requires": {
"@injectivelabs/exceptions": "^1.0.27",
"@injectivelabs/utils": "^1.0.33",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"axios": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
@ -11003,12 +10702,12 @@
}
},
"@injectivelabs/token-metadata": {
"version": "1.0.53",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.53.tgz",
"integrity": "sha512-pv4FHjyYhuHxAuiCxTvAfVt8utJxlQIWQdhwsenSdFyY5lU6Hbp/hh1CYZQbUoEswuQiJI4xLzO09lG9m+9plA==",
"version": "1.0.77",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.77.tgz",
"integrity": "sha512-Mto59nTro4bHgLSkOJl7gkmKVGj32VvHSxE6MsMHjHa5OEZPt+BlLLYIb/WLE7KgaTbOpG9BUAutrHjghmxVlg==",
"requires": {
"@injectivelabs/networks": "^1.0.39",
"@injectivelabs/ts-types": "^1.0.16",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ts-types": "^1.0.18",
"@types/lodash.values": "^4.3.6",
"copyfiles": "^2.4.1",
"jsonschema": "^1.4.0",
@ -11016,86 +10715,24 @@
"lodash": "^4.17.21",
"lodash.values": "^4.3.0",
"shx": "^0.3.2"
},
"dependencies": {
"@injectivelabs/networks": {
"version": "1.0.39",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.39.tgz",
"integrity": "sha512-vRm/br12A4jwm8+0P7aMxNUMgCI6M0Ywi7ov7KMQKm55AE8AfKvxhe9ENUkp5iI2mV2cyTRLA5eu6WMQn4nYjw==",
"requires": {
"@injectivelabs/exceptions": "^1.0.27",
"@injectivelabs/utils": "^1.0.33",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
}
}
},
"@injectivelabs/ts-types": {
"version": "1.0.16",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.16.tgz",
"integrity": "sha512-hoHqr4DeUGUt7Ljh7V6+2twW9Lb6YvORzOXO+vbWFwMamlY8FxxM1C4CPFR5qcx44QFRd6EHVK1NzBay6+4UBQ==",
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.18.tgz",
"integrity": "sha512-fffgHjSmssLXBiI6Z/K7JuBOKTnsDm3h6ysQ5KRasmSY3NDuMCAQ5URForvdOQ38SKvhMquxQus5a+tZIWnHfg==",
"requires": {
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"@injectivelabs/tx-ts": {
"version": "1.0.43",
"resolved": "https://registry.npmjs.org/@injectivelabs/tx-ts/-/tx-ts-1.0.43.tgz",
"integrity": "sha512-1agBb1qq1NmmIuVVn2ay1CP9TcGBon0JA3STse+/IxnQ3YD+I9/X7bqEPANYldlJARzwmlJIlVgb8p/PYX4fTw==",
"requires": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/proto-signing": "0.28.4",
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@injectivelabs/chain-api": "^1.8.0-rc8",
"@injectivelabs/ts-types": "^1.0.13",
"@injectivelabs/utils": "^1.0.20",
"google-protobuf": "^3.20.1",
"jscrypto": "^1.0.3",
"keccak256": "^1.0.6",
"link-module-alias": "^1.2.0",
"sha3": "^2.1.4",
"shx": "^0.3.2"
},
"dependencies": {
"@improbable-eng/grpc-web": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz",
"integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==",
"requires": {
"browser-headers": "^0.4.1"
}
},
"@injectivelabs/chain-api": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2.tgz",
"integrity": "sha512-XJ6GXTxVnpgRLEWdEvemqJkFzxwjUFbPwR6fQN6XZ0P7kWFN0GlFbayNek38Jk79n3ue39tdRAnZ69yQKTce5w==",
"requires": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
},
"dependencies": {
"@improbable-eng/grpc-web": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz",
"integrity": "sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg==",
"requires": {
"browser-headers": "^0.4.0"
}
}
}
}
}
},
"@injectivelabs/utils": {
"version": "1.0.33",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.33.tgz",
"integrity": "sha512-GDhtu3Vc0ZXRMQ8cUuImPiUMmQJwyLONDYs7VW/Ln262wHNvbImeuGGeJ+HQjON7feRfA0xXCqv2ZISdfVBIIg==",
"version": "1.0.45",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.45.tgz",
"integrity": "sha512-ndmsKAMrQVbwh6BU5HMbuZQilfpMZVNwwO8m8OjQtvUm0lQ0HyEkugJd20HwcX2K3k+fSq/OlVy0F9gab8Cp6Q==",
"requires": {
"@injectivelabs/exceptions": "^1.0.27",
"@injectivelabs/ts-types": "^1.0.16",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"axios": "^0.21.1",
"bignumber.js": "^9.0.1",
"link-module-alias": "^1.2.0",
@ -12426,15 +12063,6 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cosmjs-types": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
"integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
"requires": {
"long": "^4.0.0",
"protobufjs": "~6.11.2"
}
},
"crc-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",

View File

@ -5,9 +5,9 @@
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
"@certusone/wormhole-sdk": "^0.9.2",
"@cosmjs/encoding": "^0.26.2",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/sdk-ts": "^1.0.211",
"@injectivelabs/tx-ts": "^1.0.43",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/sdk-ts": "^1.0.289",
"@injectivelabs/utils": "^1.0.45",
"@solana/web3.js": "^1.22.0",
"@terra-money/terra.js": "^3.1.3",
"@types/config": "^3.3.0",

522
sdk/js/package-lock.json generated
View File

@ -11,7 +11,9 @@
"dependencies": {
"@certusone/wormhole-sdk-proto-web": "0.0.6",
"@certusone/wormhole-sdk-wasm": "^0.0.1",
"@injectivelabs/sdk-ts": "^1.0.211",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/sdk-ts": "1.0.289",
"@injectivelabs/utils": "1.0.45",
"@project-serum/anchor": "^0.25.0",
"@solana/spl-token": "^0.3.5",
"@solana/web3.js": "^1.66.2",
@ -28,8 +30,6 @@
},
"devDependencies": {
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/tx-ts": "^1.0.43",
"@openzeppelin/contracts": "^4.2.0",
"@typechain/ethers-v5": "^7.0.1",
"@types/elliptic": "^6.4.14",
@ -754,50 +754,6 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.3.tgz",
"integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ=="
},
"node_modules/@cosmjs/amino": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.4.tgz",
"integrity": "sha512-b8y5gFC0eGrH0IoYSNtDmTdsTgeQ1KFZ5YVOeIiKmzF91MeiciYO/MNqc027kctacZ+UbnVWGEUGyRBPi9ta/g==",
"dev": true,
"dependencies": {
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4"
}
},
"node_modules/@cosmjs/crypto": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.4.tgz",
"integrity": "sha512-JRxNLlED3DDh9d04A0RcRw3mYkoobN7q7wafUFy3vI1TjoyWx33v0gqqaYE6/hoo9ghUrJSVOfzVihl8fZajJA==",
"dev": true,
"dependencies": {
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"@noble/hashes": "^1",
"bn.js": "^5.2.0",
"elliptic": "^6.5.3",
"libsodium-wrappers": "^0.7.6"
}
},
"node_modules/@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"dev": true,
"dependencies": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
}
},
"node_modules/@cosmjs/encoding/node_modules/bech32": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==",
"dev": true
},
"node_modules/@cosmjs/json-rpc": {
"version": "0.29.3",
"resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.29.3.tgz",
@ -807,63 +763,6 @@
"xstream": "^11.14.0"
}
},
"node_modules/@cosmjs/math": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.4.tgz",
"integrity": "sha512-wsWjbxFXvk46Dsx8jQ5vsBZOIQuiUIyaaZbUvxsgIhAMpuuBnV5O/drK87+B+4cL+umTelFqTbWnkqueVCIFxQ==",
"dev": true,
"dependencies": {
"bn.js": "^5.2.0"
}
},
"node_modules/@cosmjs/proto-signing": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.4.tgz",
"integrity": "sha512-4vgCLK9gOsdWzD78V5XbAsupSSyntPEzokWYhgRQNwgVTcKX1kg0eKZqUvF5ua5iL9x6MevfH/sgwPyiYleMBw==",
"dev": true,
"dependencies": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"cosmjs-types": "^0.4.0",
"long": "^4.0.0",
"protobufjs": "~6.10.2"
}
},
"node_modules/@cosmjs/proto-signing/node_modules/@types/node": {
"version": "13.13.52",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz",
"integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==",
"dev": true
},
"node_modules/@cosmjs/proto-signing/node_modules/protobufjs": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.3.tgz",
"integrity": "sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
"@protobufjs/codegen": "^2.0.4",
"@protobufjs/eventemitter": "^1.1.0",
"@protobufjs/fetch": "^1.1.0",
"@protobufjs/float": "^1.0.2",
"@protobufjs/inquire": "^1.1.0",
"@protobufjs/path": "^1.1.2",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0",
"@types/long": "^4.0.1",
"@types/node": "^13.7.0",
"long": "^4.0.0"
},
"bin": {
"pbjs": "bin/pbjs",
"pbts": "bin/pbts"
}
},
"node_modules/@cosmjs/socket": {
"version": "0.29.3",
"resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.29.3.tgz",
@ -950,12 +849,6 @@
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="
},
"node_modules/@cosmjs/utils": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.4.tgz",
"integrity": "sha512-lb3TU6833arPoPZF8HTeG9V418CpurvqH5Aa/ls0I0wYdPDEMO6622+PQNQhQ8Vw8Az2MXoSyc8jsqrgawT84Q==",
"dev": true
},
"node_modules/@ethereumjs/common": {
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz",
@ -1728,10 +1621,9 @@
}
},
"node_modules/@injectivelabs/chain-api": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2.tgz",
"integrity": "sha512-XJ6GXTxVnpgRLEWdEvemqJkFzxwjUFbPwR6fQN6XZ0P7kWFN0GlFbayNek38Jk79n3ue39tdRAnZ69yQKTce5w==",
"dev": true,
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.3.tgz",
"integrity": "sha512-BIg87F9BTA5njxtvOkEOIHl/gpmsqnFpHJm1SrN6IHUsW97/Zj3jXdYOy9p4WCfgxC2VZC/5IOPnwyrLwSyCWg==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
@ -1741,7 +1633,6 @@
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz",
"integrity": "sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg==",
"dev": true,
"dependencies": {
"browser-headers": "^0.4.0"
},
@ -1750,13 +1641,13 @@
}
},
"node_modules/@injectivelabs/exceptions": {
"version": "1.0.25",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.25.tgz",
"integrity": "sha512-k/8dfPnbm0qFlEkDKIboC75g40eL8DEwkmnyfWFq/XzMVTOOH28FNSNVr/8POnorRY7Y7Hi3xNepgw02nTElqQ==",
"version": "1.0.32",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.32.tgz",
"integrity": "sha512-g+7UIoVL6v5OIdRrJSWLoyfHYIpey3BpWwxeUpFwXyRBkzalHPkVyYnmx1twOJd6lZyhfZWG0k9M5PcJBsrDIw==",
"hasInstallScript": true,
"dependencies": {
"@improbable-eng/grpc-web": "^0.15.0",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/ts-types": "^1.0.18",
"http-status-codes": "^2.2.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
@ -1774,30 +1665,40 @@
}
},
"node_modules/@injectivelabs/indexer-api": {
"version": "1.0.31",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.31.tgz",
"integrity": "sha512-OtUiAsj41fIOfLQFQTAUBG/vJj5eKwzPNcUjCLBoiYZmGSwaWXVe9aTqtlbIP0Z+vmKreI1v6cwacNaxZnACVw==",
"version": "1.0.32-rc",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.32-rc.tgz",
"integrity": "sha512-LNU4lZMhVXN4b9w72SAcVIesyD9We3Oq466KHDOd2S9asnNjO6EuQ4EtA2l4qiIvIat9Gh9/VZOfSXguTlVp8g==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/networks": {
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.37.tgz",
"integrity": "sha512-OUXMrJpOls18ksOhJJU00di1YXmaEQfIGo0BKVv9XFFAbi5d10hV4mrVfL/7Pnt4dALmBeXn8B0IalEr4HeCOw==",
"version": "1.0.52",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.52.tgz",
"integrity": "sha512-Uyo+4betZY3+jqc2rTVu6SjVTrdojP5fFgE0ItRlszmWfk9vcU15cxKS2o5M+wukKAYdeUSeeWTgOds20QIxnw==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/ninja-api": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@injectivelabs/ninja-api/-/ninja-api-1.0.10.tgz",
"integrity": "sha512-S5XCB97mCHEAgGzFAaI3n3uYx07RF6ch21chASekVBN9tNnSAgCKK8uOZ5rR838Yro+YgjENUCYiQcoMMIO1xg==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/sdk-ts": {
"version": "1.0.211",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.211.tgz",
"integrity": "sha512-3gSniUGTC4qkBj23sAfvpUkP65hgLj3a07HF7xHQZRRuy17REuRXh1FZUjKbVn3ygWYMN46xy6eMVs/nw6ImtQ==",
"version": "1.0.289",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.289.tgz",
"integrity": "sha512-O1cTY50hnowiSkBCmafomFcWlhsuXvb7f8oXXvBscPiT0talPLwm2iASQ8FKu1xspKwU5s6VTkTGL4Bk8XAzTQ==",
"hasInstallScript": true,
"dependencies": {
"@apollo/client": "^3.5.8",
@ -1808,13 +1709,14 @@
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@improbable-eng/grpc-web-react-native-transport": "^0.15.0",
"@injectivelabs/chain-api": "1.8.2-no-tse",
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/indexer-api": "1.0.31",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/token-metadata": "^1.0.51",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/chain-api": "1.8.3",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/indexer-api": "1.0.32-rc",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ninja-api": "^1.0.10",
"@injectivelabs/token-metadata": "^1.0.77",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"@metamask/eth-sig-util": "^4.0.1",
"@types/google-protobuf": "^3.15.5",
"axios": "^0.27.2",
@ -1947,26 +1849,6 @@
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/sdk-ts/node_modules/@injectivelabs/chain-api": {
"version": "1.8.2-no-tse",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2-no-tse.tgz",
"integrity": "sha512-ccFdkApkyKqAqhv6J8bUg9UFdtZelMEJyjk7RflxfxK3te8kKvIC4wA65sDKSVO1dZkrZFeKjunnIuW+dydNdA==",
"dependencies": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
}
},
"node_modules/@injectivelabs/sdk-ts/node_modules/@injectivelabs/chain-api/node_modules/@improbable-eng/grpc-web": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz",
"integrity": "sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg==",
"dependencies": {
"browser-headers": "^0.4.0"
},
"peerDependencies": {
"google-protobuf": "^3.2.0"
}
},
"node_modules/@injectivelabs/sdk-ts/node_modules/@types/bn.js": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz",
@ -2022,13 +1904,13 @@
}
},
"node_modules/@injectivelabs/token-metadata": {
"version": "1.0.51",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.51.tgz",
"integrity": "sha512-HoIVU0VDwplPa8hkNivRflhXQ8GVPvikru153GHpOhxTwpEkA3xHrNxp6x7/+eFbIf1DsdUl0MwRIWiqyGF0RA==",
"version": "1.0.77",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.77.tgz",
"integrity": "sha512-Mto59nTro4bHgLSkOJl7gkmKVGj32VvHSxE6MsMHjHa5OEZPt+BlLLYIb/WLE7KgaTbOpG9BUAutrHjghmxVlg==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ts-types": "^1.0.18",
"@types/lodash.values": "^4.3.6",
"copyfiles": "^2.4.1",
"jsonschema": "^1.4.0",
@ -2039,57 +1921,23 @@
}
},
"node_modules/@injectivelabs/ts-types": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.14.tgz",
"integrity": "sha512-dSnY7/z3GA3RJBLodd0wTqXxUDrNpwBHT9Ftr7Z2rWcnLj8oXpTrGCc6aEr5+yZ5n18e3kqF+m8BFEfGkzHqzg==",
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.18.tgz",
"integrity": "sha512-fffgHjSmssLXBiI6Z/K7JuBOKTnsDm3h6ysQ5KRasmSY3NDuMCAQ5URForvdOQ38SKvhMquxQus5a+tZIWnHfg==",
"hasInstallScript": true,
"dependencies": {
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/tx-ts": {
"version": "1.0.43",
"resolved": "https://registry.npmjs.org/@injectivelabs/tx-ts/-/tx-ts-1.0.43.tgz",
"integrity": "sha512-1agBb1qq1NmmIuVVn2ay1CP9TcGBon0JA3STse+/IxnQ3YD+I9/X7bqEPANYldlJARzwmlJIlVgb8p/PYX4fTw==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/proto-signing": "0.28.4",
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@injectivelabs/chain-api": "^1.8.0-rc8",
"@injectivelabs/ts-types": "^1.0.13",
"@injectivelabs/utils": "^1.0.20",
"google-protobuf": "^3.20.1",
"jscrypto": "^1.0.3",
"keccak256": "^1.0.6",
"link-module-alias": "^1.2.0",
"sha3": "^2.1.4",
"shx": "^0.3.2"
}
},
"node_modules/@injectivelabs/tx-ts/node_modules/@improbable-eng/grpc-web": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz",
"integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==",
"dev": true,
"dependencies": {
"browser-headers": "^0.4.1"
},
"peerDependencies": {
"google-protobuf": "^3.14.0"
}
},
"node_modules/@injectivelabs/utils": {
"version": "1.0.31",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.31.tgz",
"integrity": "sha512-x75W57m0V64JDNg7uak54A37yLQwKDVxQ/1bsX+itgW9i+6HEx2cPXOp7fpReNydP3tI0bzDeioxASKp4RkGRA==",
"version": "1.0.45",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.45.tgz",
"integrity": "sha512-ndmsKAMrQVbwh6BU5HMbuZQilfpMZVNwwO8m8OjQtvUm0lQ0HyEkugJd20HwcX2K3k+fSq/OlVy0F9gab8Cp6Q==",
"hasInstallScript": true,
"dependencies": {
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"axios": "^0.21.1",
"bignumber.js": "^9.0.1",
"link-module-alias": "^1.2.0",
@ -4924,16 +4772,6 @@
"node": ">= 0.10"
}
},
"node_modules/cosmjs-types": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
"integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
"dev": true,
"dependencies": {
"long": "^4.0.0",
"protobufjs": "~6.11.2"
}
},
"node_modules/crc-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",
@ -14566,52 +14404,6 @@
}
}
},
"@cosmjs/amino": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.28.4.tgz",
"integrity": "sha512-b8y5gFC0eGrH0IoYSNtDmTdsTgeQ1KFZ5YVOeIiKmzF91MeiciYO/MNqc027kctacZ+UbnVWGEUGyRBPi9ta/g==",
"dev": true,
"requires": {
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4"
}
},
"@cosmjs/crypto": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.28.4.tgz",
"integrity": "sha512-JRxNLlED3DDh9d04A0RcRw3mYkoobN7q7wafUFy3vI1TjoyWx33v0gqqaYE6/hoo9ghUrJSVOfzVihl8fZajJA==",
"dev": true,
"requires": {
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"@noble/hashes": "^1",
"bn.js": "^5.2.0",
"elliptic": "^6.5.3",
"libsodium-wrappers": "^0.7.6"
}
},
"@cosmjs/encoding": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.28.4.tgz",
"integrity": "sha512-N6Qnjs4dd8KwjW5m9t3L+rWYYGW2wyS+iLtJJ9DD8DiTTxpW9h7/AmUVO/dsRe5H2tV8/DzH/B9pFfpsgro22A==",
"dev": true,
"requires": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"readonly-date": "^1.0.0"
},
"dependencies": {
"bech32": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz",
"integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==",
"dev": true
}
}
},
"@cosmjs/json-rpc": {
"version": "0.29.3",
"resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.29.3.tgz",
@ -14621,60 +14413,6 @@
"xstream": "^11.14.0"
}
},
"@cosmjs/math": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.28.4.tgz",
"integrity": "sha512-wsWjbxFXvk46Dsx8jQ5vsBZOIQuiUIyaaZbUvxsgIhAMpuuBnV5O/drK87+B+4cL+umTelFqTbWnkqueVCIFxQ==",
"dev": true,
"requires": {
"bn.js": "^5.2.0"
}
},
"@cosmjs/proto-signing": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.28.4.tgz",
"integrity": "sha512-4vgCLK9gOsdWzD78V5XbAsupSSyntPEzokWYhgRQNwgVTcKX1kg0eKZqUvF5ua5iL9x6MevfH/sgwPyiYleMBw==",
"dev": true,
"requires": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/crypto": "0.28.4",
"@cosmjs/encoding": "0.28.4",
"@cosmjs/math": "0.28.4",
"@cosmjs/utils": "0.28.4",
"cosmjs-types": "^0.4.0",
"long": "^4.0.0",
"protobufjs": "~6.10.2"
},
"dependencies": {
"@types/node": {
"version": "13.13.52",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz",
"integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==",
"dev": true
},
"protobufjs": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.3.tgz",
"integrity": "sha512-yvAslS0hNdBhlSKckI4R1l7wunVilX66uvrjzE4MimiAt7/qw1nLpMhZrn/ObuUTM/c3Xnfl01LYMdcSJe6dwg==",
"dev": true,
"requires": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
"@protobufjs/codegen": "^2.0.4",
"@protobufjs/eventemitter": "^1.1.0",
"@protobufjs/fetch": "^1.1.0",
"@protobufjs/float": "^1.0.2",
"@protobufjs/inquire": "^1.1.0",
"@protobufjs/path": "^1.1.2",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0",
"@types/long": "^4.0.1",
"@types/node": "^13.7.0",
"long": "^4.0.0"
}
}
}
},
"@cosmjs/socket": {
"version": "0.29.3",
"resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.29.3.tgz",
@ -14763,12 +14501,6 @@
}
}
},
"@cosmjs/utils": {
"version": "0.28.4",
"resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.28.4.tgz",
"integrity": "sha512-lb3TU6833arPoPZF8HTeG9V418CpurvqH5Aa/ls0I0wYdPDEMO6622+PQNQhQ8Vw8Az2MXoSyc8jsqrgawT84Q==",
"dev": true
},
"@ethereumjs/common": {
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz",
@ -15219,10 +14951,9 @@
"requires": {}
},
"@injectivelabs/chain-api": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2.tgz",
"integrity": "sha512-XJ6GXTxVnpgRLEWdEvemqJkFzxwjUFbPwR6fQN6XZ0P7kWFN0GlFbayNek38Jk79n3ue39tdRAnZ69yQKTce5w==",
"dev": true,
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.3.tgz",
"integrity": "sha512-BIg87F9BTA5njxtvOkEOIHl/gpmsqnFpHJm1SrN6IHUsW97/Zj3jXdYOy9p4WCfgxC2VZC/5IOPnwyrLwSyCWg==",
"requires": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
@ -15232,7 +14963,6 @@
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz",
"integrity": "sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg==",
"dev": true,
"requires": {
"browser-headers": "^0.4.0"
}
@ -15240,12 +14970,12 @@
}
},
"@injectivelabs/exceptions": {
"version": "1.0.25",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.25.tgz",
"integrity": "sha512-k/8dfPnbm0qFlEkDKIboC75g40eL8DEwkmnyfWFq/XzMVTOOH28FNSNVr/8POnorRY7Y7Hi3xNepgw02nTElqQ==",
"version": "1.0.32",
"resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.0.32.tgz",
"integrity": "sha512-g+7UIoVL6v5OIdRrJSWLoyfHYIpey3BpWwxeUpFwXyRBkzalHPkVyYnmx1twOJd6lZyhfZWG0k9M5PcJBsrDIw==",
"requires": {
"@improbable-eng/grpc-web": "^0.15.0",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/ts-types": "^1.0.18",
"http-status-codes": "^2.2.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
@ -15262,29 +14992,39 @@
}
},
"@injectivelabs/indexer-api": {
"version": "1.0.31",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.31.tgz",
"integrity": "sha512-OtUiAsj41fIOfLQFQTAUBG/vJj5eKwzPNcUjCLBoiYZmGSwaWXVe9aTqtlbIP0Z+vmKreI1v6cwacNaxZnACVw==",
"version": "1.0.32-rc",
"resolved": "https://registry.npmjs.org/@injectivelabs/indexer-api/-/indexer-api-1.0.32-rc.tgz",
"integrity": "sha512-LNU4lZMhVXN4b9w72SAcVIesyD9We3Oq466KHDOd2S9asnNjO6EuQ4EtA2l4qiIvIat9Gh9/VZOfSXguTlVp8g==",
"requires": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"@injectivelabs/networks": {
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.37.tgz",
"integrity": "sha512-OUXMrJpOls18ksOhJJU00di1YXmaEQfIGo0BKVv9XFFAbi5d10hV4mrVfL/7Pnt4dALmBeXn8B0IalEr4HeCOw==",
"version": "1.0.52",
"resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.52.tgz",
"integrity": "sha512-Uyo+4betZY3+jqc2rTVu6SjVTrdojP5fFgE0ItRlszmWfk9vcU15cxKS2o5M+wukKAYdeUSeeWTgOds20QIxnw==",
"requires": {
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"@injectivelabs/ninja-api": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@injectivelabs/ninja-api/-/ninja-api-1.0.10.tgz",
"integrity": "sha512-S5XCB97mCHEAgGzFAaI3n3uYx07RF6ch21chASekVBN9tNnSAgCKK8uOZ5rR838Yro+YgjENUCYiQcoMMIO1xg==",
"requires": {
"@improbable-eng/grpc-web": "^0.14.0",
"google-protobuf": "^3.14.0"
}
},
"@injectivelabs/sdk-ts": {
"version": "1.0.211",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.211.tgz",
"integrity": "sha512-3gSniUGTC4qkBj23sAfvpUkP65hgLj3a07HF7xHQZRRuy17REuRXh1FZUjKbVn3ygWYMN46xy6eMVs/nw6ImtQ==",
"version": "1.0.289",
"resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.0.289.tgz",
"integrity": "sha512-O1cTY50hnowiSkBCmafomFcWlhsuXvb7f8oXXvBscPiT0talPLwm2iASQ8FKu1xspKwU5s6VTkTGL4Bk8XAzTQ==",
"requires": {
"@apollo/client": "^3.5.8",
"@cosmjs/amino": "^0.29.0",
@ -15294,13 +15034,14 @@
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@improbable-eng/grpc-web-react-native-transport": "^0.15.0",
"@injectivelabs/chain-api": "1.8.2-no-tse",
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/indexer-api": "1.0.31",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/token-metadata": "^1.0.51",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/utils": "^1.0.31",
"@injectivelabs/chain-api": "1.8.3",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/indexer-api": "1.0.32-rc",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ninja-api": "^1.0.10",
"@injectivelabs/token-metadata": "^1.0.77",
"@injectivelabs/ts-types": "^1.0.18",
"@injectivelabs/utils": "^1.0.45",
"@metamask/eth-sig-util": "^4.0.1",
"@types/google-protobuf": "^3.15.5",
"axios": "^0.27.2",
@ -15412,25 +15153,6 @@
"browser-headers": "^0.4.1"
}
},
"@injectivelabs/chain-api": {
"version": "1.8.2-no-tse",
"resolved": "https://registry.npmjs.org/@injectivelabs/chain-api/-/chain-api-1.8.2-no-tse.tgz",
"integrity": "sha512-ccFdkApkyKqAqhv6J8bUg9UFdtZelMEJyjk7RflxfxK3te8kKvIC4wA65sDKSVO1dZkrZFeKjunnIuW+dydNdA==",
"requires": {
"@improbable-eng/grpc-web": "^0.13.0",
"google-protobuf": "^3.13.0"
},
"dependencies": {
"@improbable-eng/grpc-web": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz",
"integrity": "sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg==",
"requires": {
"browser-headers": "^0.4.0"
}
}
}
},
"@types/bn.js": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz",
@ -15482,12 +15204,12 @@
}
},
"@injectivelabs/token-metadata": {
"version": "1.0.51",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.51.tgz",
"integrity": "sha512-HoIVU0VDwplPa8hkNivRflhXQ8GVPvikru153GHpOhxTwpEkA3xHrNxp6x7/+eFbIf1DsdUl0MwRIWiqyGF0RA==",
"version": "1.0.77",
"resolved": "https://registry.npmjs.org/@injectivelabs/token-metadata/-/token-metadata-1.0.77.tgz",
"integrity": "sha512-Mto59nTro4bHgLSkOJl7gkmKVGj32VvHSxE6MsMHjHa5OEZPt+BlLLYIb/WLE7KgaTbOpG9BUAutrHjghmxVlg==",
"requires": {
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/ts-types": "^1.0.18",
"@types/lodash.values": "^4.3.6",
"copyfiles": "^2.4.1",
"jsonschema": "^1.4.0",
@ -15498,53 +15220,21 @@
}
},
"@injectivelabs/ts-types": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.14.tgz",
"integrity": "sha512-dSnY7/z3GA3RJBLodd0wTqXxUDrNpwBHT9Ftr7Z2rWcnLj8oXpTrGCc6aEr5+yZ5n18e3kqF+m8BFEfGkzHqzg==",
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.0.18.tgz",
"integrity": "sha512-fffgHjSmssLXBiI6Z/K7JuBOKTnsDm3h6ysQ5KRasmSY3NDuMCAQ5URForvdOQ38SKvhMquxQus5a+tZIWnHfg==",
"requires": {
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
}
},
"@injectivelabs/tx-ts": {
"version": "1.0.43",
"resolved": "https://registry.npmjs.org/@injectivelabs/tx-ts/-/tx-ts-1.0.43.tgz",
"integrity": "sha512-1agBb1qq1NmmIuVVn2ay1CP9TcGBon0JA3STse+/IxnQ3YD+I9/X7bqEPANYldlJARzwmlJIlVgb8p/PYX4fTw==",
"dev": true,
"requires": {
"@cosmjs/amino": "0.28.4",
"@cosmjs/proto-signing": "0.28.4",
"@improbable-eng/grpc-web": "^0.15.0",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@injectivelabs/chain-api": "^1.8.0-rc8",
"@injectivelabs/ts-types": "^1.0.13",
"@injectivelabs/utils": "^1.0.20",
"google-protobuf": "^3.20.1",
"jscrypto": "^1.0.3",
"keccak256": "^1.0.6",
"link-module-alias": "^1.2.0",
"sha3": "^2.1.4",
"shx": "^0.3.2"
},
"dependencies": {
"@improbable-eng/grpc-web": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz",
"integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==",
"dev": true,
"requires": {
"browser-headers": "^0.4.1"
}
}
}
},
"@injectivelabs/utils": {
"version": "1.0.31",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.31.tgz",
"integrity": "sha512-x75W57m0V64JDNg7uak54A37yLQwKDVxQ/1bsX+itgW9i+6HEx2cPXOp7fpReNydP3tI0bzDeioxASKp4RkGRA==",
"version": "1.0.45",
"resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.0.45.tgz",
"integrity": "sha512-ndmsKAMrQVbwh6BU5HMbuZQilfpMZVNwwO8m8OjQtvUm0lQ0HyEkugJd20HwcX2K3k+fSq/OlVy0F9gab8Cp6Q==",
"requires": {
"@injectivelabs/exceptions": "^1.0.25",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/exceptions": "^1.0.32",
"@injectivelabs/ts-types": "^1.0.18",
"axios": "^0.21.1",
"bignumber.js": "^9.0.1",
"link-module-alias": "^1.2.0",
@ -17863,16 +17553,6 @@
"vary": "^1"
}
},
"cosmjs-types": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.4.1.tgz",
"integrity": "sha512-I7E/cHkIgoJzMNQdFF0YVqPlaTqrqKHrskuSTIqlEyxfB5Lf3WKCajSXVK2yHOfOFfSux/RxEdpMzw/eO4DIog==",
"dev": true,
"requires": {
"long": "^4.0.0",
"protobufjs": "~6.11.2"
}
},
"crc-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",

View File

@ -40,8 +40,6 @@
"license": "Apache-2.0",
"devDependencies": {
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@injectivelabs/networks": "^1.0.37",
"@injectivelabs/tx-ts": "^1.0.43",
"@openzeppelin/contracts": "^4.2.0",
"@typechain/ethers-v5": "^7.0.1",
"@types/elliptic": "^6.4.14",
@ -63,7 +61,9 @@
"dependencies": {
"@certusone/wormhole-sdk-proto-web": "0.0.6",
"@certusone/wormhole-sdk-wasm": "^0.0.1",
"@injectivelabs/sdk-ts": "^1.0.211",
"@injectivelabs/networks": "^1.0.52",
"@injectivelabs/sdk-ts": "1.0.289",
"@injectivelabs/utils": "1.0.45",
"@project-serum/anchor": "^0.25.0",
"@solana/spl-token": "^0.3.5",
"@solana/web3.js": "^1.66.2",

View File

@ -1,12 +1,13 @@
import { getNetworkInfo, Network } from "@injectivelabs/networks";
import { DEFAULT_STD_FEE } from "@injectivelabs/utils";
import {
PrivateKey,
TxGrpcClient,
ChainGrpcWasmApi,
ChainRestAuthApi,
DEFAULT_STD_FEE,
privateKeyToPublicKeyBase64,
createTransaction,
MsgArg,
} from "@injectivelabs/sdk-ts";
import { createTransaction, MsgArg, TxGrpcClient } from "@injectivelabs/tx-ts";
import { PrivateKey } from "@injectivelabs/sdk-ts";
import { expect, test } from "@jest/globals";
import {
attestFromAlgorand,
@ -147,25 +148,26 @@ test.skip("testnet - injective attest native asset", async () => {
// Set up Inj wallet
const walletPKHash: string = process.env.ETH_KEY || "";
const walletPK = PrivateKey.fromPrivateKey(walletPKHash);
const walletPK = PrivateKey.fromHex(walletPKHash);
const walletInjAddr = walletPK.toBech32();
const walletPublicKey = privateKeyToPublicKeyBase64(
Buffer.from(walletPKHash, "hex")
);
const walletPublicKey = walletPK.toPublicKey().toBase64();
const accountDetails = await new ChainRestAuthApi(
network.sentryHttpApi
).fetchAccount(walletInjAddr);
// Attest native inj
const result = await attestFromInjective(tba, walletInjAddr, "inj");
console.log("token", JSON.stringify(result.params.msg));
console.log("token", JSON.stringify(result.params.exec));
// Create the transaction
console.log("creating transaction...");
const { signBytes, txRaw } = createTransaction({
message: result.toDirectSign(),
memo: "",
fee: DEFAULT_STD_FEE,
fee: {
...DEFAULT_STD_FEE,
gas: (parseInt(DEFAULT_STD_FEE.gas, 10) * 2.5).toString(),
},
pubKey: walletPublicKey,
sequence: parseInt(accountDetails.account.base_account.sequence, 10),
accountNumber: parseInt(
@ -194,7 +196,7 @@ test.skip("testnet - injective attest native asset", async () => {
/** Broadcast transaction */
const txResponse = await txService.broadcast(txRaw);
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
// Need to get the VAA and parse it.
@ -238,14 +240,13 @@ test.skip("testnet - injective attest foreign asset", async () => {
const wallet = "inj13un2qqjaenrvlsr605u82c5q5y8zjkkhdgcetq";
const foreignAssetAddress = "inj13772jvadyx4j0hrlfh4jzk0v39k8uyfxrfs540";
const result = await attestFromInjective(tba, wallet, foreignAssetAddress);
console.log("token", JSON.stringify(result.params.msg));
console.log("token", JSON.stringify(result.params.exec));
console.log("json", result.toJSON());
const walletPKHash = process.env.ETH_KEY || "";
const walletPK = PrivateKey.fromPrivateKey(walletPKHash);
const walletInjAddr = walletPK.toBech32();
const walletPublicKey = privateKeyToPublicKeyBase64(
Buffer.from(walletPKHash, "hex")
);
const walletPublicKey = walletPK.toPublicKey().toBase64();
const network = getNetworkInfo(getEndPoint());
/** Account Details **/
const accountDetails = await new ChainRestAuthApi(
@ -254,7 +255,10 @@ test.skip("testnet - injective attest foreign asset", async () => {
const { signBytes, txRaw } = createTransaction({
message: result.toDirectSign(),
memo: "",
fee: DEFAULT_STD_FEE,
fee: {
...DEFAULT_STD_FEE,
gas: (parseInt(DEFAULT_STD_FEE.gas, 10) * 2.5).toString(),
},
pubKey: walletPublicKey,
sequence: parseInt(accountDetails.account.base_account.sequence, 10),
accountNumber: parseInt(
@ -281,7 +285,7 @@ test.skip("testnet - injective attest foreign asset", async () => {
/** Broadcast transaction */
const txResponse = await txService.broadcast(txRaw);
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
// expect(result?.fee?.denom).toEqual("inj");
@ -390,9 +394,8 @@ test.skip("testnet - injective submit a vaa", async () => {
const walletPKHash = process.env.ETH_KEY || "";
const walletPK = PrivateKey.fromPrivateKey(walletPKHash);
const walletInjAddr = walletPK.toBech32();
const walletPublicKey = privateKeyToPublicKeyBase64(
Buffer.from(walletPKHash, "hex")
);
const walletPublicKey = walletPK.toPublicKey().toBase64();
const network = getNetworkInfo(getEndPoint());
const client = new ChainGrpcWasmApi(network.sentryGrpcApi);
console.log("Getting account details...");
@ -403,7 +406,7 @@ test.skip("testnet - injective submit a vaa", async () => {
const msg = await createWrappedOnInjective(tba, walletInjAddr, vaaBytes);
console.log("cr", msg);
console.log("submit_vaa", JSON.stringify(msg.params.msg));
console.log("submit_vaa", JSON.stringify(msg.params.exec));
/** Prepare the Transaction **/
console.log("create transaction...");
const txFee = DEFAULT_STD_FEE;
@ -450,7 +453,7 @@ test.skip("testnet - injective submit a vaa", async () => {
console.log(`Transaction failed: ${txResponse.rawLog}`);
} else {
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
}
const contract = pvaa.Contract || "0";
@ -545,7 +548,7 @@ test.skip("testnet - injective submit a vaa", async () => {
console.log(`Transaction failed: ${txResponse.rawLog}`);
} else {
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
}
}
@ -620,9 +623,8 @@ test.skip("Attest and transfer token from Injective to Algorand", async () => {
const walletPKHash: string = process.env.ETH_KEY || "";
const walletPK = PrivateKey.fromPrivateKey(walletPKHash);
const walletInjAddr = walletPK.toBech32();
const walletPublicKey = privateKeyToPublicKeyBase64(
Buffer.from(walletPKHash, "hex")
);
const walletPublicKey = walletPK.toPublicKey().toBase64();
const network = getNetworkInfo(getEndPoint());
console.log("create transaction...");
const txFee = DEFAULT_STD_FEE;
@ -679,7 +681,7 @@ test.skip("Attest and transfer token from Injective to Algorand", async () => {
console.log(`Transaction failed: ${txResponse.rawLog}`);
} else {
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
}
console.log("txResponse", JSON.stringify(txResponse.rawLog));
@ -804,7 +806,7 @@ test.skip("Attest and transfer token from Injective to Algorand", async () => {
console.log(`Transaction failed: ${txResponse.rawLog}`);
} else {
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
}
console.log("txResponse", JSON.stringify(txResponse));

View File

@ -1,16 +1,13 @@
import { getNetworkInfo, Network } from "@injectivelabs/networks";
import { DEFAULT_STD_FEE } from "@injectivelabs/utils";
import {
ChainRestAuthApi,
DEFAULT_STD_FEE,
MsgExecuteContract,
PrivateKey,
privateKeyToPublicKeyBase64,
} from "@injectivelabs/sdk-ts";
import {
createTransaction,
TxClient,
PrivateKey,
TxGrpcClient,
} from "@injectivelabs/tx-ts";
ChainRestAuthApi,
createTransaction,
MsgExecuteContract,
} from "@injectivelabs/sdk-ts";
import { test } from "@jest/globals";
import { CONTRACTS } from "..";
@ -18,12 +15,10 @@ test.skip("testnet - injective attest native token", async () => {
const network = getNetworkInfo(Network.TestnetK8s);
console.log("Using network:", network);
const privateKeyHash = process.env.ETH_KEY || "";
const privateKey = PrivateKey.fromPrivateKey(privateKeyHash);
const privateKey = PrivateKey.fromHex(privateKeyHash);
const injectiveAddress = privateKey.toBech32();
console.log("Using wallet:", injectiveAddress);
const publicKey = privateKeyToPublicKeyBase64(
Buffer.from(privateKeyHash, "hex")
);
const publicKey = privateKey.toPublicKey().toBase64();
const isNativeAsset = true;
const asset = "inj";
const nonce = 69;
@ -41,19 +36,21 @@ test.skip("testnet - injective attest native token", async () => {
const msg = MsgExecuteContract.fromJSON({
contractAddress: CONTRACTS.TESTNET.injective.token_bridge,
sender: injectiveAddress,
msg: {
asset_info: isNativeAsset
? {
native_token: { denom: asset },
}
: {
token: {
contract_addr: asset,
exec: {
msg: {
asset_info: isNativeAsset
? {
native_token: { denom: asset },
}
: {
token: {
contract_addr: asset,
},
},
},
nonce: nonce,
nonce: nonce,
},
action: "create_asset_meta",
},
action: "create_asset_meta",
});
/** Prepare the Transaction **/
@ -61,7 +58,10 @@ test.skip("testnet - injective attest native token", async () => {
const { signBytes, txRaw } = createTransaction({
message: msg.toDirectSign(),
memo: "",
fee: DEFAULT_STD_FEE,
fee: {
...DEFAULT_STD_FEE,
gas: (parseInt(DEFAULT_STD_FEE.gas, 10) * 2.5).toString(),
},
pubKey: publicKey,
sequence: parseInt(accountDetails.account.base_account.sequence, 10),
accountNumber: parseInt(
@ -98,7 +98,7 @@ test.skip("testnet - injective attest native token", async () => {
console.log("Broadcast transaction");
const txResponse = await txService.broadcast(txRaw);
console.log(
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txhash)}`
`Broadcasted transaction hash: ${JSON.stringify(txResponse.txHash)}`
);
console.log(txResponse);

View File

@ -97,19 +97,21 @@ export async function attestFromInjective(
return MsgExecuteContractInjective.fromJSON({
contractAddress: tokenBridgeAddress,
sender: walletAddress,
msg: {
asset_info: isNativeAsset
? {
native_token: { denom: asset },
}
: {
token: {
contract_addr: asset,
exec: {
msg: {
asset_info: isNativeAsset
? {
native_token: { denom: asset },
}
: {
token: {
contract_addr: asset,
},
},
},
nonce: nonce,
nonce: nonce,
},
action: "create_asset_meta",
},
action: "create_asset_meta",
});
}

View File

@ -101,10 +101,12 @@ export async function submitVAAOnInjective(
return MsgExecuteContractInjective.fromJSON({
contractAddress: tokenBridgeAddress,
sender: walletAddress,
msg: {
data: fromUint8Array(signedVAA),
exec: {
msg: {
data: fromUint8Array(signedVAA),
},
action: "submit_vaa",
},
action: "submit_vaa",
});
}
export const redeemOnInjective = submitVAAOnInjective;

View File

@ -317,35 +317,47 @@ export async function transferFromInjective(
MsgExecuteContractInjective.fromJSON({
contractAddress: tokenBridgeAddress,
sender: walletAddress,
msg: {},
action: "deposit_tokens",
exec: {
msg: {},
action: "deposit_tokens",
},
funds: { denom: tokenAddress, amount },
}),
MsgExecuteContractInjective.fromJSON({
contractAddress: tokenBridgeAddress,
sender: walletAddress,
msg: mk_initiate_transfer({ native_token: { denom: tokenAddress } }),
action: mk_action,
exec: {
msg: mk_initiate_transfer({
native_token: { denom: tokenAddress },
}),
action: mk_action,
},
}),
]
: [
MsgExecuteContractInjective.fromJSON({
contractAddress: tokenAddress,
sender: walletAddress,
msg: {
spender: tokenBridgeAddress,
amount,
expires: {
never: {},
exec: {
msg: {
spender: tokenBridgeAddress,
amount,
expires: {
never: {},
},
},
action: "increase_allowance",
},
action: "increase_allowance",
}),
MsgExecuteContractInjective.fromJSON({
contractAddress: tokenBridgeAddress,
sender: walletAddress,
msg: mk_initiate_transfer({ token: { contract_addr: tokenAddress } }),
action: mk_action,
exec: {
msg: mk_initiate_transfer({
token: { contract_addr: tokenAddress },
}),
action: mk_action,
},
}),
];
}