Skip to content

Transaction

bigearsenal edited this page May 17, 2022 · 1 revision

Transaction

public struct Transaction: Encodable 

Inheritance

Encodable

Initializers

init()

public init() 

init(instructions:recentBlockhash:feePayer:)

public init(
        instructions: [TransactionInstruction],
        recentBlockhash: String?,
        feePayer: PublicKey
    ) 

Properties

signatures

public var signatures 

feePayer

public var feePayer: PublicKey?

instructions

public var instructions 

recentBlockhash

public var recentBlockhash: String?

Methods

sign(signers:)

public mutating func sign(signers: [Account]) throws 

calculateTransactionFee(lamportsPerSignatures:)

public func calculateTransactionFee(lamportsPerSignatures: UInt64) throws -> UInt64 

serialize(requiredAllSignatures:verifySignatures:)

public mutating func serialize(
        requiredAllSignatures: Bool = true,
        verifySignatures: Bool = false
    ) throws -> Data 

addSignature(_:)

public mutating func addSignature(_ signature: Signature) throws 

findSignature(pubkey:)

public func findSignature(pubkey: PublicKey) -> Signature? 

compileMessage()

public func compileMessage() throws -> Message 

from(data:)

static public func from(data: Data) throws -> Transaction 
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Operators
Extensions
Clone this wiki locally