Transaction
public struct Transaction
The data structure of Transaction
-
A valid cadence script.
Declaration
Swift
public var script: Script
-
Any arguments to the script if needed should be supplied via a function that returns an array of arguments.
Declaration
Swift
public var arguments: [Argument]
-
The ID of the block to execute the interaction at.
Declaration
Swift
public var referenceBlockId: ID
-
Compute (Gas) limit for query. Read the documentation about computation cost for information about how computation cost is calculated on Flow. More detail here: https://docs.onflow.org/flow-go-sdk/building-transactions/#gas-limit
Declaration
Swift
public var gasLimit: BigUInt
-
The valid key of proposer role.
Declaration
Swift
public var proposalKey: TransactionProposalKey
-
The address of payer
Declaration
Swift
public var payerAddress: Address
-
The list of authorizer’s address
Declaration
Swift
public var authorizers: [Address]
-
The list of payload signature
Declaration
Swift
public var payloadSignatures: [TransactionSignature]
-
The list of envelope signature
Declaration
Swift
public var envelopeSignatures: [TransactionSignature]
-
init(script:
arguments: referenceBlockId: gasLimit: proposalKey: payerAddress: authorizers: payloadSignatures: envelopeSignatures: ) Undocumented
Declaration
Swift
public init(script: Flow.Script, arguments: [Flow.Argument], referenceBlockId: Flow.ID, gasLimit: BigUInt, proposalKey: Flow.TransactionProposalKey, payerAddress: Flow.Address, authorizers: [Flow.Address], payloadSignatures: [Flow.TransactionSignature] = [], envelopeSignatures: [Flow.TransactionSignature] = [])
-
buildUpOn(script:
arguments: referenceBlockId: gasLimit: proposalKey: payerAddress: authorizers: payloadSignatures: envelopeSignatures: ) Undocumented
Declaration
Swift
public func buildUpOn(script: Flow.Script? = nil, arguments: [Flow.Argument]? = nil, referenceBlockId: Flow.ID? = nil, gasLimit: BigUInt? = nil, proposalKey: Flow.TransactionProposalKey? = nil, payerAddress: Flow.Address? = nil, authorizers: [Flow.Address]? = nil, payloadSignatures: [Flow.TransactionSignature]? = nil, envelopeSignatures: [Flow.TransactionSignature]? = nil) -> Transaction
-
RLP Encoded data of Envelope
Declaration
Swift
public var encodedEnvelope: Data? { get }
-
RLP Encoded data of Envelope in hex string
Declaration
Swift
public var envelopeMessage: String? { get }
-
RLP Encoded data of Envelope with
DomainTag.transaction
prefixDeclaration
Swift
public var signableEnvelope: Data? { get }
-
RLP Encoded data of Payload
Declaration
Swift
public var encodedPayload: Data? { get }
-
RLP Encoded data of Payload in hex string
Declaration
Swift
public var payloadMessage: String? { get }
-
RLP Encoded data of Payload with
DomainTag.transaction
prefixDeclaration
Swift
public var signablePlayload: Data? { get }
-
Undocumented
Declaration
Swift
public mutating func addPayloadSignature(address: Address, keyIndex: Int, signature: Data)
-
Undocumented
Declaration
Swift
public mutating func addEnvelopeSignature(address: Address, keyIndex: Int, signature: Data)
-
Sign (Mutate) the payload of Flow Transaction with a list of
FlowSigner
Declaration
Swift
@discardableResult public mutating func signPayload(signers: [FlowSigner]) throws -> Flow.Transaction
Parameters
signers
A list of
FlowSigner
to sign the transactionReturn Value
The
Flow.Transaction
itself. -
Sign (Mutate) the envelope of Flow Transaction with a list of
FlowSigner
Declaration
Swift
@discardableResult public mutating func signEnvelope(signers: [FlowSigner]) throws -> Flow.Transaction
Parameters
signers
A list of
FlowSigner
to sign the transactionReturn Value
The
Flow.Transaction
itself. -
Sign (Mutate) unsigned Flow Transaction with a list of
FlowSigner
Declaration
Swift
@discardableResult public mutating func sign(signers: [FlowSigner]) throws -> Flow.Transaction
Parameters
signers
A list of
FlowSigner
to sign the transactionReturn Value
The
Flow.Transaction
itself. -
The transaction status
See moreDeclaration
Swift
public enum Status : Int, CaseIterable, Comparable, Equatable