Documentation ¶
Overview ¶
It converts a `WebauthnCredential` to a `webauthn.Credential`
Index ¶
- Constants
- Variables
- func NewWebAuthnCredential(c *protocol.ParsedCredentialCreationData) *types.WebauthnCredential
- 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 NewRSAPubKey(bz []byte) *PubKey
- func NewSecp256k1PubKey(bz []byte) *PubKey
- func NewWebAuthnPubKey(bz []byte) *PubKey
- func PubKeyFromBytes(bz []byte) (*PubKey, error)
- func PubKeyFromCommon(pk SNRPubKey) (*PubKey, error)
- func PubKeyFromDID(did string) (*PubKey, error)
- func PubKeyFromWebAuthn(cred *types.WebauthnCredential) (*PubKey, error)
- type SNRPubKey
- type WebauthnAuthenticator
- type WebauthnCredential
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 NewWebAuthnCredential ¶ added in v0.3.1
func NewWebAuthnCredential(c *protocol.ParsedCredentialCreationData) *types.WebauthnCredential
NewWebAuthnCredential creates a new WebauthnCredential from a ParsedCredentialCreationData and contains all needed information about a WebAuthn credential for storage. This is then used to create a VerificationMethod for the DID Document.
Types ¶
type CoinType ¶ added in v0.3.1
CoinType is a type alias for types.CoinType in pkg/crypto/internal/types.
func CoinTypeFromAddrPrefix ¶ added in v0.4.3
CoinTypeFromAddrPrefix returns the CoinType from the public key address prefix (btc, eth).
func CoinTypeFromBipPath ¶ added in v0.4.3
CoinTypeFromBipPath returns the CoinType from the BIP Path (0, 60).
func CoinTypeFromDidMethod ¶ added in v0.4.3
CoinTypeFromDidMethod returns the CoinType from the DID Method (btc, eth).
func CoinTypeFromName ¶ added in v0.4.3
CoinTypeFromName returns the CoinType from the Blockchain name (Bitcoin, Ethereum).
func CoinTypeFromTicker ¶ added in v0.4.3
CoinTypeFromTicker returns the CoinType from the tokens Ticker (BTC, ETH).
type KeyType ¶ added in v0.3.1
KeyType is a type alias for types.KeyType in pkg/crypto/internal/types.
type MPCCmpConfig ¶ added in v0.3.2
MPCCmpConfig is a type alias for pool.CmpConfig in pkg/pool.
type MPCECDSASignature ¶ added in v0.3.2
MPCECDSASignature is a type alias for ecdsa.Signature in pkg/ecdsa.
func NewEmptyECDSASecp256k1Signature ¶ added in v0.3.2
func NewEmptyECDSASecp256k1Signature() MPCECDSASignature
NewEmptyECDSASecp256k1Signature creates a new empty MPCECDSASignature.
type MPCPool ¶ added in v0.3.2
MPCPool is a type alias for pool.Pool in pkg/pool.
func NewMPCPool ¶ added in v0.3.2
NewMPCPool creates a new MPCPool with the given size.
type MPCSecp256k1Curve ¶ added in v0.3.2
MPCSecp256k1Curve is a type alias for curve.Secp256k1Point in pkg/math/curve.
type MPCSecp256k1Point ¶ added in v0.3.2
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 ¶ added in v0.3.1
NewEd25519PubKey takes a byte array of raw public key bytes and returns a PubKey.
func NewRSAPubKey ¶ added in v0.3.1
NewRSAPubKey takes a byte array of raw public key bytes and returns a PubKey.
func NewSecp256k1PubKey ¶ added in v0.3.1
NewSecp256k1PubKey takes a byte array of raw public key bytes and returns a PubKey.
func NewWebAuthnPubKey ¶ added in v0.3.1
NewWebAuthnPubKey takes a byte array of raw public key bytes and returns a PubKey.
func PubKeyFromBytes ¶ added in v0.3.1
PubKeyFromBytes takes a byte array and returns a PubKey
func PubKeyFromCommon ¶ added in v0.3.1
PubKeyFromCommon takes a common.SNRPubKey and returns a PubKey
func PubKeyFromDID ¶ added in v0.3.1
It takes a string of a DID, decodes it from base58, unmarshals it into a PubKey, and returns the PubKey
func PubKeyFromWebAuthn ¶ added in v0.3.1
func PubKeyFromWebAuthn(cred *types.WebauthnCredential) (*PubKey, error)
PubKeyFromWebAuthn takes a webauthncose.Key and returns a PubKey
type WebauthnAuthenticator ¶ added in v0.3.1
type WebauthnAuthenticator = types.WebauthnAuthenticator
WebauthnAuthenticator is a type alias for types.WebauthnAuthenticator in pkg/crypto/internal/types.
type WebauthnCredential ¶ added in v0.3.1
type WebauthnCredential = types.WebauthnCredential
WebauthnCredential is a type alias for types.WebauthnCredential in pkg/crypto/internal/types.