types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package types defines the stellar asset that is used in payment channels.

Index

Constants

View Source
const HashLenXdr = 32

Variables

This section is empty.

Functions

func MakeAccountAddress

func MakeAccountAddress(kp keypair.KP) (xdr.ScAddress, error)

func MakeContractAddress

func MakeContractAddress(contractID xdr.Hash) (xdr.ScAddress, error)

func ToAccountAddress

func ToAccountAddress(address xdr.ScAddress) (keypair.FromAddress, error)

Types

type StellarAsset

type StellarAsset struct {
	// contains filtered or unexported fields
}

func MustStellarAsset

func MustStellarAsset(asset channel.Asset) *StellarAsset

func NewStellarAsset

func NewStellarAsset(contractID xdr.Hash) *StellarAsset

func NewStellarAssetFromScAddress

func NewStellarAssetFromScAddress(address xdr.ScAddress) (*StellarAsset, error)

func ToStellarAsset

func ToStellarAsset(asset channel.Asset) (*StellarAsset, error)

func (StellarAsset) ContractID

func (s StellarAsset) ContractID() xdr.Hash

func (StellarAsset) Equal

func (s StellarAsset) Equal(asset channel.Asset) bool

func (*StellarAsset) FromScAddress

func (s *StellarAsset) FromScAddress(address xdr.ScAddress) error

func (StellarAsset) MakeScAddress

func (s StellarAsset) MakeScAddress() (xdr.ScAddress, error)

func (StellarAsset) MarshalBinary

func (s StellarAsset) MarshalBinary() (data []byte, err error)

func (*StellarAsset) UnmarshalBinary

func (s *StellarAsset) UnmarshalBinary(data []byte) error

Jump to

Keyboard shortcuts

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