base

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractTransaction

type AbstractTransaction struct {
	TimeStamp int64    `json:"timeStamp,omitempty"`
	Amount    float64  `json:"amount,omitempty"`
	Fee       float64  `json:"fee,omitempty"`
	Recipient string   `json:"recipient,omitempty"`
	Type      int      `json:"type,omitempty"`
	Deadline  int64    `json:"deadline,omitempty"`
	Message   *Message `json:"message,omitempty"`
	Version   int      `json:"version,omitempty"`
	Signer    string   `json:"signer,omitempty"`
}

type Chain

type Chain struct {
	ID, Prefix int
	Char       string
}

Chain is the type of NEM chain.

type Common

type Common struct {
	Password, PrivateKey string
	IsHW                 bool
}

type CommonTransaction

type CommonTransaction struct {
	Type      int
	Version   int
	Signer    string
	TimeStamp *int64
	Fee       float64
	Deadline  *int64
}

func (*CommonTransaction) String

func (c *CommonTransaction) String() string

type ConsModif

type ConsModif struct {
	ModificationType   int
	CosignatoryAccount string
}

type Data

type Data struct {
	Testnet, Mainnet, Mijin Chain
}

type Error

type Error struct {
	TimeStamp int64
	Error     string
	Message   string
	Status    int
}

type ImportanceTransfer

type ImportanceTransfer struct {
	RemoteAccount   string `json:"remoteAccount"`
	Mode            int    `json:"mode"`
	IsMultisig      bool   `json:"isMultisig"`
	MultisigAccount string `json:"multisigAccount"`
}

type Levy

type Levy struct {
	Type      int      `json:"type,omitempty"`
	Recipient string   `json:"recipient,omitempty"`
	MosaicID  MosaicID `json:"mosaicId,omitempty"`
	Fee       float64  `json:"fee,omitempty"`
}

type Message

type Message struct {
	Type      int    `json:"type,omitempty"`
	Payload   string `json:"payload,omitempty"`
	PublicKey string `json:"publicKey,omitempty"`
}

type MessageType

type MessageType struct {
	Value int
	Name  string
}

type Mosaic

type Mosaic struct {
	MosaicID MosaicID `json:"mosaicID,omitempty"`
	Quantity float64  `json:"quantity,omitempty"`
}

A mosaic describes an instance of a mosaic definition. Mosaics can be transferred by means of a transfer transaction.

type MosaicDefinition

type MosaicDefinition struct {
	Creator     string       `json:"creator"`
	Description string       `json:"description"`
	ID          MosaicID     `json:"id,omitempty"`
	Properties  []Properties `json:"properties"`
	Levy        Levy         `json:"levy,omitempty"`
}

A mosaic definition describes an asset class. Some fields are mandatory while others are optional. The properties of a mosaic definition always have a default value and only need to be supplied if they differ from the default value.

type MosaicDefinitionCreationTransaction

type MosaicDefinitionCreationTransaction struct {
	CommonTransaction
	CreationFee      float64          `json:"creationFee"`
	CreationFeeSink  string           `json:"creationFeeSink"`
	MosaicDefinition MosaicDefinition `json:"mosaicDefinition"`
}

Before a mosaic can be created or transferred, a corresponding definition of the mosaic has to be created and published to the network. This is done via a mosaic definition creation transaction.

func (*MosaicDefinitionCreationTransaction) GetCommon

func (*MosaicDefinitionCreationTransaction) GetMosaic

func (*MosaicDefinitionCreationTransaction) GetMosaicId

func (*MosaicDefinitionCreationTransaction) GetMosaicTx

func (*MosaicDefinitionCreationTransaction) GetTx

func (*MosaicDefinitionCreationTransaction) GetType

func (*MosaicDefinitionCreationTransaction) String

type MosaicID

type MosaicID struct {
	NamespaceID string `json:"namespaceId,omitempty"`
	Name        string `json:"name,omitempty"`
}

func (MosaicID) String

func (m MosaicID) String() string

type MosaicsData

type MosaicsData struct {
	Quantity int      `json:"quantity"`
	MosaicID MosaicID `json:"mosaicId"`
}

func (*MosaicsData) String

func (m *MosaicsData) String() string

type MultiSignSignatureTransaction added in v0.0.3

