types

package
v0.0.0-...-d9a9773 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: MIT Imports: 14 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

View Source
const (
	MoveEventType              = EventType("MoveEvent")
	PublishEventType           = EventType("Publish")
	TransferObjectEventType    = EventType("TransferObject")
	MutateObjectEventType      = EventType("MutateObject")
	CoinBalanceChangeEventType = EventType("CoinBalanceChange")
	DeleteObjectEventType      = EventType("DeleteObject")
	NewObjectEventType         = EventType("NewObject")
	EpochChangeEventType       = EventType("EpochChange")
	CheckpointEventType        = EventType("Checkpoint")
)
View Source
const (
	GasBalanceChangeType     = BalanceChangeType("Gas")
	PayBalanceChangeType     = BalanceChangeType("Pay")
	ReceiveBalanceChangeType = BalanceChangeType("Receive")
)
View Source
const (
	// PubKeySize is is the size, in bytes, of public keys as used in this package.
	PubKeySize = 32
	// PrivateKeySize is the size, in bytes, of private keys as used in this package.
	PrivateKeySize = 64
	// Size of an Edwards25519 signature. Namely the size of a compressed
	// Edwards25519 point, and a field element. Both of which are 32 bytes.
	SignatureSize = 64
	// SeedSize is the size, in bytes, of private key seeds. These are the
	// private key representations used by RFC 8032.
	SeedSize = 32

	KeyType = "ed25519"
)
View Source
const (
	SuiObjectStatusExists    = SuiObjectStatus("Exists")
	SuiObjectStatusNotExists = SuiObjectStatus("NotExists")
	SuiObjectStatusDeleted   = SuiObjectStatus("Deleted")
)
View Source
const (
	SuiObjectTypeObject  = SuiObjectType("moveObject")
	SuiObjectTypePackage = SuiObjectType("package")
)
View Source
const (
	RAW_TRANSACTION_SALT           = "APTOS::RawTransaction"
	RAW_TRANSACTION_WITH_DATA_SALT = "APTOS::RawTransactionWithData"
)
View Source
const (
	ExecutionStatusSuccess = ExecutionStatusType("success")
	ExecutionStatusFailure = ExecutionStatusType("failure")
)
View Source
const (
	AddressLength = 20
)
View Source
const AllEvent = AllEventQuery("All")
View Source
const (
	TransactionQueryAll = TransactionQueryALL("All")
)

Variables ¶

This section is empty.

Functions ¶

func FromHex ¶

func FromHex(s string) []byte

FromHex returns the bytes represented by the hexadecimal string s. s may be prefixed with "0x".

func Hex2Bytes ¶

func Hex2Bytes(str string) []byte

Hex2Bytes returns the bytes represented by the hexadecimal string str.

func IsHexAddress ¶

func IsHexAddress(s string) bool

IsHexAddress verifies whether a string can represent a valid hex-encoded Ethereum address or not.

Types ¶

type Address ¶

type Address [AddressLength]byte

Address represents the 20 byte address of an account .

func BytesToAddress ¶

func BytesToAddress(b []byte) Address

BytesToAddress returns Address with value b. If b is larger than len(h), b will be cropped from the left.

func HexToAddress ¶

func HexToAddress(s string) Address

HexToAddress returns Address with byte values of s. If s is larger than len(h), s will be cropped from the left.

func (Address) Bytes ¶

func (a Address) Bytes() []byte

Bytes gets the string representation of the underlying address.

func (*Address) SetBytes ¶

func (a *Address) SetBytes(b []byte)

SetBytes sets the address to the value of b. If b is larger than len(a), b will be cropped from the left.

func (Address) String ¶

func (a Address) String() string

String implements fmt.Stringer.

type AddressOwner ¶

type AddressOwner struct {
	AddressOwner string `json:"AddressOwner"`
}

func (AddressOwner) ObjectOwnerType ¶

func (o AddressOwner) ObjectOwnerType()

type AllEventQuery ¶

type AllEventQuery string

func (*AllEventQuery) EventQuery ¶

func (eq *AllEventQuery) EventQuery() string

type AuthorityPublicKeyBytes ¶

type AuthorityPublicKeyBytes struct {
}

type AuthorityQuorumSignInfo ¶

type AuthorityQuorumSignInfo struct {
	Epoch     int64                     `json:"epoch"`
	Signature GenericAuthoritySignature `json:"signature"`
}

type BalanceChangeType ¶

type BalanceChangeType string

type BatchVerifier ¶

type BatchVerifier struct {
	*ed25519.BatchVerifier
}

BatchVerifier implements batch verification for ed25519.

func NewBatchVerifier ¶

func NewBatchVerifier() *BatchVerifier

func (*BatchVerifier) Add ¶

func (b *BatchVerifier) Add(key PubKey, msg, signature []byte) error

func (*BatchVerifier) Verify ¶

func (b *BatchVerifier) Verify() (bool, []bool)

type CertifiedTransaction ¶

type CertifiedTransaction struct {
	TransactionDigest TransactionDigest       `json:"transactionDigest"`
	Data              SuiTransactionData      `json:"data"`
	TxSignature       string                  `json:"txSignature"`
	AuthSignInfo      AuthorityQuorumSignInfo `json:"authSignInfo"`
}

type CoinBalanceChangeEvent ¶

type CoinBalanceChangeEvent struct {
	PackageID         ObjectID          `json:"packageId"`
	TransactionModule string            `json:"transactionModule"`
	Sender            string            `json:"sender"`
	Owner             Recipient         `json:"owner"`
	ChangeType        BalanceChangeType `json:"changeType"`
	CoinType          string            `json:"coinType"`
	CoinObjectID      ObjectID          `json:"coinObjectId"`
	Version           uint64            `json:"version"`
	Amount            int64             `json:"amount"`
}

type CommitteeInfo ¶

type CommitteeInfo struct {
	Epoch         uint64            `json:"epoch"`
	CommitteeInfo []json.RawMessage `json:"committee_info"`
}

type DeleteObjectEvent ¶

type DeleteObjectEvent struct {
	PackageID         ObjectID `json:"packageId"`
	TransactionModule string   `json:"transactionModule"`
	Sender            string   `json:"sender"`
	ObjectID          ObjectID `json:"objectId"`
	Version           uint64   `json:"version"`
}

type EventID ¶

type EventID struct {
	TxSeq    uint64 `json:"txSeq"`
	EventSeq uint64 `json:"eventSeq"`
}

type EventQuery ¶

type EventQuery interface {
	EventQuery() string
}

type EventType ¶

type EventType string

type EventTypeEventQuery ¶

type EventTypeEventQuery struct {
	EventType EventType `json:"EventType"`
}

func (*EventTypeEventQuery) EventQuery ¶

func (eq *EventTypeEventQuery) EventQuery() string

type ExecutionStatus ¶

type ExecutionStatus struct {
	Status ExecutionStatusType `json:"status"`
	Error  *string             `json:"error,omitempty"`
}

type ExecutionStatusType ¶

type ExecutionStatusType string

type GasCostSummary ¶

type GasCostSummary struct {
	ComputationCost int64 `json:"computationCost"`
	StorageCost     int64 `json:"storageCost"`
	StorageRebate   int64 `json:"storageRebate"`
}

type GenericAuthoritySignature ¶

type GenericAuthoritySignature []string

func (GenericAuthoritySignature) UnmarshalJSON ¶

func (gas GenericAuthoritySignature) UnmarshalJSON(b []byte) (err error)

type Immutable ¶

type Immutable string

type ImmutableOwner ¶

type ImmutableOwner string

func (ImmutableOwner) ObjectOwnerType ¶

func (o ImmutableOwner) ObjectOwnerType()

type MoveCall ¶

type MoveCall struct {
	Package       SuiObjectRef      `json:"package"`
	Module        string            `json:"module"`
	Function      string            `json:"function"`
	TypeArguments []string          `json:"typeArguments"`
	Arguments     []json.RawMessage `json:"arguments"`
}

type MoveEvent ¶

type MoveEvent struct {
	PackageID         ObjectID               `json:"packageId"`
	TransactionModule string                 `json:"transactionModule"`
	Sender            string                 `json:"sender"`
	Type              string                 `json:"type"`
	Fields            map[string]interface{} `json:"fields"`
	BCS               string                 `json:"bcs"`
}

type MoveEventEventQuery ¶

type MoveEventEventQuery struct {
	MoveEvent string `json:"MoveEvent"`
}

func (*MoveEventEventQuery) EventQuery ¶

func (eq *MoveEventEventQuery) EventQuery() string

type MoveFunctionArgTypeObject ¶

type MoveFunctionArgTypeObject struct {
	Object string `json:"Object"`
}

func (MoveFunctionArgTypeObject) MoveFunctionArgTyper ¶

func (t MoveFunctionArgTypeObject) MoveFunctionArgTyper()

type MoveFunctionArgTypeString ¶

type MoveFunctionArgTypeString string

func (MoveFunctionArgTypeString) MoveFunctionArgTyper ¶

func (t MoveFunctionArgTypeString) MoveFunctionArgTyper()

type MoveFunctionArgTyper ¶

type MoveFunctionArgTyper interface {
	MoveFunctionArgTyper()
}

type MoveFunctionArgTypes ¶

type MoveFunctionArgTypes struct {
	Types []MoveFunctionArgTyper
}

func (*MoveFunctionArgTypes) UnmarshalJSON ¶

func (ats *MoveFunctionArgTypes) UnmarshalJSON(b []byte) (err error)

type MoveModule ¶

type MoveModule struct {
	Package ObjectID `json:"package"`
	Module  string   `json:"module"`
}

type MoveModuleEventQuery ¶

type MoveModuleEventQuery struct {
	MoveModule MoveModule `json:"MoveModule"`
}

func (*MoveModuleEventQuery) EventQuery ¶

func (eq *MoveModuleEventQuery) EventQuery() string

type MovePackageContent ¶

type MovePackageContent map[string]string

type MutateObjectEvent ¶

type MutateObjectEvent struct {
	PackageID         ObjectID `json:"packageId"`
	TransactionModule string   `json:"transactionModule"`
	Sender            string   `json:"sender"`
	ObjectType        string   `json:"objectType"`
	ObjectID          ObjectID `json:"objectId"`
	Version           uint64   `json:"version"`
}

type NewObjectEvent ¶

type NewObjectEvent struct {
	PackageID         ObjectID  `json:"packageId"`
	TransactionModule string    `json:"transactionModule"`
	Sender            string    `json:"sender"`
	Recipient         Recipient `json:"recipient"`
	ObjectType        string    `json:"objectType"`
	ObjectID          ObjectID  `json:"objectId"`
	Version           uint64    `json:"version"`
}

type ObjectEventQuery ¶

type ObjectEventQuery struct {
	Object ObjectID `json:"Object"`
}

func (*ObjectEventQuery) EventQuery ¶

func (eq *ObjectEventQuery) EventQuery() string

type ObjectID ¶

type ObjectID string

func (ObjectID) SuiObjectDetailer ¶

func (o ObjectID) SuiObjectDetailer()

type ObjectOwner ¶

type ObjectOwner struct {
	ObjectOwner string `json:"ObjectOwner"`
}

func (ObjectOwner) ObjectOwnerType ¶

func (o ObjectOwner) ObjectOwnerType()

type ObjectOwnerType ¶

type ObjectOwnerType interface {
	ObjectOwnerType()
}

type OwnedObjectRef ¶

type OwnedObjectRef struct {
	Owner     ObjectOwner  `json:"owner"`
	Reference SuiObjectRef `json:"reference"`
}

type PaginatedEvents ¶

type PaginatedEvents struct {
	Data       SuiEvents `json:"data"`
	NextCursor *EventID  `json:"nextCursor"`
}

type PaginatedTransactionDigests ¶

type PaginatedTransactionDigests struct {
	Data       []TransactionDigest `json:"data"`
	NextCursor *TransactionDigest  `json:"nextCursor,omitempty"`
}

type PayAllTransaction ¶

type PayAllTransaction struct {
	Coins      []SuiObjectRef `json:"coins"`
	Recipients []string       `json:"recipients"`
}

type PaySuiTransaction ¶

type PaySuiTransaction struct {
	Coins      []SuiObjectRef `json:"coins"`
	Recipients []string       `json:"recipients"`
	Amounts    []int64        `json:"amounts"`
}

type PayTransaction ¶

type PayTransaction struct {
	Coins      []SuiObjectRef `json:"coins"`
	Recipients []string       `json:"recipients"`
	Amounts    []int64        `json:"amounts"`
}

type PrivKey ¶

type PrivKey []byte

PrivKey implements crypto.PrivKey.

func GenPrivKey ¶

func GenPrivKey() PrivKey

GenPrivKey generates a new ed25519 private key. It uses OS randomness in conjunction with the current global random seed in tendermint/libs/common to generate the private key.

func GenPrivKeyFromHex ¶

func GenPrivKeyFromHex(key string) (pk PrivKey, err error)

GenPrivKeyFromHex generates a ed25519 private key from hex format private key.

func GenPrivKeyFromSecret ¶

func GenPrivKeyFromSecret(secret []byte) PrivKey

GenPrivKeyFromSecret hashes the secret with SHA2, and uses that 32 byte output to create the private key. NOTE: secret should be the output of a KDF like bcrypt, if it's derived from user input.

func GenPrivKeyFromSeed ¶

func GenPrivKeyFromSeed(seed []byte) PrivKey

GenPrivKey generates a new ed25519 private key. From a 32 bytes seed

func (PrivKey) Bytes ¶

func (privKey PrivKey) Bytes() []byte

Bytes returns the privkey byte format.

func (PrivKey) Equals ¶

func (privKey PrivKey) Equals(other PrivKey) bool

Equals - you probably don't need to use this. Runs in constant time based on length of the keys.

func (PrivKey) PubKey ¶

func (privKey PrivKey) PubKey() PubKey

PubKey gets the corresponding public key from the private key.

Panics if the private key is not initialized.

func (PrivKey) Sign ¶

func (privKey PrivKey) Sign(msg []byte) ([]byte, error)

Sign produces a signature on the provided message. This assumes the privkey is wellformed in the golang format. The first 32 bytes should be random, corresponding to the normal ed25519 private key. The latter 32 bytes should be the compressed public key. If these conditions aren't met, Sign will panic or produce an incorrect signature.

func (PrivKey) String ¶

func (privKey PrivKey) String() string

func (PrivKey) Type ¶

func (privKey PrivKey) Type() string

type PubKey ¶

type PubKey []byte

PubKeyEd25519 implements crypto.PubKey for the Ed25519 signature scheme.

func (PubKey) Address ¶

func (pubKey PubKey) Address() Address

Address is the SHA256 of the raw pubkey bytes.

func (PubKey) Base64 ¶

func (pubKey PubKey) Base64() string

func (PubKey) Bytes ¶

func (pubKey PubKey) Bytes() []byte

Bytes returns the PubKey byte format.

func (PubKey) Equals ¶

func (pubKey PubKey) Equals(other PubKey) bool

func (PubKey) String ¶

func (pubKey PubKey) String() string

func (PubKey) Type ¶

func (pubKey PubKey) Type() string

func (PubKey) VerifySignature ¶

func (pubKey PubKey) VerifySignature(msg []byte, sig []byte) bool

type PublishEvent ¶

type PublishEvent struct {
	Sender    string   `json:"sender"`
	PackageID ObjectID `json:"packageId"`
}

type Recipient ¶

type Recipient struct {
	AddressOwner *string          `json:"AddressOwner,omitempty"`
	ObjectOwner  *string          `json:"ObjectOwner,omitempty"`
	Shared       *SharedRecipient `json:"Shared,omitempty"`
}

type SenderEventQuery ¶

type SenderEventQuery struct {
	Sender string `json:"Sender"`
}

func (*SenderEventQuery) EventQuery ¶

func (eq *SenderEventQuery) EventQuery() string

type SharedOwner ¶

type SharedOwner struct {
	Shared SharedOwnerVersion `json:"Shared"`
}

func (SharedOwner) ObjectOwnerType ¶

func (o SharedOwner) ObjectOwnerType()

type SharedOwnerVersion ¶

type SharedOwnerVersion struct {
	Version uint64 `json:"initial_shared_version"`
}

type SharedRecipient ¶

