Documentation ¶
Overview ¶
Package ledger is corresponding Go package for libindy's ledger namespace. We suggest that you read indy SDK documentation for more information.
Index ¶
- func BuildAttribRequest(sDID, tDID, hasc, raw, enc string) ctx.Channel
- func BuildCredDefRequest(submitter, data string) ctx.Channel
- func BuildGetAttribRequest(sDID, tDID, hasc, raw, enc string) ctx.Channel
- func BuildGetCredDefRequest(submitter, id string) ctx.Channel
- func BuildGetNymRequest(submitterDid, targetDid string) ctx.Channel
- func BuildGetSchemaRequest(submitter, id string) ctx.Channel
- func BuildNymRequest(submitterDid, targetDid, verkey, alias, role string) ctx.Channel
- func BuildSchemaRequest(submitterDid, data string) ctx.Channel
- func ParseGetCredDefResponse(credDefResp string) ctx.Channel
- func ParseGetSchemaResponse(response string) ctx.Channel
- func ReadCredDef(_ int, submitter, credDefID string) (cdID, cd string, err error)
- func ReadSchema(_ int, submitter, ID string) (sID, s string, err error)
- func SignAndSubmitRequest(pool, wallet int, submitterDid, request string) ctx.Channel
- func SubmitRequest(poolHandle int, request string) ctx.Channel
- func WriteCredDef(_, wallet int, submitter, credDef string) (err error)
- func WriteDID(_, wallet int, submitterDID, targetDID, verKey, alias, role string) (err error)
- func WriteSchema(_ int, wallet int, submitter string, scJSON string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAttribRequest ¶
BuildAttribRequest is a libindy wrapper function. See more information from indy SDK documentation.
The function builds a ledger transaction message which will be send to it with SignAndSubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, WriteSchema,...).
func BuildCredDefRequest ¶
BuildCredDefRequest builds an CRED_DEF request. Request to add a Credential Definition (in particular, public key), that Issuer creates for a particular Credential Schema.
Note! You should us WriteSchema, WriteDID, ... instead.
func BuildGetAttribRequest ¶
BuildGetAttribRequest is a libindy wrapper function. See more information from indy SDK documentation.
The function builds a ledger transaction message which will be send to it with SubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, WriteSchema,...).
func BuildGetCredDefRequest ¶
BuildGetCredDefRequest builds a GET_CRED_DEF request. Request to get a Credential Definition (in particular, public key), that Issuer creates for a particular Credential Schema.
Note! You should us WriteSchema, WriteDID, ... instead.
func BuildGetNymRequest ¶
BuildGetNymRequest is a libindy wrapper function. See more information from indy SDK documentation.
The function builds a ledger transaction message which will be send to it with SubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, WriteSchema,...).
func BuildGetSchemaRequest ¶
BuildGetSchemaRequest is a libindy wrapper function. See more information from indy SDK documentation.
The function builds a ledger transaction message which will be send to it with SubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, WriteSchema,...).
func BuildNymRequest ¶
BuildNymRequest is a libindy wrapper function. See more information from indy SDK documentation.
The function builds a ledger transaction message which will be send to it with SignAndSubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, WriteSchema,...).
func BuildSchemaRequest ¶
BuildSchemaRequest is a libindy wrapper function. See more information from indy SDK documentation.
The function builds a ledger transaction message which will be send to it with SighAndSubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, WriteSchema,...).
func ParseGetCredDefResponse ¶
ParseGetCredDefResponse is a libindy wrapper function. See more information from indy SDK documentation.
The function parses the results from SubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, ReadCredDef,...).
func ParseGetSchemaResponse ¶
ParseGetSchemaResponse is a libindy wrapper function. See more information from indy SDK documentation.
The function parses the results from SubmitRequest. Note that in normal cases, you should not use it for leger communication. You should use the special transaction functions from this package (e.g. ReadSchema, ReadCredDef,...).
func ReadCredDef ¶
ReadCredDef reads cred def from ledgers by cred def ID. If multiple ledger plugins is used, it returns where it can find data first.
func ReadSchema ¶
ReadSchema reads schema from ledgers by ID. If multiple ledger plugins is used, it returns where it can find data first.
func SignAndSubmitRequest ¶
SignAndSubmitRequest Signs and submits request message to validator pool.
Adds submitter information to passed request json, signs it with submitter sign key (see wallet_sign), and sends signed request message to validator pool (see write_request).
Note! You should us WriteSchema, WriteDID, ... instead.
func SubmitRequest ¶
SubmitRequest publishes request message to validator pool (no signing, unlike sign_and_submit_request).
The request is sent to the validator pool as is. It's assumed that it's already prepared.
Note! You should us WriteSchema, WriteDID, ... instead.
func WriteCredDef ¶
WriteCredDef writes cred def to ledger. If multiple ledger plugins is in use, it writes data to all of them.
Types ¶
This section is empty.