Documentation ¶
Index ¶
- Variables
- func CommonPart(txtype, version int, timeStamp, due int64, senderPublicKey string) base.CommonTransaction
- func MsgPrepare(common Common, tx *Transfer) base.Message
- func MultisigWrapper(senderPublicKey string, innerEntity base.Tx, due int64, network int) *base.MultisigTransaction
- func Send(common Common, entity interface{}, endpoint *requests.Client) (requests.NemAnnounceResult, error)
- func VerifyApost(fileContent []byte, apostilleTransaction base.TransactionResponce) bool
- type Apost
- type Apostilledata
- type Common
- type DataAp
- type Dedicated
- type File
- type Levy
- type MosaicDefinition
- type NamespaceProvision
- type Transfer
- func (r *Transfer) Get()
- func (t *Transfer) GetTx() base.Transaction
- func (t *Transfer) GetType() int
- func (r *Transfer) Prepare(common Common, network int) (base.TxDict, error)
- func (r *Transfer) PrepareMosaic(common Common, mosaicDefinitionMetaDataPair map[string]base.MosaicDefinition, ...) base.TxDict
- type TxDict
Constants ¶
This section is empty.
Variables ¶
var Hashing = map[string]Apost{
"MD5": {"MD5", "81", "01"},
"SHA1": {"SHA1", "82", "02"},
"SHA256": {"SHA256", "83", "03"},
"SHA3-256": {"SHA3-256", "88", "08"},
"SHA3-512": {"SHA3-512", "89", "09"},
}
Apostille hashing methods with version bytes
Functions ¶
func CommonPart ¶
func CommonPart(txtype, version int, timeStamp, due int64, senderPublicKey string) base.CommonTransaction
The common part of transactions param txType - A type of transaction param senderPublicKey - A sender public key param timeStamp - A timestamp for the transation param due - A deadline in minutes param version - A network version param network - A network id return - A common transaction struct
func MsgPrepare ¶
Prepare a message struct param common - A common struct param tx - An un-prepared transferTransaction struct point return - A prepared message struct
func MultisigWrapper ¶
func MultisigWrapper(senderPublicKey string, innerEntity base.Tx, due int64, network int) *base.MultisigTransaction
Wrap a transaction in a multisignature transaction param senderPublicKey - The sender public key param innerEntity - The transaction entity to wrap param due - The transaction deadline in minutes param network - A network id return - A [MultisigTransaction] struct link http://bob.nem.ninja/docs/#multisigTransaction
func Send ¶
func Send(common Common, entity interface{}, endpoint *requests.Client) (requests.NemAnnounceResult, error)
Serialize a transaction and broadcast it to the network param common - A common struct param entity - A prepared transaction struct param endpoint - An NIS endpoint struct return - An announce transaction promise of the com.requests service
func VerifyApost ¶
func VerifyApost(fileContent []byte, apostilleTransaction base.TransactionResponce) bool
Verify an apostille param fileContent - The file content param apostilleTransaction - The transaction object for the apostille return - True if valid, false otherwise
Types ¶
type Apostilledata ¶
type Apostilledata struct { Data DataAp `json:"data"` Transaction base.TxDict `json:"transaction"` }
func Create ¶
func Create(common Common, fileName string, fileContent []byte, tags string, hashing Apost, isMultisig bool, multisigAccount string, isPrivate bool, network int) Apostilledata
Create an apostille object param common - A common object param fileName - The file name (with extension) param fileContent - The file content param tags - The apostille tags param hashing - An hashing object param isMultisig - True if transaction is multisig, false otherwise param multisigAccount - An [AccountInfo] struct link https://bob.nem.ninja/docs/#accountInfo} object param isPrivate - True if apostille is private / transferable / updateable, false if public param network - A network id return - An apostille object containing apostille data and the prepared transaction ready to be sent
type MosaicDefinition ¶
type MosaicDefinition struct { MosaicName string `json:"mosaicName,omitempty"` NamespaceParent struct { Fqn string `json:"fqn,omitempty"` } `json:"namespaceParent,omitempty"` MosaicDescription string `json:"mosaicDescription,omitempty"` Properties []base.Properties `json:"properties,omitempty"` Levy Levy `json:"levy,omitempty"` IsMultisig bool `json:"isMultisig"` MultisigAccount string `json:"multisigAccount"` }
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.
func (*MosaicDefinition) Get ¶
func (r *MosaicDefinition) Get()
func (MosaicDefinition) Prepare ¶
func (r MosaicDefinition) Prepare(common Common, network int) *base.MosaicDefinitionCreationTransaction
Prepare a mosaic definition transaction argument r - An un-prepared mosaicDefinitionTransaction struct param common - A common struct param network - A network id return A [MosaicDefinitionCreationTransaction] struc ready for serialization link http://bob.nem.ninja/docs/#mosaicDefinitionCreationTransaction
type NamespaceProvision ¶
type NamespaceProvision struct { NamespaceName string `json:"namespaceName,omitempty"` NamespaceParent struct { Fqn string `json:"fqn,omitempty"` } `json:"namespaceParent,omitempty"` IsMultisig bool `json:"isMultisig"` MultisigAccount string `json:"multisigAccount"` }
func (*NamespaceProvision) Get ¶
func (r *NamespaceProvision) Get()
func (*NamespaceProvision) GetTx ¶
func (t *NamespaceProvision) GetTx() base.Transaction
func (*NamespaceProvision) GetType ¶
func (t *NamespaceProvision) GetType() int
func (*NamespaceProvision) Prepare ¶
func (r *NamespaceProvision) Prepare(common Common, network int) base.TxDict
Prepare a namespace provision transaction object param common - A common struct param r - An un-prepared namespaceProvisionTransaction method param network - A network id return - A [ProvisionNamespaceTransaction] struct link {http://bob.nem.ninja/docs/#provisionNamespaceTransaction}
type Transfer ¶
type Transfer struct { Amount float64 `json:"amount"` Recipient string `json:"recipient"` RecipientPublicKey string `json:"recipientPublicKey"` IsMultisig bool `json:"isMultisig"` MultisigAccount string `json:"multisigAccount"` Message string `json:"message"` MessageType int `json:"messageType"` Mosaics []base.Mosaic `json:"mosaics"` }
func TransferA ¶
An un-prepared transfer transaction object param recipient - A NEM account address param amount - A number of XEM param message - A message return A - Transfer struct
func (*Transfer) GetTx ¶
func (t *Transfer) GetTx() base.Transaction
func (*Transfer) Prepare ¶
Prepare a transfer transaction struct param common - A common struct param r - An un-prepared TransferTransaction method param network - A network id return - A [TransferTransaction] struct link http://bob.nem.ninja/docs/#transferTransaction
func (*Transfer) PrepareMosaic ¶
func (r *Transfer) PrepareMosaic(common Common, mosaicDefinitionMetaDataPair map[string]base.MosaicDefinition, client *requests.Client, network int) base.TxDict
Prepare a mosaic transfer transaction struct param common - A common struct param tx - The un-prepared transfer transaction struct param mosaicDefinitionMetaDataPair - The mosaicDefinitionMetaDataPair object with properties of mosaics to send param network - A network id return - A [TransferTransaction] struct ready for serialization link http://bob.nem.ninja/docs/#transferTransaction