gmsui

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: GPL-2.0, GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SuiGasCoinType string = "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI"

	SuiZeroAddress   string = "0x0000000000000000000000000000000000000000000000000000000000000000"
	SuiClockObjectId string = "0x0000000000000000000000000000000000000000000000000000000000000006"
	SuiPackageId     string = "0x0000000000000000000000000000000000000000000000000000000000000002"
)

Functions

func B64PublicKeyToSuiAddress

func B64PublicKeyToSuiAddress(b64 string) (string, error)

func B64ToSuiPrivateKey

func B64ToSuiPrivateKey(b64 string) (string, error)

Utils

func DevInspect added in v0.0.18

func DevInspect(suiClient *client.SuiClient, target string, args []interface{}, typeArgs []string) (*types.DevInspectResults, error)

func Ed25519PublicKeyToB64PublicKey

func Ed25519PublicKeyToB64PublicKey(ed25519PubKey ed25519.PublicKey) string

func GetAllCoins added in v0.0.18

func GetAllCoins(client *client.SuiClient, owner string, coinType string) (data []types.CoinStruct, err error)

Instance Get All Sui Coins

func GetDynamicFieldObjectAndUnmarshal added in v0.0.8

func GetDynamicFieldObjectAndUnmarshal[T any, NameType any](client *client.SuiClient, parentId string, name types.DynamicFieldName) (raw *types.SuiObjectResponse, value *T, err error)

func GetMaxCoinObject added in v0.0.18

func GetMaxCoinObject(client *client.SuiClient, owner, coinType string) (*types.CoinStruct, error)

func GetObjectAndUnmarshal added in v0.0.8

func GetObjectAndUnmarshal[T any](client *client.SuiClient, id string) (raw *types.SuiObjectResponse, value *T, err error)

func GetObjectsAndUnmarshal added in v0.0.8

func GetObjectsAndUnmarshal[T any](client *client.SuiClient, ids []string) (raw *[]types.SuiObjectResponse, values []*T, err error)

func ParseDevInspectReturnValue added in v0.0.6

func ParseDevInspectReturnValue(v [2]interface{}) ([]byte, error)

func ParseEvent added in v0.0.2

func ParseEvent[T any](event types.SuiEvent) (*T, error)

Parsing custom event json Reference: https://docs.sui.io/guides/developer/sui-101/using-events#move-event-structure

func ParseFunctionTypeArguments

func ParseFunctionTypeArguments(typeArgs []string) (typeArguments []move_types.TypeTag, err error)

func SuiPrivateKeyToB64

func SuiPrivateKeyToB64(pk string) (string, error)

Types

type MoveEventModuleConfig added in v0.0.2

type MoveEventModuleConfig struct {
	Package string `toml:"Package,omitempty"`
	Module  string `toml:"Module,omitempty"`
}

Define the type as MoveModule/MoveEventModule. Events emitted, defined on the specified Move module. Reference: https://docs.sui.io/guides/developer/sui-101/using-events#filtering-event-queries

func (*MoveEventModuleConfig) Join added in v0.0.2

func (ec *MoveEventModuleConfig) Join() string

func (*MoveEventModuleConfig) JoinEventName added in v0.0.2

func (ec *MoveEventModuleConfig) JoinEventName(name string) string

type ProgrammableTransactionBlock

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

func NewProgrammableTransactionBlock added in v0.0.18

func NewProgrammableTransactionBlock(client *client.SuiClient) *ProgrammableTransactionBlock

func (*ProgrammableTransactionBlock) Builder

func (*ProgrammableTransactionBlock) Client

func (*ProgrammableTransactionBlock) Context

func (*ProgrammableTransactionBlock) Finish

func (ptb *ProgrammableTransactionBlock) Finish(sender string, gasObject *string, gasBudget uint64, gasPrice *uint64) (*sui_types.TransactionData, []byte, error)

func (*ProgrammableTransactionBlock) NewMoveCall

func (ptb *ProgrammableTransactionBlock) NewMoveCall(target string, args []interface{}, typeArgs []string) (*sui_types.Argument, error)

func (*ProgrammableTransactionBlock) ParseFunctionArguments

func (ptb *ProgrammableTransactionBlock) ParseFunctionArguments(target string, args []interface{}) (arguments []sui_types.Argument, err error)

txContext should be nil

type SuiMoveDynamicField added in v0.0.7

type SuiMoveDynamicField[TypeFields any, TypeName any] struct {
	Id    SuiMoveId                            `json:"id"`
	Name  TypeName                             `json:"name"`
	Value SuiMoveDynamicFieldValue[TypeFields] `json:"value"`
}

type SuiMoveDynamicFieldValue added in v0.0.7

type SuiMoveDynamicFieldValue[TypeFields any] struct {
	Fields TypeFields `json:"fields"`
	Type   string     `json:"type"`
}

type SuiMoveId added in v0.0.7

type SuiMoveId struct {
	Id string `json:"id"`
}

type SuiMoveString added in v0.0.7

type SuiMoveString struct {
	Type   string              `json:"type"`
	Fields SuiMoveStringFields `json:"fields"`
}

type SuiMoveStringFields added in v0.0.7

type SuiMoveStringFields struct {
	Name string `json:"name"`
}

type SuiMoveTable added in v0.0.7

type SuiMoveTable struct {
	Fields SuiMoveTableFields `json:"fields"`
	Type   string             `json:"type"`
}

type SuiMoveTableFields added in v0.0.7

type SuiMoveTableFields struct {
	Id   SuiMoveId `json:"id"`
	Size string    `json:"size"`
}

Directories

Path Synopsis
keypairs

Jump to

Keyboard shortcuts

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