本文整理汇总了TypeScript中helpers/entities.dataDisclosedProofCreateWithRequest函数的典型用法代码示例。如果您正苦于以下问题:TypeScript dataDisclosedProofCreateWithRequest函数的具体用法?TypeScript dataDisclosedProofCreateWithRequest怎么用?TypeScript dataDisclosedProofCreateWithRequest使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dataDisclosedProofCreateWithRequest函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('success', async () => {
const data = await dataDisclosedProofCreateWithRequest()
const disclosedProof = await disclosedProofCreateWithRequest(data)
const { attrs } = await disclosedProof.getCredentials()
const valSelfAttested = 'testSelfAttestedVal'
await disclosedProof.generateProof({
selectedCreds: {},
selfAttestedAttrs: mapValues(attrs, () => valSelfAttested)
})
await disclosedProof.sendProof(data.connection)
})
示例2: async
it.skip('throws: missing connection', async () => {
const { request, sourceId } = await dataDisclosedProofCreateWithRequest()
const error = await shouldThrow(() => DisclosedProof.create({ request, sourceId } as any))
assert.equal(error.vcxCode, VCXCode.INVALID_OPTION)
})