type MultiSignSignatureTransaction struct {
	TimeStamp int64  `json:"timeStamp"`
	Fee       int    `json:"fee"`
	Type      int    `json:"type"`
	Deadline  int64  `json:"deadline"`
	Version   int    `json:"version"`
	Signer    string `json:"signer"`
	OtherHash struct {
		Data string `json:"data"`
	} `json:"otherHash"`
	OtherAccount string `json:"otherAccount"`
}

type MultiSignTransaction added in v0.0.3

type MultiSignTransaction struct {
	CommonTransaction
	OtherTrans interface{}                     `json:"otherTrans"`
	Signatures []MultiSignSignatureTransaction `json:"signatures,omitempty"`
}

func (*MultiSignTransaction) GetCommon added in v0.0.3

func (t *MultiSignTransaction) GetCommon() *CommonTransaction

func (*MultiSignTransaction) GetType added in v0.0.3

func (t *MultiSignTransaction) GetType() int

func (*MultiSignTransaction) String added in v0.0.3

func (t *MultiSignTransaction) String() string

type MultisigAggregateModific

type MultisigAggregateModific struct {
	Modifications   []interface{} `json:"modifications"`
	RelativeChange  interface{}   `json:"relativeChange"`
	IsMultisig      bool          `json:"isMultisig"`
	MultisigAccount string        `json:"multisigAccount"`
}

type Node

type Node struct {
	Host string
	Port int
}

type Properties

type Properties struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ProvisionNamespaceTransaction

type ProvisionNamespaceTransaction struct {
	CommonTransaction
	RentalFeeSink string  `json:"rentalFeeSink"`
	RentalFee     float64 `json:"rentalFee"`
	NewPart       string  `json:"newPart"`
	Parent        string  `json:"parent"`
}

func (*ProvisionNamespaceTransaction) GetCommon

func (*ProvisionNamespaceTransaction) GetTx

func (*ProvisionNamespaceTransaction) GetType

func (t *ProvisionNamespaceTransaction) GetType() int

func (*ProvisionNamespaceTransaction) String

type SignatureT

type SignatureT struct {
	OtherHash struct {
		Data string
	}
	OtherAccount string
}

type Supply

type Supply struct {
	Mosaic          string `json:"mosaic"`
	SupplyType      int    `json:"supplyType"`
	Delta           int    `json:"delta"`
	IsMultisig      bool   `json:"isMultisig"`
	MultisigAccount string `json:"multisigAccount"`
}

type Transaction

type Transaction interface {
	GetType() int
	GetCommon() *CommonTransaction
	String() string
}

type TransactionMosaic

type TransactionMosaic struct {
	AbstractTransaction
	Signature string        `json:"signature"`
	Mosaics   []MosaicsData `json:"mosaics"`
}

func (*TransactionMosaic) GetCommon

func (t *TransactionMosaic) GetCommon() *CommonTransaction

func (*TransactionMosaic) GetType

func (t *TransactionMosaic) GetType() int

func (*TransactionMosaic) String

func (t *TransactionMosaic) String() string

type TransactionResponse added in v0.0.3

type TransactionResponse struct {
	TimeStamp  int64                           `json:"timeStamp"`
	Amount     float64                         `json:"amount"`
	Fee        float64                         `json:"fee"`
	Recipient  string                          `json:"recipient,omitempty"`
	Type       int                             `json:"type,omitempty"`
	Deadline   int64                           `json:"deadline"`
	Message    *Message                        `json:"message,omitempty"`
	Version    int                             `json:"version,omitempty"`
	Signer     string                          `json:"signer,omitempty"`
	OtherTrans Transaction                     `json:"otherTrans,omitempty"`
	Signatures []MultiSignSignatureTransaction `json:"signatures,omitempty"`
}

type TransferTransaction

type TransferTransaction struct {
	CommonTransaction
	Amount    float64  `json:"amount,omitempty"`
	Recipient string   `json:"recipient,omitempty"`
	Message   Message  `json:"message,omitempty"`
	Signature string   `json:"signature,omitempty"`
	Mosaics   []Mosaic `json:"mosaics,omitempty"`
}

func (*TransferTransaction) GetCommon

func (t *TransferTransaction) GetCommon() *CommonTransaction

func (*TransferTransaction) GetTx

func (t *TransferTransaction) GetTx() Transaction

func (*TransferTransaction) GetType

func (t *TransferTransaction) GetType() int

func (*TransferTransaction) String

func (t *TransferTransaction) String() string

type Tx

type Tx interface {
	GetTx() Transaction
}

Jump to

Keyboard shortcuts

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