2
seed = [b'metadata', bytes(program_id), bytes(PublicKey("AAFw5ekM42VZW63v9xPmuSKNnVPJ2JY2jVCEBscShB4a"))]
greeted, nonce = PublicKey.find_program_address(seeds=seed, program_id=program_id)

data = client.get_account_info(greeted)['result']['value']['data']
data[0]

I get the output(image attached): Output of code

"BLXRjfGGRq3wZT89L+Hj4D.........." actually longer than this, image attached

My guess is this is some base 64 or 58 something, but I have no idea what it is or how to convert the data to readable format in python.

Any Help is much appreciated.

kamda cyrial
  • 71
  • 1
  • 7

1 Answers1

0

From the Information shared by @Kartic Soneji,

I was able to dig into the metaplex python API to see exactly how they decoded the base 64,

https://github.com/metaplex-foundation/python-api/blob/441c2ba9be76962d234d7700405358c72ee1b35b/metaplex/metadata.py#L180.


def get_metadata(client, mint_key):
    metadata_account = get_metadata_account(mint_key)
    data = base64.b64decode(client.get_account_info(metadata_account)['result']['value']['data'][0])
    metadata = unpack_metadata_account(data)
    return metadata

So anyone could just import base64 and do this decode. Don't forget to run the unpack_metadata_account()

Thanks to all who helped, and hope this helps out anyone out there.

kamda cyrial
  • 71
  • 1
  • 7