Documentation
¶
Index ¶
- Constants
- Variables
- func CreateIdentitySignRequest(identityBytes []byte) crypto.Message
- type AuthData
- func (*AuthData) Descriptor() ([]byte, []int)deprecated
- func (x *AuthData) GetPeerId() string
- func (x *AuthData) GetTimestamp() uint64
- func (x *AuthData) GetWalletAddr() string
- func (*AuthData) ProtoMessage()
- func (x *AuthData) ProtoReflect() protoreflect.Message
- func (x *AuthData) Reset()
- func (x *AuthData) String() string
- type ClientAuthRequest
- func (*ClientAuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ClientAuthRequest) GetV1() *V1ClientAuthRequest
- func (x *ClientAuthRequest) GetVersion() isClientAuthRequest_Version
- func (*ClientAuthRequest) ProtoMessage()
- func (x *ClientAuthRequest) ProtoReflect() protoreflect.Message
- func (x *ClientAuthRequest) Reset()
- func (x *ClientAuthRequest) String() string
- type ClientAuthRequest_V1
- type ClientAuthResponse
- func (*ClientAuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ClientAuthResponse) GetV1() *V1ClientAuthResponse
- func (x *ClientAuthResponse) GetVersion() isClientAuthResponse_Version
- func (*ClientAuthResponse) ProtoMessage()
- func (x *ClientAuthResponse) ProtoReflect() protoreflect.Message
- func (x *ClientAuthResponse) Reset()
- func (x *ClientAuthResponse) String() string
- type ClientAuthResponse_V1
- type PublicKey
- func (*PublicKey) Descriptor() ([]byte, []int)deprecated
- func (x *PublicKey) GetSecp256K1Uncompressed() *Secp256K1Uncompresed
- func (x *PublicKey) GetSignature() *Signature
- func (x *PublicKey) GetTimestamp() uint64
- func (x *PublicKey) GetUnion() isPublicKey_Union
- func (*PublicKey) ProtoMessage()
- func (x *PublicKey) ProtoReflect() protoreflect.Message
- func (x *PublicKey) Reset()
- func (x *PublicKey) String() string
- type PublicKey_Secp256K1Uncompressed
- type Secp256K1Uncompresed
- func (*Secp256K1Uncompresed) Descriptor() ([]byte, []int)deprecated
- func (x *Secp256K1Uncompresed) GetBytes() []byte
- func (*Secp256K1Uncompresed) ProtoMessage()
- func (x *Secp256K1Uncompresed) ProtoReflect() protoreflect.Message
- func (x *Secp256K1Uncompresed) Reset()
- func (x *Secp256K1Uncompresed) String() string
- type Signature
- func (*Signature) Descriptor() ([]byte, []int)deprecated
- func (x *Signature) GetEcdsaCompact() *Signature_ECDSACompact
- func (x *Signature) GetUnion() isSignature_Union
- func (*Signature) ProtoMessage()
- func (x *Signature) ProtoReflect() protoreflect.Message
- func (x *Signature) Reset()
- func (x *Signature) String() string
- type Signature_ECDSACompact
- func (*Signature_ECDSACompact) Descriptor() ([]byte, []int)deprecated
- func (x *Signature_ECDSACompact) GetBytes() []byte
- func (x *Signature_ECDSACompact) GetRecovery() uint32
- func (*Signature_ECDSACompact) ProtoMessage()
- func (x *Signature_ECDSACompact) ProtoReflect() protoreflect.Message
- func (x *Signature_ECDSACompact) Reset()
- func (x *Signature_ECDSACompact) String() string
- type Signature_EcdsaCompact
- type V1ClientAuthRequest
- func (*V1ClientAuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *V1ClientAuthRequest) GetAuthDataBytes() []byte
- func (x *V1ClientAuthRequest) GetAuthSignature() *Signature
- func (x *V1ClientAuthRequest) GetIdentityKeyBytes() []byte
- func (x *V1ClientAuthRequest) GetWalletSignature() *Signature
- func (*V1ClientAuthRequest) ProtoMessage()
- func (x *V1ClientAuthRequest) ProtoReflect() protoreflect.Message
- func (x *V1ClientAuthRequest) Reset()
- func (x *V1ClientAuthRequest) String() string
- type V1ClientAuthResponse
- func (*V1ClientAuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *V1ClientAuthResponse) GetAuthSuccessful() bool
- func (x *V1ClientAuthResponse) GetErrorStr() string
- func (*V1ClientAuthResponse) ProtoMessage()
- func (x *V1ClientAuthResponse) ProtoReflect() protoreflect.Message
- func (x *V1ClientAuthResponse) Reset()
- func (x *V1ClientAuthResponse) String() string
- type XmtpAuthentication
Constants ¶
View Source
const ClientAuthnID_v1_0_0 = libp2pProtocol.ID("/xmtplabs/xmtp-v1/clientauthn/1.0.0")
Variables ¶
View Source
var ( ErrInvalidPeerId = errors.New("invalid peerId") ErrInvalidWalletAddr = errors.New("invalid walletAddress") ErrInvalidSignature = errors.New("invalid signature") ErrNoHandler = errors.New("no handler found for given request version") ErrWalletMismatch = errors.New("wallet address mismatch") ErrWrongPeerId = errors.New("wrong peerId supplied") )
View Source
var File_authn_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type AuthData ¶
type AuthData struct {
WalletAddr string `protobuf:"bytes,1,opt,name=wallet_addr,json=walletAddr,proto3" json:"wallet_addr,omitempty"`
PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
func (*AuthData) Descriptor
deprecated
func (*AuthData) GetTimestamp ¶
func (*AuthData) GetWalletAddr ¶
func (*AuthData) ProtoMessage ¶
func (*AuthData) ProtoMessage()
func (*AuthData) ProtoReflect ¶
func (x *AuthData) ProtoReflect() protoreflect.Message
type ClientAuthRequest ¶
type ClientAuthRequest struct {
// Types that are valid to be assigned to Version:
//
// *ClientAuthRequest_V1
Version isClientAuthRequest_Version `protobuf_oneof:"version"`
// contains filtered or unexported fields
}
func (*ClientAuthRequest) Descriptor
deprecated
func (*ClientAuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClientAuthRequest.ProtoReflect.Descriptor instead.
func (*ClientAuthRequest) GetV1 ¶
func (x *ClientAuthRequest) GetV1() *V1ClientAuthRequest
func (*ClientAuthRequest) GetVersion ¶
func (x *ClientAuthRequest) GetVersion() isClientAuthRequest_Version
func (*ClientAuthRequest) ProtoMessage ¶
func (*ClientAuthRequest) ProtoMessage()
func (*ClientAuthRequest) ProtoReflect ¶
func (x *ClientAuthRequest) ProtoReflect() protoreflect.Message
func (*ClientAuthRequest) Reset ¶
func (x *ClientAuthRequest) Reset()
func (*ClientAuthRequest) String ¶
func (x *ClientAuthRequest) String() string
type ClientAuthRequest_V1 ¶
type ClientAuthRequest_V1 struct {
V1 *V1ClientAuthRequest `protobuf:"bytes,1,opt,name=v1,proto3,oneof"`
}
type ClientAuthResponse ¶
type ClientAuthResponse struct {
// Types that are valid to be assigned to Version:
//
// *ClientAuthResponse_V1
Version isClientAuthResponse_Version `protobuf_oneof:"version"`
// contains filtered or unexported fields
}
func (*ClientAuthResponse) Descriptor
deprecated
func (*ClientAuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use ClientAuthResponse.ProtoReflect.Descriptor instead.
func (*ClientAuthResponse) GetV1 ¶
func (x *ClientAuthResponse) GetV1() *V1ClientAuthResponse
func (*ClientAuthResponse) GetVersion ¶
func (x *ClientAuthResponse) GetVersion() isClientAuthResponse_Version
func (*ClientAuthResponse) ProtoMessage ¶
func (*ClientAuthResponse) ProtoMessage()
func (*ClientAuthResponse) ProtoReflect ¶
func (x *ClientAuthResponse) ProtoReflect() protoreflect.Message
func (*ClientAuthResponse) Reset ¶
func (x *ClientAuthResponse) Reset()
func (*ClientAuthResponse) String ¶
func (x *ClientAuthResponse) String() string
type ClientAuthResponse_V1 ¶
type ClientAuthResponse_V1 struct {
V1 *V1ClientAuthResponse `protobuf:"bytes,1,opt,name=v1,proto3,oneof"`
}
type PublicKey ¶
type PublicKey struct {
Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3,oneof" json:"signature,omitempty"`
// Types that are valid to be assigned to Union:
//
// *PublicKey_Secp256K1Uncompressed
Union isPublicKey_Union `protobuf_oneof:"union"`
// contains filtered or unexported fields
}
PublicKey represents a generalized public key, defined as a union to support cryptographic algorithm agility.
func (*PublicKey) Descriptor
deprecated
func (*PublicKey) GetSecp256K1Uncompressed ¶
func (x *PublicKey) GetSecp256K1Uncompressed() *Secp256K1Uncompresed
func (*PublicKey) GetSignature ¶
func (*PublicKey) GetTimestamp ¶
func (*PublicKey) ProtoMessage ¶
func (*PublicKey) ProtoMessage()
func (*PublicKey) ProtoReflect ¶
func (x *PublicKey) ProtoReflect() protoreflect.Message
type PublicKey_Secp256K1Uncompressed ¶
type PublicKey_Secp256K1Uncompressed struct {
Secp256K1Uncompressed *Secp256K1Uncompresed `protobuf:"bytes,3,opt,name=secp256k1_uncompressed,json=secp256k1Uncompressed,proto3,oneof"`
}
type Secp256K1Uncompresed ¶
type Secp256K1Uncompresed struct {
// uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes
Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
// contains filtered or unexported fields
}
func (*Secp256K1Uncompresed) Descriptor
deprecated
func (*Secp256K1Uncompresed) Descriptor() ([]byte, []int)
Deprecated: Use Secp256K1Uncompresed.ProtoReflect.Descriptor instead.
func (*Secp256K1Uncompresed) GetBytes ¶
func (x *Secp256K1Uncompresed) GetBytes() []byte
func (*Secp256K1Uncompresed) ProtoMessage ¶
func (*Secp256K1Uncompresed) ProtoMessage()
func (*Secp256K1Uncompresed) ProtoReflect ¶
func (x *Secp256K1Uncompresed) ProtoReflect() protoreflect.Message
func (*Secp256K1Uncompresed) Reset ¶
func (x *Secp256K1Uncompresed) Reset()
func (*Secp256K1Uncompresed) String ¶
func (x *Secp256K1Uncompresed) String() string
type Signature ¶
type Signature struct {
// Types that are valid to be assigned to Union:
//
// *Signature_EcdsaCompact
Union isSignature_Union `protobuf_oneof:"union"`
// contains filtered or unexported fields
}
Signature represents a generalized public key signature, defined as a union to support cryptographic algorithm agility.
func (*Signature) Descriptor
deprecated
func (*Signature) GetEcdsaCompact ¶
func (x *Signature) GetEcdsaCompact() *Signature_ECDSACompact
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) ProtoReflect ¶
func (x *Signature) ProtoReflect() protoreflect.Message
type Signature_ECDSACompact ¶
type Signature_ECDSACompact struct {
Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // compact representation [ R || S ], 64 bytes
Recovery uint32 `protobuf:"varint,2,opt,name=recovery,proto3" json:"recovery,omitempty"` // recovery bit
// contains filtered or unexported fields
}
func (*Signature_ECDSACompact) Descriptor
deprecated
func (*Signature_ECDSACompact) Descriptor() ([]byte, []int)
Deprecated: Use Signature_ECDSACompact.ProtoReflect.Descriptor instead.
func (*Signature_ECDSACompact) GetBytes ¶
func (x *Signature_ECDSACompact) GetBytes() []byte
func (*Signature_ECDSACompact) GetRecovery ¶
func (x *Signature_ECDSACompact) GetRecovery() uint32
func (*Signature_ECDSACompact) ProtoMessage ¶
func (*Signature_ECDSACompact) ProtoMessage()
func (*Signature_ECDSACompact) ProtoReflect ¶
func (x *Signature_ECDSACompact) ProtoReflect() protoreflect.Message
func (*Signature_ECDSACompact) Reset ¶
func (x *Signature_ECDSACompact) Reset()
func (*Signature_ECDSACompact) String ¶
func (x *Signature_ECDSACompact) String() string
type Signature_EcdsaCompact ¶
type Signature_EcdsaCompact struct {
EcdsaCompact *Signature_ECDSACompact `protobuf:"bytes,1,opt,name=ecdsa_compact,json=ecdsaCompact,proto3,oneof"`
}
type V1ClientAuthRequest ¶
type V1ClientAuthRequest struct {
IdentityKeyBytes []byte `protobuf:"bytes,1,opt,name=identity_key_bytes,json=identityKeyBytes,proto3" json:"identity_key_bytes,omitempty"`
WalletSignature *Signature `protobuf:"bytes,2,opt,name=wallet_signature,json=walletSignature,proto3" json:"wallet_signature,omitempty"`
AuthDataBytes []byte `protobuf:"bytes,3,opt,name=auth_data_bytes,json=authDataBytes,proto3" json:"auth_data_bytes,omitempty"`
AuthSignature *Signature `protobuf:"bytes,4,opt,name=auth_signature,json=authSignature,proto3" json:"auth_signature,omitempty"`
// contains filtered or unexported fields
}
func (*V1ClientAuthRequest) Descriptor
deprecated
func (*V1ClientAuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use V1ClientAuthRequest.ProtoReflect.Descriptor instead.
func (*V1ClientAuthRequest) GetAuthDataBytes ¶
func (x *V1ClientAuthRequest) GetAuthDataBytes() []byte
func (*V1ClientAuthRequest) GetAuthSignature ¶
func (x *V1ClientAuthRequest) GetAuthSignature() *Signature
func (*V1ClientAuthRequest) GetIdentityKeyBytes ¶
func (x *V1ClientAuthRequest) GetIdentityKeyBytes() []byte
func (*V1ClientAuthRequest) GetWalletSignature ¶
func (x *V1ClientAuthRequest) GetWalletSignature() *Signature
func (*V1ClientAuthRequest) ProtoMessage ¶
func (*V1ClientAuthRequest) ProtoMessage()
func (*V1ClientAuthRequest) ProtoReflect ¶
func (x *V1ClientAuthRequest) ProtoReflect() protoreflect.Message
func (*V1ClientAuthRequest) Reset ¶
func (x *V1ClientAuthRequest) Reset()
func (*V1ClientAuthRequest) String ¶
func (x *V1ClientAuthRequest) String() string
type V1ClientAuthResponse ¶
type V1ClientAuthResponse struct {
AuthSuccessful bool `protobuf:"varint,1,opt,name=auth_successful,json=authSuccessful,proto3" json:"auth_successful,omitempty"`
ErrorStr string `protobuf:"bytes,2,opt,name=error_str,json=errorStr,proto3" json:"error_str,omitempty"`
// contains filtered or unexported fields
}
func (*V1ClientAuthResponse) Descriptor
deprecated
func (*V1ClientAuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use V1ClientAuthResponse.ProtoReflect.Descriptor instead.
func (*V1ClientAuthResponse) GetAuthSuccessful ¶
func (x *V1ClientAuthResponse) GetAuthSuccessful() bool
func (*V1ClientAuthResponse) GetErrorStr ¶
func (x *V1ClientAuthResponse) GetErrorStr() string
func (*V1ClientAuthResponse) ProtoMessage ¶
func (*V1ClientAuthResponse) ProtoMessage()
func (*V1ClientAuthResponse) ProtoReflect ¶
func (x *V1ClientAuthResponse) ProtoReflect() protoreflect.Message
func (*V1ClientAuthResponse) Reset ¶
func (x *V1ClientAuthResponse) Reset()
func (*V1ClientAuthResponse) String ¶
func (x *V1ClientAuthResponse) String() string
type XmtpAuthentication ¶
type XmtpAuthentication struct {
// contains filtered or unexported fields
}
func NewXmtpAuthentication ¶
func (*XmtpAuthentication) Start ¶
func (xmtpAuth *XmtpAuthentication) Start()
Click to show internal directories.
Click to hide internal directories.