Skip to content

Commit

Permalink
Encrypted comment
Browse files Browse the repository at this point in the history
- add EncryptedCommentCellBuilder
  • Loading branch information
grishamsc committed Oct 3, 2024
1 parent 86dfc9b commit 0813b47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Foundation

public struct EncryptedCommentCellBuilder {
public static func buildCell(encryptedData: Data) throws -> Cell {
let opCodeData = Data(withUnsafeBytes(of: OpCodes.ENCRYPTED_COMMENT.bigEndian, Array.init))
let payloadData = opCodeData + encryptedData

let builder = Builder()
return try builder.writeSnakeData(payloadData).endCell()
}
}
1 change: 1 addition & 0 deletions Source/TonSwift/Util/OpCodes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ public enum OpCodes {
public static var LIQUID_TF_BURN: Int32 = 0x595f07bc
public static var WHALES_DEPOSIT: Int32 = 2077040623
public static var WHALES_WITHDRAW: UInt32 = 3665837821
public static var ENCRYPTED_COMMENT: Int32 = 0x2167da4b
}

0 comments on commit 0813b47

Please sign in to comment.