magiclabs / magic-admin-php

Magic admin PHP SDK makes it easy to leverage Decentralized ID tokens to protect routes and restricted resources for your application.
https://docs.magic.link/admin-sdk/php
MIT License
19 stars 5 forks source link

Support mult-chain wallets in get_metadata calls #18

Closed justinnout closed 1 year ago

justinnout commented 1 year ago

📦 Pull Request

The current implementation of magic-admin-php for metadata retrieval returns the Ethereum public_address.

We are adding functionality to query wallet(s) for any chain tied to the end-user.

Example (queries all Solana wallets created for the user if applicable): $meta = $magic->user->get_metadata_by_token_and_wallet($did_token, \MagicAdmin\Resource\Wallet::SOLANA);

Example (queries all wallets created for the user if applicable): $meta = $magic->user->get_metadata_by_token_and_wallet($did_token, \MagicAdmin\Resource\Wallet::ANY);

Please see supported wallet types in lib/Resource/Wallet.php.

🗜 Versioning

(Check one!)

✅ Fixed Issues

🚨 Test instructions

./vendor/bin/phpunit tests  3.0.0 02:30:07 PM PHPUnit 8.5.31 by Sebastian Bergmann and contributors.

.................................................. 50 / 50 (100%)

Time: 74 ms, Memory: 8.00 MB

OK (50 tests, 83 assertions)

⚠️ Update CHANGELOG.md

shortcut-integration[bot] commented 1 year ago

This pull request has been linked to Shortcut Story #66191: Support new feature from Formatic Admin API in magic-admin-php SDK..