Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

存证服务API接口开发 #77

Open
4 tasks
bjwswang opened this issue Apr 10, 2023 · 6 comments
Open
4 tasks

存证服务API接口开发 #77

bjwswang opened this issue Apr 10, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request medium Medium priority
Milestone

Comments

@bjwswang
Copy link
Member

  • 上传存证文件(Minio)
  • 创建存证
  • 获取存证列表
  • 查看/验证存证
@bjwswang bjwswang added enhancement New feature or request medium Medium priority labels Apr 10, 2023
@bjwswang bjwswang added this to the v0.2.1 milestone Apr 10, 2023
@bjwswang bjwswang added low Low Priority medium Medium priority and removed medium Medium priority low Low Priority labels Apr 11, 2023
@bjwswang
Copy link
Member Author

bjwswang commented Apr 19, 2023

@dayuy 后端这块儿提供了几个API,其中

  1. 创建存证
    https://github.com/bestchains/bc-saas/blob/main/doc/depository_api.md#post-depositorybasicputvalue

  2. 查看存证
    https://github.com/bestchains/bc-saas/blob/main/doc/depository_api.md#get-depositorybasicgetvalue

  3. 验证存证
    待补充

其中,创建存证的时候仍然需要前端这块儿封装一下message ,稍后加个例子
bestchains/bc-saas#1

@bjwswang
Copy link
Member Author

@dayuy 前端只需要补充下 上传存证文件 API即可

dayuy added a commit to dayuy/bc-apis that referenced this issue Jun 7, 2023
Carrotzpc pushed a commit that referenced this issue Jun 8, 2023
dayuy added a commit to dayuy/bc-apis that referenced this issue Jun 8, 2023
@dayuy
Copy link
Contributor

dayuy commented Jun 8, 2023

@dayuy 前端只需要补充下 上传存证文件 API即可

API:

POST  /minio/upload
-H  Content-Type: multipart/form-data
-b  {file:File, bucket: 'depository'}

image

@dayuy
Copy link
Contributor

dayuy commented Jun 9, 2023

新增存证

curl -k -XPOST -H'Content-Type: application/json' https://bc-saas.172.22.96.209.nip.io/basic/putUntrustValue -d '{"value":xxxx}'

  1. value的值为base64编码后的字符串:
{
   contentType: 'file',  // 存证类型
   contentID: 'd323ff3692f750ad74b1c0714ce4928fca948c64fc5053e92828192aae90289c.yaml', // 存证文件上传后会返回个id
   name: name, // 存证名称
}

获取用户Nonce

curl -k https://bc-saas.172.22.96.209.nip.io/basic/currentNonce?account=xxx
其中account暂时先用这个值:0xe5f692811cfcecb628c58abad1c527d07724f471

@dayuy
Copy link
Contributor

dayuy commented Jun 9, 2023

存证管理

  1. 存证详情:

    curl -k https://bc-saas.172.22.96.209.nip.io/basic/depositories/:kid

  2. 下载证书 (暂时不写,页面上的需求是下载license证书,不是下面的存证文件)

    Get /bc-apis/minio/download?bucket=depository&object=xxxx
    bucket 为 ‘depository’
    object 为存证详情中的 contentID

image

@dayuy
Copy link
Contributor

dayuy commented Jun 26, 2023

  1. 根据存证kid获取存证证书
    curl -k https://bc-saas.172.22.96.209.nip.io/basic/depositories/certificate/18b682430b2ee5cdcb17c0ea678a52223056d256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants