Sign a transaction
The transaction will be automatically signed and broadcasted by using the sendSignatureTransactionIntentRequest method.
Usage
do {
let params = OFSendSignatureTransactionIntentRequestParams(
transactionIntentId: transactionIntentId,
signableHash: userOperationHash,
signature: signature,
optimistic: false
)
let result = try await OFSDK.shared.sendSignatureTransactionIntentRequest(params: params)
} catch {
print("\(error)")
}Parameters
struct OFSendSignatureTransactionIntentRequestParams: OFCodableSendable {
public let transactionIntentId: String
public let signableHash: String?
public let signature: String?
public let optimistic: Bool?
}Returns
struct OFTransactionIntentResponse: OFCodableSendable, OFTransactionIntentResponseProtocol {
public let id: String
public let object: String // "transactionIntent"
public let createdAt: Int
public let updatedAt: Int
public let abstractionType: OFTransactionAbstractionType
public let details: OFTransactionDetails?
public let chainId: Int
public let response: OFResponseResponse?
public let interactions: [OFInteraction]?
public let nextAction: OFNextActionResponse?
public let policy: OFPolicyOrEntity?
public let player: OFPlayerOrEntity?
public let account: OFAccountOrEntity?
}Throws
{
method: method,
success: false,
error: error
}