@rosen-chains/cardano
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -1,8 +0,8 @@ | ||
import { AbstractUtxoChain, BoxInfo, ConfirmationStatus, EventTrigger, PaymentOrder, PaymentTransaction, TransactionAssetBalance } from '@rosen-chains/abstract-chain'; | ||
import * as CardanoWasm from '@emurgo/cardano-serialization-lib-nodejs'; | ||
import { AbstractLogger } from '@rosen-bridge/logger-interface'; | ||
import { Fee } from '@rosen-bridge/minimum-fee'; | ||
import { TokenMap } from '@rosen-bridge/tokens'; | ||
import { AbstractUtxoChain, BoxInfo, ConfirmationStatus, EventTrigger, PaymentOrder, PaymentTransaction, SigningStatus, TransactionAssetBalance } from '@rosen-chains/abstract-chain'; | ||
import AbstractCardanoNetwork from './network/AbstractCardanoNetwork'; | ||
import { AbstractLogger } from '@rosen-bridge/logger-interface'; | ||
import { CardanoUtxo, CardanoConfigs } from './types'; | ||
import * as CardanoWasm from '@emurgo/cardano-serialization-lib-nodejs'; | ||
import { TokenMap } from '@rosen-bridge/tokens'; | ||
import { CardanoConfigs, CardanoUtxo } from './types'; | ||
declare class CardanoChain extends AbstractUtxoChain<CardanoUtxo> { | ||
@@ -72,5 +72,6 @@ network: AbstractCardanoNetwork; | ||
* @param transaction the payment transaction | ||
* @param _signingStatus | ||
* @returns true if the transaction is still valid | ||
*/ | ||
isTxValid: (transaction: PaymentTransaction) => Promise<boolean>; | ||
isTxValid: (transaction: PaymentTransaction, _signingStatus?: SigningStatus) => Promise<boolean>; | ||
/** | ||
@@ -77,0 +78,0 @@ * verifies an event data with its corresponding lock transaction |
@@ -0,2 +1,10 @@ | ||
import * as CardanoWasm from '@emurgo/cardano-serialization-lib-nodejs'; | ||
import { | ||
BigNum, | ||
hash_transaction, | ||
} from '@emurgo/cardano-serialization-lib-nodejs'; | ||
import { AbstractLogger } from '@rosen-bridge/logger-interface'; | ||
import { Fee } from '@rosen-bridge/minimum-fee'; | ||
import { TokenMap } from '@rosen-bridge/tokens'; | ||
import { | ||
AbstractUtxoChain, | ||
@@ -15,2 +23,3 @@ AssetBalance, | ||
PaymentTransaction, | ||
SigningStatus, | ||
SinglePayment, | ||
@@ -21,25 +30,16 @@ TransactionAssetBalance, | ||
} from '@rosen-chains/abstract-chain'; | ||
import { Fee } from '@rosen-bridge/minimum-fee'; | ||
import { blake2b } from 'blakejs'; | ||
import * as JSONBigInt from 'json-bigint'; | ||
import CardanoTransaction from './CardanoTransaction'; | ||
import CardanoUtils from './CardanoUtils'; | ||
import cardanoUtils from './CardanoUtils'; | ||
import { CARDANO_CHAIN, txBuilderConfig } from './constants'; | ||
import AbstractCardanoNetwork from './network/AbstractCardanoNetwork'; | ||
import { AbstractLogger } from '@rosen-bridge/logger-interface'; | ||
import Serializer from './Serializer'; | ||
import { | ||
CardanoAsset, | ||
CardanoBoxCandidate, | ||
CardanoConfigs, | ||
CardanoUtxo, | ||
CardanoConfigs, | ||
CardanoTx, | ||
CardanoBoxCandidate, | ||
CardanoAsset, | ||
} from './types'; | ||
import * as CardanoWasm from '@emurgo/cardano-serialization-lib-nodejs'; | ||
import { TokenMap } from '@rosen-bridge/tokens'; | ||
import { CARDANO_CHAIN, txBuilderConfig } from './constants'; | ||
import CardanoUtils from './CardanoUtils'; | ||
import CardanoTransaction from './CardanoTransaction'; | ||
import Serializer from './Serializer'; | ||
import { | ||
BigNum, | ||
hash_transaction, | ||
} from '@emurgo/cardano-serialization-lib-nodejs'; | ||
import cardanoUtils from './CardanoUtils'; | ||
import * as JSONBigInt from 'json-bigint'; | ||
import { blake2b } from 'blakejs'; | ||
@@ -451,5 +451,9 @@ class CardanoChain extends AbstractUtxoChain<CardanoUtxo> { | ||
* @param transaction the payment transaction | ||
* @param _signingStatus | ||
* @returns true if the transaction is still valid | ||
*/ | ||
isTxValid = async (transaction: PaymentTransaction): Promise<boolean> => { | ||
isTxValid = async ( | ||
transaction: PaymentTransaction, | ||
_signingStatus: SigningStatus = SigningStatus.Signed | ||
): Promise<boolean> => { | ||
const tx = Serializer.deserialize(transaction.txBytes); | ||
@@ -456,0 +460,0 @@ const txBody = tx.body(); |
{ | ||
"name": "@rosen-chains/cardano", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"description": "this project contains cardano chain for Rosen-bridge", | ||
@@ -26,3 +26,3 @@ "main": "dist/lib/index.js", | ||
"@rosen-bridge/rosen-extractor": "^0.1.8", | ||
"@rosen-chains/abstract-chain": "^0.1.11", | ||
"@rosen-chains/abstract-chain": "^0.1.12", | ||
"bech32": "^2.0.0", | ||
@@ -29,0 +29,0 @@ "blake2b": "^2.1.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
292692
4119