I have managed to retrive a user address from a dapp connector wallet using JS:
api_promise = window.cardano.{wallet}.enable();
api_promise.then(function(api) {
addr_promise = api.getUsedAddresses();
addr_promise.then(
function(addr) {
value[0]; // this is a CBOR address !
...
I get this type of (presumably CBOR) address: 012f4d0b584ecb52e4e4b8e78e4ce77a6f822e59ede3277305fd526b71824b2d2740284cf6a28e2a512cc4a00f41004c18ed728a0f7a04eb29
Apparently with some skill it could be read using this -> https://cbor.me
.
# Is there any method to extract a shelley addr_34....
using JS or python?
Working implementations are available in node.js, but I'm using flask (python + JS). And I'm struggling to make it work wit packages cbor2
and bech32
.
For example I tried cbor2.loads(bytes(addr_str, 'utf-8'))
without success.
My further goal is to query blockfrost.