Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 208.45 KB | None | 0 0
  1. 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] checking config
  2. 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] checking payload
  3. 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] create
  4. 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] ensureConnected
  5. 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] connected
  6. 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] creating transaction
  7. 10 Jul 11:18:39 - [info] [hyperledger-composer-in:Listen for events] received event
  8. 10 Jul 11:18:39 - [info] [debug:813bd358.b09738]
  9. ValidatedResource {
  10. '$modelManager':
  11. ModelManager {
  12. modelFiles:
  13. { 'org.hyperledger.composer.system':
  14. ModelFile {
  15. modelManager: [Circular],
  16. declarations:
  17. [ AssetDeclaration {
  18. ast:
  19. { type: 'AssetDeclaration',
  20. id: { type: 'Identifier', name: 'Asset' },
  21. classExtension: null,
  22. idField: null,
  23. body:
  24. { type: 'ClassDeclarationBody',
  25. declarations: [],
  26. location:
  27. { start: { offset: 76, line: 4, column: 29 },
  28. end: { offset: 76, line: 4, column: 29 } } },
  29. abstract: [ 'abstract', undefined ],
  30. location:
  31. { start: { offset: 52, line: 4, column: 5 },
  32. end: { offset: 77, line: 4, column: 30 } } }
  33.  
  34.  
  35. ****OVER 500kb of text omitted****
  36.  
  37.  
  38. definitions: '/**\n * Sample business network definition.\n */\nnamespace org.acme.sample\n\nasset SampleAsset identified by assetId {\n o String assetId\n --> SampleParticipant owner\n o String value\n}\n\nparticipant SampleParticipant identified by participantId {\n o String participantId\n o String firstName\n o String lastName\n}\n\ntransaction SampleTransaction {\n --> SampleAsset asset\n o String newValue\n}\n\nevent SampleEvent {\n --> SampleAsset asset\n o String oldValue\n o String newValue\n}\n',
  39. ast:
  40. { type: 'Program',
  41. namespace: 'org.acme.sample',
  42. imports:
  43. [ 'org.hyperledger.composer.system.Event',
  44. 'org.hyperledger.composer.system.Transaction',
  45. 'org.hyperledger.composer.system.Participant',
  46. 'org.hyperledger.composer.system.Asset' ],
  47. body:
  48. [ { type: 'AssetDeclaration',
  49. id: { type: 'Identifier', name: 'SampleAsset' },
  50. classExtension: null,
  51. idField: { type: 'Identifier', name: 'assetId' },
  52. body:
  53. { type: 'ClassDeclarationBody',
  54. declarations:
  55. [ { type: 'FieldDeclaration',
  56. id: { type: 'Identifier', name: 'assetId' },
  57. propertyType: { name: 'String' },
  58. array: null,
  59. regex: null,
  60. default: null,
  61. optional: null,
  62. location: { start: [Object], end: [Object] } },
  63. { type: 'RelationshipDeclaration',
  64. id: { type: 'Identifier', name: 'owner' },
  65. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  66. array: null,
  67. optional: null,
  68. location: { start: [Object], end: [Object] } },
  69. { type: 'FieldDeclaration',
  70. id: { type: 'Identifier', name: 'value' },
  71. propertyType: { name: 'String' },
  72. array: null,
  73. regex: null,
  74. default: null,
  75. optional: null,
  76. location: { start: [Object], end: [Object] } } ],
  77. location:
  78. { start: { offset: 118, line: 7, column: 3 },
  79. end: { offset: 182, line: 10, column: 1 } } },
  80. abstract: null,
  81. location:
  82. { start: { offset: 74, line: 6, column: 1 },
  83. end: { offset: 183, line: 10, column: 2 } } },
  84. { type: 'ParticipantDeclaration',
  85. id: { type: 'Identifier', name: 'SampleParticipant' },
  86. classExtension: null,
  87. idField: { type: 'Identifier', name: 'participantId' },
  88. body:
  89. { type: 'ClassDeclarationBody',
  90. declarations:
  91. [ { type: 'FieldDeclaration',
  92. id: { type: 'Identifier', name: 'participantId' },
  93. propertyType: { name: 'String' },
  94. array: null,
  95. regex: null,
  96. default: null,
  97. optional: null,
  98. location: { start: [Object], end: [Object] } },
  99. { type: 'FieldDeclaration',
  100. id: { type: 'Identifier', name: 'firstName' },
  101. propertyType: { name: 'String' },
  102. array: null,
  103. regex: null,
  104. default: null,
  105. optional: null,
  106. location: { start: [Object], end: [Object] } },
  107. { type: 'FieldDeclaration',
  108. id: { type: 'Identifier', name: 'lastName' },
  109. propertyType: { name: 'String' },
  110. array: null,
  111. regex: null,
  112. default: null,
  113. optional: null,
  114. location: { start: [Object], end: [Object] } } ],
  115. location:
  116. { start: { offset: 247, line: 13, column: 3 },
  117. end: { offset: 311, line: 16, column: 1 } } },
  118. abstract: null,
  119. location:
  120. { start: { offset: 185, line: 12, column: 1 },
  121. end: { offset: 312, line: 16, column: 2 } } },
  122. { type: 'TransactionDeclaration',
  123. id: { type: 'Identifier', name: 'SampleTransaction' },
  124. classExtension: null,
  125. body:
  126. { type: 'ClassDeclarationBody',
  127. declarations:
  128. [ { type: 'RelationshipDeclaration',
  129. id: { type: 'Identifier', name: 'asset' },
  130. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  131. array: null,
  132. optional: null,
  133. location: { start: [Object], end: [Object] } },
  134. { type: 'FieldDeclaration',
  135. id: { type: 'Identifier', name: 'newValue' },
  136. propertyType: { name: 'String' },
  137. array: null,
  138. regex: null,
  139. default: null,
  140. optional: null,
  141. location: { start: [Object], end: [Object] } } ],
  142. location:
  143. { start: { offset: 348, line: 19, column: 3 },
  144. end: { offset: 390, line: 21, column: 1 } } },
  145. idField: null,
  146. abstract: null,
  147. location:
  148. { start: { offset: 314, line: 18, column: 1 },
  149. end: { offset: 391, line: 21, column: 2 } } },
  150. { type: 'EventDeclaration',
  151. id: { type: 'Identifier', name: 'SampleEvent' },
  152. classExtension: null,
  153. body:
  154. { type: 'ClassDeclarationBody',
  155. declarations:
  156. [ { type: 'RelationshipDeclaration',
  157. id: { type: 'Identifier', name: 'asset' },
  158. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  159. array: null,
  160. optional: null,
  161. location: { start: [Object], end: [Object] } },
  162. { type: 'FieldDeclaration',
  163. id: { type: 'Identifier', name: 'oldValue' },
  164. propertyType: { name: 'String' },
  165. array: null,
  166. regex: null,
  167. default: null,
  168. optional: null,
  169. location: { start: [Object], end: [Object] } },
  170. { type: 'FieldDeclaration',
  171. id: { type: 'Identifier', name: 'newValue' },
  172. propertyType: { name: 'String' },
  173. array: null,
  174. regex: null,
  175. default: null,
  176. optional: null,
  177. location: { start: [Object], end: [Object] } } ],
  178. location:
  179. { start: { offset: 415, line: 24, column: 3 },
  180. end: { offset: 477, line: 27, column: 1 } } },
  181. idField: null,
  182. abstract: null,
  183. location:
  184. { start: { offset: 393, line: 23, column: 1 },
  185. end: { offset: 478, line: 27, column: 2 } } } ] },
  186. namespace: 'org.acme.sample' } } },
  187. '$namespace': 'org.acme.sample',
  188. '$type': 'SampleEvent',
  189. '$identifier': 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
  190. '$validator': ResourceValidator {},
  191. eventId: 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
  192. timestamp: 2017-07-10T15:18:37.627Z,
  193. asset:
  194. Relationship {
  195. '$modelManager':
  196. ModelManager {
  197. modelFiles:
  198. { 'org.hyperledger.composer.system':
  199. ModelFile {
  200. modelManager: [Circular],
  201. declarations:
  202. [ AssetDeclaration {
  203. ast:
  204. { type: 'AssetDeclaration',
  205. id: { type: 'Identifier', name: 'Asset' },
  206. classExtension: null,
  207. idField: null,
  208. body:
  209. { type: 'ClassDeclarationBody',
  210. declarations: [],
  211. location:
  212. { start: { offset: 76, line: 4, column: 29 },
  213. end: { offset: 76, line: 4, column: 29 } } },
  214. abstract: [ 'abstract', undefined ],
  215. location:
  216. { start: { offset: 52, line: 4, column: 5 },
  217. end: { offset: 77, line: 4, column: 30 } } },
  218. modelFile: [Circular],
  219. name: 'Asset',
  220. properties: [],
  221. superType: null,
  222. idField: null,
  223. abstract: true },
  224. ParticipantDeclaration {
  225. ast:
  226. { type: 'ParticipantDeclaration',
  227. id: { type: 'Identifier', name: 'Participant' },
  228. classExtension: null,
  229. idField: null,
  230. body:
  231. { type: 'ClassDeclarationBody',
  232. declarations: [],
  233. location:
  234. { start: { offset: 120, line: 6, column: 42 },
  235. end: { offset: 120, line: 6, column: 42 } } },
  236. abstract: [ 'abstract', undefined ],
  237. location:
  238. { start: { offset: 83, line: 6, column: 5 },
  239. end: { offset: 121, line: 6, column: 43 } } },
  240. modelFile: [Circular],
  241. name: 'Participant',
  242. properties: [],
  243. superType: null,
  244. idField: null,
  245. abstract: true },
  246. TransactionDeclaration {
  247. ast:
  248. { type: 'TransactionDeclaration',
  249. id: { type: 'Identifier', name: 'Transaction' },
  250. classExtension: null,
  251. body:
  252. { type: 'ClassDeclarationBody',
  253. declarations:
  254. [ { type: 'FieldDeclaration',
  255. id: [Object],
  256. propertyType: [Object],
  257. array: null,
  258. regex: null,
  259. default: null,
  260. optional: null,
  261. location: [Object] },
  262. { type: 'FieldDeclaration',
  263. id: [Object],
  264. propertyType: [Object],
  265. array: null,
  266. default: null,
  267. optional: null,
  268. location: [Object] } ],
  269. location:
  270. { start: { offset: 195, line: 9, column: 7 },
  271. end: { offset: 249, line: 11, column: 5 } } },
  272. idField: { type: 'Identifier', name: 'transactionId' },
  273. abstract: [ 'abstract', undefined ],
  274. location:
  275. { start: { offset: 127, line: 8, column: 5 },
  276. end: { offset: 250, line: 11, column: 6 } } },
  277. modelFile: [Circular],
  278. name: 'Transaction',
  279. properties:
  280. [ Field {
  281. ast:
  282. { type: 'FieldDeclaration',
  283. id: { type: 'Identifier', name: 'transactionId' },
  284. propertyType: { name: 'String' },
  285. array: null,
  286. regex: null,
  287. default: null,
  288. optional: null,
  289. location: { start: [Object], end: [Object] } },
  290. parent: [Circular],
  291. name: 'transactionId',
  292. type: 'String',
  293. array: false,
  294. optional: false,
  295. validator: null,
  296. defaultValue: null },
  297. Field {
  298. ast:
  299. { type: 'FieldDeclaration',
  300. id: { type: 'Identifier', name: 'timestamp' },
  301. propertyType: { name: 'DateTime' },
  302. array: null,
  303. default: null,
  304. optional: null,
  305. location: { start: [Object], end: [Object] } },
  306. parent: [Circular],
  307. name: 'timestamp',
  308. type: 'DateTime',
  309. array: false,
  310. optional: false,
  311. validator: null,
  312. defaultValue: null } ],
  313. superType: null,
  314. idField: 'transactionId',
  315. abstract: true },
  316. EventDeclaration {
  317. ast:
  318. { type: 'EventDeclaration',
  319. id: { type: 'Identifier', name: 'Event' },
  320. classExtension: null,
  321. body:
  322. { type: 'ClassDeclarationBody',
  323. declarations:
  324. [ { type: 'FieldDeclaration',
  325. id: [Object],
  326. propertyType: [Object],
  327. array: null,
  328. regex: null,
  329. default: null,
  330. optional: null,
  331. location: [Object] },
  332. { type: 'FieldDeclaration',
  333. id: [Object],
  334. propertyType: [Object],
  335. array: null,
  336. default: null,
  337. optional: null,
  338. location: [Object] } ],
  339. location:
  340. { start: { offset: 306, line: 14, column: 7 },
  341. end: { offset: 354, line: 16, column: 5 } } },
  342. idField: { type: 'Identifier', name: 'eventId' },
  343. abstract: [ 'abstract', undefined ],
  344. location:
  345. { start: { offset: 256, line: 13, column: 5 },
  346. end: { offset: 355, line: 16, column: 6 } } },
  347. modelFile: [Circular],
  348. name: 'Event',
  349. properties:
  350. [ Field {
  351. ast:
  352. { type: 'FieldDeclaration',
  353. id: { type: 'Identifier', name: 'eventId' },
  354. propertyType: { name: 'String' },
  355. array: null,
  356. regex: null,
  357. default: null,
  358. optional: null,
  359. location: { start: [Object], end: [Object] } },
  360. parent: [Circular],
  361. name: 'eventId',
  362. type: 'String',
  363. array: false,
  364. optional: false,
  365. validator: null,
  366. defaultValue: null },
  367. Field {
  368. ast:
  369. { type: 'FieldDeclaration',
  370. id: { type: 'Identifier', name: 'timestamp' },
  371. propertyType: { name: 'DateTime' },
  372. array: null,
  373. default: null,
  374. optional: null,
  375. location: { start: [Object], end: [Object] } },
  376. parent: [Circular],
  377. name: 'timestamp',
  378. type: 'DateTime',
  379. array: false,
  380. optional: false,
  381. validator: null,
  382. defaultValue: null } ],
  383. superType: null,
  384. idField: 'eventId',
  385. abstract: true } ],
  386. imports: [],
  387. fileName: undefined,
  388. definitions: '\n namespace org.hyperledger.composer.system\n\n abstract asset Asset { }\n\n abstract participant Participant { }\n\n abstract transaction Transaction identified by transactionId{\n o String transactionId\n o DateTime timestamp\n }\n\n abstract event Event identified by eventId{\n o String eventId\n o DateTime timestamp\n }\n',
  389. ast:
  390. { type: 'Program',
  391. namespace: 'org.hyperledger.composer.system',
  392. imports: [],
  393. body:
  394. [ { type: 'AssetDeclaration',
  395. id: { type: 'Identifier', name: 'Asset' },
  396. classExtension: null,
  397. idField: null,
  398. body:
  399. { type: 'ClassDeclarationBody',
  400. declarations: [],
  401. location:
  402. { start: { offset: 76, line: 4, column: 29 },
  403. end: { offset: 76, line: 4, column: 29 } } },
  404. abstract: [ 'abstract', undefined ],
  405. location:
  406. { start: { offset: 52, line: 4, column: 5 },
  407. end: { offset: 77, line: 4, column: 30 } } },
  408. { type: 'ParticipantDeclaration',
  409. id: { type: 'Identifier', name: 'Participant' },
  410. classExtension: null,
  411. idField: null,
  412. body:
  413. { type: 'ClassDeclarationBody',
  414. declarations: [],
  415. location:
  416. { start: { offset: 120, line: 6, column: 42 },
  417. end: { offset: 120, line: 6, column: 42 } } },
  418. abstract: [ 'abstract', undefined ],
  419. location:
  420. { start: { offset: 83, line: 6, column: 5 },
  421. end: { offset: 121, line: 6, column: 43 } } },
  422. { type: 'TransactionDeclaration',
  423. id: { type: 'Identifier', name: 'Transaction' },
  424. classExtension: null,
  425. body:
  426. { type: 'ClassDeclarationBody',
  427. declarations:
  428. [ { type: 'FieldDeclaration',
  429. id: [Object],
  430. propertyType: [Object],
  431. array: null,
  432. regex: null,
  433. default: null,
  434. optional: null,
  435. location: [Object] },
  436. { type: 'FieldDeclaration',
  437. id: [Object],
  438. propertyType: [Object],
  439. array: null,
  440. default: null,
  441. optional: null,
  442. location: [Object] } ],
  443. location:
  444. { start: { offset: 195, line: 9, column: 7 },
  445. end: { offset: 249, line: 11, column: 5 } } },
  446. idField: { type: 'Identifier', name: 'transactionId' },
  447. abstract: [ 'abstract', undefined ],
  448. location:
  449. { start: { offset: 127, line: 8, column: 5 },
  450. end: { offset: 250, line: 11, column: 6 } } },
  451. { type: 'EventDeclaration',
  452. id: { type: 'Identifier', name: 'Event' },
  453. classExtension: null,
  454. body:
  455. { type: 'ClassDeclarationBody',
  456. declarations:
  457. [ { type: 'FieldDeclaration',
  458. id: [Object],
  459. propertyType: [Object],
  460. array: null,
  461. regex: null,
  462. default: null,
  463. optional: null,
  464. location: [Object] },
  465. { type: 'FieldDeclaration',
  466. id: [Object],
  467. propertyType: [Object],
  468. array: null,
  469. default: null,
  470. optional: null,
  471. location: [Object] } ],
  472. location:
  473. { start: { offset: 306, line: 14, column: 7 },
  474. end: { offset: 354, line: 16, column: 5 } } },
  475. idField: { type: 'Identifier', name: 'eventId' },
  476. abstract: [ 'abstract', undefined ],
  477. location:
  478. { start: { offset: 256, line: 13, column: 5 },
  479. end: { offset: 355, line: 16, column: 6 } } } ] },
  480. namespace: 'org.hyperledger.composer.system' },
  481. 'org.acme.sample':
  482. ModelFile {
  483. modelManager: [Circular],
  484. declarations:
  485. [ AssetDeclaration {
  486. ast:
  487. { type: 'AssetDeclaration',
  488. id: { type: 'Identifier', name: 'SampleAsset' },
  489. classExtension: null,
  490. idField: { type: 'Identifier', name: 'assetId' },
  491. body:
  492. { type: 'ClassDeclarationBody',
  493. declarations:
  494. [ { type: 'FieldDeclaration',
  495. id: [Object],
  496. propertyType: [Object],
  497. array: null,
  498. regex: null,
  499. default: null,
  500. optional: null,
  501. location: [Object] },
  502. { type: 'RelationshipDeclaration',
  503. id: [Object],
  504. propertyType: [Object],
  505. array: null,
  506. optional: null,
  507. location: [Object] },
  508. { type: 'FieldDeclaration',
  509. id: [Object],
  510. propertyType: [Object],
  511. array: null,
  512. regex: null,
  513. default: null,
  514. optional: null,
  515. location: [Object] } ],
  516. location:
  517. { start: { offset: 118, line: 7, column: 3 },
  518. end: { offset: 182, line: 10, column: 1 } } },
  519. abstract: null,
  520. location:
  521. { start: { offset: 74, line: 6, column: 1 },
  522. end: { offset: 183, line: 10, column: 2 } } },
  523. modelFile: [Circular],
  524. name: 'SampleAsset',
  525. properties:
  526. [ Field {
  527. ast:
  528. { type: 'FieldDeclaration',
  529. id: { type: 'Identifier', name: 'assetId' },
  530. propertyType: { name: 'String' },
  531. array: null,
  532. regex: null,
  533. default: null,
  534. optional: null,
  535. location: { start: [Object], end: [Object] } },
  536. parent: [Circular],
  537. name: 'assetId',
  538. type: 'String',
  539. array: false,
  540. optional: false,
  541. validator: null,
  542. defaultValue: null },
  543. RelationshipDeclaration {
  544. ast:
  545. { type: 'RelationshipDeclaration',
  546. id: { type: 'Identifier', name: 'owner' },
  547. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  548. array: null,
  549. optional: null,
  550. location: { start: [Object], end: [Object] } },
  551. parent: [Circular],
  552. name: 'owner',
  553. type: 'SampleParticipant',
  554. array: false,
  555. optional: false },
  556. Field {
  557. ast:
  558. { type: 'FieldDeclaration',
  559. id: { type: 'Identifier', name: 'value' },
  560. propertyType: { name: 'String' },
  561. array: null,
  562. regex: null,
  563. default: null,
  564. optional: null,
  565. location: { start: [Object], end: [Object] } },
  566. parent: [Circular],
  567. name: 'value',
  568. type: 'String',
  569. array: false,
  570. optional: false,
  571. validator: null,
  572. defaultValue: null } ],
  573. superType: 'Asset',
  574. idField: 'assetId',
  575. abstract: false },
  576. ParticipantDeclaration {
  577. ast:
  578. { type: 'ParticipantDeclaration',
  579. id: { type: 'Identifier', name: 'SampleParticipant' },
  580. classExtension: null,
  581. idField: { type: 'Identifier', name: 'participantId' },
  582. body:
  583. { type: 'ClassDeclarationBody',
  584. declarations:
  585. [ { type: 'FieldDeclaration',
  586. id: [Object],
  587. propertyType: [Object],
  588. array: null,
  589. regex: null,
  590. default: null,
  591. optional: null,
  592. location: [Object] },
  593. { type: 'FieldDeclaration',
  594. id: [Object],
  595. propertyType: [Object],
  596. array: null,
  597. regex: null,
  598. default: null,
  599. optional: null,
  600. location: [Object] },
  601. { type: 'FieldDeclaration',
  602. id: [Object],
  603. propertyType: [Object],
  604. array: null,
  605. regex: null,
  606. default: null,
  607. optional: null,
  608. location: [Object] } ],
  609. location:
  610. { start: { offset: 247, line: 13, column: 3 },
  611. end: { offset: 311, line: 16, column: 1 } } },
  612. abstract: null,
  613. location:
  614. { start: { offset: 185, line: 12, column: 1 },
  615. end: { offset: 312, line: 16, column: 2 } } },
  616. modelFile: [Circular],
  617. name: 'SampleParticipant',
  618. properties:
  619. [ Field {
  620. ast:
  621. { type: 'FieldDeclaration',
  622. id: { type: 'Identifier', name: 'participantId' },
  623. propertyType: { name: 'String' },
  624. array: null,
  625. regex: null,
  626. default: null,
  627. optional: null,
  628. location: { start: [Object], end: [Object] } },
  629. parent: [Circular],
  630. name: 'participantId',
  631. type: 'String',
  632. array: false,
  633. optional: false,
  634. validator: null,
  635. defaultValue: null },
  636. Field {
  637. ast:
  638. { type: 'FieldDeclaration',
  639. id: { type: 'Identifier', name: 'firstName' },
  640. propertyType: { name: 'String' },
  641. array: null,
  642. regex: null,
  643. default: null,
  644. optional: null,
  645. location: { start: [Object], end: [Object] } },
  646. parent: [Circular],
  647. name: 'firstName',
  648. type: 'String',
  649. array: false,
  650. optional: false,
  651. validator: null,
  652. defaultValue: null },
  653. Field {
  654. ast:
  655. { type: 'FieldDeclaration',
  656. id: { type: 'Identifier', name: 'lastName' },
  657. propertyType: { name: 'String' },
  658. array: null,
  659. regex: null,
  660. default: null,
  661. optional: null,
  662. location: { start: [Object], end: [Object] } },
  663. parent: [Circular],
  664. name: 'lastName',
  665. type: 'String',
  666. array: false,
  667. optional: false,
  668. validator: null,
  669. defaultValue: null } ],
  670. superType: 'Participant',
  671. idField: 'participantId',
  672. abstract: false },
  673. TransactionDeclaration {
  674. ast:
  675. { type: 'TransactionDeclaration',
  676. id: { type: 'Identifier', name: 'SampleTransaction' },
  677. classExtension: null,
  678. body:
  679. { type: 'ClassDeclarationBody',
  680. declarations:
  681. [ { type: 'RelationshipDeclaration',
  682. id: [Object],
  683. propertyType: [Object],
  684. array: null,
  685. optional: null,
  686. location: [Object] },
  687. { type: 'FieldDeclaration',
  688. id: [Object],
  689. propertyType: [Object],
  690. array: null,
  691. regex: null,
  692. default: null,
  693. optional: null,
  694. location: [Object] } ],
  695. location:
  696. { start: { offset: 348, line: 19, column: 3 },
  697. end: { offset: 390, line: 21, column: 1 } } },
  698. idField: null,
  699. abstract: null,
  700. location:
  701. { start: { offset: 314, line: 18, column: 1 },
  702. end: { offset: 391, line: 21, column: 2 } } },
  703. modelFile: [Circular],
  704. name: 'SampleTransaction',
  705. properties:
  706. [ RelationshipDeclaration {
  707. ast:
  708. { type: 'RelationshipDeclaration',
  709. id: { type: 'Identifier', name: 'asset' },
  710. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  711. array: null,
  712. optional: null,
  713. location: { start: [Object], end: [Object] } },
  714. parent: [Circular],
  715. name: 'asset',
  716. type: 'SampleAsset',
  717. array: false,
  718. optional: false },
  719. Field {
  720. ast:
  721. { type: 'FieldDeclaration',
  722. id: { type: 'Identifier', name: 'newValue' },
  723. propertyType: { name: 'String' },
  724. array: null,
  725. regex: null,
  726. default: null,
  727. optional: null,
  728. location: { start: [Object], end: [Object] } },
  729. parent: [Circular],
  730. name: 'newValue',
  731. type: 'String',
  732. array: false,
  733. optional: false,
  734. validator: null,
  735. defaultValue: null } ],
  736. superType: 'Transaction',
  737. idField: null,
  738. abstract: false },
  739. EventDeclaration {
  740. ast:
  741. { type: 'EventDeclaration',
  742. id: { type: 'Identifier', name: 'SampleEvent' },
  743. classExtension: null,
  744. body:
  745. { type: 'ClassDeclarationBody',
  746. declarations:
  747. [ { type: 'RelationshipDeclaration',
  748. id: [Object],
  749. propertyType: [Object],
  750. array: null,
  751. optional: null,
  752. location: [Object] },
  753. { type: 'FieldDeclaration',
  754. id: [Object],
  755. propertyType: [Object],
  756. array: null,
  757. regex: null,
  758. default: null,
  759. optional: null,
  760. location: [Object] },
  761. { type: 'FieldDeclaration',
  762. id: [Object],
  763. propertyType: [Object],
  764. array: null,
  765. regex: null,
  766. default: null,
  767. optional: null,
  768. location: [Object] } ],
  769. location:
  770. { start: { offset: 415, line: 24, column: 3 },
  771. end: { offset: 477, line: 27, column: 1 } } },
  772. idField: null,
  773. abstract: null,
  774. location:
  775. { start: { offset: 393, line: 23, column: 1 },
  776. end: { offset: 478, line: 27, column: 2 } } },
  777. modelFile: [Circular],
  778. name: 'SampleEvent',
  779. properties:
  780. [ RelationshipDeclaration {
  781. ast:
  782. { type: 'RelationshipDeclaration',
  783. id: { type: 'Identifier', name: 'asset' },
  784. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  785. array: null,
  786. optional: null,
  787. location: { start: [Object], end: [Object] } },
  788. parent: [Circular],
  789. name: 'asset',
  790. type: 'SampleAsset',
  791. array: false,
  792. optional: false },
  793. Field {
  794. ast:
  795. { type: 'FieldDeclaration',
  796. id: { type: 'Identifier', name: 'oldValue' },
  797. propertyType: { name: 'String' },
  798. array: null,
  799. regex: null,
  800. default: null,
  801. optional: null,
  802. location: { start: [Object], end: [Object] } },
  803. parent: [Circular],
  804. name: 'oldValue',
  805. type: 'String',
  806. array: false,
  807. optional: false,
  808. validator: null,
  809. defaultValue: null },
  810. Field {
  811. ast:
  812. { type: 'FieldDeclaration',
  813. id: { type: 'Identifier', name: 'newValue' },
  814. propertyType: { name: 'String' },
  815. array: null,
  816. regex: null,
  817. default: null,
  818. optional: null,
  819. location: { start: [Object], end: [Object] } },
  820. parent: [Circular],
  821. name: 'newValue',
  822. type: 'String',
  823. array: false,
  824. optional: false,
  825. validator: null,
  826. defaultValue: null } ],
  827. superType: 'Event',
  828. idField: null,
  829. abstract: false } ],
  830. imports:
  831. [ 'org.hyperledger.composer.system.Event',
  832. 'org.hyperledger.composer.system.Transaction',
  833. 'org.hyperledger.composer.system.Participant',
  834. 'org.hyperledger.composer.system.Asset' ],
  835. fileName: 'models/sample.cto',
  836. definitions: '/**\n * Sample business network definition.\n */\nnamespace org.acme.sample\n\nasset SampleAsset identified by assetId {\n o String assetId\n --> SampleParticipant owner\n o String value\n}\n\nparticipant SampleParticipant identified by participantId {\n o String participantId\n o String firstName\n o String lastName\n}\n\ntransaction SampleTransaction {\n --> SampleAsset asset\n o String newValue\n}\n\nevent SampleEvent {\n --> SampleAsset asset\n o String oldValue\n o String newValue\n}\n',
  837. ast:
  838. { type: 'Program',
  839. namespace: 'org.acme.sample',
  840. imports:
  841. [ 'org.hyperledger.composer.system.Event',
  842. 'org.hyperledger.composer.system.Transaction',
  843. 'org.hyperledger.composer.system.Participant',
  844. 'org.hyperledger.composer.system.Asset' ],
  845. body:
  846. [ { type: 'AssetDeclaration',
  847. id: { type: 'Identifier', name: 'SampleAsset' },
  848. classExtension: null,
  849. idField: { type: 'Identifier', name: 'assetId' },
  850. body:
  851. { type: 'ClassDeclarationBody',
  852. declarations:
  853. [ { type: 'FieldDeclaration',
  854. id: [Object],
  855. propertyType: [Object],
  856. array: null,
  857. regex: null,
  858. default: null,
  859. optional: null,
  860. location: [Object] },
  861. { type: 'RelationshipDeclaration',
  862. id: [Object],
  863. propertyType: [Object],
  864. array: null,
  865. optional: null,
  866. location: [Object] },
  867. { type: 'FieldDeclaration',
  868. id: [Object],
  869. propertyType: [Object],
  870. array: null,
  871. regex: null,
  872. default: null,
  873. optional: null,
  874. location: [Object] } ],
  875. location:
  876. { start: { offset: 118, line: 7, column: 3 },
  877. end: { offset: 182, line: 10, column: 1 } } },
  878. abstract: null,
  879. location:
  880. { start: { offset: 74, line: 6, column: 1 },
  881. end: { offset: 183, line: 10, column: 2 } } },
  882. { type: 'ParticipantDeclaration',
  883. id: { type: 'Identifier', name: 'SampleParticipant' },
  884. classExtension: null,
  885. idField: { type: 'Identifier', name: 'participantId' },
  886. body:
  887. { type: 'ClassDeclarationBody',
  888. declarations:
  889. [ { type: 'FieldDeclaration',
  890. id: [Object],
  891. propertyType: [Object],
  892. array: null,
  893. regex: null,
  894. default: null,
  895. optional: null,
  896. location: [Object] },
  897. { type: 'FieldDeclaration',
  898. id: [Object],
  899. propertyType: [Object],
  900. array: null,
  901. regex: null,
  902. default: null,
  903. optional: null,
  904. location: [Object] },
  905. { type: 'FieldDeclaration',
  906. id: [Object],
  907. propertyType: [Object],
  908. array: null,
  909. regex: null,
  910. default: null,
  911. optional: null,
  912. location: [Object] } ],
  913. location:
  914. { start: { offset: 247, line: 13, column: 3 },
  915. end: { offset: 311, line: 16, column: 1 } } },
  916. abstract: null,
  917. location:
  918. { start: { offset: 185, line: 12, column: 1 },
  919. end: { offset: 312, line: 16, column: 2 } } },
  920. { type: 'TransactionDeclaration',
  921. id: { type: 'Identifier', name: 'SampleTransaction' },
  922. classExtension: null,
  923. body:
  924. { type: 'ClassDeclarationBody',
  925. declarations:
  926. [ { type: 'RelationshipDeclaration',
  927. id: [Object],
  928. propertyType: [Object],
  929. array: null,
  930. optional: null,
  931. location: [Object] },
  932. { type: 'FieldDeclaration',
  933. id: [Object],
  934. propertyType: [Object],
  935. array: null,
  936. regex: null,
  937. default: null,
  938. optional: null,
  939. location: [Object] } ],
  940. location:
  941. { start: { offset: 348, line: 19, column: 3 },
  942. end: { offset: 390, line: 21, column: 1 } } },
  943. idField: null,
  944. abstract: null,
  945. location:
  946. { start: { offset: 314, line: 18, column: 1 },
  947. end: { offset: 391, line: 21, column: 2 } } },
  948. { type: 'EventDeclaration',
  949. id: { type: 'Identifier', name: 'SampleEvent' },
  950. classExtension: null,
  951. body:
  952. { type: 'ClassDeclarationBody',
  953. declarations:
  954. [ { type: 'RelationshipDeclaration',
  955. id: [Object],
  956. propertyType: [Object],
  957. array: null,
  958. optional: null,
  959. location: [Object] },
  960. { type: 'FieldDeclaration',
  961. id: [Object],
  962. propertyType: [Object],
  963. array: null,
  964. regex: null,
  965. default: null,
  966. optional: null,
  967. location: [Object] },
  968. { type: 'FieldDeclaration',
  969. id: [Object],
  970. propertyType: [Object],
  971. array: null,
  972. regex: null,
  973. default: null,
  974. optional: null,
  975. location: [Object] } ],
  976. location:
  977. { start: { offset: 415, line: 24, column: 3 },
  978. end: { offset: 477, line: 27, column: 1 } } },
  979. idField: null,
  980. abstract: null,
  981. location:
  982. { start: { offset: 393, line: 23, column: 1 },
  983. end: { offset: 478, line: 27, column: 2 } } } ] },
  984. namespace: 'org.acme.sample' } } },
  985. '$namespace': 'org.acme.sample',
  986. '$type': 'SampleAsset',
  987. '$identifier': 'assetId:0001',
  988. '$class': 'Relationship' },
  989. oldValue: '1',
  990. newValue: '1',
  991. _msgid: '43f01964.d914e8' }
  992. 10 Jul 11:18:40 - [info] [hyperledger-composer-in:Listen for events] received event
  993. 10 Jul 11:18:40 - [info] [debug:813bd358.b09738]
  994. ValidatedResource {
  995. '$modelManager':
  996. ModelManager {
  997. modelFiles:
  998. { 'org.hyperledger.composer.system':
  999. ModelFile {
  1000. modelManager: [Circular],
  1001. declarations:
  1002. [ AssetDeclaration {
  1003. ast:
  1004. { type: 'AssetDeclaration',
  1005. id: { type: 'Identifier', name: 'Asset' },
  1006. classExtension: null,
  1007. idField: null,
  1008. body:
  1009. { type: 'ClassDeclarationBody',
  1010. declarations: [],
  1011. location:
  1012. { start: { offset: 76, line: 4, column: 29 },
  1013. end: { offset: 76, line: 4, column: 29 } } },
  1014. abstract: [ 'abstract', undefined ],
  1015. location:
  1016. { start: { offset: 52, line: 4, column: 5 },
  1017. end: { offset: 77, line: 4, column: 30 } } },
  1018. modelFile: [Circular],
  1019. name: 'Asset',
  1020. properties: [],
  1021. superType: null,
  1022. idField: null,
  1023. abstract: true },
  1024. ParticipantDeclaration {
  1025. ast:
  1026. { type: 'ParticipantDeclaration',
  1027. id: { type: 'Identifier', name: 'Participant' },
  1028. classExtension: null,
  1029. idField: null,
  1030. body:
  1031. { type: 'ClassDeclarationBody',
  1032. declarations: [],
  1033. location:
  1034. { start: { offset: 120, line: 6, column: 42 },
  1035. end: { offset: 120, line: 6, column: 42 } } },
  1036. abstract: [ 'abstract', undefined ],
  1037. location:
  1038. { start: { offset: 83, line: 6, column: 5 },
  1039. end: { offset: 121, line: 6, column: 43 } } },
  1040. modelFile: [Circular],
  1041. name: 'Participant',
  1042. properties: [],
  1043. superType: null,
  1044. idField: null,
  1045. abstract: true },
  1046. TransactionDeclaration {
  1047. ast:
  1048. { type: 'TransactionDeclaration',
  1049. id: { type: 'Identifier', name: 'Transaction' },
  1050. classExtension: null,
  1051. body:
  1052. { type: 'ClassDeclarationBody',
  1053. declarations:
  1054. [ { type: 'FieldDeclaration',
  1055. id: { type: 'Identifier', name: 'transactionId' },
  1056. propertyType: { name: 'String' },
  1057. array: null,
  1058. regex: null,
  1059. default: null,
  1060. optional: null,
  1061. location: { start: [Object], end: [Object] } },
  1062. { type: 'FieldDeclaration',
  1063. id: { type: 'Identifier', name: 'timestamp' },
  1064. propertyType: { name: 'DateTime' },
  1065. array: null,
  1066. default: null,
  1067. optional: null,
  1068. location: { start: [Object], end: [Object] } } ],
  1069. location:
  1070. { start: { offset: 195, line: 9, column: 7 },
  1071. end: { offset: 249, line: 11, column: 5 } } },
  1072. idField: { type: 'Identifier', name: 'transactionId' },
  1073. abstract: [ 'abstract', undefined ],
  1074. location:
  1075. { start: { offset: 127, line: 8, column: 5 },
  1076. end: { offset: 250, line: 11, column: 6 } } },
  1077. modelFile: [Circular],
  1078. name: 'Transaction',
  1079. properties:
  1080. [ Field {
  1081. ast:
  1082. { type: 'FieldDeclaration',
  1083. id: { type: 'Identifier', name: 'transactionId' },
  1084. propertyType: { name: 'String' },
  1085. array: null,
  1086. regex: null,
  1087. default: null,
  1088. optional: null,
  1089. location:
  1090. { start: { offset: 195, line: 9, column: 7 },
  1091. end: { offset: 224, line: 10, column: 7 } } },
  1092. parent: [Circular],
  1093. name: 'transactionId',
  1094. type: 'String',
  1095. array: false,
  1096. optional: false,
  1097. validator: null,
  1098. defaultValue: null },
  1099. Field {
  1100. ast:
  1101. { type: 'FieldDeclaration',
  1102. id: { type: 'Identifier', name: 'timestamp' },
  1103. propertyType: { name: 'DateTime' },
  1104. array: null,
  1105. default: null,
  1106. optional: null,
  1107. location:
  1108. { start: { offset: 224, line: 10, column: 7 },
  1109. end: { offset: 249, line: 11, column: 5 } } },
  1110. parent: [Circular],
  1111. name: 'timestamp',
  1112. type: 'DateTime',
  1113. array: false,
  1114. optional: false,
  1115. validator: null,
  1116. defaultValue: null } ],
  1117. superType: null,
  1118. idField: 'transactionId',
  1119. abstract: true },
  1120. EventDeclaration {
  1121. ast:
  1122. { type: 'EventDeclaration',
  1123. id: { type: 'Identifier', name: 'Event' },
  1124. classExtension: null,
  1125. body:
  1126. { type: 'ClassDeclarationBody',
  1127. declarations:
  1128. [ { type: 'FieldDeclaration',
  1129. id: { type: 'Identifier', name: 'eventId' },
  1130. propertyType: { name: 'String' },
  1131. array: null,
  1132. regex: null,
  1133. default: null,
  1134. optional: null,
  1135. location: { start: [Object], end: [Object] } },
  1136. { type: 'FieldDeclaration',
  1137. id: { type: 'Identifier', name: 'timestamp' },
  1138. propertyType: { name: 'DateTime' },
  1139. array: null,
  1140. default: null,
  1141. optional: null,
  1142. location: { start: [Object], end: [Object] } } ],
  1143. location:
  1144. { start: { offset: 306, line: 14, column: 7 },
  1145. end: { offset: 354, line: 16, column: 5 } } },
  1146. idField: { type: 'Identifier', name: 'eventId' },
  1147. abstract: [ 'abstract', undefined ],
  1148. location:
  1149. { start: { offset: 256, line: 13, column: 5 },
  1150. end: { offset: 355, line: 16, column: 6 } } },
  1151. modelFile: [Circular],
  1152. name: 'Event',
  1153. properties:
  1154. [ Field {
  1155. ast:
  1156. { type: 'FieldDeclaration',
  1157. id: { type: 'Identifier', name: 'eventId' },
  1158. propertyType: { name: 'String' },
  1159. array: null,
  1160. regex: null,
  1161. default: null,
  1162. optional: null,
  1163. location:
  1164. { start: { offset: 306, line: 14, column: 7 },
  1165. end: { offset: 329, line: 15, column: 7 } } },
  1166. parent: [Circular],
  1167. name: 'eventId',
  1168. type: 'String',
  1169. array: false,
  1170. optional: false,
  1171. validator: null,
  1172. defaultValue: null },
  1173. Field {
  1174. ast:
  1175. { type: 'FieldDeclaration',
  1176. id: { type: 'Identifier', name: 'timestamp' },
  1177. propertyType: { name: 'DateTime' },
  1178. array: null,
  1179. default: null,
  1180. optional: null,
  1181. location:
  1182. { start: { offset: 329, line: 15, column: 7 },
  1183. end: { offset: 354, line: 16, column: 5 } } },
  1184. parent: [Circular],
  1185. name: 'timestamp',
  1186. type: 'DateTime',
  1187. array: false,
  1188. optional: false,
  1189. validator: null,
  1190. defaultValue: null } ],
  1191. superType: null,
  1192. idField: 'eventId',
  1193. abstract: true } ],
  1194. imports: [],
  1195. fileName: undefined,
  1196. definitions: '\n namespace org.hyperledger.composer.system\n\n abstract asset Asset { }\n\n abstract participant Participant { }\n\n abstract transaction Transaction identified by transactionId{\n o String transactionId\n o DateTime timestamp\n }\n\n abstract event Event identified by eventId{\n o String eventId\n o DateTime timestamp\n }\n',
  1197. ast:
  1198. { type: 'Program',
  1199. namespace: 'org.hyperledger.composer.system',
  1200. imports: [],
  1201. body:
  1202. [ { type: 'AssetDeclaration',
  1203. id: { type: 'Identifier', name: 'Asset' },
  1204. classExtension: null,
  1205. idField: null,
  1206. body:
  1207. { type: 'ClassDeclarationBody',
  1208. declarations: [],
  1209. location:
  1210. { start: { offset: 76, line: 4, column: 29 },
  1211. end: { offset: 76, line: 4, column: 29 } } },
  1212. abstract: [ 'abstract', undefined ],
  1213. location:
  1214. { start: { offset: 52, line: 4, column: 5 },
  1215. end: { offset: 77, line: 4, column: 30 } } },
  1216. { type: 'ParticipantDeclaration',
  1217. id: { type: 'Identifier', name: 'Participant' },
  1218. classExtension: null,
  1219. idField: null,
  1220. body:
  1221. { type: 'ClassDeclarationBody',
  1222. declarations: [],
  1223. location:
  1224. { start: { offset: 120, line: 6, column: 42 },
  1225. end: { offset: 120, line: 6, column: 42 } } },
  1226. abstract: [ 'abstract', undefined ],
  1227. location:
  1228. { start: { offset: 83, line: 6, column: 5 },
  1229. end: { offset: 121, line: 6, column: 43 } } },
  1230. { type: 'TransactionDeclaration',
  1231. id: { type: 'Identifier', name: 'Transaction' },
  1232. classExtension: null,
  1233. body:
  1234. { type: 'ClassDeclarationBody',
  1235. declarations:
  1236. [ { type: 'FieldDeclaration',
  1237. id: { type: 'Identifier', name: 'transactionId' },
  1238. propertyType: { name: 'String' },
  1239. array: null,
  1240. regex: null,
  1241. default: null,
  1242. optional: null,
  1243. location: { start: [Object], end: [Object] } },
  1244. { type: 'FieldDeclaration',
  1245. id: { type: 'Identifier', name: 'timestamp' },
  1246. propertyType: { name: 'DateTime' },
  1247. array: null,
  1248. default: null,
  1249. optional: null,
  1250. location: { start: [Object], end: [Object] } } ],
  1251. location:
  1252. { start: { offset: 195, line: 9, column: 7 },
  1253. end: { offset: 249, line: 11, column: 5 } } },
  1254. idField: { type: 'Identifier', name: 'transactionId' },
  1255. abstract: [ 'abstract', undefined ],
  1256. location:
  1257. { start: { offset: 127, line: 8, column: 5 },
  1258. end: { offset: 250, line: 11, column: 6 } } },
  1259. { type: 'EventDeclaration',
  1260. id: { type: 'Identifier', name: 'Event' },
  1261. classExtension: null,
  1262. body:
  1263. { type: 'ClassDeclarationBody',
  1264. declarations:
  1265. [ { type: 'FieldDeclaration',
  1266. id: { type: 'Identifier', name: 'eventId' },
  1267. propertyType: { name: 'String' },
  1268. array: null,
  1269. regex: null,
  1270. default: null,
  1271. optional: null,
  1272. location: { start: [Object], end: [Object] } },
  1273. { type: 'FieldDeclaration',
  1274. id: { type: 'Identifier', name: 'timestamp' },
  1275. propertyType: { name: 'DateTime' },
  1276. array: null,
  1277. default: null,
  1278. optional: null,
  1279. location: { start: [Object], end: [Object] } } ],
  1280. location:
  1281. { start: { offset: 306, line: 14, column: 7 },
  1282. end: { offset: 354, line: 16, column: 5 } } },
  1283. idField: { type: 'Identifier', name: 'eventId' },
  1284. abstract: [ 'abstract', undefined ],
  1285. location:
  1286. { start: { offset: 256, line: 13, column: 5 },
  1287. end: { offset: 355, line: 16, column: 6 } } } ] },
  1288. namespace: 'org.hyperledger.composer.system' },
  1289. 'org.acme.sample':
  1290. ModelFile {
  1291. modelManager: [Circular],
  1292. declarations:
  1293. [ AssetDeclaration {
  1294. ast:
  1295. { type: 'AssetDeclaration',
  1296. id: { type: 'Identifier', name: 'SampleAsset' },
  1297. classExtension: null,
  1298. idField: { type: 'Identifier', name: 'assetId' },
  1299. body:
  1300. { type: 'ClassDeclarationBody',
  1301. declarations:
  1302. [ { type: 'FieldDeclaration',
  1303. id: { type: 'Identifier', name: 'assetId' },
  1304. propertyType: { name: 'String' },
  1305. array: null,
  1306. regex: null,
  1307. default: null,
  1308. optional: null,
  1309. location: { start: [Object], end: [Object] } },
  1310. { type: 'RelationshipDeclaration',
  1311. id: { type: 'Identifier', name: 'owner' },
  1312. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  1313. array: null,
  1314. optional: null,
  1315. location: { start: [Object], end: [Object] } },
  1316. { type: 'FieldDeclaration',
  1317. id: { type: 'Identifier', name: 'value' },
  1318. propertyType: { name: 'String' },
  1319. array: null,
  1320. regex: null,
  1321. default: null,
  1322. optional: null,
  1323. location: { start: [Object], end: [Object] } } ],
  1324. location:
  1325. { start: { offset: 118, line: 7, column: 3 },
  1326. end: { offset: 182, line: 10, column: 1 } } },
  1327. abstract: null,
  1328. location:
  1329. { start: { offset: 74, line: 6, column: 1 },
  1330. end: { offset: 183, line: 10, column: 2 } } },
  1331. modelFile: [Circular],
  1332. name: 'SampleAsset',
  1333. properties:
  1334. [ Field {
  1335. ast:
  1336. { type: 'FieldDeclaration',
  1337. id: { type: 'Identifier', name: 'assetId' },
  1338. propertyType: { name: 'String' },
  1339. array: null,
  1340. regex: null,
  1341. default: null,
  1342. optional: null,
  1343. location:
  1344. { start: { offset: 118, line: 7, column: 3 },
  1345. end: { offset: 137, line: 8, column: 3 } } },
  1346. parent: [Circular],
  1347. name: 'assetId',
  1348. type: 'String',
  1349. array: false,
  1350. optional: false,
  1351. validator: null,
  1352. defaultValue: null },
  1353. RelationshipDeclaration {
  1354. ast:
  1355. { type: 'RelationshipDeclaration',
  1356. id: { type: 'Identifier', name: 'owner' },
  1357. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  1358. array: null,
  1359. optional: null,
  1360. location:
  1361. { start: { offset: 137, line: 8, column: 3 },
  1362. end: { offset: 167, line: 9, column: 3 } } },
  1363. parent: [Circular],
  1364. name: 'owner',
  1365. type: 'SampleParticipant',
  1366. array: false,
  1367. optional: false },
  1368. Field {
  1369. ast:
  1370. { type: 'FieldDeclaration',
  1371. id: { type: 'Identifier', name: 'value' },
  1372. propertyType: { name: 'String' },
  1373. array: null,
  1374. regex: null,
  1375. default: null,
  1376. optional: null,
  1377. location:
  1378. { start: { offset: 167, line: 9, column: 3 },
  1379. end: { offset: 182, line: 10, column: 1 } } },
  1380. parent: [Circular],
  1381. name: 'value',
  1382. type: 'String',
  1383. array: false,
  1384. optional: false,
  1385. validator: null,
  1386. defaultValue: null } ],
  1387. superType: 'Asset',
  1388. idField: 'assetId',
  1389. abstract: false },
  1390. ParticipantDeclaration {
  1391. ast:
  1392. { type: 'ParticipantDeclaration',
  1393. id: { type: 'Identifier', name: 'SampleParticipant' },
  1394. classExtension: null,
  1395. idField: { type: 'Identifier', name: 'participantId' },
  1396. body:
  1397. { type: 'ClassDeclarationBody',
  1398. declarations:
  1399. [ { type: 'FieldDeclaration',
  1400. id: { type: 'Identifier', name: 'participantId' },
  1401. propertyType: { name: 'String' },
  1402. array: null,
  1403. regex: null,
  1404. default: null,
  1405. optional: null,
  1406. location: { start: [Object], end: [Object] } },
  1407. { type: 'FieldDeclaration',
  1408. id: { type: 'Identifier', name: 'firstName' },
  1409. propertyType: { name: 'String' },
  1410. array: null,
  1411. regex: null,
  1412. default: null,
  1413. optional: null,
  1414. location: { start: [Object], end: [Object] } },
  1415. { type: 'FieldDeclaration',
  1416. id: { type: 'Identifier', name: 'lastName' },
  1417. propertyType: { name: 'String' },
  1418. array: null,
  1419. regex: null,
  1420. default: null,
  1421. optional: null,
  1422. location: { start: [Object], end: [Object] } } ],
  1423. location:
  1424. { start: { offset: 247, line: 13, column: 3 },
  1425. end: { offset: 311, line: 16, column: 1 } } },
  1426. abstract: null,
  1427. location:
  1428. { start: { offset: 185, line: 12, column: 1 },
  1429. end: { offset: 312, line: 16, column: 2 } } },
  1430. modelFile: [Circular],
  1431. name: 'SampleParticipant',
  1432. properties:
  1433. [ Field {
  1434. ast:
  1435. { type: 'FieldDeclaration',
  1436. id: { type: 'Identifier', name: 'participantId' },
  1437. propertyType: { name: 'String' },
  1438. array: null,
  1439. regex: null,
  1440. default: null,
  1441. optional: null,
  1442. location:
  1443. { start: { offset: 247, line: 13, column: 3 },
  1444. end: { offset: 272, line: 14, column: 3 } } },
  1445. parent: [Circular],
  1446. name: 'participantId',
  1447. type: 'String',
  1448. array: false,
  1449. optional: false,
  1450. validator: null,
  1451. defaultValue: null },
  1452. Field {
  1453. ast:
  1454. { type: 'FieldDeclaration',
  1455. id: { type: 'Identifier', name: 'firstName' },
  1456. propertyType: { name: 'String' },
  1457. array: null,
  1458. regex: null,
  1459. default: null,
  1460. optional: null,
  1461. location:
  1462. { start: { offset: 272, line: 14, column: 3 },
  1463. end: { offset: 293, line: 15, column: 3 } } },
  1464. parent: [Circular],
  1465. name: 'firstName',
  1466. type: 'String',
  1467. array: false,
  1468. optional: false,
  1469. validator: null,
  1470. defaultValue: null },
  1471. Field {
  1472. ast:
  1473. { type: 'FieldDeclaration',
  1474. id: { type: 'Identifier', name: 'lastName' },
  1475. propertyType: { name: 'String' },
  1476. array: null,
  1477. regex: null,
  1478. default: null,
  1479. optional: null,
  1480. location:
  1481. { start: { offset: 293, line: 15, column: 3 },
  1482. end: { offset: 311, line: 16, column: 1 } } },
  1483. parent: [Circular],
  1484. name: 'lastName',
  1485. type: 'String',
  1486. array: false,
  1487. optional: false,
  1488. validator: null,
  1489. defaultValue: null } ],
  1490. superType: 'Participant',
  1491. idField: 'participantId',
  1492. abstract: false },
  1493. TransactionDeclaration {
  1494. ast:
  1495. { type: 'TransactionDeclaration',
  1496. id: { type: 'Identifier', name: 'SampleTransaction' },
  1497. classExtension: null,
  1498. body:
  1499. { type: 'ClassDeclarationBody',
  1500. declarations:
  1501. [ { type: 'RelationshipDeclaration',
  1502. id: { type: 'Identifier', name: 'asset' },
  1503. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  1504. array: null,
  1505. optional: null,
  1506. location: { start: [Object], end: [Object] } },
  1507. { type: 'FieldDeclaration',
  1508. id: { type: 'Identifier', name: 'newValue' },
  1509. propertyType: { name: 'String' },
  1510. array: null,
  1511. regex: null,
  1512. default: null,
  1513. optional: null,
  1514. location: { start: [Object], end: [Object] } } ],
  1515. location:
  1516. { start: { offset: 348, line: 19, column: 3 },
  1517. end: { offset: 390, line: 21, column: 1 } } },
  1518. idField: null,
  1519. abstract: null,
  1520. location:
  1521. { start: { offset: 314, line: 18, column: 1 },
  1522. end: { offset: 391, line: 21, column: 2 } } },
  1523. modelFile: [Circular],
  1524. name: 'SampleTransaction',
  1525. properties:
  1526. [ RelationshipDeclaration {
  1527. ast:
  1528. { type: 'RelationshipDeclaration',
  1529. id: { type: 'Identifier', name: 'asset' },
  1530. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  1531. array: null,
  1532. optional: null,
  1533. location:
  1534. { start: { offset: 348, line: 19, column: 3 },
  1535. end: { offset: 372, line: 20, column: 3 } } },
  1536. parent: [Circular],
  1537. name: 'asset',
  1538. type: 'SampleAsset',
  1539. array: false,
  1540. optional: false },
  1541. Field {
  1542. ast:
  1543. { type: 'FieldDeclaration',
  1544. id: { type: 'Identifier', name: 'newValue' },
  1545. propertyType: { name: 'String' },
  1546. array: null,
  1547. regex: null,
  1548. default: null,
  1549. optional: null,
  1550. location:
  1551. { start: { offset: 372, line: 20, column: 3 },
  1552. end: { offset: 390, line: 21, column: 1 } } },
  1553. parent: [Circular],
  1554. name: 'newValue',
  1555. type: 'String',
  1556. array: false,
  1557. optional: false,
  1558. validator: null,
  1559. defaultValue: null } ],
  1560. superType: 'Transaction',
  1561. idField: null,
  1562. abstract: false },
  1563. EventDeclaration {
  1564. ast:
  1565. { type: 'EventDeclaration',
  1566. id: { type: 'Identifier', name: 'SampleEvent' },
  1567. classExtension: null,
  1568. body:
  1569. { type: 'ClassDeclarationBody',
  1570. declarations:
  1571. [ { type: 'RelationshipDeclaration',
  1572. id: { type: 'Identifier', name: 'asset' },
  1573. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  1574. array: null,
  1575. optional: null,
  1576. location: { start: [Object], end: [Object] } },
  1577. { type: 'FieldDeclaration',
  1578. id: { type: 'Identifier', name: 'oldValue' },
  1579. propertyType: { name: 'String' },
  1580. array: null,
  1581. regex: null,
  1582. default: null,
  1583. optional: null,
  1584. location: { start: [Object], end: [Object] } },
  1585. { type: 'FieldDeclaration',
  1586. id: { type: 'Identifier', name: 'newValue' },
  1587. propertyType: { name: 'String' },
  1588. array: null,
  1589. regex: null,
  1590. default: null,
  1591. optional: null,
  1592. location: { start: [Object], end: [Object] } } ],
  1593. location:
  1594. { start: { offset: 415, line: 24, column: 3 },
  1595. end: { offset: 477, line: 27, column: 1 } } },
  1596. idField: null,
  1597. abstract: null,
  1598. location:
  1599. { start: { offset: 393, line: 23, column: 1 },
  1600. end: { offset: 478, line: 27, column: 2 } } },
  1601. modelFile: [Circular],
  1602. name: 'SampleEvent',
  1603. properties:
  1604. [ RelationshipDeclaration {
  1605. ast:
  1606. { type: 'RelationshipDeclaration',
  1607. id: { type: 'Identifier', name: 'asset' },
  1608. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  1609. array: null,
  1610. optional: null,
  1611. location:
  1612. { start: { offset: 415, line: 24, column: 3 },
  1613. end: { offset: 439, line: 25, column: 3 } } },
  1614. parent: [Circular],
  1615. name: 'asset',
  1616. type: 'SampleAsset',
  1617. array: false,
  1618. optional: false },
  1619. Field {
  1620. ast:
  1621. { type: 'FieldDeclaration',
  1622. id: { type: 'Identifier', name: 'oldValue' },
  1623. propertyType: { name: 'String' },
  1624. array: null,
  1625. regex: null,
  1626. default: null,
  1627. optional: null,
  1628. location:
  1629. { start: { offset: 439, line: 25, column: 3 },
  1630. end: { offset: 459, line: 26, column: 3 } } },
  1631. parent: [Circular],
  1632. name: 'oldValue',
  1633. type: 'String',
  1634. array: false,
  1635. optional: false,
  1636. validator: null,
  1637. defaultValue: null },
  1638. Field {
  1639. ast:
  1640. { type: 'FieldDeclaration',
  1641. id: { type: 'Identifier', name: 'newValue' },
  1642. propertyType: { name: 'String' },
  1643. array: null,
  1644. regex: null,
  1645. default: null,
  1646. optional: null,
  1647. location:
  1648. { start: { offset: 459, line: 26, column: 3 },
  1649. end: { offset: 477, line: 27, column: 1 } } },
  1650. parent: [Circular],
  1651. name: 'newValue',
  1652. type: 'String',
  1653. array: false,
  1654. optional: false,
  1655. validator: null,
  1656. defaultValue: null } ],
  1657. superType: 'Event',
  1658. idField: null,
  1659. abstract: false } ],
  1660. imports:
  1661. [ 'org.hyperledger.composer.system.Event',
  1662. 'org.hyperledger.composer.system.Transaction',
  1663. 'org.hyperledger.composer.system.Participant',
  1664. 'org.hyperledger.composer.system.Asset' ],
  1665. fileName: 'models/sample.cto',
  1666. definitions: '/**\n * Sample business network definition.\n */\nnamespace org.acme.sample\n\nasset SampleAsset identified by assetId {\n o String assetId\n --> SampleParticipant owner\n o String value\n}\n\nparticipant SampleParticipant identified by participantId {\n o String participantId\n o String firstName\n o String lastName\n}\n\ntransaction SampleTransaction {\n --> SampleAsset asset\n o String newValue\n}\n\nevent SampleEvent {\n --> SampleAsset asset\n o String oldValue\n o String newValue\n}\n',
  1667. ast:
  1668. { type: 'Program',
  1669. namespace: 'org.acme.sample',
  1670. imports:
  1671. [ 'org.hyperledger.composer.system.Event',
  1672. 'org.hyperledger.composer.system.Transaction',
  1673. 'org.hyperledger.composer.system.Participant',
  1674. 'org.hyperledger.composer.system.Asset' ],
  1675. body:
  1676. [ { type: 'AssetDeclaration',
  1677. id: { type: 'Identifier', name: 'SampleAsset' },
  1678. classExtension: null,
  1679. idField: { type: 'Identifier', name: 'assetId' },
  1680. body:
  1681. { type: 'ClassDeclarationBody',
  1682. declarations:
  1683. [ { type: 'FieldDeclaration',
  1684. id: { type: 'Identifier', name: 'assetId' },
  1685. propertyType: { name: 'String' },
  1686. array: null,
  1687. regex: null,
  1688. default: null,
  1689. optional: null,
  1690. location: { start: [Object], end: [Object] } },
  1691. { type: 'RelationshipDeclaration',
  1692. id: { type: 'Identifier', name: 'owner' },
  1693. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  1694. array: null,
  1695. optional: null,
  1696. location: { start: [Object], end: [Object] } },
  1697. { type: 'FieldDeclaration',
  1698. id: { type: 'Identifier', name: 'value' },
  1699. propertyType: { name: 'String' },
  1700. array: null,
  1701. regex: null,
  1702. default: null,
  1703. optional: null,
  1704. location: { start: [Object], end: [Object] } } ],
  1705. location:
  1706. { start: { offset: 118, line: 7, column: 3 },
  1707. end: { offset: 182, line: 10, column: 1 } } },
  1708. abstract: null,
  1709. location:
  1710. { start: { offset: 74, line: 6, column: 1 },
  1711. end: { offset: 183, line: 10, column: 2 } } },
  1712. { type: 'ParticipantDeclaration',
  1713. id: { type: 'Identifier', name: 'SampleParticipant' },
  1714. classExtension: null,
  1715. idField: { type: 'Identifier', name: 'participantId' },
  1716. body:
  1717. { type: 'ClassDeclarationBody',
  1718. declarations:
  1719. [ { type: 'FieldDeclaration',
  1720. id: { type: 'Identifier', name: 'participantId' },
  1721. propertyType: { name: 'String' },
  1722. array: null,
  1723. regex: null,
  1724. default: null,
  1725. optional: null,
  1726. location: { start: [Object], end: [Object] } },
  1727. { type: 'FieldDeclaration',
  1728. id: { type: 'Identifier', name: 'firstName' },
  1729. propertyType: { name: 'String' },
  1730. array: null,
  1731. regex: null,
  1732. default: null,
  1733. optional: null,
  1734. location: { start: [Object], end: [Object] } },
  1735. { type: 'FieldDeclaration',
  1736. id: { type: 'Identifier', name: 'lastName' },
  1737. propertyType: { name: 'String' },
  1738. array: null,
  1739. regex: null,
  1740. default: null,
  1741. optional: null,
  1742. location: { start: [Object], end: [Object] } } ],
  1743. location:
  1744. { start: { offset: 247, line: 13, column: 3 },
  1745. end: { offset: 311, line: 16, column: 1 } } },
  1746. abstract: null,
  1747. location:
  1748. { start: { offset: 185, line: 12, column: 1 },
  1749. end: { offset: 312, line: 16, column: 2 } } },
  1750. { type: 'TransactionDeclaration',
  1751. id: { type: 'Identifier', name: 'SampleTransaction' },
  1752. classExtension: null,
  1753. body:
  1754. { type: 'ClassDeclarationBody',
  1755. declarations:
  1756. [ { type: 'RelationshipDeclaration',
  1757. id: { type: 'Identifier', name: 'asset' },
  1758. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  1759. array: null,
  1760. optional: null,
  1761. location: { start: [Object], end: [Object] } },
  1762. { type: 'FieldDeclaration',
  1763. id: { type: 'Identifier', name: 'newValue' },
  1764. propertyType: { name: 'String' },
  1765. array: null,
  1766. regex: null,
  1767. default: null,
  1768. optional: null,
  1769. location: { start: [Object], end: [Object] } } ],
  1770. location:
  1771. { start: { offset: 348, line: 19, column: 3 },
  1772. end: { offset: 390, line: 21, column: 1 } } },
  1773. idField: null,
  1774. abstract: null,
  1775. location:
  1776. { start: { offset: 314, line: 18, column: 1 },
  1777. end: { offset: 391, line: 21, column: 2 } } },
  1778. { type: 'EventDeclaration',
  1779. id: { type: 'Identifier', name: 'SampleEvent' },
  1780. classExtension: null,
  1781. body:
  1782. { type: 'ClassDeclarationBody',
  1783. declarations:
  1784. [ { type: 'RelationshipDeclaration',
  1785. id: { type: 'Identifier', name: 'asset' },
  1786. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  1787. array: null,
  1788. optional: null,
  1789. location: { start: [Object], end: [Object] } },
  1790. { type: 'FieldDeclaration',
  1791. id: { type: 'Identifier', name: 'oldValue' },
  1792. propertyType: { name: 'String' },
  1793. array: null,
  1794. regex: null,
  1795. default: null,
  1796. optional: null,
  1797. location: { start: [Object], end: [Object] } },
  1798. { type: 'FieldDeclaration',
  1799. id: { type: 'Identifier', name: 'newValue' },
  1800. propertyType: { name: 'String' },
  1801. array: null,
  1802. regex: null,
  1803. default: null,
  1804. optional: null,
  1805. location: { start: [Object], end: [Object] } } ],
  1806. location:
  1807. { start: { offset: 415, line: 24, column: 3 },
  1808. end: { offset: 477, line: 27, column: 1 } } },
  1809. idField: null,
  1810. abstract: null,
  1811. location:
  1812. { start: { offset: 393, line: 23, column: 1 },
  1813. end: { offset: 478, line: 27, column: 2 } } } ] },
  1814. namespace: 'org.acme.sample' } } },
  1815. '$namespace': 'org.acme.sample',
  1816. '$type': 'SampleEvent',
  1817. '$identifier': 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
  1818. '$validator': ResourceValidator {},
  1819. eventId: 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
  1820. timestamp: 2017-07-10T15:18:37.627Z,
  1821. asset:
  1822. Relationship {
  1823. '$modelManager':
  1824. ModelManager {
  1825. modelFiles:
  1826. { 'org.hyperledger.composer.system':
  1827. ModelFile {
  1828. modelManager: [Circular],
  1829. declarations:
  1830. [ AssetDeclaration {
  1831. ast:
  1832. { type: 'AssetDeclaration',
  1833. id: { type: 'Identifier', name: 'Asset' },
  1834. classExtension: null,
  1835. idField: null,
  1836. body:
  1837. { type: 'ClassDeclarationBody',
  1838. declarations: [],
  1839. location:
  1840. { start: { offset: 76, line: 4, column: 29 },
  1841. end: { offset: 76, line: 4, column: 29 } } },
  1842. abstract: [ 'abstract', undefined ],
  1843. location:
  1844. { start: { offset: 52, line: 4, column: 5 },
  1845. end: { offset: 77, line: 4, column: 30 } } },
  1846. modelFile: [Circular],
  1847. name: 'Asset',
  1848. properties: [],
  1849. superType: null,
  1850. idField: null,
  1851. abstract: true },
  1852. ParticipantDeclaration {
  1853. ast:
  1854. { type: 'ParticipantDeclaration',
  1855. id: { type: 'Identifier', name: 'Participant' },
  1856. classExtension: null,
  1857. idField: null,
  1858. body:
  1859. { type: 'ClassDeclarationBody',
  1860. declarations: [],
  1861. location:
  1862. { start: { offset: 120, line: 6, column: 42 },
  1863. end: { offset: 120, line: 6, column: 42 } } },
  1864. abstract: [ 'abstract', undefined ],
  1865. location:
  1866. { start: { offset: 83, line: 6, column: 5 },
  1867. end: { offset: 121, line: 6, column: 43 } } },
  1868. modelFile: [Circular],
  1869. name: 'Participant',
  1870. properties: [],
  1871. superType: null,
  1872. idField: null,
  1873. abstract: true },
  1874. TransactionDeclaration {
  1875. ast:
  1876. { type: 'TransactionDeclaration',
  1877. id: { type: 'Identifier', name: 'Transaction' },
  1878. classExtension: null,
  1879. body:
  1880. { type: 'ClassDeclarationBody',
  1881. declarations:
  1882. [ { type: 'FieldDeclaration',
  1883. id: [Object],
  1884. propertyType: [Object],
  1885. array: null,
  1886. regex: null,
  1887. default: null,
  1888. optional: null,
  1889. location: [Object] },
  1890. { type: 'FieldDeclaration',
  1891. id: [Object],
  1892. propertyType: [Object],
  1893. array: null,
  1894. default: null,
  1895. optional: null,
  1896. location: [Object] } ],
  1897. location:
  1898. { start: { offset: 195, line: 9, column: 7 },
  1899. end: { offset: 249, line: 11, column: 5 } } },
  1900. idField: { type: 'Identifier', name: 'transactionId' },
  1901. abstract: [ 'abstract', undefined ],
  1902. location:
  1903. { start: { offset: 127, line: 8, column: 5 },
  1904. end: { offset: 250, line: 11, column: 6 } } },
  1905. modelFile: [Circular],
  1906. name: 'Transaction',
  1907. properties:
  1908. [ Field {
  1909. ast:
  1910. { type: 'FieldDeclaration',
  1911. id: { type: 'Identifier', name: 'transactionId' },
  1912. propertyType: { name: 'String' },
  1913. array: null,
  1914. regex: null,
  1915. default: null,
  1916. optional: null,
  1917. location: { start: [Object], end: [Object] } },
  1918. parent: [Circular],
  1919. name: 'transactionId',
  1920. type: 'String',
  1921. array: false,
  1922. optional: false,
  1923. validator: null,
  1924. defaultValue: null },
  1925. Field {
  1926. ast:
  1927. { type: 'FieldDeclaration',
  1928. id: { type: 'Identifier', name: 'timestamp' },
  1929. propertyType: { name: 'DateTime' },
  1930. array: null,
  1931. default: null,
  1932. optional: null,
  1933. location: { start: [Object], end: [Object] } },
  1934. parent: [Circular],
  1935. name: 'timestamp',
  1936. type: 'DateTime',
  1937. array: false,
  1938. optional: false,
  1939. validator: null,
  1940. defaultValue: null } ],
  1941. superType: null,
  1942. idField: 'transactionId',
  1943. abstract: true },
  1944. EventDeclaration {
  1945. ast:
  1946. { type: 'EventDeclaration',
  1947. id: { type: 'Identifier', name: 'Event' },
  1948. classExtension: null,
  1949. body:
  1950. { type: 'ClassDeclarationBody',
  1951. declarations:
  1952. [ { type: 'FieldDeclaration',
  1953. id: [Object],
  1954. propertyType: [Object],
  1955. array: null,
  1956. regex: null,
  1957. default: null,
  1958. optional: null,
  1959. location: [Object] },
  1960. { type: 'FieldDeclaration',
  1961. id: [Object],
  1962. propertyType: [Object],
  1963. array: null,
  1964. default: null,
  1965. optional: null,
  1966. location: [Object] } ],
  1967. location:
  1968. { start: { offset: 306, line: 14, column: 7 },
  1969. end: { offset: 354, line: 16, column: 5 } } },
  1970. idField: { type: 'Identifier', name: 'eventId' },
  1971. abstract: [ 'abstract', undefined ],
  1972. location:
  1973. { start: { offset: 256, line: 13, column: 5 },
  1974. end: { offset: 355, line: 16, column: 6 } } },
  1975. modelFile: [Circular],
  1976. name: 'Event',
  1977. properties:
  1978. [ Field {
  1979. ast:
  1980. { type: 'FieldDeclaration',
  1981. id: { type: 'Identifier', name: 'eventId' },
  1982. propertyType: { name: 'String' },
  1983. array: null,
  1984. regex: null,
  1985. default: null,
  1986. optional: null,
  1987. location: { start: [Object], end: [Object] } },
  1988. parent: [Circular],
  1989. name: 'eventId',
  1990. type: 'String',
  1991. array: false,
  1992. optional: false,
  1993. validator: null,
  1994. defaultValue: null },
  1995. Field {
  1996. ast:
  1997. { type: 'FieldDeclaration',
  1998. id: { type: 'Identifier', name: 'timestamp' },
  1999. propertyType: { name: 'DateTime' },
  2000. array: null,
  2001. default: null,
  2002. optional: null,
  2003. location: { start: [Object], end: [Object] } },
  2004. parent: [Circular],
  2005. name: 'timestamp',
  2006. type: 'DateTime',
  2007. array: false,
  2008. optional: false,
  2009. validator: null,
  2010. defaultValue: null } ],
  2011. superType: null,
  2012. idField: 'eventId',
  2013. abstract: true } ],
  2014. imports: [],
  2015. fileName: undefined,
  2016. definitions: '\n namespace org.hyperledger.composer.system\n\n abstract asset Asset { }\n\n abstract participant Participant { }\n\n abstract transaction Transaction identified by transactionId{\n o String transactionId\n o DateTime timestamp\n }\n\n abstract event Event identified by eventId{\n o String eventId\n o DateTime timestamp\n }\n',
  2017. ast:
  2018. { type: 'Program',
  2019. namespace: 'org.hyperledger.composer.system',
  2020. imports: [],
  2021. body:
  2022. [ { type: 'AssetDeclaration',
  2023. id: { type: 'Identifier', name: 'Asset' },
  2024. classExtension: null,
  2025. idField: null,
  2026. body:
  2027. { type: 'ClassDeclarationBody',
  2028. declarations: [],
  2029. location:
  2030. { start: { offset: 76, line: 4, column: 29 },
  2031. end: { offset: 76, line: 4, column: 29 } } },
  2032. abstract: [ 'abstract', undefined ],
  2033. location:
  2034. { start: { offset: 52, line: 4, column: 5 },
  2035. end: { offset: 77, line: 4, column: 30 } } },
  2036. { type: 'ParticipantDeclaration',
  2037. id: { type: 'Identifier', name: 'Participant' },
  2038. classExtension: null,
  2039. idField: null,
  2040. body:
  2041. { type: 'ClassDeclarationBody',
  2042. declarations: [],
  2043. location:
  2044. { start: { offset: 120, line: 6, column: 42 },
  2045. end: { offset: 120, line: 6, column: 42 } } },
  2046. abstract: [ 'abstract', undefined ],
  2047. location:
  2048. { start: { offset: 83, line: 6, column: 5 },
  2049. end: { offset: 121, line: 6, column: 43 } } },
  2050. { type: 'TransactionDeclaration',
  2051. id: { type: 'Identifier', name: 'Transaction' },
  2052. classExtension: null,
  2053. body:
  2054. { type: 'ClassDeclarationBody',
  2055. declarations:
  2056. [ { type: 'FieldDeclaration',
  2057. id: [Object],
  2058. propertyType: [Object],
  2059. array: null,
  2060. regex: null,
  2061. default: null,
  2062. optional: null,
  2063. location: [Object] },
  2064. { type: 'FieldDeclaration',
  2065. id: [Object],
  2066. propertyType: [Object],
  2067. array: null,
  2068. default: null,
  2069. optional: null,
  2070. location: [Object] } ],
  2071. location:
  2072. { start: { offset: 195, line: 9, column: 7 },
  2073. end: { offset: 249, line: 11, column: 5 } } },
  2074. idField: { type: 'Identifier', name: 'transactionId' },
  2075. abstract: [ 'abstract', undefined ],
  2076. location:
  2077. { start: { offset: 127, line: 8, column: 5 },
  2078. end: { offset: 250, line: 11, column: 6 } } },
  2079. { type: 'EventDeclaration',
  2080. id: { type: 'Identifier', name: 'Event' },
  2081. classExtension: null,
  2082. body:
  2083. { type: 'ClassDeclarationBody',
  2084. declarations:
  2085. [ { type: 'FieldDeclaration',
  2086. id: [Object],
  2087. propertyType: [Object],
  2088. array: null,
  2089. regex: null,
  2090. default: null,
  2091. optional: null,
  2092. location: [Object] },
  2093. { type: 'FieldDeclaration',
  2094. id: [Object],
  2095. propertyType: [Object],
  2096. array: null,
  2097. default: null,
  2098. optional: null,
  2099. location: [Object] } ],
  2100. location:
  2101. { start: { offset: 306, line: 14, column: 7 },
  2102. end: { offset: 354, line: 16, column: 5 } } },
  2103. idField: { type: 'Identifier', name: 'eventId' },
  2104. abstract: [ 'abstract', undefined ],
  2105. location:
  2106. { start: { offset: 256, line: 13, column: 5 },
  2107. end: { offset: 355, line: 16, column: 6 } } } ] },
  2108. namespace: 'org.hyperledger.composer.system' },
  2109. 'org.acme.sample':
  2110. ModelFile {
  2111. modelManager: [Circular],
  2112. declarations:
  2113. [ AssetDeclaration {
  2114. ast:
  2115. { type: 'AssetDeclaration',
  2116. id: { type: 'Identifier', name: 'SampleAsset' },
  2117. classExtension: null,
  2118. idField: { type: 'Identifier', name: 'assetId' },
  2119. body:
  2120. { type: 'ClassDeclarationBody',
  2121. declarations:
  2122. [ { type: 'FieldDeclaration',
  2123. id: [Object],
  2124. propertyType: [Object],
  2125. array: null,
  2126. regex: null,
  2127. default: null,
  2128. optional: null,
  2129. location: [Object] },
  2130. { type: 'RelationshipDeclaration',
  2131. id: [Object],
  2132. propertyType: [Object],
  2133. array: null,
  2134. optional: null,
  2135. location: [Object] },
  2136. { type: 'FieldDeclaration',
  2137. id: [Object],
  2138. propertyType: [Object],
  2139. array: null,
  2140. regex: null,
  2141. default: null,
  2142. optional: null,
  2143. location: [Object] } ],
  2144. location:
  2145. { start: { offset: 118, line: 7, column: 3 },
  2146. end: { offset: 182, line: 10, column: 1 } } },
  2147. abstract: null,
  2148. location:
  2149. { start: { offset: 74, line: 6, column: 1 },
  2150. end: { offset: 183, line: 10, column: 2 } } },
  2151. modelFile: [Circular],
  2152. name: 'SampleAsset',
  2153. properties:
  2154. [ Field {
  2155. ast:
  2156. { type: 'FieldDeclaration',
  2157. id: { type: 'Identifier', name: 'assetId' },
  2158. propertyType: { name: 'String' },
  2159. array: null,
  2160. regex: null,
  2161. default: null,
  2162. optional: null,
  2163. location: { start: [Object], end: [Object] } },
  2164. parent: [Circular],
  2165. name: 'assetId',
  2166. type: 'String',
  2167. array: false,
  2168. optional: false,
  2169. validator: null,
  2170. defaultValue: null },
  2171. RelationshipDeclaration {
  2172. ast:
  2173. { type: 'RelationshipDeclaration',
  2174. id: { type: 'Identifier', name: 'owner' },
  2175. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  2176. array: null,
  2177. optional: null,
  2178. location: { start: [Object], end: [Object] } },
  2179. parent: [Circular],
  2180. name: 'owner',
  2181. type: 'SampleParticipant',
  2182. array: false,
  2183. optional: false },
  2184. Field {
  2185. ast:
  2186. { type: 'FieldDeclaration',
  2187. id: { type: 'Identifier', name: 'value' },
  2188. propertyType: { name: 'String' },
  2189. array: null,
  2190. regex: null,
  2191. default: null,
  2192. optional: null,
  2193. location: { start: [Object], end: [Object] } },
  2194. parent: [Circular],
  2195. name: 'value',
  2196. type: 'String',
  2197. array: false,
  2198. optional: false,
  2199. validator: null,
  2200. defaultValue: null } ],
  2201. superType: 'Asset',
  2202. idField: 'assetId',
  2203. abstract: false },
  2204. ParticipantDeclaration {
  2205. ast:
  2206. { type: 'ParticipantDeclaration',
  2207. id: { type: 'Identifier', name: 'SampleParticipant' },
  2208. classExtension: null,
  2209. idField: { type: 'Identifier', name: 'participantId' },
  2210. body:
  2211. { type: 'ClassDeclarationBody',
  2212. declarations:
  2213. [ { type: 'FieldDeclaration',
  2214. id: [Object],
  2215. propertyType: [Object],
  2216. array: null,
  2217. regex: null,
  2218. default: null,
  2219. optional: null,
  2220. location: [Object] },
  2221. { type: 'FieldDeclaration',
  2222. id: [Object],
  2223. propertyType: [Object],
  2224. array: null,
  2225. regex: null,
  2226. default: null,
  2227. optional: null,
  2228. location: [Object] },
  2229. { type: 'FieldDeclaration',
  2230. id: [Object],
  2231. propertyType: [Object],
  2232. array: null,
  2233. regex: null,
  2234. default: null,
  2235. optional: null,
  2236. location: [Object] } ],
  2237. location:
  2238. { start: { offset: 247, line: 13, column: 3 },
  2239. end: { offset: 311, line: 16, column: 1 } } },
  2240. abstract: null,
  2241. location:
  2242. { start: { offset: 185, line: 12, column: 1 },
  2243. end: { offset: 312, line: 16, column: 2 } } },
  2244. modelFile: [Circular],
  2245. name: 'SampleParticipant',
  2246. properties:
  2247. [ Field {
  2248. ast:
  2249. { type: 'FieldDeclaration',
  2250. id: { type: 'Identifier', name: 'participantId' },
  2251. propertyType: { name: 'String' },
  2252. array: null,
  2253. regex: null,
  2254. default: null,
  2255. optional: null,
  2256. location: { start: [Object], end: [Object] } },
  2257. parent: [Circular],
  2258. name: 'participantId',
  2259. type: 'String',
  2260. array: false,
  2261. optional: false,
  2262. validator: null,
  2263. defaultValue: null },
  2264. Field {
  2265. ast:
  2266. { type: 'FieldDeclaration',
  2267. id: { type: 'Identifier', name: 'firstName' },
  2268. propertyType: { name: 'String' },
  2269. array: null,
  2270. regex: null,
  2271. default: null,
  2272. optional: null,
  2273. location: { start: [Object], end: [Object] } },
  2274. parent: [Circular],
  2275. name: 'firstName',
  2276. type: 'String',
  2277. array: false,
  2278. optional: false,
  2279. validator: null,
  2280. defaultValue: null },
  2281. Field {
  2282. ast:
  2283. { type: 'FieldDeclaration',
  2284. id: { type: 'Identifier', name: 'lastName' },
  2285. propertyType: { name: 'String' },
  2286. array: null,
  2287. regex: null,
  2288. default: null,
  2289. optional: null,
  2290. location: { start: [Object], end: [Object] } },
  2291. parent: [Circular],
  2292. name: 'lastName',
  2293. type: 'String',
  2294. array: false,
  2295. optional: false,
  2296. validator: null,
  2297. defaultValue: null } ],
  2298. superType: 'Participant',
  2299. idField: 'participantId',
  2300. abstract: false },
  2301. TransactionDeclaration {
  2302. ast:
  2303. { type: 'TransactionDeclaration',
  2304. id: { type: 'Identifier', name: 'SampleTransaction' },
  2305. classExtension: null,
  2306. body:
  2307. { type: 'ClassDeclarationBody',
  2308. declarations:
  2309. [ { type: 'RelationshipDeclaration',
  2310. id: [Object],
  2311. propertyType: [Object],
  2312. array: null,
  2313. optional: null,
  2314. location: [Object] },
  2315. { type: 'FieldDeclaration',
  2316. id: [Object],
  2317. propertyType: [Object],
  2318. array: null,
  2319. regex: null,
  2320. default: null,
  2321. optional: null,
  2322. location: [Object] } ],
  2323. location:
  2324. { start: { offset: 348, line: 19, column: 3 },
  2325. end: { offset: 390, line: 21, column: 1 } } },
  2326. idField: null,
  2327. abstract: null,
  2328. location:
  2329. { start: { offset: 314, line: 18, column: 1 },
  2330. end: { offset: 391, line: 21, column: 2 } } },
  2331. modelFile: [Circular],
  2332. name: 'SampleTransaction',
  2333. properties:
  2334. [ RelationshipDeclaration {
  2335. ast:
  2336. { type: 'RelationshipDeclaration',
  2337. id: { type: 'Identifier', name: 'asset' },
  2338. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  2339. array: null,
  2340. optional: null,
  2341. location: { start: [Object], end: [Object] } },
  2342. parent: [Circular],
  2343. name: 'asset',
  2344. type: 'SampleAsset',
  2345. array: false,
  2346. optional: false },
  2347. Field {
  2348. ast:
  2349. { type: 'FieldDeclaration',
  2350. id: { type: 'Identifier', name: 'newValue' },
  2351. propertyType: { name: 'String' },
  2352. array: null,
  2353. regex: null,
  2354. default: null,
  2355. optional: null,
  2356. location: { start: [Object], end: [Object] } },
  2357. parent: [Circular],
  2358. name: 'newValue',
  2359. type: 'String',
  2360. array: false,
  2361. optional: false,
  2362. validator: null,
  2363. defaultValue: null } ],
  2364. superType: 'Transaction',
  2365. idField: null,
  2366. abstract: false },
  2367. EventDeclaration {
  2368. ast:
  2369. { type: 'EventDeclaration',
  2370. id: { type: 'Identifier', name: 'SampleEvent' },
  2371. classExtension: null,
  2372. body:
  2373. { type: 'ClassDeclarationBody',
  2374. declarations:
  2375. [ { type: 'RelationshipDeclaration',
  2376. id: [Object],
  2377. propertyType: [Object],
  2378. array: null,
  2379. optional: null,
  2380. location: [Object] },
  2381. { type: 'FieldDeclaration',
  2382. id: [Object],
  2383. propertyType: [Object],
  2384. array: null,
  2385. regex: null,
  2386. default: null,
  2387. optional: null,
  2388. location: [Object] },
  2389. { type: 'FieldDeclaration',
  2390. id: [Object],
  2391. propertyType: [Object],
  2392. array: null,
  2393. regex: null,
  2394. default: null,
  2395. optional: null,
  2396. location: [Object] } ],
  2397. location:
  2398. { start: { offset: 415, line: 24, column: 3 },
  2399. end: { offset: 477, line: 27, column: 1 } } },
  2400. idField: null,
  2401. abstract: null,
  2402. location:
  2403. { start: { offset: 393, line: 23, column: 1 },
  2404. end: { offset: 478, line: 27, column: 2 } } },
  2405. modelFile: [Circular],
  2406. name: 'SampleEvent',
  2407. properties:
  2408. [ RelationshipDeclaration {
  2409. ast:
  2410. { type: 'RelationshipDeclaration',
  2411. id: { type: 'Identifier', name: 'asset' },
  2412. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  2413. array: null,
  2414. optional: null,
  2415. location: { start: [Object], end: [Object] } },
  2416. parent: [Circular],
  2417. name: 'asset',
  2418. type: 'SampleAsset',
  2419. array: false,
  2420. optional: false },
  2421. Field {
  2422. ast:
  2423. { type: 'FieldDeclaration',
  2424. id: { type: 'Identifier', name: 'oldValue' },
  2425. propertyType: { name: 'String' },
  2426. array: null,
  2427. regex: null,
  2428. default: null,
  2429. optional: null,
  2430. location: { start: [Object], end: [Object] } },
  2431. parent: [Circular],
  2432. name: 'oldValue',
  2433. type: 'String',
  2434. array: false,
  2435. optional: false,
  2436. validator: null,
  2437. defaultValue: null },
  2438. Field {
  2439. ast:
  2440. { type: 'FieldDeclaration',
  2441. id: { type: 'Identifier', name: 'newValue' },
  2442. propertyType: { name: 'String' },
  2443. array: null,
  2444. regex: null,
  2445. default: null,
  2446. optional: null,
  2447. location: { start: [Object], end: [Object] } },
  2448. parent: [Circular],
  2449. name: 'newValue',
  2450. type: 'String',
  2451. array: false,
  2452. optional: false,
  2453. validator: null,
  2454. defaultValue: null } ],
  2455. superType: 'Event',
  2456. idField: null,
  2457. abstract: false } ],
  2458. imports:
  2459. [ 'org.hyperledger.composer.system.Event',
  2460. 'org.hyperledger.composer.system.Transaction',
  2461. 'org.hyperledger.composer.system.Participant',
  2462. 'org.hyperledger.composer.system.Asset' ],
  2463. fileName: 'models/sample.cto',
  2464. definitions: '/**\n * Sample business network definition.\n */\nnamespace org.acme.sample\n\nasset SampleAsset identified by assetId {\n o String assetId\n --> SampleParticipant owner\n o String value\n}\n\nparticipant SampleParticipant identified by participantId {\n o String participantId\n o String firstName\n o String lastName\n}\n\ntransaction SampleTransaction {\n --> SampleAsset asset\n o String newValue\n}\n\nevent SampleEvent {\n --> SampleAsset asset\n o String oldValue\n o String newValue\n}\n',
  2465. ast:
  2466. { type: 'Program',
  2467. namespace: 'org.acme.sample',
  2468. imports:
  2469. [ 'org.hyperledger.composer.system.Event',
  2470. 'org.hyperledger.composer.system.Transaction',
  2471. 'org.hyperledger.composer.system.Participant',
  2472. 'org.hyperledger.composer.system.Asset' ],
  2473. body:
  2474. [ { type: 'AssetDeclaration',
  2475. id: { type: 'Identifier', name: 'SampleAsset' },
  2476. classExtension: null,
  2477. idField: { type: 'Identifier', name: 'assetId' },
  2478. body:
  2479. { type: 'ClassDeclarationBody',
  2480. declarations:
  2481. [ { type: 'FieldDeclaration',
  2482. id: [Object],
  2483. propertyType: [Object],
  2484. array: null,
  2485. regex: null,
  2486. default: null,
  2487. optional: null,
  2488. location: [Object] },
  2489. { type: 'RelationshipDeclaration',
  2490. id: [Object],
  2491. propertyType: [Object],
  2492. array: null,
  2493. optional: null,
  2494. location: [Object] },
  2495. { type: 'FieldDeclaration',
  2496. id: [Object],
  2497. propertyType: [Object],
  2498. array: null,
  2499. regex: null,
  2500. default: null,
  2501. optional: null,
  2502. location: [Object] } ],
  2503. location:
  2504. { start: { offset: 118, line: 7, column: 3 },
  2505. end: { offset: 182, line: 10, column: 1 } } },
  2506. abstract: null,
  2507. location:
  2508. { start: { offset: 74, line: 6, column: 1 },
  2509. end: { offset: 183, line: 10, column: 2 } } },
  2510. { type: 'ParticipantDeclaration',
  2511. id: { type: 'Identifier', name: 'SampleParticipant' },
  2512. classExtension: null,
  2513. idField: { type: 'Identifier', name: 'participantId' },
  2514. body:
  2515. { type: 'ClassDeclarationBody',
  2516. declarations:
  2517. [ { type: 'FieldDeclaration',
  2518. id: [Object],
  2519. propertyType: [Object],
  2520. array: null,
  2521. regex: null,
  2522. default: null,
  2523. optional: null,
  2524. location: [Object] },
  2525. { type: 'FieldDeclaration',
  2526. id: [Object],
  2527. propertyType: [Object],
  2528. array: null,
  2529. regex: null,
  2530. default: null,
  2531. optional: null,
  2532. location: [Object] },
  2533. { type: 'FieldDeclaration',
  2534. id: [Object],
  2535. propertyType: [Object],
  2536. array: null,
  2537. regex: null,
  2538. default: null,
  2539. optional: null,
  2540. location: [Object] } ],
  2541. location:
  2542. { start: { offset: 247, line: 13, column: 3 },
  2543. end: { offset: 311, line: 16, column: 1 } } },
  2544. abstract: null,
  2545. location:
  2546. { start: { offset: 185, line: 12, column: 1 },
  2547. end: { offset: 312, line: 16, column: 2 } } },
  2548. { type: 'TransactionDeclaration',
  2549. id: { type: 'Identifier', name: 'SampleTransaction' },
  2550. classExtension: null,
  2551. body:
  2552. { type: 'ClassDeclarationBody',
  2553. declarations:
  2554. [ { type: 'RelationshipDeclaration',
  2555. id: [Object],
  2556. propertyType: [Object],
  2557. array: null,
  2558. optional: null,
  2559. location: [Object] },
  2560. { type: 'FieldDeclaration',
  2561. id: [Object],
  2562. propertyType: [Object],
  2563. array: null,
  2564. regex: null,
  2565. default: null,
  2566. optional: null,
  2567. location: [Object] } ],
  2568. location:
  2569. { start: { offset: 348, line: 19, column: 3 },
  2570. end: { offset: 390, line: 21, column: 1 } } },
  2571. idField: null,
  2572. abstract: null,
  2573. location:
  2574. { start: { offset: 314, line: 18, column: 1 },
  2575. end: { offset: 391, line: 21, column: 2 } } },
  2576. { type: 'EventDeclaration',
  2577. id: { type: 'Identifier', name: 'SampleEvent' },
  2578. classExtension: null,
  2579. body:
  2580. { type: 'ClassDeclarationBody',
  2581. declarations:
  2582. [ { type: 'RelationshipDeclaration',
  2583. id: [Object],
  2584. propertyType: [Object],
  2585. array: null,
  2586. optional: null,
  2587. location: [Object] },
  2588. { type: 'FieldDeclaration',
  2589. id: [Object],
  2590. propertyType: [Object],
  2591. array: null,
  2592. regex: null,
  2593. default: null,
  2594. optional: null,
  2595. location: [Object] },
  2596. { type: 'FieldDeclaration',
  2597. id: [Object],
  2598. propertyType: [Object],
  2599. array: null,
  2600. regex: null,
  2601. default: null,
  2602. optional: null,
  2603. location: [Object] } ],
  2604. location:
  2605. { start: { offset: 415, line: 24, column: 3 },
  2606. end: { offset: 477, line: 27, column: 1 } } },
  2607. idField: null,
  2608. abstract: null,
  2609. location:
  2610. { start: { offset: 393, line: 23, column: 1 },
  2611. end: { offset: 478, line: 27, column: 2 } } } ] },
  2612. namespace: 'org.acme.sample' } } },
  2613. '$namespace': 'org.acme.sample',
  2614. '$type': 'SampleAsset',
  2615. '$identifier': 'assetId:0001',
  2616. '$class': 'Relationship' },
  2617. oldValue: '1',
  2618. newValue: '1',
  2619. _msgid: '43f01964.d914e8' }
  2620. 10 Jul 11:18:40 - [info] [hyperledger-composer-in:Listen for events] received event
  2621. 10 Jul 11:18:40 - [info] [debug:813bd358.b09738]
  2622. ValidatedResource {
  2623. '$modelManager':
  2624. ModelManager {
  2625. modelFiles:
  2626. { 'org.hyperledger.composer.system':
  2627. ModelFile {
  2628. modelManager: [Circular],
  2629. declarations:
  2630. [ AssetDeclaration {
  2631. ast:
  2632. { type: 'AssetDeclaration',
  2633. id: { type: 'Identifier', name: 'Asset' },
  2634. classExtension: null,
  2635. idField: null,
  2636. body:
  2637. { type: 'ClassDeclarationBody',
  2638. declarations: [],
  2639. location:
  2640. { start: { offset: 76, line: 4, column: 29 },
  2641. end: { offset: 76, line: 4, column: 29 } } },
  2642. abstract: [ 'abstract', undefined ],
  2643. location:
  2644. { start: { offset: 52, line: 4, column: 5 },
  2645. end: { offset: 77, line: 4, column: 30 } } },
  2646. modelFile: [Circular],
  2647. name: 'Asset',
  2648. properties: [],
  2649. superType: null,
  2650. idField: null,
  2651. abstract: true },
  2652. ParticipantDeclaration {
  2653. ast:
  2654. { type: 'ParticipantDeclaration',
  2655. id: { type: 'Identifier', name: 'Participant' },
  2656. classExtension: null,
  2657. idField: null,
  2658. body:
  2659. { type: 'ClassDeclarationBody',
  2660. declarations: [],
  2661. location:
  2662. { start: { offset: 120, line: 6, column: 42 },
  2663. end: { offset: 120, line: 6, column: 42 } } },
  2664. abstract: [ 'abstract', undefined ],
  2665. location:
  2666. { start: { offset: 83, line: 6, column: 5 },
  2667. end: { offset: 121, line: 6, column: 43 } } },
  2668. modelFile: [Circular],
  2669. name: 'Participant',
  2670. properties: [],
  2671. superType: null,
  2672. idField: null,
  2673. abstract: true },
  2674. TransactionDeclaration {
  2675. ast:
  2676. { type: 'TransactionDeclaration',
  2677. id: { type: 'Identifier', name: 'Transaction' },
  2678. classExtension: null,
  2679. body:
  2680. { type: 'ClassDeclarationBody',
  2681. declarations:
  2682. [ { type: 'FieldDeclaration',
  2683. id: { type: 'Identifier', name: 'transactionId' },
  2684. propertyType: { name: 'String' },
  2685. array: null,
  2686. regex: null,
  2687. default: null,
  2688. optional: null,
  2689. location: { start: [Object], end: [Object] } },
  2690. { type: 'FieldDeclaration',
  2691. id: { type: 'Identifier', name: 'timestamp' },
  2692. propertyType: { name: 'DateTime' },
  2693. array: null,
  2694. default: null,
  2695. optional: null,
  2696. location: { start: [Object], end: [Object] } } ],
  2697. location:
  2698. { start: { offset: 195, line: 9, column: 7 },
  2699. end: { offset: 249, line: 11, column: 5 } } },
  2700. idField: { type: 'Identifier', name: 'transactionId' },
  2701. abstract: [ 'abstract', undefined ],
  2702. location:
  2703. { start: { offset: 127, line: 8, column: 5 },
  2704. end: { offset: 250, line: 11, column: 6 } } },
  2705. modelFile: [Circular],
  2706. name: 'Transaction',
  2707. properties:
  2708. [ Field {
  2709. ast:
  2710. { type: 'FieldDeclaration',
  2711. id: { type: 'Identifier', name: 'transactionId' },
  2712. propertyType: { name: 'String' },
  2713. array: null,
  2714. regex: null,
  2715. default: null,
  2716. optional: null,
  2717. location:
  2718. { start: { offset: 195, line: 9, column: 7 },
  2719. end: { offset: 224, line: 10, column: 7 } } },
  2720. parent: [Circular],
  2721. name: 'transactionId',
  2722. type: 'String',
  2723. array: false,
  2724. optional: false,
  2725. validator: null,
  2726. defaultValue: null },
  2727. Field {
  2728. ast:
  2729. { type: 'FieldDeclaration',
  2730. id: { type: 'Identifier', name: 'timestamp' },
  2731. propertyType: { name: 'DateTime' },
  2732. array: null,
  2733. default: null,
  2734. optional: null,
  2735. location:
  2736. { start: { offset: 224, line: 10, column: 7 },
  2737. end: { offset: 249, line: 11, column: 5 } } },
  2738. parent: [Circular],
  2739. name: 'timestamp',
  2740. type: 'DateTime',
  2741. array: false,
  2742. optional: false,
  2743. validator: null,
  2744. defaultValue: null } ],
  2745. superType: null,
  2746. idField: 'transactionId',
  2747. abstract: true },
  2748. EventDeclaration {
  2749. ast:
  2750. { type: 'EventDeclaration',
  2751. id: { type: 'Identifier', name: 'Event' },
  2752. classExtension: null,
  2753. body:
  2754. { type: 'ClassDeclarationBody',
  2755. declarations:
  2756. [ { type: 'FieldDeclaration',
  2757. id: { type: 'Identifier', name: 'eventId' },
  2758. propertyType: { name: 'String' },
  2759. array: null,
  2760. regex: null,
  2761. default: null,
  2762. optional: null,
  2763. location: { start: [Object], end: [Object] } },
  2764. { type: 'FieldDeclaration',
  2765. id: { type: 'Identifier', name: 'timestamp' },
  2766. propertyType: { name: 'DateTime' },
  2767. array: null,
  2768. default: null,
  2769. optional: null,
  2770. location: { start: [Object], end: [Object] } } ],
  2771. location:
  2772. { start: { offset: 306, line: 14, column: 7 },
  2773. end: { offset: 354, line: 16, column: 5 } } },
  2774. idField: { type: 'Identifier', name: 'eventId' },
  2775. abstract: [ 'abstract', undefined ],
  2776. location:
  2777. { start: { offset: 256, line: 13, column: 5 },
  2778. end: { offset: 355, line: 16, column: 6 } } },
  2779. modelFile: [Circular],
  2780. name: 'Event',
  2781. properties:
  2782. [ Field {
  2783. ast:
  2784. { type: 'FieldDeclaration',
  2785. id: { type: 'Identifier', name: 'eventId' },
  2786. propertyType: { name: 'String' },
  2787. array: null,
  2788. regex: null,
  2789. default: null,
  2790. optional: null,
  2791. location:
  2792. { start: { offset: 306, line: 14, column: 7 },
  2793. end: { offset: 329, line: 15, column: 7 } } },
  2794. parent: [Circular],
  2795. name: 'eventId',
  2796. type: 'String',
  2797. array: false,
  2798. optional: false,
  2799. validator: null,
  2800. defaultValue: null },
  2801. Field {
  2802. ast:
  2803. { type: 'FieldDeclaration',
  2804. id: { type: 'Identifier', name: 'timestamp' },
  2805. propertyType: { name: 'DateTime' },
  2806. array: null,
  2807. default: null,
  2808. optional: null,
  2809. location:
  2810. { start: { offset: 329, line: 15, column: 7 },
  2811. end: { offset: 354, line: 16, column: 5 } } },
  2812. parent: [Circular],
  2813. name: 'timestamp',
  2814. type: 'DateTime',
  2815. array: false,
  2816. optional: false,
  2817. validator: null,
  2818. defaultValue: null } ],
  2819. superType: null,
  2820. idField: 'eventId',
  2821. abstract: true } ],
  2822. imports: [],
  2823. fileName: undefined,
  2824. definitions: '\n namespace org.hyperledger.composer.system\n\n abstract asset Asset { }\n\n abstract participant Participant { }\n\n abstract transaction Transaction identified by transactionId{\n o String transactionId\n o DateTime timestamp\n }\n\n abstract event Event identified by eventId{\n o String eventId\n o DateTime timestamp\n }\n',
  2825. ast:
  2826. { type: 'Program',
  2827. namespace: 'org.hyperledger.composer.system',
  2828. imports: [],
  2829. body:
  2830. [ { type: 'AssetDeclaration',
  2831. id: { type: 'Identifier', name: 'Asset' },
  2832. classExtension: null,
  2833. idField: null,
  2834. body:
  2835. { type: 'ClassDeclarationBody',
  2836. declarations: [],
  2837. location:
  2838. { start: { offset: 76, line: 4, column: 29 },
  2839. end: { offset: 76, line: 4, column: 29 } } },
  2840. abstract: [ 'abstract', undefined ],
  2841. location:
  2842. { start: { offset: 52, line: 4, column: 5 },
  2843. end: { offset: 77, line: 4, column: 30 } } },
  2844. { type: 'ParticipantDeclaration',
  2845. id: { type: 'Identifier', name: 'Participant' },
  2846. classExtension: null,
  2847. idField: null,
  2848. body:
  2849. { type: 'ClassDeclarationBody',
  2850. declarations: [],
  2851. location:
  2852. { start: { offset: 120, line: 6, column: 42 },
  2853. end: { offset: 120, line: 6, column: 42 } } },
  2854. abstract: [ 'abstract', undefined ],
  2855. location:
  2856. { start: { offset: 83, line: 6, column: 5 },
  2857. end: { offset: 121, line: 6, column: 43 } } },
  2858. { type: 'TransactionDeclaration',
  2859. id: { type: 'Identifier', name: 'Transaction' },
  2860. classExtension: null,
  2861. body:
  2862. { type: 'ClassDeclarationBody',
  2863. declarations:
  2864. [ { type: 'FieldDeclaration',
  2865. id: { type: 'Identifier', name: 'transactionId' },
  2866. propertyType: { name: 'String' },
  2867. array: null,
  2868. regex: null,
  2869. default: null,
  2870. optional: null,
  2871. location: { start: [Object], end: [Object] } },
  2872. { type: 'FieldDeclaration',
  2873. id: { type: 'Identifier', name: 'timestamp' },
  2874. propertyType: { name: 'DateTime' },
  2875. array: null,
  2876. default: null,
  2877. optional: null,
  2878. location: { start: [Object], end: [Object] } } ],
  2879. location:
  2880. { start: { offset: 195, line: 9, column: 7 },
  2881. end: { offset: 249, line: 11, column: 5 } } },
  2882. idField: { type: 'Identifier', name: 'transactionId' },
  2883. abstract: [ 'abstract', undefined ],
  2884. location:
  2885. { start: { offset: 127, line: 8, column: 5 },
  2886. end: { offset: 250, line: 11, column: 6 } } },
  2887. { type: 'EventDeclaration',
  2888. id: { type: 'Identifier', name: 'Event' },
  2889. classExtension: null,
  2890. body:
  2891. { type: 'ClassDeclarationBody',
  2892. declarations:
  2893. [ { type: 'FieldDeclaration',
  2894. id: { type: 'Identifier', name: 'eventId' },
  2895. propertyType: { name: 'String' },
  2896. array: null,
  2897. regex: null,
  2898. default: null,
  2899. optional: null,
  2900. location: { start: [Object], end: [Object] } },
  2901. { type: 'FieldDeclaration',
  2902. id: { type: 'Identifier', name: 'timestamp' },
  2903. propertyType: { name: 'DateTime' },
  2904. array: null,
  2905. default: null,
  2906. optional: null,
  2907. location: { start: [Object], end: [Object] } } ],
  2908. location:
  2909. { start: { offset: 306, line: 14, column: 7 },
  2910. end: { offset: 354, line: 16, column: 5 } } },
  2911. idField: { type: 'Identifier', name: 'eventId' },
  2912. abstract: [ 'abstract', undefined ],
  2913. location:
  2914. { start: { offset: 256, line: 13, column: 5 },
  2915. end: { offset: 355, line: 16, column: 6 } } } ] },
  2916. namespace: 'org.hyperledger.composer.system' },
  2917. 'org.acme.sample':
  2918. ModelFile {
  2919. modelManager: [Circular],
  2920. declarations:
  2921. [ AssetDeclaration {
  2922. ast:
  2923. { type: 'AssetDeclaration',
  2924. id: { type: 'Identifier', name: 'SampleAsset' },
  2925. classExtension: null,
  2926. idField: { type: 'Identifier', name: 'assetId' },
  2927. body:
  2928. { type: 'ClassDeclarationBody',
  2929. declarations:
  2930. [ { type: 'FieldDeclaration',
  2931. id: { type: 'Identifier', name: 'assetId' },
  2932. propertyType: { name: 'String' },
  2933. array: null,
  2934. regex: null,
  2935. default: null,
  2936. optional: null,
  2937. location: { start: [Object], end: [Object] } },
  2938. { type: 'RelationshipDeclaration',
  2939. id: { type: 'Identifier', name: 'owner' },
  2940. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  2941. array: null,
  2942. optional: null,
  2943. location: { start: [Object], end: [Object] } },
  2944. { type: 'FieldDeclaration',
  2945. id: { type: 'Identifier', name: 'value' },
  2946. propertyType: { name: 'String' },
  2947. array: null,
  2948. regex: null,
  2949. default: null,
  2950. optional: null,
  2951. location: { start: [Object], end: [Object] } } ],
  2952. location:
  2953. { start: { offset: 118, line: 7, column: 3 },
  2954. end: { offset: 182, line: 10, column: 1 } } },
  2955. abstract: null,
  2956. location:
  2957. { start: { offset: 74, line: 6, column: 1 },
  2958. end: { offset: 183, line: 10, column: 2 } } },
  2959. modelFile: [Circular],
  2960. name: 'SampleAsset',
  2961. properties:
  2962. [ Field {
  2963. ast:
  2964. { type: 'FieldDeclaration',
  2965. id: { type: 'Identifier', name: 'assetId' },
  2966. propertyType: { name: 'String' },
  2967. array: null,
  2968. regex: null,
  2969. default: null,
  2970. optional: null,
  2971. location:
  2972. { start: { offset: 118, line: 7, column: 3 },
  2973. end: { offset: 137, line: 8, column: 3 } } },
  2974. parent: [Circular],
  2975. name: 'assetId',
  2976. type: 'String',
  2977. array: false,
  2978. optional: false,
  2979. validator: null,
  2980. defaultValue: null },
  2981. RelationshipDeclaration {
  2982. ast:
  2983. { type: 'RelationshipDeclaration',
  2984. id: { type: 'Identifier', name: 'owner' },
  2985. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  2986. array: null,
  2987. optional: null,
  2988. location:
  2989. { start: { offset: 137, line: 8, column: 3 },
  2990. end: { offset: 167, line: 9, column: 3 } } },
  2991. parent: [Circular],
  2992. name: 'owner',
  2993. type: 'SampleParticipant',
  2994. array: false,
  2995. optional: false },
  2996. Field {
  2997. ast:
  2998. { type: 'FieldDeclaration',
  2999. id: { type: 'Identifier', name: 'value' },
  3000. propertyType: { name: 'String' },
  3001. array: null,
  3002. regex: null,
  3003. default: null,
  3004. optional: null,
  3005. location:
  3006. { start: { offset: 167, line: 9, column: 3 },
  3007. end: { offset: 182, line: 10, column: 1 } } },
  3008. parent: [Circular],
  3009. name: 'value',
  3010. type: 'String',
  3011. array: false,
  3012. optional: false,
  3013. validator: null,
  3014. defaultValue: null } ],
  3015. superType: 'Asset',
  3016. idField: 'assetId',
  3017. abstract: false },
  3018. ParticipantDeclaration {
  3019. ast:
  3020. { type: 'ParticipantDeclaration',
  3021. id: { type: 'Identifier', name: 'SampleParticipant' },
  3022. classExtension: null,
  3023. idField: { type: 'Identifier', name: 'participantId' },
  3024. body:
  3025. { type: 'ClassDeclarationBody',
  3026. declarations:
  3027. [ { type: 'FieldDeclaration',
  3028. id: { type: 'Identifier', name: 'participantId' },
  3029. propertyType: { name: 'String' },
  3030. array: null,
  3031. regex: null,
  3032. default: null,
  3033. optional: null,
  3034. location: { start: [Object], end: [Object] } },
  3035. { type: 'FieldDeclaration',
  3036. id: { type: 'Identifier', name: 'firstName' },
  3037. propertyType: { name: 'String' },
  3038. array: null,
  3039. regex: null,
  3040. default: null,
  3041. optional: null,
  3042. location: { start: [Object], end: [Object] } },
  3043. { type: 'FieldDeclaration',
  3044. id: { type: 'Identifier', name: 'lastName' },
  3045. propertyType: { name: 'String' },
  3046. array: null,
  3047. regex: null,
  3048. default: null,
  3049. optional: null,
  3050. location: { start: [Object], end: [Object] } } ],
  3051. location:
  3052. { start: { offset: 247, line: 13, column: 3 },
  3053. end: { offset: 311, line: 16, column: 1 } } },
  3054. abstract: null,
  3055. location:
  3056. { start: { offset: 185, line: 12, column: 1 },
  3057. end: { offset: 312, line: 16, column: 2 } } },
  3058. modelFile: [Circular],
  3059. name: 'SampleParticipant',
  3060. properties:
  3061. [ Field {
  3062. ast:
  3063. { type: 'FieldDeclaration',
  3064. id: { type: 'Identifier', name: 'participantId' },
  3065. propertyType: { name: 'String' },
  3066. array: null,
  3067. regex: null,
  3068. default: null,
  3069. optional: null,
  3070. location:
  3071. { start: { offset: 247, line: 13, column: 3 },
  3072. end: { offset: 272, line: 14, column: 3 } } },
  3073. parent: [Circular],
  3074. name: 'participantId',
  3075. type: 'String',
  3076. array: false,
  3077. optional: false,
  3078. validator: null,
  3079. defaultValue: null },
  3080. Field {
  3081. ast:
  3082. { type: 'FieldDeclaration',
  3083. id: { type: 'Identifier', name: 'firstName' },
  3084. propertyType: { name: 'String' },
  3085. array: null,
  3086. regex: null,
  3087. default: null,
  3088. optional: null,
  3089. location:
  3090. { start: { offset: 272, line: 14, column: 3 },
  3091. end: { offset: 293, line: 15, column: 3 } } },
  3092. parent: [Circular],
  3093. name: 'firstName',
  3094. type: 'String',
  3095. array: false,
  3096. optional: false,
  3097. validator: null,
  3098. defaultValue: null },
  3099. Field {
  3100. ast:
  3101. { type: 'FieldDeclaration',
  3102. id: { type: 'Identifier', name: 'lastName' },
  3103. propertyType: { name: 'String' },
  3104. array: null,
  3105. regex: null,
  3106. default: null,
  3107. optional: null,
  3108. location:
  3109. { start: { offset: 293, line: 15, column: 3 },
  3110. end: { offset: 311, line: 16, column: 1 } } },
  3111. parent: [Circular],
  3112. name: 'lastName',
  3113. type: 'String',
  3114. array: false,
  3115. optional: false,
  3116. validator: null,
  3117. defaultValue: null } ],
  3118. superType: 'Participant',
  3119. idField: 'participantId',
  3120. abstract: false },
  3121. TransactionDeclaration {
  3122. ast:
  3123. { type: 'TransactionDeclaration',
  3124. id: { type: 'Identifier', name: 'SampleTransaction' },
  3125. classExtension: null,
  3126. body:
  3127. { type: 'ClassDeclarationBody',
  3128. declarations:
  3129. [ { type: 'RelationshipDeclaration',
  3130. id: { type: 'Identifier', name: 'asset' },
  3131. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  3132. array: null,
  3133. optional: null,
  3134. location: { start: [Object], end: [Object] } },
  3135. { type: 'FieldDeclaration',
  3136. id: { type: 'Identifier', name: 'newValue' },
  3137. propertyType: { name: 'String' },
  3138. array: null,
  3139. regex: null,
  3140. default: null,
  3141. optional: null,
  3142. location: { start: [Object], end: [Object] } } ],
  3143. location:
  3144. { start: { offset: 348, line: 19, column: 3 },
  3145. end: { offset: 390, line: 21, column: 1 } } },
  3146. idField: null,
  3147. abstract: null,
  3148. location:
  3149. { start: { offset: 314, line: 18, column: 1 },
  3150. end: { offset: 391, line: 21, column: 2 } } },
  3151. modelFile: [Circular],
  3152. name: 'SampleTransaction',
  3153. properties:
  3154. [ RelationshipDeclaration {
  3155. ast:
  3156. { type: 'RelationshipDeclaration',
  3157. id: { type: 'Identifier', name: 'asset' },
  3158. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  3159. array: null,
  3160. optional: null,
  3161. location:
  3162. { start: { offset: 348, line: 19, column: 3 },
  3163. end: { offset: 372, line: 20, column: 3 } } },
  3164. parent: [Circular],
  3165. name: 'asset',
  3166. type: 'SampleAsset',
  3167. array: false,
  3168. optional: false },
  3169. Field {
  3170. ast:
  3171. { type: 'FieldDeclaration',
  3172. id: { type: 'Identifier', name: 'newValue' },
  3173. propertyType: { name: 'String' },
  3174. array: null,
  3175. regex: null,
  3176. default: null,
  3177. optional: null,
  3178. location:
  3179. { start: { offset: 372, line: 20, column: 3 },
  3180. end: { offset: 390, line: 21, column: 1 } } },
  3181. parent: [Circular],
  3182. name: 'newValue',
  3183. type: 'String',
  3184. array: false,
  3185. optional: false,
  3186. validator: null,
  3187. defaultValue: null } ],
  3188. superType: 'Transaction',
  3189. idField: null,
  3190. abstract: false },
  3191. EventDeclaration {
  3192. ast:
  3193. { type: 'EventDeclaration',
  3194. id: { type: 'Identifier', name: 'SampleEvent' },
  3195. classExtension: null,
  3196. body:
  3197. { type: 'ClassDeclarationBody',
  3198. declarations:
  3199. [ { type: 'RelationshipDeclaration',
  3200. id: { type: 'Identifier', name: 'asset' },
  3201. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  3202. array: null,
  3203. optional: null,
  3204. location: { start: [Object], end: [Object] } },
  3205. { type: 'FieldDeclaration',
  3206. id: { type: 'Identifier', name: 'oldValue' },
  3207. propertyType: { name: 'String' },
  3208. array: null,
  3209. regex: null,
  3210. default: null,
  3211. optional: null,
  3212. location: { start: [Object], end: [Object] } },
  3213. { type: 'FieldDeclaration',
  3214. id: { type: 'Identifier', name: 'newValue' },
  3215. propertyType: { name: 'String' },
  3216. array: null,
  3217. regex: null,
  3218. default: null,
  3219. optional: null,
  3220. location: { start: [Object], end: [Object] } } ],
  3221. location:
  3222. { start: { offset: 415, line: 24, column: 3 },
  3223. end: { offset: 477, line: 27, column: 1 } } },
  3224. idField: null,
  3225. abstract: null,
  3226. location:
  3227. { start: { offset: 393, line: 23, column: 1 },
  3228. end: { offset: 478, line: 27, column: 2 } } },
  3229. modelFile: [Circular],
  3230. name: 'SampleEvent',
  3231. properties:
  3232. [ RelationshipDeclaration {
  3233. ast:
  3234. { type: 'RelationshipDeclaration',
  3235. id: { type: 'Identifier', name: 'asset' },
  3236. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  3237. array: null,
  3238. optional: null,
  3239. location:
  3240. { start: { offset: 415, line: 24, column: 3 },
  3241. end: { offset: 439, line: 25, column: 3 } } },
  3242. parent: [Circular],
  3243. name: 'asset',
  3244. type: 'SampleAsset',
  3245. array: false,
  3246. optional: false },
  3247. Field {
  3248. ast:
  3249. { type: 'FieldDeclaration',
  3250. id: { type: 'Identifier', name: 'oldValue' },
  3251. propertyType: { name: 'String' },
  3252. array: null,
  3253. regex: null,
  3254. default: null,
  3255. optional: null,
  3256. location:
  3257. { start: { offset: 439, line: 25, column: 3 },
  3258. end: { offset: 459, line: 26, column: 3 } } },
  3259. parent: [Circular],
  3260. name: 'oldValue',
  3261. type: 'String',
  3262. array: false,
  3263. optional: false,
  3264. validator: null,
  3265. defaultValue: null },
  3266. Field {
  3267. ast:
  3268. { type: 'FieldDeclaration',
  3269. id: { type: 'Identifier', name: 'newValue' },
  3270. propertyType: { name: 'String' },
  3271. array: null,
  3272. regex: null,
  3273. default: null,
  3274. optional: null,
  3275. location:
  3276. { start: { offset: 459, line: 26, column: 3 },
  3277. end: { offset: 477, line: 27, column: 1 } } },
  3278. parent: [Circular],
  3279. name: 'newValue',
  3280. type: 'String',
  3281. array: false,
  3282. optional: false,
  3283. validator: null,
  3284. defaultValue: null } ],
  3285. superType: 'Event',
  3286. idField: null,
  3287. abstract: false } ],
  3288. imports:
  3289. [ 'org.hyperledger.composer.system.Event',
  3290. 'org.hyperledger.composer.system.Transaction',
  3291. 'org.hyperledger.composer.system.Participant',
  3292. 'org.hyperledger.composer.system.Asset' ],
  3293. fileName: 'models/sample.cto',
  3294. definitions: '/**\n * Sample business network definition.\n */\nnamespace org.acme.sample\n\nasset SampleAsset identified by assetId {\n o String assetId\n --> SampleParticipant owner\n o String value\n}\n\nparticipant SampleParticipant identified by participantId {\n o String participantId\n o String firstName\n o String lastName\n}\n\ntransaction SampleTransaction {\n --> SampleAsset asset\n o String newValue\n}\n\nevent SampleEvent {\n --> SampleAsset asset\n o String oldValue\n o String newValue\n}\n',
  3295. ast:
  3296. { type: 'Program',
  3297. namespace: 'org.acme.sample',
  3298. imports:
  3299. [ 'org.hyperledger.composer.system.Event',
  3300. 'org.hyperledger.composer.system.Transaction',
  3301. 'org.hyperledger.composer.system.Participant',
  3302. 'org.hyperledger.composer.system.Asset' ],
  3303. body:
  3304. [ { type: 'AssetDeclaration',
  3305. id: { type: 'Identifier', name: 'SampleAsset' },
  3306. classExtension: null,
  3307. idField: { type: 'Identifier', name: 'assetId' },
  3308. body:
  3309. { type: 'ClassDeclarationBody',
  3310. declarations:
  3311. [ { type: 'FieldDeclaration',
  3312. id: { type: 'Identifier', name: 'assetId' },
  3313. propertyType: { name: 'String' },
  3314. array: null,
  3315. regex: null,
  3316. default: null,
  3317. optional: null,
  3318. location: { start: [Object], end: [Object] } },
  3319. { type: 'RelationshipDeclaration',
  3320. id: { type: 'Identifier', name: 'owner' },
  3321. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  3322. array: null,
  3323. optional: null,
  3324. location: { start: [Object], end: [Object] } },
  3325. { type: 'FieldDeclaration',
  3326. id: { type: 'Identifier', name: 'value' },
  3327. propertyType: { name: 'String' },
  3328. array: null,
  3329. regex: null,
  3330. default: null,
  3331. optional: null,
  3332. location: { start: [Object], end: [Object] } } ],
  3333. location:
  3334. { start: { offset: 118, line: 7, column: 3 },
  3335. end: { offset: 182, line: 10, column: 1 } } },
  3336. abstract: null,
  3337. location:
  3338. { start: { offset: 74, line: 6, column: 1 },
  3339. end: { offset: 183, line: 10, column: 2 } } },
  3340. { type: 'ParticipantDeclaration',
  3341. id: { type: 'Identifier', name: 'SampleParticipant' },
  3342. classExtension: null,
  3343. idField: { type: 'Identifier', name: 'participantId' },
  3344. body:
  3345. { type: 'ClassDeclarationBody',
  3346. declarations:
  3347. [ { type: 'FieldDeclaration',
  3348. id: { type: 'Identifier', name: 'participantId' },
  3349. propertyType: { name: 'String' },
  3350. array: null,
  3351. regex: null,
  3352. default: null,
  3353. optional: null,
  3354. location: { start: [Object], end: [Object] } },
  3355. { type: 'FieldDeclaration',
  3356. id: { type: 'Identifier', name: 'firstName' },
  3357. propertyType: { name: 'String' },
  3358. array: null,
  3359. regex: null,
  3360. default: null,
  3361. optional: null,
  3362. location: { start: [Object], end: [Object] } },
  3363. { type: 'FieldDeclaration',
  3364. id: { type: 'Identifier', name: 'lastName' },
  3365. propertyType: { name: 'String' },
  3366. array: null,
  3367. regex: null,
  3368. default: null,
  3369. optional: null,
  3370. location: { start: [Object], end: [Object] } } ],
  3371. location:
  3372. { start: { offset: 247, line: 13, column: 3 },
  3373. end: { offset: 311, line: 16, column: 1 } } },
  3374. abstract: null,
  3375. location:
  3376. { start: { offset: 185, line: 12, column: 1 },
  3377. end: { offset: 312, line: 16, column: 2 } } },
  3378. { type: 'TransactionDeclaration',
  3379. id: { type: 'Identifier', name: 'SampleTransaction' },
  3380. classExtension: null,
  3381. body:
  3382. { type: 'ClassDeclarationBody',
  3383. declarations:
  3384. [ { type: 'RelationshipDeclaration',
  3385. id: { type: 'Identifier', name: 'asset' },
  3386. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  3387. array: null,
  3388. optional: null,
  3389. location: { start: [Object], end: [Object] } },
  3390. { type: 'FieldDeclaration',
  3391. id: { type: 'Identifier', name: 'newValue' },
  3392. propertyType: { name: 'String' },
  3393. array: null,
  3394. regex: null,
  3395. default: null,
  3396. optional: null,
  3397. location: { start: [Object], end: [Object] } } ],
  3398. location:
  3399. { start: { offset: 348, line: 19, column: 3 },
  3400. end: { offset: 390, line: 21, column: 1 } } },
  3401. idField: null,
  3402. abstract: null,
  3403. location:
  3404. { start: { offset: 314, line: 18, column: 1 },
  3405. end: { offset: 391, line: 21, column: 2 } } },
  3406. { type: 'EventDeclaration',
  3407. id: { type: 'Identifier', name: 'SampleEvent' },
  3408. classExtension: null,
  3409. body:
  3410. { type: 'ClassDeclarationBody',
  3411. declarations:
  3412. [ { type: 'RelationshipDeclaration',
  3413. id: { type: 'Identifier', name: 'asset' },
  3414. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  3415. array: null,
  3416. optional: null,
  3417. location: { start: [Object], end: [Object] } },
  3418. { type: 'FieldDeclaration',
  3419. id: { type: 'Identifier', name: 'oldValue' },
  3420. propertyType: { name: 'String' },
  3421. array: null,
  3422. regex: null,
  3423. default: null,
  3424. optional: null,
  3425. location: { start: [Object], end: [Object] } },
  3426. { type: 'FieldDeclaration',
  3427. id: { type: 'Identifier', name: 'newValue' },
  3428. propertyType: { name: 'String' },
  3429. array: null,
  3430. regex: null,
  3431. default: null,
  3432. optional: null,
  3433. location: { start: [Object], end: [Object] } } ],
  3434. location:
  3435. { start: { offset: 415, line: 24, column: 3 },
  3436. end: { offset: 477, line: 27, column: 1 } } },
  3437. idField: null,
  3438. abstract: null,
  3439. location:
  3440. { start: { offset: 393, line: 23, column: 1 },
  3441. end: { offset: 478, line: 27, column: 2 } } } ] },
  3442. namespace: 'org.acme.sample' } } },
  3443. '$namespace': 'org.acme.sample',
  3444. '$type': 'SampleEvent',
  3445. '$identifier': 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
  3446. '$validator': ResourceValidator {},
  3447. eventId: 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
  3448. timestamp: 2017-07-10T15:18:37.627Z,
  3449. asset:
  3450. Relationship {
  3451. '$modelManager':
  3452. ModelManager {
  3453. modelFiles:
  3454. { 'org.hyperledger.composer.system':
  3455. ModelFile {
  3456. modelManager: [Circular],
  3457. declarations:
  3458. [ AssetDeclaration {
  3459. ast:
  3460. { type: 'AssetDeclaration',
  3461. id: { type: 'Identifier', name: 'Asset' },
  3462. classExtension: null,
  3463. idField: null,
  3464. body:
  3465. { type: 'ClassDeclarationBody',
  3466. declarations: [],
  3467. location:
  3468. { start: { offset: 76, line: 4, column: 29 },
  3469. end: { offset: 76, line: 4, column: 29 } } },
  3470. abstract: [ 'abstract', undefined ],
  3471. location:
  3472. { start: { offset: 52, line: 4, column: 5 },
  3473. end: { offset: 77, line: 4, column: 30 } } },
  3474. modelFile: [Circular],
  3475. name: 'Asset',
  3476. properties: [],
  3477. superType: null,
  3478. idField: null,
  3479. abstract: true },
  3480. ParticipantDeclaration {
  3481. ast:
  3482. { type: 'ParticipantDeclaration',
  3483. id: { type: 'Identifier', name: 'Participant' },
  3484. classExtension: null,
  3485. idField: null,
  3486. body:
  3487. { type: 'ClassDeclarationBody',
  3488. declarations: [],
  3489. location:
  3490. { start: { offset: 120, line: 6, column: 42 },
  3491. end: { offset: 120, line: 6, column: 42 } } },
  3492. abstract: [ 'abstract', undefined ],
  3493. location:
  3494. { start: { offset: 83, line: 6, column: 5 },
  3495. end: { offset: 121, line: 6, column: 43 } } },
  3496. modelFile: [Circular],
  3497. name: 'Participant',
  3498. properties: [],
  3499. superType: null,
  3500. idField: null,
  3501. abstract: true },
  3502. TransactionDeclaration {
  3503. ast:
  3504. { type: 'TransactionDeclaration',
  3505. id: { type: 'Identifier', name: 'Transaction' },
  3506. classExtension: null,
  3507. body:
  3508. { type: 'ClassDeclarationBody',
  3509. declarations:
  3510. [ { type: 'FieldDeclaration',
  3511. id: [Object],
  3512. propertyType: [Object],
  3513. array: null,
  3514. regex: null,
  3515. default: null,
  3516. optional: null,
  3517. location: [Object] },
  3518. { type: 'FieldDeclaration',
  3519. id: [Object],
  3520. propertyType: [Object],
  3521. array: null,
  3522. default: null,
  3523. optional: null,
  3524. location: [Object] } ],
  3525. location:
  3526. { start: { offset: 195, line: 9, column: 7 },
  3527. end: { offset: 249, line: 11, column: 5 } } },
  3528. idField: { type: 'Identifier', name: 'transactionId' },
  3529. abstract: [ 'abstract', undefined ],
  3530. location:
  3531. { start: { offset: 127, line: 8, column: 5 },
  3532. end: { offset: 250, line: 11, column: 6 } } },
  3533. modelFile: [Circular],
  3534. name: 'Transaction',
  3535. properties:
  3536. [ Field {
  3537. ast:
  3538. { type: 'FieldDeclaration',
  3539. id: { type: 'Identifier', name: 'transactionId' },
  3540. propertyType: { name: 'String' },
  3541. array: null,
  3542. regex: null,
  3543. default: null,
  3544. optional: null,
  3545. location: { start: [Object], end: [Object] } },
  3546. parent: [Circular],
  3547. name: 'transactionId',
  3548. type: 'String',
  3549. array: false,
  3550. optional: false,
  3551. validator: null,
  3552. defaultValue: null },
  3553. Field {
  3554. ast:
  3555. { type: 'FieldDeclaration',
  3556. id: { type: 'Identifier', name: 'timestamp' },
  3557. propertyType: { name: 'DateTime' },
  3558. array: null,
  3559. default: null,
  3560. optional: null,
  3561. location: { start: [Object], end: [Object] } },
  3562. parent: [Circular],
  3563. name: 'timestamp',
  3564. type: 'DateTime',
  3565. array: false,
  3566. optional: false,
  3567. validator: null,
  3568. defaultValue: null } ],
  3569. superType: null,
  3570. idField: 'transactionId',
  3571. abstract: true },
  3572. EventDeclaration {
  3573. ast:
  3574. { type: 'EventDeclaration',
  3575. id: { type: 'Identifier', name: 'Event' },
  3576. classExtension: null,
  3577. body:
  3578. { type: 'ClassDeclarationBody',
  3579. declarations:
  3580. [ { type: 'FieldDeclaration',
  3581. id: [Object],
  3582. propertyType: [Object],
  3583. array: null,
  3584. regex: null,
  3585. default: null,
  3586. optional: null,
  3587. location: [Object] },
  3588. { type: 'FieldDeclaration',
  3589. id: [Object],
  3590. propertyType: [Object],
  3591. array: null,
  3592. default: null,
  3593. optional: null,
  3594. location: [Object] } ],
  3595. location:
  3596. { start: { offset: 306, line: 14, column: 7 },
  3597. end: { offset: 354, line: 16, column: 5 } } },
  3598. idField: { type: 'Identifier', name: 'eventId' },
  3599. abstract: [ 'abstract', undefined ],
  3600. location:
  3601. { start: { offset: 256, line: 13, column: 5 },
  3602. end: { offset: 355, line: 16, column: 6 } } },
  3603. modelFile: [Circular],
  3604. name: 'Event',
  3605. properties:
  3606. [ Field {
  3607. ast:
  3608. { type: 'FieldDeclaration',
  3609. id: { type: 'Identifier', name: 'eventId' },
  3610. propertyType: { name: 'String' },
  3611. array: null,
  3612. regex: null,
  3613. default: null,
  3614. optional: null,
  3615. location: { start: [Object], end: [Object] } },
  3616. parent: [Circular],
  3617. name: 'eventId',
  3618. type: 'String',
  3619. array: false,
  3620. optional: false,
  3621. validator: null,
  3622. defaultValue: null },
  3623. Field {
  3624. ast:
  3625. { type: 'FieldDeclaration',
  3626. id: { type: 'Identifier', name: 'timestamp' },
  3627. propertyType: { name: 'DateTime' },
  3628. array: null,
  3629. default: null,
  3630. optional: null,
  3631. location: { start: [Object], end: [Object] } },
  3632. parent: [Circular],
  3633. name: 'timestamp',
  3634. type: 'DateTime',
  3635. array: false,
  3636. optional: false,
  3637. validator: null,
  3638. defaultValue: null } ],
  3639. superType: null,
  3640. idField: 'eventId',
  3641. abstract: true } ],
  3642. imports: [],
  3643. fileName: undefined,
  3644. definitions: '\n namespace org.hyperledger.composer.system\n\n abstract asset Asset { }\n\n abstract participant Participant { }\n\n abstract transaction Transaction identified by transactionId{\n o String transactionId\n o DateTime timestamp\n }\n\n abstract event Event identified by eventId{\n o String eventId\n o DateTime timestamp\n }\n',
  3645. ast:
  3646. { type: 'Program',
  3647. namespace: 'org.hyperledger.composer.system',
  3648. imports: [],
  3649. body:
  3650. [ { type: 'AssetDeclaration',
  3651. id: { type: 'Identifier', name: 'Asset' },
  3652. classExtension: null,
  3653. idField: null,
  3654. body:
  3655. { type: 'ClassDeclarationBody',
  3656. declarations: [],
  3657. location:
  3658. { start: { offset: 76, line: 4, column: 29 },
  3659. end: { offset: 76, line: 4, column: 29 } } },
  3660. abstract: [ 'abstract', undefined ],
  3661. location:
  3662. { start: { offset: 52, line: 4, column: 5 },
  3663. end: { offset: 77, line: 4, column: 30 } } },
  3664. { type: 'ParticipantDeclaration',
  3665. id: { type: 'Identifier', name: 'Participant' },
  3666. classExtension: null,
  3667. idField: null,
  3668. body:
  3669. { type: 'ClassDeclarationBody',
  3670. declarations: [],
  3671. location:
  3672. { start: { offset: 120, line: 6, column: 42 },
  3673. end: { offset: 120, line: 6, column: 42 } } },
  3674. abstract: [ 'abstract', undefined ],
  3675. location:
  3676. { start: { offset: 83, line: 6, column: 5 },
  3677. end: { offset: 121, line: 6, column: 43 } } },
  3678. { type: 'TransactionDeclaration',
  3679. id: { type: 'Identifier', name: 'Transaction' },
  3680. classExtension: null,
  3681. body:
  3682. { type: 'ClassDeclarationBody',
  3683. declarations:
  3684. [ { type: 'FieldDeclaration',
  3685. id: [Object],
  3686. propertyType: [Object],
  3687. array: null,
  3688. regex: null,
  3689. default: null,
  3690. optional: null,
  3691. location: [Object] },
  3692. { type: 'FieldDeclaration',
  3693. id: [Object],
  3694. propertyType: [Object],
  3695. array: null,
  3696. default: null,
  3697. optional: null,
  3698. location: [Object] } ],
  3699. location:
  3700. { start: { offset: 195, line: 9, column: 7 },
  3701. end: { offset: 249, line: 11, column: 5 } } },
  3702. idField: { type: 'Identifier', name: 'transactionId' },
  3703. abstract: [ 'abstract', undefined ],
  3704. location:
  3705. { start: { offset: 127, line: 8, column: 5 },
  3706. end: { offset: 250, line: 11, column: 6 } } },
  3707. { type: 'EventDeclaration',
  3708. id: { type: 'Identifier', name: 'Event' },
  3709. classExtension: null,
  3710. body:
  3711. { type: 'ClassDeclarationBody',
  3712. declarations:
  3713. [ { type: 'FieldDeclaration',
  3714. id: [Object],
  3715. propertyType: [Object],
  3716. array: null,
  3717. regex: null,
  3718. default: null,
  3719. optional: null,
  3720. location: [Object] },
  3721. { type: 'FieldDeclaration',
  3722. id: [Object],
  3723. propertyType: [Object],
  3724. array: null,
  3725. default: null,
  3726. optional: null,
  3727. location: [Object] } ],
  3728. location:
  3729. { start: { offset: 306, line: 14, column: 7 },
  3730. end: { offset: 354, line: 16, column: 5 } } },
  3731. idField: { type: 'Identifier', name: 'eventId' },
  3732. abstract: [ 'abstract', undefined ],
  3733. location:
  3734. { start: { offset: 256, line: 13, column: 5 },
  3735. end: { offset: 355, line: 16, column: 6 } } } ] },
  3736. namespace: 'org.hyperledger.composer.system' },
  3737. 'org.acme.sample':
  3738. ModelFile {
  3739. modelManager: [Circular],
  3740. declarations:
  3741. [ AssetDeclaration {
  3742. ast:
  3743. { type: 'AssetDeclaration',
  3744. id: { type: 'Identifier', name: 'SampleAsset' },
  3745. classExtension: null,
  3746. idField: { type: 'Identifier', name: 'assetId' },
  3747. body:
  3748. { type: 'ClassDeclarationBody',
  3749. declarations:
  3750. [ { type: 'FieldDeclaration',
  3751. id: [Object],
  3752. propertyType: [Object],
  3753. array: null,
  3754. regex: null,
  3755. default: null,
  3756. optional: null,
  3757. location: [Object] },
  3758. { type: 'RelationshipDeclaration',
  3759. id: [Object],
  3760. propertyType: [Object],
  3761. array: null,
  3762. optional: null,
  3763. location: [Object] },
  3764. { type: 'FieldDeclaration',
  3765. id: [Object],
  3766. propertyType: [Object],
  3767. array: null,
  3768. regex: null,
  3769. default: null,
  3770. optional: null,
  3771. location: [Object] } ],
  3772. location:
  3773. { start: { offset: 118, line: 7, column: 3 },
  3774. end: { offset: 182, line: 10, column: 1 } } },
  3775. abstract: null,
  3776. location:
  3777. { start: { offset: 74, line: 6, column: 1 },
  3778. end: { offset: 183, line: 10, column: 2 } } },
  3779. modelFile: [Circular],
  3780. name: 'SampleAsset',
  3781. properties:
  3782. [ Field {
  3783. ast:
  3784. { type: 'FieldDeclaration',
  3785. id: { type: 'Identifier', name: 'assetId' },
  3786. propertyType: { name: 'String' },
  3787. array: null,
  3788. regex: null,
  3789. default: null,
  3790. optional: null,
  3791. location: { start: [Object], end: [Object] } },
  3792. parent: [Circular],
  3793. name: 'assetId',
  3794. type: 'String',
  3795. array: false,
  3796. optional: false,
  3797. validator: null,
  3798. defaultValue: null },
  3799. RelationshipDeclaration {
  3800. ast:
  3801. { type: 'RelationshipDeclaration',
  3802. id: { type: 'Identifier', name: 'owner' },
  3803. propertyType: { type: 'Identifier', name: 'SampleParticipant' },
  3804. array: null,
  3805. optional: null,
  3806. location: { start: [Object], end: [Object] } },
  3807. parent: [Circular],
  3808. name: 'owner',
  3809. type: 'SampleParticipant',
  3810. array: false,
  3811. optional: false },
  3812. Field {
  3813. ast:
  3814. { type: 'FieldDeclaration',
  3815. id: { type: 'Identifier', name: 'value' },
  3816. propertyType: { name: 'String' },
  3817. array: null,
  3818. regex: null,
  3819. default: null,
  3820. optional: null,
  3821. location: { start: [Object], end: [Object] } },
  3822. parent: [Circular],
  3823. name: 'value',
  3824. type: 'String',
  3825. array: false,
  3826. optional: false,
  3827. validator: null,
  3828. defaultValue: null } ],
  3829. superType: 'Asset',
  3830. idField: 'assetId',
  3831. abstract: false },
  3832. ParticipantDeclaration {
  3833. ast:
  3834. { type: 'ParticipantDeclaration',
  3835. id: { type: 'Identifier', name: 'SampleParticipant' },
  3836. classExtension: null,
  3837. idField: { type: 'Identifier', name: 'participantId' },
  3838. body:
  3839. { type: 'ClassDeclarationBody',
  3840. declarations:
  3841. [ { type: 'FieldDeclaration',
  3842. id: [Object],
  3843. propertyType: [Object],
  3844. array: null,
  3845. regex: null,
  3846. default: null,
  3847. optional: null,
  3848. location: [Object] },
  3849. { type: 'FieldDeclaration',
  3850. id: [Object],
  3851. propertyType: [Object],
  3852. array: null,
  3853. regex: null,
  3854. default: null,
  3855. optional: null,
  3856. location: [Object] },
  3857. { type: 'FieldDeclaration',
  3858. id: [Object],
  3859. propertyType: [Object],
  3860. array: null,
  3861. regex: null,
  3862. default: null,
  3863. optional: null,
  3864. location: [Object] } ],
  3865. location:
  3866. { start: { offset: 247, line: 13, column: 3 },
  3867. end: { offset: 311, line: 16, column: 1 } } },
  3868. abstract: null,
  3869. location:
  3870. { start: { offset: 185, line: 12, column: 1 },
  3871. end: { offset: 312, line: 16, column: 2 } } },
  3872. modelFile: [Circular],
  3873. name: 'SampleParticipant',
  3874. properties:
  3875. [ Field {
  3876. ast:
  3877. { type: 'FieldDeclaration',
  3878. id: { type: 'Identifier', name: 'participantId' },
  3879. propertyType: { name: 'String' },
  3880. array: null,
  3881. regex: null,
  3882. default: null,
  3883. optional: null,
  3884. location: { start: [Object], end: [Object] } },
  3885. parent: [Circular],
  3886. name: 'participantId',
  3887. type: 'String',
  3888. array: false,
  3889. optional: false,
  3890. validator: null,
  3891. defaultValue: null },
  3892. Field {
  3893. ast:
  3894. { type: 'FieldDeclaration',
  3895. id: { type: 'Identifier', name: 'firstName' },
  3896. propertyType: { name: 'String' },
  3897. array: null,
  3898. regex: null,
  3899. default: null,
  3900. optional: null,
  3901. location: { start: [Object], end: [Object] } },
  3902. parent: [Circular],
  3903. name: 'firstName',
  3904. type: 'String',
  3905. array: false,
  3906. optional: false,
  3907. validator: null,
  3908. defaultValue: null },
  3909. Field {
  3910. ast:
  3911. { type: 'FieldDeclaration',
  3912. id: { type: 'Identifier', name: 'lastName' },
  3913. propertyType: { name: 'String' },
  3914. array: null,
  3915. regex: null,
  3916. default: null,
  3917. optional: null,
  3918. location: { start: [Object], end: [Object] } },
  3919. parent: [Circular],
  3920. name: 'lastName',
  3921. type: 'String',
  3922. array: false,
  3923. optional: false,
  3924. validator: null,
  3925. defaultValue: null } ],
  3926. superType: 'Participant',
  3927. idField: 'participantId',
  3928. abstract: false },
  3929. TransactionDeclaration {
  3930. ast:
  3931. { type: 'TransactionDeclaration',
  3932. id: { type: 'Identifier', name: 'SampleTransaction' },
  3933. classExtension: null,
  3934. body:
  3935. { type: 'ClassDeclarationBody',
  3936. declarations:
  3937. [ { type: 'RelationshipDeclaration',
  3938. id: [Object],
  3939. propertyType: [Object],
  3940. array: null,
  3941. optional: null,
  3942. location: [Object] },
  3943. { type: 'FieldDeclaration',
  3944. id: [Object],
  3945. propertyType: [Object],
  3946. array: null,
  3947. regex: null,
  3948. default: null,
  3949. optional: null,
  3950. location: [Object] } ],
  3951. location:
  3952. { start: { offset: 348, line: 19, column: 3 },
  3953. end: { offset: 390, line: 21, column: 1 } } },
  3954. idField: null,
  3955. abstract: null,
  3956. location:
  3957. { start: { offset: 314, line: 18, column: 1 },
  3958. end: { offset: 391, line: 21, column: 2 } } },
  3959. modelFile: [Circular],
  3960. name: 'SampleTransaction',
  3961. properties:
  3962. [ RelationshipDeclaration {
  3963. ast:
  3964. { type: 'RelationshipDeclaration',
  3965. id: { type: 'Identifier', name: 'asset' },
  3966. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  3967. array: null,
  3968. optional: null,
  3969. location: { start: [Object], end: [Object] } },
  3970. parent: [Circular],
  3971. name: 'asset',
  3972. type: 'SampleAsset',
  3973. array: false,
  3974. optional: false },
  3975. Field {
  3976. ast:
  3977. { type: 'FieldDeclaration',
  3978. id: { type: 'Identifier', name: 'newValue' },
  3979. propertyType: { name: 'String' },
  3980. array: null,
  3981. regex: null,
  3982. default: null,
  3983. optional: null,
  3984. location: { start: [Object], end: [Object] } },
  3985. parent: [Circular],
  3986. name: 'newValue',
  3987. type: 'String',
  3988. array: false,
  3989. optional: false,
  3990. validator: null,
  3991. defaultValue: null } ],
  3992. superType: 'Transaction',
  3993. idField: null,
  3994. abstract: false },
  3995. EventDeclaration {
  3996. ast:
  3997. { type: 'EventDeclaration',
  3998. id: { type: 'Identifier', name: 'SampleEvent' },
  3999. classExtension: null,
  4000. body:
  4001. { type: 'ClassDeclarationBody',
  4002. declarations:
  4003. [ { type: 'RelationshipDeclaration',
  4004. id: [Object],
  4005. propertyType: [Object],
  4006. array: null,
  4007. optional: null,
  4008. location: [Object] },
  4009. { type: 'FieldDeclaration',
  4010. id: [Object],
  4011. propertyType: [Object],
  4012. array: null,
  4013. regex: null,
  4014. default: null,
  4015. optional: null,
  4016. location: [Object] },
  4017. { type: 'FieldDeclaration',
  4018. id: [Object],
  4019. propertyType: [Object],
  4020. array: null,
  4021. regex: null,
  4022. default: null,
  4023. optional: null,
  4024. location: [Object] } ],
  4025. location:
  4026. { start: { offset: 415, line: 24, column: 3 },
  4027. end: { offset: 477, line: 27, column: 1 } } },
  4028. idField: null,
  4029. abstract: null,
  4030. location:
  4031. { start: { offset: 393, line: 23, column: 1 },
  4032. end: { offset: 478, line: 27, column: 2 } } },
  4033. modelFile: [Circular],
  4034. name: 'SampleEvent',
  4035. properties:
  4036. [ RelationshipDeclaration {
  4037. ast:
  4038. { type: 'RelationshipDeclaration',
  4039. id: { type: 'Identifier', name: 'asset' },
  4040. propertyType: { type: 'Identifier', name: 'SampleAsset' },
  4041. array: null,
  4042. optional: null,
  4043. location: { start: [Object], end: [Object] } },
  4044. parent: [Circular],
  4045. name: 'asset',
  4046. type: 'SampleAsset',
  4047. array: false,
  4048. optional: false },
  4049. Field {
  4050. ast:
  4051. { type: 'FieldDeclaration',
  4052. id: { type: 'Identifier', name: 'oldValue' },
  4053. propertyType: { name: 'String' },
  4054. array: null,
  4055. regex: null,
  4056. default: null,
  4057. optional: null,
  4058. location: { start: [Object], end: [Object] } },
  4059. parent: [Circular],
  4060. name: 'oldValue',
  4061. type: 'String',
  4062. array: false,
  4063. optional: false,
  4064. validator: null,
  4065. defaultValue: null },
  4066. Field {
  4067. ast:
  4068. { type: 'FieldDeclaration',
  4069. id: { type: 'Identifier', name: 'newValue' },
  4070. propertyType: { name: 'String' },
  4071. array: null,
  4072. regex: null,
  4073. default: null,
  4074. optional: null,
  4075. location: { start: [Object], end: [Object] } },
  4076. parent: [Circular],
  4077. name: 'newValue',
  4078. type: 'String',
  4079. array: false,
  4080. optional: false,
  4081. validator: null,
  4082. defaultValue: null } ],
  4083. superType: 'Event',
  4084. idField: null,
  4085. abstract: false } ],
  4086. imports:
  4087. [ 'org.hyperledger.composer.system.Event',
  4088. 'org.hyperledger.composer.system.Transaction',
  4089. 'org.hyperledger.composer.system.Participant',
  4090. 'org.hyperledger.composer.system.Asset' ],
  4091. fileName: 'models/sample.cto',
  4092. definitions: '/**\n * Sample business network definition.\n */\nnamespace org.acme.sample\n\nasset SampleAsset identified by assetId {\n o String assetId\n --> SampleParticipant owner\n o String value\n}\n\nparticipant SampleParticipant identified by participantId {\n o String participantId\n o String firstName\n o String lastName\n}\n\ntransaction SampleTransaction {\n --> SampleAsset asset\n o String newValue\n}\n\nevent SampleEvent {\n --> SampleAsset asset\n o String oldValue\n o String newValue\n}\n',
  4093. ast:
  4094. { type: 'Program',
  4095. namespace: 'org.acme.sample',
  4096. imports:
  4097. [ 'org.hyperledger.composer.system.Event',
  4098. 'org.hyperledger.composer.system.Transaction',
  4099. 'org.hyperledger.composer.system.Participant',
  4100. 'org.hyperledger.composer.system.Asset' ],
  4101. body:
  4102. [ { type: 'AssetDeclaration',
  4103. id: { type: 'Identifier', name: 'SampleAsset' },
  4104. classExtension: null,
  4105. idField: { type: 'Identifier', name: 'assetId' },
  4106. body:
  4107. { type: 'ClassDeclarationBody',
  4108. declarations:
  4109. [ { type: 'FieldDeclaration',
  4110. id: [Object],
  4111. propertyType: [Object],
  4112. array: null,
  4113. regex: null,
  4114. default: null,
  4115. optional: null,
  4116. location: [Object] },
  4117. { type: 'RelationshipDeclaration',
  4118. id: [Object],
  4119. propertyType: [Object],
  4120. array: null,
  4121. optional: null,
  4122. location: [Object] },
  4123. { type: 'FieldDeclaration',
  4124. id: [Object],
  4125. propertyType: [Object],
  4126. array: null,
  4127. regex: null,
  4128. default: null,
  4129. optional: null,
  4130. location: [Object] } ],
  4131. location:
  4132. { start: { offset: 118, line: 7, column: 3 },
  4133. end: { offset: 182, line: 10, column: 1 } } },
  4134. abstract: null,
  4135. location:
  4136. { start: { offset: 74, line: 6, column: 1 },
  4137. end: { offset: 183, line: 10, column: 2 } } },
  4138. { type: 'ParticipantDeclaration',
  4139. id: { type: 'Identifier', name: 'SampleParticipant' },
  4140. classExtension: null,
  4141. idField: { type: 'Identifier', name: 'participantId' },
  4142. body:
  4143. { type: 'ClassDeclarationBody',
  4144. declarations:
  4145. [ { type: 'FieldDeclaration',
  4146. id: [Object],
  4147. propertyType: [Object],
  4148. array: null,
  4149. regex: null,
  4150. default: null,
  4151. optional: null,
  4152. location: [Object] },
  4153. { type: 'FieldDeclaration',
  4154. id: [Object],
  4155. propertyType: [Object],
  4156. array: null,
  4157. regex: null,
  4158. default: null,
  4159. optional: null,
  4160. location: [Object] },
  4161. { type: 'FieldDeclaration',
  4162. id: [Object],
  4163. propertyType: [Object],
  4164. array: null,
  4165. regex: null,
  4166. default: null,
  4167. optional: null,
  4168. location: [Object] } ],
  4169. location:
  4170. { start: { offset: 247, line: 13, column: 3 },
  4171. end: { offset: 311, line: 16, column: 1 } } },
  4172. abstract: null,
  4173. location:
  4174. { start: { offset: 185, line: 12, column: 1 },
  4175. end: { offset: 312, line: 16, column: 2 } } },
  4176. { type: 'TransactionDeclaration',
  4177. id: { type: 'Identifier', name: 'SampleTransaction' },
  4178. classExtension: null,
  4179. body:
  4180. { type: 'ClassDeclarationBody',
  4181. declarations:
  4182. [ { type: 'RelationshipDeclaration',
  4183. id: [Object],
  4184. propertyType: [Object],
  4185. array: null,
  4186. optional: null,
  4187. location: [Object] },
  4188. { type: 'FieldDeclaration',
  4189. id: [Object],
  4190. propertyType: [Object],
  4191. array: null,
  4192. regex: null,
  4193. default: null,
  4194. optional: null,
  4195. location: [Object] } ],
  4196. location:
  4197. { start: { offset: 348, line: 19, column: 3 },
  4198. end: { offset: 390, line: 21, column: 1 } } },
  4199. idField: null,
  4200. abstract: null,
  4201. location:
  4202. { start: { offset: 314, line: 18, column: 1 },
  4203. end: { offset: 391, line: 21, column: 2 } } },
  4204. { type: 'EventDeclaration',
  4205. id: { type: 'Identifier', name: 'SampleEvent' },
  4206. classExtension: null,
  4207. body:
  4208. { type: 'ClassDeclarationBody',
  4209. declarations:
  4210. [ { type: 'RelationshipDeclaration',
  4211. id: [Object],
  4212. propertyType: [Object],
  4213. array: null,
  4214. optional: null,
  4215. location: [Object] },
  4216. { type: 'FieldDeclaration',
  4217. id: [Object],
  4218. propertyType: [Object],
  4219. array: null,
  4220. regex: null,
  4221. default: null,
  4222. optional: null,
  4223. location: [Object] },
  4224. { type: 'FieldDeclaration',
  4225. id: [Object],
  4226. propertyType: [Object],
  4227. array: null,
  4228. regex: null,
  4229. default: null,
  4230. optional: null,
  4231. location: [Object] } ],
  4232. location:
  4233. { start: { offset: 415, line: 24, column: 3 },
  4234. end: { offset: 477, line: 27, column: 1 } } },
  4235. idField: null,
  4236. abstract: null,
  4237. location:
  4238. { start: { offset: 393, line: 23, column: 1 },
  4239. end: { offset: 478, line: 27, column: 2 } } } ] },
  4240. namespace: 'org.acme.sample' } } },
  4241. '$namespace': 'org.acme.sample',
  4242. '$type': 'SampleAsset',
  4243. '$identifier': 'assetId:0001',
  4244. '$class': 'Relationship' },
  4245. oldValue: '1',
  4246. newValue: '1',
  4247. _msgid: '43f01964.d914e8' }
  4248. 10 Jul 11:18:40 - [info] [hyperledger-composer-in:Listen for Events] received event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement