actions

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 23 Imported by: 4

Documentation

Index

Constants

View Source
const (
	RegisterValidatorStakeComputeUnits = 5
	StakeInfoSize                      = ids.NodeIDLen + 4*consts.Uint64Len + codec.AddressLen
)
View Source
const (
	BurnAssetFTComputeUnits = 1
)
View Source
const (
	BurnAssetNFTComputeUnits = 1
)
View Source
const (
	ClaimMarketplacePaymentComputeUnits = 5
)
View Source
const (
	ClaimStakingRewardComputeUnits = 5
)
View Source
const (
	CompleteContributeDatasetComputeUnits = 5
)
View Source
const (
	CreateAssetComputeUnits = 15
)
View Source
const (
	CreateDatasetComputeUnits = 100
)
View Source
const (
	DelegateUserStakeComputeUnits = 5
)
View Source
const (
	InitiateContributeDatasetComputeUnits = 15
)
View Source
const MAXCONTRACTSIZE = 2 * units.MiB
View Source
const MAXCREATIONSIZE = units.MiB
View Source
const MaxCallDataSize = units.MiB
View Source
const (
	MintAssetFTComputeUnits = 5
)
View Source
const (
	MintAssetNFTComputeUnits = 5
)
View Source
const (
	PublishDatasetMarketplaceComputeUnits = 5
)
View Source
const (
	SubscribeDatasetMarketplaceComputeUnits = 5
)
View Source
const (
	TransferComputeUnits = 1
)
View Source
const (
	UndelegateUserStakeComputeUnits = 5
)
View Source
const (
	UpdateAssetComputeUnits = 15
)
View Source
const (
	UpdateDatasetComputeUnits = 5
)
View Source
const (
	WithdrawValidatorStakeComputeUnits = 5
)

Variables

View Source
var (
	ErrStakeMissing     = errors.New("stake is missing")
	ErrUnauthorizedUser = errors.New("user is not authorized")
)
View Source
var (
	ErrDatasetContributionAlreadyComplete = errors.New("dataset contribution already complete")
	ErrDatasetAddressMismatch             = errors.New("dataset address mismatch")
	ErrDatasetContributorMismatch         = errors.New("dataset contributor mismatch")
)
View Source
var (
	ErrAssetExists      = errors.New("asset already exists")
	ErrAssetTypeInvalid = errors.New("asset type is invalid")
	ErrNameInvalid      = errors.New("name is invalid")
	ErrSymbolInvalid    = errors.New("symbol is invalid")
	ErrDecimalsInvalid  = errors.New("decimals is invalid")
	ErrMetadataInvalid  = errors.New("metadata is invalid")
	ErrURIInvalid       = errors.New("uri is invalid")
)
View Source
var (
	ErrDatasetAlreadyExists = errors.New("dataset already exists")
	ErrDescriptionInvalid   = errors.New("description is invalid")
	ErrCategoriesInvalid    = errors.New("categories is invalid")
	ErrLicenseNameInvalid   = errors.New("license name is invalid")
	ErrLicenseSymbolInvalid = errors.New("license symbol is invalid")
	ErrLicenseURLInvalid    = errors.New("license url is invalid")
)
View Source
var (
	ErrValidatorNotYetRegistered   = errors.New("validator is not yet registered")
	ErrUserAlreadyStaked           = errors.New("user has already staked to this validator")
	ErrDelegateStakedAmountInvalid = errors.New("staked amount is invalid")
)
View Source
var (
	ErrDatasetNotOpenForContribution    = errors.New("dataset is not open for contribution")
	ErrDatasetAlreadyOnSale             = errors.New("dataset is already on sale")
	ErrDataLocationInvalid              = errors.New("data location is invalid")
	ErrDataIdentifierInvalid            = errors.New("data identifier is invalid")
	ErrDatasetContributionAlreadyExists = errors.New("dataset contribution already exists")
)
View Source
var (
	ErrAssetIsNative  = errors.New("asset is native")
	ErrAssetMissing   = errors.New("asset missing")
	ErrWrongMintAdmin = errors.New("mint admin is not correct")
)
View Source
var (
	ErrNFTAlreadyExists         = errors.New("NFT already exists")
	ErrCantFractionalizeFurther = errors.New("asset already has a parent")
)
View Source
var (
	ErrOutputDifferentSignerThanActor = errors.New("output has a different signer than the actor")
	ErrNotValidatorOwner              = errors.New("actor is not the owner of the validator")
	ErrInvalidNodeID                  = errors.New("invalid nodeID")
	ErrValidatorAlreadyRegistered     = errors.New("validator is already registered")
	ErrValidatorStakedAmountInvalid   = errors.New("staked amount is invalid")
	ErrInvalidStakeStartBlock         = errors.New("stakeStartBlock is invalid")
	ErrInvalidStakeEndBlock           = errors.New("stakeEndBlock is invalid")
	ErrInvalidStakeDuration           = errors.New("stake duration is invalid")
	ErrInvalidDelegationFeeRate       = errors.New("delegation fee rate is invalid")
)
View Source
var (
	ErrDatasetNotOnSale                  = errors.New("dataset is not on sale")
	ErrMarketplaceAssetAddressInvalid    = errors.New("marketplace asset ID is invalid")
	ErrPaymentAssetNotSupported          = errors.New("base asset is not supported")
	ErrOutputNumBlocksToSubscribeInvalid = errors.New("num blocks to subscribe is invalid")
	ErrUserAlreadySubscribed             = errors.New("user is already subscribed")
)
View Source
var (
	ErrAssetDoesNotExist = errors.New("asset does not exist")
	ErrValueZero         = errors.New("value is zero")
	ErrNFTValueMustBeOne = errors.New("NFT value must be one")
	ErrMemoTooLarge      = errors.New("memo is too large")
	ErrTransferToSelf    = errors.New("cannot transfer to self")
)
View Source
var (
	ErrWrongOwner                                = errors.New("wrong owner")
	ErrAssetNotFound                             = errors.New("asset not found")
	ErrOutputMustUpdateAtLeastOneField           = errors.New("must update at least one field")
	ErrOutputMaxSupplyInvalid                    = errors.New("max supply must be greater than or equal to total supply")
	ErrOutputOwnerInvalid                        = errors.New("owner is invalid")
	ErrOutputMintAdminInvalid                    = errors.New("mint admin is invalid")
	ErrOutputPauseUnpauseAdminInvalid            = errors.New("pause/unpause admin is invalid")
	ErrOutputFreezeUnfreezeAdminInvalid          = errors.New("freeze/unfreeze admin is invalid")
	ErrOutputEnableDisableKYCAccountAdminInvalid = errors.New("enable/disable KYC account admin is invalid")
)
View Source
var (
	ErrNotValidator    = errors.New("node is not a validator")
	ErrStakeNotStarted = errors.New("stake not started")
	ErrStakeNotEnded   = errors.New("stake has not ended")
)
View Source
var (
	ErrDatasetNotFound = errors.New("dataset not found")
)
View Source
var (
	ErrNFTDoesNotBelongToTheCollection = errors.New("NFT does not belong to the collection")
)
View Source
var (
	ErrNoPaymentRemaining = errors.New("no payment remaining")
)

Functions

func UnmarshalBurnAssetFT added in v0.1.2

func UnmarshalBurnAssetFT(p *codec.Packer) (chain.Action, error)

func UnmarshalBurnAssetFTResult added in v0.1.3

func UnmarshalBurnAssetFTResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalBurnAssetNFT added in v0.1.2

func UnmarshalBurnAssetNFT(p *codec.Packer) (chain.Action, error)

func UnmarshalBurnAssetNFTResult added in v0.1.3

func UnmarshalBurnAssetNFTResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalCallContract added in v0.1.3

func UnmarshalCallContract(r *runtime.WasmRuntime) func(p *codec.Packer) (chain.Action, error)

func UnmarshalClaimDelegationStakeRewards

func UnmarshalClaimDelegationStakeRewards(p *codec.Packer) (chain.Action, error)

func UnmarshalClaimDelegationStakeRewardsResult added in v0.1.3

func UnmarshalClaimDelegationStakeRewardsResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalClaimMarketplacePayment added in v0.1.2

func UnmarshalClaimMarketplacePayment(p *codec.Packer) (chain.Action, error)

func UnmarshalClaimMarketplacePaymentResult added in v0.1.3

func UnmarshalClaimMarketplacePaymentResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalClaimValidatorStakeRewards

func UnmarshalClaimValidatorStakeRewards(p *codec.Packer) (chain.Action, error)

func UnmarshalClaimValidatorStakeRewardsResult added in v0.1.3

func UnmarshalClaimValidatorStakeRewardsResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalCompleteContributeDataset added in v0.1.2

func UnmarshalCompleteContributeDataset(p *codec.Packer) (chain.Action, error)

func UnmarshalCompleteContributeDatasetResult added in v0.1.3

func UnmarshalCompleteContributeDatasetResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalContractDeployResult added in v0.1.3

func UnmarshalContractDeployResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalCreateAsset

func UnmarshalCreateAsset(p *codec.Packer) (chain.Action, error)

func UnmarshalCreateAssetResult added in v0.1.3

func UnmarshalCreateAssetResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalCreateDataset added in v0.1.2

func UnmarshalCreateDataset(p *codec.Packer) (chain.Action, error)

func UnmarshalCreateDatasetResult added in v0.1.3

func UnmarshalCreateDatasetResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalDelegateUserStake

func UnmarshalDelegateUserStake(p *codec.Packer) (chain.Action, error)

func UnmarshalDelegateUserStakeResult added in v0.1.3

func UnmarshalDelegateUserStakeResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalDeployContract added in v0.1.3

func UnmarshalDeployContract(p *codec.Packer) (chain.Action, error)

func UnmarshalInitiateContributeDataset added in v0.1.2

func UnmarshalInitiateContributeDataset(p *codec.Packer) (chain.Action, error)

func UnmarshalInitiateContributeDatasetResult added in v0.1.3

func UnmarshalInitiateContributeDatasetResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalMintAssetFT added in v0.1.3

func UnmarshalMintAssetFT(p *codec.Packer) (chain.Action, error)

func UnmarshalMintAssetFTResult added in v0.1.3

func UnmarshalMintAssetFTResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalMintAssetNFT added in v0.1.2

func UnmarshalMintAssetNFT(p *codec.Packer) (chain.Action, error)

func UnmarshalMintAssetNFTResult added in v0.1.3

func UnmarshalMintAssetNFTResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalPublishContract added in v0.1.3

func UnmarshalPublishContract(p *codec.Packer) (chain.Action, error)

func UnmarshalPublishDatasetMarketplace added in v0.1.2

func UnmarshalPublishDatasetMarketplace(p *codec.Packer) (chain.Action, error)

func UnmarshalPublishDatasetMarketplaceResult added in v0.1.3

func UnmarshalPublishDatasetMarketplaceResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalRegisterValidatorStake

func UnmarshalRegisterValidatorStake(p *codec.Packer) (chain.Action, error)

func UnmarshalRegisterValidatorStakeResult added in v0.1.3

func UnmarshalRegisterValidatorStakeResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalSubscribeDatasetMarketplace added in v0.1.2

func UnmarshalSubscribeDatasetMarketplace(p *codec.Packer) (chain.Action, error)

func UnmarshalSubscribeDatasetMarketplaceResult added in v0.1.3

func UnmarshalSubscribeDatasetMarketplaceResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalTransfer

func UnmarshalTransfer(p *codec.Packer) (chain.Action, error)

func UnmarshalTransferResult added in v0.1.3

func UnmarshalTransferResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalUndelegateUserStake

func UnmarshalUndelegateUserStake(p *codec.Packer) (chain.Action, error)

func UnmarshalUndelegateUserStakeResult

func UnmarshalUndelegateUserStakeResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalUpdateAsset added in v0.1.2

func UnmarshalUpdateAsset(p *codec.Packer) (chain.Action, error)

func UnmarshalUpdateAssetResult added in v0.1.3

func UnmarshalUpdateAssetResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalUpdateDataset added in v0.1.2

func UnmarshalUpdateDataset(p *codec.Packer) (chain.Action, error)

func UnmarshalUpdateDatasetResult added in v0.1.3

func UnmarshalUpdateDatasetResult(p *codec.Packer) (codec.Typed, error)

func UnmarshalWithdrawValidatorStake

func UnmarshalWithdrawValidatorStake(p *codec.Packer) (chain.Action, error)

func UnmarshalWithdrawValidatorStakeResult

func UnmarshalWithdrawValidatorStakeResult(p *codec.Packer) (codec.Typed, error)

func VerifyAuthSignature

func VerifyAuthSignature(content, authSignature []byte) (codec.Address, error)

Types

type BurnAssetFT added in v0.1.2

type BurnAssetFT struct {
	// AssetAddress of the asset to burn.
	AssetAddress codec.Address `serialize:"true" json:"asset_address"`

	// Number of assets to burn
	Value uint64 `serialize:"true" json:"value"`
}

func (*BurnAssetFT) ComputeUnits added in v0.1.2

func (*BurnAssetFT) ComputeUnits(chain.Rules) uint64

func (*BurnAssetFT) Execute added in v0.1.2

func (b *BurnAssetFT) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*BurnAssetFT) GetTypeID added in v0.1.2

func (*BurnAssetFT) GetTypeID() uint8

func (*BurnAssetFT) StateKeys added in v0.1.2

func (b *BurnAssetFT) StateKeys(actor codec.Address) state.Keys

func (*BurnAssetFT) ValidRange added in v0.1.2

func (*BurnAssetFT) ValidRange(chain.Rules) (int64, int64)

type BurnAssetFTResult added in v0.1.3

type BurnAssetFTResult struct {
	OldBalance uint64 `serialize:"true" json:"old_balance"`
	NewBalance uint64 `serialize:"true" json:"new_balance"`
}

func (*BurnAssetFTResult) GetTypeID added in v0.1.3

func (*BurnAssetFTResult) GetTypeID() uint8

func (*BurnAssetFTResult) Marshal added in v0.1.3

func (r *BurnAssetFTResult) Marshal(p *codec.Packer)

func (*BurnAssetFTResult) Size added in v0.1.3

func (*BurnAssetFTResult) Size() int

type BurnAssetNFT added in v0.1.2

type BurnAssetNFT struct {
	// AssetAddress of the asset to burn(this is the nft collection address)
	AssetAddress codec.Address `serialize:"true" json:"asset_address"`

	// AssetNftAddress  of the asset to burn
	AssetNftAddress codec.Address `serialize:"true" json:"asset_nft_address"`
}

func (*BurnAssetNFT) ComputeUnits added in v0.1.2

func (*BurnAssetNFT) ComputeUnits(chain.Rules) uint64

func (*BurnAssetNFT) Execute added in v0.1.2

func (b *BurnAssetNFT) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*BurnAssetNFT) GetTypeID added in v0.1.2

func (*BurnAssetNFT) GetTypeID() uint8

func (*BurnAssetNFT) StateKeys added in v0.1.2

func (b *BurnAssetNFT) StateKeys(actor codec.Address) state.Keys

func (*BurnAssetNFT) ValidRange added in v0.1.2

func (*BurnAssetNFT) ValidRange(chain.Rules) (int64, int64)

type BurnAssetNFTResult added in v0.1.3

type BurnAssetNFTResult struct {
	OldBalance uint64 `serialize:"true" json:"old_balance"`
	NewBalance uint64 `serialize:"true" json:"new_balance"`
}

func (*BurnAssetNFTResult) GetTypeID added in v0.1.3

func (*BurnAssetNFTResult) GetTypeID() uint8

func (*BurnAssetNFTResult) Marshal added in v0.1.3

func (r *BurnAssetNFTResult) Marshal(p *codec.Packer)

func (*BurnAssetNFTResult) Size added in v0.1.3

func (*BurnAssetNFTResult) Size() int

type ClaimDelegationStakeRewards

type ClaimDelegationStakeRewards struct {
	NodeID ids.NodeID `serialize:"true" json:"node_id"` // Node ID of the validator where NAI is staked
}

func (*ClaimDelegationStakeRewards) ComputeUnits added in v0.1.1

func (*ClaimDelegationStakeRewards) Execute

func (*ClaimDelegationStakeRewards) GetTypeID

func (*ClaimDelegationStakeRewards) GetTypeID() uint8

func (*ClaimDelegationStakeRewards) Marshal

func (c *ClaimDelegationStakeRewards) Marshal(p *codec.Packer)

func (*ClaimDelegationStakeRewards) OutputsWarpMessage

func (*ClaimDelegationStakeRewards) OutputsWarpMessage() bool

func (*ClaimDelegationStakeRewards) Size

func (*ClaimDelegationStakeRewards) StateKeys

func (c *ClaimDelegationStakeRewards) StateKeys(actor codec.Address) state.Keys

func (*ClaimDelegationStakeRewards) ValidRange

type ClaimDelegationStakeRewardsResult added in v0.1.3

type ClaimDelegationStakeRewardsResult struct {
	StakeStartBlock    uint64 `serialize:"true" json:"stake_start_block"`
	StakeEndBlock      uint64 `serialize:"true" json:"stake_end_block"`
	StakedAmount       uint64 `serialize:"true" json:"staked_amount"`
	BalanceBeforeClaim uint64 `serialize:"true" json:"balance_before_claim"`
	BalanceAfterClaim  uint64 `serialize:"true" json:"balance_after_claim"`
	DistributedTo      string `serialize:"true" json:"distributed_to"`
}

func (*ClaimDelegationStakeRewardsResult) GetTypeID added in v0.1.3

func (*ClaimDelegationStakeRewardsResult) Marshal added in v0.1.3

func (*ClaimDelegationStakeRewardsResult) Size added in v0.1.3

type ClaimMarketplacePayment added in v0.1.2

type ClaimMarketplacePayment struct {
	// Marketplace asset address that represents the dataset subscription in the
	// marketplace
	MarketplaceAssetAddress codec.Address `serialize:"true" json:"marketplace_asset_address"`

	// Asset to use for the payment
	PaymentAssetAddress codec.Address `serialize:"true" json:"payment_asset_address"`
}

func (*ClaimMarketplacePayment) ComputeUnits added in v0.1.2

func (*ClaimMarketplacePayment) ComputeUnits(chain.Rules) uint64

func (*ClaimMarketplacePayment) Execute added in v0.1.2

func (c *ClaimMarketplacePayment) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*ClaimMarketplacePayment) GetTypeID added in v0.1.2

func (*ClaimMarketplacePayment) GetTypeID() uint8

func (*ClaimMarketplacePayment) StateKeys added in v0.1.2

func (c *ClaimMarketplacePayment) StateKeys(actor codec.Address) state.Keys

func (*ClaimMarketplacePayment) ValidRange added in v0.1.2

func (*ClaimMarketplacePayment) ValidRange(chain.Rules) (int64, int64)

type ClaimMarketplacePaymentResult added in v0.1.3

type ClaimMarketplacePaymentResult struct {
	LastClaimedBlock  uint64 `serialize:"true" json:"last_claimed_block"`
	PaymentClaimed    uint64 `serialize:"true" json:"payment_claimed"`
	PaymentRemaining  uint64 `serialize:"true" json:"payment_remaining"`
	DistributedReward uint64 `serialize:"true" json:"distributed_reward"`
	DistributedTo     string `serialize:"true" json:"distributed_to"`
}

func (*ClaimMarketplacePaymentResult) GetTypeID added in v0.1.3

func (*ClaimMarketplacePaymentResult) GetTypeID() uint8

func (*ClaimMarketplacePaymentResult) Marshal added in v0.1.3

func (*ClaimMarketplacePaymentResult) Size added in v0.1.3

type ClaimValidatorStakeRewards

type ClaimValidatorStakeRewards struct {
	NodeID ids.NodeID `serialize:"true" json:"node_id"` // Node ID of the validator where NAI
}

func (*ClaimValidatorStakeRewards) ComputeUnits added in v0.1.1

func (*ClaimValidatorStakeRewards) Execute

func (*ClaimValidatorStakeRewards) GetTypeID

func (*ClaimValidatorStakeRewards) GetTypeID() uint8

func (*ClaimValidatorStakeRewards) Marshal

func (c *ClaimValidatorStakeRewards) Marshal(p *codec.Packer)

func (*ClaimValidatorStakeRewards) Size

func (*ClaimValidatorStakeRewards) StateKeys

func (c *ClaimValidatorStakeRewards) StateKeys(actor codec.Address) state.Keys

func (*ClaimValidatorStakeRewards) ValidRange

type ClaimValidatorStakeRewardsResult added in v0.1.3

type ClaimValidatorStakeRewardsResult struct {
	StakeStartBlock    uint64 `serialize:"true" json:"stake_start_block"`
	StakeEndBlock      uint64 `serialize:"true" json:"stake_end_block"`
	StakedAmount       uint64 `serialize:"true" json:"staked_amount"`
	DelegationFeeRate  uint64 `serialize:"true" json:"delegation_fee_rate"`
	BalanceBeforeClaim uint64 `serialize:"true" json:"balance_before_claim"`
	BalanceAfterClaim  uint64 `serialize:"true" json:"balance_after_claim"`
	DistributedTo      string `serialize:"true" json:"distributed_to"`
}

func (*ClaimValidatorStakeRewardsResult) GetTypeID added in v0.1.3

func (*ClaimValidatorStakeRewardsResult) Marshal added in v0.1.3

func (*ClaimValidatorStakeRewardsResult) Size added in v0.1.3

type CompleteContributeDataset added in v0.1.2

type CompleteContributeDataset struct {
	// Contribution ID
	DatasetContributionID ids.ID `serialize:"true" json:"dataset_contribution_id"`

	// DatasetAddress
	DatasetAddress codec.Address `serialize:"true" json:"dataset_address"`

	// DatasetContributor
	DatasetContributor codec.Address `serialize:"true" json:"dataset_contributor"`
}

func (*CompleteContributeDataset) ComputeUnits added in v0.1.2

func (*CompleteContributeDataset) Execute added in v0.1.2

func (*CompleteContributeDataset) GetTypeID added in v0.1.2

func (*CompleteContributeDataset) GetTypeID() uint8

func (*CompleteContributeDataset) StateKeys added in v0.1.2

func (*CompleteContributeDataset) ValidRange added in v0.1.2

type CompleteContributeDatasetResult added in v0.1.3

type CompleteContributeDatasetResult struct {
	CollateralAssetAddress   string `serialize:"true" json:"collateral_asset_address"`
	CollateralAmountRefunded uint64 `serialize:"true" json:"collateral_amount_refunded"`
	DatasetChildNftAddress   string `serialize:"true" json:"dataset_child_nft_address"`
	To                       string `serialize:"true" json:"to"`
	DataLocation             string `serialize:"true" json:"data_location"`
	DataIdentifier           string `serialize:"true" json:"data_identifier"`
}

func (*CompleteContributeDatasetResult) GetTypeID added in v0.1.3

func (*CompleteContributeDatasetResult) Marshal added in v0.1.3

func (*CompleteContributeDatasetResult) Size added in v0.1.3

type ContractCall added in v0.1.3

type ContractCall struct {
	// contract is the address of the contract to be called
	ContractAddress codec.Address `serialize:"true" json:"contractAddress"`

	// Amount are transferred to [To].
	Value uint64 `serialize:"true" json:"value"`

	// Function is the name of the function to call on the contract.
	Function string `serialize:"true" json:"function"`

	// CallData are the serialized parameters to be passed to the contract.
	CallData []byte `serialize:"true" json:"calldata"`

	SpecifiedStateKeys []StateKeyPermission `serialize:"true" json:"statekeys"`

	Fuel uint64 `serialize:"true" json:"fuel"`
	// contains filtered or unexported fields
}

func (*ContractCall) ComputeUnits added in v0.1.3

func (t *ContractCall) ComputeUnits(chain.Rules) uint64

func (*ContractCall) Execute added in v0.1.3

func (t *ContractCall) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	timestamp int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*ContractCall) GetTypeID added in v0.1.3

func (*ContractCall) GetTypeID() uint8

func (*ContractCall) Marshal added in v0.1.3

func (t *ContractCall) Marshal(p *codec.Packer)

func (*ContractCall) Size added in v0.1.3

func (t *ContractCall) Size() int

func (*ContractCall) StateKeys added in v0.1.3

func (t *ContractCall) StateKeys(_ codec.Address) state.Keys

func (*ContractCall) ValidRange added in v0.1.3

func (*ContractCall) ValidRange(chain.Rules) (int64, int64)

type ContractCallResult added in v0.1.3

type ContractCallResult struct {
	Value []byte `serialize:"true" json:"value"`
}

func (*ContractCallResult) GetTypeID added in v0.1.3

func (*ContractCallResult) GetTypeID() uint8

type ContractDeploy added in v0.1.3

type ContractDeploy struct {
	ContractID   runtime.ContractID `serialize:"true" json:"contractID"`
	CreationInfo []byte             `serialize:"true" json:"creationInfo"`
	// contains filtered or unexported fields
}

func (*ContractDeploy) ComputeUnits added in v0.1.3

func (*ContractDeploy) ComputeUnits(chain.Rules) uint64

func (*ContractDeploy) Execute added in v0.1.3

func (d *ContractDeploy) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	_ codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*ContractDeploy) GetTypeID added in v0.1.3

func (*ContractDeploy) GetTypeID() uint8

func (*ContractDeploy) Marshal added in v0.1.3

func (d *ContractDeploy) Marshal(p *codec.Packer)

func (*ContractDeploy) Size added in v0.1.3

func (d *ContractDeploy) Size() int

func (*ContractDeploy) StateKeys added in v0.1.3

func (d *ContractDeploy) StateKeys(_ codec.Address) state.Keys

func (*ContractDeploy) ValidRange added in v0.1.3

func (*ContractDeploy) ValidRange(chain.Rules) (int64, int64)

type ContractDeployResult added in v0.1.3

type ContractDeployResult struct {
	Address codec.Address `serialize:"true" json:"address"`
}

func (*ContractDeployResult) GetTypeID added in v0.1.3

func (*ContractDeployResult) GetTypeID() uint8

func (*ContractDeployResult) Marshal added in v0.1.3

func (r *ContractDeployResult) Marshal(p *codec.Packer)

func (*ContractDeployResult) Size added in v0.1.3

func (*ContractDeployResult) Size() int

type ContractPublish added in v0.1.3

type ContractPublish struct {
	ContractBytes []byte `serialize:"true" json:"contractBytes"`
	// contains filtered or unexported fields
}

func (*ContractPublish) ComputeUnits added in v0.1.3

func (*ContractPublish) ComputeUnits(chain.Rules) uint64

func (*ContractPublish) Execute added in v0.1.3

func (t *ContractPublish) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	_ codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*ContractPublish) GetTypeID added in v0.1.3

func (*ContractPublish) GetTypeID() uint8

func (*ContractPublish) Marshal added in v0.1.3

func (t *ContractPublish) Marshal(p *codec.Packer)

func (*ContractPublish) Size added in v0.1.3

func (t *ContractPublish) Size() int

func (*ContractPublish) StateKeys added in v0.1.3

func (t *ContractPublish) StateKeys(_ codec.Address) state.Keys

func (*ContractPublish) ValidRange added in v0.1.3

func (*ContractPublish) ValidRange(chain.Rules) (int64, int64)

type ContractPublishResult added in v0.1.3

type ContractPublishResult struct {
	Value []byte `serialize:"true" json:"value"`
}

func (*ContractPublishResult) GetTypeID added in v0.1.3

func (*ContractPublishResult) GetTypeID() uint8

type CreateAsset

type CreateAsset struct {
	// Asset type
	AssetType uint8 `serialize:"true" json:"asset_type"`

	// The name of the asset
	Name string `serialize:"true" json:"name"`

	// The symbol of the asset
	Symbol string `serialize:"true" json:"symbol"`

	// The number of decimal places in the asset
	Decimals uint8 `serialize:"true" json:"decimals"`

	// The metadata of the asset
	Metadata string `serialize:"true" json:"metadata"`

	// The max supply of the asset
	MaxSupply uint64 `serialize:"true" json:"max_supply"`

	// The wallet address that can mint assets
	MintAdmin codec.Address `serialize:"true" json:"mint_admin"`

	// The wallet address that can pause/unpause assets
	PauseUnpauseAdmin codec.Address `serialize:"true" json:"pause_unpause_admin"`

	// The wallet address that can freeze/unfreeze assets
	FreezeUnfreezeAdmin codec.Address `serialize:"true" json:"freeze_unfreeze_admin"`

	// The wallet address that can enable/disable KYC account flag
	EnableDisableKYCAccountAdmin codec.Address `serialize:"true" json:"enable_disable_kyc_account_admin"`
}

func (*CreateAsset) ComputeUnits added in v0.1.1

func (*CreateAsset) ComputeUnits(chain.Rules) uint64

func (*CreateAsset) Execute

func (c *CreateAsset) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*CreateAsset) GetTypeID

func (*CreateAsset) GetTypeID() uint8

func (*CreateAsset) StateKeys

func (c *CreateAsset) StateKeys(actor codec.Address) state.Keys

func (*CreateAsset) ValidRange

func (*CreateAsset) ValidRange(chain.Rules) (int64, int64)

type CreateAssetResult added in v0.1.3

type CreateAssetResult struct {
	AssetAddress            string `serialize:"true" json:"asset_id"`
	AssetBalance            uint64 `serialize:"true" json:"asset_balance"`
	DatasetParentNftAddress string `serialize:"true" json:"nft_id"`
}

func (*CreateAssetResult) GetTypeID added in v0.1.3

func (*CreateAssetResult) GetTypeID() uint8

func (*CreateAssetResult) Marshal added in v0.1.3

func (r *CreateAssetResult) Marshal(p *codec.Packer)

func (*CreateAssetResult) Size added in v0.1.3

func (r *CreateAssetResult) Size() int

type CreateDataset added in v0.1.2

type CreateDataset struct {
	// Asset id if it was already created
	AssetAddress codec.Address `serialize:"true" json:"asset_address"`

	// The title of the dataset
	Name string `serialize:"true" json:"name"`

	// The description of the dataset
	Description string `serialize:"true" json:"description"`

	// The categories of the dataset
	Categories string `serialize:"true" json:"categories"`

	// License of the dataset
	LicenseName   string `serialize:"true" json:"license_name"`
	LicenseSymbol string `serialize:"true" json:"license_symbol"`
	LicenseURL    string `serialize:"true" json:"license_url"`

	// Metadata of the dataset
	Metadata string `serialize:"true" json:"metadata"`

	// False for sole contributor and true for open contribution
	IsCommunityDataset bool `serialize:"true" json:"is_community_dataset"`
}

func (*CreateDataset) ComputeUnits added in v0.1.2

func (*CreateDataset) ComputeUnits(chain.Rules) uint64

func (*CreateDataset) Execute added in v0.1.2

func (c *CreateDataset) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*CreateDataset) GetTypeID added in v0.1.2

func (*CreateDataset) GetTypeID() uint8

func (*CreateDataset) StateKeys added in v0.1.2

func (c *CreateDataset) StateKeys(actor codec.Address) state.Keys

func (*CreateDataset) ValidRange added in v0.1.2

func (*CreateDataset) ValidRange(chain.Rules) (int64, int64)

type CreateDatasetResult added in v0.1.3

type CreateDatasetResult struct {
	DatasetAddress          string `serialize:"true" json:"dataset_address"`
	DatasetParentNftAddress string `serialize:"true" json:"dataset_parent_nft_address"`
}

func (*CreateDatasetResult) GetTypeID added in v0.1.3

func (*CreateDatasetResult) GetTypeID() uint8

func (*CreateDatasetResult) Marshal added in v0.1.3

func (r *CreateDatasetResult) Marshal(p *codec.Packer)

func (*CreateDatasetResult) Size added in v0.1.3

func (r *CreateDatasetResult) Size() int

type DelegateUserStake

type DelegateUserStake struct {
	NodeID          ids.NodeID `serialize:"true" json:"node_id"`           // Node ID of the validator to stake to
	StakeStartBlock uint64     `serialize:"true" json:"stake_start_block"` // Block height at which the stake should be made
	StakeEndBlock   uint64     `serialize:"true" json:"stake_end_block"`   // Block height at which the stake should end
	StakedAmount    uint64     `serialize:"true" json:"staked_amount"`     // Amount of NAI staked
}

func (*DelegateUserStake) ComputeUnits added in v0.1.1

func (*DelegateUserStake) ComputeUnits(chain.Rules) uint64

func (*DelegateUserStake) Execute

func (s *DelegateUserStake) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*DelegateUserStake) GetTypeID

func (*DelegateUserStake) GetTypeID() uint8

func (*DelegateUserStake) Marshal

func (s *DelegateUserStake) Marshal(p *codec.Packer)

func (*DelegateUserStake) Size

func (*DelegateUserStake) Size() int

func (*DelegateUserStake) StateKeys

func (s *DelegateUserStake) StateKeys(actor codec.Address) state.Keys

func (*DelegateUserStake) ValidRange

func (*DelegateUserStake) ValidRange(chain.Rules) (int64, int64)

type DelegateUserStakeResult added in v0.1.3

type DelegateUserStakeResult struct {
	StakedAmount       uint64 `serialize:"true" json:"staked_amount"`
	BalanceBeforeStake uint64 `serialize:"true" json:"balance_before_stake"`
	BalanceAfterStake  uint64 `serialize:"true" json:"balance_after_stake"`
}

func (*DelegateUserStakeResult) GetTypeID added in v0.1.3

func (*DelegateUserStakeResult) GetTypeID() uint8

func (*DelegateUserStakeResult) Marshal added in v0.1.3

func (r *DelegateUserStakeResult) Marshal(p *codec.Packer)

func (*DelegateUserStakeResult) Size added in v0.1.3

func (*DelegateUserStakeResult) Size() int

type InitiateContributeDataset added in v0.1.2

type InitiateContributeDataset struct {
	// DatasetAddress
	DatasetAddress codec.Address `serialize:"true" json:"dataset_address"`

	// Data location(default, S3, Filecoin, etc.)
	DataLocation string `serialize:"true" json:"data_location"`

	// Data Identifier(id/hash/URL)
	DataIdentifier string `serialize:"true" json:"data_identifier"`
}

func (*InitiateContributeDataset) ComputeUnits added in v0.1.2

func (*InitiateContributeDataset) Execute added in v0.1.2

func (*InitiateContributeDataset) GetTypeID added in v0.1.2

func (*InitiateContributeDataset) GetTypeID() uint8

func (*InitiateContributeDataset) StateKeys added in v0.1.2

func (d *InitiateContributeDataset) StateKeys(actor codec.Address) state.Keys

func (*InitiateContributeDataset) ValidRange added in v0.1.2

type InitiateContributeDatasetResult added in v0.1.3

type InitiateContributeDatasetResult struct {
	DatasetContributionID  string `serialize:"true" json:"dataset_contribution_id"`
	CollateralAssetAddress string `serialize:"true" json:"collateral_asset_address"`
	CollateralAmountTaken  uint64 `serialize:"true" json:"collateral_amount_taken"`
}

func (*InitiateContributeDatasetResult) GetTypeID added in v0.1.3

func (*InitiateContributeDatasetResult) Marshal added in v0.1.3

func (*InitiateContributeDatasetResult) Size added in v0.1.3

type MintAssetFT added in v0.1.2

type MintAssetFT struct {
	// AssetAddress is the AssetAddress of the asset to mint.
	AssetAddress codec.Address `serialize:"true" json:"asset_address"`

	// Number of assets to mint to [To].
	Value uint64 `serialize:"true" json:"value"`

	// To is the recipient of the [Value].
	To codec.Address `serialize:"true" json:"to"`
}

func (*MintAssetFT) ComputeUnits added in v0.1.2

func (*MintAssetFT) ComputeUnits(chain.Rules) uint64

func (*MintAssetFT) Execute added in v0.1.2

func (m *MintAssetFT) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*MintAssetFT) GetTypeID added in v0.1.2

func (*MintAssetFT) GetTypeID() uint8

func (*MintAssetFT) StateKeys added in v0.1.2

func (m *MintAssetFT) StateKeys(codec.Address) state.Keys

func (*MintAssetFT) ValidRange added in v0.1.2

func (*MintAssetFT) ValidRange(chain.Rules) (int64, int64)

type MintAssetFTResult added in v0.1.3

type MintAssetFTResult struct {
	OldBalance uint64 `serialize:"true" json:"old_balance"`
	NewBalance uint64 `serialize:"true" json:"new_balance"`
}

func (*MintAssetFTResult) GetTypeID added in v0.1.3

func (*MintAssetFTResult) GetTypeID() uint8

func (*MintAssetFTResult) Marshal added in v0.1.3

func (r *MintAssetFTResult) Marshal(p *codec.Packer)

func (*MintAssetFTResult) Size added in v0.1.3

func (*MintAssetFTResult) Size() int

type MintAssetNFT added in v0.1.2

type MintAssetNFT struct {
	// AssetAddress is the AssetAddress(NFT Collection ID) of the asset to mint.
	AssetAddress codec.Address `serialize:"true" json:"asset_address"`

	// Metadata of the NFT
	Metadata string `serialize:"true" json:"metadata"`

	// To is the recipient of the [Value].
	To codec.Address `serialize:"true" json:"to"`
}

func (*MintAssetNFT) ComputeUnits added in v0.1.2

func (*MintAssetNFT) ComputeUnits(chain.Rules) uint64

func (*MintAssetNFT) Execute added in v0.1.2

func (m *MintAssetNFT) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*MintAssetNFT) GetTypeID added in v0.1.2

func (*MintAssetNFT) GetTypeID() uint8

func (*MintAssetNFT) StateKeys added in v0.1.2

func (m *MintAssetNFT) StateKeys(codec.Address) state.Keys

func (*MintAssetNFT) ValidRange added in v0.1.2

func (*MintAssetNFT) ValidRange(chain.Rules) (int64, int64)

type MintAssetNFTResult added in v0.1.3

type MintAssetNFTResult struct {
	AssetNftAddress string `serialize:"true" json:"asset_nft_address"`
	OldBalance      uint64 `serialize:"true" json:"old_balance"`
	NewBalance      uint64 `serialize:"true" json:"new_balance"`
}

func (*MintAssetNFTResult) GetTypeID added in v0.1.3

func (*MintAssetNFTResult) GetTypeID() uint8

func (*MintAssetNFTResult) Marshal added in v0.1.3

func (r *MintAssetNFTResult) Marshal(p *codec.Packer)

func (*MintAssetNFTResult) Size added in v0.1.3

func (r *MintAssetNFTResult) Size() int

type PublishDatasetMarketplace added in v0.1.2

type PublishDatasetMarketplace struct {
	// DatasetAddress
	DatasetAddress codec.Address `serialize:"true" json:"dataset_address"`

	// This is the asset to use for calculating the price for one block
	PaymentAssetAddress codec.Address `serialize:"true" json:"payment_asset_address"`

	// This is the base price in the `baseAsset` amount for one block
	// For example, if the base price is 1 and the base asset is NAI,
	// then the price for one block is 1 NAI
	// If 0 is passed, the dataset is free to use
	DatasetPricePerBlock uint64 `serialize:"true" json:"dataset_price_per_block"`
}

func (*PublishDatasetMarketplace) ComputeUnits added in v0.1.2

func (*PublishDatasetMarketplace) Execute added in v0.1.2

func (*PublishDatasetMarketplace) GetTypeID added in v0.1.2

func (*PublishDatasetMarketplace) GetTypeID() uint8

func (*PublishDatasetMarketplace) StateKeys added in v0.1.2

func (*PublishDatasetMarketplace) ValidRange added in v0.1.2

type PublishDatasetMarketplaceResult added in v0.1.3

type PublishDatasetMarketplaceResult struct {
	MarketplaceAssetAddress string `serialize:"true" json:"marketplace_asset_address"`
	PaymentAssetAddress     string `serialize:"true" json:"payment_asset_address"`
	Publisher               string `serialize:"true" json:"publisher"`
	DatasetPricePerBlock    uint64 `serialize:"true" json:"dataset_price_per_block"`
}

func (*PublishDatasetMarketplaceResult) GetTypeID added in v0.1.3

func (*PublishDatasetMarketplaceResult) Marshal added in v0.1.3

func (*PublishDatasetMarketplaceResult) Size added in v0.1.3

type RegisterValidatorStake

type RegisterValidatorStake struct {
	NodeID        ids.NodeID `serialize:"true" json:"node_id"`        // Node ID of the validator
	StakeInfo     []byte     `serialize:"true" json:"stake_info"`     // StakeInfo of the validator
	AuthSignature []byte     `serialize:"true" json:"auth_signature"` // Auth BLS signature of the validator
}

func (*RegisterValidatorStake) ComputeUnits added in v0.1.1

func (*RegisterValidatorStake) ComputeUnits(chain.Rules) uint64

func (*RegisterValidatorStake) Execute

func (r *RegisterValidatorStake) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*RegisterValidatorStake) GetTypeID

func (*RegisterValidatorStake) GetTypeID() uint8

func (*RegisterValidatorStake) Marshal

func (r *RegisterValidatorStake) Marshal(p *codec.Packer)

func (*RegisterValidatorStake) Size

func (*RegisterValidatorStake) Size() int

func (*RegisterValidatorStake) StateKeys

func (r *RegisterValidatorStake) StateKeys(actor codec.Address) state.Keys

func (*RegisterValidatorStake) ValidRange

func (*RegisterValidatorStake) ValidRange(chain.Rules) (int64, int64)

type RegisterValidatorStakeResult added in v0.1.3

type RegisterValidatorStakeResult struct {
	NodeID            string `serialize:"true" json:"node_id"`
	StakeStartBlock   uint64 `serialize:"true" json:"stake_start_block"`
	StakeEndBlock     uint64 `serialize:"true" json:"stake_end_block"`
	StakedAmount      uint64 `serialize:"true" json:"staked_amount"`
	DelegationFeeRate uint64 `serialize:"true" json:"delegation_fee_rate"`
	RewardAddress     string `serialize:"true" json:"reward_address"`
}

func (*RegisterValidatorStakeResult) GetTypeID added in v0.1.3

func (*RegisterValidatorStakeResult) GetTypeID() uint8

func (*RegisterValidatorStakeResult) Marshal added in v0.1.3

func (r *RegisterValidatorStakeResult) Marshal(p *codec.Packer)

func (*RegisterValidatorStakeResult) Size added in v0.1.3

type StateKeyPermission added in v0.1.3

type StateKeyPermission struct {
	Key        string
	Permission state.Permissions
}

type SubscribeDatasetMarketplace added in v0.1.2

type SubscribeDatasetMarketplace struct {
	// Marketplace asset address that represents the dataset subscription in the
	// marketplace
	MarketplaceAssetAddress codec.Address `serialize:"true" json:"marketplace_asset_address"`

	// Asset to use for the subscription
	PaymentAssetAddress codec.Address `serialize:"true" json:"payment_asset_address"`

	// Total amount of blocks to subscribe to
	NumBlocksToSubscribe uint64 `serialize:"true" json:"num_blocks_to_subscribe"`
}

func (*SubscribeDatasetMarketplace) ComputeUnits added in v0.1.2

func (*SubscribeDatasetMarketplace) Execute added in v0.1.2

func (*SubscribeDatasetMarketplace) GetTypeID added in v0.1.2

func (*SubscribeDatasetMarketplace) GetTypeID() uint8

func (*SubscribeDatasetMarketplace) StateKeys added in v0.1.2

func (d *SubscribeDatasetMarketplace) StateKeys(actor codec.Address) state.Keys

func (*SubscribeDatasetMarketplace) ValidRange added in v0.1.2

type SubscribeDatasetMarketplaceResult added in v0.1.3

type SubscribeDatasetMarketplaceResult struct {
	MarketplaceAssetAddress          string `serialize:"true" json:"marketplace_asset_address"`
	MarketplaceAssetNumSubscriptions uint64 `serialize:"true" json:"marketplace_asset_num_subscriptions"`
	SubscriptionNftAddress           string `serialize:"true" json:"subscription_nft_address"`
	PaymentAssetAddress              string `serialize:"true" json:"payment_asset_address"`
	DatasetPricePerBlock             uint64 `serialize:"true" json:"dataset_price_per_block"`
	TotalCost                        uint64 `serialize:"true" json:"total_cost"`
	NumBlocksToSubscribe             uint64 `serialize:"true" json:"num_blocks_to_subscribe"`
	IssuanceBlock                    uint64 `serialize:"true" json:"issuance_block"`
	ExpirationBlock                  uint64 `serialize:"true" json:"expiration_block"`
}

func (*SubscribeDatasetMarketplaceResult) GetTypeID added in v0.1.3

func (*SubscribeDatasetMarketplaceResult) Marshal added in v0.1.3

func (*SubscribeDatasetMarketplaceResult) Size added in v0.1.3

type Transfer

type Transfer struct {
	// To is the recipient of the [Value].
	To codec.Address `serialize:"true" json:"to"`

	// AssetAddress to transfer.
	AssetAddress codec.Address `serialize:"true" json:"asset_address"`

	// Amount are transferred to [To].
	Value uint64 `serialize:"true" json:"value"`

	// Optional message to accompany transaction.
	Memo string `serialize:"true" json:"memo"`
}

func (*Transfer) ComputeUnits added in v0.1.1

func (*Transfer) ComputeUnits(chain.Rules) uint64

func (*Transfer) Execute

func (t *Transfer) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*Transfer) GetTypeID

func (*Transfer) GetTypeID() uint8

func (*Transfer) StateKeys

func (t *Transfer) StateKeys(actor codec.Address) state.Keys

func (*Transfer) ValidRange

func (*Transfer) ValidRange(chain.Rules) (int64, int64)

type TransferResult added in v0.1.3

type TransferResult struct {
	SenderBalance   uint64 `serialize:"true" json:"sender_balance"`
	ReceiverBalance uint64 `serialize:"true" json:"receiver_balance"`
}

func (*TransferResult) GetTypeID added in v0.1.3

func (*TransferResult) GetTypeID() uint8

func (*TransferResult) Marshal added in v0.1.3

func (r *TransferResult) Marshal(p *codec.Packer)

func (*TransferResult) Size added in v0.1.3

func (*TransferResult) Size() int

type UndelegateUserStake

type UndelegateUserStake struct {
	NodeID ids.NodeID `serialize:"true" json:"node_id"` // Node ID of the validator where NAI is staked
}

func (*UndelegateUserStake) ComputeUnits added in v0.1.1

func (*UndelegateUserStake) ComputeUnits(chain.Rules) uint64

func (*UndelegateUserStake) Execute

func (u *UndelegateUserStake) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*UndelegateUserStake) GetTypeID

func (*UndelegateUserStake) GetTypeID() uint8

func (*UndelegateUserStake) Marshal

func (u *UndelegateUserStake) Marshal(p *codec.Packer)

func (*UndelegateUserStake) Size

func (*UndelegateUserStake) Size() int

func (*UndelegateUserStake) StateKeys

func (u *UndelegateUserStake) StateKeys(actor codec.Address) state.Keys

func (*UndelegateUserStake) ValidRange

func (*UndelegateUserStake) ValidRange(chain.Rules) (int64, int64)

type UndelegateUserStakeResult

type UndelegateUserStakeResult struct {
	StakeStartBlock      uint64 `serialize:"true" json:"stake_start_block"`
	StakeEndBlock        uint64 `serialize:"true" json:"stake_end_block"`
	UnstakedAmount       uint64 `serialize:"true" json:"unstaked_amount"`
	RewardAmount         uint64 `serialize:"true" json:"reward_amount"`
	BalanceBeforeUnstake uint64 `serialize:"true" json:"balance_before_unstake"`
	BalanceAfterUnstake  uint64 `serialize:"true" json:"balance_after_unstake"`
	DistributedTo        string `serialize:"true" json:"distributed_to"`
}

func (*UndelegateUserStakeResult) GetTypeID added in v0.1.3

func (*UndelegateUserStakeResult) GetTypeID() uint8

func (*UndelegateUserStakeResult) Marshal

func (r *UndelegateUserStakeResult) Marshal(p *codec.Packer)

func (*UndelegateUserStakeResult) Size added in v0.1.3

func (r *UndelegateUserStakeResult) Size() int

type UpdateAsset added in v0.1.2

type UpdateAsset struct {
	// AssetAddress to update
	AssetAddress codec.Address `serialize:"true" json:"asset_address"`

	// The name of the asset
	Name string `serialize:"true" json:"name"`

	// The symbol of the asset
	Symbol string `serialize:"true" json:"symbol"`

	// The metadata of the asset
	Metadata string `serialize:"true" json:"metadata"`

	// The max supply of the asset
	MaxSupply uint64 `serialize:"true" json:"max_supply"`

	// Owner of the asset
	Owner string `serialize:"true" json:"owner"`

	// The wallet address that can mint/burn assets
	MintAdmin string `serialize:"true" json:"mint_admin"`

	// The wallet address that can pause/unpause assets
	PauseUnpauseAdmin string `serialize:"true" json:"pause_unpause_admin"`

	// The wallet address that can freeze/unfreeze assets
	FreezeUnfreezeAdmin string `serialize:"true" json:"freeze_unfreeze_admin"`

	// The wallet address that can enable/disable KYC account flag
	EnableDisableKYCAccountAdmin string `serialize:"true" json:"enable_disable_kyc_account_admin"`
}

func (*UpdateAsset) ComputeUnits added in v0.1.2

func (*UpdateAsset) ComputeUnits(chain.Rules) uint64

func (*UpdateAsset) Execute added in v0.1.2

func (u *UpdateAsset) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*UpdateAsset) GetTypeID added in v0.1.2

