timestamp get <url>
Command to GET in the Timestamp API. All endpoints are open to the public.
Parameters:
- url: Path to get.
Examples:
timestamp get /timestamps
timestamp get /timestamps/uMHh...
timestamp get /hash-algorithms
timestamp get /records
timestamp (build-)insertHashAlgorithm <outputLength> <ianaName> <oid> <status> <multihash>
Command to insert a new hash algorithm. The JWT is set in the headers. This method requires admin rights in the Trusted Policies Registry.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-insertHashAlgorithm
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- outputLength (optional): JSON data to store. By default it is 1.
- ianaName (optional): IANA name. By default it is "undefined".
- oid (optional): OID. By default it is "undefined".
- status (optional): Status. It must be 1 (default) or 2 which corresponds with active or revoked respectively.
- multihash (optional): Multihash identifier. By default it uses de ianaName.
Examples:
timestamp insertHashAlgorithm 256 sha-256 2.16.840.1.101.3.4.2.1 1 sha2-256
timestamp insertHashAlgorithm 512 sha3-512 2.16.840.1.101.3.4.2.10 1 sha3-512
timestamp (build-)updateHashAlgorithm <hashAlgId> <outputLength> <ianaName> <oid> <status> <multihash>
Command to update an existing hash algorithm. The JWT is set in the headers. This method requires admin rights in the Trusted Policies Registry.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-updateHashAlgorithm
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- hashAlgId: Hash Algorithm ID to update.
- outputLength (optional): JSON data to store. By default it is 1.
- ianaName (optional): IANA name. By default it is "undefined".
- oid (optional): OID. By default it is "undefined".
- status (optional): Status. It must be 1 (default) or 2 which corresponds with active or revoked respectively.
- multihash (optional): Multihash identifier. By default it uses de ianaName.
Examples:
timestamp updateHashAlgorithm 1 256 sha-256 2.16.840.1.101.3.4.2.1 1 sha2-256
timestamp updateHashAlgorithm 7 512 sha3-512 2.16.840.1.101.3.4.2.10 1 sha3-512
timestamp (build-)timestampRecordHashes <data> <info>
Command to timestamp data and create a record of it with some info. The JWT is set in the headers.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-timestampRecordHashes
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- data (optional): JSON data to timestamp. By default it creates random data.
- info (optional): JSON info to insert in the record. By default it creates random data.
Examples:
timestamp timestampRecordHashes
timestamp timestampRecordHashes {"data":"my data"} {"info":"test"}
timestamp (build-)timestampVersionHashes <previousHash> <data> <info>
Command to create a new version of an existing record given the previous version hash. This new version is timestamped. Use it when you don't have the recordId but you have the hash that was timestamped in the previous version. You can not use this function if several records share the same hash, for such cases use timestampRecordVersionHashes
. The JWT is set in the headers. Only record owners are allowed to perform this operation.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-timestampVersionHashes
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- previousHash: Hash timestamped in a previous version
- data (optional): JSON data to timestamp. By default it creates random data.
- info (optional): JSON info to insert in the new version of the record. By default it creates random data.
Examples:
timestamp timestampVersionHashes 0x12f5...
timestamp timestampVersionHashes 0x12f5... {"data":"my data"} {"info":"test"}
timestamp (build-)timestampRecordVersionHashes <recordId> <data> <info>
Command to create a new version of an existing record. This new version is timestamped. The JWT is set in the headers. Only record owners are allowed to perform this operation.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-timestampRecordVersionHashes
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- recordId: Record ID in hex string format
- data (optional): JSON data to timestamp. By default it creates random data.
- info (optional): JSON info to insert in the new version of the record. By default it creates random data.
Examples:
timestamp timestampRecordVersionHashes 0x12f5...
timestamp timestampRecordVersionHashes 0x12f5... {"data":"my data"} {"info":"test"}
timestamp (build-)insertRecordOwner <recordId> <ownerId> <notBefore> <notAfter>
Command to insert a new owner in an existing record. The JWT is set in the headers. Only record owners are allowed to perform this operation.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-insertRecordOwner
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- recordId: Record ID in hex string format
- ownerId: Ethereum address of new owner.
- notBefore (optional): Point in time when the owner becomes valid. It should be defined in epoch time. By default it takes the actual time.
- notAfter (optional): Point in time when the owner becomes invalid. It should be defined in epoch time. By default it is 0 (indefinite).
Examples:
timestamp insertRecordOwner 0x12f5... 0xab54...
timestamp insertRecordOwner 0x12f5... 0xab54... 1625568669 1657104669
timestamp (build-)revokeRecordOwner <recordId> <ownerId>
Command to revoke new owner from an existing record and put it in the revoked list. The JWT is set in the headers. Only record owners are allowed to perform this operation.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-revokeRecordOwner
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- recordId: Record ID in hex string format.
- ownerId: Ethereum address of the owner to revoke.
Examples:
timestamp revokeRecordOwner 0x12f5... 0xab54...
timestamp (build-)insertRecordVersionInfo <recordId> <versionId> <info>
Command to insert new info to a version of an existing record. The JWT is set in the headers. Only record owners are allowed to perform this operation.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-insertRecordVersionInfo
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- recordId: Record ID in hex string format.
- versionId: Number of the version.
- info (optional): JSON info to insert in the version.
Examples:
timestamp insertRecordVersionInfo 0x12f5... 1
timestamp insertRecordVersionInfo 0x12f5... 1 {"info":"test"}
timestamp (build-)detachRecordVersionHash <recordId> <versionId> <hash>
Command to remove a hash from a version of an existing record. The JWT is set in the headers. Only record owners are allowed to perform this operation.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-detachRecordVersionHash
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- recordId: Record ID in hex string format.
- versionId: Number of the version.
- hash: Hash of timestamp to detach.
Examples:
timestamp detachRecordVersionHash 0x12f5... 1 0xfd45...
timestamp (build-)appendRecordVersionHashes <recordId> <versionId> <data> <info>
Command to include more hashes to an existing version. For instance, use it if you want to have different hashes (sha2-256, sha3-512, etc) of the same data. The JWT is set in the headers. Only record owners are allowed to perform this operation.
DISCLAIMER: In the current version the CLI the "data" is hashed with sha2-256. Future versions will include more algorithms.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-appendRecordVersionHashes
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- recordId: Record ID in hex string format
- versionId: Number of the version.
- data (optional): JSON data to timestamp. By default it creates random data.
- info (optional): JSON info to append in the version of the record. By default it creates random data.
Examples:
timestamp appendRecordVersionHashes 0x12f5... 1
timestamp appendRecordVersionHashes 0x12f5... 1 {"data":"my data"} {"info":"test"}
timestamp (build-)timestampHashes <data>
Command to timestamp data. The JWT is set in the headers.
Use the build-
prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:
- call
timestamp build-timestampHashes
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
timestamp sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- data (optional): JSON data to timestamp. By default it creates random data.
Examples:
timestamp timestampHashes
timestamp timestampHashes {"data":"my data"}
timestamp sendSignedTransaction <unsignedTransaction> <signedTransaction>
Command to send a signed transaction to the Timestamp Registry. The JWT is set in the headers. It's also possible to load the parameters from the saved variables by referencing the names.
Parameters:
- unsignedTransaction: JSON with the unsigned transaction.
- signedTransaction: Signed transaction in raw format.
Examples:
timestamp sendSignedTransaction {"from":"0x6b...} 0xf9022...
timestamp sendSignedTransaction utx sgntx