did.store_their_did doesn’t store did in the wallet

I’m using hyperledger indy for a project.
In my code I use anoncreds.prover_create_credential_req() as follow:

(device['device_attributes_cred_request'], device['device_attributes_cred_request_metadata']) = 
        await anoncreds.prover_create_credential_req(
                                                     device['wallet'], 
                                                     device['User_info']['Pairwise_did_for_User'], 
                                                     json.dumps(device['credential_offer']),
                                                     json.dumps(device['device_attributes_cred_def']) ,
                                                     device['master_secret_id'])

Everything seems correct, but when i run the code it returns this error:

Traceback (most recent call last):
  File "/home/indy-sdk/app/main.py", line 597, in <module>
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/indy-sdk/app/main.py", line 583, in run
    device['wallet'], 
  File "/home/.local/lib/python3.10/site-packages/indy/anoncreds.py", line 729, in prover_create_credential_req
    (credential_req_json, credential_req_metadata_json) = await do_call('indy_prover_create_credential_req',
indy.error.CommonInvalidStructure

Here’s how the parameter where generated:

device[‘wallet’] is generated from


async def create_wallet(identity):
    print(""{}" -> Create wallet".format(identity['name']))
    try:
        await wallet.create_wallet(identity['wallet_config'],
                                   identity['wallet_credentials'])
    except IndyError as ex:
        if ex.error_code == ErrorCode.PoolLedgerConfigAlreadyExistsError:
            pass
    identity['wallet'] = await wallet.open_wallet(identity['wallet_config'],
                                                  identity['wallet_credentials'])

device[‘User_info’][‘Pairwise_did_for_User’] is the DID Device created for a secure communication with User, using did.create_and_store_my_did()

device[‘credential_offer’] comes from

    user['device_attributes_cred_offer'] = await anoncreds.issuer_create_credential_offer(user['wallet'], user['device_attributes_cred_def_id'])
    device_attributes_cred_offer = user['device_attributes_cred_offer']
    
    #User Agent send encrypted credential offer
    authcrypted_device_attributes_credential_offer = 
        await crypto.auth_crypt(user['wallet'], user['Device_info']['Pairwise_verkey_for_Device'], user['Device_info']['Device_key_for_User'],  (device_attributes_cred_offer).encode('utf-8'))

    #Device Agend decrypte and store credential offer
    authdecrypted_device_attributes_credential_offer = 
        await crypto.auth_decrypt(device['wallet'], device['User_info']['Pairwise_verkey_for_User'], authcrypted_device_attributes_credential_offer)
    device['credential_offer'] = json.loads(((authdecrypted_device_attributes_credential_offer)[1]).decode('utf-8'))

I had to transform it in a json string using json.loads because anoncreds.prover_create_credential_req() requires it to has that type, but to do so, i had to select the second element of the tuple, since was not possible to cast the first element into a json string; for a better understanding this is the initial part of authdecrypted_device_attributes_credential_offer:

('DDzKRUEjZP3F5evtsSVyj9hvM3PneHK1PSPbA9QTijN4', b'{"schema_id":"Uo9cHmH6LKgQHqGK1K41UG:2:Device_attributes:1.2","cred_def_id":"Uo9cHmH6LKgQHqGK1K41UG:3:CL:601:TAG1".....and so on

device[‘device_attributes_cred_def’] derives from

get_cred_def_request = await ledger.build_get_cred_def_request(device['User_info']['Pairwise_did_for_User'], device['credential_offer']['cred_def_id'])
get_cred_def_response = await ledger.submit_request(device['pool'], get_cred_def_request)
device['device_attributes_cred_def'] = await ledger.parse_get_cred_def_response(get_cred_def_response)

And in the end device[‘master_secret_id’] is generated from the function

device['master_secret_id'] = await anoncreds.prover_create_master_secret(device['wallet'], None)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật