_idthat is set to the output on the Bitcoin blockchain that records the creation of the smart object. This id remains fixed throughout the lifecycle of the object.
countersmart object created above, we can call its
counter._rev.is always set to the output that stores the latest revision.
computer.sync()method returns the smart object stored at a given location. This allows one user to create a smart object, send the id of the smart object to another user, and the second user can synchronize to the same object. For example a user Alice could run the following code
incfunction on her local machine:
1. Next, the update is recorded on the blockchain in a transaction. Finally, the instance on Bob's computer updates to the value
_ownersthat can be set a list of public key strings. A smart object can only be updated by a user whose public key is in the
_ownersarray. Specifically, a smart object can only be updated if it was created by a computer instance (either by
computer.sync) that contains a mnemonic that corresponds to a public key in the current
_ownersproperty can be set in a constructor call and updated in a function call. If no
_ownersproperty is specified, it defaults to a singleton array containing the public key of the current
incfunction but Bob cannot:
_ownersproperty can be assigned in construction and function calls.
_amountproperty. The Bitcoin is owned by the owners of the object, and each owner can send the Bitcoin to another user (like themselves).
computerobject. If a function call reduces the amount of satoshi in an object the remaining satoshi (minus miner fee) are returned to the wallet in the
computerobject. The example also shows how the wallet can send Bitcoin.
_ownersproperty of the smart object is updated to
pKeyBso that subsequently only Bob owns the output containing the 20000 satoshi.