Documentation
¶
Overview ¶
Package types defines the stellar asset that is used in payment channels.
Index ¶
- Constants
- func MakeAccountAddress(kp keypair.KP) (xdr.ScAddress, error)
- func MakeContractAddress(contractID xdr.Hash) (xdr.ScAddress, error)
- func ToAccountAddress(address xdr.ScAddress) (keypair.FromAddress, error)
- type StellarAsset
- func (s StellarAsset) ContractID() xdr.Hash
- func (s StellarAsset) Equal(asset channel.Asset) bool
- func (s *StellarAsset) FromScAddress(address xdr.ScAddress) error
- func (s StellarAsset) MakeScAddress() (xdr.ScAddress, error)
- func (s StellarAsset) MarshalBinary() (data []byte, err error)
- func (s *StellarAsset) UnmarshalBinary(data []byte) error
Constants ¶
View Source
const HashLenXdr = 32
Variables ¶
This section is empty.
Functions ¶
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) 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
Click to show internal directories.
Click to hide internal directories.