Cardano-serialization-lib-* usage

Am I doing this correctly?

//addr-checker.js:
//const CardanoWasm = require(‘@emurgo/cardano-serialization-lib-nodejs’);
const CardanoWasm = require(‘@emurgo/cardano-serialization-lib-asmjs’);

// Check library loading
console.log(‘CardanoWasm loaded:’, !!CardanoWasm);
console.log(‘StakeCredential available:’, !!CardanoWasm.StakeCredential);

$ node addr-checker.js
CardanoWasm loaded: true
StakeCredential available: false
norsky@makukumba:~/addr-check$ npm list @emurgo/cardano-serialization-lib-nodejs @emurgo/cardano-serialization-lib-asmjs
cardano-address-generator@1.0.0 /home/norsky/addr-check
├── @emurgo/cardano-serialization-lib-asmjs@14.1.2
└── @emurgo/cardano-serialization-lib-nodejs@14.1.2

Neither of the lib’s have stake cred available?

Is it because my cpu aarch64 ?

You don’t need to wrestle with raw CSL. Higher-level wrapper SDKs give you a richer toolset out of the box:

Some JS/TS options:

1 Like