저는 Node.js 응용 프로그램과 'composer-client'npm 모듈을 사용하여 개념 증명을하고 있습니다.Hyperledger Composer가 신분증을 발행했지만 명함이 누락되었습니다.
저는 참가자 추가, 자산 추가 및 트랜잭션 수행과 같은 다른 명령을 시도했지만 모든 것이 올바르게 작동하는 것 같습니다.
그러나 새로운 신원을 발급하려고 할 때 예상 한 결과를 얻지 못합니다. 나는 다음과 같은 코드로 내 Node.js를 응용 프로그램을 실행합니다
var businessNetwork = new BusinessNetworkConnection();
return businessNetwork.connect('[email protected]')
.then(() => {
return businessNetwork.issueIdentity('org.acme.biznet.Trader#Trader_001', 'usr001')
})
.then((result) => {
console.log(`userID = ${result.userID}`);
console.log(`userSecret = ${result.userSecret}`);
})
.catch((error) => {
console.error(error);
});
은 다음, 사용자 ID와 UserSecret가 콘솔 로그에 표시됩니다. 그 후, 나는 비즈니스 네트워크 핑을 수행하려고 :
var businessNetwork = new BusinessNetworkConnection();
return businessNetwork.connect('[email protected]')
.then(() => {
return businessNetwork.ping();
})
.then((result) => {
console.log(`participant = ${result.participant ? result.participant : '<no participant found>'}`);
})
.catch((error) => {
console.error(error);
});
는 그러나, 나는 다음과 같은 오류 메시지가 얻을 : 나는 명령 composer identity list -c [email protected]
을 실행하면
{ Error: Card not found: [email protected]
at IdCard.fromDirectory.catch.cause (/home/user.name/git_repositories/nodejs/first.blockchain.test/node_modules/composer-common/lib/cardstore/filesystemcardstore.js:73:27)
at <anonymous>
cause:
{ Error: Unable to read card directory: /home/user.name/.composer/cards/[email protected]
을, 나는 다음과 같은 출력을 얻을 :
$class: org.hyperledger.composer.system.Identity
identityId: 9b49f67c262c0ae23e1e0c4a8dc61c4a12b5119df2b6a49fa2e02fa56b8818c3
name: usr001
issuer: 27c582d674ddf0f230854814b7cfd04553f3d0eac55e37d915386c614a5a1de9
certificate:
state: ISSUED
participant: resource:org.acme.biznet.Trader#Trader_001
하지만 명함을 찾을 수 없습니다.
file.card를 발급 한 후 Wallet으로 가져 왔습니까? 그렇다면 node.js 코드에서 파일을 저장할 때 그 파일을 어디에 저장합니까? 나는 그것을 발견 할 수 없다. – HernandezRamiro