class GrantPolicy(PolicyBaseSchema): label = fields.Label( load_only=True, required=True, click=options.option_label(required=True)) # output fields treasure_map = fields.TreasureMap(dump_only=True) alice_verifying_key = fields.Key(dump_only=True)
class BobRetrieveCFrags(BaseSchema): treasure_map = character_fields.TreasureMap( required=True, load_only=True, click=click.option('--treasure-map', '-t', help="Unencrypted Treasure Map for retrieval", type=click.STRING, required=True)) retrieval_kits = base_fields.StringList( fields.RetrievalKit(), click=click.option('--retrieval-kits', '-r', help="Retrieval kits for reencryption", multiple=True, type=click.STRING, required=True, default=[]), required=True, load_only=True) alice_verifying_key = character_fields.Key( required=True, load_only=True, click=click.option( '--alice-verifying-key', '-avk', help="Alice's verifying key as a hexadecimal string", type=click.STRING, required=True)) bob_encrypting_key = character_fields.Key( required=True, load_only=True, click=option_bob_encrypting_key()) bob_verifying_key = character_fields.Key( required=True, load_only=True, click=click.option('--bob-verifying-key', '-bvk', help="Bob's verifying key as a hexadecimal string", type=click.STRING, required=True)) # output retrieval_results = marshmallow_fields.List(marshmallow_fields.Nested( fields.RetrievalResultSchema), dump_only=True)
class TreasureMapsOnly(BaseSchema): tmap = fields.TreasureMap()