Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] checking config
- 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] checking payload
- 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] create
- 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] ensureConnected
- 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] connected
- 10 Jul 11:18:37 - [info] [hyperledger-composer-out:Add to blockchain] creating transaction
- 10 Jul 11:18:39 - [info] [hyperledger-composer-in:Listen for events] received event
- 10 Jul 11:18:39 - [info] [debug:813bd358.b09738]
- ValidatedResource {
- '$modelManager':
- ModelManager {
- modelFiles:
- { 'org.hyperledger.composer.system':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } }
- ****OVER 500kb of text omitted****
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.acme.sample',
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } } ] },
- namespace: 'org.acme.sample' } } },
- '$namespace': 'org.acme.sample',
- '$type': 'SampleEvent',
- '$identifier': 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
- '$validator': ResourceValidator {},
- eventId: 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
- timestamp: 2017-07-10T15:18:37.627Z,
- asset:
- Relationship {
- '$modelManager':
- ModelManager {
- modelFiles:
- { 'org.hyperledger.composer.system':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- modelFile: [Circular],
- name: 'Asset',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- modelFile: [Circular],
- name: 'Participant',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- modelFile: [Circular],
- name: 'Transaction',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'transactionId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'transactionId',
- abstract: true },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } },
- modelFile: [Circular],
- name: 'Event',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'eventId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'eventId',
- abstract: true } ],
- imports: [],
- fileName: undefined,
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.hyperledger.composer.system',
- imports: [],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } } ] },
- namespace: 'org.hyperledger.composer.system' },
- 'org.acme.sample':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleAsset',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'assetId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'owner',
- type: 'SampleParticipant',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'value',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Asset',
- idField: 'assetId',
- abstract: false },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleParticipant',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'participantId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'firstName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'lastName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Participant',
- idField: 'participantId',
- abstract: false },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleTransaction',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Transaction',
- idField: null,
- abstract: false },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleEvent',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'oldValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Event',
- idField: null,
- abstract: false } ],
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- fileName: 'models/sample.cto',
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.acme.sample',
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } } ] },
- namespace: 'org.acme.sample' } } },
- '$namespace': 'org.acme.sample',
- '$type': 'SampleAsset',
- '$identifier': 'assetId:0001',
- '$class': 'Relationship' },
- oldValue: '1',
- newValue: '1',
- _msgid: '43f01964.d914e8' }
- 10 Jul 11:18:40 - [info] [hyperledger-composer-in:Listen for events] received event
- 10 Jul 11:18:40 - [info] [debug:813bd358.b09738]
- ValidatedResource {
- '$modelManager':
- ModelManager {
- modelFiles:
- { 'org.hyperledger.composer.system':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- modelFile: [Circular],
- name: 'Asset',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- modelFile: [Circular],
- name: 'Participant',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- modelFile: [Circular],
- name: 'Transaction',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 224, line: 10, column: 7 } } },
- parent: [Circular],
- name: 'transactionId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 224, line: 10, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'transactionId',
- abstract: true },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } },
- modelFile: [Circular],
- name: 'Event',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 329, line: 15, column: 7 } } },
- parent: [Circular],
- name: 'eventId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 329, line: 15, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'eventId',
- abstract: true } ],
- imports: [],
- fileName: undefined,
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.hyperledger.composer.system',
- imports: [],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } } ] },
- namespace: 'org.hyperledger.composer.system' },
- 'org.acme.sample':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleAsset',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 137, line: 8, column: 3 } } },
- parent: [Circular],
- name: 'assetId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location:
- { start: { offset: 137, line: 8, column: 3 },
- end: { offset: 167, line: 9, column: 3 } } },
- parent: [Circular],
- name: 'owner',
- type: 'SampleParticipant',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 167, line: 9, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- parent: [Circular],
- name: 'value',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Asset',
- idField: 'assetId',
- abstract: false },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleParticipant',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 272, line: 14, column: 3 } } },
- parent: [Circular],
- name: 'participantId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 272, line: 14, column: 3 },
- end: { offset: 293, line: 15, column: 3 } } },
- parent: [Circular],
- name: 'firstName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 293, line: 15, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- parent: [Circular],
- name: 'lastName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Participant',
- idField: 'participantId',
- abstract: false },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleTransaction',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 372, line: 20, column: 3 } } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 372, line: 20, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Transaction',
- idField: null,
- abstract: false },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleEvent',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 439, line: 25, column: 3 } } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 439, line: 25, column: 3 },
- end: { offset: 459, line: 26, column: 3 } } },
- parent: [Circular],
- name: 'oldValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 459, line: 26, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Event',
- idField: null,
- abstract: false } ],
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- fileName: 'models/sample.cto',
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.acme.sample',
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } } ] },
- namespace: 'org.acme.sample' } } },
- '$namespace': 'org.acme.sample',
- '$type': 'SampleEvent',
- '$identifier': 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
- '$validator': ResourceValidator {},
- eventId: 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
- timestamp: 2017-07-10T15:18:37.627Z,
- asset:
- Relationship {
- '$modelManager':
- ModelManager {
- modelFiles:
- { 'org.hyperledger.composer.system':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- modelFile: [Circular],
- name: 'Asset',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- modelFile: [Circular],
- name: 'Participant',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- modelFile: [Circular],
- name: 'Transaction',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'transactionId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'transactionId',
- abstract: true },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } },
- modelFile: [Circular],
- name: 'Event',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'eventId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'eventId',
- abstract: true } ],
- imports: [],
- fileName: undefined,
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.hyperledger.composer.system',
- imports: [],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } } ] },
- namespace: 'org.hyperledger.composer.system' },
- 'org.acme.sample':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleAsset',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'assetId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'owner',
- type: 'SampleParticipant',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'value',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Asset',
- idField: 'assetId',
- abstract: false },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleParticipant',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'participantId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'firstName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'lastName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Participant',
- idField: 'participantId',
- abstract: false },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleTransaction',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Transaction',
- idField: null,
- abstract: false },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleEvent',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'oldValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Event',
- idField: null,
- abstract: false } ],
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- fileName: 'models/sample.cto',
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.acme.sample',
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } } ] },
- namespace: 'org.acme.sample' } } },
- '$namespace': 'org.acme.sample',
- '$type': 'SampleAsset',
- '$identifier': 'assetId:0001',
- '$class': 'Relationship' },
- oldValue: '1',
- newValue: '1',
- _msgid: '43f01964.d914e8' }
- 10 Jul 11:18:40 - [info] [hyperledger-composer-in:Listen for events] received event
- 10 Jul 11:18:40 - [info] [debug:813bd358.b09738]
- ValidatedResource {
- '$modelManager':
- ModelManager {
- modelFiles:
- { 'org.hyperledger.composer.system':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- modelFile: [Circular],
- name: 'Asset',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- modelFile: [Circular],
- name: 'Participant',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- modelFile: [Circular],
- name: 'Transaction',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 224, line: 10, column: 7 } } },
- parent: [Circular],
- name: 'transactionId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 224, line: 10, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'transactionId',
- abstract: true },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } },
- modelFile: [Circular],
- name: 'Event',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 329, line: 15, column: 7 } } },
- parent: [Circular],
- name: 'eventId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 329, line: 15, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'eventId',
- abstract: true } ],
- imports: [],
- fileName: undefined,
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.hyperledger.composer.system',
- imports: [],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } } ] },
- namespace: 'org.hyperledger.composer.system' },
- 'org.acme.sample':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleAsset',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 137, line: 8, column: 3 } } },
- parent: [Circular],
- name: 'assetId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location:
- { start: { offset: 137, line: 8, column: 3 },
- end: { offset: 167, line: 9, column: 3 } } },
- parent: [Circular],
- name: 'owner',
- type: 'SampleParticipant',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 167, line: 9, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- parent: [Circular],
- name: 'value',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Asset',
- idField: 'assetId',
- abstract: false },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleParticipant',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 272, line: 14, column: 3 } } },
- parent: [Circular],
- name: 'participantId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 272, line: 14, column: 3 },
- end: { offset: 293, line: 15, column: 3 } } },
- parent: [Circular],
- name: 'firstName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 293, line: 15, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- parent: [Circular],
- name: 'lastName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Participant',
- idField: 'participantId',
- abstract: false },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleTransaction',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 372, line: 20, column: 3 } } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 372, line: 20, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Transaction',
- idField: null,
- abstract: false },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleEvent',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 439, line: 25, column: 3 } } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 439, line: 25, column: 3 },
- end: { offset: 459, line: 26, column: 3 } } },
- parent: [Circular],
- name: 'oldValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location:
- { start: { offset: 459, line: 26, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Event',
- idField: null,
- abstract: false } ],
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- fileName: 'models/sample.cto',
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.acme.sample',
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } } ] },
- namespace: 'org.acme.sample' } } },
- '$namespace': 'org.acme.sample',
- '$type': 'SampleEvent',
- '$identifier': 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
- '$validator': ResourceValidator {},
- eventId: 'b9f089c1-ebb3-4312-9a5a-9657cb20c5d3#0',
- timestamp: 2017-07-10T15:18:37.627Z,
- asset:
- Relationship {
- '$modelManager':
- ModelManager {
- modelFiles:
- { 'org.hyperledger.composer.system':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- modelFile: [Circular],
- name: 'Asset',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- modelFile: [Circular],
- name: 'Participant',
- properties: [],
- superType: null,
- idField: null,
- abstract: true },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- modelFile: [Circular],
- name: 'Transaction',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'transactionId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'transactionId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'transactionId',
- abstract: true },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } },
- modelFile: [Circular],
- name: 'Event',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'eventId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'eventId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'timestamp' },
- propertyType: { name: 'DateTime' },
- array: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'timestamp',
- type: 'DateTime',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: null,
- idField: 'eventId',
- abstract: true } ],
- imports: [],
- fileName: undefined,
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.hyperledger.composer.system',
- imports: [],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'Asset' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 76, line: 4, column: 29 },
- end: { offset: 76, line: 4, column: 29 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 52, line: 4, column: 5 },
- end: { offset: 77, line: 4, column: 30 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'Participant' },
- classExtension: null,
- idField: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations: [],
- location:
- { start: { offset: 120, line: 6, column: 42 },
- end: { offset: 120, line: 6, column: 42 } } },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 83, line: 6, column: 5 },
- end: { offset: 121, line: 6, column: 43 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'Transaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 195, line: 9, column: 7 },
- end: { offset: 249, line: 11, column: 5 } } },
- idField: { type: 'Identifier', name: 'transactionId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 127, line: 8, column: 5 },
- end: { offset: 250, line: 11, column: 6 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'Event' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 306, line: 14, column: 7 },
- end: { offset: 354, line: 16, column: 5 } } },
- idField: { type: 'Identifier', name: 'eventId' },
- abstract: [ 'abstract', undefined ],
- location:
- { start: { offset: 256, line: 13, column: 5 },
- end: { offset: 355, line: 16, column: 6 } } } ] },
- namespace: 'org.hyperledger.composer.system' },
- 'org.acme.sample':
- ModelFile {
- modelManager: [Circular],
- declarations:
- [ AssetDeclaration {
- ast:
- { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleAsset',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'assetId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'assetId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'owner' },
- propertyType: { type: 'Identifier', name: 'SampleParticipant' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'owner',
- type: 'SampleParticipant',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'value' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'value',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Asset',
- idField: 'assetId',
- abstract: false },
- ParticipantDeclaration {
- ast:
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleParticipant',
- properties:
- [ Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'participantId' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'participantId',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'firstName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'firstName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'lastName' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'lastName',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Participant',
- idField: 'participantId',
- abstract: false },
- TransactionDeclaration {
- ast:
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleTransaction',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Transaction',
- idField: null,
- abstract: false },
- EventDeclaration {
- ast:
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } },
- modelFile: [Circular],
- name: 'SampleEvent',
- properties:
- [ RelationshipDeclaration {
- ast:
- { type: 'RelationshipDeclaration',
- id: { type: 'Identifier', name: 'asset' },
- propertyType: { type: 'Identifier', name: 'SampleAsset' },
- array: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'asset',
- type: 'SampleAsset',
- array: false,
- optional: false },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'oldValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'oldValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null },
- Field {
- ast:
- { type: 'FieldDeclaration',
- id: { type: 'Identifier', name: 'newValue' },
- propertyType: { name: 'String' },
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: { start: [Object], end: [Object] } },
- parent: [Circular],
- name: 'newValue',
- type: 'String',
- array: false,
- optional: false,
- validator: null,
- defaultValue: null } ],
- superType: 'Event',
- idField: null,
- abstract: false } ],
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- fileName: 'models/sample.cto',
- 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',
- ast:
- { type: 'Program',
- namespace: 'org.acme.sample',
- imports:
- [ 'org.hyperledger.composer.system.Event',
- 'org.hyperledger.composer.system.Transaction',
- 'org.hyperledger.composer.system.Participant',
- 'org.hyperledger.composer.system.Asset' ],
- body:
- [ { type: 'AssetDeclaration',
- id: { type: 'Identifier', name: 'SampleAsset' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'assetId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 118, line: 7, column: 3 },
- end: { offset: 182, line: 10, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 74, line: 6, column: 1 },
- end: { offset: 183, line: 10, column: 2 } } },
- { type: 'ParticipantDeclaration',
- id: { type: 'Identifier', name: 'SampleParticipant' },
- classExtension: null,
- idField: { type: 'Identifier', name: 'participantId' },
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 247, line: 13, column: 3 },
- end: { offset: 311, line: 16, column: 1 } } },
- abstract: null,
- location:
- { start: { offset: 185, line: 12, column: 1 },
- end: { offset: 312, line: 16, column: 2 } } },
- { type: 'TransactionDeclaration',
- id: { type: 'Identifier', name: 'SampleTransaction' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 348, line: 19, column: 3 },
- end: { offset: 390, line: 21, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 314, line: 18, column: 1 },
- end: { offset: 391, line: 21, column: 2 } } },
- { type: 'EventDeclaration',
- id: { type: 'Identifier', name: 'SampleEvent' },
- classExtension: null,
- body:
- { type: 'ClassDeclarationBody',
- declarations:
- [ { type: 'RelationshipDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] },
- { type: 'FieldDeclaration',
- id: [Object],
- propertyType: [Object],
- array: null,
- regex: null,
- default: null,
- optional: null,
- location: [Object] } ],
- location:
- { start: { offset: 415, line: 24, column: 3 },
- end: { offset: 477, line: 27, column: 1 } } },
- idField: null,
- abstract: null,
- location:
- { start: { offset: 393, line: 23, column: 1 },
- end: { offset: 478, line: 27, column: 2 } } } ] },
- namespace: 'org.acme.sample' } } },
- '$namespace': 'org.acme.sample',
- '$type': 'SampleAsset',
- '$identifier': 'assetId:0001',
- '$class': 'Relationship' },
- oldValue: '1',
- newValue: '1',
- _msgid: '43f01964.d914e8' }
- 10 Jul 11:18:40 - [info] [hyperledger-composer-in:Listen for Events] received event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement