ccxt 4.5.60 → 4.5.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -45
- package/dist/ccxt.browser.min.js +4 -4
- package/dist/cjs/ccxt.js +6 -2
- package/dist/cjs/src/aftermath.js +1 -1
- package/dist/cjs/src/apex.js +2 -2
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/aster.js +3 -4
- package/dist/cjs/src/backpack.js +1 -1
- package/dist/cjs/src/base/Exchange.js +6 -38
- package/dist/cjs/src/base/functions/crypto.js +72 -15
- package/dist/cjs/src/base/functions/rsa.js +25 -10
- package/dist/cjs/src/base/functions.js +1 -0
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/bigone.js +1 -1
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/bingx.js +1 -1
- package/dist/cjs/src/bit2c.js +1 -1
- package/dist/cjs/src/bitbank.js +1 -1
- package/dist/cjs/src/bitbns.js +1 -1
- package/dist/cjs/src/bitfinex.js +5 -5
- package/dist/cjs/src/bitflyer.js +1 -1
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/bitmart.js +2 -2
- package/dist/cjs/src/bitmex.js +2 -2
- package/dist/cjs/src/bitopro.js +1 -1
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +2 -2
- package/dist/cjs/src/bitstamp.js +1 -1
- package/dist/cjs/src/bittrade.js +2 -2
- package/dist/cjs/src/bitvavo.js +1 -1
- package/dist/cjs/src/blockchaincom.js +1 -1
- package/dist/cjs/src/blofin.js +3 -4
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/btcmarkets.js +1 -1
- package/dist/cjs/src/btcturk.js +1 -1
- package/dist/cjs/src/bullish.js +1 -1
- package/dist/cjs/src/bybit.js +1 -1
- package/dist/cjs/src/bydfi.js +1 -1
- package/dist/cjs/src/cex.js +2 -2
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbaseexchange.js +2 -2
- package/dist/cjs/src/coincheck.js +2 -2
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/coinmate.js +1 -1
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/coinone.js +1 -1
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/coinspot.js +1 -1
- package/dist/cjs/src/cryptocom.js +1 -1
- package/dist/cjs/src/cryptomus.js +2 -2
- package/dist/cjs/src/deepcoin.js +1 -1
- package/dist/cjs/src/delta.js +1 -1
- package/dist/cjs/src/deribit.js +1 -1
- package/dist/cjs/src/derive.js +2 -3
- package/dist/cjs/src/digifinex.js +1 -1
- package/dist/cjs/src/dydx.js +2 -2
- package/dist/cjs/src/exmo.js +1 -1
- package/dist/cjs/src/extended.js +3 -3
- package/dist/cjs/src/foxbit.js +1 -1
- package/dist/cjs/src/gate.js +2 -2
- package/dist/cjs/src/gateeu.js +60 -0
- package/dist/cjs/src/gemini.js +1 -1
- package/dist/cjs/src/grvt.js +1 -1
- package/dist/cjs/src/hashkey.js +2 -2
- package/dist/cjs/src/hibachi.js +1 -1
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/hollaex.js +1 -1
- package/dist/cjs/src/htx.js +1 -1
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/independentreserve.js +1 -1
- package/dist/cjs/src/indodax.js +1 -1
- package/dist/cjs/src/kraken.js +1 -1
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/latoken.js +1 -1
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/lighter.js +1 -1
- package/dist/cjs/src/luno.js +2 -2
- package/dist/cjs/src/mercado.js +1 -1
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/modetrade.js +3 -5
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/okx.js +1 -1
- package/dist/cjs/src/onetrading.js +2 -2
- package/dist/cjs/src/p2b.js +2 -3
- package/dist/cjs/src/pacifica.js +2 -2
- package/dist/cjs/src/paradex.js +1 -1
- package/dist/cjs/src/paymium.js +1 -1
- package/dist/cjs/src/phemex.js +1 -1
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/aftermath.js +1 -1
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/apex.js +2 -2
- package/dist/cjs/src/pro/ascendex.js +1 -1
- package/dist/cjs/src/pro/aster.js +4 -4
- package/dist/cjs/src/pro/backpack.js +4 -4
- package/dist/cjs/src/pro/binance.js +5 -5
- package/dist/cjs/src/pro/bingx.js +2 -2
- package/dist/cjs/src/pro/bitfinex.js +1 -1
- package/dist/cjs/src/pro/bitget.js +4 -4
- package/dist/cjs/src/pro/bitmart.js +4 -4
- package/dist/cjs/src/pro/bitmex.js +2 -2
- package/dist/cjs/src/pro/bitopro.js +1 -1
- package/dist/cjs/src/pro/bitstamp.js +1 -1
- package/dist/cjs/src/pro/bittrade.js +1 -1
- package/dist/cjs/src/pro/bitvavo.js +1 -1
- package/dist/cjs/src/pro/blockchaincom.js +1 -1
- package/dist/cjs/src/pro/blofin.js +2 -2
- package/dist/cjs/src/pro/bullish.js +1 -1
- package/dist/cjs/src/pro/bybit.js +4 -4
- package/dist/cjs/src/pro/bydfi.js +4 -4
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/coinbase.js +3 -3
- package/dist/cjs/src/pro/coinbaseexchange.js +2 -2
- package/dist/cjs/src/pro/coinbaseinternational.js +2 -2
- package/dist/cjs/src/pro/coincheck.js +1 -1
- package/dist/cjs/src/pro/coinex.js +2 -2
- package/dist/cjs/src/pro/coinone.js +1 -1
- package/dist/cjs/src/pro/cryptocom.js +4 -4
- package/dist/cjs/src/pro/deepcoin.js +2 -2
- package/dist/cjs/src/pro/deribit.js +2 -2
- package/dist/cjs/src/pro/derive.js +2 -2
- package/dist/cjs/src/pro/dydx.js +2 -2
- package/dist/cjs/src/pro/exmo.js +1 -1
- package/dist/cjs/src/pro/extended.js +1 -1
- package/dist/cjs/src/pro/gate.js +46 -15
- package/dist/cjs/src/pro/gateeu.js +32 -0
- package/dist/cjs/src/pro/gemini.js +2 -3
- package/dist/cjs/src/pro/grvt.js +2 -2
- package/dist/cjs/src/pro/hashkey.js +1 -1
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/hollaex.js +1 -1
- package/dist/cjs/src/pro/htx.js +2 -2
- package/dist/cjs/src/pro/hyperliquid.js +2 -2
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/kraken.js +2 -2
- package/dist/cjs/src/pro/krakenfutures.js +2 -2
- package/dist/cjs/src/pro/kucoin.js +4 -4
- package/dist/cjs/src/pro/lighter.js +2 -2
- package/dist/cjs/src/pro/luno.js +1 -1
- package/dist/cjs/src/pro/mexc.js +2 -2
- package/dist/cjs/src/pro/modetrade.js +1 -1
- package/dist/cjs/src/pro/ndax.js +1 -1
- package/dist/cjs/src/pro/okx.js +4 -4
- package/dist/cjs/src/pro/onetrading.js +1 -1
- package/dist/cjs/src/pro/p2b.js +1 -1
- package/dist/cjs/src/pro/pacifica.js +2 -2
- package/dist/cjs/src/pro/paradex.js +1 -1
- package/dist/cjs/src/pro/phemex.js +1 -1
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/dist/cjs/src/pro/toobit.js +2 -2
- package/dist/cjs/src/pro/upbit.js +1 -1
- package/dist/cjs/src/pro/weex.js +4 -4
- package/dist/cjs/src/pro/whitebit.js +1 -1
- package/dist/cjs/src/pro/woo.js +2 -2
- package/dist/cjs/src/pro/woofipro.js +1 -1
- package/dist/cjs/src/tokocrypto.js +1 -1
- package/dist/cjs/src/toobit.js +2 -2
- package/dist/cjs/src/upbit.js +1 -1
- package/dist/cjs/src/weex.js +2 -2
- package/dist/cjs/src/whitebit.js +1 -1
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/woofipro.js +2 -4
- package/dist/cjs/src/xt.js +1 -1
- package/dist/cjs/src/zaif.js +2 -2
- package/dist/cjs/src/zebpay.js +2 -2
- package/js/ccxt.d.ts +8 -2
- package/js/ccxt.js +6 -3
- package/js/src/abstract/gateeu.d.ts +346 -0
- package/js/src/{static_dependencies/jsencrypt/index.js → abstract/gateeu.js} +5 -3
- package/js/src/aftermath.d.ts +1 -1
- package/js/src/aftermath.js +1 -1
- package/js/src/apex.d.ts +1 -1
- package/js/src/apex.js +2 -2
- package/js/src/ascendex.d.ts +1 -1
- package/js/src/ascendex.js +1 -1
- package/js/src/aster.d.ts +1 -1
- package/js/src/aster.js +3 -4
- package/js/src/backpack.js +1 -1
- package/js/src/base/Exchange.d.ts +1 -1
- package/js/src/base/Exchange.js +6 -38
- package/js/src/base/functions/crypto.d.ts +2 -1
- package/js/src/base/functions/crypto.js +72 -16
- package/js/src/base/functions/rsa.js +18 -7
- package/js/src/bequant.js +1 -1
- package/js/src/bigone.d.ts +1 -1
- package/js/src/bigone.js +1 -1
- package/js/src/binance.d.ts +1 -1
- package/js/src/binance.js +1 -1
- package/js/src/bingx.d.ts +1 -1
- package/js/src/bingx.js +1 -1
- package/js/src/bit2c.d.ts +1 -1
- package/js/src/bit2c.js +1 -1
- package/js/src/bitbank.d.ts +1 -1
- package/js/src/bitbank.js +1 -1
- package/js/src/bitbns.d.ts +1 -1
- package/js/src/bitbns.js +1 -1
- package/js/src/bitfinex.d.ts +1 -1
- package/js/src/bitfinex.js +5 -5
- package/js/src/bitflyer.d.ts +1 -1
- package/js/src/bitflyer.js +1 -1
- package/js/src/bitget.d.ts +1 -1
- package/js/src/bitget.js +2 -2
- package/js/src/bithumb.d.ts +1 -1
- package/js/src/bithumb.js +1 -1
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +2 -2
- package/js/src/bitmex.d.ts +1 -1
- package/js/src/bitmex.js +2 -2
- package/js/src/bitopro.d.ts +1 -1
- package/js/src/bitopro.js +1 -1
- package/js/src/bitrue.d.ts +1 -1
- package/js/src/bitrue.js +1 -1
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +2 -2
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +1 -1
- package/js/src/bittrade.d.ts +1 -1
- package/js/src/bittrade.js +2 -2
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/bitvavo.js +1 -1
- package/js/src/blockchaincom.d.ts +1 -1
- package/js/src/blockchaincom.js +1 -1
- package/js/src/blofin.d.ts +1 -1
- package/js/src/blofin.js +3 -4
- package/js/src/btcbox.d.ts +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/btcmarkets.d.ts +1 -1
- package/js/src/btcmarkets.js +1 -1
- package/js/src/btcturk.d.ts +1 -1
- package/js/src/btcturk.js +1 -1
- package/js/src/bullish.d.ts +1 -1
- package/js/src/bullish.js +1 -1
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +1 -1
- package/js/src/bydfi.js +1 -1
- package/js/src/cex.d.ts +1 -1
- package/js/src/cex.js +2 -2
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/coinbaseexchange.js +2 -2
- package/js/src/coincheck.d.ts +1 -1
- package/js/src/coincheck.js +2 -2
- package/js/src/coinex.d.ts +1 -1
- package/js/src/coinex.js +1 -1
- package/js/src/coinmate.d.ts +1 -1
- package/js/src/coinmate.js +1 -1
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/coinone.d.ts +1 -1
- package/js/src/coinone.js +1 -1
- package/js/src/coinsph.d.ts +1 -1
- package/js/src/coinsph.js +1 -1
- package/js/src/coinspot.d.ts +1 -1
- package/js/src/coinspot.js +1 -1
- package/js/src/cryptocom.d.ts +1 -1
- package/js/src/cryptocom.js +1 -1
- package/js/src/cryptomus.d.ts +1 -1
- package/js/src/cryptomus.js +2 -2
- package/js/src/deepcoin.d.ts +1 -1
- package/js/src/deepcoin.js +1 -1
- package/js/src/delta.d.ts +1 -1
- package/js/src/delta.js +1 -1
- package/js/src/deribit.d.ts +1 -1
- package/js/src/deribit.js +1 -1
- package/js/src/derive.js +2 -3
- package/js/src/digifinex.d.ts +1 -1
- package/js/src/digifinex.js +1 -1
- package/js/src/dydx.d.ts +1 -1
- package/js/src/dydx.js +2 -2
- package/js/src/exmo.d.ts +1 -1
- package/js/src/exmo.js +1 -1
- package/js/src/extended.d.ts +1 -1
- package/js/src/extended.js +3 -3
- package/js/src/foxbit.d.ts +1 -1
- package/js/src/foxbit.js +1 -1
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +2 -2
- package/js/src/gateeu.d.ts +4 -0
- package/js/src/gateeu.js +59 -0
- package/js/src/gemini.d.ts +1 -1
- package/js/src/gemini.js +1 -1
- package/js/src/grvt.js +1 -1
- package/js/src/hashkey.d.ts +1 -1
- package/js/src/hashkey.js +2 -2
- package/js/src/hibachi.js +1 -1
- package/js/src/hitbtc.d.ts +1 -1
- package/js/src/hitbtc.js +1 -1
- package/js/src/hollaex.d.ts +1 -1
- package/js/src/hollaex.js +1 -1
- package/js/src/htx.d.ts +1 -1
- package/js/src/htx.js +1 -1
- package/js/src/hyperliquid.d.ts +1 -1
- package/js/src/hyperliquid.js +1 -1
- package/js/src/independentreserve.d.ts +1 -1
- package/js/src/independentreserve.js +1 -1
- package/js/src/indodax.d.ts +1 -1
- package/js/src/indodax.js +1 -1
- package/js/src/kraken.d.ts +1 -1
- package/js/src/kraken.js +1 -1
- package/js/src/kucoin.d.ts +1 -1
- package/js/src/kucoin.js +1 -1
- package/js/src/latoken.d.ts +1 -1
- package/js/src/latoken.js +1 -1
- package/js/src/lbank.d.ts +1 -1
- package/js/src/lbank.js +1 -1
- package/js/src/lighter.d.ts +1 -1
- package/js/src/lighter.js +1 -1
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +2 -2
- package/js/src/mercado.d.ts +1 -1
- package/js/src/mercado.js +1 -1
- package/js/src/mexc.d.ts +1 -1
- package/js/src/mexc.js +1 -1
- package/js/src/modetrade.d.ts +1 -1
- package/js/src/modetrade.js +3 -5
- package/js/src/ndax.d.ts +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/novadax.d.ts +1 -1
- package/js/src/novadax.js +1 -1
- package/js/src/okx.d.ts +1 -1
- package/js/src/okx.js +1 -1
- package/js/src/onetrading.d.ts +1 -1
- package/js/src/onetrading.js +2 -2
- package/js/src/p2b.d.ts +1 -1
- package/js/src/p2b.js +2 -3
- package/js/src/pacifica.d.ts +1 -1
- package/js/src/pacifica.js +2 -2
- package/js/src/paradex.d.ts +1 -1
- package/js/src/paradex.js +1 -1
- package/js/src/paymium.d.ts +1 -1
- package/js/src/paymium.js +1 -1
- package/js/src/phemex.d.ts +1 -1
- package/js/src/phemex.js +1 -1
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/aftermath.d.ts +1 -1
- package/js/src/pro/aftermath.js +1 -1
- package/js/src/pro/alpaca.d.ts +1 -1
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/apex.d.ts +2 -2
- package/js/src/pro/apex.js +2 -2
- package/js/src/pro/ascendex.d.ts +1 -1
- package/js/src/pro/ascendex.js +1 -1
- package/js/src/pro/aster.d.ts +4 -4
- package/js/src/pro/aster.js +4 -4
- package/js/src/pro/backpack.d.ts +4 -4
- package/js/src/pro/backpack.js +4 -4
- package/js/src/pro/binance.d.ts +5 -5
- package/js/src/pro/binance.js +5 -5
- package/js/src/pro/bingx.d.ts +2 -2
- package/js/src/pro/bingx.js +2 -2
- package/js/src/pro/bitfinex.d.ts +1 -1
- package/js/src/pro/bitfinex.js +1 -1
- package/js/src/pro/bitget.d.ts +4 -4
- package/js/src/pro/bitget.js +4 -4
- package/js/src/pro/bitmart.d.ts +4 -4
- package/js/src/pro/bitmart.js +4 -4
- package/js/src/pro/bitmex.d.ts +2 -2
- package/js/src/pro/bitmex.js +2 -2
- package/js/src/pro/bitopro.d.ts +1 -1
- package/js/src/pro/bitopro.js +1 -1
- package/js/src/pro/bitstamp.d.ts +1 -1
- package/js/src/pro/bitstamp.js +1 -1
- package/js/src/pro/bittrade.d.ts +1 -1
- package/js/src/pro/bittrade.js +1 -1
- package/js/src/pro/bitvavo.d.ts +1 -1
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/blockchaincom.d.ts +1 -1
- package/js/src/pro/blockchaincom.js +1 -1
- package/js/src/pro/blofin.d.ts +2 -2
- package/js/src/pro/blofin.js +2 -2
- package/js/src/pro/bullish.d.ts +1 -1
- package/js/src/pro/bullish.js +1 -1
- package/js/src/pro/bybit.d.ts +4 -4
- package/js/src/pro/bybit.js +4 -4
- package/js/src/pro/bydfi.d.ts +4 -4
- package/js/src/pro/bydfi.js +4 -4
- package/js/src/pro/cex.d.ts +1 -1
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coinbase.d.ts +3 -3
- package/js/src/pro/coinbase.js +3 -3
- package/js/src/pro/coinbaseexchange.d.ts +2 -2
- package/js/src/pro/coinbaseexchange.js +2 -2
- package/js/src/pro/coinbaseinternational.d.ts +2 -2
- package/js/src/pro/coinbaseinternational.js +2 -2
- package/js/src/pro/coincheck.d.ts +1 -1
- package/js/src/pro/coincheck.js +1 -1
- package/js/src/pro/coinex.d.ts +2 -2
- package/js/src/pro/coinex.js +2 -2
- package/js/src/pro/coinone.d.ts +1 -1
- package/js/src/pro/coinone.js +1 -1
- package/js/src/pro/cryptocom.d.ts +4 -4
- package/js/src/pro/cryptocom.js +4 -4
- package/js/src/pro/deepcoin.d.ts +2 -2
- package/js/src/pro/deepcoin.js +2 -2
- package/js/src/pro/deribit.d.ts +2 -2
- package/js/src/pro/deribit.js +2 -2
- package/js/src/pro/derive.d.ts +2 -2
- package/js/src/pro/derive.js +2 -2
- package/js/src/pro/dydx.d.ts +2 -2
- package/js/src/pro/dydx.js +2 -2
- package/js/src/pro/exmo.d.ts +1 -1
- package/js/src/pro/exmo.js +1 -1
- package/js/src/pro/extended.d.ts +1 -1
- package/js/src/pro/extended.js +1 -1
- package/js/src/pro/gate.d.ts +3 -2
- package/js/src/pro/gate.js +46 -15
- package/js/src/pro/gateeu.d.ts +4 -0
- package/js/src/pro/gateeu.js +31 -0
- package/js/src/pro/gemini.d.ts +2 -2
- package/js/src/pro/gemini.js +2 -3
- package/js/src/pro/grvt.d.ts +2 -2
- package/js/src/pro/grvt.js +2 -2
- package/js/src/pro/hashkey.d.ts +1 -1
- package/js/src/pro/hashkey.js +1 -1
- package/js/src/pro/hitbtc.d.ts +1 -1
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/hollaex.d.ts +1 -1
- package/js/src/pro/hollaex.js +1 -1
- package/js/src/pro/htx.d.ts +2 -2
- package/js/src/pro/htx.js +2 -2
- package/js/src/pro/hyperliquid.d.ts +2 -2
- package/js/src/pro/hyperliquid.js +2 -2
- package/js/src/pro/independentreserve.d.ts +1 -1
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/kraken.d.ts +2 -2
- package/js/src/pro/kraken.js +2 -2
- package/js/src/pro/krakenfutures.d.ts +2 -2
- package/js/src/pro/krakenfutures.js +2 -2
- package/js/src/pro/kucoin.d.ts +4 -4
- package/js/src/pro/kucoin.js +4 -4
- package/js/src/pro/lighter.d.ts +2 -2
- package/js/src/pro/lighter.js +2 -2
- package/js/src/pro/luno.d.ts +1 -1
- package/js/src/pro/luno.js +1 -1
- package/js/src/pro/mexc.d.ts +2 -2
- package/js/src/pro/mexc.js +2 -2
- package/js/src/pro/modetrade.d.ts +1 -1
- package/js/src/pro/modetrade.js +1 -1
- package/js/src/pro/ndax.d.ts +1 -1
- package/js/src/pro/ndax.js +1 -1
- package/js/src/pro/okx.d.ts +4 -4
- package/js/src/pro/okx.js +4 -4
- package/js/src/pro/onetrading.d.ts +1 -1
- package/js/src/pro/onetrading.js +1 -1
- package/js/src/pro/p2b.d.ts +1 -1
- package/js/src/pro/p2b.js +1 -1
- package/js/src/pro/pacifica.d.ts +2 -2
- package/js/src/pro/pacifica.js +2 -2
- package/js/src/pro/paradex.d.ts +1 -1
- package/js/src/pro/paradex.js +1 -1
- package/js/src/pro/phemex.d.ts +1 -1
- package/js/src/pro/phemex.js +1 -1
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +1 -1
- package/js/src/pro/toobit.d.ts +2 -2
- package/js/src/pro/toobit.js +2 -2
- package/js/src/pro/upbit.d.ts +1 -1
- package/js/src/pro/upbit.js +1 -1
- package/js/src/pro/weex.d.ts +4 -4
- package/js/src/pro/weex.js +4 -4
- package/js/src/pro/whitebit.d.ts +1 -1
- package/js/src/pro/whitebit.js +1 -1
- package/js/src/pro/woo.d.ts +2 -2
- package/js/src/pro/woo.js +2 -2
- package/js/src/pro/woofipro.d.ts +1 -1
- package/js/src/pro/woofipro.js +1 -1
- package/js/src/tokocrypto.d.ts +1 -1
- package/js/src/tokocrypto.js +1 -1
- package/js/src/toobit.d.ts +1 -1
- package/js/src/toobit.js +2 -2
- package/js/src/upbit.d.ts +1 -1
- package/js/src/upbit.js +1 -1
- package/js/src/weex.d.ts +1 -1
- package/js/src/weex.js +2 -2
- package/js/src/whitebit.d.ts +1 -1
- package/js/src/whitebit.js +1 -1
- package/js/src/woo.d.ts +1 -1
- package/js/src/woo.js +1 -1
- package/js/src/woofipro.d.ts +1 -1
- package/js/src/woofipro.js +2 -4
- package/js/src/xt.js +1 -1
- package/js/src/zaif.d.ts +1 -1
- package/js/src/zaif.js +2 -2
- package/js/src/zebpay.d.ts +1 -1
- package/js/src/zebpay.js +2 -2
- package/package.json +17 -7
- package/js/src/static_dependencies/jsencrypt/JSEncrypt.d.ts +0 -116
- package/js/src/static_dependencies/jsencrypt/JSEncrypt.js +0 -194
- package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.d.ts +0 -142
- package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +0 -307
- package/js/src/static_dependencies/jsencrypt/index.d.ts +0 -3
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.d.ts +0 -51
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/asn1.js +0 -565
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/base64.d.ts +0 -5
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/base64.js +0 -94
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/hex.d.ts +0 -3
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/hex.js +0 -70
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/int10.d.ts +0 -9
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/int10.js +0 -91
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/oids.d.ts +0 -9778
- package/js/src/static_dependencies/jsencrypt/lib/asn1js/oids.js +0 -1968
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/base64.d.ts +0 -3
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/base64.js +0 -25
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +0 -101
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.js +0 -1757
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/prng4.d.ts +0 -10
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/prng4.js +0 -50
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/rng.d.ts +0 -3
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/rng.js +0 -80
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/rsa.d.ts +0 -23
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/rsa.js +0 -377
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/util.d.ts +0 -7
- package/js/src/static_dependencies/jsencrypt/lib/jsbn/util.js +0 -64
- package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/asn1-1.0.d.ts +0 -24
- package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/asn1-1.0.js +0 -1627
- package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/yahoo.d.ts +0 -5
- package/js/src/static_dependencies/jsencrypt/lib/jsrsasign/yahoo.js +0 -75
package/js/src/weex.js
CHANGED
|
@@ -189,7 +189,7 @@ export default class weex extends Exchange {
|
|
|
189
189
|
'withdraw': false,
|
|
190
190
|
},
|
|
191
191
|
'urls': {
|
|
192
|
-
'logo': 'https://github.com/user-attachments/assets/
|
|
192
|
+
'logo': 'https://github.com/user-attachments/assets/bc67b9f2-75d2-4b8d-963a-18f2fcd9d13c', // todo
|
|
193
193
|
'api': {
|
|
194
194
|
'public': 'https://api-spot.weex.com',
|
|
195
195
|
'private': 'https://api-spot.weex.com',
|
|
@@ -1278,7 +1278,7 @@ export default class weex extends Exchange {
|
|
|
1278
1278
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1279
1279
|
* @param {int} [limit] the maximum amount of order book entries to return (default 15, max 200)
|
|
1280
1280
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1281
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
1281
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
1282
1282
|
*/
|
|
1283
1283
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1284
1284
|
await this.loadMarkets();
|
package/js/src/whitebit.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export default class whitebit extends Exchange {
|
|
|
127
127
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
128
128
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
129
129
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
130
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
130
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
131
131
|
*/
|
|
132
132
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
133
133
|
/**
|
package/js/src/whitebit.js
CHANGED
|
@@ -1577,7 +1577,7 @@ export default class whitebit extends Exchange {
|
|
|
1577
1577
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1578
1578
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1579
1579
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1580
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
1580
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
1581
1581
|
*/
|
|
1582
1582
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1583
1583
|
await this.loadMarkets();
|
package/js/src/woo.d.ts
CHANGED
|
@@ -304,7 +304,7 @@ export default class woo extends Exchange {
|
|
|
304
304
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
305
305
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
306
306
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
307
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
307
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
308
308
|
*/
|
|
309
309
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
310
310
|
/**
|
package/js/src/woo.js
CHANGED
|
@@ -2107,7 +2107,7 @@ export default class woo extends Exchange {
|
|
|
2107
2107
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
2108
2108
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
2109
2109
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2110
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
2110
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
2111
2111
|
*/
|
|
2112
2112
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
2113
2113
|
await this.loadMarkets();
|
package/js/src/woofipro.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ export default class woofipro extends Exchange {
|
|
|
152
152
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
153
153
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
154
154
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
155
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
155
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
156
156
|
*/
|
|
157
157
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
158
158
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
package/js/src/woofipro.js
CHANGED
|
@@ -29,7 +29,6 @@ export default class woofipro extends Exchange {
|
|
|
29
29
|
'certified': true,
|
|
30
30
|
'pro': true,
|
|
31
31
|
'dex': true,
|
|
32
|
-
'hostname': 'dex.woo.org',
|
|
33
32
|
'has': {
|
|
34
33
|
'CORS': undefined,
|
|
35
34
|
'spot': false,
|
|
@@ -1229,7 +1228,7 @@ export default class woofipro extends Exchange {
|
|
|
1229
1228
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
1230
1229
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
1231
1230
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1232
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
1231
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
1233
1232
|
*/
|
|
1234
1233
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
1235
1234
|
await this.loadMarkets();
|
|
@@ -2882,8 +2881,7 @@ export default class woofipro extends Exchange {
|
|
|
2882
2881
|
const version = section[0];
|
|
2883
2882
|
const access = section[1];
|
|
2884
2883
|
const pathWithParams = this.implodeParams(path, params);
|
|
2885
|
-
let url = this.
|
|
2886
|
-
url += '/' + version + '/';
|
|
2884
|
+
let url = this.urls['api'][access] + '/' + version + '/';
|
|
2887
2885
|
params = this.omit(params, this.extractParams(path));
|
|
2888
2886
|
params = this.keysort(params);
|
|
2889
2887
|
if (access === 'public') {
|
package/js/src/xt.js
CHANGED
|
@@ -130,7 +130,7 @@ export default class xt extends Exchange {
|
|
|
130
130
|
},
|
|
131
131
|
'precisionMode': TICK_SIZE,
|
|
132
132
|
'urls': {
|
|
133
|
-
'logo': 'https://
|
|
133
|
+
'logo': 'https://github.com/user-attachments/assets/1f916564-6507-4549-af96-22837bb0a0c7',
|
|
134
134
|
'api': {
|
|
135
135
|
'spot': 'https://sapi.xt.com',
|
|
136
136
|
'linear': 'https://fapi.xt.com',
|
package/js/src/zaif.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export default class zaif extends Exchange {
|
|
|
34
34
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
35
35
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
36
36
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
37
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
37
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
38
38
|
*/
|
|
39
39
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
40
40
|
parseTicker(ticker: Dict, market?: Market): Ticker;
|
package/js/src/zaif.js
CHANGED
|
@@ -84,7 +84,7 @@ export default class zaif extends Exchange {
|
|
|
84
84
|
'withdraw': true,
|
|
85
85
|
},
|
|
86
86
|
'urls': {
|
|
87
|
-
'logo': 'https://
|
|
87
|
+
'logo': 'https://github.com/user-attachments/assets/c6c97d18-5bde-46ed-8eb1-85404d36150e',
|
|
88
88
|
'api': {
|
|
89
89
|
'rest': 'https://api.zaif.jp',
|
|
90
90
|
},
|
|
@@ -365,7 +365,7 @@ export default class zaif extends Exchange {
|
|
|
365
365
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
366
366
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
367
367
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
368
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
368
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
369
369
|
*/
|
|
370
370
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
371
371
|
await this.loadMarkets();
|
package/js/src/zebpay.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ export default class zebpay extends Exchange {
|
|
|
82
82
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
83
83
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
84
84
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
85
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
85
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
86
86
|
*/
|
|
87
87
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
88
88
|
/**
|
package/js/src/zebpay.js
CHANGED
|
@@ -85,7 +85,7 @@ export default class zebpay extends Exchange {
|
|
|
85
85
|
'1w': 10080,
|
|
86
86
|
},
|
|
87
87
|
'urls': {
|
|
88
|
-
'logo': 'https://github.com/user-attachments/assets/
|
|
88
|
+
'logo': 'https://github.com/user-attachments/assets/0e88d86a-a1cd-49df-a826-054cd8caafa6',
|
|
89
89
|
'api': {
|
|
90
90
|
'spot': 'https://sapi.zebpay.com',
|
|
91
91
|
'swap': 'https://futuresbe.zebpay.com',
|
|
@@ -558,7 +558,7 @@ export default class zebpay extends Exchange {
|
|
|
558
558
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
559
559
|
* @param {int} [limit] the maximum amount of order book entries to return
|
|
560
560
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
561
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
561
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure}
|
|
562
562
|
*/
|
|
563
563
|
async fetchOrderBook(symbol, limit = undefined, params = {}) {
|
|
564
564
|
await this.loadMarkets();
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccxt",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.61",
|
|
4
4
|
"description": "A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go",
|
|
5
5
|
"unpkg": "dist/ccxt.browser.min.js",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"sideEffects":
|
|
8
|
-
"./js/ccxt.js",
|
|
9
|
-
"./dist/ccxt.cjs"
|
|
10
|
-
],
|
|
7
|
+
"sideEffects": false,
|
|
11
8
|
"exports": {
|
|
12
9
|
".": {
|
|
13
10
|
"import": {
|
|
@@ -87,7 +84,7 @@
|
|
|
87
84
|
"pre-transpile-js-simple": "npm run export-exchanges && npm run emitAPITs && tsc && npm run validate-types",
|
|
88
85
|
"pre-transpile-cs": "npm run export-exchanges && npm run emitAPICs",
|
|
89
86
|
"pre-transpile-java": "npm run export-exchanges && npm run emitAPIJava",
|
|
90
|
-
"pre-transpile": "npm run export-exchanges && npm run vss && npm run tsBuild && npm run emitAPI && npm run validate-types && npm run tsBuildExamples && npm run
|
|
87
|
+
"pre-transpile": "npm run export-exchanges && npm run vss && npm run tsBuild && npm run emitAPI && npm run validate-types && npm run tsBuildExamples && npm run check-js-syntax && npm run bundle",
|
|
91
88
|
"pre-transpile-pr": "npm run export-exchanges && npm run tsBuild && npm run emitAPI && npm run check-js-syntax",
|
|
92
89
|
"post-transpile": "npm run check-python-syntax && npm run check-php-syntax",
|
|
93
90
|
"cli.ts": "tsx ./cli/ts/cli.ts",
|
|
@@ -125,11 +122,12 @@
|
|
|
125
122
|
"check-js-syntax": "node -e \"console.log(process.cwd())\" && eslint --version && npm run lint",
|
|
126
123
|
"eslint": "eslint",
|
|
127
124
|
"check-python-syntax": "cd python && tox -e qa && cd ..",
|
|
128
|
-
"check-python-
|
|
125
|
+
"check-python-style": "ruff check ./python/ccxt",
|
|
129
126
|
"check-python-types": "cd python && tox -e type && cd ..",
|
|
130
127
|
"check-php-syntax": "npm run check-rest-php-syntax && npm run check-ws-php-syntax",
|
|
131
128
|
"check-rest-php-syntax": "php -f php/test/custom/syntax.php",
|
|
132
129
|
"check-ws-php-syntax": "php -f php/pro/test/custom/syntax.php",
|
|
130
|
+
"check-php-style": "php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --dry-run",
|
|
133
131
|
"bundle": "npm run bundle-cjs && npm run bundle-browser",
|
|
134
132
|
"bundle-cjs": "rollup -c rollup.config.js",
|
|
135
133
|
"bundle-browser": "rspack build -c rspack.config.js && CCXT_MINIMIZE=true CCXT_OUTPUT_FILENAME=ccxt.browser.min.js rspack build -c rspack.config.js",
|
|
@@ -365,7 +363,19 @@
|
|
|
365
363
|
"@scure/starknet": "2.2.0",
|
|
366
364
|
"ws": "8.21.0"
|
|
367
365
|
},
|
|
366
|
+
"overrides": {
|
|
367
|
+
"marked": "^4.0.10",
|
|
368
|
+
"piscina": "^4.9.3"
|
|
369
|
+
},
|
|
368
370
|
"optionalDependencies": {
|
|
369
371
|
"bufferutil": "4.1.0"
|
|
372
|
+
},
|
|
373
|
+
"peerDependencies": {
|
|
374
|
+
"protobufjs": "^7.5.3"
|
|
375
|
+
},
|
|
376
|
+
"peerDependenciesMeta": {
|
|
377
|
+
"protobufjs": {
|
|
378
|
+
"optional": true
|
|
379
|
+
}
|
|
370
380
|
}
|
|
371
381
|
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { JSEncryptRSAKey } from "./JSEncryptRSAKey.js";
|
|
2
|
-
export interface IJSEncryptOptions {
|
|
3
|
-
default_key_size?: string;
|
|
4
|
-
default_public_exponent?: string;
|
|
5
|
-
log?: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {object} [options = {}] - An object to customize JSEncrypt behaviour
|
|
10
|
-
* possible parameters are:
|
|
11
|
-
* - default_key_size {number} default: 1024 the key size in bit
|
|
12
|
-
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
|
|
13
|
-
* - log {boolean} default: false whether log warn/error or not
|
|
14
|
-
* @constructor
|
|
15
|
-
*/
|
|
16
|
-
export declare class JSEncrypt {
|
|
17
|
-
constructor(options?: IJSEncryptOptions);
|
|
18
|
-
private default_key_size;
|
|
19
|
-
private default_public_exponent;
|
|
20
|
-
private log;
|
|
21
|
-
private key;
|
|
22
|
-
static version: string;
|
|
23
|
-
/**
|
|
24
|
-
* Method to set the rsa key parameter (one method is enough to set both the public
|
|
25
|
-
* and the private key, since the private key contains the public key paramenters)
|
|
26
|
-
* Log a warning if logs are enabled
|
|
27
|
-
* @param {Object|string} key the pem encoded string or an object (with or without header/footer)
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
setKey(key: string): void;
|
|
31
|
-
/**
|
|
32
|
-
* Proxy method for setKey, for api compatibility
|
|
33
|
-
* @see setKey
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
setPrivateKey(privkey: string): void;
|
|
37
|
-
/**
|
|
38
|
-
* Proxy method for setKey, for api compatibility
|
|
39
|
-
* @see setKey
|
|
40
|
-
* @public
|
|
41
|
-
*/
|
|
42
|
-
setPublicKey(pubkey: string): void;
|
|
43
|
-
/**
|
|
44
|
-
* Proxy method for RSAKey object's decrypt, decrypt the string using the private
|
|
45
|
-
* components of the rsa key object. Note that if the object was not set will be created
|
|
46
|
-
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
47
|
-
* @param {string} str base64 encoded crypted string to decrypt
|
|
48
|
-
* @return {string} the decrypted string
|
|
49
|
-
* @public
|
|
50
|
-
*/
|
|
51
|
-
decrypt(str: string): string | false;
|
|
52
|
-
/**
|
|
53
|
-
* Proxy method for RSAKey object's encrypt, encrypt the string using the public
|
|
54
|
-
* components of the rsa key object. Note that if the object was not set will be created
|
|
55
|
-
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
56
|
-
* @param {string} str the string to encrypt
|
|
57
|
-
* @return {string} the encrypted string encoded in base64
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
encrypt(str: string): string | false;
|
|
61
|
-
/**
|
|
62
|
-
* Proxy method for RSAKey object's sign.
|
|
63
|
-
* @param {string} str the string to sign
|
|
64
|
-
* @param {function} digestMethod hash method
|
|
65
|
-
* @param {string} digestName the name of the hash algorithm
|
|
66
|
-
* @return {string} the signature encoded in base64
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
sign(str: string, digestMethod: (str: string) => string, digestName: string): string | false;
|
|
70
|
-
/**
|
|
71
|
-
* Proxy method for RSAKey object's verify.
|
|
72
|
-
* @param {string} str the string to verify
|
|
73
|
-
* @param {string} signature the signature encoded in base64 to compare the string to
|
|
74
|
-
* @param {function} digestMethod hash method
|
|
75
|
-
* @return {boolean} whether the data and signature match
|
|
76
|
-
* @public
|
|
77
|
-
*/
|
|
78
|
-
verify(str: string, signature: string, digestMethod: (str: string) => string): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
|
|
81
|
-
* will be created and returned
|
|
82
|
-
* @param {callback} [cb] the callback to be called if we want the key to be generated
|
|
83
|
-
* in an async fashion
|
|
84
|
-
* @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
|
|
85
|
-
* @public
|
|
86
|
-
*/
|
|
87
|
-
getKey(cb?: () => void): JSEncryptRSAKey;
|
|
88
|
-
/**
|
|
89
|
-
* Returns the pem encoded representation of the private key
|
|
90
|
-
* If the key doesn't exists a new key will be created
|
|
91
|
-
* @returns {string} pem encoded representation of the private key WITH header and footer
|
|
92
|
-
* @public
|
|
93
|
-
*/
|
|
94
|
-
getPrivateKey(): string;
|
|
95
|
-
/**
|
|
96
|
-
* Returns the pem encoded representation of the private key
|
|
97
|
-
* If the key doesn't exists a new key will be created
|
|
98
|
-
* @returns {string} pem encoded representation of the private key WITHOUT header and footer
|
|
99
|
-
* @public
|
|
100
|
-
*/
|
|
101
|
-
getPrivateKeyB64(): string;
|
|
102
|
-
/**
|
|
103
|
-
* Returns the pem encoded representation of the public key
|
|
104
|
-
* If the key doesn't exists a new key will be created
|
|
105
|
-
* @returns {string} pem encoded representation of the public key WITH header and footer
|
|
106
|
-
* @public
|
|
107
|
-
*/
|
|
108
|
-
getPublicKey(): string;
|
|
109
|
-
/**
|
|
110
|
-
* Returns the pem encoded representation of the public key
|
|
111
|
-
* If the key doesn't exists a new key will be created
|
|
112
|
-
* @returns {string} pem encoded representation of the public key WITHOUT header and footer
|
|
113
|
-
* @public
|
|
114
|
-
*/
|
|
115
|
-
getPublicKeyB64(): string;
|
|
116
|
-
}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// ----------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
-
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
-
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
-
|
|
7
|
-
import { b64tohex, hex2b64 } from "./lib/jsbn/base64.js";
|
|
8
|
-
import { JSEncryptRSAKey } from "./JSEncryptRSAKey.js";
|
|
9
|
-
const version = typeof process !== 'undefined'
|
|
10
|
-
? process.env?.npm_package_version
|
|
11
|
-
: undefined;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param {object} [options = {}] - An object to customize JSEncrypt behaviour
|
|
15
|
-
* possible parameters are:
|
|
16
|
-
* - default_key_size {number} default: 1024 the key size in bit
|
|
17
|
-
* - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
|
|
18
|
-
* - log {boolean} default: false whether log warn/error or not
|
|
19
|
-
* @constructor
|
|
20
|
-
*/
|
|
21
|
-
export class JSEncrypt {
|
|
22
|
-
constructor(options = {}) {
|
|
23
|
-
options = options || {};
|
|
24
|
-
this.default_key_size = options.default_key_size
|
|
25
|
-
? parseInt(options.default_key_size, 10)
|
|
26
|
-
: 1024;
|
|
27
|
-
this.default_public_exponent = options.default_public_exponent || "010001"; // 65537 default openssl public exponent for rsa key type
|
|
28
|
-
this.log = options.log || false;
|
|
29
|
-
// The private and public key.
|
|
30
|
-
this.key = null;
|
|
31
|
-
}
|
|
32
|
-
static { this.version = version; }
|
|
33
|
-
/**
|
|
34
|
-
* Method to set the rsa key parameter (one method is enough to set both the public
|
|
35
|
-
* and the private key, since the private key contains the public key paramenters)
|
|
36
|
-
* Log a warning if logs are enabled
|
|
37
|
-
* @param {Object|string} key the pem encoded string or an object (with or without header/footer)
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
setKey(key) {
|
|
41
|
-
if (this.log && this.key) {
|
|
42
|
-
console.warn("A key was already set, overriding existing.");
|
|
43
|
-
}
|
|
44
|
-
this.key = new JSEncryptRSAKey(key);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Proxy method for setKey, for api compatibility
|
|
48
|
-
* @see setKey
|
|
49
|
-
* @public
|
|
50
|
-
*/
|
|
51
|
-
setPrivateKey(privkey) {
|
|
52
|
-
// Create the key.
|
|
53
|
-
this.setKey(privkey);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Proxy method for setKey, for api compatibility
|
|
57
|
-
* @see setKey
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
setPublicKey(pubkey) {
|
|
61
|
-
// Sets the public key.
|
|
62
|
-
this.setKey(pubkey);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Proxy method for RSAKey object's decrypt, decrypt the string using the private
|
|
66
|
-
* components of the rsa key object. Note that if the object was not set will be created
|
|
67
|
-
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
68
|
-
* @param {string} str base64 encoded crypted string to decrypt
|
|
69
|
-
* @return {string} the decrypted string
|
|
70
|
-
* @public
|
|
71
|
-
*/
|
|
72
|
-
decrypt(str) {
|
|
73
|
-
// Return the decrypted string.
|
|
74
|
-
try {
|
|
75
|
-
return this.getKey().decrypt(b64tohex(str));
|
|
76
|
-
}
|
|
77
|
-
catch (ex) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Proxy method for RSAKey object's encrypt, encrypt the string using the public
|
|
83
|
-
* components of the rsa key object. Note that if the object was not set will be created
|
|
84
|
-
* on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
|
|
85
|
-
* @param {string} str the string to encrypt
|
|
86
|
-
* @return {string} the encrypted string encoded in base64
|
|
87
|
-
* @public
|
|
88
|
-
*/
|
|
89
|
-
encrypt(str) {
|
|
90
|
-
// Return the encrypted string.
|
|
91
|
-
try {
|
|
92
|
-
return hex2b64(this.getKey().encrypt(str));
|
|
93
|
-
}
|
|
94
|
-
catch (ex) {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Proxy method for RSAKey object's sign.
|
|
100
|
-
* @param {string} str the string to sign
|
|
101
|
-
* @param {function} digestMethod hash method
|
|
102
|
-
* @param {string} digestName the name of the hash algorithm
|
|
103
|
-
* @return {string} the signature encoded in base64
|
|
104
|
-
* @public
|
|
105
|
-
*/
|
|
106
|
-
sign(str, digestMethod, digestName) {
|
|
107
|
-
// return the RSA signature of 'str' in 'hex' format.
|
|
108
|
-
try {
|
|
109
|
-
return hex2b64(this.getKey().sign(str, digestMethod, digestName));
|
|
110
|
-
}
|
|
111
|
-
catch (ex) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Proxy method for RSAKey object's verify.
|
|
117
|
-
* @param {string} str the string to verify
|
|
118
|
-
* @param {string} signature the signature encoded in base64 to compare the string to
|
|
119
|
-
* @param {function} digestMethod hash method
|
|
120
|
-
* @return {boolean} whether the data and signature match
|
|
121
|
-
* @public
|
|
122
|
-
*/
|
|
123
|
-
verify(str, signature, digestMethod) {
|
|
124
|
-
// Return the decrypted 'digest' of the signature.
|
|
125
|
-
try {
|
|
126
|
-
return this.getKey().verify(str, b64tohex(signature), digestMethod);
|
|
127
|
-
}
|
|
128
|
-
catch (ex) {
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
|
|
134
|
-
* will be created and returned
|
|
135
|
-
* @param {callback} [cb] the callback to be called if we want the key to be generated
|
|
136
|
-
* in an async fashion
|
|
137
|
-
* @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
140
|
-
getKey(cb) {
|
|
141
|
-
// Only create new if it does not exist.
|
|
142
|
-
if (!this.key) {
|
|
143
|
-
// Get a new private key.
|
|
144
|
-
this.key = new JSEncryptRSAKey();
|
|
145
|
-
if (cb && {}.toString.call(cb) === "[object Function]") {
|
|
146
|
-
this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
// Generate the key.
|
|
150
|
-
this.key.generate(this.default_key_size, this.default_public_exponent);
|
|
151
|
-
}
|
|
152
|
-
return this.key;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Returns the pem encoded representation of the private key
|
|
156
|
-
* If the key doesn't exists a new key will be created
|
|
157
|
-
* @returns {string} pem encoded representation of the private key WITH header and footer
|
|
158
|
-
* @public
|
|
159
|
-
*/
|
|
160
|
-
getPrivateKey() {
|
|
161
|
-
// Return the private representation of this key.
|
|
162
|
-
return this.getKey().getPrivateKey();
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Returns the pem encoded representation of the private key
|
|
166
|
-
* If the key doesn't exists a new key will be created
|
|
167
|
-
* @returns {string} pem encoded representation of the private key WITHOUT header and footer
|
|
168
|
-
* @public
|
|
169
|
-
*/
|
|
170
|
-
getPrivateKeyB64() {
|
|
171
|
-
// Return the private representation of this key.
|
|
172
|
-
return this.getKey().getPrivateBaseKeyB64();
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Returns the pem encoded representation of the public key
|
|
176
|
-
* If the key doesn't exists a new key will be created
|
|
177
|
-
* @returns {string} pem encoded representation of the public key WITH header and footer
|
|
178
|
-
* @public
|
|
179
|
-
*/
|
|
180
|
-
getPublicKey() {
|
|
181
|
-
// Return the private representation of this key.
|
|
182
|
-
return this.getKey().getPublicKey();
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Returns the pem encoded representation of the public key
|
|
186
|
-
* If the key doesn't exists a new key will be created
|
|
187
|
-
* @returns {string} pem encoded representation of the public key WITHOUT header and footer
|
|
188
|
-
* @public
|
|
189
|
-
*/
|
|
190
|
-
getPublicKeyB64() {
|
|
191
|
-
// Return the private representation of this key.
|
|
192
|
-
return this.getKey().getPublicBaseKeyB64();
|
|
193
|
-
}
|
|
194
|
-
}
|