{"id":13392942,"url":"https://github.com/exinone/mixin-sdk-php","last_synced_at":"2026-01-15T03:59:47.928Z","repository":{"id":33681463,"uuid":"160341234","full_name":"ExinOne/mixin-sdk-php","owner":"ExinOne","description":"Mixin-Network SDK for PHP","archived":false,"fork":false,"pushed_at":"2024-05-28T11:54:20.000Z","size":323,"stargazers_count":24,"open_issues_count":0,"forks_count":10,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-29T02:56:34.360Z","etag":null,"topics":["exinone","mixin","mixin-network","mixin-network-sdk","mixin-sdk-php","php","sdk"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ExinOne.png","metadata":{"files":{"readme":"readme-cn.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-04T10:38:41.000Z","updated_at":"2024-05-30T06:29:32.185Z","dependencies_parsed_at":"2023-11-09T11:53:17.664Z","dependency_job_id":"2cb7b834-2787-4108-86b6-f13849ae5f50","html_url":"https://github.com/ExinOne/mixin-sdk-php","commit_stats":{"total_commits":110,"total_committers":10,"mean_commits":11.0,"dds":0.6363636363636364,"last_synced_commit":"8472c56d513fcfaca39d5285789d42e1955bd6a1"},"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExinOne%2Fmixin-sdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExinOne%2Fmixin-sdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExinOne%2Fmixin-sdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExinOne%2Fmixin-sdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExinOne","download_url":"https://codeload.github.com/ExinOne/mixin-sdk-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243469136,"owners_count":20295693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exinone","mixin","mixin-network","mixin-network-sdk","mixin-sdk-php","php","sdk"],"created_at":"2024-07-30T17:00:39.776Z","updated_at":"2026-01-15T03:59:47.899Z","avatar_url":"https://github.com/ExinOne.png","language":"PHP","funding_links":[],"categories":["SDK"],"sub_categories":["3rd-party SDK"],"readme":"# Mixin-SDK-PHP\n\n![](https://img.shields.io/badge/Mixin-Network-2995f2.svg?style=for-the-badge\u0026colorA=1cc2fd\u0026longCache=true\u0026logo=data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI0NSAyNDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI0NSAyNDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjI3LjEsMzMuM2wtMzYuMywxNi4xYy0yLjIsMS4yLTMuNSwzLjUtMy41LDUuOXYxMjkuOGMwLDIuNSwxLjQsNC44LDMuNiw1LjlsMzYuMywxNS43YzIuMywxLjIsNS0wLjQsNS0zJiMxMDsmIzk7JiM5OyYjOTtWMzYuM0MyMzIuMSwzMy43LDIyOS4zLDMyLjEsMjI3LjEsMzMuM3ogTTUzLjMsNDkuMmwtMzUuMi0xNmMtMi4zLTEuMi01LDAuNC01LDN2MTY3LjRjMCwyLjcsMyw0LjMsNS4yLDIuOWwzNS40LTE4LjcmIzEwOyYjOTsmIzk7JiM5O2MyLTEuMiwzLjItMy40LDMuMi01Ljd2LTEyN0M1Ni44LDUyLjcsNTUuNSw1MC40LDUzLjMsNDkuMnogTTE2My43LDkzLjVsLTM3LjktMjEuN2MtMi4xLTEuMi00LjctMS4yLTYuNywwTDgwLjUsOTMuMyYjMTA7JiM5OyYjOTsmIzk7Yy0yLjEsMS4yLTMuNCwzLjUtMy40LDUuOXY0NGMwLDIuNCwxLjMsNC43LDMuNCw1LjlsMzguNiwyMi4yYzIuMSwxLjIsNC43LDEuMiw2LjcsMGwzNy45LTIyYzIuMS0xLjIsMy40LTMuNSwzLjQtNS45di00NCYjMTA7JiM5OyYjOTsmIzk7QzE2Ny4xLDk2LjksMTY1LjgsOTQuNywxNjMuNyw5My41eiIvPgoJPC9nPgo8L2c+Cjwvc3ZnPg==)\n![](https://img.shields.io/badge/ExinOne-333333.svg?style=for-the-badge\u0026longCache=true\u0026logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUxLjc3IiBoZWlnaHQ9IjE1MS43NyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIDxkZWZzPgogIDxzdHlsZT4uY2xzLTF7ZmlsbDojZmZmO308L3N0eWxlPgogPC9kZWZzPgogPHRpdGxlPjI1PC90aXRsZT4KIDxnPgogIDx0aXRsZT5iYWNrZ3JvdW5kPC90aXRsZT4KICA8cmVjdCBmaWxsPSJub25lIiBpZD0iY2FudmFzX2JhY2tncm91bmQiIGhlaWdodD0iMTUzLjc3IiB3aWR0aD0iMTUzLjc3IiB5PSItMSIgeD0iLTEiLz4KIDwvZz4KIDxnPgogIDx0aXRsZT5MYXllciAxPC90aXRsZT4KICA8cGF0aCBpZD0ic3ZnXzEiIGQ9Im0xMTEuNTc2ODM4LDE0LjU4MTcyN2MtOC4zNywxLjQ0IC0xMC43Niw3LjM4IC0xNS44OSwxMy4zNmE5Ljc2LDkuNzYgMCAwIDEgLTcuNDEsMy4zNWwtMC44NywwYTkuNzcsOS43NyAwIDAgMSAtNy40MSwtMy4zNWMtNS4xMywtNiAtNy41MiwtMTEuOTIgLTE1Ljg5LC0xMy4zNmMtMTAuODQsLTEuODYgLTIxLjUzLDUuNDEgLTIyLjU4LDE2LjM1YTE4LjUxLDE4LjUxIDAgMCAwIDE4LjQyLDIwLjM0YzEyLDAgMTQuMjIsLTYuMDcgMjAuMjgsLTEzLjQ0YTkuODYsOS44NiAwIDAgMSA3LjYyLC0zLjZsMCwwYTkuODUsOS44NSAwIDAgMSA3LjYxLDMuNmM2LjA2LDcuMzcgOC4yNiwxMy40NCAyMC4yOCwxMy40NGExOC41MSwxOC41MSAwIDAgMCAxOC40MiwtMjAuMzRjLTEuMDUsLTEwLjk0IC0xMS43NCwtMTguMjEgLTIyLjU4LC0xNi4zNXoiIGNsYXNzPSJjbHMtMSIvPgogIDxwYXRoIGlkPSJzdmdfMiIgZD0ibTgzLjgxNjgzOCw1OC40NjE3MjdjLTguMzcsMS40MyAtMTAuNzYsNy4zNyAtMTUuOSwxMy4zNmE5Ljc0LDkuNzQgMCAwIDEgLTcuNCwzLjM1bC0wLjg2LDBhOS43Niw5Ljc2IDAgMCAxIC03LjQxLC0zLjM1Yy01LjEzLC02IC03LjUzLC0xMS45MyAtMTUuOSwtMTMuMzZjLTEwLjg0LC0xLjg2IC0yMS41NCw1LjQgLTIyLjU5LDE2LjM0YTE4LjUxLDE4LjUxIDAgMCAwIDE4LjQyLDIwLjNjMTIsMCAxNC4yMywtNi4wNiAyMC4yOCwtMTMuNDRhOS45LDkuOSAwIDAgMSA3LjYyLC0zLjZsMCwwYTkuODksOS44OSAwIDAgMSA3LjYyLDMuNmM2LjA2LDcuNDQgOC4yNiwxMy40NCAyMC4yOCwxMy40NGExOC41MSwxOC41MSAwIDAgMCAxOC40MiwtMjAuMzRjLTEuMDUsLTEwLjkgLTExLjc0LC0xOC4xNiAtMjIuNTgsLTE2LjN6IiBjbGFzcz0iY2xzLTEiLz4KICA8cGF0aCBpZD0ic3ZnXzMiIGQ9Im0xMTEuNzQ2ODM4LDEwMS43MzE3MjdjLTguMzcsMS40NCAtMTAuNzcsNy4zOCAtMTUuOSwxMy4zNmE5LjcxLDkuNzEgMCAwIDEgLTcuNCwzLjM2bC0wLjg4LDBhOS43MSw5LjcxIDAgMCAxIC03LjQsLTMuMzZjLTUuMTQsLTYgLTcuNTMsLTExLjkyIC0xNS45LC0xMy4zNmMtMTAuODMsLTEuODYgLTIxLjUzLDUuMzcgLTIyLjYxLDE2LjM3YTE4LjUxLDE4LjUxIDAgMCAwIDE4LjQyLDIwLjM0YzEyLDAgMTQuMjIsLTYuMDcgMjAuMjgsLTEzLjQ0YTkuODksOS44OSAwIDAgMSA3LjYyLC0zLjZsMCwwYTkuOSw5LjkgMCAwIDEgNy42MiwzLjZjNi4wNiw3LjM3IDguMjYsMTMuNDQgMjAuMjgsMTMuNDRhMTguNTEsMTguNTEgMCAwIDAgMTguNDUsLTIwLjM0Yy0xLjA1LC0xMSAtMTEuNzUsLTE4LjIzIC0yMi41OCwtMTYuMzd6IiBjbGFzcz0iY2xzLTEiLz4KIDwvZz4KPC9zdmc+)\n\n------\n\n![](https://img.shields.io/badge/php-~7.0.0-green.svg?longCache=true\u0026style=flat-square\u0026colorA=333333)\n![](https://img.shields.io/github/languages/code-size/ExinOne/laravel-mixin-sdk.svg?style=flat-square\u0026colorA=333333)\n![](https://img.shields.io/github/license/ExinOne/laravel-mixin-sdk.svg?style=flat-square\u0026colorA=333333)\n![](https://img.shields.io/github/release/ExinOne/laravel-mixin-sdk.svg?style=flat-square\u0026colorA=333333)\n[![](https://img.shields.io/badge/language-English-333333.svg?longCache=true\u0026style=flat-square\u0026colorA=E62B1E)](readme.md)\n\nMixin-Network SDK for PHP\n\n## 要求\n\n1. `Composer`\n2. `PHP` \u003e= 7.0\n\n## Installation\n\n```bash\n$ composer require exinone/mixin-sdk-php -vvv\n```\n\n## 使用\n\n### 例示\n\n```php\n// 配置文件格式示例\n// 通过 Mixin 开发者后台的会话密钥部分来生成\n$config0 = [\n    \"app_id\"              =\u003e \"d4155247-xxxx-xxxx-aa8a-775333b12406\",\n    \"session_id\"          =\u003e \"7a633a3f-xxxx-xxxx-99b9-ae43c88be4be\",\n    \"server_public_key\"   =\u003e \"556b82842exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa6d8ad8af3f2649474\",\n    \"session_private_key\" =\u003e \"154cd8dceaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx24d070b1acc880a13b\",\n    \"spend_key\"           =\u003e \"f86d9dd3faxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc64e8bc7c5aef6a0a4\", // 注册应用钱包时备份的spend key\n    \"client_secret\"       =\u003e \"fdbe66249axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcc4519a4ea20d48b7e\" // 授权密钥\n];\n\n// 旧版配置文件格式\n$config1 = [\n    'mixin_id'      =\u003e '7000101633',\n    'client_id'     =\u003e '982afd4e-92dd-4430-98cf-d308442ea04d',\n    'client_secret' =\u003e 'b0a9adf1b358501b1fb6065c6292b09dbc675d5734225f86e0ec14a71d0fd38a',\n    'pin'           =\u003e '125334',\n    'pin_token'     =\u003e 'RzgyepFhLbMx+zLw6ogYzZ5k+kmlo8gQ2f4+1uwGMi1HgvMexGdFdeny0ffuBl7gXgPqi1GpUDPWPNrgAIjwGIFu+rHSre1G7JA5ET6tgIYoC+OI2dF0PmNK0qtkjK+qpGpSCt8nFbTfgyHjFENAp4hLZEIhuhzSPPmkkhXGlAU=',\n    'session_id'    =\u003e '8a70b414-bdef-46f3-9738-186c1095da61',\n    'private_key'   =\u003e \u003c\u003c\u003cEOF\n-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQCZAkpYA7eH38GbzIX653dxBAEanrSSdYbzQYIV/kKbULYSB43X\n5hWfCFpNJ6FoIUjHAzrNyqJMvSS6LwAA+R4w5GYv8en1Ga1blKbziCMvZsRJ65bP\nF2cPbPQUYNWZpZRsyFlMZCjVVytA1a+HWba5FzGBXiEEzd5BVo9truxGKQIDAQAB\nAoGBAJHpVj4ipUWEgtvxKR9A1m1G9UqOaAJ2409cfBI/GwOD72y4GXL2rk2vKHYF\nQe3MN9vY353aC/YENV77bRSAfGF+lAuw3hQOFfMvKfRUmVaB5V4kEaF1+z9jPHwh\nQcSpqyAsMClEnyMxbNrFih4tQGlGUydHI3xv1wK+53MjncwBAkEA98GvzldsLW7E\ndhwXLba3KN/GvLZLcljLyHjctUxCU8EywD73UM1lJuayWvYdLfzFe0p9cDjvS8Gx\nsbYg3eE2qQJBAJ4ZkqVbdCAyUBpjaIO9QzxsL77zCgayrQTvWv0QQgJputO7S2rs\ni/iCmt1bZ3IAnfVnDUJfAaxSL6VU1T6Fw4ECQQCtUvrCx7YOMqeOWSh9+o04MxS9\ngGpXnHcz0BnXW3orTcVLaMFr7cUN6eZsbDENswAUuI/4qlv+C4tcX6Wuk5fBAkA+\nEggzB37GDTrJwXGNF0dId6kfLMgo7QlkwJxWcoWX8O66pfPsHMavYIdwlKw+Y+Og\nLz9TaX18rB+sp2u5SkcBAkBIsC/AJNhf1xILLAkkpycJ7rc864Y1JbmKk+I5fXid\nvA4vKPqu2ZnD0O4YbGmciuTRPgeJqAt8bbHq/xOfL0lE\n-----END RSA PRIVATE KEY-----\nEOF\n            ,  //import your private_key\n];\n\n$mixinSdk = new \\ExinOne\\MixinSDK\\MixinSDK();\n// 使用 setConfig 方法，保存配置\n$mixinSdk-\u003esetConfig('myConfig-A',$config0);\n$mixinSdk-\u003esetConfig('myConfig-B',$config1);\n// 在之后的调用中你就可以\n$mixinSdk-\u003euse('myConfig-A')-\u003euser()-\u003ereadProfile();\n\n//-------\n// 或者更加简洁一些，直接使用 use 方法后，链式调用其他方法\n$mixinSdk-\u003euse('myConfig-A',$config)-\u003euser()-\u003ereadProfile();\n// 在之后的调用中你就可以\n$mixinSdk-\u003euse('myConfig-A')-\u003euser()-\u003ereadProfile();\n```\n\n### 调用\n\n| code                                                                                                                                                      | description                                     | module  | Mixin Network Docs                                                                                                       |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |\n| `MixinSDK::pin()-\u003eupdatePin($oldPin, $pin)`                                                                                                               | 更新 Pin 码                                        | Pin     | [link](https://developers.mixin.one/docs/api/pin/pin-update)                 |\n| `MixinSDK::pin()-\u003everifyPin($pin)`                                                                                                                        | 验证 Pin 码                                        | Pin     | [link](https://developers.mixin.one/docs/api/pin/pin-verify)                 |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| `MixinSDK::user()-\u003ereadProfile()`                                                                                                                         | 读取当前账号信息                                        | User    | [link](https://developers.mixin.one/docs/api/users/profile)                                                |\n| `MixinSDK::user()-\u003eupdateProfile(string $full_name, string $avatar_base64 = '')`                                                                          | 更新账号信息                                          | User    | [link](https://developers.mixin.one/docs/api/users/profile)                                              |\n| `MixinSDK::user()-\u003eupdatePreferences(string $receive_message_source, string $accept_conversation_source)`                                                 | 更新隐私设置                                          | User    | [link](https://developers.mixin.one/docs/api/users/profile)                                           |\n| `MixinSDK::user()-\u003erotateQRCode()`                                                                                                                        | 更换 QRCode                                       | User    | [link](https://developers.mixin.one/docs/api/users/profile)                                                   |\n| `MixinSDK::user()-\u003ereadFriends()`                                                                                                                         | read friends                                    | User    | [link](https://developers.mixin.one/docs/api/users/contacts)                                                     |\n| `MixinSDK::user()-\u003eaddFavoriteApp(string $user_id)`                                                                                                       | 增加 App 至喜欢列表                                | User    | [link](https://developers.mixin.one/docs/api/shared-bots)                                                                |\n| `MixinSDK::user()-\u003eremoveFavoriteApp(string $user_id)`                                                                                                    | 从喜欢列表中删除 App                               | User    | [link](https://developers.mixin.one/docs/api/shared-bots)                                                              |\n| `MixinSDK::user()-\u003ereadFavoriteApps(string $user_id = null)`                                                                                              | 读取喜欢列表                                      | User    | [link](https://developers.mixin.one/docs/api/shared-bots)                                                               |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| `MixinSDK::wallet()-\u003ecreateAddress(string $asset_id, string $destination, $pin, $label, $tag)`                                                            | 创建一个 address                                    | Wallet  | [link](https://developers.mixin.one/docs/api/withdrawal/address-add)                                             |\n| `MixinSDK::wallet()-\u003ereadAddresses(string $assetId)`                                                                                                      | 获取某个 asset 的全部地址                                | Wallet  | [link](https://developers.mixin.one/docs/api/withdrawal/addresses)                                       |\n| `MixinSDK::wallet()-\u003ereadAddress(string $addressId)`                                                                                                      | 获取某个 address 的信息                                | Wallet  | [link](https://developers.mixin.one/docs/api/withdrawal/address)                                               |\n| `MixinSDK::wallet()-\u003edeleteAddress(string $addressId, $pin = null)`                                                                                              | 删除一个 address                                    | Wallet  | [link](https://developers.mixin.one/docs/api/withdrawal/address-delete)                                             |\n| `MixinSDK::wallet()-\u003ereadAssets()`                                                                                                                        | 获取当前用户全部的 assets 信息                             | Wallet  | [link](https://developers.mixin.one/docs/api/assets)                                                |\n| `MixinSDK::wallet()-\u003ereadAsset(string $assetId)`                                                                                                          | 获取当前用户某个 asset 的信息                              | Wallet  | [link](https://developers.mixin.one/docs/api/assets/asset)                                                 |\n| `MixinSDK::wallet()-\u003edeposit(string $assetId)`                                                                                                            | deposit (The api same as `wallet()-\u003ereadAsset`) | Wallet  | [link](https://developers.mixin.one/docs/api/assets/asset)                                                    |\n| `MixinSDK::wallet()-\u003ewithdrawal(string $addressId, $amount, $pin, $memo = '', $trace_id = null)`                                                          | 转账到某个 address                                   | Wallet  | [link](https://developers.mixin.one/docs/api/withdrawal)                                                 |\n| `MixinSDK::wallet()-\u003etransfer(string $assetId, string $opponentId, $pin, $amount, $memo = '', $trace_id = null)`                                          | 转账给某个用户                                         | Wallet  | [link](https://developers.mixin.one/docs/api/transfer)                                                   |\n| `MixinSDK::wallet()-\u003everifyPayment(string $asset_id, string $opponent_id, $amount, string $trace_id)`                                                     | verify payment                                  | Wallet  | [link](https://developers.mixin.one/docs/api/transfer/payment)                                             |\n| `MixinSDK::wallet()-\u003ereadTransfer(string $traceId)`                                                                                                       | 获取转账详情                                          | Wallet  | [link](https://developers.mixin.one/docs/api/transfer)                                              |\n| `MixinSDK::wallet()-\u003ereadAssetFee(string $assetId)`                                                                                                       | 获取资产提现费率                                        | Wallet  | [link](https://developers.mixin.one/docs/api/assets/fee)                                                                                                                 |\n| `MixinSDK::wallet()-\u003ereadUserSnapshots($limit = null, string $offset = null, string $asset = '', string $order = 'DESC')`                                 | 获取当前用户某个资产全部的 snapshots                         | Wallet  | [link](https://developers.mixin.one/docs/api/network/snapshots)                                          |\n| `MixinSDK::wallet()-\u003ereadUserSnapshot(string $snapshotId)`                                                                                                | 获取当前用户某个 snapshot 的信息                           | Wallet  | [link](https://developers.mixin.one/docs/api/network/snapshot)                                           |\n| `MixinSDK::wallet()-\u003eaccessTokenGetUserSnapshots(string $access_token, $limit = null, string $offset = null, string $asset = '', string $order = 'DESC')` | 获取当前用户某个资产全部的 snapshots                         | Wallet  | [link](https://developers.mixin.one/docs/api/network/snapshots)                                          |\n| `MixinSDK::wallet()-\u003eaccessTokenGetUserSnapshot(string $access_token, string $snapshot_id)`                                                               | 获取当前用户某个 snapshot 的信息                           | Wallet  | [link](https://developers.mixin.one/docs/api/network/snapshot)                                           |\n| `MixinSDK::wallet()-\u003eaccessTokenGetTransfer(string $access_token, string $trace_id)`                                                                      | 获取转账详情                                          | Wallet  | [link](https://developers.mixin.one/docs/api/transfer/snapshot)                                              |\n| `MixinSDK::wallet()-\u003ereadRawMainNetAddress(string $client_id)`                                                                                            | 获取转账地址                                          | Wallet  |                                                                                                                          |\n| `MixinSDK::wallet()-\u003eaccessTokenPostOutputs($access_token, $receivers, $index = 0)`                                                                       | 获取转账地址                                          | Wallet  | [link](https://developers.mixin.one/docs/api/outputs)                                                                             |\n| `MixinSDK::wallet()-\u003emultisigPayment(string $asset_id, array $receivers, int $threshold, $amount, $memo = '', $trace_id = null)`                          | 发起多签                                            | Wallet  | [link](https://developers.mixin.one/docs/api/transfer/payment)                                                                             |\n| `MixinSDK::wallet()-\u003echeckCode($code_id)`                                                                                                                 | 查看支付详情                                          | Wallet  |                                                                                                                          |\n| `MixinSDK::wallet()-\u003ereadMultisigs(string $offset = '', $limit = null)`                                                                                   | 查看所有多签                                          | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/outputs)                                                                             |\n| `MixinSDK::wallet()-\u003eaccessTokenPostMultisigs(string $access_token, string $raw, string $action = 'sign')`                                                | 发起多签交易请求                                        | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/outputs)                                                                             |\n| `MixinSDK::wallet()-\u003eexternalProxy($params, $method = 'sendrawtransaction')`                                                                              | 提取资产                                            | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                             |\n| `MixinSDK::wallet()-\u003epostMultisigs(string $raw, string $action = 'sign')`                                                                                 | 发起多签交易请求                                        | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                             |\n| `MixinSDK::wallet()-\u003emultisigsRequests(string $raw, string $action = 'sign')`                                                                                 | 发起多签交易请求                                        | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                             |\n| `MixinSDK::wallet()-\u003emultisigsRequestsSign(string $request_id, String $pin)`                                                                                 | 签名                          | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                       |\n| `MixinSDK::wallet()-\u003emultisigsRequestsCancel(string $request_id, String $pin)`                                                                                 | 取消签名                          | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                       |\n| `MixinSDK::wallet()-\u003emultisigsRequestsUnlock(string $request_id, String $pin)`                                                                                 | 取消多签交易                         | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                       |\n| `MixinSDK::wallet()-\u003emultisigsSign(string $request_id, String $pin)`                                                                                      | 签名                                              | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                             |\n| `MixinSDK::wallet()-\u003emultisigsCancel(string $request_id, String $pin)`                                                                                    | 取消签名                                            | Wallet  | [link](https://developers.mixin.one/docs/api/multisigs/request)                                                                             |\n| `MixinSDK::wallet()-\u003ereadFiats()`                                                                                                                         | 法币对应美元汇率                                        | Wallet  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| `MixinSDK::network()-\u003ereadUser($userId)`                                                                                                                  | 获取某个用户的信息                                       | Network | [link](https://developers.mixin.one/docs/api/users/user)                     |\n| `MixinSDK::network()-\u003ereadUsers(array $userIds)`                                                                                                          | 获取多个用户的信息                                       | Network | [link](https://developers.mixin.one/docs/api/users)                                                  |\n| `MixinSDK::network()-\u003esearchUser($item)`                                                                                                                  | search user                                     | Network | [link](https://developers.mixin.one/docs/api/users/search)                                                 |\n| `MixinSDK::network()-\u003ereadNetworkAsset(string $assetId)`                                                                                                  | read network asset                              | Network | [link](https://developers.mixin.one/docs/api/network/assets)                                              |\n| `MixinSDK::network()-\u003ereadNetworkSnapshots($limit = null, string $offset = null, string $asset = '', string $order = 'DESC')`                             | read network snapshots                          | Network | [link](https://developers.mixin.one/docs/api/network/snapshots)                                          |\n| `MixinSDK::network()-\u003ereadNetworkSnapshot(string $snapshotId)`                                                                                            | read network snapshot                           | Network | [link](https://developers.mixin.one/docs/api/network/snapshot)                                           |\n| `MixinSDK::network()-\u003ecreateUser($fullName)`                                                                                                              | 在 Mixin Network 上创建用户                           | Network | [link](https://developers.mixin.one/docs/api/users/network-user)                                                   |\n| `MixinSDK::network()-\u003eexternalTransactions($asset, $destination, $limit, $offset, $tag, $transaction_hash, $source, $user)`                               | read external transactions                      | Network | [link](https://developers.mixin.one/docs/api/external/pending-deposits)                                      |\n| `MixinSDK::network()-\u003ecreateAttachments()`                                                                                                                | create attachments                              | Network | [link](https://developers.mixin.one/docs/api/messages/attachment-upload)                                           |\n| `MixinSDK::network()-\u003emixinNetworkChainsSyncStatus()`                                                                                                     | 获取 Mixin Network 当前的区块同步状态                      | Network |                                                                                                                  |\n| `MixinSDK::network()-\u003etopAsset()`                                                                                                                         | top asset                                       | Network | [link](https://developers.mixin.one/docs/api/network/assets)                       |\n| `MixinSDK::network()-\u003emultisigAsset()`                                                                                                                    | multisig asset                                  | Network | [link](https://developers.mixin.one/docs/api/network/assets)                       |\n| `MixinSDK::network()-\u003erequestAccessToken(string $code)`                                                                                                   | use code request access token                   | Network | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::network()-\u003eaccessTokenGetInfo(string $access_token)`                                                                                           | use access token get info                       | Network | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::network()-\u003eaccessTokenGetAssets(string $access_token)`                                                                                         | use access token get assets info                | Network | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::network()-\u003eaccessTokenGetAddresses(string $access_token, string $assetId)`                                                                     | use access token get addresses                  | Network | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::network()-\u003eaccessTokenGetAddress(string $access_token, string $addressId)`                                                                     | use access token get an addresseses             | Network | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::network()-\u003eaccessTokenGetContacts(string $access_token)`                                                                                       | use access token get contact info               | Network | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::network()-\u003ecreateConversations($category, $participants, $conversation_id, $name)`                                                             | 创建群聊                                            | Network | [link](https://developers.mixin.one/docs/api/conversations/create) |\n| `MixinSDK::network()-\u003ereadConversations($conversation_id)`                                                                                                | 获取群聊                                            | Network | [link](https://developers.mixin.one/docs/api/conversations/read)     |\n| `MixinSDK::network()-\u003eparticipantsActions(string $conversation_id, array $participants, string $action = \"ADD\")`                                                                                                                   | 管理群聊                                            | Network | [link](https://developers.mixin.one/docs/api/conversations/group)            |\n| `MixinSDK::network()-\u003erotateConversation(string $conversation_id)`                                                                                                                   | 刷新群邀请链接                                            | Network | [link](https://developers.mixin.one/docs/api/conversations/create)            |\n| `MixinSDK::network()-\u003esearchAssets($q)`                                                                                                                   | 搜索资产                                            | Network | [link](https://developers.mixin.one/docs/api/assets/asset)            |\n| `MixinSDK::network()-\u003ereadHistoricalPrices(string $asset, string $offset)`                                                                                                                   | 获取历史价格                                            | Network | [link](https://developers.mixin.one/docs/api/network/ticker)            |\n| **---**                                                                                                                                                   | **---**                                         | **---** |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| `MixinSDK::message()-\u003esendText($user_id, $data, $category, $conversation_id, $recipient_id)`                                                              | 发送文本消息                                          | Message | [link](https://developers.mixin.one/docs/api/messages/send)   |\n| `MixinSDK::message()-\u003esendContact($user_id, $contact_id, $category, $conversation_id, $recipient_id)`                                                     | 发送用户名片                                          | Message | [link](https://developers.mixin.one/docs/api/messages/send)   |\n| `MixinSDK::message()-\u003esendAppButtonGroup($user_id, $data, $category, $conversation_id, $recipient_id)`                                                    | 发送 App Button Group (最多三个)                      | Message | [link](https://developers.mixin.one/docs/api/messages/send)   |\n| `MixinSDK::message()-\u003esendAppCard($user_id, $data, $category, $conversation_id, $recipient_id)`                                                           | 发送 App Card                                     | Message | [link](https://developers.mixin.one/docs/api/messages/send)   |\n| `MixinSDK::message()-\u003easkMessageReceipt($message_id)`                                                                                                     | 确认消息是否送达                                        | Message | [link](https://developers.mixin.one/docs/api/messages/send)   |\n| `MixinSDK::message()-\u003esendBatchMessage($user_id, $data, $use_http, $type)`                                                                                | 群发消息                                            | Message | [link](https://developers.mixin.one/docs/api/messages/send)   |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| **---**                                                                                                                                                   | **--**                                          | **--**  |                                                                                                                          |\n| `MixinSDK::getOauthUrl($user_id, $data, $category = 'CONTACT', $conversation_id = null)`                                                                  | 获取 Oauth Url                                    | other   | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::getPayUrl($asset_id, $amount, $trace_id, $memo, $client_id = null)`                                                                            | 生成一个支付 Url                                      | other   | [link](https://developers.mixin.one/docs/api-overview)                                                                           |\n| `MixinSDK::getConfig($configGroupName='')`                                                                                                                | 查看一个或者全部配置                                      | other   |                                                                                                                  |\n\n## 异常\n\n在 MixinNetwork 的返回体中如果存在 error ，则会直接抛出一个 `ExinOne\\MixinSDK\\Exceptions\\MixinNetworkRequestException` 异常。使用者需要对这个异常进行捕获并处理。\n\n```php\ntry {\n    //如果这里转账失败将会抛出错误\n    $mixinSdk-\u003ewallet()-\u003etransfer($asset_id, $opponent_id, $pin, $amount, $memo);\n} catch (MixinNetworkRequestException $e) {\n    // 此处的 errCode 和 errMessage 与 MixinNetwork 一致，可以参阅下方官方链接\n    $errCode    = $e-\u003egetCode();\n    $errMessage = $e-\u003egetMessage();\n    ...\n} catch (\\Throwable $e) {\n    ...\n}\n```\n\n[MixinNetwork Error Codes](https://developers.mixin.one/docs/api/error-codes)\n\n### 其他的异常\n\n| class                                                      | description     |\n| ---------------------------------------------------------- | --------------- |\n| `ExinOne\\MixinSDK\\Exceptions\\MixinNetworkRequestException` | Api 请求失败        |\n| `ExinOne\\MixinSDK\\Exceptions\\NotFoundConfigException`      | 未找到指定的配置组       |\n| `ExinOne\\MixinSDK\\Exceptions\\LoadPrivateKeyException`      | 私钥格式等错误         |\n| `ExinOne\\MixinSDK\\Exceptions\\ClassNotFoundException`       | 寻找指定的 module 失败 |\n\n## WARNING\n\n1. 进行如下操作可以配置 `iterator`, 在加密 PIN 时会使用到这个变量。在大部分时候，这个变量基本不需要修改。如果需要修改这个变量，请务必知道你在做什么。[关于 iterator 更详细的说明](https://developers.mixin.one/docs/dapp/guide/pin#encrypting-pin)\n   \n   ```php\n    $mixinSdk-\u003ewallet()-\u003esetIterator($iterator)-\u003etransfer($asset_id, $opponent_id, $pin, $amount, $memo);\n    // 默认使用 ( microtime(true) . 随机数 ) * 1000000000 作为 iterator\n   ```\n\n2. 设定 Http Request 超时时间\n   \n   ```php\n    $iterator = [time()];\n    // 如果是在 $mixinSdk-\u003epin()-\u003eupdatePin($oldPin,$pin) 中使用,\n    // $iterator 需要是有两个元素的数组, 即 count($iterator) == 2\n   \n    $mixinSdk-\u003ewallet()-\u003esetTimeout(10)-\u003etransfer($asset_id, $opponent_id, $pin, $amount, $memo);\n    // 默认超时时间为 20s\n   ```\n\n3. 获取原始结果\n   \n   ```php\n    $mixinSdk-\u003ewallet()-\u003esetRaw(true)-\u003etransfer($asset_id, $opponent_id, $pin, $amount, $memo);\n    // 返回 MixinNetwork 原始 Response 内容\n   ```\n\n## Alternatives\n\n[[exinone/laravel-mixin-sdk](https://github.com/ExinOne/laravel-mixin-sdk)]\n\n[[zamseam/mixin](https://github.com/zamseam/mixin)]\n\n## LICENSE\n\n**MIT**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexinone%2Fmixin-sdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexinone%2Fmixin-sdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexinone%2Fmixin-sdk-php/lists"}