Documentation ¶
Index ¶
- Constants
- Variables
- type AnySignature
- type BLSEncryptedPrivateKey
- func (pk *BLSEncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
- func (self BLSEncryptedPrivateKey) MarshalText() ([]byte, error)
- func (self BLSEncryptedPrivateKey) String() string
- func (self *BLSEncryptedPrivateKey) ToBase58() []byte
- func (self *BLSEncryptedPrivateKey) UnmarshalText(src []byte) error
- type BLSPrivateKey
- func (pk *BLSPrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
- func (self BLSPrivateKey) MarshalText() ([]byte, error)
- func (priv *BLSPrivateKey) PrivateKey()
- func (self BLSPrivateKey) String() string
- func (self *BLSPrivateKey) ToBase58() []byte
- func (self *BLSPrivateKey) UnmarshalText(src []byte) error
- type BLSPublicKey
- type BLSPublicKeyHash
- func (pkh *BLSPublicKeyHash) Eq(other PublicKeyHash) bool
- func (self BLSPublicKeyHash) MarshalText() ([]byte, error)
- func (pkh *BLSPublicKeyHash) PublicKeyHash() []byte
- func (self BLSPublicKeyHash) String() string
- func (self *BLSPublicKeyHash) ToBase58() []byte
- func (pkh *BLSPublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
- func (self *BLSPublicKeyHash) UnmarshalText(src []byte) error
- type BLSSignature
- func (self BLSSignature) MarshalText() ([]byte, error)
- func (sig *BLSSignature) Signature()
- func (sig *BLSSignature) Split() (prefix *[32]byte, suffix *GenericSignature)
- func (self BLSSignature) String() string
- func (self *BLSSignature) ToBase58() []byte
- func (self *BLSSignature) UnmarshalText(src []byte) error
- type Base58Encoder
- type BigInt
- type BigUint
- type BlindedPublicKeyHash
- type BlockHash
- type BlockPayloadHash
- type Bytes
- type Bytes20
- type Bytes32
- type Bytes48
- type Bytes8
- type Bytes96
- type ChainID
- type Comparable
- type ContextHash
- type ContractHash
- type ConventionalSignature
- type CycleNonce
- type CycleNonceHash
- type DALCommitment
- type Ed25519EncryptedPrivateKey
- func (pk *Ed25519EncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
- func (self Ed25519EncryptedPrivateKey) MarshalText() ([]byte, error)
- func (self Ed25519EncryptedPrivateKey) String() string
- func (self *Ed25519EncryptedPrivateKey) ToBase58() []byte
- func (self *Ed25519EncryptedPrivateKey) UnmarshalText(src []byte) error
- type Ed25519PrivateKey
- func (pk *Ed25519PrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
- func (self Ed25519PrivateKey) MarshalText() ([]byte, error)
- func (priv *Ed25519PrivateKey) PrivateKey()
- func (self Ed25519PrivateKey) String() string
- func (self *Ed25519PrivateKey) ToBase58() []byte
- func (self *Ed25519PrivateKey) UnmarshalText(src []byte) error
- type Ed25519PublicKey
- func (pk *Ed25519PublicKey) Hash() PublicKeyHash
- func (self Ed25519PublicKey) MarshalText() ([]byte, error)
- func (pk *Ed25519PublicKey) PublicKey()
- func (self Ed25519PublicKey) String() string
- func (self *Ed25519PublicKey) ToBase58() []byte
- func (self *Ed25519PublicKey) UnmarshalText(src []byte) error
- type Ed25519PublicKeyHash
- func (pkh *Ed25519PublicKeyHash) Eq(other PublicKeyHash) bool
- func (self Ed25519PublicKeyHash) MarshalText() ([]byte, error)
- func (pkh *Ed25519PublicKeyHash) PublicKeyHash() []byte
- func (self Ed25519PublicKeyHash) String() string
- func (self *Ed25519PublicKeyHash) ToBase58() []byte
- func (pkh *Ed25519PublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
- func (self *Ed25519PublicKeyHash) UnmarshalText(src []byte) error
- type Ed25519Signature
- func (sig *Ed25519Signature) Generic() *GenericSignature
- func (self Ed25519Signature) MarshalText() ([]byte, error)
- func (sig *Ed25519Signature) Signature()
- func (self Ed25519Signature) String() string
- func (self *Ed25519Signature) ToBase58() []byte
- func (self *Ed25519Signature) UnmarshalText(src []byte) error
- type EncodedPublicKeyHash
- type EncryptedPrivateKey
- type GenericSignature
- func (sig *GenericSignature) Generic() *GenericSignature
- func (self GenericSignature) MarshalText() ([]byte, error)
- func (sig *GenericSignature) Signature()
- func (self GenericSignature) String() string
- func (self *GenericSignature) ToBase58() []byte
- func (self *GenericSignature) UnmarshalText(src []byte) error
- type OperationHash
- type OperationsHash
- type Option
- func (op Option[T]) CheckUnwrap() (T, bool)
- func (op *Option[T]) CheckUnwrapPtr() (*T, bool)
- func (op *Option[T]) DecodeMV(data []byte, ctx *encoding.Context) (rest []byte, err error)
- func (op *Option[T]) EncodeMV(ctx *encoding.Context) ([]byte, error)
- func (op Option[T]) GoString() string
- func (op Option[T]) IsNone() bool
- func (op Option[T]) IsSome() bool
- func (op *Option[T]) MarshalJSON() ([]byte, error)
- func (op Option[T]) Or(val Option[T]) Option[T]
- func (op Option[T]) OrElse(f func() Option[T]) Option[T]
- func (op *Option[T]) UnmarshalJSON(data []byte) error
- func (op Option[T]) Unwrap() T
- func (op Option[T]) UnwrapOr(def T) T
- func (op Option[T]) UnwrapOrElse(f func() T) T
- func (op Option[T]) UnwrapOrZero() T
- func (op *Option[T]) UnwrapPtr() *T
- func (op Option[T]) UnwrapUnchecked() T
- type Option1
- type P256EncryptedPrivateKey
- func (pk *P256EncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
- func (self P256EncryptedPrivateKey) MarshalText() ([]byte, error)
- func (self P256EncryptedPrivateKey) String() string
- func (self *P256EncryptedPrivateKey) ToBase58() []byte
- func (self *P256EncryptedPrivateKey) UnmarshalText(src []byte) error
- type P256PrivateKey
- func (pk *P256PrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
- func (self P256PrivateKey) MarshalText() ([]byte, error)
- func (priv *P256PrivateKey) PrivateKey()
- func (self P256PrivateKey) String() string
- func (self *P256PrivateKey) ToBase58() []byte
- func (self *P256PrivateKey) UnmarshalText(src []byte) error
- type P256PublicKey
- type P256PublicKeyHash
- func (pkh *P256PublicKeyHash) Eq(other PublicKeyHash) bool
- func (self P256PublicKeyHash) MarshalText() ([]byte, error)
- func (pkh *P256PublicKeyHash) PublicKeyHash() []byte
- func (self P256PublicKeyHash) String() string
- func (self *P256PublicKeyHash) ToBase58() []byte
- func (pkh *P256PublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
- func (self *P256PublicKeyHash) UnmarshalText(src []byte) error
- type P256Signature
- func (sig *P256Signature) Generic() *GenericSignature
- func (self P256Signature) MarshalText() ([]byte, error)
- func (sig *P256Signature) Point() (r, s *big.Int)
- func (sig *P256Signature) Signature()
- func (self P256Signature) String() string
- func (self *P256Signature) ToBase58() []byte
- func (self *P256Signature) UnmarshalText(src []byte) error
- type PrivateKey
- type ProtocolHash
- type PublicKey
- type PublicKeyHash
- type ScRollupAddress
- type ScRollupCommitmentHash
- type ScRollupStateHash
- type ScriptExprHash
- type Secp256k1EncryptedPrivateKey
- func (pk *Secp256k1EncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
- func (self Secp256k1EncryptedPrivateKey) MarshalText() ([]byte, error)
- func (self Secp256k1EncryptedPrivateKey) String() string
- func (self *Secp256k1EncryptedPrivateKey) ToBase58() []byte
- func (self *Secp256k1EncryptedPrivateKey) UnmarshalText(src []byte) error
- type Secp256k1PrivateKey
- func (pk *Secp256k1PrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
- func (self Secp256k1PrivateKey) MarshalText() ([]byte, error)
- func (priv *Secp256k1PrivateKey) PrivateKey()
- func (self Secp256k1PrivateKey) String() string
- func (self *Secp256k1PrivateKey) ToBase58() []byte
- func (self *Secp256k1PrivateKey) UnmarshalText(src []byte) error
- type Secp256k1PublicKey
- func (pk *Secp256k1PublicKey) Hash() PublicKeyHash
- func (self Secp256k1PublicKey) MarshalText() ([]byte, error)
- func (pk *Secp256k1PublicKey) PublicKey()
- func (self Secp256k1PublicKey) String() string
- func (self *Secp256k1PublicKey) ToBase58() []byte
- func (self *Secp256k1PublicKey) UnmarshalText(src []byte) error
- type Secp256k1PublicKeyHash
- func (pkh *Secp256k1PublicKeyHash) Eq(other PublicKeyHash) bool
- func (self Secp256k1PublicKeyHash) MarshalText() ([]byte, error)
- func (pkh *Secp256k1PublicKeyHash) PublicKeyHash() []byte
- func (self Secp256k1PublicKeyHash) String() string
- func (self *Secp256k1PublicKeyHash) ToBase58() []byte
- func (pkh *Secp256k1PublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
- func (self *Secp256k1PublicKeyHash) UnmarshalText(src []byte) error
- type Secp256k1Signature
- func (sig *Secp256k1Signature) Generic() *GenericSignature
- func (self Secp256k1Signature) MarshalText() ([]byte, error)
- func (sig *Secp256k1Signature) Point() (r, s *big.Int)
- func (sig *Secp256k1Signature) Signature()
- func (self Secp256k1Signature) String() string
- func (self *Secp256k1Signature) ToBase58() []byte
- func (self *Secp256k1Signature) UnmarshalText(src []byte) error
- type SeedNonce
- type Signature
- type SmartRollupAddress
- type SmartRollupCommitmentHash
- type SmartRollupStateHash
- type String
- type TXRollupAddress
- type Timestamp
- type ToComparable
- type ZkRollupAddress
Constants ¶
View Source
const ( Ed25519PublicKeyBytesLen = 32 Secp256k1PublicKeyBytesLen = 33 P256PublicKeyBytesLen = 33 BLSPublicKeyBytesLen = 48 Ed25519SeedBytesLen = 32 Secp256k1PrivateKeyBytesLen = 32 P256PrivateKeyBytesLen = 32 BLSPrivateKeyBytesLen = 32 Ed25519EncryptedSeedBytesLen = 56 Secp256k1EncryptedPrivateKeyBytesLen = 56 P256EncryptedPrivateKeyBytesLen = 56 BLSEncryptedPrivateKeyBytesLen = 56 )
View Source
const ( ProofOfWorkNonceBytesLen = 8 ChainIdBytesLen = 4 SecretBytesLen = 20 AddressBytesLen = 20 ContractHashBytesLen = 20 SeedNonceBytesLen = 32 CycleNonceBytesLen = 32 HashBytesLen = 32 SlotHeaderBytesLen = 48 GenericSignatureBytesLen = 64 BLSSignatureBytesLen = 96 )
View Source
const PKHBytesLen = AddressBytesLen
Variables ¶
View Source
var ( ErrInvalidDecryptedLen = errors.New("gomav: invalid decrypted key length") ErrInvalidKeyLen = errors.New("gomav: invalid key length") )
View Source
var (
ErrPrivateKeyDecrypt = errors.New("gomav: unable to decrypt the private key")
)
Functions ¶
This section is empty.
Types ¶
type AnySignature ¶
type AnySignature []byte
func (AnySignature) MarshalJSON ¶
func (sig AnySignature) MarshalJSON() ([]byte, error)
func (AnySignature) MarshalText ¶
func (sig AnySignature) MarshalText() ([]byte, error)
func (AnySignature) Signature ¶
func (sig AnySignature) Signature() (Signature, error)
func (AnySignature) String ¶
func (sig AnySignature) String() string
type BLSEncryptedPrivateKey ¶
type BLSEncryptedPrivateKey [BLSEncryptedPrivateKeyBytesLen]byte
func (*BLSEncryptedPrivateKey) Decrypt ¶
func (pk *BLSEncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
func (BLSEncryptedPrivateKey) MarshalText ¶
func (self BLSEncryptedPrivateKey) MarshalText() ([]byte, error)
func (BLSEncryptedPrivateKey) String ¶
func (self BLSEncryptedPrivateKey) String() string
func (*BLSEncryptedPrivateKey) ToBase58 ¶
func (self *BLSEncryptedPrivateKey) ToBase58() []byte
func (*BLSEncryptedPrivateKey) UnmarshalText ¶
func (self *BLSEncryptedPrivateKey) UnmarshalText(src []byte) error
type BLSPrivateKey ¶
type BLSPrivateKey [BLSPrivateKeyBytesLen]byte
func NewBLSPrivateKey ¶
func NewBLSPrivateKey(scalar []byte) (*BLSPrivateKey, error)
func (*BLSPrivateKey) Decrypt ¶
func (pk *BLSPrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
stub
func (BLSPrivateKey) MarshalText ¶
func (self BLSPrivateKey) MarshalText() ([]byte, error)
func (*BLSPrivateKey) PrivateKey ¶
func (priv *BLSPrivateKey) PrivateKey()
func (BLSPrivateKey) String ¶
func (self BLSPrivateKey) String() string
func (*BLSPrivateKey) ToBase58 ¶
func (self *BLSPrivateKey) ToBase58() []byte
func (*BLSPrivateKey) UnmarshalText ¶
func (self *BLSPrivateKey) UnmarshalText(src []byte) error
type BLSPublicKey ¶
type BLSPublicKey [BLSPublicKeyBytesLen]byte
func NewBLSPublicKey ¶
func NewBLSPublicKey(compressedPoint []byte) (*BLSPublicKey, error)
func (*BLSPublicKey) Hash ¶
func (pk *BLSPublicKey) Hash() PublicKeyHash
func (BLSPublicKey) MarshalText ¶
func (self BLSPublicKey) MarshalText() ([]byte, error)
func (*BLSPublicKey) PublicKey ¶
func (pk *BLSPublicKey) PublicKey()
func (BLSPublicKey) String ¶
func (self BLSPublicKey) String() string
func (*BLSPublicKey) ToBase58 ¶
func (self *BLSPublicKey) ToBase58() []byte
func (*BLSPublicKey) UnmarshalText ¶
func (self *BLSPublicKey) UnmarshalText(src []byte) error
type BLSPublicKeyHash ¶
type BLSPublicKeyHash [AddressBytesLen]byte
func (*BLSPublicKeyHash) Eq ¶
func (pkh *BLSPublicKeyHash) Eq(other PublicKeyHash) bool
func (BLSPublicKeyHash) MarshalText ¶
func (self BLSPublicKeyHash) MarshalText() ([]byte, error)
func (*BLSPublicKeyHash) PublicKeyHash ¶
func (pkh *BLSPublicKeyHash) PublicKeyHash() []byte
func (BLSPublicKeyHash) String ¶
func (self BLSPublicKeyHash) String() string
func (*BLSPublicKeyHash) ToBase58 ¶
func (self *BLSPublicKeyHash) ToBase58() []byte
func (*BLSPublicKeyHash) ToComparable ¶
func (pkh *BLSPublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
func (*BLSPublicKeyHash) UnmarshalText ¶
func (self *BLSPublicKeyHash) UnmarshalText(src []byte) error
type BLSSignature ¶
type BLSSignature [BLSSignatureBytesLen]byte
func NewBLSSignature ¶
func NewBLSSignature(compressedPoint []byte) *BLSSignature
func (BLSSignature) MarshalText ¶
func (self BLSSignature) MarshalText() ([]byte, error)
func (*BLSSignature) Signature ¶
func (sig *BLSSignature) Signature()
func (*BLSSignature) Split ¶
func (sig *BLSSignature) Split() (prefix *[32]byte, suffix *GenericSignature)
func (BLSSignature) String ¶
func (self BLSSignature) String() string
func (*BLSSignature) ToBase58 ¶
func (self *BLSSignature) ToBase58() []byte
func (*BLSSignature) UnmarshalText ¶
func (self *BLSSignature) UnmarshalText(src []byte) error
type Base58Encoder ¶
type BigInt ¶
type BigInt []byte
func NewBigInt64 ¶
func (BigInt) MarshalText ¶
type BigUint ¶
type BigUint []byte
func NewBigUint64 ¶
func (BigUint) MarshalText ¶
type BlindedPublicKeyHash ¶
type BlindedPublicKeyHash [AddressBytesLen]byte
func (BlindedPublicKeyHash) MarshalText ¶
func (self BlindedPublicKeyHash) MarshalText() ([]byte, error)
func (BlindedPublicKeyHash) String ¶
func (self BlindedPublicKeyHash) String() string
func (*BlindedPublicKeyHash) ToBase58 ¶
func (self *BlindedPublicKeyHash) ToBase58() []byte
func (*BlindedPublicKeyHash) UnmarshalText ¶
func (self *BlindedPublicKeyHash) UnmarshalText(src []byte) error
type BlockHash ¶
type BlockHash [HashBytesLen]byte
func (BlockHash) MarshalText ¶
func (*BlockHash) UnmarshalText ¶
type BlockPayloadHash ¶
type BlockPayloadHash [HashBytesLen]byte
func (BlockPayloadHash) MarshalText ¶
func (self BlockPayloadHash) MarshalText() ([]byte, error)
func (BlockPayloadHash) String ¶
func (self BlockPayloadHash) String() string
func (*BlockPayloadHash) ToBase58 ¶
func (self *BlockPayloadHash) ToBase58() []byte
func (*BlockPayloadHash) UnmarshalText ¶
func (self *BlockPayloadHash) UnmarshalText(src []byte) error
type ChainID ¶
type ChainID [ChainIdBytesLen]byte
func (ChainID) MarshalText ¶
func (*ChainID) UnmarshalText ¶
type Comparable ¶
type Comparable[K any] interface { comparable ToKey() K }
type ContextHash ¶
type ContextHash [HashBytesLen]byte
func (ContextHash) MarshalText ¶
func (self ContextHash) MarshalText() ([]byte, error)
func (ContextHash) String ¶
func (self ContextHash) String() string
func (*ContextHash) ToBase58 ¶
func (self *ContextHash) ToBase58() []byte
func (*ContextHash) UnmarshalText ¶
func (self *ContextHash) UnmarshalText(src []byte) error
type ContractHash ¶
type ContractHash [AddressBytesLen]byte
func (ContractHash) MarshalText ¶
func (self ContractHash) MarshalText() ([]byte, error)
func (ContractHash) String ¶
func (self ContractHash) String() string
func (*ContractHash) ToBase58 ¶
func (self *ContractHash) ToBase58() []byte
func (*ContractHash) UnmarshalText ¶
func (self *ContractHash) UnmarshalText(src []byte) error
type ConventionalSignature ¶
type ConventionalSignature interface { Signature Generic() *GenericSignature }
type CycleNonce ¶
type CycleNonce [CycleNonceBytesLen]byte
func (CycleNonce) MarshalText ¶
func (self CycleNonce) MarshalText() ([]byte, error)
func (CycleNonce) String ¶
func (self CycleNonce) String() string
func (*CycleNonce) UnmarshalText ¶
func (self *CycleNonce) UnmarshalText(src []byte) error
type CycleNonceHash ¶
type CycleNonceHash [CycleNonceBytesLen]byte
func (CycleNonceHash) MarshalText ¶
func (self CycleNonceHash) MarshalText() ([]byte, error)
func (CycleNonceHash) String ¶
func (self CycleNonceHash) String() string
func (*CycleNonceHash) ToBase58 ¶
func (self *CycleNonceHash) ToBase58() []byte
func (*CycleNonceHash) UnmarshalText ¶
func (self *CycleNonceHash) UnmarshalText(src []byte) error
type DALCommitment ¶
type DALCommitment [SlotHeaderBytesLen]byte
func (DALCommitment) MarshalText ¶
func (self DALCommitment) MarshalText() ([]byte, error)
func (DALCommitment) String ¶
func (self DALCommitment) String() string
func (*DALCommitment) ToBase58 ¶
func (self *DALCommitment) ToBase58() []byte
func (*DALCommitment) UnmarshalText ¶
func (self *DALCommitment) UnmarshalText(src []byte) error
type Ed25519EncryptedPrivateKey ¶
type Ed25519EncryptedPrivateKey [Ed25519EncryptedSeedBytesLen]byte
func (*Ed25519EncryptedPrivateKey) Decrypt ¶
func (pk *Ed25519EncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
func (Ed25519EncryptedPrivateKey) MarshalText ¶
func (self Ed25519EncryptedPrivateKey) MarshalText() ([]byte, error)
func (Ed25519EncryptedPrivateKey) String ¶
func (self Ed25519EncryptedPrivateKey) String() string
func (*Ed25519EncryptedPrivateKey) ToBase58 ¶
func (self *Ed25519EncryptedPrivateKey) ToBase58() []byte
func (*Ed25519EncryptedPrivateKey) UnmarshalText ¶
func (self *Ed25519EncryptedPrivateKey) UnmarshalText(src []byte) error
type Ed25519PrivateKey ¶
type Ed25519PrivateKey [Ed25519SeedBytesLen]byte
func NewEd25519PrivateKey ¶
func NewEd25519PrivateKey(key []byte) (*Ed25519PrivateKey, error)
func (*Ed25519PrivateKey) Decrypt ¶
func (pk *Ed25519PrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
stub
func (Ed25519PrivateKey) MarshalText ¶
func (self Ed25519PrivateKey) MarshalText() ([]byte, error)
func (*Ed25519PrivateKey) PrivateKey ¶
func (priv *Ed25519PrivateKey) PrivateKey()
func (Ed25519PrivateKey) String ¶
func (self Ed25519PrivateKey) String() string
func (*Ed25519PrivateKey) ToBase58 ¶
func (self *Ed25519PrivateKey) ToBase58() []byte
func (*Ed25519PrivateKey) UnmarshalText ¶
func (self *Ed25519PrivateKey) UnmarshalText(src []byte) error
type Ed25519PublicKey ¶
type Ed25519PublicKey [Ed25519PublicKeyBytesLen]byte
func NewEd25519PublicKey ¶
func NewEd25519PublicKey(key []byte) (*Ed25519PublicKey, error)
func (*Ed25519PublicKey) Hash ¶
func (pk *Ed25519PublicKey) Hash() PublicKeyHash
func (Ed25519PublicKey) MarshalText ¶
func (self Ed25519PublicKey) MarshalText() ([]byte, error)
func (*Ed25519PublicKey) PublicKey ¶
func (pk *Ed25519PublicKey) PublicKey()
func (Ed25519PublicKey) String ¶
func (self Ed25519PublicKey) String() string
func (*Ed25519PublicKey) ToBase58 ¶
func (self *Ed25519PublicKey) ToBase58() []byte
func (*Ed25519PublicKey) UnmarshalText ¶
func (self *Ed25519PublicKey) UnmarshalText(src []byte) error
type Ed25519PublicKeyHash ¶
type Ed25519PublicKeyHash [AddressBytesLen]byte
func (*Ed25519PublicKeyHash) Eq ¶
func (pkh *Ed25519PublicKeyHash) Eq(other PublicKeyHash) bool
func (Ed25519PublicKeyHash) MarshalText ¶
func (self Ed25519PublicKeyHash) MarshalText() ([]byte, error)
func (*Ed25519PublicKeyHash) PublicKeyHash ¶
func (pkh *Ed25519PublicKeyHash) PublicKeyHash() []byte
func (Ed25519PublicKeyHash) String ¶
func (self Ed25519PublicKeyHash) String() string
func (*Ed25519PublicKeyHash) ToBase58 ¶
func (self *Ed25519PublicKeyHash) ToBase58() []byte
func (*Ed25519PublicKeyHash) ToComparable ¶
func (pkh *Ed25519PublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
func (*Ed25519PublicKeyHash) UnmarshalText ¶
func (self *Ed25519PublicKeyHash) UnmarshalText(src []byte) error
type Ed25519Signature ¶
type Ed25519Signature [GenericSignatureBytesLen]byte
func NewEd25519Signature ¶
func NewEd25519Signature(sig []byte) *Ed25519Signature
func (*Ed25519Signature) Generic ¶
func (sig *Ed25519Signature) Generic() *GenericSignature
func (Ed25519Signature) MarshalText ¶
func (self Ed25519Signature) MarshalText() ([]byte, error)
func (*Ed25519Signature) Signature ¶
func (sig *Ed25519Signature) Signature()
func (Ed25519Signature) String ¶
func (self Ed25519Signature) String() string
func (*Ed25519Signature) ToBase58 ¶
func (self *Ed25519Signature) ToBase58() []byte
func (*Ed25519Signature) UnmarshalText ¶
func (self *Ed25519Signature) UnmarshalText(src []byte) error
type EncodedPublicKeyHash ¶
type EncodedPublicKeyHash [publicKeyHashComparableKeyLen]byte
func (EncodedPublicKeyHash) MarshalText ¶
func (k EncodedPublicKeyHash) MarshalText() (text []byte, err error)
func (EncodedPublicKeyHash) ToKey ¶
func (k EncodedPublicKeyHash) ToKey() PublicKeyHash
func (*EncodedPublicKeyHash) UnmarshalText ¶
func (k *EncodedPublicKeyHash) UnmarshalText(text []byte) error
type EncryptedPrivateKey ¶
type EncryptedPrivateKey interface { Base58Encoder Decrypt(passCb func() ([]byte, error)) (PrivateKey, error) }
type GenericSignature ¶
type GenericSignature [GenericSignatureBytesLen]byte
func (*GenericSignature) Generic ¶
func (sig *GenericSignature) Generic() *GenericSignature
func (GenericSignature) MarshalText ¶
func (self GenericSignature) MarshalText() ([]byte, error)
func (*GenericSignature) Signature ¶
func (sig *GenericSignature) Signature()
func (GenericSignature) String ¶
func (self GenericSignature) String() string
func (*GenericSignature) ToBase58 ¶
func (self *GenericSignature) ToBase58() []byte
func (*GenericSignature) UnmarshalText ¶
func (self *GenericSignature) UnmarshalText(src []byte) error
type OperationHash ¶
type OperationHash [HashBytesLen]byte
func (OperationHash) MarshalText ¶
func (self OperationHash) MarshalText() ([]byte, error)
func (OperationHash) String ¶
func (self OperationHash) String() string
func (*OperationHash) ToBase58 ¶
func (self *OperationHash) ToBase58() []byte
func (*OperationHash) UnmarshalText ¶
func (self *OperationHash) UnmarshalText(src []byte) error
type OperationsHash ¶
type OperationsHash [HashBytesLen]byte
func (OperationsHash) MarshalText ¶
func (self OperationsHash) MarshalText() ([]byte, error)
func (OperationsHash) String ¶
func (self OperationsHash) String() string
func (*OperationsHash) ToBase58 ¶
func (self *OperationsHash) ToBase58() []byte
func (*OperationsHash) UnmarshalText ¶
func (self *OperationsHash) UnmarshalText(src []byte) error
type Option ¶
type Option[T any] struct { // contains filtered or unexported fields }
func (Option[T]) CheckUnwrap ¶
func (*Option[T]) CheckUnwrapPtr ¶
func (*Option[T]) MarshalJSON ¶
func (*Option[T]) UnmarshalJSON ¶
func (Option[T]) UnwrapOrElse ¶
func (op Option[T]) UnwrapOrElse(f func() T) T
func (Option[T]) UnwrapOrZero ¶
func (op Option[T]) UnwrapOrZero() T
func (Option[T]) UnwrapUnchecked ¶
func (op Option[T]) UnwrapUnchecked() T
type P256EncryptedPrivateKey ¶
type P256EncryptedPrivateKey [P256EncryptedPrivateKeyBytesLen]byte
func (*P256EncryptedPrivateKey) Decrypt ¶
func (pk *P256EncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
func (P256EncryptedPrivateKey) MarshalText ¶
func (self P256EncryptedPrivateKey) MarshalText() ([]byte, error)
func (P256EncryptedPrivateKey) String ¶
func (self P256EncryptedPrivateKey) String() string
func (*P256EncryptedPrivateKey) ToBase58 ¶
func (self *P256EncryptedPrivateKey) ToBase58() []byte
func (*P256EncryptedPrivateKey) UnmarshalText ¶
func (self *P256EncryptedPrivateKey) UnmarshalText(src []byte) error
type P256PrivateKey ¶
type P256PrivateKey [P256PrivateKeyBytesLen]byte
func NewP256PrivateKey ¶
func NewP256PrivateKey(scalar *big.Int) (*P256PrivateKey, error)
func (*P256PrivateKey) Decrypt ¶
func (pk *P256PrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
stub
func (P256PrivateKey) MarshalText ¶
func (self P256PrivateKey) MarshalText() ([]byte, error)
func (*P256PrivateKey) PrivateKey ¶
func (priv *P256PrivateKey) PrivateKey()
func (P256PrivateKey) String ¶
func (self P256PrivateKey) String() string
func (*P256PrivateKey) ToBase58 ¶
func (self *P256PrivateKey) ToBase58() []byte
func (*P256PrivateKey) UnmarshalText ¶
func (self *P256PrivateKey) UnmarshalText(src []byte) error
type P256PublicKey ¶
type P256PublicKey [P256PublicKeyBytesLen]byte
func NewP256PublicKey ¶
func NewP256PublicKey(compressedPoint []byte) (*P256PublicKey, error)
func (*P256PublicKey) Hash ¶
func (pk *P256PublicKey) Hash() PublicKeyHash
func (P256PublicKey) MarshalText ¶
func (self P256PublicKey) MarshalText() ([]byte, error)
func (*P256PublicKey) PublicKey ¶
func (pk *P256PublicKey) PublicKey()
func (P256PublicKey) String ¶
func (self P256PublicKey) String() string
func (*P256PublicKey) ToBase58 ¶
func (self *P256PublicKey) ToBase58() []byte
func (*P256PublicKey) UnmarshalText ¶
func (self *P256PublicKey) UnmarshalText(src []byte) error
type P256PublicKeyHash ¶
type P256PublicKeyHash [AddressBytesLen]byte
func (*P256PublicKeyHash) Eq ¶
func (pkh *P256PublicKeyHash) Eq(other PublicKeyHash) bool
func (P256PublicKeyHash) MarshalText ¶
func (self P256PublicKeyHash) MarshalText() ([]byte, error)
func (*P256PublicKeyHash) PublicKeyHash ¶
func (pkh *P256PublicKeyHash) PublicKeyHash() []byte
func (P256PublicKeyHash) String ¶
func (self P256PublicKeyHash) String() string
func (*P256PublicKeyHash) ToBase58 ¶
func (self *P256PublicKeyHash) ToBase58() []byte
func (*P256PublicKeyHash) ToComparable ¶
func (pkh *P256PublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
func (*P256PublicKeyHash) UnmarshalText ¶
func (self *P256PublicKeyHash) UnmarshalText(src []byte) error
type P256Signature ¶
type P256Signature [GenericSignatureBytesLen]byte
func NewP256Signature ¶
func NewP256Signature(r, s *big.Int) *P256Signature
func (*P256Signature) Generic ¶
func (sig *P256Signature) Generic() *GenericSignature
func (P256Signature) MarshalText ¶
func (self P256Signature) MarshalText() ([]byte, error)
func (*P256Signature) Point ¶
func (sig *P256Signature) Point() (r, s *big.Int)
func (*P256Signature) Signature ¶
func (sig *P256Signature) Signature()
func (P256Signature) String ¶
func (self P256Signature) String() string
func (*P256Signature) ToBase58 ¶
func (self *P256Signature) ToBase58() []byte
func (*P256Signature) UnmarshalText ¶
func (self *P256Signature) UnmarshalText(src []byte) error
type PrivateKey ¶
type PrivateKey interface { PrivateKey() EncryptedPrivateKey }
type ProtocolHash ¶
type ProtocolHash [HashBytesLen]byte
func (ProtocolHash) MarshalText ¶
func (self ProtocolHash) MarshalText() ([]byte, error)
func (ProtocolHash) String ¶
func (self ProtocolHash) String() string
func (*ProtocolHash) ToBase58 ¶
func (self *ProtocolHash) ToBase58() []byte
func (*ProtocolHash) UnmarshalText ¶
func (self *ProtocolHash) UnmarshalText(src []byte) error
type PublicKey ¶
type PublicKey interface { Base58Encoder PublicKey() Hash() PublicKeyHash }
type PublicKeyHash ¶
type PublicKeyHash interface { Base58Encoder stdenc.TextMarshaler ToComparable[EncodedPublicKeyHash, PublicKeyHash] PublicKeyHash() []byte Eq(other PublicKeyHash) bool }
type ScRollupAddress ¶
type ScRollupAddress [AddressBytesLen]byte
func (ScRollupAddress) MarshalText ¶
func (self ScRollupAddress) MarshalText() ([]byte, error)
func (ScRollupAddress) String ¶
func (self ScRollupAddress) String() string
func (*ScRollupAddress) ToBase58 ¶
func (self *ScRollupAddress) ToBase58() []byte
func (*ScRollupAddress) UnmarshalText ¶
func (self *ScRollupAddress) UnmarshalText(src []byte) error
type ScRollupCommitmentHash ¶
type ScRollupCommitmentHash [HashBytesLen]byte
func (ScRollupCommitmentHash) MarshalText ¶
func (self ScRollupCommitmentHash) MarshalText() ([]byte, error)
func (ScRollupCommitmentHash) String ¶
func (self ScRollupCommitmentHash) String() string
func (*ScRollupCommitmentHash) ToBase58 ¶
func (self *ScRollupCommitmentHash) ToBase58() []byte
func (*ScRollupCommitmentHash) UnmarshalText ¶
func (self *ScRollupCommitmentHash) UnmarshalText(src []byte) error
type ScRollupStateHash ¶
type ScRollupStateHash [HashBytesLen]byte
func (ScRollupStateHash) MarshalText ¶
func (self ScRollupStateHash) MarshalText() ([]byte, error)
func (ScRollupStateHash) String ¶
func (self ScRollupStateHash) String() string
func (*ScRollupStateHash) ToBase58 ¶
func (self *ScRollupStateHash) ToBase58() []byte
func (*ScRollupStateHash) UnmarshalText ¶
func (self *ScRollupStateHash) UnmarshalText(src []byte) error
type ScriptExprHash ¶
type ScriptExprHash [HashBytesLen]byte
func (ScriptExprHash) MarshalText ¶
func (self ScriptExprHash) MarshalText() ([]byte, error)
func (ScriptExprHash) String ¶
func (self ScriptExprHash) String() string
func (*ScriptExprHash) ToBase58 ¶
func (self *ScriptExprHash) ToBase58() []byte
func (*ScriptExprHash) UnmarshalText ¶
func (self *ScriptExprHash) UnmarshalText(src []byte) error
type Secp256k1EncryptedPrivateKey ¶
type Secp256k1EncryptedPrivateKey [Secp256k1EncryptedPrivateKeyBytesLen]byte
func (*Secp256k1EncryptedPrivateKey) Decrypt ¶
func (pk *Secp256k1EncryptedPrivateKey) Decrypt(passCb func() ([]byte, error)) (PrivateKey, error)
func (Secp256k1EncryptedPrivateKey) MarshalText ¶
func (self Secp256k1EncryptedPrivateKey) MarshalText() ([]byte, error)
func (Secp256k1EncryptedPrivateKey) String ¶
func (self Secp256k1EncryptedPrivateKey) String() string
func (*Secp256k1EncryptedPrivateKey) ToBase58 ¶
func (self *Secp256k1EncryptedPrivateKey) ToBase58() []byte
func (*Secp256k1EncryptedPrivateKey) UnmarshalText ¶
func (self *Secp256k1EncryptedPrivateKey) UnmarshalText(src []byte) error
type Secp256k1PrivateKey ¶
type Secp256k1PrivateKey [Secp256k1PrivateKeyBytesLen]byte
func NewSecp256k1PrivateKey ¶
func NewSecp256k1PrivateKey(scalar *big.Int) (*Secp256k1PrivateKey, error)
func (*Secp256k1PrivateKey) Decrypt ¶
func (pk *Secp256k1PrivateKey) Decrypt(func() ([]byte, error)) (PrivateKey, error)
stub
func (Secp256k1PrivateKey) MarshalText ¶
func (self Secp256k1PrivateKey) MarshalText() ([]byte, error)
func (*Secp256k1PrivateKey) PrivateKey ¶
func (priv *Secp256k1PrivateKey) PrivateKey()
func (Secp256k1PrivateKey) String ¶
func (self Secp256k1PrivateKey) String() string
func (*Secp256k1PrivateKey) ToBase58 ¶
func (self *Secp256k1PrivateKey) ToBase58() []byte
func (*Secp256k1PrivateKey) UnmarshalText ¶
func (self *Secp256k1PrivateKey) UnmarshalText(src []byte) error
type Secp256k1PublicKey ¶
type Secp256k1PublicKey [Secp256k1PublicKeyBytesLen]byte
func NewSecp256k1PublicKey ¶
func NewSecp256k1PublicKey(compressedPoint []byte) (*Secp256k1PublicKey, error)
func (*Secp256k1PublicKey) Hash ¶
func (pk *Secp256k1PublicKey) Hash() PublicKeyHash
func (Secp256k1PublicKey) MarshalText ¶
func (self Secp256k1PublicKey) MarshalText() ([]byte, error)
func (*Secp256k1PublicKey) PublicKey ¶
func (pk *Secp256k1PublicKey) PublicKey()
func (Secp256k1PublicKey) String ¶
func (self Secp256k1PublicKey) String() string
func (*Secp256k1PublicKey) ToBase58 ¶
func (self *Secp256k1PublicKey) ToBase58() []byte
func (*Secp256k1PublicKey) UnmarshalText ¶
func (self *Secp256k1PublicKey) UnmarshalText(src []byte) error
type Secp256k1PublicKeyHash ¶
type Secp256k1PublicKeyHash [AddressBytesLen]byte
func (*Secp256k1PublicKeyHash) Eq ¶
func (pkh *Secp256k1PublicKeyHash) Eq(other PublicKeyHash) bool
func (Secp256k1PublicKeyHash) MarshalText ¶
func (self Secp256k1PublicKeyHash) MarshalText() ([]byte, error)
func (*Secp256k1PublicKeyHash) PublicKeyHash ¶
func (pkh *Secp256k1PublicKeyHash) PublicKeyHash() []byte
func (Secp256k1PublicKeyHash) String ¶
func (self Secp256k1PublicKeyHash) String() string
func (*Secp256k1PublicKeyHash) ToBase58 ¶
func (self *Secp256k1PublicKeyHash) ToBase58() []byte
func (*Secp256k1PublicKeyHash) ToComparable ¶
func (pkh *Secp256k1PublicKeyHash) ToComparable() (out EncodedPublicKeyHash)
func (*Secp256k1PublicKeyHash) UnmarshalText ¶
func (self *Secp256k1PublicKeyHash) UnmarshalText(src []byte) error
type Secp256k1Signature ¶
type Secp256k1Signature [GenericSignatureBytesLen]byte
func NewSecp256k1Signature ¶
func NewSecp256k1Signature(r, s *big.Int) *Secp256k1Signature
func (*Secp256k1Signature) Generic ¶
func (sig *Secp256k1Signature) Generic() *GenericSignature
func (Secp256k1Signature) MarshalText ¶
func (self Secp256k1Signature) MarshalText() ([]byte, error)
func (*Secp256k1Signature) Point ¶
func (sig *Secp256k1Signature) Point() (r, s *big.Int)
func (*Secp256k1Signature) Signature ¶
func (sig *Secp256k1Signature) Signature()
func (Secp256k1Signature) String ¶
func (self Secp256k1Signature) String() string
func (*Secp256k1Signature) ToBase58 ¶
func (self *Secp256k1Signature) ToBase58() []byte
func (*Secp256k1Signature) UnmarshalText ¶
func (self *Secp256k1Signature) UnmarshalText(src []byte) error
type SeedNonce ¶
type SeedNonce [SeedNonceBytesLen]byte
func (SeedNonce) MarshalText ¶
func (*SeedNonce) UnmarshalText ¶
type Signature ¶
type Signature interface { Base58Encoder Signature() }
type SmartRollupAddress ¶
type SmartRollupAddress [AddressBytesLen]byte
func (SmartRollupAddress) MarshalText ¶
func (self SmartRollupAddress) MarshalText() ([]byte, error)
func (SmartRollupAddress) String ¶
func (self SmartRollupAddress) String() string
func (*SmartRollupAddress) ToBase58 ¶
func (self *SmartRollupAddress) ToBase58() []byte
func (*SmartRollupAddress) UnmarshalText ¶
func (self *SmartRollupAddress) UnmarshalText(src []byte) error
type SmartRollupCommitmentHash ¶
type SmartRollupCommitmentHash [HashBytesLen]byte
func (SmartRollupCommitmentHash) MarshalText ¶
func (self SmartRollupCommitmentHash) MarshalText() ([]byte, error)
func (SmartRollupCommitmentHash) String ¶
func (self SmartRollupCommitmentHash) String() string
func (*SmartRollupCommitmentHash) ToBase58 ¶
func (self *SmartRollupCommitmentHash) ToBase58() []byte
func (*SmartRollupCommitmentHash) UnmarshalText ¶
func (self *SmartRollupCommitmentHash) UnmarshalText(src []byte) error
type SmartRollupStateHash ¶
type SmartRollupStateHash [HashBytesLen]byte
func (SmartRollupStateHash) MarshalText ¶
func (self SmartRollupStateHash) MarshalText() ([]byte, error)
func (SmartRollupStateHash) String ¶
func (self SmartRollupStateHash) String() string
func (*SmartRollupStateHash) ToBase58 ¶
func (self *SmartRollupStateHash) ToBase58() []byte
func (*SmartRollupStateHash) UnmarshalText ¶
func (self *SmartRollupStateHash) UnmarshalText(src []byte) error
type TXRollupAddress ¶
type TXRollupAddress [AddressBytesLen]byte
func (TXRollupAddress) MarshalText ¶
func (self TXRollupAddress) MarshalText() ([]byte, error)
func (TXRollupAddress) String ¶
func (self TXRollupAddress) String() string
func (*TXRollupAddress) ToBase58 ¶
func (self *TXRollupAddress) ToBase58() []byte
func (*TXRollupAddress) UnmarshalText ¶
func (self *TXRollupAddress) UnmarshalText(src []byte) error
type ToComparable ¶
type ToComparable[H Comparable[K], K any] interface { ToComparable() H }
type ZkRollupAddress ¶
type ZkRollupAddress [AddressBytesLen]byte
func (ZkRollupAddress) MarshalText ¶
func (self ZkRollupAddress) MarshalText() ([]byte, error)
func (ZkRollupAddress) String ¶
func (self ZkRollupAddress) String() string
func (*ZkRollupAddress) ToBase58 ¶
func (self *ZkRollupAddress) ToBase58() []byte
func (*ZkRollupAddress) UnmarshalText ¶
func (self *ZkRollupAddress) UnmarshalText(src []byte) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package b58 contains Base58 decoding functions of various Mavryk types
|
Package b58 contains Base58 decoding functions of various Mavryk types |
Package client is a very limited Mavryk RPC client library
|
Package client is a very limited Mavryk RPC client library |
Package crypt is a wrapper around standard and 3rd party signature algorithms which adds a support of Mavryk encodings of keys and signatures
|
Package crypt is a wrapper around standard and 3rd party signature algorithms which adds a support of Mavryk encodings of keys and signatures |
Package encoding handles Mavryk binary encoding
|
Package encoding handles Mavryk binary encoding |
Package mavtool is an operation injection helper
|
Package mavtool is an operation injection helper |
Click to show internal directories.
Click to hide internal directories.