func (*UpdateAsset) GetTypeID() uint8

func (*UpdateAsset) StateKeys added in v0.1.2

func (u *UpdateAsset) StateKeys(_ codec.Address) state.Keys

func (*UpdateAsset) ValidRange added in v0.1.2

func (*UpdateAsset) ValidRange(chain.Rules) (int64, int64)

type UpdateAssetResult added in v0.1.3

type UpdateAssetResult struct {
	Name                         string `serialize:"true" json:"name"`
	Symbol                       string `serialize:"true" json:"symbol"`
	Metadata                     string `serialize:"true" json:"metadata"`
	MaxSupply                    uint64 `serialize:"true" json:"max_supply"`
	Owner                        string `serialize:"true" json:"owner"`
	MintAdmin                    string `serialize:"true" json:"mint_admin"`
	PauseUnpauseAdmin            string `serialize:"true" json:"pause_unpause_admin"`
	FreezeUnfreezeAdmin          string `serialize:"true" json:"freeze_unfreeze_admin"`
	EnableDisableKYCAccountAdmin string `serialize:"true" json:"enable_disable_kyc_account_admin"`
}

func (*UpdateAssetResult) GetTypeID added in v0.1.3

func (*UpdateAssetResult) GetTypeID() uint8

func (*UpdateAssetResult) Marshal added in v0.1.3

func (r *UpdateAssetResult) Marshal(p *codec.Packer)

func (*UpdateAssetResult) Size added in v0.1.3

func (r *UpdateAssetResult) Size() int

type UpdateDataset added in v0.1.2

type UpdateDataset struct {
	// DatasetAddress to update
	DatasetAddress codec.Address `serialize:"true" json:"dataset_address"`

	// The title of the dataset
	Name string `serialize:"true" json:"name"`

	// The description of the dataset
	Description string `serialize:"true" json:"description"`

	// The categories of the dataset
	Categories string `serialize:"true" json:"categories"`

	// License of the dataset
	LicenseName   string `serialize:"true" json:"license_name"`
	LicenseSymbol string `serialize:"true" json:"license_symbol"`
	LicenseURL    string `serialize:"true" json:"license_url"`

	// False for sole contributor and true for open contribution
	IsCommunityDataset bool `serialize:"true" json:"is_community_dataset"`
}

func (*UpdateDataset) ComputeUnits added in v0.1.2

func (*UpdateDataset) ComputeUnits(chain.Rules) uint64

func (*UpdateDataset) Execute added in v0.1.2

func (u *UpdateDataset) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*UpdateDataset) GetTypeID added in v0.1.2

func (*UpdateDataset) GetTypeID() uint8

func (*UpdateDataset) StateKeys added in v0.1.2

func (u *UpdateDataset) StateKeys(codec.Address) state.Keys

func (*UpdateDataset) ValidRange added in v0.1.2

func (*UpdateDataset) ValidRange(chain.Rules) (int64, int64)

type UpdateDatasetResult added in v0.1.3

type UpdateDatasetResult struct {
	Name               string `serialize:"true" json:"name"`
	Description        string `serialize:"true" json:"description"`
	Categories         string `serialize:"true" json:"categories"`
	LicenseName        string `serialize:"true" json:"license_name"`
	LicenseSymbol      string `serialize:"true" json:"license_symbol"`
	LicenseURL         string `serialize:"true" json:"license_url"`
	IsCommunityDataset bool   `serialize:"true" json:"is_community_dataset"`
}

func (*UpdateDatasetResult) GetTypeID added in v0.1.3

func (*UpdateDatasetResult) GetTypeID() uint8

func (*UpdateDatasetResult) Marshal added in v0.1.3

func (r *UpdateDatasetResult) Marshal(p *codec.Packer)

func (*UpdateDatasetResult) Size added in v0.1.3

func (r *UpdateDatasetResult) Size() int

type ValidatorStakeInfo

type ValidatorStakeInfo struct {
	NodeID            ids.NodeID    `serialize:"true" json:"node_id"`
	StakeStartBlock   uint64        `serialize:"true" json:"stake_start_block"`
	StakeEndBlock     uint64        `serialize:"true" json:"stake_end_block"`
	StakedAmount      uint64        `serialize:"true" json:"staked_amount"`
	DelegationFeeRate uint64        `serialize:"true" json:"delegation_fee_rate"`
	RewardAddress     codec.Address `serialize:"true" json:"reward_address"`
}

func UnmarshalValidatorStakeInfo

func UnmarshalValidatorStakeInfo(p *codec.Packer) (*ValidatorStakeInfo, error)

func (*ValidatorStakeInfo) Marshal

func (r *ValidatorStakeInfo) Marshal(p *codec.Packer)

func (*ValidatorStakeInfo) Size added in v0.1.3

func (*ValidatorStakeInfo) Size() int

type WithdrawValidatorStake

type WithdrawValidatorStake struct {
	NodeID ids.NodeID `serialize:"true" json:"node_id"` // Node ID of the validator
}

func (*WithdrawValidatorStake) ComputeUnits added in v0.1.1

func (*WithdrawValidatorStake) ComputeUnits(chain.Rules) uint64

func (*WithdrawValidatorStake) Execute

func (u *WithdrawValidatorStake) Execute(
	ctx context.Context,
	_ chain.Rules,
	mu state.Mutable,
	_ int64,
	actor codec.Address,
	_ ids.ID,
) (codec.Typed, error)

func (*WithdrawValidatorStake) GetTypeID

func (*WithdrawValidatorStake) GetTypeID() uint8

func (*WithdrawValidatorStake) Marshal

func (u *WithdrawValidatorStake) Marshal(p *codec.Packer)

func (*WithdrawValidatorStake) Size

func (*WithdrawValidatorStake) Size() int

func (*WithdrawValidatorStake) StateKeys

func (u *WithdrawValidatorStake) StateKeys(actor codec.Address) state.Keys

func (*WithdrawValidatorStake) ValidRange

func (*WithdrawValidatorStake) ValidRange(chain.Rules) (int64, int64)

type WithdrawValidatorStakeResult added in v0.1.3

type WithdrawValidatorStakeResult struct {
	StakeStartBlock      uint64 `serialize:"true" json:"stake_start_block"`
	StakeEndBlock        uint64 `serialize:"true" json:"stake_end_block"`
	UnstakedAmount       uint64 `serialize:"true" json:"unstaked_amount"`
	DelegationFeeRate    uint64 `serialize:"true" json:"delegation_fee_rate"`
	RewardAmount         uint64 `serialize:"true" json:"reward_amount"`
	BalanceBeforeUnstake uint64 `serialize:"true" json:"balance_before_unstake"`
	BalanceAfterUnstake  uint64 `serialize:"true" json:"balance_after_unstake"`
	DistributedTo        string `serialize:"true" json:"distributed_to"`
}

func (*WithdrawValidatorStakeResult) GetTypeID added in v0.1.3

func (*WithdrawValidatorStakeResult) GetTypeID() uint8

func (*WithdrawValidatorStakeResult) Marshal added in v0.1.3

func (r *WithdrawValidatorStakeResult) Marshal(p *codec.Packer)

func (*WithdrawValidatorStakeResult) Size added in v0.1.3

Jump to

Keyboard shortcuts

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