Skip to content

Commit

Permalink
Merge pull request #276 from blockfrost/chore/bump-csl
Browse files Browse the repository at this point in the history
chore: upgrade CSL (chang-ready)
  • Loading branch information
slowbackspace authored Jan 13, 2025
2 parents 04471fb + 141afae commit 7a013f3
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 34 deletions.
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"type-check": "tsc --project tsconfig.json"
},
"dependencies": {
"@blockfrost/blockfrost-js": "5.7.0",
"@emurgo/cardano-serialization-lib-nodejs": "^12.1.1",
"@blockfrost/blockfrost-js": "6.0.0-beta.2",
"@emurgo/cardano-serialization-lib-nodejs": "^13.2.1",
"@sentry/integrations": "^7.85.0",
"@sentry/node": "^7.85.0",
"@sentry/tracing": "^7.85.0",
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/performance/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const deriveAddressesForXpub = (xpub: string, count = 20) => {
const addresses: string[] = [];

for (let index = 0; index < count; index++) {
const addr = deriveAddress(xpub, 0, index, true);
const change = deriveAddress(xpub, 1, index, true);
const addr = deriveAddress(xpub, 0, index, 'preview');
const change = deriveAddress(xpub, 1, index, 'preview');

addresses.push(addr.address, change.address);
}
Expand Down
7 changes: 6 additions & 1 deletion src/utils/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ export const deriveAddress = (
addressIndex: number,
isTestnet: boolean,
): { address: string; path: string } => {
const { address } = sdkDeriveAddress(publicKey, type, addressIndex, isTestnet);
const { address } = sdkDeriveAddress(
publicKey,
type,
addressIndex,
isTestnet ? 'preview' : 'mainnet',
);
const purpose = 1852;

return {
Expand Down
4 changes: 3 additions & 1 deletion test/e2e/tx-builder/helpers/compose-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export const composeTransaction = (

// Build transaction
const txBody = txBuilder.build();
const txHash = Buffer.from(CardanoWasm.hash_transaction(txBody).to_bytes()).toString('hex');
const txHash = CardanoWasm.FixedTransaction.new_from_body_bytes(txBody.to_bytes())
.transaction_hash()
.to_hex();

return {
txHash,
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/tx-builder/helpers/sign-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ export const signTransaction = (
txBody: CardanoWasm.TransactionBody,
signKey: CardanoWasm.PrivateKey,
): CardanoWasm.Transaction => {
const txHash = CardanoWasm.hash_transaction(txBody);
const txHash = CardanoWasm.FixedTransaction.new_from_body_bytes(
txBody.to_bytes(),
).transaction_hash();

const witnesses = CardanoWasm.TransactionWitnessSet.new();
const vkeyWitnesses = CardanoWasm.Vkeywitnesses.new();

Expand Down
7 changes: 3 additions & 4 deletions yarn-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,9 @@ cacheEntries = {
"@babel/highlight@npm:7.18.6" = { filename = "@babel-highlight-npm-7.18.6-9d35ad2e27-92d8ee6154.zip"; sha512 = "92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789"; };
"@babel/runtime@npm:7.22.6" = { filename = "@babel-runtime-npm-7.22.6-493f6b7ad0-1d2f56797f.zip"; sha512 = "1d2f56797f548b009910bddf3dc04f980a9701193233145dc923f3ea87c8f88121a3c3ef1d449e9cb52a370d7d025a2243c748882d5546ff079ddf5ffe29f240"; };
"@bcoe/v8-coverage@npm:0.2.3" = { filename = "@bcoe-v8-coverage-npm-0.2.3-9e27b3c57e-1a1f0e356a.zip"; sha512 = "1a1f0e356a3bb30b5f1ced6f79c413e6ebacf130421f15fac5fcd8be5ddf98aedb4404d7f5624e3285b700e041f9ef938321f3ca4d359d5b716f96afa120d88d"; };
"@blockfrost/blockfrost-js@npm:5.7.0" = { filename = "@blockfrost-blockfrost-js-npm-5.7.0-b1465da158-9e960ca8ee.zip"; sha512 = "9e960ca8ee332350008da94b6d5eadc6fd80c468c34086bc9e2872561cc5191b365eb5517655548512801a8e44809d687acbdc778be21018341525bffc12a47e"; };
"@blockfrost/openapi@npm:0.1.70-beta.0" = { filename = "@blockfrost-openapi-npm-0.1.70-beta.0-a0fb76c687-4171f7c75f.zip"; sha512 = "4171f7c75f08763d03f67c5fac38e8dcb93e569ef72718afd4025f7a201e456a8a0ef732262ee6ae9d26596536d2037ecec92c9906894589211f06019a798563"; };
"@emurgo/cardano-serialization-lib-nodejs@npm:11.5.0" = { filename = "@emurgo-cardano-serialization-lib-nodejs-npm-11.5.0-8c2e047031-3fff844800.zip"; sha512 = "3fff8448001c6d70807ef8e1a80a663ef60381e55bfd26c0f1b644e096895da7298fb991ac86670d4c5aee2e3e417e44ac80ab59080f7af107d8fa89906f9075"; };
"@emurgo/cardano-serialization-lib-nodejs@npm:12.1.1" = { filename = "@emurgo-cardano-serialization-lib-nodejs-npm-12.1.1-b2f1c5eb20-a165613d69.zip"; sha512 = "a165613d695b9c10084be2784cdcdebc26ac7415025497f9c17ef08f7d7f786cb7b8318b32a0282261683b240e162c4916ec7a1470590265b2aad8b7d4ea2e5e"; };
"@blockfrost/blockfrost-js@npm:6.0.0-beta.2" = { filename = "@blockfrost-blockfrost-js-npm-6.0.0-beta.2-bf41912b3c-407b8712a8.zip"; sha512 = "407b8712a86a450499b803d73319a1306f42cceb9b488df6959c93e2341aa8c1240324fc1b57100788d6ab9565fd76eb23f00ebfe4632975beca3e95ef4e6f3f"; };
"@blockfrost/openapi@npm:0.1.71" = { filename = "@blockfrost-openapi-npm-0.1.71-e4c856da09-34c7c79aad.zip"; sha512 = "34c7c79aad3302e8d6f434020a9e574c05cb1929b8c48efe04b297c55ef61f7ed3316a587dcd1af7818a0b154998e3afd8677da17b97676f19144de103c4a4ed"; };
"@emurgo/cardano-serialization-lib-nodejs@npm:13.2.1" = { filename = "@emurgo-cardano-serialization-lib-nodejs-npm-13.2.1-7cb0f46506-6572ac1bae.zip"; sha512 = "6572ac1baebe1032a0e1ba701e8be0dc74d00ff332f1b58622851532d9bded9d89b797d862551842fce420ece05b67ced94c9edad33e7f124e48d74c28b0ac4e"; };
"@emurgo/cip14-js@npm:3.0.1" = { filename = "@emurgo-cip14-js-npm-3.0.1-6011030ea2-9eaf312410.zip"; sha512 = "9eaf3124108e8c252a745de9ef1f334ab26a32271077b00fe0ea2a06e40838dd435165dac523ebd4d851ae7a94d8c56766dabc372aabffedd36551c798c607c5"; };
"@esbuild/darwin-arm64@npm:0.19.8" = { filename = "@esbuild-darwin-arm64-npm-0.19.8-b1920f84ba-869c5ded22.zip"; sha512 = "869c5ded228fe18c5d1790672336ff7cabd20aff5af98b6ce5461048d063a28bd2c89ff495b349ce044628f829836fde6cbbdb00a39d663099f5675f78be2a2d"; };
"@esbuild/darwin-x64@npm:0.19.8" = { filename = "@esbuild-darwin-x64-npm-0.19.8-36f500fc51-10.zip"; sha512 = "00cc81d47552ec955de047f29a844b39dd03cbf12cd0f08d01e5e5f808a53ef0838777f9a96a0cfcc8e160a6feb3e8a2af7775b39ee585c3555af0ea01c07065"; };
Expand Down
39 changes: 16 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ __metadata:
languageName: node
linkType: hard

"@blockfrost/blockfrost-js@npm:5.7.0":
version: 5.7.0
resolution: "@blockfrost/blockfrost-js@npm:5.7.0"
"@blockfrost/blockfrost-js@npm:6.0.0-beta.2":
version: 6.0.0-beta.2
resolution: "@blockfrost/blockfrost-js@npm:6.0.0-beta.2"
dependencies:
"@blockfrost/openapi": "npm:0.1.70-beta.0"
"@emurgo/cardano-serialization-lib-nodejs": "npm:^11.5.0"
"@blockfrost/openapi": "npm:0.1.71"
"@emurgo/cardano-serialization-lib-nodejs": "npm:^13.2.1"
"@emurgo/cip14-js": "npm:3.0.1"
bottleneck: "npm:^2.19.5"
form-data: "npm:^4.0.0"
got: "npm:^11.8.6"
json-bigint: "npm:^1.0.0"
checksum: 9e960ca8ee332350008da94b6d5eadc6fd80c468c34086bc9e2872561cc5191b365eb5517655548512801a8e44809d687acbdc778be21018341525bffc12a47e
checksum: 407b8712a86a450499b803d73319a1306f42cceb9b488df6959c93e2341aa8c1240324fc1b57100788d6ab9565fd76eb23f00ebfe4632975beca3e95ef4e6f3f
languageName: node
linkType: hard

"@blockfrost/blockfrost-websocket-link@workspace:.":
version: 0.0.0-use.local
resolution: "@blockfrost/blockfrost-websocket-link@workspace:."
dependencies:
"@blockfrost/blockfrost-js": "npm:5.7.0"
"@emurgo/cardano-serialization-lib-nodejs": "npm:^12.1.1"
"@blockfrost/blockfrost-js": "npm:6.0.0-beta.2"
"@emurgo/cardano-serialization-lib-nodejs": "npm:^13.2.1"
"@esbuild/darwin-arm64": "npm:0.19.8"
"@esbuild/linux-x64": "npm:0.19.8"
"@eslint/compat": "npm:^1.2.1"
Expand Down Expand Up @@ -142,29 +142,22 @@ __metadata:
languageName: unknown
linkType: soft

"@blockfrost/openapi@npm:0.1.70-beta.0":
version: 0.1.70-beta.0
resolution: "@blockfrost/openapi@npm:0.1.70-beta.0"
"@blockfrost/openapi@npm:0.1.71":
version: 0.1.71
resolution: "@blockfrost/openapi@npm:0.1.71"
dependencies:
ajv: "npm:^8.12.0"
cbor: "npm:^9.0.1"
rimraf: "npm:6.0.1"
yaml: "npm:^2.3.4"
checksum: 4171f7c75f08763d03f67c5fac38e8dcb93e569ef72718afd4025f7a201e456a8a0ef732262ee6ae9d26596536d2037ecec92c9906894589211f06019a798563
checksum: 34c7c79aad3302e8d6f434020a9e574c05cb1929b8c48efe04b297c55ef61f7ed3316a587dcd1af7818a0b154998e3afd8677da17b97676f19144de103c4a4ed
languageName: node
linkType: hard

"@emurgo/cardano-serialization-lib-nodejs@npm:^11.5.0":
version: 11.5.0
resolution: "@emurgo/cardano-serialization-lib-nodejs@npm:11.5.0"
checksum: 3fff8448001c6d70807ef8e1a80a663ef60381e55bfd26c0f1b644e096895da7298fb991ac86670d4c5aee2e3e417e44ac80ab59080f7af107d8fa89906f9075
languageName: node
linkType: hard

"@emurgo/cardano-serialization-lib-nodejs@npm:^12.1.1":
version: 12.1.1
resolution: "@emurgo/cardano-serialization-lib-nodejs@npm:12.1.1"
checksum: a165613d695b9c10084be2784cdcdebc26ac7415025497f9c17ef08f7d7f786cb7b8318b32a0282261683b240e162c4916ec7a1470590265b2aad8b7d4ea2e5e
"@emurgo/cardano-serialization-lib-nodejs@npm:^13.2.1":
version: 13.2.1
resolution: "@emurgo/cardano-serialization-lib-nodejs@npm:13.2.1"
checksum: 6572ac1baebe1032a0e1ba701e8be0dc74d00ff332f1b58622851532d9bded9d89b797d862551842fce420ece05b67ced94c9edad33e7f124e48d74c28b0ac4e
languageName: node
linkType: hard

Expand Down

0 comments on commit 7a013f3

Please sign in to comment.