mirror of
https://github.com/logos-messaging/nim-chat-poc.git
synced 2026-01-07 16:43:06 +00:00
remove umbra references
This commit is contained in:
parent
f563c5d316
commit
be89da9afc
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.common_frames;
|
package wap.common_frames;
|
||||||
|
|
||||||
message ContentFrame {
|
message ContentFrame {
|
||||||
uint32 domain = 1;
|
uint32 domain = 1;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.convos.group_v1;
|
package wap.convos.group_v1;
|
||||||
|
|
||||||
import "base.proto";
|
import "base.proto";
|
||||||
import "common_frames.proto";
|
import "common_frames.proto";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.convos.private_v1;
|
package wap.convos.private_v1;
|
||||||
|
|
||||||
import "common_frames.proto";
|
import "common_frames.proto";
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.encryption;
|
package wap.encryption;
|
||||||
|
|
||||||
|
|
||||||
// TODO: This also encompasses plaintexts, is there a better name?
|
// TODO: This also encompasses plaintexts, is there a better name?
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.envelope;
|
package wap.envelope;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Payload Framing Messages
|
// Payload Framing Messages
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
message UmbraEnvelopeV1 {
|
message WapEnvelopeV1 {
|
||||||
|
|
||||||
string conversation_hint = 1;
|
string conversation_hint = 1;
|
||||||
uint64 salt = 2;
|
uint64 salt = 2;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.inbox;
|
package wap.inbox;
|
||||||
|
|
||||||
import "invite.proto";
|
import "invite.proto";
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.invite;
|
package wap.invite;
|
||||||
|
|
||||||
message InvitePrivateV1 {
|
message InvitePrivateV1 {
|
||||||
bytes initiator = 1;
|
bytes initiator = 1;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package umbra.reliability;
|
package wap.reliability;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// SDS Payloads
|
// SDS Payloads
|
||||||
|
|||||||
@ -158,9 +158,9 @@ proc get_conversation(self: Client,
|
|||||||
proc recv*(self: var Client, transport_message: TransportMessage): seq[
|
proc recv*(self: var Client, transport_message: TransportMessage): seq[
|
||||||
TransportMessage] =
|
TransportMessage] =
|
||||||
## Reveives a incomming payload, decodes it, and processes it.
|
## Reveives a incomming payload, decodes it, and processes it.
|
||||||
let res_env = decode(transport_message.payload, UmbraEnvelopeV1)
|
let res_env = decode(transport_message.payload, WapEnvelopeV1)
|
||||||
if res_env.isErr:
|
if res_env.isErr:
|
||||||
raise newException(ValueError, "Failed to decode UmbraEnvelopeV1: " & res_env.error)
|
raise newException(ValueError, "Failed to decode WapEnvelopeV1: " & res_env.error)
|
||||||
let env = res_env.get()
|
let env = res_env.get()
|
||||||
|
|
||||||
let res_convo = self.get_conversation(env.conversation_hint)
|
let res_convo = self.get_conversation(env.conversation_hint)
|
||||||
|
|||||||
@ -22,11 +22,11 @@ proc initInbox*(inbox_addr: string, invite_callback: InviteCallback): Inbox =
|
|||||||
proc encrypt*(frame: InboxV1Frame): EncryptedPayload =
|
proc encrypt*(frame: InboxV1Frame): EncryptedPayload =
|
||||||
return encrypt_plain(frame)
|
return encrypt_plain(frame)
|
||||||
|
|
||||||
proc wrap_env*(payload: EncryptedPayload, convo_id: string): UmbraEnvelopeV1 =
|
proc wrap_env*(payload: EncryptedPayload, convo_id: string): WapEnvelopeV1 =
|
||||||
let bytes = encode(payload)
|
let bytes = encode(payload)
|
||||||
let salt = generateSalt()
|
let salt = generateSalt()
|
||||||
|
|
||||||
return UmbraEnvelopeV1(
|
return WapEnvelopeV1(
|
||||||
payload: bytes,
|
payload: bytes,
|
||||||
salt: salt,
|
salt: salt,
|
||||||
conversation_hint: convo_id,
|
conversation_hint: convo_id,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user