mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
Swift
32 lines
1.0 KiB
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
import SessionUIKit
|
|
import SessionSnodeKit
|
|
import SessionMessagingKit
|
|
import SessionUtilitiesKit
|
|
|
|
public enum Configuration {
|
|
public static func performMainSetup() {
|
|
// Need to do this first to ensure the legacy database exists
|
|
SNUtilitiesKit.configure(maxFileSize: UInt(FileServerAPI.maxFileSize))
|
|
SNMessagingKit.configure()
|
|
SNSnodeKit.configure()
|
|
SNUIKit.configure()
|
|
let secKey = Identity.fetchUserEd25519KeyPair()?.secretKey
|
|
|
|
SnodeAPI.otherReuquestCallback = { snode, payload in
|
|
SessionUtil.sendRequest(
|
|
ed25519SecretKey: secKey,
|
|
targetPubkey: snode.x25519PublicKey,
|
|
targetIp: snode.ip,
|
|
targetPort: snode.port,
|
|
endpoint: "/storage_rpc/v1",
|
|
payload: payload
|
|
) { success, statusCode, data in
|
|
print("RAWR")
|
|
}
|
|
}
|
|
}
|
|
}
|