Transaction
struct Transaction
extension Flow.Transaction: Codable
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 payer: 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: payer: authorizers: payloadSignatures: envelopeSignatures: ) Undocumented
Declaration
Swift
public init(script: Flow.Script, arguments: [Flow.Argument], referenceBlockId: Flow.ID, gasLimit: BigUInt, proposalKey: Flow.TransactionProposalKey, payer: Flow.Address, authorizers: [Flow.Address], payloadSignatures: [Flow.TransactionSignature] = [], envelopeSignatures: [Flow.TransactionSignature] = [])
-
init(script:
arguments: referenceBlockId: gasLimit: proposalKey: payer: authorizers: payloadSignatures: envelopeSignatures: ) Undocumented
Declaration
Swift
public init(script: Flow.Script, arguments: [Flow.Argument], referenceBlockId: Flow.ID, gasLimit: UInt64, proposalKey: Flow.TransactionProposalKey, payer: Flow.Address, authorizers: [Flow.Address], payloadSignatures: [Flow.TransactionSignature] = [], envelopeSignatures: [Flow.TransactionSignature] = [])
-
buildUpOn(script:
arguments: referenceBlockId: gasLimit: proposalKey: payer: 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, payer: 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(_ signature: TransactionSignature)
-
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)
-
Undocumented
Declaration
Swift
public mutating func addEnvelopeSignature(_ signature: TransactionSignature)
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
signPayload(signers:
Asynchronous) Sign (Mutate) the payload of Flow Transaction with a list of
FlowSigner
Declaration
Swift
@discardableResult mutating func signPayload(signers: [FlowSigner]) async throws -> Flow.Transaction
Parameters
signers
A list of
FlowSigner
to sign the transactionReturn Value
The
Flow.Transaction
itself. -
signEnvelope(signers:
Asynchronous) Sign (Mutate) the envelope of Flow Transaction with a list of
FlowSigner
Declaration
Swift
@discardableResult mutating func signEnvelope(signers: [FlowSigner]) async throws -> Flow.Transaction
Parameters
signers
A list of
FlowSigner
to sign the transactionReturn Value
The
Flow.Transaction
itself. -
sign(signers:
Asynchronous) Sign (Mutate) unsigned Flow Transaction with a list of
FlowSigner
Declaration
Swift
@discardableResult mutating func sign(signers: [FlowSigner]) async 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, Codable