syntax = "proto3"; package entity; option go_package = "github.com/centrifuge/centrifuge-protobufs/gen/go/entity;entitypb"; option java_multiple_files = true; option java_outer_classname = "EntityProto"; option java_package = "com.entity"; import "precise-proofs/proofs/proto/proof.proto"; // EntityRelationship allows other identities to access the Entity document. message EntityRelationship { // owner id of the Relationship bytes owner_identity = 1 [(proofs.field_length) = 32]; // identifier for the entity document whose data should be accessed via this relationship bytes entity_identifier = 2 [(proofs.field_length) = 32]; // identity to whom access should be granted bytes target_identity = 3 [(proofs.field_length) = 32]; } // EntityData is the default entity schema message Entity { bytes identity = 1 [(proofs.field_length) = 32]; string legal_name = 2; // address repeated Address addresses = 3; // tax information repeated PaymentDetail payment_details = 4; // Entity contact list repeated Contact contacts = 5; } message Address { bool is_main = 1; bool is_remit_to = 2; bool is_ship_to = 3; bool is_pay_to = 4; string label = 5; string zip = 6; string state = 7; string country = 8; string address_line1 = 9; string address_line2 = 10; string contact_person = 11; } message BankPaymentMethod { bytes identifier = 1 [(proofs.field_length) = 32]; Address address = 2; string holder_name = 3; string bank_key = 4; string bank_account_number = 5; string supported_currency = 6; } message CryptoPaymentMethod { bytes identifier = 1 [(proofs.field_length) = 32]; string to = 2; string chain_uri = 3; string supported_currency = 4; } message OtherPayment { bytes identifier = 1 [(proofs.field_length) = 32]; string type = 2; string pay_to = 3; string supported_currency = 4; } message PaymentDetail { // fields for bank accounts and ethereum wallets bool predefined = 1; oneof payment_method { BankPaymentMethod bank_payment_method = 2; CryptoPaymentMethod crypto_payment_method = 3; OtherPayment other_method = 4; } } message Contact { string name = 1; string title = 2; string email = 3; string phone = 4; string fax = 5; }