Versions in this module Expand all Collapse all v1 v1.3.0 May 18, 2022 Changes in this version + const AttributeKeyParam + const BootstrappedService + const ErrInvalidAttributeKey + const ErrInvalidJobID + const ErrInvalidRegistryAddress + const ErrInvalidRoleID + const ErrInvalidRuleID + const ErrInvalidTokenID + const ErrJobNotFound + const RoleIDParam + const RuleIDParam + func Register(ctx map[string]interface{}, r chi.Router) + func RegisterBeta(ctx map[string]interface{}, r chi.Router) + func Webhook(http.ResponseWriter, *http.Request) + type AddRole struct + Collaborators []identity.DID + Key string + type Bootstrapper struct + func (b Bootstrapper) Bootstrap(ctx map[string]interface{}) error + type CloneDocumentRequest struct + Scheme string + type CreateDocumentRequest struct + DocumentID byteutils.OptionalHex + type GenerateAccountResponse struct + DID byteutils.HexBytes + JobID byteutils.HexBytes + type Job = gocelery.Job + type RemoveCollaboratorsRequest struct + Collaborators []identity.DID + type Role struct + Collaborators []byteutils.HexBytes + ID byteutils.HexBytes + type Service struct + func (s Service) AddAttributes(ctx context.Context, docID []byte, attrs []documents.Attribute) (documents.Document, error) + func (s Service) AddRole(ctx context.Context, docID []byte, roleKey string, dids []identity.DID) (*coredocumentpb.Role, error) + func (s Service) AddSignedAttribute(ctx context.Context, docID []byte, label string, payload []byte, ...) (documents.Document, error) + func (s Service) AddTransitionRules(ctx context.Context, docID []byte, addRules pending.AddTransitionRules) ([]*coredocumentpb.TransitionRule, error) + func (s Service) CloneDocument(ctx context.Context, payload documents.ClonePayload) (documents.Document, error) + func (s Service) Commit(ctx context.Context, docID []byte) (documents.Document, gocelery.JobID, error) + func (s Service) CreateDocument(ctx context.Context, req documents.UpdatePayload) (documents.Document, error) + func (s Service) DeleteAttribute(ctx context.Context, docID []byte, key documents.AttrKey) (documents.Document, error) + func (s Service) DeleteTransitionRule(ctx context.Context, docID, ruleID []byte) error + func (s Service) GenerateAccount(acc config.CentChainAccount) (did, jobID byteutils.HexBytes, err error) + func (s Service) GenerateProofs(ctx context.Context, docID []byte, fields []string) (*documents.DocumentProof, error) + func (s Service) GenerateProofsForVersion(ctx context.Context, docID, versionID []byte, fields []string) (*documents.DocumentProof, error) + func (s Service) GetAccount(accountID []byte) (config.Account, error) + func (s Service) GetAccounts() ([]config.Account, error) + func (s Service) GetDocument(ctx context.Context, docID []byte, status documents.Status) (documents.Document, error) + func (s Service) GetDocumentVersion(ctx context.Context, docID, versionID []byte) (documents.Document, error) + func (s Service) GetEntityByRelationship(ctx context.Context, docID []byte) (documents.Document, error) + func (s Service) GetEntityRelationShips(ctx context.Context, entityID []byte) ([]documents.Document, error) + func (s Service) GetRole(ctx context.Context, docID, roleID []byte) (*coredocumentpb.Role, error) + func (s Service) GetTransitionRule(ctx context.Context, docID, ruleID []byte) (*coredocumentpb.TransitionRule, error) + func (s Service) Job(accID identity.DID, jobID []byte) (*gocelery.Job, error) + func (s Service) MintNFT(ctx context.Context, request nft.MintNFTRequest) (*nft.TokenResponse, error) + func (s Service) MintNFTOnCC(ctx context.Context, request nft.MintNFTOnCCRequest) (*nft.TokenResponse, error) + func (s Service) OwnerOfNFT(registry common.Address, tokenID nft.TokenID) (common.Address, error) + func (s Service) OwnerOfNFTOnCC(registry common.Address, tokenID nft.TokenID) (types.AccountID, error) + func (s Service) PushAttributeToOracle(ctx context.Context, docID []byte, req oracle.PushAttributeToOracleRequest) (*oracle.PushToOracleResponse, error) + func (s Service) RemoveCollaborators(ctx context.Context, docID []byte, dids []identity.DID) (documents.Document, error) + func (s Service) SignPayload(accountID, payload []byte) (*coredocumentpb.Signature, error) + func (s Service) TransferNFT(ctx context.Context, to, registry common.Address, tokenID nft.TokenID) (*nft.TokenResponse, error) + func (s Service) TransferNFTOnCC(ctx context.Context, registry common.Address, tokenID nft.TokenID, ...) (*nft.TokenResponse, error) + func (s Service) UpdateDocument(ctx context.Context, req documents.UpdatePayload) (documents.Document, error) + func (s Service) UpdateRole(ctx context.Context, docID, roleID []byte, dids []identity.DID) (*coredocumentpb.Role, error) + type SignedAttributeRequest struct + Label string + Payload string + Type string + type TransitionRule struct + Action string + AttributeLabels []byteutils.HexBytes + Field byteutils.HexBytes + Roles []byteutils.HexBytes + RuleID byteutils.HexBytes + TargetAttributeLabel string + Wasm byteutils.HexBytes + type TransitionRules struct + Rules []TransitionRule + type UpdateDocumentRequest struct + type UpdateRole struct + Collaborators []identity.DID