base

package
v0.0.0-...-6653c62 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: MIT Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

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 {
	TimeStamp        int64            `json:"timeStamp"`
	Fee              float64          `json:"fee"`
	Type             int              `json:"type"`
	Deadline         int64            `json:"deadline"`
	Version          int              `json:"version"`
	Signer           string           `json:"signer"`
	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

type MosaicID

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

type MultisigAggregateModific

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

type MultisigSignatureTransaction

type MultisigSignatureTransaction 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 MultisigTransaction

type MultisigTransaction struct {
	TimeStamp  int64                          `json:"timeStamp"`
	Fee        float64                        `json:"fee"`
	Type       int                            `json:"type"`
	Deadline   int64                          `json:"deadline"`
	Version    int                            `json:"version"`
	Signer     string                         `json:"signer"`
	OtherTrans interface{}                    `json:"otherTrans"`
	Signatures []MultisigSignatureTransaction `json:"signatures,omitempty"`
}

func (*MultisigTransaction) GetCommon

func (t *MultisigTransaction) GetCommon() CommonTransaction

func (*MultisigTransaction) GetTx

func (t *MultisigTransaction) GetTx() Transaction

func (*MultisigTransaction) GetType

func (t *MultisigTransaction) GetType() int

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 {
	TimeStamp     int64   `json:"timeStamp"`
	Fee           float64 `json:"fee"`
	Type          int     `json:"type"`
	Deadline      int64   `json:"deadline"`
	Version       int     `json:"version"`
	Signer        string  `json:"signer"`
	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

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 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"`
}

func (*Transaction) GetCommon

func (t *Transaction) GetCommon() CommonTransaction

func (*Transaction) GetTx

func (t *Transaction) GetTx() Transaction

func (*Transaction) GetType

func (t *Transaction) GetType() int

type TransactionResponce

type TransactionResponce 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"`
	Mosaics    []Mosaic                       `json:"mosaics,omitempty"`
	OtherTrans TransferTransaction            `json:"otherTrans,omitempty"`
	Signatures []MultisigSignatureTransaction `json:"signatures,omitempty"`
}

type TransferTransaction

type TransferTransaction struct {
	TimeStamp int64    `json:"timeStamp,omitempty"`
	Amount    float64  `json:"amount,omitempty"`
	Signature string   `json:"signature,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"`
	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

type Tx

type Tx interface {
	GetType() int
	GetTx() Transaction
}

type TxDict

type TxDict interface {
	GetCommon() CommonTransaction
}

Jump to

Keyboard shortcuts

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