当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Channel.sendTransaction方法代码示例

本文整理汇总了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) => {
开发者ID:asararatnakar,项目名称:fabric-sdk-node-v11-v12-compatibility,代码行数:19,代码来源:test.ts


注:本文中的fabric-client.Channel.sendTransaction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。