signature

package
v0.0.0-...-fc257e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignBytes

func SignBytes(input []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)

func SignCoreBytes

func SignCoreBytes(input proto.Message, privateKey *ecdsa.PrivateKey) (string, error)

func SignedGet

func SignedGet(endpoint string, privateKey *ecdsa.PrivateKey, selfHost string) (*http.Request, error)

func SignedPost

func SignedPost(endpoint string, contentType string, r io.Reader, privateKey *ecdsa.PrivateKey, selfHost string) (*http.Request, error)

Types

type ListenTSSignature

type ListenTSSignature struct {
	Signature string
	Timestamp string
}

func GenerateListenTimestampAndSignature

func GenerateListenTimestampAndSignature(privateKey *ecdsa.PrivateKey) (*ListenTSSignature, error)

type RecoveredSignature

type RecoveredSignature struct {
	DataHash     common.Hash
	Data         SignatureData
	SignerWallet string
}

func ParseFromQueryString

func ParseFromQueryString(queryStringValue string) (*RecoveredSignature, error)

func (*RecoveredSignature) String

func (r *RecoveredSignature) String() string

type SignatureData

type SignatureData struct {
	UploadID    string `json:"upload_id"`
	Cid         string `json:"cid"`
	ShouldCache int    `json:"shouldCache"`
	Timestamp   int64  `json:"timestamp"`
	TrackId     int64  `json:"trackId"`
	UserID      int    `json:"userId"`
}

type SignatureEnvelope

type SignatureEnvelope struct {
	Data      string
	Signature string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL