Пример #1
0
 it('should bind an identity and make it available for a ping request', async function () {
     const identityName = uuid.v4();
     const cardName = `${identityName}@systest-identities`;
     const { certificate, privateKey } = getNextIdentity();
     await client.bindIdentity(participant, certificate);
     const card = new IdCard({ businessNetwork: 'systest-identities', userName: identityName }, TestUtil.getCurrentConnectionProfile());
     card.setCredentials({ certificate, privateKey });
     const admin = new AdminConnection({ cardStore });
     await admin.importCard(cardName, card);
     client = new BusinessNetworkConnection({ cardStore });
     await client.connect(cardName);
     const result = await client.ping();
     result.participant.should.equal(participant.getFullyQualifiedIdentifier());
 });