@kava-labs/kava-tools
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -1,3 +0,4 @@ | ||
const PriceOracle = require('./oracle/oracle').PriceOracle; | ||
const AuctionBot = require('./auction/auction').AuctionBot; | ||
const PriceOracle = require("./oracle/oracle").PriceOracle; | ||
const AuctionBot = require("./auction/auction").AuctionBot | ||
const RefundBot = require("./refund/refund").RefundBot; | ||
@@ -7,2 +8,3 @@ module.exports = { | ||
AuctionBot, | ||
RefundBot | ||
}; |
@@ -77,6 +77,17 @@ require('dotenv').config(); | ||
// fetch account data so we can manually manage sequence when posting | ||
var accountData = await kava.tx.loadMetaData( | ||
this.client.wallet.address, | ||
this.client.baseURI | ||
); | ||
let accountData | ||
try { | ||
accountData = await kava.tx.loadMetaData( | ||
this.client.wallet.address, | ||
this.client.baseURI | ||
); | ||
} catch { | ||
// if the account is new, use the default values, these will be updated | ||
// after the first tx is created with this account | ||
accountData = { | ||
account_number: '0', | ||
sequence: '0', | ||
} | ||
} | ||
// Attempt to fetch and post prices for each market for valid new prices | ||
@@ -126,3 +137,3 @@ await asyncForEach(this.marketIDs, async (market) => { | ||
if (!res.success) { | ||
res = await this.fetchPriceBinance(marketID); | ||
res = await this.fetchPriceCoinGecko(marketID); | ||
} | ||
@@ -174,3 +185,3 @@ return res; | ||
console.log(`couldn't get previous prices for ${marketID}, skipping...`); | ||
return false; | ||
return true; | ||
} | ||
@@ -177,0 +188,0 @@ |
{ | ||
"name": "@kava-labs/kava-tools", | ||
"description": "Tools for interacting with the Kava blockchain", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"license": "Apache-2.0", | ||
@@ -17,2 +17,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@binance-chain/javascript-sdk": "^3.0.2", | ||
"@kava-labs/javascript-sdk": "^2.0.0-beta.6", | ||
@@ -19,0 +20,0 @@ "axios": "^0.19.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81758
30
1667
7
40
+ Added@babel/runtime@7.26.0(transitive)
+ Added@binance-chain/javascript-sdk@3.0.2(transitive)
+ Added@jest/types@25.5.0(transitive)
+ Added@ledgerhq/devices@5.51.1(transitive)
+ Added@ledgerhq/errors@5.50.0(transitive)
+ Added@ledgerhq/hw-transport@5.51.1(transitive)
+ Added@ledgerhq/hw-transport-node-hid@5.51.1(transitive)
+ Added@ledgerhq/hw-transport-node-hid-noevents@5.51.1(transitive)
+ Added@ledgerhq/hw-transport-u2f@5.34.0(transitive)
+ Added@ledgerhq/hw-transport-web-ble@5.51.1(transitive)
+ Added@ledgerhq/logs@5.50.0(transitive)
+ Added@noble/hashes@1.5.0(transitive)
+ Added@types/bech32@1.1.8(transitive)
+ Added@types/big.js@4.0.5(transitive)
+ Added@types/bn.js@4.11.6(transitive)
+ Added@types/crypto-js@3.1.47(transitive)
+ Added@types/duplexify@3.6.4(transitive)
+ Added@types/elliptic@6.4.18(transitive)
+ Added@types/istanbul-lib-coverage@2.0.6(transitive)
+ Added@types/istanbul-lib-report@3.0.3(transitive)
+ Added@types/istanbul-reports@1.1.2(transitive)
+ Added@types/jest@25.2.3(transitive)
+ Added@types/ledgerhq__hw-transport@4.21.8(transitive)
+ Added@types/lodash@4.17.13(transitive)
+ Added@types/node@13.13.52(transitive)
+ Added@types/pumpify@1.4.4(transitive)
+ Added@types/tiny-secp256k1@1.0.0(transitive)
+ Added@types/uuid@7.0.8(transitive)
+ Added@types/yargs@15.0.19(transitive)
+ Added@types/yargs-parser@21.0.3(transitive)
+ Addedansi-regex@2.1.15.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedaproba@1.2.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedasn1.js@4.10.1(transitive)
+ Addedasync-limiter@1.0.1(transitive)
+ Addedb4a@1.6.7(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbip32@2.0.6(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedbn.js@5.2.1(transitive)
+ Addedbrowserify-cipher@1.0.1(transitive)
+ Addedbrowserify-des@1.0.2(transitive)
+ Addedbrowserify-rsa@4.1.1(transitive)
+ Addedbrowserify-sign@4.2.3(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedchalk@3.0.0(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcreate-ecdh@4.0.4(transitive)
+ Addedcrypto-browserify@3.12.1(transitive)
+ Addedcrypto-js@3.3.0(transitive)
+ Addeddecompress-response@4.2.1(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addeddes.js@1.1.0(transitive)
+ Addeddetect-libc@1.0.3(transitive)
+ Addeddiff-sequences@25.2.6(transitive)
+ Addeddiffie-hellman@5.0.3(transitive)
+ Addedduplexify@3.7.14.1.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedeslint-utils@1.4.3(transitive)
+ Addedeslint-visitor-keys@1.3.0(transitive)
+ Addedevents@3.3.0(transitive)
+ Addedexpand-template@2.0.3(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedgauge@2.7.4(transitive)
+ Addedgithub-from-package@0.0.0(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedhash-base@3.0.4(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedis_js@0.9.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjest-diff@25.5.0(transitive)
+ Addedjest-get-type@25.2.6(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedmiller-rabin@4.0.1(transitive)
+ Addedmimic-response@2.1.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addednapi-build-utils@1.0.2(transitive)
+ Addedndjson@1.5.0(transitive)
+ Addednode-abi@2.30.1(transitive)
+ Addednode-addon-api@3.2.14.3.0(transitive)
+ Addednode-gyp-build@4.8.4(transitive)
+ Addednode-hid@2.1.1(transitive)
+ Addednpmlog@4.1.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedparse-asn1@5.1.7(transitive)
+ Addedprebuild-install@6.1.4(transitive)
+ Addedpretty-format@25.5.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedprotocol-buffers-encodings@1.2.0(transitive)
+ Addedpublic-encrypt@4.0.3(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedpumpify@2.0.1(transitive)
+ Addedrandomfill@1.0.4(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsecure-random@1.1.2(transitive)
+ Addedsemver@5.7.27.6.3(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsigned-varint@2.0.1(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@3.1.1(transitive)
+ Addedsplit2@2.2.0(transitive)
+ Addedstream-shift@1.0.3(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtar-fs@2.1.1(transitive)
+ Addedtar-stream@2.2.0(transitive)
+ Addedthrough2@2.0.5(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedu2f-api@0.2.7(transitive)
+ Addedultron@1.1.1(transitive)
+ Addedusb@1.9.2(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedvarint@5.0.0(transitive)
+ Addedwebsocket-stream@5.5.2(transitive)
+ Addedwide-align@1.1.5(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedws@3.3.3(transitive)
+ Addedxtend@4.0.2(transitive)
- Removed@noble/hashes@1.6.1(transitive)
- Removedhash-base@3.1.0(transitive)