Documentation
¶
Index ¶
- Constants
- func Addressable(keyClient KeyClient, address acm.Address) (acm.Addressable, error)
- func NewKeyClient(rpcAddress string, logger *logging.Logger) *keyClient
- func Signer(keyClient KeyClient, address acm.Address) acm.Signer
- type HTTPResponse
- type KeyClient
- type KeyType
- type KeysConfig
- type Requester
Constants ¶
View Source
const ( KeyTypeEd25519Ripemd160 KeyType = "ed25519,ripemd160" KeyTypeEd25519Ripemd160sha256 = "ed25519,ripemd160sha256" KeyTypeEd25519Ripemd160sha3 = "ed25519,sha3" KeyTypeSecp256k1Ripemd160 = "secp256k1,ripemd160" KeyTypeSecp256k1Ripemd160sha256 = "secp256k1,ripemd160sha256" KeyTypeSecp256k1Ripemd160sha3 = "secp256k1,sha3" KeyTypeDefault = KeyTypeEd25519Ripemd160 )
Variables ¶
This section is empty.
Functions ¶
func Addressable ¶ added in v0.18.0
func NewKeyClient ¶ added in v0.18.0
keyClient.New returns a new monax-keys client for provided rpc location Monax-keys connects over http request-responses
Types ¶
type HTTPResponse ¶
type KeyClient ¶
type KeyClient interface { // Sign returns the signature bytes for given message signed with the key associated with signAddress Sign(signAddress acm.Address, message []byte) (signature acm.Signature, err error) // PublicKey returns the public key associated with a given address PublicKey(address acm.Address) (publicKey acm.PublicKey, err error) // Generate requests that a key be generate within the keys instance and returns the address Generate(keyName string, keyType KeyType) (keyAddress acm.Address, err error) // Returns nil if the keys instance is healthy, error otherwise HealthCheck() error }
type KeyType ¶ added in v0.18.0
type KeyType string
This mirrors "github.com/monax/keys/crypto/KeyType" but since we have no use for the struct here it seems simpler to replicate rather than cop an import
type KeysConfig ¶ added in v0.18.0
type KeysConfig struct {
URL string
}
func DefaultKeysConfig ¶ added in v0.18.0
func DefaultKeysConfig() *KeysConfig
Click to show internal directories.
Click to hide internal directories.