tsr get <url>
Command to GET in the Trusted Schemas Registry API.
Parameters:
- url: Path to get.
Examples:
tsr get /schemas
tsr get /schemas/0x12f...
tsr (build-)insertSchema <schema> <metadata>
Command to insert a new schema. The JWT is set in the headers. This method requires admin rights in the Trusted Schemas Registry. The schema id is computed based on the schema (see schema lifecycle).
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
tsr build-insertSchema
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
tsr sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- schema (optional): JSON schema. By default it uses a random schema.
- metadata (optional): JSON metadata. By default is uses random metadata.
Examples:
tsr insertSchema
tsr insertSchema {"@context":"ebsi.eu","type":"schema"} {"metadata":"data"}
tsr (build-)updateSchema <schemaId> <schema> <metadata>
Command to update an schema. The JWT is set in the headers. This method requires admin rights in the Trusted Schemas 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
tsr build-updateSchema
to build an unsigned transaction. - call
compute signTransaction
to sign the transaction with the user defined inusing user
. - call
tsr sendSignedTransaction
to send the transaction signed. - call
view transactionInfo
to see relevant data for this transaction.
Parameters:
- schemaId: Schema ID.
- schema (optional): JSON schema. By default it uses a random schema.
- metadata (optional): JSON metadata. By default is uses random metadata.
Examples:
tsr updateSchema
tsr updateSchema 0x12f... {"@context":"ebsi.eu","type":"schema"} {"metadata":"data"}
tsr (build-)updateMetadata <schemaId> <metadata>
Command to update the metadata of an schema. The JWT is set in the headers. This method requires admin rights in the Trusted Schemas Registry.
Parameters:
- schemaId: Schema ID.
- metadata: new JSON metadata.
tsr sendSignedTransaction <unsignedTransaction> <signedTransaction>
Command to send a signed transaction to the Trusted Schemas 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:
tsr sendSignedTransaction {"from":"0x6b...} 0xf9022...
tsr sendSignedTransaction utx sgntx