type SharedRecipient struct {
	Version uint64 `json:"initial_shared_version"`
}

type SuiCertifiedTransactionEffects ¶

type SuiCertifiedTransactionEffects struct {
	Certificate CertifiedTransaction `json:"certificate"`
	Effects     TransactionEffects   `json:"effects"`
}

type SuiChangeEpoch ¶

type SuiChangeEpoch struct {
	Epoch             int64 `json:"epoch"`
	StorageCharge     int64 `json:"storage_charge"`
	ComputationCharge int64 `json:"computation_charge"`
}

type SuiCoinMetadata ¶

type SuiCoinMetadata struct {
	Decimals    uint8    `json:"decimals"`
	Description string   `json:"description"`
	IconUrl     string   `json:"iconUrl,omitempty"`
	ID          ObjectID `json:"id,omitempty"`
	Name        string   `json:"name"`
	Symbol      string   `json:"symbol"`
}

type SuiData ¶

type SuiData struct {
	DataType SuiObjectType `json:"dataType"`

	Disassembled map[string]string `json:"disassembled"`

	Fields            map[string]json.RawMessage `json:"fields"`
	Type              string                     `json:"type"`
	HasPublicTransfer bool                       `json:"has_public_transfer"`
	BCSBytes          string                     `json:"bcs_bytes"`
}

type SuiEvent ¶

type SuiEvent struct {
	MoveEvent              *MoveEvent              `json:"moveEvent,omitempty"`
	Publish                *PublishEvent           `json:"publish,omitempty"`
	CoinBalanceChangeEvent *CoinBalanceChangeEvent `json:"coinBalanceChange,omitempty"`
	TransferObject         *TransferObjectEvent    `json:"transferObject,omitempty"`
	MutateObject           *MutateObjectEvent      `json:"mutateObject,omitempty"`
	DeleteObject           *DeleteObjectEvent      `json:"deleteObject,omitempty"`
	NewObject              *NewObjectEvent         `json:"newObject,omitempty"`
	EpochChange            *big.Int                `json:"epochChange,omitempty"`
	Checkpoint             *big.Int                `json:"checkpoint,omitempty"`
}

type SuiEventEnvelope ¶

type SuiEventEnvelope struct {
	Timestamp uint64            `json:"timestamp"`
	TxDigest  TransactionDigest `json:"txDigest"`
	ID        EventID           `json:"id"`
	Event     SuiEvent          `json:"event"`
}

type SuiEvents ¶

type SuiEvents []SuiEventEnvelope

type SuiExecuteTransactionResponse ¶

type SuiExecuteTransactionResponse struct {
	TxDigest    *TransactionDigest              `json:"tx_digest,omitempty"`
	Certificate *CertifiedTransaction           `json:"certificate,omitempty"`
	Effects     *SuiCertifiedTransactionEffects `json:"effects,omitempty"`
}

type SuiMoveAbilitySet ¶

type SuiMoveAbilitySet struct {
	Abilities []string `json:"abilities"`
}

type SuiMoveModuleID ¶

type SuiMoveModuleID struct {
	Address string `json:"address"`
	Name    string `json:"name"`
}

type SuiMoveNormalizedField ¶

type SuiMoveNormalizedField struct {
	Name string                `json:"name"`
	Type SuiMoveNormalizedType `json:"type_"`
}

type SuiMoveNormalizedFunction ¶

type SuiMoveNormalizedFunction struct {
	Visibility     string                  `json:"visibility"`
	IsEntry        bool                    `json:"is_entry"`
	TypeParameters []SuiMoveAbilitySet     `json:"type_parameters"`
	Parameters     []SuiMoveNormalizedType `json:"parameters"`
	Return         []SuiMoveNormalizedType `json:"return_"`
}

type SuiMoveNormalizedModule ¶

type SuiMoveNormalizedModule struct {
	FileFormatVersion int64                                `json:"file_format_version"`
	Address           string                               `json:"address"`
	Name              string                               `json:"name"`
	Friends           []SuiMoveModuleID                    `json:"friends"`
	Structs           map[string]SuiMoveNormalizedStruct   `json:"structs"`
	ExposedFunctions  map[string]SuiMoveNormalizedFunction `json:"exposed_functions"`
}

