alastria

package
v0.0.0-...-b2c4e65 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIssuerCredentials

func AddIssuerCredentials(client *alaTypes.Connection, signedCredentials []string, entityDid *alaTypes.Did) ([]string, []string, error)

func AddSubjectCredentials

func AddSubjectCredentials(client *alaTypes.Connection, signedCredentials []string, subjectDid *alaTypes.Did, URI string) ([]string, []string, error)

func CreateAlastriaIdentity

func CreateAlastriaIdentity(conn *alaTypes.Connection) (*types.Transaction, error)

func GetCredentials

func GetCredentials(conn *alaTypes.Connection, signedCredentials []string, subjectDid *alaTypes.Did) ([]*alaTypes.PSMHashStatuses, error)

func GetCurrentPublicKey

func GetCurrentPublicKey(conn *alaTypes.Connection, agentAddress common.Address) (string, error)

func GetDIDGivenAddress

func GetDIDGivenAddress(conn *alaTypes.Connection, address common.Address) (*alaTypes.Did, error)

func GetDIDGivenPublicKey

func GetDIDGivenPublicKey(conn *alaTypes.Connection, publicKey string) (*alaTypes.Did, error)

func HexToTx

func HexToTx(txStr string) (*types.Transaction, error)

func IdentityKeys

func IdentityKeys(conn *alaTypes.Connection, agentAddress common.Address) (string, error)

func NewClient

func NewClient(args *alaTypes.ClientConf) (*alaTypes.Connection, error)

Initializes the client that any actor interacting with the network should use. It can be: subject, issuer, or service provider. args.NodeUrl is mandatory args.Keystore is not mandatory, but it is required if you want to sign JWT or tx

func NewDid

func NewDid(network, networkId, proxyAddress string) *alaTypes.Did

func NewDidFromString

func NewDidFromString(didStr string) (*alaTypes.Did, error)

func PrepareAlastriaId

func PrepareAlastriaId(conn *alaTypes.Connection, newActorPublicKey string) (*types.Transaction, error)

func PublicKeyToAddress

func PublicKeyToAddress(publicKey string) (common.Address, error)

func SendTx

func SendTx(conn *alaTypes.Connection, tx *types.Transaction) error

Sends a transaction to the network. It will wait until the transaction is mined blocking the current thread checking once every second. conn needs to have a client and keystore set

func SetKeystore

func SetKeystore(conn *alaTypes.Connection, ksConfig *alaTypes.KeystoreConfig) error

Set the keystore that will be used to sign the transactions and JWTs

func SignJWT

func SignJWT(conn *alaTypes.Connection, jwt interface{}) (string, error)

func TxToHex

func TxToHex(tx_ *types.Transaction) (string, error)

func VerifyJWT

func VerifyJWT(signedJWT string, publicKey string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL