A method for recording a custodial chain to a tamper-resistant blockchain structure for preventing unauthorised or counterfeit packages being inserted into an existing aggregated package; said method comprising defining or identifying a first element and assigning a first element identifier to the first element; associating the first element identifier physically with the first element; defining or identifying a second element and assigning a second element identifier to the second element; associating the second element identifier physically with the second element; aggregating at least the first element and the second element physically as an aggregated element and assigning an aggregated element identifier to the aggregated element; said aggregated element identifier containing at least said first element identifier and said second element identifier; defining an aggregated element record which includes the aggregated element identifier and at least the first element identifier and the second element identifier; recording the aggregated element identifier, the first element identifier and the second element identifier in said aggregated element record, as records in the blockchain structure; associating a sub element with each element identifier; the sub element containing data related to the element identifier and its passage along the custodial chain; wherein the sub element includes rules created by an originator of the element; whereby any change to the data in any aggregated element record results in a new copy of the aggregated element record being stored in the blockchain structure as well as the aggregated element record before the change; and whereby anomalies in the aggregated element records in the blockchain structure are identified and any aggregated element record with an identified anomaly is replicated in a node according to the test 'is transaction valid according to a majority of users' of the blockchain structure. defining or identifying a first element and assigning a first element identifier to the first element; associating the first element identifier physically with the first element; defining or identifying a second element and assigning a second element identifier to the second element; associating the second element identifier physically with the second element; aggregating at least the first element and the second element physically as an aggregated element and assigning an aggregated element identifier to the aggregated element; said aggregated element identifier containing at least said first element identifier and said second element identifier; defining an aggregated element record which includes the aggregated element identifier and at least the first element identifier and the second element identifier; recording the aggregated element identifier, the first element identifier and the second element identifier in said aggregated element record, as records in the blockchain structure; associating a sub element with each element identifier; the sub element containing data related to the element identifier and its passage along the custodial chain; wherein the sub element includes rules created by an originator of the element; whereby any change to the data in any aggregated element record results in a new copy of the aggregated element record being stored in the blockchain structure as well as the aggregated element record before the change; and whereby anomalies in the aggregated element records in the blockchain structure are identified and any aggregated element record with an identified anomaly is replicated in a node according to the test 'is transaction valid according to a majority of users' of the blockchain structure.