通过 gRPC-web 与后端服务交互,并使用 Authenticate 类进行身份验证和签名验证。
构造函数
包含代理地址和区块地址信息的配置选项
const providerOption = { proxy: 'http://proxy.example.com', blockAddress: { identifier: 'example-did', privateKey: 'example-private-key' } }const bulletinProvider = new BulletinProvider(providerOption) Copy
const providerOption = { proxy: 'http://proxy.example.com', blockAddress: { identifier: 'example-did', privateKey: 'example-private-key' } }const bulletinProvider = new BulletinProvider(providerOption)
查询公告列表
公告的语言代码(LanguageCodeEnum)
当前页码
每页显示的条目数
返回查询到的公告列表响应体
bulletinProvider.list(LanguageCodeEnum.LANGUAGE_CODE_ZH, 1, 10) .then(response => console.log(response)) .catch(err => console.error(err)) Copy
bulletinProvider.list(LanguageCodeEnum.LANGUAGE_CODE_ZH, 1, 10) .then(response => console.log(response)) .catch(err => console.error(err))
通过 gRPC-web 与后端服务交互,并使用 Authenticate 类进行身份验证和签名验证。