Documentation ¶
Overview ¶
It converts a `WebauthnCredential` to a `webauthn.Credential`
Index ¶
- Constants
- Variables
- func Base58Decode(str string) ([]byte, error)
- func Base58Encode(bz []byte) string
- func Base64Decode(str string) ([]byte, error)
- func Base64Encode(bz []byte) string
- func DeriveBIP44(config *cmp.Config, coinType types.CoinType, ...) (*cmp.Config, error)
- type CoinType
- type KeyType
- type MPCCmpConfig
- type MPCECDSASignature
- type MPCPool
- type MPCSecp256k1Curve
- type MPCSecp256k1Point
- type Network
- type PartyID
- type PeerID
- type PubKey
- func NewEd25519PubKey(bz []byte) *PubKey
- func NewPubKeyFromCmpConfig(config *cmp.Config) (*PubKey, error)
- func NewRSAPubKey(bz []byte) *PubKey
- func NewSecp256k1PubKey(bz []byte) *PubKey
- func NewWebAuthnPubKey(bz []byte) *PubKey
- func PubKeyFromBytes(bz []byte) (*PubKey, error)
- func PubKeyFromDID(did string) (*PubKey, error)
Constants ¶
const BTCCoinType = types.CoinType_CoinType_BITCOIN
BTCCoinType is the CoinType for Bitcoin.
const COSMOSCoinType = types.CoinType_CoinType_COSMOS
COSMOSCoinType is the CoinType for Cosmos.
const DOGECoinType = types.CoinType_CoinType_DOGE
DOGECoinType is the CoinType for Dogecoin.
const ETHCoinType = types.CoinType_CoinType_ETHEREUM
ETHCoinType is the CoinType for Ethereum.
const Ed25519KeyType = types.KeyType_KeyType_ED25519_VERIFICATION_KEY_2018
Ed25519KeyType is the key type for ed25519.
const FILCoinType = types.CoinType_CoinType_FILECOIN
FILECOINCoinType is the CoinType for Filecoin.
const HNSCoinType = types.CoinType_CoinType_HNS
HNSCoinType is the CoinType for Handshake.
const LTCCoinType = types.CoinType_CoinType_LITECOIN
LTCCoinType is the CoinType for Litecoin.
const RSAKeyType = types.KeyType_KeyType_RSA_VERIFICATION_KEY_2018
RSAKeyType is the key type for RSA.
const SOLCoinType = types.CoinType_CoinType_SOLANA
SOLCoinType is the CoinType for Solana.
const SONRCoinType = types.CoinType_CoinType_SONR
SONRCoinType is the CoinType for Sonr.
const Secp256k1KeyType = types.KeyType_KeyType_ECDSA_SECP256K1_VERIFICATION_KEY_2019
Secp256k1KeyType is the key type for secp256k1.
const TestCoinType = types.CoinType_CoinType_TESTNET
TestCoinType is the CoinType for Testnet.
const WebAuthnKeyType = types.KeyType_KeyType_WEB_AUTHN_AUTHENTICATION_2018
WebAuthnKeyType is the key type for WebAuthn.
const XRPCoinType = types.CoinType_CoinType_XRP
XRPCoinType is the CoinType for XRP.
Variables ¶
var AllCoinTypes = types.AllCoinTypes
AllCoinTypes is a slice of all CoinTypes.
Functions ¶
func Base58Decode ¶ added in v0.6.19
Base58Decode takes a base68 encoded string and returns a byte array.
func Base58Encode ¶ added in v0.6.19
Base58Encode takes a byte array and returns a base68 encoded string.
func Base64Decode ¶ added in v0.6.20
Base64Decode takes a base64 encoded string and returns a byte array.
func Base64Encode ¶ added in v0.6.20
Base64Encode takes a byte array and returns a base64 encoded string.
Types ¶
type CoinType ¶
CoinType is a type alias for types.CoinType in pkg/crypto/internal/types.
func CoinTypeFromAddrPrefix ¶
CoinTypeFromAddrPrefix returns the CoinType from the public key address prefix (btc, eth).
func CoinTypeFromBipPath ¶
CoinTypeFromBipPath returns the CoinType from the BIP Path (0, 60).
func CoinTypeFromDidMethod ¶
CoinTypeFromDidMethod returns the CoinType from the DID Method (btc, eth).
func CoinTypeFromName ¶
CoinTypeFromName returns the CoinType from the Blockchain name (Bitcoin, Ethereum).
func CoinTypeFromTicker ¶
CoinTypeFromTicker returns the CoinType from the tokens Ticker (BTC, ETH).
type MPCCmpConfig ¶
MPCCmpConfig is a type alias for pool.CmpConfig in pkg/pool.
type MPCECDSASignature ¶
MPCECDSASignature is a type alias for ecdsa.Signature in pkg/ecdsa.
func NewEmptyECDSASecp256k1Signature ¶
func NewEmptyECDSASecp256k1Signature() MPCECDSASignature
NewEmptyECDSASecp256k1Signature creates a new empty MPCECDSASignature.
type MPCPool ¶
MPCPool is a type alias for pool.Pool in pkg/pool.
func NewMPCPool ¶
NewMPCPool creates a new MPCPool with the given size.
type MPCSecp256k1Curve ¶
MPCSecp256k1Curve is a type alias for curve.Secp256k1Point in pkg/math/curve.
type MPCSecp256k1Point ¶
type MPCSecp256k1Point = curve.Secp256k1Point
MPCSecp256k1Point is a type alias for curve.Secp256k1Point in pkg/math/curve.
type Network ¶
type Network interface { // Ls returns a list of peers that are connected to the network. Ls() []party.ID // A function that takes in a party ID and returns a channel of protocol messages. Next(id party.ID) <-chan *protocol.Message // Sending a message to the network. Send(msg *protocol.Message) // A channel that is closed when the party is done with the protocol. Done(id party.ID) chan struct{} // A function that is called when a party is done with the protocol. Quit(id party.ID) // IsOnlineNetwork returns true if the network is an online network. IsOnlineNetwork() bool }
A Network is a channel that sends messages to parties and receives messages from parties.
type PubKey ¶
PubKey is a type alias for types.PubKey in pkg/crypto/internal/types.
func NewEd25519PubKey ¶
NewEd25519PubKey takes a byte array of raw public key bytes and returns a PubKey.
func NewPubKeyFromCmpConfig ¶
NewPubKeyFromCmpConfig takes a `cmp.Config` and returns a `PubKey`
func NewRSAPubKey ¶
NewRSAPubKey takes a byte array of raw public key bytes and returns a PubKey.
func NewSecp256k1PubKey ¶
NewSecp256k1PubKey takes a byte array of raw public key bytes and returns a PubKey.
func NewWebAuthnPubKey ¶
NewWebAuthnPubKey takes a byte array of raw public key bytes and returns a PubKey.
func PubKeyFromBytes ¶
PubKeyFromBytes takes a byte array and returns a PubKey
func PubKeyFromDID ¶
It takes a string of a DID, decodes it from base58, unmarshals it into a PubKey, and returns the PubKey