Skip to content

Commit 4eb4ee3

Browse files
committed
BitFoundation module to centralize shared components
1 parent 3afd74f commit 4eb4ee3

79 files changed

Lines changed: 272 additions & 132 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Package.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let package = Package(
1717
],
1818
dependencies:[
1919
.package(path: "localPackages/Arti"),
20+
.package(path: "localPackages/BitFoundation"),
2021
.package(path: "localPackages/BitLogger"),
2122
.package(url: "https://github.com/21-DOT-DEV/swift-secp256k1", exact: "0.21.1")
2223
],
@@ -25,6 +26,7 @@ let package = Package(
2526
name: "bitchat",
2627
dependencies: [
2728
.product(name: "P256K", package: "swift-secp256k1"),
29+
.product(name: "BitFoundation", package: "BitFoundation"),
2830
.product(name: "BitLogger", package: "BitLogger"),
2931
.product(name: "Tor", package: "Arti")
3032
],
@@ -44,7 +46,10 @@ let package = Package(
4446
),
4547
.testTarget(
4648
name: "bitchatTests",
47-
dependencies: ["bitchat"],
49+
dependencies: [
50+
"bitchat",
51+
.product(name: "BitFoundation", package: "BitFoundation")
52+
],
4853
path: "bitchatTests",
4954
exclude: [
5055
"Info.plist",

bitchat.xcodeproj/project.pbxproj

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bitchat/BitchatApp.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import Tor
1010
import SwiftUI
11+
import BitFoundation
1112
import UserNotifications
1213

1314
@main

bitchat/Identity/IdentityModels.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
///
8282

8383
import Foundation
84+
import BitFoundation
8485

8586
// MARK: - Three-Layer Identity Model
8687

bitchat/Identity/SecureIdentityStateManager.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
///
9292

9393
import BitLogger
94+
import BitFoundation
9495
import Foundation
9596
import CryptoKit
9697

bitchat/Models/BitchatMessage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
import Foundation
10+
import BitFoundation
1011

1112
/// Represents a user-visible message in the BitChat system.
1213
/// Handles both broadcast messages and private encrypted messages,

bitchat/Models/BitchatPacket.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
import Foundation
10+
import BitFoundation
1011

1112
/// The core packet structure for all BitChat protocol messages.
1213
/// Encapsulates all data needed for routing through the mesh network,

bitchat/Models/BitchatPeer.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
22
import CoreBluetooth
3+
import BitFoundation
34

45
/// Represents a peer in the BitChat network with all associated metadata
56
struct BitchatPeer: Equatable {

bitchat/Models/ReadReceipt.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
import Foundation
10+
import BitFoundation
1011

1112
struct ReadReceipt: Codable {
1213
let originalMessageID: String

bitchat/Noise/NoiseRateLimiter.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
import BitLogger
10+
import BitFoundation
1011
import Foundation
1112

1213
final class NoiseRateLimiter {

0 commit comments

Comments
 (0)