Documentation ¶
Index ¶
- Variables
- func Assert(msg string, err error)
- func CmdAddClaim(c *cli.Context) error
- func CmdAddClaimsFromFile(c *cli.Context) error
- func CmdDbIPFSexport(c *cli.Context) error
- func CmdDbRawDump(c *cli.Context) error
- func CmdDbRawImport(c *cli.Context) error
- func CmdNewIdentity(c *cli.Context) error
- func Fail(c *gin.Context, msg string, err error)
- func HandleClaimsDump(c *gin.Context)
- func HandleGetRoot(c *gin.Context)
- func HandleInfo(c *gin.Context)
- func HandleRawDump(c *gin.Context)
- func HandleRawImport(c *gin.Context)
- func ListenAndServe(srv *http.Server, name string) error
- func LoadAdminService(mt *merkletree.MerkleTree, rootservice rootsrv.Service, ...) adminsrv.Service
- func LoadClaimService(mt *merkletree.MerkleTree, rootservice rootsrv.Service, ...) claimsrv.Service
- func LoadContract(client eth.Client, jsonabifile string, address *string) *eth.Contract
- func LoadCounterfactualService(client *eth.Web3Client, claimservice claimsrv.Service, storage db.Storage) counterfactualsrv.Service
- func LoadEthClient2(ks *ethkeystore.KeyStore, acc *accounts.Account) *eth.Client2
- func LoadGenesis(mt *merkletree.MerkleTree) *core.GenesisProofClaims
- func LoadIdentityService(claimservice claimsrv.Service) identitysrv.Service
- func LoadKeyStore() (*ethkeystore.KeyStore, accounts.Account)
- func LoadKeyStoreBabyJub() (*babykeystore.KeyStore, *babyjub.PublicKeyComp)
- func LoadMerkele(storage db.Storage) *merkletree.MerkleTree
- func LoadRootsService(client *eth.Client2, kUpdateRootMtp []byte) rootsrv.Service
- func LoadSignedPacketSigner(ks *babykeystore.KeyStore, pk *babyjub.PublicKey, ...) *signedpacketsrv.SignedPacketSigner
- func LoadStorage() db.Storage
- func LoadWeb3(ks *ethkeystore.KeyStore, acc *accounts.Account) *eth.Web3Client
- func MustRead(c *cli.Context) error
- func NewAdminAPI(prefix string, stopch chan interface{}) (*gin.Engine, *gin.RouterGroup)
- func NewIdentity(keyStorePath, keyStorePassword, keyStoreBabyPath, keyStoreBabyPassword string) error
- func NewServiceAPI(prefix string) (*gin.Engine, *gin.RouterGroup)
- type Config
- type ContractInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var Adminservice adminsrv.Service
View Source
var Claimservice claimsrv.Service
View Source
var Counterfactualservice counterfactualsrv.Service
View Source
var Idservice identitysrv.Service
View Source
var Rootservice rootsrv.Service
View Source
var SignedPacketService signedpacketsrv.SignedPacketSigner
Functions ¶
func CmdAddClaimsFromFile ¶
func CmdDbIPFSexport ¶
func CmdDbRawImport ¶ added in v0.0.6
func CmdNewIdentity ¶ added in v0.0.6
func HandleClaimsDump ¶
func HandleRawDump ¶
func HandleRawImport ¶
func LoadAdminService ¶
func LoadAdminService(mt *merkletree.MerkleTree, rootservice rootsrv.Service, claimservice claimsrv.Service) adminsrv.Service
func LoadClaimService ¶
func LoadClaimService(mt *merkletree.MerkleTree, rootservice rootsrv.Service, ks *babykeystore.KeyStore, pk *babyjub.PublicKey) claimsrv.Service
func LoadContract ¶
func LoadCounterfactualService ¶ added in v0.0.4
func LoadCounterfactualService(client *eth.Web3Client, claimservice claimsrv.Service, storage db.Storage) counterfactualsrv.Service
func LoadEthClient2 ¶ added in v0.0.6
func LoadGenesis ¶ added in v0.0.6
func LoadGenesis(mt *merkletree.MerkleTree) *core.GenesisProofClaims
LoadGenesis will calculate the genesis id from the keys in the configuration file and check it against the id in the configuration. It will populate the merkle tree with the genesis claims if it's empty or check that the claims exist in the merkle tree otherwise. It returns the ProofClaims of the genesis claims.
func LoadIdentityService ¶ added in v0.0.4
func LoadIdentityService(claimservice claimsrv.Service) identitysrv.Service
func LoadKeyStore ¶
func LoadKeyStore() (*ethkeystore.KeyStore, accounts.Account)
func LoadKeyStoreBabyJub ¶ added in v0.0.5
func LoadKeyStoreBabyJub() (*babykeystore.KeyStore, *babyjub.PublicKeyComp)
func LoadMerkele ¶
func LoadMerkele(storage db.Storage) *merkletree.MerkleTree
func LoadRootsService ¶
func LoadSignedPacketSigner ¶
func LoadSignedPacketSigner(ks *babykeystore.KeyStore, pk *babyjub.PublicKey, claimservice claimsrv.Service) *signedpacketsrv.SignedPacketSigner
LoadSignedPacketSigner Adds new claim authorizing a secp256ks key. Returns SignedPacketSigner to sign with key sign.
func LoadStorage ¶
func LoadWeb3 ¶
func LoadWeb3(ks *ethkeystore.KeyStore, acc *accounts.Account) *eth.Web3Client
func NewAdminAPI ¶
func NewAdminAPI(prefix string, stopch chan interface{}) (*gin.Engine, *gin.RouterGroup)
func NewIdentity ¶ added in v0.0.6
func NewServiceAPI ¶
func NewServiceAPI(prefix string) (*gin.Engine, *gin.RouterGroup)
Types ¶
type Config ¶
type Config struct { Server struct { ServiceApi string AdminApi string } Web3 struct { Url string } KeyStore struct { Path string Password string } KeyStoreBaby struct { Path string Password string } Keys struct { Ethereum struct { KDisRaw string `mapstructure:"kdis"` KDis common.Address `mapstructure:"-"` KReenRaw string `mapstructure:"kreen"` KReen common.Address `mapstructure:"-"` KUpdateRootRaw string `mapstructure:"kupdateroot"` KUpdateRoot common.Address `mapstructure:"-"` } BabyJub struct { KOpRaw string `mapstructure:"kop"` KOp babyjub.PublicKey `mapstructure:"-"` } } IdRaw string `mapstructure:"id"` Id core.ID `mapstructure:"-"` Contracts struct { RootCommits ContractInfo Iden3Impl ContractInfo Iden3Deployer ContractInfo Iden3Proxy ContractInfo } Storage struct { Path string } Domain string Namespace string Names struct { Path string } Entitites struct { Path string } }
var C Config
type ContractInfo ¶
Click to show internal directories.
Click to hide internal directories.