@blockfrost/blockfrost-js
Advanced tools
Comparing version 4.2.0-beta.3 to 4.2.0-beta.4
@@ -19,5 +19,7 @@ "use strict"; | ||
const mainStakeKey = accountKey.derive(2).derive(0); | ||
const testnetNetworkInfo = cardano_serialization_lib_nodejs_1.NetworkInfo.testnet(); | ||
const mainnetNetworkInfo = cardano_serialization_lib_nodejs_1.NetworkInfo.mainnet(); | ||
const networkId = isTestnet | ||
? cardano_serialization_lib_nodejs_1.NetworkInfo.testnet().network_id() | ||
: cardano_serialization_lib_nodejs_1.NetworkInfo.mainnet().network_id(); | ||
? testnetNetworkInfo.network_id() | ||
: mainnetNetworkInfo.network_id(); | ||
const utxoPubKeyHash = utxoPubKey.to_raw_key().hash(); | ||
@@ -44,2 +46,3 @@ const mainStakeKeyHash = mainStakeKey.to_raw_key().hash(); | ||
stakeKeyHash.free(); | ||
stakeCred.free(); | ||
return { | ||
@@ -52,4 +55,4 @@ address: rewardAddrBech32, | ||
const protocolMagic = isTestnet | ||
? cardano_serialization_lib_nodejs_1.NetworkInfo.testnet().protocol_magic() | ||
: cardano_serialization_lib_nodejs_1.NetworkInfo.mainnet().protocol_magic(); | ||
? testnetNetworkInfo.protocol_magic() | ||
: mainnetNetworkInfo.protocol_magic(); | ||
const byronAddress = cardano_serialization_lib_nodejs_1.ByronAddress.icarus_from_key(utxoPubKey, protocolMagic); | ||
@@ -66,2 +69,4 @@ const byronAddrBase58 = byronAddress.to_base58(); | ||
accountKey.free(); | ||
testnetNetworkInfo.free(); | ||
mainnetNetworkInfo.free(); | ||
return { | ||
@@ -68,0 +73,0 @@ address: baseAddrBech32, |
{ | ||
"name": "@blockfrost/blockfrost-js", | ||
"version": "4.2.0-beta.3", | ||
"version": "4.2.0-beta.4", | ||
"description": "A JavaScript/TypeScript SDK for interacting with the https://blockfrost.io API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
321166
7807