Documentation
¶
Index ¶
- Constants
- type EvmPrivateKey
- type EvmPublisherKey
- type EvmSignature
- type EvmSigner
- type EvmVerifier
- type PublisherKey
- type Signature
- type SignatureType
- type Signer
- type StarkPrivateKey
- type StarkPublisherKey
- type StarkSignature
- type StarkSigner
- type StarkVerifier
- type TimestampedSignature
- type Verifier
Constants ¶
View Source
const EvmSignatureType = SignatureType("evm")
View Source
const StarkSignatureType = SignatureType("stark")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvmPrivateKey ¶
type EvmPrivateKey string
type EvmPublisherKey ¶
type EvmPublisherKey string
type EvmSignature ¶
type EvmSigner ¶
type EvmSigner struct {
// contains filtered or unexported fields
}
func NewEvmSigner ¶
func NewEvmSigner(privateKeyStr EvmPrivateKey, logger zerolog.Logger) (*EvmSigner, error)
func (*EvmSigner) GetPublisherKey ¶
func (s *EvmSigner) GetPublisherKey() PublisherKey
func (*EvmSigner) GetSignatureType ¶
func (s *EvmSigner) GetSignatureType() SignatureType
func (*EvmSigner) SignPublisherPrice ¶
func (s *EvmSigner) SignPublisherPrice(publishTimestamp int64, asset string, quantizedValue string) (timestampedSig *TimestampedSignature[*EvmSignature], encodedAssetId string, err error)
type EvmVerifier ¶
type EvmVerifier struct {
// contains filtered or unexported fields
}
func NewEvmVerifier ¶
func NewEvmVerifier(logger zerolog.Logger) *EvmVerifier
func (*EvmVerifier) VerifyPublisherPrice ¶
func (e *EvmVerifier) VerifyPublisherPrice(publishTimestamp int64, externalAssetId string, quantizedValue string, publisherKey PublisherKey, signature EvmSignature) error
type PublisherKey ¶
type PublisherKey string
type Signature ¶
type Signature interface { *StarkSignature | *EvmSignature }
type SignatureType ¶
type SignatureType string
type Signer ¶
type Signer[T Signature] interface { SignPublisherPrice(publishTimestamp int64, asset string, quantizedValue string) (timestampedSig *TimestampedSignature[T], encodedAssetId string, err error) GetPublisherKey() PublisherKey GetSignatureType() SignatureType }
type StarkPrivateKey ¶
type StarkPrivateKey string
type StarkPublisherKey ¶
type StarkPublisherKey string
type StarkSignature ¶
type StarkSigner ¶
type StarkSigner struct {
// contains filtered or unexported fields
}
func NewStarkSigner ¶
func NewStarkSigner(privateKeyStr StarkPrivateKey, publicKeyStr, oracleId string, logger zerolog.Logger) (*StarkSigner, error)
func (*StarkSigner) GetPublisherKey ¶
func (s *StarkSigner) GetPublisherKey() PublisherKey
func (*StarkSigner) GetSignatureType ¶
func (s *StarkSigner) GetSignatureType() SignatureType
func (*StarkSigner) SignPublisherPrice ¶
func (s *StarkSigner) SignPublisherPrice(publishTimestamp int64, asset string, quantizedValue string) (timestampedSig *TimestampedSignature[*StarkSignature], encodedAssetId string, err error)
type StarkVerifier ¶
type StarkVerifier struct {
// contains filtered or unexported fields
}
func NewStarkVerifier ¶
func NewStarkVerifier(logger zerolog.Logger) *StarkVerifier
func (*StarkVerifier) VerifyPublisherPrice ¶
func (s *StarkVerifier) VerifyPublisherPrice(publishTimestamp int64, externalAssetId string, quantizedValue string, publisherKey PublisherKey, signature StarkSignature) error
type TimestampedSignature ¶
Click to show internal directories.
Click to hide internal directories.