--- source: crates/contract/src/lib.rs expression: schema --- BorshSchemaContainer { declaration: "MpcContract", definitions: { "()": Primitive( 0, ), "(AccountId, ParticipantId, ParticipantInfo)": Tuple { elements: [ "AccountId", "ParticipantId", "ParticipantInfo", ], }, "(AuthenticatedAccountId, ProposedThresholdParameters)": Tuple { elements: [ "AuthenticatedAccountId", "ProposedThresholdParameters", ], }, "(AuthenticatedParticipantId, DockerImageHash)": Tuple { elements: [ "AuthenticatedParticipantId", "DockerImageHash", ], }, "(AuthenticatedParticipantId, LauncherVoteAction)": Tuple { elements: [ "AuthenticatedParticipantId", "LauncherVoteAction", ], }, "(AuthenticatedParticipantId, MeasurementVoteAction)": Tuple { elements: [ "AuthenticatedParticipantId", "MeasurementVoteAction", ], }, "(AuthenticatedParticipantId, Vec)": Tuple { elements: [ "AuthenticatedParticipantId", "Vec", ], }, "(DomainId, ReconstructionThreshold)": Tuple { elements: [ "DomainId", "ReconstructionThreshold", ], }, "AccountId": Struct { fields: UnnamedFields( [ "String", ], ), }, "AddDomainsVotes": Struct { fields: NamedFields( [ ( "proposal_by_account", "BTreeMap>", ), ], ), }, "AllowedDockerImageHashes": Struct { fields: NamedFields( [ ( "allowed_tee_proposals", "Vec", ), ], ), }, "AllowedLauncherImage": Struct { fields: NamedFields( [ ( "launcher_hash", "LauncherImageHash", ), ( "compose_hashes", "Vec", ), ], ), }, "AllowedLauncherImages": Struct { fields: NamedFields( [ ( "entries", "Vec", ), ], ), }, "AllowedMeasurements": Struct { fields: NamedFields( [ ( "entries", "Vec", ), ], ), }, "AllowedMpcDockerImage": Struct { fields: NamedFields( [ ( "image_hash", "DockerImageHash", ), ( "added", "Timestamp", ), ], ), }, "AttemptId": Struct { fields: UnnamedFields( [ "u64", ], ), }, "AuthenticatedAccountId": Struct { fields: UnnamedFields( [ "AccountId", ], ), }, "AuthenticatedParticipantId": Struct { fields: UnnamedFields( [ "ParticipantId", ], ), }, "BTreeMap": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "(AuthenticatedAccountId, ProposedThresholdParameters)", }, "BTreeMap": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "(AuthenticatedParticipantId, DockerImageHash)", }, "BTreeMap": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "(AuthenticatedParticipantId, LauncherVoteAction)", }, "BTreeMap": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "(AuthenticatedParticipantId, MeasurementVoteAction)", }, "BTreeMap>": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "(AuthenticatedParticipantId, Vec)", }, "BTreeMap": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "(DomainId, ReconstructionThreshold)", }, "BTreeSet": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "AuthenticatedParticipantId", }, "Bls12381G2PublicKey": Struct { fields: UnnamedFields( [ "[u8; 96]", ], ), }, "CodeHashesVotes": Struct { fields: NamedFields( [ ( "proposal_by_account", "BTreeMap", ), ], ), }, "Config": Struct { fields: NamedFields( [ ( "key_event_timeout_blocks", "u64", ), ( "tee_upgrade_deadline_duration_seconds", "u64", ), ( "contract_upgrade_deposit_tera_gas", "u64", ), ( "sign_call_gas_attachment_requirement_tera_gas", "u64", ), ( "ckd_call_gas_attachment_requirement_tera_gas", "u64", ), ( "return_signature_and_clean_state_on_success_call_tera_gas", "u64", ), ( "return_ck_and_clean_state_on_success_call_tera_gas", "u64", ), ( "fail_on_timeout_tera_gas", "u64", ), ( "clean_tee_status_tera_gas", "u64", ), ( "clean_invalid_attestations_tera_gas", "u64", ), ( "cleanup_orphaned_node_migrations_tera_gas", "u64", ), ( "remove_non_participant_update_votes_tera_gas", "u64", ), ( "clean_foreign_chain_data_tera_gas", "u64", ), ( "remove_non_participant_tee_verifier_votes_tera_gas", "u64", ), ], ), }, "ContractExpectedMeasurements": Struct { fields: NamedFields( [ ( "mrtd", "MrtdHash", ), ( "rtmr0", "Rtmr0Hash", ), ( "rtmr1", "Rtmr1Hash", ), ( "rtmr2", "Rtmr2Hash", ), ( "key_provider_event_digest", "KeyProviderEventDigest", ), ], ), }, "DockerImageHash": Struct { fields: UnnamedFields( [ "[u8; 32]", ], ), }, "DomainConfig": Struct { fields: NamedFields( [ ( "id", "DomainId", ), ( "protocol", "Protocol", ), ( "reconstruction_threshold", "ReconstructionThreshold", ), ( "purpose", "DomainPurpose", ), ], ), }, "DomainId": Struct { fields: UnnamedFields( [ "u64", ], ), }, "DomainPurpose": Enum { tag_width: 1, variants: [ ( 0, "Sign", "DomainPurpose__Sign", ), ( 1, "ForeignTx", "DomainPurpose__ForeignTx", ), ( 2, "CKD", "DomainPurpose__CKD", ), ], }, "DomainPurpose__CKD": Struct { fields: Empty, }, "DomainPurpose__ForeignTx": Struct { fields: Empty, }, "DomainPurpose__Sign": Struct { fields: Empty, }, "DomainRegistry": Struct { fields: NamedFields( [ ( "domains", "Vec", ), ( "next_domain_id", "u64", ), ], ), }, "Ed25519PublicKey": Struct { fields: UnnamedFields( [ "[u8; 32]", ], ), }, "EpochId": Struct { fields: UnnamedFields( [ "u64", ], ), }, "HashSet": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "AuthenticatedAccountId", }, "IndexMap": Struct { fields: NamedFields( [ ( "prefix", "Vec", ), ], ), }, "InitializingContractState": Struct { fields: NamedFields( [ ( "domains", "DomainRegistry", ), ( "epoch_id", "EpochId", ), ( "generated_keys", "Vec", ), ( "generating_key", "KeyEvent", ), ( "cancel_votes", "BTreeSet", ), ], ), }, "IterableMap": Struct { fields: NamedFields( [ ( "keys", "Vector", ), ( "values", "LookupMap", ), ], ), }, "KeyEvent": Struct { fields: NamedFields( [ ( "epoch_id", "EpochId", ), ( "domain", "DomainConfig", ), ( "parameters", "ThresholdParameters", ), ( "instance", "Option", ), ( "next_attempt_id", "AttemptId", ), ], ), }, "KeyEventInstance": Struct { fields: NamedFields( [ ( "attempt_id", "AttemptId", ), ( "started_in", "u64", ), ( "expires_on", "u64", ), ( "completed", "BTreeSet", ), ( "public_key", "Option", ), ], ), }, "KeyForDomain": Struct { fields: NamedFields( [ ( "domain_id", "DomainId", ), ( "key", "PublicKeyExtended", ), ( "attempt", "AttemptId", ), ], ), }, "KeyProviderEventDigest": Struct { fields: UnnamedFields( [ "[u8; 48]", ], ), }, "Keyset": Struct { fields: NamedFields( [ ( "epoch_id", "EpochId", ), ( "domains", "Vec", ), ], ), }, "LauncherDockerComposeHash": Struct { fields: UnnamedFields( [ "[u8; 32]", ], ), }, "LauncherHashVotes": Struct { fields: NamedFields( [ ( "vote_by_account", "BTreeMap", ), ], ), }, "LauncherImageHash": Struct { fields: UnnamedFields( [ "[u8; 32]", ], ), }, "LauncherVoteAction": Enum { tag_width: 1, variants: [ ( 0, "Add", "LauncherVoteAction__Add", ), ( 1, "Remove", "LauncherVoteAction__Remove", ), ], }, "LauncherVoteAction__Add": Struct { fields: UnnamedFields( [ "LauncherImageHash", ], ), }, "LauncherVoteAction__Remove": Struct { fields: UnnamedFields( [ "LauncherImageHash", ], ), }, "Lazy": Struct { fields: NamedFields( [ ( "storage_key", "Vec", ), ], ), }, "LookupMap": Struct { fields: NamedFields( [ ( "prefix", "Vec", ), ], ), }, "MeasurementVoteAction": Enum { tag_width: 1, variants: [ ( 0, "Add", "MeasurementVoteAction__Add", ), ( 1, "Remove", "MeasurementVoteAction__Remove", ), ], }, "MeasurementVoteAction__Add": Struct { fields: UnnamedFields( [ "ContractExpectedMeasurements", ], ), }, "MeasurementVoteAction__Remove": Struct { fields: UnnamedFields( [ "ContractExpectedMeasurements", ], ), }, "MeasurementVotes": Struct { fields: NamedFields( [ ( "vote_by_account", "BTreeMap", ), ], ), }, "Metrics": Struct { fields: NamedFields( [ ( "sign_with_v1_payload_count", "u64", ), ( "sign_with_v2_payload_count", "u64", ), ], ), }, "MpcContract": Struct { fields: NamedFields( [ ( "protocol_state", "ProtocolContractState", ), ( "pending_signature_requests", "LookupMap", ), ( "pending_ckd_requests", "LookupMap", ), ( "pending_verify_foreign_tx_requests", "LookupMap", ), ( "proposed_updates", "ProposedUpdates", ), ( "node_foreign_chain_support", "SupportedForeignChainsByNode", ), ( "config", "Config", ), ( "tee_state", "TeeState", ), ( "accept_requests", "bool", ), ( "node_migrations", "NodeMigrations", ), ( "metrics", "Metrics", ), ( "foreign_chains", "Lazy", ), ( "tee_verifier_account_id", "Option", ), ( "tee_verifier_votes", "TeeVerifierVotes", ), ], ), }, "MpcPublicKey": Enum { tag_width: 1, variants: [ ( 0, "Secp256k1", "Secp256k1PublicKey", ), ( 1, "Ed25519", "Ed25519PublicKey", ), ( 2, "Bls12381", "Bls12381G2PublicKey", ), ], }, "MrtdHash": Struct { fields: UnnamedFields( [ "[u8; 48]", ], ), }, "NodeMigrations": Struct { fields: NamedFields( [ ( "backup_services_info", "IterableMap", ), ( "ongoing_migrations", "IterableMap", ), ], ), }, "Option": Enum { tag_width: 1, variants: [ ( 0, "None", "()", ), ( 1, "Some", "AccountId", ), ], }, "Option": Enum { tag_width: 1, variants: [ ( 0, "None", "()", ), ( 1, "Some", "EpochId", ), ], }, "Option": Enum { tag_width: 1, variants: [ ( 0, "None", "()", ), ( 1, "Some", "KeyEventInstance", ), ], }, "Option": Enum { tag_width: 1, variants: [ ( 0, "None", "()", ), ( 1, "Some", "PublicKeyExtended", ), ], }, "ParticipantId": Struct { fields: UnnamedFields( [ "u32", ], ), }, "ParticipantInfo": Struct { fields: NamedFields( [ ( "url", "String", ), ( "tls_public_key", "Ed25519PublicKey", ), ], ), }, "Participants": Struct { fields: NamedFields( [ ( "next_id", "ParticipantId", ), ( "participants", "Vec<(AccountId, ParticipantId, ParticipantInfo)>", ), ], ), }, "ProposedThresholdParameters": Struct { fields: NamedFields( [ ( "parameters", "ThresholdParameters", ), ( "per_domain_thresholds", "BTreeMap", ), ], ), }, "ProposedUpdates": Struct { fields: NamedFields( [ ( "vote_by_participant", "IterableMap", ), ( "entries", "IterableMap", ), ( "id", "UpdateId", ), ], ), }, "Protocol": Enum { tag_width: 1, variants: [ ( 0, "CaitSith", "Protocol__CaitSith", ), ( 1, "Frost", "Protocol__Frost", ), ( 2, "ConfidentialKeyDerivation", "Protocol__ConfidentialKeyDerivation", ), ( 3, "DamgardEtAl", "Protocol__DamgardEtAl", ), ], }, "ProtocolContractState": Enum { tag_width: 1, variants: [ ( 0, "NotInitialized", "ProtocolContractState__NotInitialized", ), ( 1, "Initializing", "ProtocolContractState__Initializing", ), ( 2, "Running", "ProtocolContractState__Running", ), ( 3, "Resharing", "ProtocolContractState__Resharing", ), ], }, "ProtocolContractState__Initializing": Struct { fields: UnnamedFields( [ "InitializingContractState", ], ), }, "ProtocolContractState__NotInitialized": Struct { fields: Empty, }, "ProtocolContractState__Resharing": Struct { fields: UnnamedFields( [ "ResharingContractState", ], ), }, "ProtocolContractState__Running": Struct { fields: UnnamedFields( [ "RunningContractState", ], ), }, "Protocol__CaitSith": Struct { fields: Empty, }, "Protocol__ConfidentialKeyDerivation": Struct { fields: Empty, }, "Protocol__DamgardEtAl": Struct { fields: Empty, }, "Protocol__Frost": Struct { fields: Empty, }, "PublicKey": Struct { fields: NamedFields( [ ( "data", "Vec", ), ], ), }, "PublicKeyExtended": Enum { tag_width: 1, variants: [ ( 0, "Secp256k1", "PublicKeyExtended__Secp256k1", ), ( 1, "Ed25519", "PublicKeyExtended__Ed25519", ), ( 2, "Bls12381", "PublicKeyExtended__Bls12381", ), ], }, "PublicKeyExtended__Bls12381": Struct { fields: NamedFields( [ ( "public_key", "MpcPublicKey", ), ], ), }, "PublicKeyExtended__Ed25519": Struct { fields: NamedFields( [ ( "near_public_key_compressed", "PublicKey", ), ( "edwards_point", "SerializableEdwardsPoint", ), ], ), }, "PublicKeyExtended__Secp256k1": Struct { fields: NamedFields( [ ( "near_public_key", "PublicKey", ), ], ), }, "ReconstructionThreshold": Struct { fields: UnnamedFields( [ "u64", ], ), }, "ResharingContractState": Struct { fields: NamedFields( [ ( "previous_running_state", "RunningContractState", ), ( "reshared_keys", "Vec", ), ( "resharing_key", "KeyEvent", ), ( "cancellation_requests", "HashSet", ), ( "per_domain_thresholds", "BTreeMap", ), ], ), }, "Rtmr0Hash": Struct { fields: UnnamedFields( [ "[u8; 48]", ], ), }, "Rtmr1Hash": Struct { fields: UnnamedFields( [ "[u8; 48]", ], ), }, "Rtmr2Hash": Struct { fields: UnnamedFields( [ "[u8; 48]", ], ), }, "RunningContractState": Struct { fields: NamedFields( [ ( "domains", "DomainRegistry", ), ( "keyset", "Keyset", ), ( "parameters", "ThresholdParameters", ), ( "parameters_votes", "ThresholdParametersVotes", ), ( "add_domains_votes", "AddDomainsVotes", ), ( "previously_cancelled_resharing_epoch_id", "Option", ), ], ), }, "Secp256k1PublicKey": Struct { fields: UnnamedFields( [ "[u8; 64]", ], ), }, "SerializableEdwardsPoint": Struct { fields: UnnamedFields( [ "[u8; 32]", ], ), }, "String": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "u8", }, "SupportedForeignChainsByNode": Struct { fields: NamedFields( [ ( "foreign_chain_support_by_node", "IterableMap", ), ], ), }, "TeeState": Struct { fields: NamedFields( [ ( "allowed_docker_image_hashes", "AllowedDockerImageHashes", ), ( "allowed_launcher_images", "AllowedLauncherImages", ), ( "votes", "CodeHashesVotes", ), ( "launcher_votes", "LauncherHashVotes", ), ( "stored_attestations", "IterableMap", ), ( "allowed_measurements", "AllowedMeasurements", ), ( "measurement_votes", "MeasurementVotes", ), ], ), }, "TeeVerifierVotes": Struct { fields: NamedFields( [ ( "pending", "Votes", ), ], ), }, "Threshold": Struct { fields: UnnamedFields( [ "u64", ], ), }, "ThresholdParameters": Struct { fields: NamedFields( [ ( "participants", "Participants", ), ( "threshold", "Threshold", ), ], ), }, "ThresholdParametersVotes": Struct { fields: NamedFields( [ ( "proposal_by_account", "BTreeMap", ), ], ), }, "Timestamp": Struct { fields: UnnamedFields( [ "[u8; 8]", ], ), }, "UpdateId": Struct { fields: UnnamedFields( [ "u64", ], ), }, "Vec<(AccountId, ParticipantId, ParticipantInfo)>": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "(AccountId, ParticipantId, ParticipantInfo)", }, "Vec": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "AllowedLauncherImage", }, "Vec": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "AllowedMpcDockerImage", }, "Vec": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "ContractExpectedMeasurements", }, "Vec": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "DomainConfig", }, "Vec": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "KeyForDomain", }, "Vec": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "LauncherDockerComposeHash", }, "Vec": Sequence { length_width: 4, length_range: 0..=4294967295, elements: "u8", }, "Vector": Struct { fields: NamedFields( [ ( "len", "u32", ), ( "values", "IndexMap", ), ], ), }, "Votes": Struct { fields: NamedFields( [ ( "proposal_by_voter", "IterableMap", ), ( "votes_by_proposal", "IterableMap", ), ], ), }, "[u8; 32]": Sequence { length_width: 0, length_range: 32..=32, elements: "u8", }, "[u8; 64]": Sequence { length_width: 0, length_range: 64..=64, elements: "u8", }, "[u8; 8]": Sequence { length_width: 0, length_range: 8..=8, elements: "u8", }, "[u8; 96]": Sequence { length_width: 0, length_range: 96..=96, elements: "u8", }, "bool": Primitive( 1, ), "u32": Primitive( 4, ), "u64": Primitive( 8, ), "u8": Primitive( 1, ), }, }