NKN Docs

NKN Docs

  • Docs
  • 文档
  • GitHub
  • NKN
  • Help

transaction

struct transaction.Transaction

  • Variables
VariableDescription
TransactionInherited from pb.Transaction
hashThe digest of this Transaction
sizeThe size of this Transaction
isSignatureVerifiedWhether this Transaction has been verified
  • Methods
    • Marshal() : []byte, error // serialize transaction
    • Unmarshal(buf []byte) : error // deserialization transaction
    • DeserializeUnsigned(r io.Reader) : error // deserialize unsigned transaction
    • GetInfo() : []byte, error // get readable Json format of transaction
    • GetMessage() : []byte // get byte slice of serialized unsigned transaction
    • GetProgramHashes() : []Uint160, error // get code hash of transacion
    • GetPrograms() : []*pb.Program // get code of transaction
    • GetSize() : uint32 // get size of transaction
    • Hash() : Uint256 // get hash value of transaction
    • SerializeUnsigned(w io.Writer) : error // serialize unsigned transaction
    • SetHash(hash Uint256) // set hash value to transaction
    • SetPrograms(programs []*pb.Program) // set codes to transaction
    • ShortHash(salt []byte, size uint32) : []byte // get short hash value of transaction
    • ToArray() : []byte // get byte slice of serialized transaction
    • VerifySignature() : error // verify signature of transaction

struct pb.Transaction

  • Variables
VariableDescription
UnsignedTxUnsigned Transaction
Programsprogram and signature
  • Methods
    • Generated by protobuf

struct pb.Program

  • Variables
VariableDescription
Codeprogram to program hash
Parametersignature
  • Methods
    • Generated by protobuf

struct pb.UnsignedTx

  • Variables
VariableDescription
PayloadPayload of Transaction
NonceTransaction nonce
FeeTransaction fee
AttributesAttributes
  • Methods
    • Generated by protobuf

struct pb.Payload

  • Variables
VariableDescription
TypePayloadType
DataSerialized Payload
  • Methods
    • Generated by protobuf

interface IPayload

  • interface
MethodDescription
MarshalSerialize method
UnmarshalDeserialize method

struct pb.Coinbase

  • Variables
VariableDescription
Sendersender of Transaction
Recipientrecipient of Transaction
Amountamount of NKN
  • Methods
    • Generated by protobuf

struct pb.SigChainTxn

  • Variables
VariableDescription
SigChainsignature chain
Submittersender of sigChain
  • Methods
    • Generated by protobuf

struct pb.RegisterName

  • Variables
VariableDescription
Registrantsender of Transaction
Namename need to be registered
  • Methods
    • Generated by protobuf

struct pb.Subscribe

  • Variables
VariableDescription
Subscribersender of Transaction
Identifierid
Topictopic
Bucketdeprecated
Durationperiod of validity
Metameta data
  • Methods
    • Generated by protobuf

struct pb.Unsubscribe

  • Variables
VariableDescription
Subscribersender of Transaction
Identifierid
Topictopic
  • Methods
    • Generated by protobuf

struct pb.TransferAsset

  • Variables
VariableDescription
Sendersender of Transaction
Recipientrecipient of Transaction
Amountamount of NKN
  • Methods
    • Generated by protobuf

struct pb.GenerateID

  • Variables
VariableDescription
Public_keypublic key of sender
Registration_feeregistration fee of transaction
  • Methods
    • Generated by protobuf

struct pb.NanoPay

  • Variables
VariableDescription
Sendersender of token
Recipientrecipient of token
Idnanopay ID
Amountamount of NKN
Txn_expirationperiod of tx validity
Nano_pay_expirationperiod of nanopay validity
  • Methods
    • Generated by protobuf

struct pb.IssueAsset

  • Variables
VariableDescription
Sendersender of transaction
Namename of token
Symbolsymbol of token
Total_supplytotal supply
Precisionprecision of token
  • Methods
    • Generated by protobuf
  • struct transaction.Transaction
  • struct pb.Transaction
  • struct pb.Program
  • struct pb.UnsignedTx
  • struct pb.Payload
  • interface IPayload
  • struct pb.Coinbase
  • struct pb.SigChainTxn
  • struct pb.RegisterName
  • struct pb.Subscribe
  • struct pb.Unsubscribe
  • struct pb.TransferAsset
  • struct pb.GenerateID
  • struct pb.NanoPay
  • struct pb.IssueAsset
BowlerNKNTwitterGitHubForum
Copyright © 2025 NKN | All rights reserved