move

package
v1.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MoveModuleNameFungibleAsset = "fungible_asset"

	ResourceNameFungibleStore = "FungibleStore"
)
View Source
const (
	DenomTraceDenomPrefixMove = "move/"
)

Variables

View Source
var (
	VMStorePrefix = []byte{0x21} // prefix for vm

	ResourceSeparator = byte(2)
)
View Source
var NewDeserializer = bcs.NewDeserializer

Functions

func DeserializeUint64

func DeserializeUint64(bz []byte) (uint64, error)

DeserializeUint64 deserialize BCS bytes

func GetResourceKey

func GetResourceKey(addr AccountAddress, structTag StructTag) ([]byte, error)

GetResourceKey returns the store key of the Move resource

Types

type AccountAddress

type AccountAddress [32]uint8
var StdAddress AccountAddress

func BcsDeserializeAccountAddress

func BcsDeserializeAccountAddress(input []byte) (AccountAddress, error)

func DeserializeAccountAddress

func DeserializeAccountAddress(deserializer serde.Deserializer) (AccountAddress, error)

func MetadataAddressFromDenom

func MetadataAddressFromDenom(denom string) (AccountAddress, error)

Extract metadata address from a denom

func NamedObjectAddress

func NamedObjectAddress(source AccountAddress, name string) AccountAddress

Generate named object address from the seed (address + name + 0xFE)

func NewAccountAddress

func NewAccountAddress(hexAddr string) (AccountAddress, error)

NewAccountAddress return AccountAddress from the hex string

func NewAccountAddressFromBytes

func NewAccountAddressFromBytes(bz []byte) (AccountAddress, error)

NewAccountAddressFromBytes return AccountAddress from the bytes

func UserDerivedObjectAddress

func UserDerivedObjectAddress(source AccountAddress, deriveFrom AccountAddress) AccountAddress

func (*AccountAddress) BcsSerialize

func (obj *AccountAddress) BcsSerialize() ([]byte, error)

func (AccountAddress) Bytes

func (addr AccountAddress) Bytes() []byte

func (*AccountAddress) Serialize

func (obj *AccountAddress) Serialize(serializer serde.Serializer) error

type Identifier

type Identifier string

func (*Identifier) BcsSerialize

func (obj *Identifier) BcsSerialize() ([]byte, error)

func (*Identifier) Serialize

func (obj *Identifier) Serialize(serializer serde.Serializer) error

type StructTag

type StructTag struct {
	Address  AccountAddress
	Module   Identifier
	Name     Identifier
	TypeArgs []TypeTag
}

func (*StructTag) BcsSerialize

func (obj *StructTag) BcsSerialize() ([]byte, error)

func (*StructTag) Serialize

func (obj *StructTag) Serialize(serializer serde.Serializer) error

type TypeTag

type TypeTag interface {
	Serialize(serializer serde.Serializer) error
	BcsSerialize() ([]byte, error)
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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