type SuiMoveNormalizedStruct ¶

type SuiMoveNormalizedStruct struct {
	Abilities      SuiMoveAbilitySet            `json:"abilities"`
	TypeParameters []SuiMoveStructTypeParameter `json:"type_parameters"`
	Fields         []SuiMoveNormalizedField     `json:"fields"`
}

type SuiMoveNormalizedStructType ¶

type SuiMoveNormalizedStructType struct {
	Struct *SuiMoveNormalizedStructTypeStruct `json:"Struct"`
}

func (SuiMoveNormalizedStructType) SuiMoveNormalizedTyper ¶

func (t SuiMoveNormalizedStructType) SuiMoveNormalizedTyper()

type SuiMoveNormalizedStructTypeStruct ¶

type SuiMoveNormalizedStructTypeStruct struct {
	Address       string                   `json:"address"`
	Module        string                   `json:"module"`
	Name          string                   `json:"name"`
	TypeArguments []*SuiMoveNormalizedType `json:"type_arguments"`
}

type SuiMoveNormalizedType ¶

type SuiMoveNormalizedType struct {
	Type SuiMoveNormalizedTyper
}

func (SuiMoveNormalizedType) SuiMoveNormalizedTyper ¶

func (t SuiMoveNormalizedType) SuiMoveNormalizedTyper()

func (*SuiMoveNormalizedType) UnmarshalJSON ¶

func (smnt *SuiMoveNormalizedType) UnmarshalJSON(b []byte) (err error)

type SuiMoveNormalizedTypeMutableReference ¶

type SuiMoveNormalizedTypeMutableReference struct {
	MutableReference *SuiMoveNormalizedType `json:"MutableReference"`
}

func (SuiMoveNormalizedTypeMutableReference) SuiMoveNormalizedTyper ¶

func (t SuiMoveNormalizedTypeMutableReference) SuiMoveNormalizedTyper()

type SuiMoveNormalizedTypeParameterType ¶

type SuiMoveNormalizedTypeParameterType struct {
	TypeParameter *int64 `json:"TypeParameter"`
}

func (SuiMoveNormalizedTypeParameterType) SuiMoveNormalizedTyper ¶

func (t SuiMoveNormalizedTypeParameterType) SuiMoveNormalizedTyper()

type SuiMoveNormalizedTypeReference ¶

type SuiMoveNormalizedTypeReference struct {
	Reference *SuiMoveNormalizedType `json:"Reference"`
}

func (SuiMoveNormalizedTypeReference) SuiMoveNormalizedTyper ¶

func (t SuiMoveNormalizedTypeReference) SuiMoveNormalizedTyper()

type SuiMoveNormalizedTypeStringType ¶

type SuiMoveNormalizedTypeStringType string

func (SuiMoveNormalizedTypeStringType) SuiMoveNormalizedTyper ¶

func (t SuiMoveNormalizedTypeStringType) SuiMoveNormalizedTyper()

type SuiMoveNormalizedTypeVector ¶

type SuiMoveNormalizedTypeVector struct {
	Vector *SuiMoveNormalizedType `json:"Vector"`
}

func (SuiMoveNormalizedTypeVector) SuiMoveNormalizedTyper ¶

func (t SuiMoveNormalizedTypeVector) SuiMoveNormalizedTyper()

type SuiMoveNormalizedTyper ¶

type SuiMoveNormalizedTyper interface {
	SuiMoveNormalizedTyper()
}

type SuiMovePackage ¶

type SuiMovePackage struct {
	Disassembled MovePackageContent `json:"disassembled"`
}

type SuiMoveStructTypeParameter ¶

type SuiMoveStructTypeParameter struct {
	Constraints SuiMoveAbilitySet `json:"constraints"`
	IsPhantom   bool              `json:"is_phantom"`
}

type SuiObejct ¶

type SuiObejct struct {
	Data                SuiData           `josn:"data"`
	Owner               SuiObjectOwner    `json:"owner"`
	PreviousTransaction TransactionDigest `json:"previousTransaction"`
	StorageRebate       int64             `josn:"storageRebate"`
	Reference           SuiObjectRef      `json:"reference"`
}

