Documentation
¶
Index ¶
- type Transactor
- func (t Transactor) RetrieveCertificateV1(uuid string) (*client.CertificateV1Wrapper, error)
- func (t Transactor) RetrieveSecretsV1(uuid string) (*client.SecretV1Wrappers, error)
- func (t Transactor) SendCertificateV1(uuid string, dataSignature []byte, dataSigner []byte) (*entityApi.TransactionStatus, error)
- func (t Transactor) SendSecretV1(certificateUuid string, lockEncryptor *X25519.PublicKey, ...) (*entityApi.TransactionStatus, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transactor ¶
type Transactor struct {
// contains filtered or unexported fields
}
Transactor provides helper function to hide the complexity of Transaction creation, signature and API dialog.
func NewTransactor ¶
func NewTransactor( apiUrl string, chainID string, msgSigner *ED25519.PrivateKey, companyChainID string, ) *Transactor
Transactor constructor.
func (Transactor) RetrieveCertificateV1 ¶ added in v1.1.0
func (t Transactor) RetrieveCertificateV1(uuid string) (*client.CertificateV1Wrapper, error)
RetrieveCertificateV1 fetches the API to find the corresponding transaction and converts its content to a CertificateV1 with its blockchain status.
func (Transactor) RetrieveSecretsV1 ¶ added in v1.1.0
func (t Transactor) RetrieveSecretsV1(uuid string) (*client.SecretV1Wrappers, error)
RetrieveSecretsV1 fetches the API to find the corresponding transactions and converts their content to a SecretV1 with its blockchain status.
func (Transactor) SendCertificateV1 ¶ added in v1.1.0
func (t Transactor) SendCertificateV1( uuid string, dataSignature []byte, dataSigner []byte, ) (*entityApi.TransactionStatus, error)
SendCertificateV1 wraps a CertificateV1 in a MsgCreateCertificate, creates a transaction and sends it to the API.
func (Transactor) SendSecretV1 ¶ added in v1.1.0
func (t Transactor) SendSecretV1( certificateUuid string, lockEncryptor *X25519.PublicKey, lockNonce *X25519.NaclBoxNonce, lockContent []byte, ) (*entityApi.TransactionStatus, error)
SendSecretV1 wraps a SecretV1 in a MsgCreateSecret, creates a transaction and sends it to the API.