gxchain/baas-sdk-php

使用 PHP 实现的 gxchain baas sdk。

v1.0.1 2018-08-07 02:04 UTC

This package is auto-updated.

Last update: 2024-09-22 14:40:55 UTC


README

简介

这是一个 PHP 库。如果您只是喜欢 BaaS 服务,您可以前往 BaaS API

存储使用情况

composer require "gxchain/baas-sdk-php"


use GXChain\BaaS\BaaSClient;

$config = [
    'url'  => [
        'fee'   => 'https://baas-developer.gxchain.cn/api/storage/provider/',
        'store' => 'https://baas-developer.gxchain.cn/api/storage/store/',
        'get'   => 'https://baas-developer.gxchain.cn/api/storage/data/',
    ],
    'base' => [
        'from'         => '1.2.XXX',
        'to'           => '1.2.241',
        'proxyAccount' => '1.2.241',
        'percent'      => 0,
        'assetId'      => '1.3.1',
        'privateKey'   => 'XXX',
    ],

];
$obj = new BaaSClient($config);

//store
$res = $obj->store('hello gxs php ssdk v1.0.1');
echo $res;

//storeGet
// $cid = 'Qmb3eECKK9rAJbG7BpFgGxeSFDH9nkie6XugxJJUqVQUUK';
// $res = $obj->storeGet($cid);
// echo $res;