本文整理汇总了TypeScript中fabric-client.Channel.sendTransaction方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Channel.sendTransaction方法的具体用法?TypeScript Channel.sendTransaction怎么用?TypeScript Channel.sendTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fabric-client.Channel
的用法示例。
在下文中一共展示了Channel.sendTransaction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Error
}).then((results: ProposalResponseObject) => {
var proposalResponses = results[0];
var proposal = results[1];
if (proposalResponses && proposalResponses[0].response && proposalResponses[0].response.status === 200) {
t.pass('Successfully sent Proposal and received ProposalResponse');
var request: TransactionRequest = {
proposalResponses: proposalResponses,
proposal: proposal,
txId: instansiate_tx_id //required to indicate that this is an admin transaction
//orderer : not specifying, the first orderer defined in the
// connection profile for this channel will be used
};
return channel.sendTransaction(request); // still have org2 admin as signer
} else {
t.fail('Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...');
throw new Error('Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...');
}
}).then((response: BroadcastResponse) => {