PHP code example of moshong / nft_zxinchainn

1. Go to this page and download the library: Download moshong/nft_zxinchainn library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

moshong / nft_zxinchainn example snippets


use NftZxinchainn\Factory;

$config = [
        'appId' => "",//应用appId
        'appKey' => "",//应用密钥
        'priKey' => "",//平台私钥
        'pubKey' => "",//平台公钥
        'identification' => "",//平台唯一用户识别号
        'test' => true //是否测试环境
];
$app = Factory::nftProgram($config);

$app->wallet->getVerifyCode('平台管理员身份证号',1,1);//获取手机验证码
$app->wallet->getUserInfo('平台管理员身份证号','验证码',1);//获取平台唯一标识,填入$config参数identification
$app->wallet->getVerifyCode('平台管理员身份证号',1,2);//获取邮件验证码
$app->auth->deriveKeyPair();//生成公私钥对 填入$config参数pubKey和priKey
$app->wallet->bindPlatformSelf('邮箱验证码');//平台自身绑定
$app->wallet->queryBindInfo('上一步返回的地址');//检查是否绑定成功