func (SuiObejct) SuiObjectDetailer ¶

func (so SuiObejct) SuiObjectDetailer()

type SuiObject ¶

type SuiObject struct {
	Data                SuiData           `json:"data"`
	Owner               ObjectOwner       `json:"owner"`
	PreviousTransaction TransactionDigest `json:"previousTransaction"`

	StorageRebate int64        `json:"storageRebate"`
	Reference     SuiObjectRef `json:"reference"`
}

type SuiObjectData ¶

type SuiObjectData struct {
	Status  SuiObjectStatus   `json:"status"`
	Details SuiObjectDetailer `json:"details"`
}

func (*SuiObjectData) UnmarshalJSON ¶

func (smnt *SuiObjectData) UnmarshalJSON(b []byte) (err error)

type SuiObjectDetailer ¶

type SuiObjectDetailer interface {
	SuiObjectDetailer()
}

type SuiObjectInfo ¶

type SuiObjectInfo struct {
	SuiObjectRef
	Type                string            `json:"type"`
	Owner               SuiObjectOwner    `json:"owner"`
	PreviousTransaction TransactionDigest `json:"previousTransaction"`
}

type SuiObjectOwner ¶

type SuiObjectOwner struct {
	Type ObjectOwnerType
}

func (*SuiObjectOwner) UnmarshalJSON ¶

func (soo *SuiObjectOwner) UnmarshalJSON(b []byte) (err error)

type SuiObjectRef ¶

type SuiObjectRef struct {
	Digest   TransactionDigest `json:"digest"`
	ObjectID ObjectID          `json:"objectId"`
	Version  uint64            `json:"version"`
}

func (SuiObjectRef) SuiObjectDetailer ¶

func (sor SuiObjectRef) SuiObjectDetailer()

type SuiObjectStatus ¶

type SuiObjectStatus string

type SuiObjectType ¶

type SuiObjectType string

type SuiPackage ¶

type SuiPackage struct {
	Digest   string `json:"digest"`
	ObjectId string `json:"objectId"`
	Version  int64  `json:"version"`
}

type SuiParsedMergeCoinResponse ¶

type SuiParsedMergeCoinResponse struct {
	UpdatedCoin SuiObject `json:"updatedCoin"`
	UpdatedGas  SuiObject `json:"updatedGas"`
}

type SuiParsedPublishResponse ¶

type SuiParsedPublishResponse struct {
	CreatedObjects []SuiObject `json:"createdObjects"`
	Package        SuiPackage  `json:"package"`
	UpdatedGas     SuiObject   `json:"updatedGas"`
}

type SuiParsedSplitCoinResponse ¶

type SuiParsedSplitCoinResponse struct {
	UpdatedCoin SuiObject   `json:"updatedCoin"`
	NewCoins    []SuiObject `json:"newCoins"`
	UpdatedGas  SuiObject   `json:"updatedGas"`
}

type SuiParsedTransactionResponse ¶

type SuiParsedTransactionResponse struct {
	SplitCoin *SuiParsedSplitCoinResponse `json:"SplitCoin"`
	MergeCoin *SuiParsedMergeCoinResponse `json:"MergeCoin"`
	Publish   *SuiParsedPublishResponse   `json:"Publish"`
}

type SuiTransactionAuthSignersResponse ¶

type SuiTransactionAuthSignersResponse struct {
	Signers []string `json:"signers"`
}

type SuiTransactionData ¶

type SuiTransactionData struct {
	Transactions []*SuiTransactionKind `json:"transactions"`
	Sender       string                `json:"sender"`
	GasPayment   SuiObjectRef          `json:"GasPayment"`
	GasBudget    uint64                `json:"GasBudget"`
}

type SuiTransactionKind ¶

type SuiTransactionKind struct {
	TransferObject *TransferObject    `json:"TransferObject,omitempty"`
	Publish        *SuiMovePackage    `json:"Publish,omitempty"`
	Call           *MoveCall          `json:"Call,omitempty"`
	TransferSui    *SuiTransferSui    `json:"TransferSui,omitempty"`
	ChangeEpoch    *SuiChangeEpoch    `json:"ChangeEpoch,omitempty"`
	Pay            *PayTransaction    `json:"Pay,omitempty"`
	PaySui         *PaySuiTransaction `json:"PaySui,omitempty"`
	PayAllSui      *PayAllTransaction `json:"PayAllSui,omitempty"`
}

