Search…
Circuit Registry
The circuit registry represents a secure facility for storing compiled circuit artifacts and related proving and verifying key material. The circuit registry uses Vault for key management and stores proving and verifying keys as secrets within Vault.

Circuit

1
type Circuit struct {
2
provide.Model
3
4
// Artifacts, i.e., r1cs, ABI, etc
5
ABI []byte `json:"abi,omitempty"`
6
Binary []byte `gorm:"column:bin" json:"-"`
7
8
// Vault and the vault secret identifiers for the encryption/decryption key and proving/verifying keys, SRS
9
VaultID *uuid.UUID `json:"vault_id"`
10
EncryptionKeyID *uuid.UUID `json:"encryption_key_id"`
11
ProvingKeyID *uuid.UUID `json:"proving_key_id"`
12
VerifyingKeyID *uuid.UUID `json:"verifying_key_id"`
13
14
// Associations
15
ApplicationID *uuid.UUID `sql:"type:uuid" json:"-"`
16
OrganizationID *uuid.UUID `sql:"type:uuid" json:"-"`
17
UserID *uuid.UUID `sql:"type:uuid" json:"-"`
18
19
Name *string `json:"name"`
20
Description *string `json:"description"`
21
Identifier *string `json:"identifier"`
22
Provider *string `json:"provider"`
23
ProvingScheme *string `json:"proving_scheme"`
24
Curve *string `json:"curve"`
25
26
Status *string `sql:"not null;default:'init'" json:"status"`
27
28
// SRS (structured reference string) is protocol-specific and may be nil depending on the proving scheme
29
StructuredReferenceStringID *uuid.UUID `gorm:"column:srs_id" json:"srs_id,omitempty"`
30
31
// storage for encrypted notes and nullifier trees
32
NoteStoreID *uuid.UUID `sql:"type:uuid" json:"note_store_id"`
33
NullifierStoreID *uuid.UUID `sql:"type:uuid" json:"nullifier_store_id"`
34
35
// artifacts
36
Artifacts map[string]interface{} `sql:"-" json:"artifacts,omitempty"`
37
38
// optional on-chain artifact (i.e., verifier contract)
39
VerifierContract map[string]interface{} `sql:"-" json:"verifier_contract,omitempty"
Copied!
Last modified 1mo ago
Copy link
Contents
Circuit