Class: Transaction

rep.protos.Transaction(propertiesopt)

Represents a Transaction.

Constructor

new Transaction(propertiesopt)

Constructs a new Transaction.
Parameters:
Name Type Attributes Description
properties rep.protos.ITransaction <optional>
Properties to set
Implements:
  • ITransaction
Source:

Members

(static) Type :string

Type enum.
Type:
  • string
Properties:
Name Type Description
UNDEFINED number UNDEFINED value
CHAINCODE_DEPLOY number CHAINCODE_DEPLOY value
CHAINCODE_INVOKE number CHAINCODE_INVOKE value
CHAINCODE_SET_STATE number CHAINCODE_SET_STATE value
Source:

cid :rep.protos.IChaincodeId|null|undefined

Transaction cid.
Type:
Source:

id :string

Transaction id.
Type:
  • string
Source:

ipt :rep.protos.IChaincodeInput|null|undefined

Transaction ipt.
Type:
Source:

para :"spec"|"ipt"|"state"|undefined

Transaction para.
Type:
  • "spec" | "ipt" | "state" | undefined
Source:

signature :rep.protos.ISignature|null|undefined

Transaction signature.
Type:
Source:

spec :rep.protos.IChaincodeDeploy|null|undefined

Transaction spec.
Type:
Source:

state :boolean

Transaction state.
Type:
  • boolean
Source:

type :rep.protos.Transaction.Type

Transaction type.
Type:
Source:

Methods

(static) create(propertiesopt) → {rep.protos.Transaction}

Creates a new Transaction instance using the specified properties.
Parameters:
Name Type Attributes Description
properties rep.protos.ITransaction <optional>
Properties to set
Source:
Returns:
Transaction instance
Type
rep.protos.Transaction

(static) decode(reader, lengthopt) → {rep.protos.Transaction}

Decodes a Transaction message from the specified reader or buffer.
Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array Reader or buffer to decode from
length number <optional>
Message length if known beforehand
Source:
Throws:
  • If the payload is not a reader or valid buffer
    Type
    Error
  • If required fields are missing
    Type
    $protobuf.util.ProtocolError
Returns:
Transaction
Type
rep.protos.Transaction

(static) decodeDelimited(reader) → {rep.protos.Transaction}

Decodes a Transaction message from the specified reader or buffer, length delimited.
Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array Reader or buffer to decode from
Source:
Throws:
  • If the payload is not a reader or valid buffer
    Type
    Error
  • If required fields are missing
    Type
    $protobuf.util.ProtocolError
Returns:
Transaction
Type
rep.protos.Transaction

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified Transaction message. Does not implicitly verify messages.
Parameters:
Name Type Attributes Description
message rep.protos.ITransaction Transaction message or plain object to encode
writer $protobuf.Writer <optional>
Writer to encode to
Source:
Returns:
Writer
Type
$protobuf.Writer

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

Encodes the specified Transaction message, length delimited. Does not implicitly verify messages.
Parameters:
Name Type Attributes Description
message rep.protos.ITransaction Transaction message or plain object to encode
writer $protobuf.Writer <optional>
Writer to encode to
Source:
Returns:
Writer
Type
$protobuf.Writer

(static) fromObject(object) → {rep.protos.Transaction}

Creates a Transaction message from a plain object. Also converts values to their respective internal types.
Parameters:
Name Type Description
object Object.<string, *> Plain object
Source:
Returns:
Transaction
Type
rep.protos.Transaction

(static) toObject(message, optionsopt) → {Object.<string, *>}

Creates a plain object from a Transaction message. Also converts values to other types if specified.
Parameters:
Name Type Attributes Description
message rep.protos.Transaction Transaction
options $protobuf.IConversionOptions <optional>
Conversion options
Source:
Returns:
Plain object
Type
Object.<string, *>

(static) verify(message) → {string|null}

Verifies a Transaction message.
Parameters:
Name Type Description
message Object.<string, *> Plain object to verify
Source:
Returns:
`null` if valid, otherwise the reason why it is not
Type
string | null

toJSON() → {Object.<string, *>}

Converts this Transaction to JSON.
Source:
Returns:
JSON object
Type
Object.<string, *>