type SuiTransactionResponse ¶

type SuiTransactionResponse struct {
	Certificate CertifiedTransaction          `json:"certificate"`
	Effects     TransactionEffects            `json:"effects"`
	TimestampMS *int64                        `json:"timestamp_ms,omitempty"`
	ParsedData  *SuiParsedTransactionResponse `json:"parsed_data,omitempty"`
}

type SuiTransferSui ¶

type SuiTransferSui struct {
	Recipient string `json:"recipient"`
	Amount    int64  `json:"amount"`
}

type TimeRange ¶

type TimeRange struct {
	Start uint64 `json:"start_time"`
	End   uint64 `json:"end_time"`
}

type TimeRangeEventQuery ¶

type TimeRangeEventQuery struct {
	TimeRange TimeRange `json:"TimeRange"`
}

func (*TimeRangeEventQuery) EventQuery ¶

func (eq *TimeRangeEventQuery) EventQuery() string

type TransactionBytes ¶

type TransactionBytes struct {
	Bytes string       `json:"txBytes"`
	Gas   SuiObjectRef `json:"gas"`
}

type TransactionDigest ¶

type TransactionDigest string

type TransactionEffects ¶

type TransactionEffects struct {
	Status            ExecutionStatus     `json:"status"`
	GasUsed           GasCostSummary      `json:"gasUsed"`
	SharedObjects     []SuiObjectRef      `json:"sharedObjects,omitempty"`
	TransactionDigest TransactionDigest   `json:"transactionDigest"`
	Created           []OwnedObjectRef    `json:"created,omitempty"`
	Mutated           []OwnedObjectRef    `json:"mutated,omitempty"`
	Unwrapped         []OwnedObjectRef    `json:"unwrapped,omitempty"`
	Deleted           []SuiObjectRef      `json:"deleted,omitempty"`
	Wrapped           []SuiObjectRef      `json:"wrapped,omitempty"`
	GasObject         OwnedObjectRef      `json:"gasObject"`
	Events            []SuiEvent          `json:"events,omitempty"`
	Dependencies      []TransactionDigest `json:"dependencies,omitempty"`
}

type TransactionEventQuery ¶

type TransactionEventQuery struct {
	Transaction TransactionDigest `json:"Transaction"`
}

func (*TransactionEventQuery) EventQuery ¶

func (eq *TransactionEventQuery) EventQuery() string

type TransactionQuery ¶

type TransactionQuery struct {
	All           TransactionQueryALL
	MoveFunction  *TransactionQueryMoveFunction `json:"MoveFunction"`
	InputObject   *ObjectID                     `json:"InputObject"`
	MutatedObject *ObjectID                     `json:"MutatedObject"`
	FromAddress   *string                       `json:"FromAddress"`
	ToAddress     *string                       `json:"ToAddress"`
}

func (TransactionQuery) MarshalJSON ¶

func (tq TransactionQuery) MarshalJSON() ([]byte, error)

type TransactionQueryALL ¶

type TransactionQueryALL string

func (TransactionQueryALL) TransactionQueryer ¶

func (tq TransactionQueryALL) TransactionQueryer()

type TransactionQueryMoveFunction ¶

type TransactionQueryMoveFunction struct {
	Package  ObjectID `json:"Package"`
	Module   *string  `json:"module"`
	Function *string  `json:"function"`
}

type TransferObject ¶

type TransferObject struct {
	Recipient string       `json:"recipient"`
	ObjectRef SuiObjectRef `json:"objectRef"`
}

type TransferObjectEvent ¶

type TransferObjectEvent struct {
	PackageID         ObjectID  `json:"packageId"`
	TransactionModule string    `json:"transactionModule"`
	Sender            string    `json:"sender"`
	Recipient         Recipient `json:"recipient"`
	ObjectType        string    `json:"objectType"`
	ObjectID          ObjectID  `json:"objectId"`
	Version           uint64    `json:"version"`
}

Jump to

Keyboard shortcuts

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