diff --git a/.changeset/big-pumpkins-grab.md b/.changeset/big-pumpkins-grab.md deleted file mode 100644 index a845151..0000000 --- a/.changeset/big-pumpkins-grab.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/clean-insects-wink.md b/.changeset/clean-insects-wink.md deleted file mode 100644 index 4018059..0000000 --- a/.changeset/clean-insects-wink.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@rosen-chains/bitcoin': minor -'@rosen-chains/cardano': minor -'@rosen-chains/ergo': minor ---- - -change generateTransaction to generateMultipleTransaction due to its update in AbstractChain diff --git a/.changeset/eighty-jokes-warn.md b/.changeset/eighty-jokes-warn.md deleted file mode 100644 index f6d94b8..0000000 --- a/.changeset/eighty-jokes-warn.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@rosen-chains/cardano-blockfrost-network': major -'@rosen-chains/bitcoin-esplora': major -'@rosen-chains/cardano-graphql-network': major -'@rosen-chains/cardano-koios-network': major -'@rosen-chains/ergo-explorer-network': major -'@rosen-chains/ergo-node-network': major ---- - -remove rosen-extractor initialization diff --git a/.changeset/hot-chairs-march.md b/.changeset/hot-chairs-march.md deleted file mode 100644 index ffa7695..0000000 --- a/.changeset/hot-chairs-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rosen-chains/ergo': minor ---- - -update generators and verifiers to support multiple change box diff --git a/.changeset/large-ants-double.md b/.changeset/large-ants-double.md deleted file mode 100644 index daff6bc..0000000 --- a/.changeset/large-ants-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rosen-chains/abstract-chain': major ---- - -add generateMultipleTransactions to AbstractChain and implement generateTransaction diff --git a/.changeset/lazy-cameras-perform.md b/.changeset/lazy-cameras-perform.md deleted file mode 100644 index 26c2196..0000000 --- a/.changeset/lazy-cameras-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rosen-chains/abstract-chain': patch ---- - -allow undefined extractor diff --git a/.changeset/little-otters-hide.md b/.changeset/little-otters-hide.md deleted file mode 100644 index a845151..0000000 --- a/.changeset/little-otters-hide.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/red-games-switch.md b/.changeset/red-games-switch.md deleted file mode 100644 index a845151..0000000 --- a/.changeset/red-games-switch.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/angry-countries-pump.md b/.changeset/rude-pets-pretend.md similarity index 100% rename from .changeset/angry-countries-pump.md rename to .changeset/rude-pets-pretend.md diff --git a/.changeset/soft-mayflies-hug.md b/.changeset/soft-mayflies-hug.md deleted file mode 100644 index 74025c6..0000000 --- a/.changeset/soft-mayflies-hug.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@rosen-chains/bitcoin': major -'@rosen-chains/cardano': major -'@rosen-chains/ergo': major ---- - -init rosen-extractor in chain and remove it from its network diff --git a/.changeset/spicy-papayas-argue.md b/.changeset/spicy-papayas-argue.md deleted file mode 100644 index a845151..0000000 --- a/.changeset/spicy-papayas-argue.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/thirty-maps-swim.md b/.changeset/thirty-maps-swim.md deleted file mode 100644 index 164cc8b..0000000 --- a/.changeset/thirty-maps-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rosen-chains/abstract-chain': minor ---- - -Introduced new error types for EvmChain diff --git a/.changeset/tidy-boats-yawn.md b/.changeset/tidy-boats-yawn.md deleted file mode 100644 index 29d0769..0000000 --- a/.changeset/tidy-boats-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rosen-chains/abstract-chain': major ---- - -implement verifyEvent and add verifyLockTransactionExtraConditions to be implemented in child classes diff --git a/.changeset/wild-tips-share.md b/.changeset/wild-tips-share.md deleted file mode 100644 index cb5bf8b..0000000 --- a/.changeset/wild-tips-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rosen-chains/evm': patch ---- - -Fixed generatedMultipleTransactions nonce. Moved all the gas logic to network. Added gasLimitMultiplier and gasLimitSlippage to the evm chain configs. diff --git a/.changeset/young-walls-whisper.md b/.changeset/young-walls-whisper.md deleted file mode 100644 index dd945f1..0000000 --- a/.changeset/young-walls-whisper.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@rosen-chains/abstract-chain': patch -'@rosen-chains/bitcoin': patch -'@rosen-chains/cardano': patch -'@rosen-chains/ergo': patch ---- - -Updated rosen-extractor version diff --git a/package-lock.json b/package-lock.json index fdebd8b..d07c141 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14904,7 +14904,7 @@ }, "packages/abstract-chain": { "name": "@rosen-chains/abstract-chain", - "version": "5.0.0", + "version": "6.0.0", "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", @@ -14931,7 +14931,7 @@ }, "packages/chains/bitcoin": { "name": "@rosen-chains/bitcoin", - "version": "0.1.0", + "version": "1.0.0", "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", @@ -14957,7 +14957,7 @@ "node": ">=20.11.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" } }, "packages/chains/bitcoin/node_modules/@rollup/rollup-android-arm-eabi": { @@ -15820,7 +15820,7 @@ }, "packages/chains/cardano": { "name": "@rosen-chains/cardano", - "version": "5.0.0", + "version": "6.0.0", "license": "GPL-3.0", "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", @@ -15847,12 +15847,12 @@ "typescript": "^4.9.5" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" } }, "packages/chains/ergo": { "name": "@rosen-chains/ergo", - "version": "5.0.0", + "version": "6.0.0", "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", @@ -15877,7 +15877,7 @@ "typescript": "^4.9.5" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" } }, "packages/chains/evm": { @@ -15906,7 +15906,7 @@ "node": ">=20.11.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" } }, "packages/chains/evm/node_modules/@rollup/rollup-darwin-x64": { @@ -16666,7 +16666,7 @@ }, "packages/networks/bitcoin-esplora": { "name": "@rosen-chains/bitcoin-esplora", - "version": "0.1.0", + "version": "1.0.0", "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", @@ -16690,8 +16690,8 @@ "node": ">=20.11.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/bitcoin": "^0.1.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/bitcoin": "^1.0.0" } }, "packages/networks/bitcoin-esplora/node_modules/@rollup/rollup-android-arm-eabi": { @@ -17569,7 +17569,7 @@ }, "packages/networks/cardano-blockfrost": { "name": "@rosen-chains/cardano-blockfrost-network", - "version": "3.0.0", + "version": "4.0.0", "license": "GPL-3.0", "dependencies": { "@blockfrost/blockfrost-js": "^5.4.0", @@ -17591,8 +17591,8 @@ "node": ">=18.12.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/cardano": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/cardano": "^6.0.0" } }, "packages/networks/cardano-blockfrost/node_modules/@typescript-eslint/eslint-plugin": { @@ -18052,7 +18052,7 @@ }, "packages/networks/cardano-graphql": { "name": "@rosen-chains/cardano-graphql-network", - "version": "2.0.0", + "version": "3.0.0", "license": "GPL-3.0", "dependencies": { "@apollo/client": "^3.8.7", @@ -18077,8 +18077,8 @@ "node": ">=18.12.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/cardano": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/cardano": "^6.0.0" } }, "packages/networks/cardano-graphql/node_modules/@typescript-eslint/eslint-plugin": { @@ -18538,7 +18538,7 @@ }, "packages/networks/cardano-koios": { "name": "@rosen-chains/cardano-koios-network", - "version": "6.0.0", + "version": "7.0.0", "license": "GPL-3.0", "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", @@ -18562,8 +18562,8 @@ "typescript": "^5.0.4" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/cardano": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/cardano": "^6.0.0" } }, "packages/networks/cardano-koios/node_modules/@types/node": { @@ -18585,7 +18585,7 @@ }, "packages/networks/ergo-explorer": { "name": "@rosen-chains/ergo-explorer-network", - "version": "5.0.0", + "version": "6.0.0", "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", @@ -18608,8 +18608,8 @@ "vitest": "^0.30.1" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/ergo": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/ergo": "^6.0.0" } }, "packages/networks/ergo-explorer/node_modules/typescript": { @@ -18626,7 +18626,7 @@ }, "packages/networks/ergo-node": { "name": "@rosen-chains/ergo-node-network", - "version": "5.0.0", + "version": "6.0.0", "license": "GPL-3.0", "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", @@ -18649,8 +18649,8 @@ "vitest": "^0.30.1" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/ergo": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/ergo": "^6.0.0" } }, "packages/networks/ergo-node/node_modules/typescript": { diff --git a/packages/abstract-chain/CHANGELOG.md b/packages/abstract-chain/CHANGELOG.md index 840fbab..0e70b82 100644 --- a/packages/abstract-chain/CHANGELOG.md +++ b/packages/abstract-chain/CHANGELOG.md @@ -1,5 +1,21 @@ # @rosen-chains/abstract-chain +## 6.0.0 + +### Major Changes + +- add generateMultipleTransactions to AbstractChain and implement generateTransaction +- implement verifyEvent and add verifyLockTransactionExtraConditions to be implemented in child classes + +### Minor Changes + +- Introduced new error types for EvmChain + +### Patch Changes + +- allow undefined extractor +- Updated rosen-extractor version + ## 5.0.0 ### Major Changes diff --git a/packages/abstract-chain/package.json b/packages/abstract-chain/package.json index ee8a0f6..d63bece 100644 --- a/packages/abstract-chain/package.json +++ b/packages/abstract-chain/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/abstract-chain", - "version": "5.0.0", + "version": "6.0.0", "description": "this project contains abstract classes to implement any chain for Rosen-bridge", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", diff --git a/packages/chains/bitcoin/CHANGELOG.md b/packages/chains/bitcoin/CHANGELOG.md new file mode 100644 index 0000000..f3c512b --- /dev/null +++ b/packages/chains/bitcoin/CHANGELOG.md @@ -0,0 +1,18 @@ +# @rosen-chains/bitcoin + +## 1.0.0 + +### Major Changes + +- init rosen-extractor in chain and remove it from its network +- add signatureRecovery to return data of required signFunction + +### Minor Changes + +- change generateTransaction to generateMultipleTransaction due to its update in AbstractChain + +### Patch Changes + +- Updated rosen-extractor version +- Updated dependencies + - @rosen-chains/abstract-chain@6.0.0 diff --git a/packages/chains/bitcoin/lib/BitcoinChain.ts b/packages/chains/bitcoin/lib/BitcoinChain.ts index 27699f4..6ca749d 100644 --- a/packages/chains/bitcoin/lib/BitcoinChain.ts +++ b/packages/chains/bitcoin/lib/BitcoinChain.ts @@ -18,7 +18,12 @@ import { } from '@rosen-chains/abstract-chain'; import AbstractBitcoinNetwork from './network/AbstractBitcoinNetwork'; import BitcoinTransaction from './BitcoinTransaction'; -import { BitcoinConfigs, BitcoinTx, BitcoinUtxo } from './types'; +import { + BitcoinConfigs, + BitcoinTx, + BitcoinUtxo, + TssSignFunction, +} from './types'; import Serializer from './Serializer'; import { Psbt, Transaction, address, payments, script } from 'bitcoinjs-lib'; import JsonBigInt from '@rosen-bridge/json-bigint'; @@ -33,7 +38,7 @@ class BitcoinChain extends AbstractUtxoChain { declare configs: BitcoinConfigs; CHAIN = BITCOIN_CHAIN; extractor: BitcoinRosenExtractor; - protected signFunction: (txHash: Uint8Array) => Promise; + protected signFunction: TssSignFunction; protected lockScript: string; protected signingScript: Buffer; @@ -42,7 +47,7 @@ class BitcoinChain extends AbstractUtxoChain { configs: BitcoinConfigs, feeRatioDivisor: bigint, tokens: RosenTokens, - signFunction: (txHash: Uint8Array) => Promise, + signFunction: TssSignFunction, logger?: AbstractLogger ) { super(network, configs, feeRatioDivisor, logger); @@ -398,14 +403,12 @@ class BitcoinChain extends AbstractUtxoChain { Transaction.SIGHASH_ALL ); - const signatureHex = this.signFunction(signMessage).then( - (signatureHex: string) => { - this.logger.debug( - `Input [${i}] of tx [${bitcoinTx.txId}] is signed. signature: ${signatureHex}` - ); - return signatureHex; - } - ); + const signatureHex = this.signFunction(signMessage).then((response) => { + this.logger.debug( + `Input [${i}] of tx [${bitcoinTx.txId}] is signed. signature: ${response.signature}` + ); + return response.signature; + }); signaturePromises.push(signatureHex); } diff --git a/packages/chains/bitcoin/lib/types.ts b/packages/chains/bitcoin/lib/types.ts index 0860c1f..7c74d86 100644 --- a/packages/chains/bitcoin/lib/types.ts +++ b/packages/chains/bitcoin/lib/types.ts @@ -35,3 +35,8 @@ export interface BitcoinTx { inputs: BitcoinTxInput[]; outputs: BitcoinTxOutput[]; } + +export type TssSignFunction = (txHash: Uint8Array) => Promise<{ + signature: string; + signatureRecovery: string; +}>; diff --git a/packages/chains/bitcoin/package.json b/packages/chains/bitcoin/package.json index 781f90c..892bd81 100644 --- a/packages/chains/bitcoin/package.json +++ b/packages/chains/bitcoin/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/bitcoin", - "version": "0.1.0", + "version": "1.0.0", "description": "this project contains bitcoin chain for Rosen-bridge", "repository": "https://github.com/rosen-bridge/rosen-chains", "license": "GPL-3.0", @@ -41,6 +41,6 @@ "bitcoinjs-lib": "^6.1.5" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" } } diff --git a/packages/chains/bitcoin/tests/BitcoinChain.spec.ts b/packages/chains/bitcoin/tests/BitcoinChain.spec.ts index c380cb9..d18850a 100644 --- a/packages/chains/bitcoin/tests/BitcoinChain.spec.ts +++ b/packages/chains/bitcoin/tests/BitcoinChain.spec.ts @@ -12,6 +12,7 @@ import { BitcoinTransaction, BitcoinUtxo, SEGWIT_INPUT_WEIGHT_UNIT, + TssSignFunction, } from '../lib'; import TestBitcoinNetwork from './network/TestBitcoinNetwork'; import * as testData from './testData'; @@ -43,10 +44,14 @@ describe('BitcoinChain', () => { aggregatedPublicKey: testData.lockAddressPublicKey, txFeeSlippage: 10, }; - const mockedSignFn = () => Promise.resolve(''); + const mockedSignFn = () => + Promise.resolve({ + signature: '', + signatureRecovery: '', + }); const generateChainObject = ( network: TestBitcoinNetwork, - signFn: (txHash: Uint8Array) => Promise = mockedSignFn + signFn: TssSignFunction = mockedSignFn ) => { return new BitcoinChain( network, @@ -491,12 +496,18 @@ describe('BitcoinChain', () => { */ it('should return PaymentTransaction of the signed transaction', async () => { // mock a sign function to return signature - const signFunction = async (hash: Uint8Array): Promise => { + const signFunction: TssSignFunction = async (hash: Uint8Array) => { const hashHex = Buffer.from(hash).toString('hex'); if (hashHex === testData.transaction2HashMessage0) - return testData.transaction2Signature0; + return { + signature: testData.transaction2Signature0, + signatureRecovery: '', + }; else if (hashHex === testData.transaction2HashMessage1) - return testData.transaction2Signature1; + return { + signature: testData.transaction2Signature1, + signatureRecovery: '', + }; else throw Error( `TestError: sign function is called with wrong message [${hashHex}]` @@ -534,12 +545,15 @@ describe('BitcoinChain', () => { */ it('should throw error when at least signing of one message is failed', async () => { // mock a sign function to throw error - const signFunction = async (hash: Uint8Array): Promise => { + const signFunction: TssSignFunction = async (hash: Uint8Array) => { if ( Buffer.from(hash).toString('hex') === testData.transaction2HashMessage0 ) - return testData.transaction2Signature0; + return { + signature: testData.transaction2Signature0, + signatureRecovery: '', + }; else throw Error(`TestError: sign failed`); }; diff --git a/packages/chains/cardano/CHANGELOG.md b/packages/chains/cardano/CHANGELOG.md index 04d3881..4319b39 100644 --- a/packages/chains/cardano/CHANGELOG.md +++ b/packages/chains/cardano/CHANGELOG.md @@ -1,5 +1,21 @@ # @rosen-chains/cardano +## 6.0.0 + +### Major Changes + +- init rosen-extractor in chain and remove it from its network + +### Minor Changes + +- change generateTransaction to generateMultipleTransaction due to its update in AbstractChain + +### Patch Changes + +- Updated rosen-extractor version +- Updated dependencies + - @rosen-chains/abstract-chain@6.0.0 + ## 5.0.0 ### Major Changes diff --git a/packages/chains/cardano/package.json b/packages/chains/cardano/package.json index 7687579..b1b2e61 100644 --- a/packages/chains/cardano/package.json +++ b/packages/chains/cardano/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/cardano", - "version": "5.0.0", + "version": "6.0.0", "description": "this project contains cardano chain for Rosen-bridge", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", @@ -44,7 +44,7 @@ "typescript": "^4.9.5" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" }, "directories": { "lib": "lib", diff --git a/packages/chains/ergo/CHANGELOG.md b/packages/chains/ergo/CHANGELOG.md index a0184e1..34928e8 100644 --- a/packages/chains/ergo/CHANGELOG.md +++ b/packages/chains/ergo/CHANGELOG.md @@ -1,5 +1,22 @@ # @rosen-chains/ergo +## 6.0.0 + +### Major Changes + +- init rosen-extractor in chain and remove it from its network + +### Minor Changes + +- change generateTransaction to generateMultipleTransaction due to its update in AbstractChain +- update generators and verifiers to support multiple change box + +### Patch Changes + +- Updated rosen-extractor version +- Updated dependencies + - @rosen-chains/abstract-chain@6.0.0 + ## 5.0.0 ### Major Changes diff --git a/packages/chains/ergo/package.json b/packages/chains/ergo/package.json index 521a34d..c517bad 100644 --- a/packages/chains/ergo/package.json +++ b/packages/chains/ergo/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/ergo", - "version": "5.0.0", + "version": "6.0.0", "description": "this project contains ergo chain for Rosen-bridge", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", @@ -42,7 +42,7 @@ "typescript": "^4.9.5" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" }, "directories": { "lib": "lib", diff --git a/packages/chains/evm/lib/EvmChain.ts b/packages/chains/evm/lib/EvmChain.ts index 6a10c3c..6d609f8 100644 --- a/packages/chains/evm/lib/EvmChain.ts +++ b/packages/chains/evm/lib/EvmChain.ts @@ -20,7 +20,7 @@ import { } from '@rosen-chains/abstract-chain'; import { EvmRosenExtractor } from '@rosen-bridge/rosen-extractor'; import AbstractEvmNetwork from './network/AbstractEvmNetwork'; -import { EvmConfigs } from './types'; +import { EvmConfigs, TssSignFunction } from './types'; import { Transaction } from 'ethers'; import Serializer from './Serializer'; import * as EvmUtils from './EvmUtils'; @@ -34,7 +34,7 @@ abstract class EvmChain extends AbstractChain { feeRatioDivisor: bigint; supportedTokens: Array; - protected signFunction: (txHash: Uint8Array) => Promise; + protected signFunction: TssSignFunction; constructor( network: AbstractEvmNetwork, @@ -43,7 +43,7 @@ abstract class EvmChain extends AbstractChain { tokens: RosenTokens, nativeToken: string, supportedTokens: Array, - signFunction: (txHash: Uint8Array) => Promise, + signFunction: TssSignFunction, logger?: any ) { super(network, configs, logger); diff --git a/packages/chains/evm/lib/types.ts b/packages/chains/evm/lib/types.ts index a85b2d4..9b405dd 100644 --- a/packages/chains/evm/lib/types.ts +++ b/packages/chains/evm/lib/types.ts @@ -1,6 +1,6 @@ import { ChainConfigs } from '@rosen-chains/abstract-chain'; -interface BlockHeader { +export interface BlockHeader { hash: string; number: number; gasLimit: bigint; @@ -8,11 +8,14 @@ interface BlockHeader { baseFeePerGas: bigint; } -interface EvmConfigs extends ChainConfigs { +export interface EvmConfigs extends ChainConfigs { maxParallelTx: number; gasPriceSlippage: bigint; gasLimitSlippage: bigint; gasLimitMultiplier: bigint; } -export { BlockHeader, EvmConfigs }; +export type TssSignFunction = (txHash: Uint8Array) => Promise<{ + signature: string; + signatureRecovery: string; +}>; diff --git a/packages/chains/evm/package.json b/packages/chains/evm/package.json index a1a5330..d5179ab 100644 --- a/packages/chains/evm/package.json +++ b/packages/chains/evm/package.json @@ -39,6 +39,6 @@ "ethers": "^6.11.1" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0" } } diff --git a/packages/chains/evm/tests/EvmChain.spec.ts b/packages/chains/evm/tests/EvmChain.spec.ts index e6e873e..a5a086c 100644 --- a/packages/chains/evm/tests/EvmChain.spec.ts +++ b/packages/chains/evm/tests/EvmChain.spec.ts @@ -16,6 +16,7 @@ import * as testUtils from './TestUtils'; import TestChain from './TestChain'; import Serializer from '../lib/Serializer'; import { Transaction, TransactionLike } from 'ethers'; +import { TssSignFunction } from '../lib'; describe('EvmChain', () => { const network = new TestEvmNetwork(); @@ -23,7 +24,7 @@ describe('EvmChain', () => { const generateChainObject = ( network: TestEvmNetwork, - signFn: (txHash: Uint8Array) => Promise = testUtils.mockedSignFn + signFn: TssSignFunction = testUtils.mockedSignFn ) => { return new TestChain( network, diff --git a/packages/chains/evm/tests/TestChain.ts b/packages/chains/evm/tests/TestChain.ts index c5dc392..ebd161d 100644 --- a/packages/chains/evm/tests/TestChain.ts +++ b/packages/chains/evm/tests/TestChain.ts @@ -1,5 +1,5 @@ import { RosenTokens } from '@rosen-bridge/tokens'; -import { AbstractEvmNetwork, EvmChain } from '../lib'; +import { AbstractEvmNetwork, EvmChain, TssSignFunction } from '../lib'; import { EvmRosenExtractor } from '@rosen-bridge/rosen-extractor'; class TestChain extends EvmChain { @@ -14,7 +14,7 @@ class TestChain extends EvmChain { tokens: RosenTokens, nativeToken: string, supportedTokens: Array, - signFunction: (txHash: Uint8Array) => Promise, + signFunction: TssSignFunction, logger?: any ) { super( diff --git a/packages/chains/evm/tests/TestUtils.ts b/packages/chains/evm/tests/TestUtils.ts index 5fd97c1..b447929 100644 --- a/packages/chains/evm/tests/TestUtils.ts +++ b/packages/chains/evm/tests/TestUtils.ts @@ -32,7 +32,11 @@ export const configs: EvmConfigs = { gasLimitMultiplier: 3n, }; -export const mockedSignFn = () => Promise.resolve(''); +export const mockedSignFn = () => + Promise.resolve({ + signature: '', + signatureRecovery: '', + }); export const mockHasLockAddressEnoughAssets = ( chain: EvmChain, diff --git a/packages/networks/bitcoin-esplora/CHANGELOG.md b/packages/networks/bitcoin-esplora/CHANGELOG.md new file mode 100644 index 0000000..4d9906b --- /dev/null +++ b/packages/networks/bitcoin-esplora/CHANGELOG.md @@ -0,0 +1,13 @@ +# @rosen-chains/bitcoin-esplora + +## 1.0.0 + +### Major Changes + +- remove rosen-extractor initialization + +### Patch Changes + +- Updated dependencies + - @rosen-chains/bitcoin@1.0.0 + - @rosen-chains/abstract-chain@6.0.0 diff --git a/packages/networks/bitcoin-esplora/package.json b/packages/networks/bitcoin-esplora/package.json index beacec6..46caa1a 100644 --- a/packages/networks/bitcoin-esplora/package.json +++ b/packages/networks/bitcoin-esplora/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/bitcoin-esplora", - "version": "0.1.0", + "version": "1.0.0", "description": "A package to be used as network api provider for @rosen-chains/bitcoin package", "repository": "https://github.com/rosen-bridge/rosen-chains", "license": "GPL-3.0", @@ -33,8 +33,8 @@ "node": ">=20.11.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/bitcoin": "^0.1.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/bitcoin": "^1.0.0" }, "dependencies": { "@rosen-bridge/abstract-logger": "^1.0.0", diff --git a/packages/networks/cardano-blockfrost/CHANGELOG.md b/packages/networks/cardano-blockfrost/CHANGELOG.md index 5f3eac1..b2d055d 100644 --- a/packages/networks/cardano-blockfrost/CHANGELOG.md +++ b/packages/networks/cardano-blockfrost/CHANGELOG.md @@ -1,5 +1,17 @@ # @rosen-chains/cardano-blockfrost-network +## 4.0.0 + +### Major Changes + +- remove rosen-extractor initialization + +### Patch Changes + +- Updated dependencies + - @rosen-chains/cardano@6.0.0 + - @rosen-chains/abstract-chain@6.0.0 + ## 3.0.0 ### Patch Changes diff --git a/packages/networks/cardano-blockfrost/package.json b/packages/networks/cardano-blockfrost/package.json index 56b9d4f..6b61992 100644 --- a/packages/networks/cardano-blockfrost/package.json +++ b/packages/networks/cardano-blockfrost/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/cardano-blockfrost-network", - "version": "3.0.0", + "version": "4.0.0", "description": "a package to be used as network api provider for @rosen-chains/cardano package", "repository": "@rosen-chains/cardano-blockfrost-network", "license": "GPL-3.0", @@ -37,7 +37,7 @@ "@rosen-bridge/abstract-logger": "^1.0.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/cardano": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/cardano": "^6.0.0" } } diff --git a/packages/networks/cardano-graphql/CHANGELOG.md b/packages/networks/cardano-graphql/CHANGELOG.md index dfce8ef..a42d5b3 100644 --- a/packages/networks/cardano-graphql/CHANGELOG.md +++ b/packages/networks/cardano-graphql/CHANGELOG.md @@ -1,5 +1,17 @@ # @rosen-chains/cardano-graphql-network +## 3.0.0 + +### Major Changes + +- remove rosen-extractor initialization + +### Patch Changes + +- Updated dependencies + - @rosen-chains/cardano@6.0.0 + - @rosen-chains/abstract-chain@6.0.0 + ## 2.0.0 ### Patch Changes diff --git a/packages/networks/cardano-graphql/package.json b/packages/networks/cardano-graphql/package.json index 319f3cd..9c3a6e7 100644 --- a/packages/networks/cardano-graphql/package.json +++ b/packages/networks/cardano-graphql/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/cardano-graphql-network", - "version": "2.0.0", + "version": "3.0.0", "description": "a package to be used as network api provider for @rosen-chains/cardano package", "repository": "@rosen-chains/cardano-graphql-network", "license": "GPL-3.0", @@ -41,7 +41,7 @@ "@rosen-bridge/abstract-logger": "^1.0.0" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/cardano": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/cardano": "^6.0.0" } } diff --git a/packages/networks/cardano-koios/CHANGELOG.md b/packages/networks/cardano-koios/CHANGELOG.md index e528a0e..b05a942 100644 --- a/packages/networks/cardano-koios/CHANGELOG.md +++ b/packages/networks/cardano-koios/CHANGELOG.md @@ -1,5 +1,17 @@ # @rosen-chains/cardano-koios-network +## 7.0.0 + +### Major Changes + +- remove rosen-extractor initialization + +### Patch Changes + +- Updated dependencies + - @rosen-chains/cardano@6.0.0 + - @rosen-chains/abstract-chain@6.0.0 + ## 6.0.0 ### Patch Changes diff --git a/packages/networks/cardano-koios/package.json b/packages/networks/cardano-koios/package.json index f13d144..d1fe148 100644 --- a/packages/networks/cardano-koios/package.json +++ b/packages/networks/cardano-koios/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/cardano-koios-network", - "version": "6.0.0", + "version": "7.0.0", "description": "cardano koios network package for rosen cardano chain", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", @@ -41,8 +41,8 @@ "typescript": "^5.0.4" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/cardano": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/cardano": "^6.0.0" }, "directories": { "lib": "lib", diff --git a/packages/networks/ergo-explorer/CHANGELOG.md b/packages/networks/ergo-explorer/CHANGELOG.md index fd3f929..eb0023d 100644 --- a/packages/networks/ergo-explorer/CHANGELOG.md +++ b/packages/networks/ergo-explorer/CHANGELOG.md @@ -1,5 +1,17 @@ # @rosen-chains/ergo-explorer-network +## 6.0.0 + +### Major Changes + +- remove rosen-extractor initialization + +### Patch Changes + +- Updated dependencies + - @rosen-chains/ergo@6.0.0 + - @rosen-chains/abstract-chain@6.0.0 + ## 5.0.0 ### Patch Changes diff --git a/packages/networks/ergo-explorer/package.json b/packages/networks/ergo-explorer/package.json index 4c3eb6e..d4d2264 100644 --- a/packages/networks/ergo-explorer/package.json +++ b/packages/networks/ergo-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/ergo-explorer-network", - "version": "5.0.0", + "version": "6.0.0", "description": "ergo explorer network package for rosen ergo chain", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", @@ -40,8 +40,8 @@ "vitest": "^0.30.1" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/ergo": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/ergo": "^6.0.0" }, "directories": { "lib": "lib", diff --git a/packages/networks/ergo-node/CHANGELOG.md b/packages/networks/ergo-node/CHANGELOG.md index c45f661..2e6ba62 100644 --- a/packages/networks/ergo-node/CHANGELOG.md +++ b/packages/networks/ergo-node/CHANGELOG.md @@ -1,5 +1,17 @@ # @rosen-chains/ergo-node-network +## 6.0.0 + +### Major Changes + +- remove rosen-extractor initialization + +### Patch Changes + +- Updated dependencies + - @rosen-chains/ergo@6.0.0 + - @rosen-chains/abstract-chain@6.0.0 + ## 5.0.0 ### Patch Changes diff --git a/packages/networks/ergo-node/package.json b/packages/networks/ergo-node/package.json index 26fff42..0c868ab 100644 --- a/packages/networks/ergo-node/package.json +++ b/packages/networks/ergo-node/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/ergo-node-network", - "version": "5.0.0", + "version": "6.0.0", "description": "ergo node network package for rosen ergo chain", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts", @@ -40,8 +40,8 @@ "vitest": "^0.30.1" }, "peerDependencies": { - "@rosen-chains/abstract-chain": "^5.0.0", - "@rosen-chains/ergo": "^5.0.0" + "@rosen-chains/abstract-chain": "^6.0.0", + "@rosen-chains/ergo": "^6.0.0" }, "directories": { "lib": "lib",