- fix axios@1 paramsSerializer
getPoolInfo
now accepts coin symbols as params
- BREAKING
getPoolInfo
not returns values converted from pip
- minor fix error handling
- update deps
- fix
validateTicker
to accept tickers with digits in any place
- improve jsdoc
- improve jsdoc
- update deps
- fix
estimateTxCommission
in imprecise mode with empty tx data
- add axiosOptions param to api constructors
- DEPRECATE
loose
option inestimateTxCommission
useneedGasCoinFee
,needBaseCoinFee
, andneedPriceCoinFee
settings instead
- fix
isCoinSymbol
to accept tickers with digits in any place and fix unsafe-regex in it
- update deps
- more strict
isCoinSymbol
(will cause invalid getCoinInfo to fail earlier)
postTx
: addextraAxiosOptions
param to be passed to secondary requests (for nonce and coin ids)- BREAKING
estimateTxCommission
:axiosOptions
param separated to two different params - (1)axiosOptions
will be passed to main estimation request and (2)extraAxiosOptions
to secondary requests (commission price data, coin ids, and pool info) estimateTxCommission
: don't make https request inloose: true
mode whengasCoin
same aspriceCoin
(priceCoinValue used directly)
- fix direct
estimateTxCommission
to not mutate response
- add
Lock
andLockStake
tx data - restore support of
MoveStake
tx data - add
disableValidation
option to tx data constructors - add
disableDecorationParams
anddisableValidation
options toprepareTx
- fix
estimateTxCommission
to work with empty data params and coin symbol params inloose: false
mode - BREAKING add fields to VoteCommission tx data
- DEPRECATE
direct
option inestimateTxCommission
, useloose
option with reversed value instead
- add
ReplaceCoinId
,ReplaceCoinIdByPath
,GetCoinSymbol
API methods - BREAKING remove deprecated
getCoinInfoById
API method, usegetCoinInfo
instead
- fix
estimateCoinSellAll
: restore valueToSell param
- fix
CreatePoolTxData
to be independent of coins order
- add
AddLimitOrder
gasCoin decorator - BREAKING released df1acf0: make
estimateCoinSellAll
actually use sell-all api route - BREAKING rename some internal files
- add
AddLimitOrder
andRemoveLimitOrder
tx data - update
nonce
field length for checks - BREAKING add fields to VoteCommission tx data
- add
CreateSwapPool
,AddLiquidity
tx decorators
- fix VoteCommission tx data
- fix usage of seedPhrase instead of privateKey
- add minter v2 pool, token, vote, and other tx data
postTx
now support coin symbols intxParams
without usingreplaceCoinSymbol
- add
estimateCoinSellAll
API method - add
swapFrom
,route
andgasCoin
parameters to estimation API methods - add
getCoinId
API method - add
seedPharse
param as alternative toprivateKey
- fix: force
gasCoin
to be same as coin to spend for sell all txs - BREAKING reworked
estimateTxCommission
- BREAKING rename TX_TYPE
EDIT_COIN_OWNER
toEDIT_TICKER_OWNER
andEditCoinOwnerTxData
toEditTickerOwnerTxData
- BREAKING add error code check when
postTx
made through gate api - BREAKING rename some file paths
- BREAKING remove deprecated
toHexString
, useintegerToHexString
instead - BREAKING disabled deprecated usage of
privateKey
hex string without hex prefix - DEPRECATED
coinIdToSell
andcoinIdToBuy
params in estimate sell/buy API methods, usecoinToSell
andcoinToBuy
instead - DEPRECATED
getCoinInfoById
API method, usegetCoinInfo
instead
- BREAKING don't autofill
gasCoin
with coin to spent, use base coin (BIP) by default everywhere
- Update deps to support Minter node v1.2.1 (fee calculation changed)
- Improve Uint validation message
- Fix: allow
nonce
andgasPrice
to be omitted in the Minter Link
- Improve Check error message
- Fix: cjs bundle babel runtime helpers
- Fix: cjs bundle to not require ES2015 modules
- Add:
axiosOptions
parameter to all API methods which will be passed to axios request
- Add: 'getCoinInfoById' api method
- Add:
ReplaceCoinSymbolByPath
now acceptchainId
param and can get base coin id without network request - Update:
ReplaceCoinSymbol
usestxParams.chainId
to get base coin id without network request - BREAKING
ReplaceCoinSymbol
now exported as named not default export - BREAKING file src/api/replace-coin-symbol.js renamed
- fix tx decorators to properly handle
gasCoin: 0
EditMultisigTxData
now sorts address and weight lists, so different ordered lists will provide same transaction hash
Support of minter-go-node v1.2 aka Chili
- BREAKING change coin tickers to coin id in tx params. Affected: postTx, prepareTx, Buy, DeclareCandidacy, Delegate, Sell, SellAll, Send, Multisend, Unbond. You can use
replaceCoinSymbol
method to work with tickers and replace it with ids automatically. - BREAKING add
controlAddress
field to EditCandidateData - BREAKING
integerToHexString
now returns0x
prefixed string - add
nonceRetryLimit
option topostTx
- add
getCoinInfo
andreplaceCoinSymbol
api methods - add
EditMultisigTxData
,RecreateCoinTxData
,EditCoinOwnerTxData
,EditCandidatePublicKeyTxData
,SetHaltBlockTxData
, andPriceVoteTxData
tx data constructors - add:
estimateCoinSell
,estimateCoinBuy
now support both ticker and id params, e.g.coinToBuy
andcoinIdToBuy
.
Drop deprecations
- BREAKING remove all deprecated TxParams constructors
- BREAKING remove deprecated
NETWORK_MAX_AMOUNT
,MAX_MAX_SUPPLY
,MIN_MAX_SUPPLY
, use minterjs-util'sCOIN_MAX_AMOUNT
,COIN_MAX_MAX_SUPPLY
,COIN_MIN_MAX_SUPPLY
instead - BREAKING
issueCheck
'scoinSymbol
alias param is removed, usecoin
param - BREAKING
estimateCoinSell
,estimateCoinBuy
: drop support of snake_case params - BREAKING
estimateTxCommission
now accept tx string directly instead of object{tx: string}
- BREAKING
decodeLink
drop support of old-style links
- BREAKING string private keys now should be
0x
-prefixed - add
mempoolRetryLimit
option topostTx
- update deps
- update deps
- BREAKING add: validation of TxData params
- BREAKING change:
postTx
andpostSignedTx
now returns object{hash: string}
for node or NodeTransaction object for gate
- Change: move
{password, privateKey}
from RedeemCheckTxData's first argumentdata
to the second argumentoptions
. Deprecate old approach. - Add:
address
option for RedeemCheckTxData to make proof for address. Use it as field in the second argumentoptions
. - Add:
address
option todecodeLink
- Add:
{address, password}
to the options forprepareTx
,prepareSignedTx
, andpostTx
to pass it to the RedeemCheckTxData - Deprecate:
privateKey
string without prefix for RedeemCheckTxData. Now it should be0x
prefixed.
- Fix: restore support of decoding old style links for
decodeLink
- Fix: link decoding
- Add: asserts to
prepareTx
Support of minter-go-node v1.1 aka Texas
- Deprecate TxParams constructors
- Add: support for multisignatures
- Add: expose
ensureNonce
onMinter
instance - Change:
prepareSignedTx
now acceptsprivateKey
as field in the second argument,privateKey
in first argument is deprecated - Change:
postTx
now acceptsprivateKey
as field in the second argument. Old behaviour is deprecated - Add:
prepareTx
, it can be used for multiSignature txs - Add:
makeSignature
- BREAKING Change:
prepareLink
anddecodeLink
now supports new link format with base64url encoding - BREAKING Change: rename
issueCheck
argumentpassPhrase
topassword
- BREAKING Change: rename create coin params: coinName -> name, coinSymbol -> symbol, crr -> constantReserveRatio
- enable multisig tests
- Add: create-multisig weights and addresses validation
- remove
gasCoin
param fromRedeemCheckTxParams
and always get gasCoin from check's data - add
gasCoin
field to check, may be omitted, base coin will be used redeemCheck
params will check if passedfeeCoinSymbol
is equal togasCoin
from check, may be omitted,gasCoin
from check will be used- add
maxSupply
field toCreateCoinTxParams
- BREAKING Change:
decodeLink
2nd param private key now is object withprivateKey
field
// old
decodeLink('https://bip.to/tx...', 'f812...');
// new
decodeLink('https://bip.to/tx...', {privateKey: 'f812...'});
- Add:
decodeTx
method to decode RLP serialized tx - Add:
decodeTx
anddecodeLink
methods now hasdecodeCheck
param, it addscheckData
field next tocheck
field for redeemCheck tx data
- BREAKING Fix:
decodeCheck
,decodeLink
andbufferToInteger
now returns string values for numbers. It will fix precision loss for big numbers.
- Fix: decodeLink for candidate-set-on/off transactions
- Fix: candidate-set-on/off tx data constructors
- Add: expose
.postSignedTx
method onMinter
instance - Add: expose data constructors in index.js
- minor refactor
- Update: allow use
RedeemCheckTxData
withoutproof
andprivateKey
it will lead to empty proof
- Add: option for
prepareLink
to allow setting custom hostname
- BREAKING Change:
decodeLink
now returnsdata
instead oftxData
andtype
instead oftxType
fields - BREAKING Remove:
privateKey
fields fromdecodeLink
result - BREAKINK Remove:
issueCheck
anddecodeCheck
fromMinter
instance - Add:
postTx
,prepareSignedTx
, andprepareLink
now acceptsdata
andtype
fields,txData
andtxType
are deprecated - Add:
postTx
andprepareSignedTx
now also accept data object fordata
field, not only Buffer - Add:
postTx
andprepareSignedTx
now decorate txParams as TxParamsConstructors previously do - Add: reexport
TX_TYPE
fromminterjs-tx
- BREAKING Change:
decodeLink
now decodetxData
too - Add:
getTxData
method which return TxData constructor by txType - Fix:
decodeLink
now decodesnonce
no number instead of string
- Fix: unbond tx-data
- Add: tx data constructors with ability to encode and decode
- skip multisig tests
- Add:
prepareLink
anddecodeLink
methods to work with Minter Link Protocol - Add:
RedeemCheckTxParams
now accepts directproof
param, as alternative to generation it from password - Add:
prepareSignedTx
now acceptspayload
param as alias formessage
- BREAKING Remove: stop reexporting
minterjs-wallet
methods, use it directly
- BREAKING tx params which must be Minter prefixed, 0x prefixed or Buffer now will throw on arbitrary string passed
- update deps
- drop safe-buffer dependency
- drop des.js dependency, it have been updated and no more need to be deduped
- update 'fail' tests to be more accurate
- update tests to run faster
- add
GetMinGasPrice
api method
- update default
gasCoin
for testnet transaction
- update deps
- regenerate check with dueBlock increased by 1 if lock not equal 65 bytes length, it is workaround for MinterTeam/minter-go-node#264
- BREAKING need to specify full path in baseURL, e.g. add
/api/v1/
for gate's baseURL
- update deps
- BREAKING rename issue-check.js and prepare-tx.js files to check.js and tx.js
- add
decodeCheck
method
- ensure fixed dependencies
- BREAKING rename UMD module from
minterJsTx
tominterSDK
- fix browser usage of UMD module
- tweak bundle tests
- use gasPrice: 1 in the redeem check tx
- update deps
- treat check nonce and coin name as utf8 strings
- update deps
- update deps
- add method to post signed tx by passing string as argument
- add option to specify default
chainId
in theMinter
andMinterApi
constructors
- BREAKING rename
chainID
intochainId
- BREAKING add
chainID
tx param to support minter-go-node 0.19.0 - BREAKING add
chainID
param toissueCheck
- BREAKING removed default nonce value from
prepareSignedTx
- Fixed: paths alias
- BREAKING Changed: connection with explorer api removed in favor of gate api
- BREAKING Removed:
apiType
andbaseURL
options no more have default values - Removed: adapter to reject errors with 200 code, now all api errors should have 400+ code
- Added: UMD and commonjs builds
- BREAKING Removed:
getProofWithRecovery
export from tx-params/redeem-check.js
- BREAKING Added: now will throw on invalid numeric params
- Updated: deps
- Fixed: ethereumjs-util
- Added:
MultisendTxParams
- BREAKING Changed: move postTx's
nonce
param intotxParams
object - Added: allow pass
gasPrice
intotxParams
- Added: retry behavior to
postTx
if it failed with low gas error,gasRetryLimit
option controls it - Fixed: copy error payload
error.tx_result.log
toerror.tx_result.message
- Move
error.log
payload field intoerror.message
to conform node API v0.10.0
- Expose
prepareSignedTx
in the index.js
- Move
prepareSignedTx
to separate function from postTx
- Fix variables import
- Add
EditCandidateTxParams
for API version 0.10.0 - Expose
API_TYPE_EXPLORER
,API_TYPE_NODE
variables
- update for new incompatible node API version 0.8.5
- BREAKING remove failed response transformation (data.error => data), now
error
field will exist in failed response
- update for new incompatible node API version: 0.8.0 (minter-test-network-27)
- Use
Mx
prefixed address forgetCount
methods - Handle invalid response, when HTML got instead of JSON
- Add
CreateMultisigTxParams
- Update deps
- Fix assertions in estimate methods to return rejected promise instead of throwing errors
- Fix estimation pip conversion
- Fix import paths
- Add estimation methods
estimateCoinSell
,estimateCoinBuy
,estimateTxCommisssion
- BREAKING refactor file structure
- BREAKING move
postTx
into one of api methods, change Promise resolve data to simple tx hash
Instead of (new PostTx(apiParams))(txParams).then()
use:
import Minter from 'minter-js-sdk';
const minterSDK = new Minter(apiParams);
minterSDK.postTx(txParams).then();
- Add option
apiType
forPostTx
to work with explorer API
- BREAKING update
postTx
to support network with MultiSig transactions - update dependencies
- BREAKING rename
SendTx
->PostTx
,SendCoinsTxParams
->SendTxParams
,SellCoinsTxParams
->SellTxParams
,SellAllCoinsTxParams
->SellAllTxParams
,BuyCoinsTxParams
->BuyTxParams
- BREAKING rename TxParams constructors
- remove
nodeUrl
fromredeemTx
params
- BREAKING refactor to explicit use
sendTx()
. Get it fromSendTx
constructor with specified API urls, instead of passing url to each tx call
- fix
sellAllCoins
method
- fix default
declareCandidacy
fee
- fix redeem
feeCoinSymbol
checkup
- fix setCandidate's
gasCoin
- add
gasCoin
- update
getNonce
method - add
sellAllCoins
- BREAKING rename sell/buy methods
- add
issueCheck
method - move files
- BREAKING remove wallet alias
- add utils
- add transaction methods
- fix minor errors
- initial