public class DidClient
extends java.lang.Object
构造器和说明 |
---|
DidClient() |
DidClient(java.lang.String host) |
DidClient(java.lang.String host,
java.lang.Boolean keepAlive) |
DidClient(java.lang.String host,
int readTimeOut,
int connectTimeOut) |
DidClient(java.lang.String host,
int readTimeOut,
int connectTimeOut,
java.lang.Boolean keepAlive) |
public DidClient()
public DidClient(java.lang.String host)
public DidClient(java.lang.String host, java.lang.Boolean keepAlive)
public DidClient(java.lang.String host, int readTimeOut, int connectTimeOut)
public DidClient(java.lang.String host, int readTimeOut, int connectTimeOut, java.lang.Boolean keepAlive)
public java.lang.String getHost()
public void setHost(java.lang.String host)
public int getReadTimeOut()
public void setReadTimeOut(int readTimeOut)
public int getConnectTimeOut()
public void setConnectTimeOut(int connectTimeOut)
public Response<AccessToken> login(java.lang.String phoneNumber, java.lang.String password) throws ChainWeaverException
phoneNumber
- 用户手机号password
- 用户密码AccessToken
dataChainWeaverException
- 访问异常public Response<DidHealth> health() throws ChainWeaverException
DidHealth
包含版本号和系统名称ChainWeaverException
- 访问异常public Response<Cipher> msgEncrypt(Plaintext plaintext) throws ChainWeaverException
plaintext
- Plaintext.Plaintext(String plaintext, String verificationMethod)
Cipher
加密签名ChainWeaverException
- 访问异常public Response<Plaintext> msgDecrypt(Cipher cipher) throws ChainWeaverException
cipher
- Cipher.Cipher(String ciphertext)
ciphertext 密文值
Plaintext
返回原文ChainWeaverException
- 访问异常public Response<java.lang.Boolean> msgVerify(Plaintext plaintext) throws ChainWeaverException
plaintext
- Plaintext
签名对象ChainWeaverException
- 访问异常public Response<Plaintext> msgSign(Plaintext plaintext) throws ChainWeaverException
plaintext
- Plaintext.Plaintext(String plaintext, String verificationMethod)
ChainWeaverException
- 访问异常public Response<java.lang.Boolean> vpVerify(VerifiablePresentation vp) throws ChainWeaverException
vp
- VerifiablePresentation
ChainWeaverException
- 访问异常public Response<java.lang.Boolean> vpVerify(java.lang.String vp) throws ChainWeaverException
vp
- vp格式的字符串ChainWeaverException
- 访问异常public <T> Response<VerifiablePresentation<T>> vpSign(VerifiablePresentation vp, java.lang.Class<T> tClass) throws ChainWeaverException
vp
- VerifiablePresentation(List context, String id, List verifiableCredential, String presentationUsage, String expirationDate, String verifier, List proof)
Proof.Proof(String type, String created, String proofPurpose, String verificationMethod)
ChainWeaverException
- 访问异常public Response<Document> documentGet(java.lang.String did) throws ChainWeaverException
did
- did名称ChainWeaverException
- 访问异常public Response<VerifiableCredential> vcIssue(IssueVc issueVc) throws ChainWeaverException
issueVc
- IssueVc.IssueVc(String templateId, Object credentialSubject, String holder, String verificationMethod)
对象ChainWeaverException
- 访问异常public Response<java.lang.Boolean> vcRevoke(java.lang.String id) throws ChainWeaverException
id
- 凭证idChainWeaverException
- 访问异常public Response<RespPage<VerifiableCredential>> vcListIssued(Holder holder) throws ChainWeaverException
holder
- Holder.Holder(String, Integer, Integer)
持有人对象, 页数, 条数ChainWeaverException
- 访问异常public Response<RespPage<VerifiableCredential>> vcListRevoked(Holder holder) throws ChainWeaverException
holder
- Holder.Holder(String, Integer, Integer)
持有人对象, 页数, 条数ChainWeaverException
- 访问异常public Response<RespPage<VerifiableCredential>> vcList(VerifiablePresentation vp) throws ChainWeaverException
vp
- VerifiablePresentation.VerifiablePresentation(List verifiableCredential, List proof)
Page
Proof.Proof(String type, String created, String proofPurpose, String verificationMethod)
ChainWeaverException
- 访问异常public Response<VcInfo> vcGet(java.lang.String vcId) throws ChainWeaverException
vcId
- vcIdChainWeaverException
- 访问异常public Response<java.lang.Boolean> vcListLatest(java.lang.String issuer, java.lang.Integer limit) throws ChainWeaverException
issuer
- 持证人limit
- 限制条数ChainWeaverException
- 访问异常public Response<RespPage<VerifiableCredential>> vcListLocal(VcListVo vo) throws ChainWeaverException
vo
- VcListVo
发证人和vcIdChainWeaverException
- 访问异常public Response<VctId> vctemplateCreate(VCTExtend vctExtend) throws ChainWeaverException
vctExtend
- VCTExtend.VCTExtend(Map properties, List required, String name, String versions, Boolean additionalProperties, String verificationMethod)
Property.Property(String type, String title, String reg, String desc)
ChainWeaverException
- 访问异常public Response<RespPage<VcTInfo>> vctemplateList(VcTemplateListVo vcTemplateListVo) throws ChainWeaverException
vcTemplateListVo
- VcTemplateListVo.VcTemplateListVo(Integer page, Integer size, String id, String name, String version)
ChainWeaverException
- 访问异常public Response<VerifiablePresentation<LoginExtend>> vpCreateApplyLogin(VerifiablePresentation<LoginExtend> vp) throws ChainWeaverException
vp
- VerifiablePresentation.vpCreateApplyLogin(List proof)
ApplyBusinessLicenseExtend.ApplyBusinessLicenseExtend(List issuer, String callbackUrl)
Proof.Proof(String type, String created, String proofPurpose, String verificationMethod)
ChainWeaverException
- 访问异常public Response<VerifiablePresentation<ApplyBusinessLicenseExtend>> vpCreateApplyBusinessLicense(VerifiablePresentation<ApplyBusinessLicenseExtend> vp) throws ChainWeaverException
vp
- VerifiablePresentation.vpCreateApplyBusinessLicense(List proof)
ApplyBusinessLicenseExtend.ApplyBusinessLicenseExtend(List issuer, String callbackUrl)
Proof.Proof(String type, String created, String proofPurpose, String verificationMethod)
ChainWeaverException
- 访问异常