All notable changes to this project will be documented in this file.
- Support Hardened Derivation in
cryptoUtils.generateKeys
- Import HD accounts using a mnemonic and a derivation path
- These accounts should match ledger HD accounts
const keys = await cryptoUtils.generateKeys('gym exact clown can...', undefined, 'm/44h/1729h/0h/0h');
- Support for Hardened Derivation in generateKeys
- General release Jakarta
- Support for Jakarta protocol
- Use
@stablelib
crypto libraries over libsodium - Remove
mempoolCounterManager
option from initialization options chainId
is now an initialization option. Defaults to the aliasmain
- Changed the 'dryRunLimiter' module option to be 'useLimitEstimator'
- General release Ithaca
- Support for Ithaca protocol
- General release Hangzhou
- Support for Hangzhou protocol
- Support for Hangzhou protocol
- Added new default options to the constructor for the dry run limiter and the mempool counter manager
- The mempool counter manager allows multiple transactions to be injected before the previous transactions was included in a block
- Before a transaction is constructed, the mempool is parsed for previous transactions and uses the next counter
- When enabling the mempool counter manager, transactions are not prevalidated against the node to allow the transaction to inject without counter errors
- The mempool counter manager allows multiple transactions to be injected before the previous transactions was included in a block
// To disable the dry run limiter and mempool counter manager, initialze the instance with:
const tezos = new Tezos('https://testnet-tezos.giganode.io', 'main', {
dryRunLimiter: false,
mempoolCounterManager: false,
});
- Added support for Granada
- Removed protocol logic from previous protocols
- Added support for Florence
transfer
method now optionally accepts an array of transfer parameters
tezos.transfer([
{ to: 'tz1...', amount: 1 },
{ to: 'tz2...', amount: 1 },
]);
- Added an additional constructor argument for dry run limiting. All operations will run through a simulation against the node in order to calculate gas and storage consumption. Useful when gas/storage limits are not known or a closer approximation to the actual limit is desired.
const tezos = new Sotez('https://testnet-tezos.giganode.io', 'main', {
useMutez: false,
dryRunLimiter: true,
});
await tezos.importKey('esk...');
tezos.transfer({ to: 'tz1...', amount: 1 });
- Added support for Edo
- Added additional curve support to all the cryptoUtils functions
- Added
encryptSecretKey
to cryptoUtils - The
Key
module can now encrypt secret keys by providing a passphrase:key.secretKey('password')
- Refactored and cleaned up some logic
cryptoUtils.generateMnemonic
now generates 15 word mnemonics as per the original implementation
- Added Delphi and Dalpha protocols
- Added smart contract abstraction
- Changed the "crypto" export to "cryptoUtils" to avoid clash with browser
- Removed embedded Ledger Transports. Now requires the user to provide the transport but provides more flexibility.
- The ledger curve is represented as a string ('tz1', 'tz2', 'tz3') instead of 0x00, 0x01, 0x02
import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';
await sotez.importLedger(TransportNodeHid, "44'/1729'/0'/0'", 'tz2');
- Added
magicBytes
to thesign
responses. Allows signatures to be verified by doing:
import { magicBytes as magicBytesMap } from 'sotez';
// ...
const { bytes, magicBytes, prefixSig } = await key.sign(
'051d7ba791fbe8ccfb6f83dd9c760db5642358909eede2a...',
magicBytesMap.generic,
);
const verified = await key.verify(`${magicBytes}${bytes}`, prefixSig);
- Changed
watermark
to bemagicBytes
. This is more consistent with the tezos documentation.
export const magicBytes: MagicBytes = {
block: new Uint8Array([1]),
endorsement: new Uint8Array([2]),
generic: new Uint8Array([3]),
};
0.7.0 - 2020-05-30
- Extend the
key.verify
function to acceptsig
as well asprefixSig
. - Update eslint config.
- Sotez is no longer exported as
default
.
import { Sotez } from 'sotez';
- Exported most functions directly from module.
- Update
useMutez
as an initializer option for Sotez.
const sotez = new Sotez('https://127.0.0.1:8732', 'main', {
defaultFee: 1275,
useMutez: false,
});
0.6.4 - 2020-05-28
- Ensure public keys are constructed correctly and padded when necessary.
0.6.3 - 2020-05-28
- Make sure counter is correctly incremented 'locally' even with
skipCounter=true
by @CherryDT.