diff --git a/.crowdin.yml b/.crowdin.yml index 6e3e0f7281..9657e00d71 100644 --- a/.crowdin.yml +++ b/.crowdin.yml @@ -5,14 +5,15 @@ "commit_message": 'fix(i18n): new %language% translations -Signed-off-by: Crowdin Bot ' +Signed-off-by: Crowdin Bot +' "append_commit_message": false "preserve_hierarchy": true files: [ { - "source" : "/js/packages/berty-i18n/locale/en/messages.json", - "translation" : "/js/packages/berty-i18n/locale/%two_letters_code%/%original_file_name%", + "source" : "/js/packages/berty-i18n/locale/en-US/messages.json", + "translation" : "/js/packages/berty-i18n/locale/%locale%/%original_file_name%", } ] diff --git a/.dockerignore b/.dockerignore index a80bc9005c..8c940c03bd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,3 +16,4 @@ js/ out/ profile.out vendor/ +tool/ diff --git a/.gitattributes b/.gitattributes index 2553bf5c98..2c7b291473 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,7 +20,7 @@ gen.sum linguist-generated merge=ours -diff *.pb.gw.go linguist-generated merge=ours -diff *.pb.js linguist-generated merge=ours -diff *pb_test.go linguist-generated merge=ours -diff -docs/*/api.md linguist-generated merge=ours -diff +docs/apis/*types.md linguist-generated merge=ours -diff *.swagger.json linguist-generated merge=ours -diff api/*.yaml linguist-generated merge=ours -diff /js/packages/store/protocol/grpc-web-gen/** linguist-generated merge=ours -diff diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 9437539bf1..78a3bc0ef5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -40,7 +40,7 @@ jobs: go-version: 1.15.x - name: Setup Node - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.3 with: node-version: 14.x @@ -79,7 +79,7 @@ jobs: CI: "true" run: | make android.app_deps - (cd android && ./gradlew app:bundleReleaseYolo) + (yarn jetify && cd android && ./gradlew app:bundleReleaseYolo) ### TODO: move this part on Yolo and use release keystore ### mkdir -p $HOME/.android cp android/app/debug.keystore $HOME/.android diff --git a/.github/workflows/dependent-issues.yml b/.github/workflows/dependent-issues.yml new file mode 100644 index 0000000000..55ac0f60f2 --- /dev/null +++ b/.github/workflows/dependent-issues.yml @@ -0,0 +1,36 @@ +name: Dependent Issues + +on: + issues: + types: + - opened + - edited + - reopened + pull_request_target: + types: + - opened + - edited + - reopened + - synchronize + schedule: + - cron: "42 2 * * *" # schedule daily check + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: z0al/dependent-issues@v1 + env: + # (Required) The token to use to make API calls to GitHub. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # (Optional) The label to use to mark dependent issues + label: dependent + + # (Optional) Enable checking for dependencies in issues. Enable by + # setting the value to "on". Default "off" + check_issues: off + + # (Optional) A comma-separated list of keywords. Default + # "depends on, blocked by" + keywords: depends on, blocked by diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 2a25efc173..657163a9b8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -31,7 +31,8 @@ on: # * store performance logs for comparison jobs: - integration: + integration-prod: + if: github.event_name == 'schedule' name: "integration (production)" runs-on: ubuntu-latest env: @@ -72,26 +73,43 @@ jobs: with: path: ./cache key: ${{runner.os}}-integration-benchmark - - name: Store benchmark result - if: github.event_name == 'push' || github.event_name == 'pull_request' - uses: rhysd/github-action-benchmark@v1 - with: - tool: 'googlecpp' - output-file-path: benchmark_result.json - external-data-json-path: ./cache/benchmark-data.json - fail-on-alert: false - comment-on-alert: true - github-token: ${{secrets.GITHUB_TOKEN}} - #alert-comment-cc-users: '@foobar' - #auto-push: true - name: Discord notification - if: github.event_name == 'schedule' && failure() + if: failure() env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_DEV_WEBHOOK }} + DISCORD_WEBHOOK: ${{ secrets.DISCORD_PROD_WEBHOOK }} uses: Ilshidur/action-discord@0.3.0 with: args: 'Integration failed, see ${{ steps.url.outputs.runUrl }}' - doctor: + + integration-local: + if: github.event_name == 'push' || github.event_name == 'pull_request' + name: "integration (local)" + runs-on: ubuntu-latest + env: + OS: ubuntu-latest + GOLANG: 1.15.x + steps: + - name: Checkout + uses: actions/checkout@master + - name: Build Docker images + working-directory: tool/compose-integration + run: docker-compose build + - name: Run integration test suite + working-directory: tool/compose-integration + run: make + #- name: Store benchmark result + # uses: rhysd/github-action-benchmark@v1 + # with: + # tool: 'googlecpp' + # output-file-path: benchmark_result.json + # external-data-json-path: ./cache/benchmark-data.json + # fail-on-alert: false + # comment-on-alert: true + # github-token: ${{secrets.GITHUB_TOKEN}} + # #alert-comment-cc-users: '@foobar' + # #auto-push: true + + doctor-production: name: "doctor (production)" runs-on: ubuntu-latest env: @@ -127,7 +145,7 @@ jobs: - name: Discord notification if: github.event_name == 'schedule' && failure() env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_DEV_WEBHOOK }} + DISCORD_WEBHOOK: ${{ secrets.DISCORD_PROD_WEBHOOK }} uses: Ilshidur/action-discord@0.3.0 with: args: 'Doctor failed, see ${{ steps.url.outputs.runUrl }}' diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 1bb09138ea..7ff3dc2625 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -45,7 +45,7 @@ jobs: go-version: 1.15.3 - name: Setup Node - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.3 with: node-version: 14.x diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 4ed9213ac2..8adb96c1e4 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -29,7 +29,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.3 with: node-version: ${{ matrix.node-version }} - name: Cache Node.js modules diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 49cce9709a..aa2f1d0f68 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -132,7 +132,7 @@ jobs: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.3 with: node-version: ${{ matrix.node-version }} diff --git a/Dockerfile b/Dockerfile index b3cc6239c3..4081ac6161 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG VCS_REF ARG VERSION # build -FROM golang:1.15.5-alpine as builder +FROM golang:1.15.6-alpine as builder RUN apk add --no-cache git gcc musl-dev make ENV GO111MODULE=on WORKDIR /go/src/berty.tech/berty @@ -29,6 +29,6 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.schema-version="1.0" \ org.label-schema.cmd="docker run -i -t --rm bertytech/berty" \ org.label-schema.help="docker exec -it $CONTAINER berty --help" -COPY --from=builder /go/bin/berty /go/bin/rdvp /go/bin/betabot /go/bin/testbot /bin/ +COPY --from=builder /go/bin/berty /go/bin/rdvp /go/bin/betabot /go/bin/testbot /go/bin/berty-integration /bin/ ENTRYPOINT ["/bin/berty"] #CMD [] diff --git a/api/bertyprotocol.proto b/api/bertyprotocol.proto deleted file mode 100644 index 2040ef0c3f..0000000000 --- a/api/bertyprotocol.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; - -package berty.protocol.v1; - -import "bertytypes.proto"; - -option go_package = "berty.tech/berty/go/pkg/bertyprotocol"; - -// ProtocolService is the top-level API to manage an instance of the Berty Protocol. -// Each Berty Protocol Instance is considered as a Berty device and is associated with a Berty user. -service ProtocolService { - // InstanceExportData exports instance data - rpc InstanceExportData (types.v1.InstanceExportData.Request) returns (stream types.v1.InstanceExportData.Reply); - - // InstanceGetConfiguration gets current configuration of this protocol instance - rpc InstanceGetConfiguration (types.v1.InstanceGetConfiguration.Request) returns (types.v1.InstanceGetConfiguration.Reply); - - // ContactRequestReference retrieves the information required to create a reference (types.v1.ie. included in a shareable link) to the current account - rpc ContactRequestReference (types.v1.ContactRequestReference.Request) returns (types.v1.ContactRequestReference.Reply); - - // ContactRequestDisable disables incoming contact requests - rpc ContactRequestDisable (types.v1.ContactRequestDisable.Request) returns (types.v1.ContactRequestDisable.Reply); - - // ContactRequestEnable enables incoming contact requests - rpc ContactRequestEnable (types.v1.ContactRequestEnable.Request) returns (types.v1.ContactRequestEnable.Reply); - - // ContactRequestResetReference changes the contact request reference - rpc ContactRequestResetReference (types.v1.ContactRequestResetReference.Request) returns (types.v1.ContactRequestResetReference.Reply); - - // ContactRequestSend attempt to send a contact request - rpc ContactRequestSend (types.v1.ContactRequestSend.Request) returns (types.v1.ContactRequestSend.Reply); - - // ContactRequestAccept accepts a contact request - rpc ContactRequestAccept (types.v1.ContactRequestAccept.Request) returns (types.v1.ContactRequestAccept.Reply); - - // ContactRequestDiscard ignores a contact request, without informing the other user - rpc ContactRequestDiscard (types.v1.ContactRequestDiscard.Request) returns (types.v1.ContactRequestDiscard.Reply); - - // ContactBlock blocks a contact from sending requests - rpc ContactBlock (types.v1.ContactBlock.Request) returns (types.v1.ContactBlock.Reply); - - // ContactUnblock unblocks a contact from sending requests - rpc ContactUnblock (types.v1.ContactUnblock.Request) returns (types.v1.ContactUnblock.Reply); - - // ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group - rpc ContactAliasKeySend (types.v1.ContactAliasKeySend.Request) returns (types.v1.ContactAliasKeySend.Reply); - - // MultiMemberGroupCreate creates a new multi-member group - rpc MultiMemberGroupCreate (types.v1.MultiMemberGroupCreate.Request) returns (types.v1.MultiMemberGroupCreate.Reply); - - // MultiMemberGroupJoin joins a multi-member group - rpc MultiMemberGroupJoin (types.v1.MultiMemberGroupJoin.Request) returns (types.v1.MultiMemberGroupJoin.Reply); - - // MultiMemberGroupLeave leaves a multi-member group - rpc MultiMemberGroupLeave (types.v1.MultiMemberGroupLeave.Request) returns (types.v1.MultiMemberGroupLeave.Reply); - - // MultiMemberGroupAliasResolverDisclose discloses your alias resolver key - rpc MultiMemberGroupAliasResolverDisclose (types.v1.MultiMemberGroupAliasResolverDisclose.Request) returns (types.v1.MultiMemberGroupAliasResolverDisclose.Reply); - - // MultiMemberGroupAdminRoleGrant grants an admin role to a group member - rpc MultiMemberGroupAdminRoleGrant (types.v1.MultiMemberGroupAdminRoleGrant.Request) returns (types.v1.MultiMemberGroupAdminRoleGrant.Reply); - - // MultiMemberGroupInvitationCreate creates an invitation to a multi-member group - rpc MultiMemberGroupInvitationCreate (types.v1.MultiMemberGroupInvitationCreate.Request) returns (types.v1.MultiMemberGroupInvitationCreate.Reply); - - // AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members - rpc AppMetadataSend (types.v1.AppMetadataSend.Request) returns (types.v1.AppMetadataSend.Reply); - - // AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members - rpc AppMessageSend (types.v1.AppMessageSend.Request) returns (types.v1.AppMessageSend.Reply); - - // GroupMetadataList replays previous and subscribes to new metadata events from the group - rpc GroupMetadataList (types.v1.GroupMetadataList.Request) returns (stream types.v1.GroupMetadataEvent); - - // GroupMessageList replays previous and subscribes to new message events from the group - rpc GroupMessageList (types.v1.GroupMessageList.Request) returns (stream types.v1.GroupMessageEvent); - - // GroupInfo retrieves information about a group - rpc GroupInfo (types.v1.GroupInfo.Request) returns (types.v1.GroupInfo.Reply); - - // ActivateGroup explicitly opens a group - rpc ActivateGroup (types.v1.ActivateGroup.Request) returns (types.v1.ActivateGroup.Reply); - - // DeactivateGroup closes a group - rpc DeactivateGroup (types.v1.DeactivateGroup.Request) returns (types.v1.DeactivateGroup.Reply); - - // Monitor Group events - rpc MonitorGroup (types.v1.MonitorGroup.Request) returns (stream types.v1.MonitorGroup.Reply); - - rpc DebugListGroups (types.v1.DebugListGroups.Request) returns (stream types.v1.DebugListGroups.Reply); - - rpc DebugInspectGroupStore (types.v1.DebugInspectGroupStore.Request) returns (stream types.v1.DebugInspectGroupStore.Reply); - - rpc DebugGroup (types.v1.DebugGroup.Request) returns (types.v1.DebugGroup.Reply); - - rpc SystemInfo (types.v1.SystemInfo.Request) returns (types.v1.SystemInfo.Reply); - - // AuthServiceInitFlow Initialize an authentication flow - rpc AuthServiceInitFlow (types.v1.AuthServiceInitFlow.Request) returns (types.v1.AuthServiceInitFlow.Reply); - - // AuthServiceCompleteFlow Completes an authentication flow - rpc AuthServiceCompleteFlow (types.v1.AuthServiceCompleteFlow.Request) returns (types.v1.AuthServiceCompleteFlow.Reply); - - // ServicesTokenList Retrieves the list of services tokens - rpc ServicesTokenList (types.v1.ServicesTokenList.Request) returns (stream types.v1.ServicesTokenList.Reply); - - // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents - rpc ReplicationServiceRegisterGroup (types.v1.ReplicationServiceRegisterGroup.Request) returns (types.v1.ReplicationServiceRegisterGroup.Reply); - - // PeerList returns a list of P2P peers - rpc PeerList(types.v1.PeerList.Request) returns (types.v1.PeerList.Reply); - - // AttachmentPrepare ... - rpc AttachmentPrepare(stream types.v1.AttachmentPrepare.Request) returns (types.v1.AttachmentPrepare.Reply); - - // AttachmentRetrieve returns an attachment data - rpc AttachmentRetrieve(types.v1.AttachmentRetrieve.Request) returns (stream types.v1.AttachmentRetrieve.Reply); -} diff --git a/api/bertyreplication.proto b/api/bertyreplication.proto index 23ccec4706..941515e2b1 100644 --- a/api/bertyreplication.proto +++ b/api/bertyreplication.proto @@ -2,13 +2,12 @@ syntax = "proto3"; package berty.protocol.v1; -import "bertytypes.proto"; +import "protocoltypes.proto"; option go_package = "berty.tech/berty/go/pkg/bertyprotocol"; // ReplicationService service ReplicationService { // ReplicateGroup - rpc ReplicateGroup(types.v1.ReplicationServiceReplicateGroup.Request) returns (types.v1.ReplicationServiceReplicateGroup.Reply); + rpc ReplicateGroup(protocol.v1.ReplicationServiceReplicateGroup.Request) returns (protocol.v1.ReplicationServiceReplicateGroup.Reply); } - diff --git a/api/errcode.proto b/api/errcode.proto index a968e6c258..7bca8b9715 100644 --- a/api/errcode.proto +++ b/api/errcode.proto @@ -32,6 +32,12 @@ enum ErrCode { ErrDeserialization = 104; ErrStreamRead = 105; ErrStreamWrite = 106; + ErrStreamTransform = 110; + ErrStreamSendAndClose = 111; + ErrStreamHeaderWrite = 112; + ErrStreamHeaderRead = 115; + ErrStreamSink = 113; + ErrStreamCloseAndRecv = 114; ErrMissingMapKey = 107; ErrDBWrite = 108; ErrDBRead = 109; @@ -129,6 +135,7 @@ enum ErrCode { //------------------ ErrMessengerInvalidDeepLink = 2000; + ErrMessengerDeepLinkRequiresPassphrase = 2001; // DB errors @@ -147,8 +154,8 @@ enum ErrCode { ErrReplayProcessGroupMessage = 2201; // API internals errors - ErrPrepareAttachment = 2300; - ErrRetrieveAttachment = 2301; + ErrAttachmentPrepare = 2300; + ErrAttachmentRetrieve = 2301; ErrProtocolSend = 2302; // ----------------- diff --git a/api/bertymessenger.proto b/api/messengertypes.proto similarity index 80% rename from api/bertymessenger.proto rename to api/messengertypes.proto index 10e5dc9925..327242614c 100644 --- a/api/bertymessenger.proto +++ b/api/messengertypes.proto @@ -3,9 +3,9 @@ syntax = "proto3"; package berty.messenger.v1; import "gogoproto/gogo.proto"; -import "bertytypes.proto"; +import "protocoltypes.proto"; -option go_package = "berty.tech/berty/go/pkg/bertymessenger"; +option go_package = "berty.tech/berty/go/pkg/messengertypes"; option (gogoproto.goproto_unkeyed_all) = false; option (gogoproto.goproto_unrecognized_all) = false; option (gogoproto.goproto_sizecache_all) = false; @@ -59,7 +59,7 @@ service MessengerService { rpc ConversationClose(ConversationClose.Request) returns (ConversationClose.Reply); // ServicesTokenList Retrieves the list of service server tokens - rpc ServicesTokenList(types.v1.ServicesTokenList.Request) returns (stream types.v1.ServicesTokenList.Reply); + rpc ServicesTokenList(protocol.v1.ServicesTokenList.Request) returns (stream protocol.v1.ServicesTokenList.Reply); // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents rpc ReplicationServiceRegisterGroup(ReplicationServiceRegisterGroup.Request) returns (ReplicationServiceRegisterGroup.Reply); @@ -75,6 +75,12 @@ service MessengerService { // InstanceExportData exports instance data rpc InstanceExportData (InstanceExportData.Request) returns (stream InstanceExportData.Reply); + + // MediaPrepare allows to upload a file and returns a cid to attach to messages + rpc MediaPrepare (stream MediaPrepare.Request) returns (MediaPrepare.Reply); + + // MediaRetrieve allows to download a file attached to a message + rpc MediaRetrieve (MediaRetrieve.Request) returns (stream MediaRetrieve.Reply); } message ConversationOpen { @@ -106,6 +112,8 @@ message InstanceShareableBertyID { // reset will regenerate a new link bool reset = 1; string display_name = 2; + // optional passphase to encrypt the link + bytes passphrase = 3; } message Reply { BertyLink link = 1; @@ -138,6 +146,8 @@ message DevShareInstanceBertyID { message ParseDeepLink { message Request { string link = 1; + // optional passphase to decrypt the link + bytes passphrase = 2; } message Reply { BertyLink link = 1; @@ -147,13 +157,45 @@ message ParseDeepLink { message BertyLink { Kind kind = 1; BertyID berty_id = 2 [(gogoproto.customname) = "BertyID"]; - BertyGroup berty_group = 3 [(gogoproto.customname) = "BertyGroup"]; - // bool enc = 4; + BertyGroup berty_group = 3; + Encrypted encrypted = 4; + + // Encrypted is a clear structure containing clear and encrypted fields. + // + // We prefer to use a clear struct with encrypted fields instead of a simple + // encrypted struct, to improves chances of having a valid structure even + // with an invalid passphase. This will force an attacker to have more resources + // to test more false-positive guesses. + message Encrypted { + // kind is a clear representation of the unencrypted link type. + Kind kind = 1; + // nonce is a clear field used by scrypt as "salt" to derive the passphrase and + // also used by cipher.NewCTR as "iv" to initialize a stream cipher. + bytes nonce = 2; + // display_name is an optional clear representation of the display name. + string display_name = 3; + + // contact_v1: all bytes fields are encrypted + + bytes contact_public_rendezvous_seed = 10; + bytes contact_account_pk = 11 [(gogoproto.customname) = "ContactAccountPK"]; + bytes contact_display_name = 12; + + // group_v1: all bytes fields are encrypted + + bytes group_public_key = 20; + bytes group_secret = 21; + bytes group_secret_sig = 22; + berty.protocol.v1.GroupType group_type = 23; // clear + bytes group_sign_pub = 24; + bytes group_display_name = 25; + } enum Kind { UnknownKind = 0; ContactInviteV1Kind = 1; GroupV1Kind = 2; + EncryptedV1Kind = 3; } } @@ -197,14 +239,16 @@ message BertyID { } message BertyGroup { - berty.types.v1.Group group = 1; + berty.protocol.v1.Group group = 1; string display_name = 2; } +// AppMessage is the app layer format message AppMessage { Type type = 1; bytes payload = 2; int64 sent_date = 3 [(gogoproto.jsontag) = "sentDate"]; + repeated Media medias = 4; enum Type { Undefined = 0; @@ -215,7 +259,9 @@ message AppMessage { TypeSetUserInfo = 5; TypeAcknowledge = 6; TypeReplyOptions = 7; - TypeMonitorMetadata = 8; + + // these shouldn't be sent on the network + TypeMonitorMetadata = 100; } message UserMessage { string body = 1; @@ -242,7 +288,7 @@ message AppMessage { repeated ReplyOption options = 1; } message MonitorMetadata { - berty.types.v1.MonitorGroup.EventMonitor event = 1; + berty.protocol.v1.MonitorGroup.EventMonitor event = 1; } } @@ -254,12 +300,12 @@ message ReplyOption { message SystemInfo { message Request {} message Reply { - berty.types.v1.SystemInfo.Reply protocol = 1; + berty.protocol.v1.SystemInfo.Reply protocol = 1; Messenger messenger = 2; } message Messenger { - berty.types.v1.SystemInfo.Process process = 1; + berty.protocol.v1.SystemInfo.Process process = 1; repeated string warns = 2; bool protocol_in_same_process = 3; DB db = 4 [(gogoproto.customname) = "DB"]; @@ -281,6 +327,8 @@ message SystemInfo { message ConversationJoin { message Request { string link = 1; + // optional passphase to decrypt the link + bytes passphrase = 2; } message Reply {} } @@ -319,6 +367,32 @@ message Interaction { int64 sent_date = 9; bool acknowledged = 10; string target_cid = 13 [(gogoproto.moretags) = "gorm:\"index;column:target_cid\"", (gogoproto.customname) = "TargetCID"]; + repeated Media medias = 15; +} + +message Media { + string cid = 1 [(gogoproto.moretags) = "gorm:\"primaryKey;column:cid\"", (gogoproto.customname) = "CID"]; + string mime_type = 2; + string filename = 3; + string display_name = 4; + + // these should not be sent on the bertyprotocol layer + string interaction_cid = 100 [(gogoproto.moretags) = "gorm:\"index;column:interaction_cid\"", (gogoproto.customname) = "InteractionCID"]; + State state = 103; + enum State { + StateUnknown = 0; + + // specific to media received + StateNeverDownloaded = 1; + StatePartiallyDownloaded = 2; + StateDownloaded = 3; + StateInCache = 4; + StateInvalidCrypto = 5; + + // specific to media sent + StatePrepared = 100; + StateAttached = 101; + } } message Contact { @@ -419,6 +493,7 @@ message StreamEvent { TypeMemberUpdated = 8; TypeDeviceUpdated = 9; TypeNotified = 10; + TypeMediaUpdated = 11; } message ConversationUpdated { Conversation conversation = 1; @@ -445,6 +520,9 @@ message StreamEvent { Device device = 1; } message ListEnded {} + message MediaUpdated { + Media media = 1; + } message Notified { Type type = 1; string title = 3; @@ -520,6 +598,8 @@ message AccountUpdate { message ContactRequest { message Request { string link = 1; + // optional passphase to decrypt the link + bytes passphrase = 2; } message Reply {} } @@ -536,6 +616,7 @@ message Interact { AppMessage.Type type = 1; bytes payload = 2; string conversation_public_key = 3; + repeated string media_cids = 4; } message Reply { // TODO: return cid @@ -596,3 +677,36 @@ message LocalConversationState { bool is_open = 3; Conversation.Type type = 4; } + +message MediaPrepare { + message Request { + bytes block = 1; + + /* Header data: + ** IMPORTANT: The first request must contain the header data and no block. Header data in following requests will be ignored + */ + + Media info = 2; + string uri = 3; + } + + message Reply { + string cid = 1; + } +} + +message MediaRetrieve { + message Request { + string cid = 1; + } + + message Reply { + bytes block = 1; + + /* Header data: + ** IMPORTANT: The first reply will contain the header data and no block. Header data in following replies will be empty + */ + + Media info = 2; + } +} diff --git a/api/bertymessenger.yaml b/api/messengertypes.yaml similarity index 93% rename from api/bertymessenger.yaml rename to api/messengertypes.yaml index 71d58e6475..ee5da47aa3 100644 --- a/api/bertymessenger.yaml +++ b/api/messengertypes.yaml @@ -84,3 +84,9 @@ http: - selector: berty.messenger.v1.MessengerService.InstanceExportData post: /berty.messenger.v1/MessengerService/InstanceExportData body: "*" + - selector: berty.messenger.v1.MessengerService.MediaPrepare + post: /berty.messenger.v1/MessengerService/MediaPrepare + body: "*" + - selector: berty.messenger.v1.MessengerService.MediaRetrieve + post: /berty.messenger.v1/MessengerService/MediaRetrieve + body: "*" diff --git a/api/bertytypes.proto b/api/protocoltypes.proto similarity index 86% rename from api/bertytypes.proto rename to api/protocoltypes.proto index dbcb1abb20..fce8ca9680 100644 --- a/api/bertytypes.proto +++ b/api/protocoltypes.proto @@ -1,16 +1,128 @@ syntax = "proto3"; -package berty.types.v1; +package berty.protocol.v1; import "gogoproto/gogo.proto"; -option go_package = "berty.tech/berty/go/pkg/bertytypes"; +option go_package = "berty.tech/berty/go/pkg/protocoltypes"; option (gogoproto.goproto_enum_prefix_all) = false; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; option (gogoproto.sizer_all) = true; +// ProtocolService is the top-level API to manage an instance of the Berty Protocol. +// Each Berty Protocol Instance is considered as a Berty device and is associated with a Berty user. +service ProtocolService { + // InstanceExportData exports instance data + rpc InstanceExportData (InstanceExportData.Request) returns (stream InstanceExportData.Reply); + + // InstanceGetConfiguration gets current configuration of this protocol instance + rpc InstanceGetConfiguration (InstanceGetConfiguration.Request) returns (InstanceGetConfiguration.Reply); + + // ContactRequestReference retrieves the information required to create a reference (ie. included in a shareable link) to the current account + rpc ContactRequestReference (ContactRequestReference.Request) returns (ContactRequestReference.Reply); + + // ContactRequestDisable disables incoming contact requests + rpc ContactRequestDisable (ContactRequestDisable.Request) returns (ContactRequestDisable.Reply); + + // ContactRequestEnable enables incoming contact requests + rpc ContactRequestEnable (ContactRequestEnable.Request) returns (ContactRequestEnable.Reply); + + // ContactRequestResetReference changes the contact request reference + rpc ContactRequestResetReference (ContactRequestResetReference.Request) returns (ContactRequestResetReference.Reply); + + // ContactRequestSend attempt to send a contact request + rpc ContactRequestSend (ContactRequestSend.Request) returns (ContactRequestSend.Reply); + + // ContactRequestAccept accepts a contact request + rpc ContactRequestAccept (ContactRequestAccept.Request) returns (ContactRequestAccept.Reply); + + // ContactRequestDiscard ignores a contact request, without informing the other user + rpc ContactRequestDiscard (ContactRequestDiscard.Request) returns (ContactRequestDiscard.Reply); + + // ContactBlock blocks a contact from sending requests + rpc ContactBlock (ContactBlock.Request) returns (ContactBlock.Reply); + + // ContactUnblock unblocks a contact from sending requests + rpc ContactUnblock (ContactUnblock.Request) returns (ContactUnblock.Reply); + + // ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group + rpc ContactAliasKeySend (ContactAliasKeySend.Request) returns (ContactAliasKeySend.Reply); + + // MultiMemberGroupCreate creates a new multi-member group + rpc MultiMemberGroupCreate (MultiMemberGroupCreate.Request) returns (MultiMemberGroupCreate.Reply); + + // MultiMemberGroupJoin joins a multi-member group + rpc MultiMemberGroupJoin (MultiMemberGroupJoin.Request) returns (MultiMemberGroupJoin.Reply); + + // MultiMemberGroupLeave leaves a multi-member group + rpc MultiMemberGroupLeave (MultiMemberGroupLeave.Request) returns (MultiMemberGroupLeave.Reply); + + // MultiMemberGroupAliasResolverDisclose discloses your alias resolver key + rpc MultiMemberGroupAliasResolverDisclose (MultiMemberGroupAliasResolverDisclose.Request) returns (MultiMemberGroupAliasResolverDisclose.Reply); + + // MultiMemberGroupAdminRoleGrant grants an admin role to a group member + rpc MultiMemberGroupAdminRoleGrant (MultiMemberGroupAdminRoleGrant.Request) returns (MultiMemberGroupAdminRoleGrant.Reply); + + // MultiMemberGroupInvitationCreate creates an invitation to a multi-member group + rpc MultiMemberGroupInvitationCreate (MultiMemberGroupInvitationCreate.Request) returns (MultiMemberGroupInvitationCreate.Reply); + + // AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members + rpc AppMetadataSend (AppMetadataSend.Request) returns (AppMetadataSend.Reply); + + // AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members + rpc AppMessageSend (AppMessageSend.Request) returns (AppMessageSend.Reply); + + // GroupMetadataList replays previous and subscribes to new metadata events from the group + rpc GroupMetadataList (GroupMetadataList.Request) returns (stream GroupMetadataEvent); + + // GroupMessageList replays previous and subscribes to new message events from the group + rpc GroupMessageList (GroupMessageList.Request) returns (stream GroupMessageEvent); + + // GroupInfo retrieves information about a group + rpc GroupInfo (GroupInfo.Request) returns (GroupInfo.Reply); + + // ActivateGroup explicitly opens a group + rpc ActivateGroup (ActivateGroup.Request) returns (ActivateGroup.Reply); + + // DeactivateGroup closes a group + rpc DeactivateGroup (DeactivateGroup.Request) returns (DeactivateGroup.Reply); + + // Monitor Group events + rpc MonitorGroup (MonitorGroup.Request) returns (stream MonitorGroup.Reply); + + rpc DebugListGroups (DebugListGroups.Request) returns (stream DebugListGroups.Reply); + + rpc DebugInspectGroupStore (DebugInspectGroupStore.Request) returns (stream DebugInspectGroupStore.Reply); + + rpc DebugGroup (DebugGroup.Request) returns (DebugGroup.Reply); + + rpc SystemInfo (SystemInfo.Request) returns (SystemInfo.Reply); + + // AuthServiceInitFlow Initialize an authentication flow + rpc AuthServiceInitFlow (AuthServiceInitFlow.Request) returns (AuthServiceInitFlow.Reply); + + // AuthServiceCompleteFlow Completes an authentication flow + rpc AuthServiceCompleteFlow (AuthServiceCompleteFlow.Request) returns (AuthServiceCompleteFlow.Reply); + + // ServicesTokenList Retrieves the list of services tokens + rpc ServicesTokenList (ServicesTokenList.Request) returns (stream ServicesTokenList.Reply); + + // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents + rpc ReplicationServiceRegisterGroup (ReplicationServiceRegisterGroup.Request) returns (ReplicationServiceRegisterGroup.Reply); + + // PeerList returns a list of P2P peers + rpc PeerList(PeerList.Request) returns (PeerList.Reply); + + // AttachmentPrepare ... + rpc AttachmentPrepare(stream AttachmentPrepare.Request) returns (AttachmentPrepare.Reply); + + // AttachmentRetrieve returns an attachment data + rpc AttachmentRetrieve(AttachmentRetrieve.Request) returns (stream AttachmentRetrieve.Reply); +} + + enum GroupType { // GroupTypeUndefined indicates that the value has not been set. For example, happens if group is replicated. GroupTypeUndefined = 0; @@ -169,7 +281,7 @@ message GroupMetadata { // sig is the signature of the payload, it depends on the event_type for the used key bytes sig = 3; - // protocol_metadata is protocol layer data + // protocol_metadata is protocol layer data ProtocolMetadata protocol_metadata = 4; } @@ -210,7 +322,7 @@ message EncryptedMessage { // plaintext is the app layer data bytes plaintext = 1; - // protocol_metadata is protocol layer data + // protocol_metadata is protocol layer data ProtocolMetadata protocol_metadata = 2; } @@ -1180,7 +1292,7 @@ message AttachmentPrepare { /* Header data: ** IMPORTANT: The first request must contain the header data and no block. Header data in following requests will be ignored */ - + // disable_encryption tells the protocol to store the file as plain text bool disable_encryption = 2; } diff --git a/api/bertyprotocol.yaml b/api/protocoltypes.yaml similarity index 100% rename from api/bertyprotocol.yaml rename to api/protocoltypes.yaml diff --git a/docs/Makefile b/docs/Makefile index d5eb79a095..55643ab150 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -35,8 +35,9 @@ $(gen_sum): $(gen_src) protoc_opts := -I ../api:`go list -m -mod=mod -f {{.Dir}} github.com/grpc-ecosystem/grpc-gateway`/third_party/googleapis:`go list -m -mod=mod -f {{.Dir}} github.com/gogo/protobuf`:/protobuf .PHONY: generate_local generate_local: - protoc $(protoc_opts) --doc_out=./protocol --doc_opt=markdown,api.md.tmp ../api/bertyprotocol.proto ../api/bertytypes.proto - protoc $(protoc_opts) --doc_out=./messenger --doc_opt=markdown,api.md.tmp ../api/bertymessenger.proto + mkdir -p protocol messenger + protoc $(protoc_opts) --doc_out=./protocol --doc_opt=markdown,api.md.tmp ../api/protocoltypes.proto + protoc $(protoc_opts) --doc_out=./messenger --doc_opt=markdown,api.md.tmp ../api/messengertypes.proto @# repace multiple empty lines with one cat protocol/api.md.tmp | sed '/^$$/N;/^\n$$/D' > protocol/api.md cat messenger/api.md.tmp | sed '/^$$/N;/^\n$$/D' > messenger/api.md @@ -45,27 +46,31 @@ generate_local: mv $(gen_sum).tmp $(gen_sum) @# FIXME: patch file with version @# FIXME: use allow_merge=true (requires v2) - protoc $(protoc_opts) --swagger_out=logtostderr=true,grpc_api_configuration=../api/bertyprotocol.yaml:./protocol ../api/bertyprotocol.proto - protoc $(protoc_opts) --swagger_out=logtostderr=true,grpc_api_configuration=../api/bertymessenger.yaml:./messenger ../api/bertymessenger.proto + protoc $(protoc_opts) --swagger_out=logtostderr=true,grpc_api_configuration=../api/protocoltypes.yaml:./protocol ../api/protocoltypes.proto + protoc $(protoc_opts) --swagger_out=logtostderr=true,grpc_api_configuration=../api/messengertypes.yaml:./messenger ../api/messengertypes.proto + mv protocol/api.md apis/protocoltypes.md + mv messenger/api.md apis/messengertypes.md + mv messenger/messengertypes.swagger.json apis/ + mv protocol/protocoltypes.swagger.json apis/ .PHONY: openapi.prepare openapi.prepare: gen.sum mkdir -p .tmp/openapi - cat ./messenger/bertymessenger.swagger.json | jq '.info.version="'$(VERSION)'"' > .tmp/openapi/bertymessenger.swagger.json - cat ./protocol/bertyprotocol.swagger.json | jq '.info.version="'$(VERSION)'"' > .tmp/openapi/bertyprotocol.swagger.json + cat ./messenger/messengertypes.swagger.json | jq '.info.version="'$(VERSION)'"' > .tmp/openapi/messengertypes.swagger.json + cat ./protocol/protocoltypes.swagger.json | jq '.info.version="'$(VERSION)'"' > .tmp/openapi/protocoltypes.swagger.json cat .tmp/openapi/*.swagger.json | jq .info.version BUMP_TOKEN ?= .PHONY: bump.validate bump.validate: openapi.prepare @# gem install bump-cli - bump validate --token=$(BUMP_TOKEN) --doc=f3c48f1c-2b5b-4d3f-9ddb-40f6cf09b905 .tmp/openapi/bertymessenger.swagger.json - bump validate --token=$(BUMP_TOKEN) --doc=6eb1bb1e-c65d-4b73-a8c4-0e545742f6db .tmp/openapi/bertyprotocol.swagger.json + bump validate --token=$(BUMP_TOKEN) --doc=f3c48f1c-2b5b-4d3f-9ddb-40f6cf09b905 .tmp/openapi/messengertypes.swagger.json + bump validate --token=$(BUMP_TOKEN) --doc=6eb1bb1e-c65d-4b73-a8c4-0e545742f6db .tmp/openapi/protocoltypes.swagger.json .PHONY: bump.deploy bump.deploy: bump.validate @# gem install bump-cli - bump deploy --token=$(BUMP_TOKEN) --doc=f3c48f1c-2b5b-4d3f-9ddb-40f6cf09b905 .tmp/openapi/bertymessenger.swagger.json - bump deploy --token=$(BUMP_TOKEN) --doc=6eb1bb1e-c65d-4b73-a8c4-0e545742f6db .tmp/openapi/bertyprotocol.swagger.json + bump deploy --token=$(BUMP_TOKEN) --doc=f3c48f1c-2b5b-4d3f-9ddb-40f6cf09b905 .tmp/openapi/messengertypes.swagger.json + bump deploy --token=$(BUMP_TOKEN) --doc=6eb1bb1e-c65d-4b73-a8c4-0e545742f6db .tmp/openapi/protocoltypes.swagger.json .PHONY: tidy tidy: diff --git a/docs/messenger/api.md b/docs/apis/messengertypes.md similarity index 88% rename from docs/messenger/api.md rename to docs/apis/messengertypes.md index 0e5f619e31..8dfdddff20 100644 --- a/docs/messenger/api.md +++ b/docs/apis/messengertypes.md @@ -3,7 +3,7 @@ ## Table of Contents -- [bertymessenger.proto](#bertymessenger.proto) +- [messengertypes.proto](#messengertypes.proto) - [Account](#berty.messenger.v1.Account) - [AccountGet](#berty.messenger.v1.AccountGet) - [AccountGet.Reply](#berty.messenger.v1.AccountGet.Reply) @@ -26,6 +26,7 @@ - [BertyGroup](#berty.messenger.v1.BertyGroup) - [BertyID](#berty.messenger.v1.BertyID) - [BertyLink](#berty.messenger.v1.BertyLink) + - [BertyLink.Encrypted](#berty.messenger.v1.BertyLink.Encrypted) - [Contact](#berty.messenger.v1.Contact) - [ContactAccept](#berty.messenger.v1.ContactAccept) - [ContactAccept.Reply](#berty.messenger.v1.ContactAccept.Reply) @@ -76,6 +77,13 @@ - [Interaction](#berty.messenger.v1.Interaction) - [LocalConversationState](#berty.messenger.v1.LocalConversationState) - [LocalDatabaseState](#berty.messenger.v1.LocalDatabaseState) + - [Media](#berty.messenger.v1.Media) + - [MediaPrepare](#berty.messenger.v1.MediaPrepare) + - [MediaPrepare.Reply](#berty.messenger.v1.MediaPrepare.Reply) + - [MediaPrepare.Request](#berty.messenger.v1.MediaPrepare.Request) + - [MediaRetrieve](#berty.messenger.v1.MediaRetrieve) + - [MediaRetrieve.Reply](#berty.messenger.v1.MediaRetrieve.Reply) + - [MediaRetrieve.Request](#berty.messenger.v1.MediaRetrieve.Request) - [Member](#berty.messenger.v1.Member) - [ParseDeepLink](#berty.messenger.v1.ParseDeepLink) - [ParseDeepLink.Reply](#berty.messenger.v1.ParseDeepLink.Reply) @@ -112,6 +120,7 @@ - [StreamEvent.InteractionDeleted](#berty.messenger.v1.StreamEvent.InteractionDeleted) - [StreamEvent.InteractionUpdated](#berty.messenger.v1.StreamEvent.InteractionUpdated) - [StreamEvent.ListEnded](#berty.messenger.v1.StreamEvent.ListEnded) + - [StreamEvent.MediaUpdated](#berty.messenger.v1.StreamEvent.MediaUpdated) - [StreamEvent.MemberUpdated](#berty.messenger.v1.StreamEvent.MemberUpdated) - [StreamEvent.Notified](#berty.messenger.v1.StreamEvent.Notified) - [StreamEvent.Notified.Basic](#berty.messenger.v1.StreamEvent.Notified.Basic) @@ -128,6 +137,7 @@ - [BertyLink.Kind](#berty.messenger.v1.BertyLink.Kind) - [Contact.State](#berty.messenger.v1.Contact.State) - [Conversation.Type](#berty.messenger.v1.Conversation.Type) + - [Media.State](#berty.messenger.v1.Media.State) - [StreamEvent.Notified.Type](#berty.messenger.v1.StreamEvent.Notified.Type) - [StreamEvent.Type](#berty.messenger.v1.StreamEvent.Type) @@ -135,10 +145,10 @@ - [Scalar Value Types](#scalar-value-types) - +

Top

-## bertymessenger.proto +## messengertypes.proto @@ -189,12 +199,14 @@ ### AppMessage +AppMessage is the app layer format | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | type | [AppMessage.Type](#berty.messenger.v1.AppMessage.Type) | | | | payload | [bytes](#bytes) | | | | sent_date | [int64](#int64) | | | +| medias | [Media](#berty.messenger.v1.Media) | repeated | | @@ -218,7 +230,7 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| event | [berty.types.v1.MonitorGroup.EventMonitor](#berty.types.v1.MonitorGroup.EventMonitor) | | | +| event | [berty.protocol.v1.MonitorGroup.EventMonitor](#berty.protocol.v1.MonitorGroup.EventMonitor) | | | @@ -290,7 +302,7 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| group | [berty.types.v1.Group](#berty.types.v1.Group) | | | +| group | [berty.protocol.v1.Group](#berty.protocol.v1.Group) | | | | display_name | [string](#string) | | | @@ -311,7 +323,33 @@ | ----- | ---- | ----- | ----------- | | kind | [BertyLink.Kind](#berty.messenger.v1.BertyLink.Kind) | | | | berty_id | [BertyID](#berty.messenger.v1.BertyID) | | | -| berty_group | [BertyGroup](#berty.messenger.v1.BertyGroup) | | bool enc = 4; | +| berty_group | [BertyGroup](#berty.messenger.v1.BertyGroup) | | | +| encrypted | [BertyLink.Encrypted](#berty.messenger.v1.BertyLink.Encrypted) | | | + + + +### BertyLink.Encrypted +Encrypted is a clear structure containing clear and encrypted fields. + +We prefer to use a clear struct with encrypted fields instead of a simple +encrypted struct, to improves chances of having a valid structure even +with an invalid passphase. This will force an attacker to have more resources +to test more false-positive guesses. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| kind | [BertyLink.Kind](#berty.messenger.v1.BertyLink.Kind) | | kind is a clear representation of the unencrypted link type. | +| nonce | [bytes](#bytes) | | nonce is a clear field used by scrypt as "salt" to derive the passphrase and also used by cipher.NewCTR as "iv" to initialize a stream cipher. | +| display_name | [string](#string) | | display_name is an optional clear representation of the display name. | +| contact_public_rendezvous_seed | [bytes](#bytes) | | | +| contact_account_pk | [bytes](#bytes) | | | +| contact_display_name | [bytes](#bytes) | | | +| group_public_key | [bytes](#bytes) | | | +| group_secret | [bytes](#bytes) | | | +| group_secret_sig | [bytes](#bytes) | | | +| group_type | [berty.protocol.v1.GroupType](#berty.protocol.v1.GroupType) | | clear | +| group_sign_pub | [bytes](#bytes) | | | +| group_display_name | [bytes](#bytes) | | | @@ -369,6 +407,7 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | link | [string](#string) | | | +| passphrase | [bytes](#bytes) | | optional passphase to decrypt link | @@ -446,6 +485,7 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | link | [string](#string) | | | +| passphrase | [bytes](#bytes) | | optional passphase to decrypt link | @@ -637,6 +677,7 @@ TODO: return cid | type | [AppMessage.Type](#berty.messenger.v1.AppMessage.Type) | | | | payload | [bytes](#bytes) | | | | conversation_public_key | [string](#string) | | | +| media_cids | [string](#string) | repeated | | @@ -656,6 +697,7 @@ TODO: return cid | sent_date | [int64](#int64) | | | | acknowledged | [bool](#bool) | | | | target_cid | [string](#string) | | | +| medias | [Media](#berty.messenger.v1.Media) | repeated | | @@ -680,6 +722,62 @@ TODO: return cid | local_conversations_state | [LocalConversationState](#berty.messenger.v1.LocalConversationState) | repeated | | | account_link | [string](#string) | | | + + +### Media + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| cid | [string](#string) | | | +| mime_type | [string](#string) | | | +| filename | [string](#string) | | | +| display_name | [string](#string) | | | +| interaction_cid | [string](#string) | | these should not be sent on the bertyprotocol layer | +| state | [Media.State](#berty.messenger.v1.Media.State) | | | + + + +### MediaPrepare + + + +### MediaPrepare.Reply + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| cid | [string](#string) | | | + + + +### MediaPrepare.Request + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| block | [bytes](#bytes) | | | +| info | [Media](#berty.messenger.v1.Media) | | | +| uri | [string](#string) | | | + + + +### MediaRetrieve + + + +### MediaRetrieve.Reply + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| block | [bytes](#bytes) | | | +| info | [Media](#berty.messenger.v1.Media) | | | + + + +### MediaRetrieve.Request + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| cid | [string](#string) | | | + ### Member @@ -714,6 +812,7 @@ Composite primary key | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | link | [string](#string) | | | +| passphrase | [bytes](#bytes) | | optional passphase to decrypt link | @@ -931,6 +1030,14 @@ Composite primary key ### StreamEvent.ListEnded + + +### StreamEvent.MediaUpdated + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| media | [Media](#berty.messenger.v1.Media) | | | + ### StreamEvent.MemberUpdated @@ -1005,7 +1112,7 @@ Composite primary key | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| process | [berty.types.v1.SystemInfo.Process](#berty.types.v1.SystemInfo.Process) | | | +| process | [berty.protocol.v1.SystemInfo.Process](#berty.protocol.v1.SystemInfo.Process) | | | | warns | [string](#string) | repeated | | | protocol_in_same_process | [bool](#bool) | | | | db | [SystemInfo.DB](#berty.messenger.v1.SystemInfo.DB) | | | @@ -1016,7 +1123,7 @@ Composite primary key | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| protocol | [berty.types.v1.SystemInfo.Reply](#berty.types.v1.SystemInfo.Reply) | | | +| protocol | [berty.protocol.v1.SystemInfo.Reply](#berty.protocol.v1.SystemInfo.Reply) | | | | messenger | [SystemInfo.Messenger](#berty.messenger.v1.SystemInfo.Messenger) | | | @@ -1039,7 +1146,7 @@ Composite primary key | TypeSetUserInfo | 5 | | | TypeAcknowledge | 6 | | | TypeReplyOptions | 7 | | -| TypeMonitorMetadata | 8 | | +| TypeMonitorMetadata | 100 | these shouldn't be sent on the network | @@ -1050,6 +1157,7 @@ Composite primary key | UnknownKind | 0 | | | ContactInviteV1Kind | 1 | | | GroupV1Kind | 2 | | +| EncryptedV1Kind | 3 | | @@ -1074,6 +1182,21 @@ Composite primary key | ContactType | 2 | | | MultiMemberType | 3 | | + + +### Media.State + +| Name | Number | Description | +| ---- | ------ | ----------- | +| StateUnknown | 0 | | +| StateNeverDownloaded | 1 | specific to media received | +| StatePartiallyDownloaded | 2 | | +| StateDownloaded | 3 | | +| StateInCache | 4 | | +| StateInvalidCrypto | 5 | | +| StatePrepared | 100 | specific to media sent | +| StateAttached | 101 | | + ### StreamEvent.Notified.Type @@ -1103,6 +1226,7 @@ Composite primary key | TypeMemberUpdated | 8 | | | TypeDeviceUpdated | 9 | | | TypeNotified | 10 | | +| TypeMediaUpdated | 11 | | @@ -1137,12 +1261,14 @@ Today, most of the Berty Messenger logic is implemented directly in the applicat | Interact | [Interact.Request](#berty.messenger.v1.Interact.Request) | [Interact.Reply](#berty.messenger.v1.Interact.Reply) | | | ConversationOpen | [ConversationOpen.Request](#berty.messenger.v1.ConversationOpen.Request) | [ConversationOpen.Reply](#berty.messenger.v1.ConversationOpen.Reply) | | | ConversationClose | [ConversationClose.Request](#berty.messenger.v1.ConversationClose.Request) | [ConversationClose.Reply](#berty.messenger.v1.ConversationClose.Reply) | | -| ServicesTokenList | [.berty.types.v1.ServicesTokenList.Request](#berty.types.v1.ServicesTokenList.Request) | [.berty.types.v1.ServicesTokenList.Reply](#berty.types.v1.ServicesTokenList.Reply) stream | ServicesTokenList Retrieves the list of service server tokens | +| ServicesTokenList | [.berty.protocol.v1.ServicesTokenList.Request](#berty.protocol.v1.ServicesTokenList.Request) | [.berty.protocol.v1.ServicesTokenList.Reply](#berty.protocol.v1.ServicesTokenList.Reply) stream | ServicesTokenList Retrieves the list of service server tokens | | ReplicationServiceRegisterGroup | [ReplicationServiceRegisterGroup.Request](#berty.messenger.v1.ReplicationServiceRegisterGroup.Request) | [ReplicationServiceRegisterGroup.Reply](#berty.messenger.v1.ReplicationServiceRegisterGroup.Reply) | ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents | | ReplicationSetAutoEnable | [ReplicationSetAutoEnable.Request](#berty.messenger.v1.ReplicationSetAutoEnable.Request) | [ReplicationSetAutoEnable.Reply](#berty.messenger.v1.ReplicationSetAutoEnable.Reply) | ReplicationSetAutoEnable Sets whether new groups should be replicated automatically or not | | BannerQuote | [BannerQuote.Request](#berty.messenger.v1.BannerQuote.Request) | [BannerQuote.Reply](#berty.messenger.v1.BannerQuote.Reply) | BannerQuote returns the quote of the day. | | GetUsername | [GetUsername.Request](#berty.messenger.v1.GetUsername.Request) | [GetUsername.Reply](#berty.messenger.v1.GetUsername.Reply) | GetUsername returns the name of the device/user using Android/iOS/universal API | | InstanceExportData | [InstanceExportData.Request](#berty.messenger.v1.InstanceExportData.Request) | [InstanceExportData.Reply](#berty.messenger.v1.InstanceExportData.Reply) stream | InstanceExportData exports instance data | +| MediaPrepare | [MediaPrepare.Request](#berty.messenger.v1.MediaPrepare.Request) stream | [MediaPrepare.Reply](#berty.messenger.v1.MediaPrepare.Reply) | MediaPrepare allows to upload a file and returns a cid to attach to messages | +| MediaRetrieve | [MediaRetrieve.Request](#berty.messenger.v1.MediaRetrieve.Request) | [MediaRetrieve.Reply](#berty.messenger.v1.MediaRetrieve.Reply) stream | MediaRetrieve allows to download a file attached to a message | diff --git a/docs/messenger/bertymessenger.swagger.json b/docs/apis/messengertypes.swagger.json similarity index 87% rename from docs/messenger/bertymessenger.swagger.json rename to docs/apis/messengertypes.swagger.json index 183a8b477a..3706855261 100644 --- a/docs/messenger/bertymessenger.swagger.json +++ b/docs/apis/messengertypes.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "bertymessenger.proto", + "title": "messengertypes.proto", "version": "version not set" }, "consumes": [ @@ -597,6 +597,82 @@ ] } }, + "/berty.messenger.v1/MessengerService/MediaPrepare": { + "post": { + "summary": "MediaPrepare allows to upload a file and returns a cid to attach to messages", + "operationId": "MessengerService_MediaPrepare", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1MediaPrepareReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "body", + "description": " (streaming inputs)", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1MediaPrepareRequest" + } + } + ], + "tags": [ + "MessengerService" + ] + } + }, + "/berty.messenger.v1/MessengerService/MediaRetrieve": { + "post": { + "summary": "MediaRetrieve allows to download a file attached to a message", + "operationId": "MessengerService_MediaRetrieve", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1MediaRetrieveReply" + }, + "error": { + "$ref": "#/definitions/runtimeStreamError" + } + }, + "title": "Stream result of v1MediaRetrieveReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1MediaRetrieveRequest" + } + } + ], + "tags": [ + "MessengerService" + ] + } + }, "/berty.messenger.v1/MessengerService/ParseDeepLink": { "post": { "summary": "ParseDeepLink parses a link in the form of berty://xxx or https://berty.tech/id# and returns a structure\nthat can be used to display information.\nThis action is read-only.", @@ -949,26 +1025,70 @@ } } }, + "BertyLinkEncrypted": { + "type": "object", + "properties": { + "kind": { + "$ref": "#/definitions/BertyLinkKind", + "description": "kind is a clear representation of the unencrypted link type." + }, + "nonce": { + "type": "string", + "format": "byte", + "description": "nonce is a clear field used by scrypt as \"salt\" to derive the passphrase and\nalso used by cipher.NewCTR as \"iv\" to initialize a stream cipher." + }, + "display_name": { + "type": "string", + "description": "display_name is an optional clear representation of the display name." + }, + "contact_public_rendezvous_seed": { + "type": "string", + "format": "byte" + }, + "contact_account_pk": { + "type": "string", + "format": "byte" + }, + "contact_display_name": { + "type": "string", + "format": "byte" + }, + "group_public_key": { + "type": "string", + "format": "byte" + }, + "group_secret": { + "type": "string", + "format": "byte" + }, + "group_secret_sig": { + "type": "string", + "format": "byte" + }, + "group_type": { + "$ref": "#/definitions/v1GroupType" + }, + "group_sign_pub": { + "type": "string", + "format": "byte" + }, + "group_display_name": { + "type": "string", + "format": "byte" + } + }, + "description": "Encrypted is a clear structure containing clear and encrypted fields.\n\nWe prefer to use a clear struct with encrypted fields instead of a simple\nencrypted struct, to improves chances of having a valid structure even\nwith an invalid passphase. This will force an attacker to have more resources\nto test more false-positive guesses." + }, "BertyLinkKind": { "type": "string", "enum": [ "UnknownKind", "ContactInviteV1Kind", - "GroupV1Kind" + "GroupV1Kind", + "EncryptedV1Kind" ], "default": "UnknownKind" }, - "ContactState": { - "type": "string", - "enum": [ - "Undefined", - "IncomingRequest", - "OutgoingRequestEnqueued", - "OutgoingRequestSent", - "Accepted" - ], - "default": "Undefined" - }, "OrbitDBReplicationStatus": { "type": "object", "properties": { @@ -1225,7 +1345,7 @@ "type": "object", "properties": { "protocol": { - "$ref": "#/definitions/bertytypesv1SystemInfoReply" + "$ref": "#/definitions/bertyprotocolv1SystemInfoReply" }, "messenger": { "$ref": "#/definitions/SystemInfoMessenger" @@ -1235,7 +1355,7 @@ "bertymessengerv1SystemInfoRequest": { "type": "object" }, - "bertytypesv1ServiceToken": { + "bertyprotocolv1ServiceToken": { "type": "object", "properties": { "token": { @@ -1256,7 +1376,7 @@ } } }, - "bertytypesv1SystemInfoReply": { + "bertyprotocolv1SystemInfoReply": { "type": "object", "properties": { "process": { @@ -1372,7 +1492,8 @@ "TypeReplyOptions", "TypeMonitorMetadata" ], - "default": "Undefined" + "default": "Undefined", + "title": "- TypeMonitorMetadata: these shouldn't be sent on the network" }, "v1BannerQuoteReply": { "type": "object", @@ -1431,6 +1552,9 @@ }, "berty_group": { "$ref": "#/definitions/v1BertyGroup" + }, + "encrypted": { + "$ref": "#/definitions/BertyLinkEncrypted" } } }, @@ -1447,7 +1571,7 @@ "$ref": "#/definitions/v1Conversation" }, "state": { - "$ref": "#/definitions/ContactState" + "$ref": "#/definitions/v1ContactState" }, "display_name": { "type": "string" @@ -1495,9 +1619,25 @@ "properties": { "link": { "type": "string" + }, + "passphrase": { + "type": "string", + "format": "byte", + "title": "optional passphase to decrypt link" } } }, + "v1ContactState": { + "type": "string", + "enum": [ + "Undefined", + "IncomingRequest", + "OutgoingRequestEnqueued", + "OutgoingRequestSent", + "Accepted" + ], + "default": "Undefined" + }, "v1Conversation": { "type": "object", "properties": { @@ -1608,6 +1748,11 @@ "properties": { "link": { "type": "string" + }, + "passphrase": { + "type": "string", + "format": "byte", + "title": "optional passphase to decrypt link" } } }, @@ -1833,6 +1978,12 @@ }, "conversation_public_key": { "type": "string" + }, + "media_cids": { + "type": "array", + "items": { + "type": "string" + } } } }, @@ -1876,9 +2027,97 @@ }, "target_cid": { "type": "string" + }, + "medias": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Media" + } + } + } + }, + "v1Media": { + "type": "object", + "properties": { + "cid": { + "type": "string" + }, + "mime_type": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "interaction_cid": { + "type": "string", + "title": "these should not be sent on the bertyprotocol layer" + }, + "state": { + "$ref": "#/definitions/v1MediaState" } } }, + "v1MediaPrepareReply": { + "type": "object", + "properties": { + "cid": { + "type": "string" + } + } + }, + "v1MediaPrepareRequest": { + "type": "object", + "properties": { + "block": { + "type": "string", + "format": "byte" + }, + "info": { + "$ref": "#/definitions/v1Media" + }, + "uri": { + "type": "string" + } + } + }, + "v1MediaRetrieveReply": { + "type": "object", + "properties": { + "block": { + "type": "string", + "format": "byte" + }, + "info": { + "$ref": "#/definitions/v1Media" + } + } + }, + "v1MediaRetrieveRequest": { + "type": "object", + "properties": { + "cid": { + "type": "string" + } + } + }, + "v1MediaState": { + "type": "string", + "enum": [ + "StateUnknown", + "StateNeverDownloaded", + "StatePartiallyDownloaded", + "StateDownloaded", + "StateInCache", + "StateInvalidCrypto", + "StatePrepared", + "StateAttached" + ], + "default": "StateUnknown", + "title": "- StateNeverDownloaded: specific to media received\n - StatePrepared: specific to media sent" + }, "v1Member": { "type": "object", "properties": { @@ -1922,6 +2161,11 @@ "properties": { "link": { "type": "string" + }, + "passphrase": { + "type": "string", + "format": "byte", + "title": "optional passphase to decrypt link" } } }, @@ -2030,7 +2274,7 @@ "type": "string" }, "service": { - "$ref": "#/definitions/bertytypesv1ServiceToken" + "$ref": "#/definitions/bertyprotocolv1ServiceToken" } } }, @@ -2092,7 +2336,8 @@ "TypeAccountUpdated", "TypeMemberUpdated", "TypeDeviceUpdated", - "TypeNotified" + "TypeNotified", + "TypeMediaUpdated" ], "default": "Undefined" } diff --git a/docs/protocol/api.md b/docs/apis/protocoltypes.md similarity index 55% rename from docs/protocol/api.md rename to docs/apis/protocoltypes.md index 9654cab7d3..dd5dd8d79e 100644 --- a/docs/protocol/api.md +++ b/docs/apis/protocoltypes.md @@ -3,265 +3,205 @@ ## Table of Contents -- [bertyprotocol.proto](#bertyprotocol.proto) - - [ProtocolService](#berty.protocol.v1.ProtocolService) +- [protocoltypes.proto](#protocoltypes.proto) + - [Account](#berty.protocol.v1.Account) + - [AccountContactBlocked](#berty.protocol.v1.AccountContactBlocked) + - [AccountContactRequestAccepted](#berty.protocol.v1.AccountContactRequestAccepted) + - [AccountContactRequestDisabled](#berty.protocol.v1.AccountContactRequestDisabled) + - [AccountContactRequestDiscarded](#berty.protocol.v1.AccountContactRequestDiscarded) + - [AccountContactRequestEnabled](#berty.protocol.v1.AccountContactRequestEnabled) + - [AccountContactRequestEnqueued](#berty.protocol.v1.AccountContactRequestEnqueued) + - [AccountContactRequestReceived](#berty.protocol.v1.AccountContactRequestReceived) + - [AccountContactRequestReferenceReset](#berty.protocol.v1.AccountContactRequestReferenceReset) + - [AccountContactRequestSent](#berty.protocol.v1.AccountContactRequestSent) + - [AccountContactUnblocked](#berty.protocol.v1.AccountContactUnblocked) + - [AccountGroupJoined](#berty.protocol.v1.AccountGroupJoined) + - [AccountGroupLeft](#berty.protocol.v1.AccountGroupLeft) + - [AccountServiceTokenAdded](#berty.protocol.v1.AccountServiceTokenAdded) + - [AccountServiceTokenRemoved](#berty.protocol.v1.AccountServiceTokenRemoved) + - [ActivateGroup](#berty.protocol.v1.ActivateGroup) + - [ActivateGroup.Reply](#berty.protocol.v1.ActivateGroup.Reply) + - [ActivateGroup.Request](#berty.protocol.v1.ActivateGroup.Request) + - [AppMessageSend](#berty.protocol.v1.AppMessageSend) + - [AppMessageSend.Reply](#berty.protocol.v1.AppMessageSend.Reply) + - [AppMessageSend.Request](#berty.protocol.v1.AppMessageSend.Request) + - [AppMetadata](#berty.protocol.v1.AppMetadata) + - [AppMetadataSend](#berty.protocol.v1.AppMetadataSend) + - [AppMetadataSend.Reply](#berty.protocol.v1.AppMetadataSend.Reply) + - [AppMetadataSend.Request](#berty.protocol.v1.AppMetadataSend.Request) + - [AttachmentPrepare](#berty.protocol.v1.AttachmentPrepare) + - [AttachmentPrepare.Reply](#berty.protocol.v1.AttachmentPrepare.Reply) + - [AttachmentPrepare.Request](#berty.protocol.v1.AttachmentPrepare.Request) + - [AttachmentRetrieve](#berty.protocol.v1.AttachmentRetrieve) + - [AttachmentRetrieve.Reply](#berty.protocol.v1.AttachmentRetrieve.Reply) + - [AttachmentRetrieve.Request](#berty.protocol.v1.AttachmentRetrieve.Request) + - [AuthServiceCompleteFlow](#berty.protocol.v1.AuthServiceCompleteFlow) + - [AuthServiceCompleteFlow.Reply](#berty.protocol.v1.AuthServiceCompleteFlow.Reply) + - [AuthServiceCompleteFlow.Request](#berty.protocol.v1.AuthServiceCompleteFlow.Request) + - [AuthServiceInitFlow](#berty.protocol.v1.AuthServiceInitFlow) + - [AuthServiceInitFlow.Reply](#berty.protocol.v1.AuthServiceInitFlow.Reply) + - [AuthServiceInitFlow.Request](#berty.protocol.v1.AuthServiceInitFlow.Request) + - [ContactAddAliasKey](#berty.protocol.v1.ContactAddAliasKey) + - [ContactAliasKeySend](#berty.protocol.v1.ContactAliasKeySend) + - [ContactAliasKeySend.Reply](#berty.protocol.v1.ContactAliasKeySend.Reply) + - [ContactAliasKeySend.Request](#berty.protocol.v1.ContactAliasKeySend.Request) + - [ContactBlock](#berty.protocol.v1.ContactBlock) + - [ContactBlock.Reply](#berty.protocol.v1.ContactBlock.Reply) + - [ContactBlock.Request](#berty.protocol.v1.ContactBlock.Request) + - [ContactRequestAccept](#berty.protocol.v1.ContactRequestAccept) + - [ContactRequestAccept.Reply](#berty.protocol.v1.ContactRequestAccept.Reply) + - [ContactRequestAccept.Request](#berty.protocol.v1.ContactRequestAccept.Request) + - [ContactRequestDisable](#berty.protocol.v1.ContactRequestDisable) + - [ContactRequestDisable.Reply](#berty.protocol.v1.ContactRequestDisable.Reply) + - [ContactRequestDisable.Request](#berty.protocol.v1.ContactRequestDisable.Request) + - [ContactRequestDiscard](#berty.protocol.v1.ContactRequestDiscard) + - [ContactRequestDiscard.Reply](#berty.protocol.v1.ContactRequestDiscard.Reply) + - [ContactRequestDiscard.Request](#berty.protocol.v1.ContactRequestDiscard.Request) + - [ContactRequestEnable](#berty.protocol.v1.ContactRequestEnable) + - [ContactRequestEnable.Reply](#berty.protocol.v1.ContactRequestEnable.Reply) + - [ContactRequestEnable.Request](#berty.protocol.v1.ContactRequestEnable.Request) + - [ContactRequestReference](#berty.protocol.v1.ContactRequestReference) + - [ContactRequestReference.Reply](#berty.protocol.v1.ContactRequestReference.Reply) + - [ContactRequestReference.Request](#berty.protocol.v1.ContactRequestReference.Request) + - [ContactRequestResetReference](#berty.protocol.v1.ContactRequestResetReference) + - [ContactRequestResetReference.Reply](#berty.protocol.v1.ContactRequestResetReference.Reply) + - [ContactRequestResetReference.Request](#berty.protocol.v1.ContactRequestResetReference.Request) + - [ContactRequestSend](#berty.protocol.v1.ContactRequestSend) + - [ContactRequestSend.Reply](#berty.protocol.v1.ContactRequestSend.Reply) + - [ContactRequestSend.Request](#berty.protocol.v1.ContactRequestSend.Request) + - [ContactUnblock](#berty.protocol.v1.ContactUnblock) + - [ContactUnblock.Reply](#berty.protocol.v1.ContactUnblock.Reply) + - [ContactUnblock.Request](#berty.protocol.v1.ContactUnblock.Request) + - [DeactivateGroup](#berty.protocol.v1.DeactivateGroup) + - [DeactivateGroup.Reply](#berty.protocol.v1.DeactivateGroup.Reply) + - [DeactivateGroup.Request](#berty.protocol.v1.DeactivateGroup.Request) + - [DebugGroup](#berty.protocol.v1.DebugGroup) + - [DebugGroup.Reply](#berty.protocol.v1.DebugGroup.Reply) + - [DebugGroup.Request](#berty.protocol.v1.DebugGroup.Request) + - [DebugInspectGroupStore](#berty.protocol.v1.DebugInspectGroupStore) + - [DebugInspectGroupStore.Reply](#berty.protocol.v1.DebugInspectGroupStore.Reply) + - [DebugInspectGroupStore.Request](#berty.protocol.v1.DebugInspectGroupStore.Request) + - [DebugListGroups](#berty.protocol.v1.DebugListGroups) + - [DebugListGroups.Reply](#berty.protocol.v1.DebugListGroups.Reply) + - [DebugListGroups.Request](#berty.protocol.v1.DebugListGroups.Request) + - [DeviceSecret](#berty.protocol.v1.DeviceSecret) + - [EncryptedMessage](#berty.protocol.v1.EncryptedMessage) + - [EventContext](#berty.protocol.v1.EventContext) + - [Group](#berty.protocol.v1.Group) + - [GroupAddAdditionalRendezvousSeed](#berty.protocol.v1.GroupAddAdditionalRendezvousSeed) + - [GroupAddDeviceSecret](#berty.protocol.v1.GroupAddDeviceSecret) + - [GroupAddMemberDevice](#berty.protocol.v1.GroupAddMemberDevice) + - [GroupEnvelope](#berty.protocol.v1.GroupEnvelope) + - [GroupHeadsExport](#berty.protocol.v1.GroupHeadsExport) + - [GroupInfo](#berty.protocol.v1.GroupInfo) + - [GroupInfo.Reply](#berty.protocol.v1.GroupInfo.Reply) + - [GroupInfo.Request](#berty.protocol.v1.GroupInfo.Request) + - [GroupMessageEvent](#berty.protocol.v1.GroupMessageEvent) + - [GroupMessageList](#berty.protocol.v1.GroupMessageList) + - [GroupMessageList.Request](#berty.protocol.v1.GroupMessageList.Request) + - [GroupMetadata](#berty.protocol.v1.GroupMetadata) + - [GroupMetadataEvent](#berty.protocol.v1.GroupMetadataEvent) + - [GroupMetadataList](#berty.protocol.v1.GroupMetadataList) + - [GroupMetadataList.Request](#berty.protocol.v1.GroupMetadataList.Request) + - [GroupRemoveAdditionalRendezvousSeed](#berty.protocol.v1.GroupRemoveAdditionalRendezvousSeed) + - [GroupReplicating](#berty.protocol.v1.GroupReplicating) + - [InstanceExportData](#berty.protocol.v1.InstanceExportData) + - [InstanceExportData.Reply](#berty.protocol.v1.InstanceExportData.Reply) + - [InstanceExportData.Request](#berty.protocol.v1.InstanceExportData.Request) + - [InstanceGetConfiguration](#berty.protocol.v1.InstanceGetConfiguration) + - [InstanceGetConfiguration.Reply](#berty.protocol.v1.InstanceGetConfiguration.Reply) + - [InstanceGetConfiguration.Request](#berty.protocol.v1.InstanceGetConfiguration.Request) + - [MessageEnvelope](#berty.protocol.v1.MessageEnvelope) + - [MessageHeaders](#berty.protocol.v1.MessageHeaders) + - [MessageHeaders.MetadataEntry](#berty.protocol.v1.MessageHeaders.MetadataEntry) + - [MonitorGroup](#berty.protocol.v1.MonitorGroup) + - [MonitorGroup.EventMonitor](#berty.protocol.v1.MonitorGroup.EventMonitor) + - [MonitorGroup.EventMonitorAdvertiseGroup](#berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup) + - [MonitorGroup.EventMonitorPeerFound](#berty.protocol.v1.MonitorGroup.EventMonitorPeerFound) + - [MonitorGroup.EventMonitorPeerJoin](#berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin) + - [MonitorGroup.EventMonitorPeerLeave](#berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave) + - [MonitorGroup.Reply](#berty.protocol.v1.MonitorGroup.Reply) + - [MonitorGroup.Request](#berty.protocol.v1.MonitorGroup.Request) + - [MultiMemberGrantAdminRole](#berty.protocol.v1.MultiMemberGrantAdminRole) + - [MultiMemberGroupAddAliasResolver](#berty.protocol.v1.MultiMemberGroupAddAliasResolver) + - [MultiMemberGroupAdminRoleGrant](#berty.protocol.v1.MultiMemberGroupAdminRoleGrant) + - [MultiMemberGroupAdminRoleGrant.Reply](#berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply) + - [MultiMemberGroupAdminRoleGrant.Request](#berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request) + - [MultiMemberGroupAliasResolverDisclose](#berty.protocol.v1.MultiMemberGroupAliasResolverDisclose) + - [MultiMemberGroupAliasResolverDisclose.Reply](#berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply) + - [MultiMemberGroupAliasResolverDisclose.Request](#berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request) + - [MultiMemberGroupCreate](#berty.protocol.v1.MultiMemberGroupCreate) + - [MultiMemberGroupCreate.Reply](#berty.protocol.v1.MultiMemberGroupCreate.Reply) + - [MultiMemberGroupCreate.Request](#berty.protocol.v1.MultiMemberGroupCreate.Request) + - [MultiMemberGroupInvitationCreate](#berty.protocol.v1.MultiMemberGroupInvitationCreate) + - [MultiMemberGroupInvitationCreate.Reply](#berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply) + - [MultiMemberGroupInvitationCreate.Request](#berty.protocol.v1.MultiMemberGroupInvitationCreate.Request) + - [MultiMemberGroupJoin](#berty.protocol.v1.MultiMemberGroupJoin) + - [MultiMemberGroupJoin.Reply](#berty.protocol.v1.MultiMemberGroupJoin.Reply) + - [MultiMemberGroupJoin.Request](#berty.protocol.v1.MultiMemberGroupJoin.Request) + - [MultiMemberGroupLeave](#berty.protocol.v1.MultiMemberGroupLeave) + - [MultiMemberGroupLeave.Reply](#berty.protocol.v1.MultiMemberGroupLeave.Reply) + - [MultiMemberGroupLeave.Request](#berty.protocol.v1.MultiMemberGroupLeave.Request) + - [MultiMemberInitialMember](#berty.protocol.v1.MultiMemberInitialMember) + - [PeerList](#berty.protocol.v1.PeerList) + - [PeerList.Peer](#berty.protocol.v1.PeerList.Peer) + - [PeerList.Reply](#berty.protocol.v1.PeerList.Reply) + - [PeerList.Request](#berty.protocol.v1.PeerList.Request) + - [PeerList.Route](#berty.protocol.v1.PeerList.Route) + - [PeerList.Stream](#berty.protocol.v1.PeerList.Stream) + - [ProtocolMetadata](#berty.protocol.v1.ProtocolMetadata) + - [ReplicationServiceRegisterGroup](#berty.protocol.v1.ReplicationServiceRegisterGroup) + - [ReplicationServiceRegisterGroup.Reply](#berty.protocol.v1.ReplicationServiceRegisterGroup.Reply) + - [ReplicationServiceRegisterGroup.Request](#berty.protocol.v1.ReplicationServiceRegisterGroup.Request) + - [ReplicationServiceReplicateGroup](#berty.protocol.v1.ReplicationServiceReplicateGroup) + - [ReplicationServiceReplicateGroup.Reply](#berty.protocol.v1.ReplicationServiceReplicateGroup.Reply) + - [ReplicationServiceReplicateGroup.Request](#berty.protocol.v1.ReplicationServiceReplicateGroup.Request) + - [ServiceToken](#berty.protocol.v1.ServiceToken) + - [ServiceTokenSupportedService](#berty.protocol.v1.ServiceTokenSupportedService) + - [ServicesTokenCode](#berty.protocol.v1.ServicesTokenCode) + - [ServicesTokenList](#berty.protocol.v1.ServicesTokenList) + - [ServicesTokenList.Reply](#berty.protocol.v1.ServicesTokenList.Reply) + - [ServicesTokenList.Request](#berty.protocol.v1.ServicesTokenList.Request) + - [ShareableContact](#berty.protocol.v1.ShareableContact) + - [SystemInfo](#berty.protocol.v1.SystemInfo) + - [SystemInfo.OrbitDB](#berty.protocol.v1.SystemInfo.OrbitDB) + - [SystemInfo.OrbitDB.ReplicationStatus](#berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus) + - [SystemInfo.P2P](#berty.protocol.v1.SystemInfo.P2P) + - [SystemInfo.Process](#berty.protocol.v1.SystemInfo.Process) + - [SystemInfo.Reply](#berty.protocol.v1.SystemInfo.Reply) + - [SystemInfo.Request](#berty.protocol.v1.SystemInfo.Request) -- [bertytypes.proto](#bertytypes.proto) - - [Account](#berty.types.v1.Account) - - [AccountContactBlocked](#berty.types.v1.AccountContactBlocked) - - [AccountContactRequestAccepted](#berty.types.v1.AccountContactRequestAccepted) - - [AccountContactRequestDisabled](#berty.types.v1.AccountContactRequestDisabled) - - [AccountContactRequestDiscarded](#berty.types.v1.AccountContactRequestDiscarded) - - [AccountContactRequestEnabled](#berty.types.v1.AccountContactRequestEnabled) - - [AccountContactRequestEnqueued](#berty.types.v1.AccountContactRequestEnqueued) - - [AccountContactRequestReceived](#berty.types.v1.AccountContactRequestReceived) - - [AccountContactRequestReferenceReset](#berty.types.v1.AccountContactRequestReferenceReset) - - [AccountContactRequestSent](#berty.types.v1.AccountContactRequestSent) - - [AccountContactUnblocked](#berty.types.v1.AccountContactUnblocked) - - [AccountGroupJoined](#berty.types.v1.AccountGroupJoined) - - [AccountGroupLeft](#berty.types.v1.AccountGroupLeft) - - [AccountServiceTokenAdded](#berty.types.v1.AccountServiceTokenAdded) - - [AccountServiceTokenRemoved](#berty.types.v1.AccountServiceTokenRemoved) - - [ActivateGroup](#berty.types.v1.ActivateGroup) - - [ActivateGroup.Reply](#berty.types.v1.ActivateGroup.Reply) - - [ActivateGroup.Request](#berty.types.v1.ActivateGroup.Request) - - [AppMessageSend](#berty.types.v1.AppMessageSend) - - [AppMessageSend.Reply](#berty.types.v1.AppMessageSend.Reply) - - [AppMessageSend.Request](#berty.types.v1.AppMessageSend.Request) - - [AppMetadata](#berty.types.v1.AppMetadata) - - [AppMetadataSend](#berty.types.v1.AppMetadataSend) - - [AppMetadataSend.Reply](#berty.types.v1.AppMetadataSend.Reply) - - [AppMetadataSend.Request](#berty.types.v1.AppMetadataSend.Request) - - [AttachmentPrepare](#berty.types.v1.AttachmentPrepare) - - [AttachmentPrepare.Reply](#berty.types.v1.AttachmentPrepare.Reply) - - [AttachmentPrepare.Request](#berty.types.v1.AttachmentPrepare.Request) - - [AttachmentRetrieve](#berty.types.v1.AttachmentRetrieve) - - [AttachmentRetrieve.Reply](#berty.types.v1.AttachmentRetrieve.Reply) - - [AttachmentRetrieve.Request](#berty.types.v1.AttachmentRetrieve.Request) - - [AuthServiceCompleteFlow](#berty.types.v1.AuthServiceCompleteFlow) - - [AuthServiceCompleteFlow.Reply](#berty.types.v1.AuthServiceCompleteFlow.Reply) - - [AuthServiceCompleteFlow.Request](#berty.types.v1.AuthServiceCompleteFlow.Request) - - [AuthServiceInitFlow](#berty.types.v1.AuthServiceInitFlow) - - [AuthServiceInitFlow.Reply](#berty.types.v1.AuthServiceInitFlow.Reply) - - [AuthServiceInitFlow.Request](#berty.types.v1.AuthServiceInitFlow.Request) - - [ContactAddAliasKey](#berty.types.v1.ContactAddAliasKey) - - [ContactAliasKeySend](#berty.types.v1.ContactAliasKeySend) - - [ContactAliasKeySend.Reply](#berty.types.v1.ContactAliasKeySend.Reply) - - [ContactAliasKeySend.Request](#berty.types.v1.ContactAliasKeySend.Request) - - [ContactBlock](#berty.types.v1.ContactBlock) - - [ContactBlock.Reply](#berty.types.v1.ContactBlock.Reply) - - [ContactBlock.Request](#berty.types.v1.ContactBlock.Request) - - [ContactRequestAccept](#berty.types.v1.ContactRequestAccept) - - [ContactRequestAccept.Reply](#berty.types.v1.ContactRequestAccept.Reply) - - [ContactRequestAccept.Request](#berty.types.v1.ContactRequestAccept.Request) - - [ContactRequestDisable](#berty.types.v1.ContactRequestDisable) - - [ContactRequestDisable.Reply](#berty.types.v1.ContactRequestDisable.Reply) - - [ContactRequestDisable.Request](#berty.types.v1.ContactRequestDisable.Request) - - [ContactRequestDiscard](#berty.types.v1.ContactRequestDiscard) - - [ContactRequestDiscard.Reply](#berty.types.v1.ContactRequestDiscard.Reply) - - [ContactRequestDiscard.Request](#berty.types.v1.ContactRequestDiscard.Request) - - [ContactRequestEnable](#berty.types.v1.ContactRequestEnable) - - [ContactRequestEnable.Reply](#berty.types.v1.ContactRequestEnable.Reply) - - [ContactRequestEnable.Request](#berty.types.v1.ContactRequestEnable.Request) - - [ContactRequestReference](#berty.types.v1.ContactRequestReference) - - [ContactRequestReference.Reply](#berty.types.v1.ContactRequestReference.Reply) - - [ContactRequestReference.Request](#berty.types.v1.ContactRequestReference.Request) - - [ContactRequestResetReference](#berty.types.v1.ContactRequestResetReference) - - [ContactRequestResetReference.Reply](#berty.types.v1.ContactRequestResetReference.Reply) - - [ContactRequestResetReference.Request](#berty.types.v1.ContactRequestResetReference.Request) - - [ContactRequestSend](#berty.types.v1.ContactRequestSend) - - [ContactRequestSend.Reply](#berty.types.v1.ContactRequestSend.Reply) - - [ContactRequestSend.Request](#berty.types.v1.ContactRequestSend.Request) - - [ContactUnblock](#berty.types.v1.ContactUnblock) - - [ContactUnblock.Reply](#berty.types.v1.ContactUnblock.Reply) - - [ContactUnblock.Request](#berty.types.v1.ContactUnblock.Request) - - [DeactivateGroup](#berty.types.v1.DeactivateGroup) - - [DeactivateGroup.Reply](#berty.types.v1.DeactivateGroup.Reply) - - [DeactivateGroup.Request](#berty.types.v1.DeactivateGroup.Request) - - [DebugGroup](#berty.types.v1.DebugGroup) - - [DebugGroup.Reply](#berty.types.v1.DebugGroup.Reply) - - [DebugGroup.Request](#berty.types.v1.DebugGroup.Request) - - [DebugInspectGroupStore](#berty.types.v1.DebugInspectGroupStore) - - [DebugInspectGroupStore.Reply](#berty.types.v1.DebugInspectGroupStore.Reply) - - [DebugInspectGroupStore.Request](#berty.types.v1.DebugInspectGroupStore.Request) - - [DebugListGroups](#berty.types.v1.DebugListGroups) - - [DebugListGroups.Reply](#berty.types.v1.DebugListGroups.Reply) - - [DebugListGroups.Request](#berty.types.v1.DebugListGroups.Request) - - [DeviceSecret](#berty.types.v1.DeviceSecret) - - [EncryptedMessage](#berty.types.v1.EncryptedMessage) - - [EventContext](#berty.types.v1.EventContext) - - [Group](#berty.types.v1.Group) - - [GroupAddAdditionalRendezvousSeed](#berty.types.v1.GroupAddAdditionalRendezvousSeed) - - [GroupAddDeviceSecret](#berty.types.v1.GroupAddDeviceSecret) - - [GroupAddMemberDevice](#berty.types.v1.GroupAddMemberDevice) - - [GroupEnvelope](#berty.types.v1.GroupEnvelope) - - [GroupHeadsExport](#berty.types.v1.GroupHeadsExport) - - [GroupInfo](#berty.types.v1.GroupInfo) - - [GroupInfo.Reply](#berty.types.v1.GroupInfo.Reply) - - [GroupInfo.Request](#berty.types.v1.GroupInfo.Request) - - [GroupMessageEvent](#berty.types.v1.GroupMessageEvent) - - [GroupMessageList](#berty.types.v1.GroupMessageList) - - [GroupMessageList.Request](#berty.types.v1.GroupMessageList.Request) - - [GroupMetadata](#berty.types.v1.GroupMetadata) - - [GroupMetadataEvent](#berty.types.v1.GroupMetadataEvent) - - [GroupMetadataList](#berty.types.v1.GroupMetadataList) - - [GroupMetadataList.Request](#berty.types.v1.GroupMetadataList.Request) - - [GroupRemoveAdditionalRendezvousSeed](#berty.types.v1.GroupRemoveAdditionalRendezvousSeed) - - [GroupReplicating](#berty.types.v1.GroupReplicating) - - [InstanceExportData](#berty.types.v1.InstanceExportData) - - [InstanceExportData.Reply](#berty.types.v1.InstanceExportData.Reply) - - [InstanceExportData.Request](#berty.types.v1.InstanceExportData.Request) - - [InstanceGetConfiguration](#berty.types.v1.InstanceGetConfiguration) - - [InstanceGetConfiguration.Reply](#berty.types.v1.InstanceGetConfiguration.Reply) - - [InstanceGetConfiguration.Request](#berty.types.v1.InstanceGetConfiguration.Request) - - [MessageEnvelope](#berty.types.v1.MessageEnvelope) - - [MessageHeaders](#berty.types.v1.MessageHeaders) - - [MessageHeaders.MetadataEntry](#berty.types.v1.MessageHeaders.MetadataEntry) - - [MonitorGroup](#berty.types.v1.MonitorGroup) - - [MonitorGroup.EventMonitor](#berty.types.v1.MonitorGroup.EventMonitor) - - [MonitorGroup.EventMonitorAdvertiseGroup](#berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup) - - [MonitorGroup.EventMonitorPeerFound](#berty.types.v1.MonitorGroup.EventMonitorPeerFound) - - [MonitorGroup.EventMonitorPeerJoin](#berty.types.v1.MonitorGroup.EventMonitorPeerJoin) - - [MonitorGroup.EventMonitorPeerLeave](#berty.types.v1.MonitorGroup.EventMonitorPeerLeave) - - [MonitorGroup.Reply](#berty.types.v1.MonitorGroup.Reply) - - [MonitorGroup.Request](#berty.types.v1.MonitorGroup.Request) - - [MultiMemberGrantAdminRole](#berty.types.v1.MultiMemberGrantAdminRole) - - [MultiMemberGroupAddAliasResolver](#berty.types.v1.MultiMemberGroupAddAliasResolver) - - [MultiMemberGroupAdminRoleGrant](#berty.types.v1.MultiMemberGroupAdminRoleGrant) - - [MultiMemberGroupAdminRoleGrant.Reply](#berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply) - - [MultiMemberGroupAdminRoleGrant.Request](#berty.types.v1.MultiMemberGroupAdminRoleGrant.Request) - - [MultiMemberGroupAliasResolverDisclose](#berty.types.v1.MultiMemberGroupAliasResolverDisclose) - - [MultiMemberGroupAliasResolverDisclose.Reply](#berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply) - - [MultiMemberGroupAliasResolverDisclose.Request](#berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request) - - [MultiMemberGroupCreate](#berty.types.v1.MultiMemberGroupCreate) - - [MultiMemberGroupCreate.Reply](#berty.types.v1.MultiMemberGroupCreate.Reply) - - [MultiMemberGroupCreate.Request](#berty.types.v1.MultiMemberGroupCreate.Request) - - [MultiMemberGroupInvitationCreate](#berty.types.v1.MultiMemberGroupInvitationCreate) - - [MultiMemberGroupInvitationCreate.Reply](#berty.types.v1.MultiMemberGroupInvitationCreate.Reply) - - [MultiMemberGroupInvitationCreate.Request](#berty.types.v1.MultiMemberGroupInvitationCreate.Request) - - [MultiMemberGroupJoin](#berty.types.v1.MultiMemberGroupJoin) - - [MultiMemberGroupJoin.Reply](#berty.types.v1.MultiMemberGroupJoin.Reply) - - [MultiMemberGroupJoin.Request](#berty.types.v1.MultiMemberGroupJoin.Request) - - [MultiMemberGroupLeave](#berty.types.v1.MultiMemberGroupLeave) - - [MultiMemberGroupLeave.Reply](#berty.types.v1.MultiMemberGroupLeave.Reply) - - [MultiMemberGroupLeave.Request](#berty.types.v1.MultiMemberGroupLeave.Request) - - [MultiMemberInitialMember](#berty.types.v1.MultiMemberInitialMember) - - [PeerList](#berty.types.v1.PeerList) - - [PeerList.Peer](#berty.types.v1.PeerList.Peer) - - [PeerList.Reply](#berty.types.v1.PeerList.Reply) - - [PeerList.Request](#berty.types.v1.PeerList.Request) - - [PeerList.Route](#berty.types.v1.PeerList.Route) - - [PeerList.Stream](#berty.types.v1.PeerList.Stream) - - [ProtocolMetadata](#berty.types.v1.ProtocolMetadata) - - [ReplicationServiceRegisterGroup](#berty.types.v1.ReplicationServiceRegisterGroup) - - [ReplicationServiceRegisterGroup.Reply](#berty.types.v1.ReplicationServiceRegisterGroup.Reply) - - [ReplicationServiceRegisterGroup.Request](#berty.types.v1.ReplicationServiceRegisterGroup.Request) - - [ReplicationServiceReplicateGroup](#berty.types.v1.ReplicationServiceReplicateGroup) - - [ReplicationServiceReplicateGroup.Reply](#berty.types.v1.ReplicationServiceReplicateGroup.Reply) - - [ReplicationServiceReplicateGroup.Request](#berty.types.v1.ReplicationServiceReplicateGroup.Request) - - [ServiceToken](#berty.types.v1.ServiceToken) - - [ServiceTokenSupportedService](#berty.types.v1.ServiceTokenSupportedService) - - [ServicesTokenCode](#berty.types.v1.ServicesTokenCode) - - [ServicesTokenList](#berty.types.v1.ServicesTokenList) - - [ServicesTokenList.Reply](#berty.types.v1.ServicesTokenList.Reply) - - [ServicesTokenList.Request](#berty.types.v1.ServicesTokenList.Request) - - [ShareableContact](#berty.types.v1.ShareableContact) - - [SystemInfo](#berty.types.v1.SystemInfo) - - [SystemInfo.OrbitDB](#berty.types.v1.SystemInfo.OrbitDB) - - [SystemInfo.OrbitDB.ReplicationStatus](#berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus) - - [SystemInfo.P2P](#berty.types.v1.SystemInfo.P2P) - - [SystemInfo.Process](#berty.types.v1.SystemInfo.Process) - - [SystemInfo.Reply](#berty.types.v1.SystemInfo.Reply) - - [SystemInfo.Request](#berty.types.v1.SystemInfo.Request) + - [ContactState](#berty.protocol.v1.ContactState) + - [DebugInspectGroupLogType](#berty.protocol.v1.DebugInspectGroupLogType) + - [Direction](#berty.protocol.v1.Direction) + - [EventType](#berty.protocol.v1.EventType) + - [GroupType](#berty.protocol.v1.GroupType) + - [InstanceGetConfiguration.SettingState](#berty.protocol.v1.InstanceGetConfiguration.SettingState) + - [MonitorGroup.TypeEventMonitor](#berty.protocol.v1.MonitorGroup.TypeEventMonitor) + - [PeerList.Feature](#berty.protocol.v1.PeerList.Feature) - - [ContactState](#berty.types.v1.ContactState) - - [DebugInspectGroupLogType](#berty.types.v1.DebugInspectGroupLogType) - - [Direction](#berty.types.v1.Direction) - - [EventType](#berty.types.v1.EventType) - - [GroupType](#berty.types.v1.GroupType) - - [InstanceGetConfiguration.SettingState](#berty.types.v1.InstanceGetConfiguration.SettingState) - - [MonitorGroup.TypeEventMonitor](#berty.types.v1.MonitorGroup.TypeEventMonitor) - - [PeerList.Feature](#berty.types.v1.PeerList.Feature) + - [ProtocolService](#berty.protocol.v1.ProtocolService) - [Scalar Value Types](#scalar-value-types) - +

Top

-## bertyprotocol.proto - - - - - - - - - -### ProtocolService -ProtocolService is the top-level API to manage an instance of the Berty Protocol. -Each Berty Protocol Instance is considered as a Berty device and is associated with a Berty user. +## protocoltypes.proto -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| InstanceExportData | [.berty.types.v1.InstanceExportData.Request](#berty.types.v1.InstanceExportData.Request) | [.berty.types.v1.InstanceExportData.Reply](#berty.types.v1.InstanceExportData.Reply) stream | InstanceExportData exports instance data | -| InstanceGetConfiguration | [.berty.types.v1.InstanceGetConfiguration.Request](#berty.types.v1.InstanceGetConfiguration.Request) | [.berty.types.v1.InstanceGetConfiguration.Reply](#berty.types.v1.InstanceGetConfiguration.Reply) | InstanceGetConfiguration gets current configuration of this protocol instance | -| ContactRequestReference | [.berty.types.v1.ContactRequestReference.Request](#berty.types.v1.ContactRequestReference.Request) | [.berty.types.v1.ContactRequestReference.Reply](#berty.types.v1.ContactRequestReference.Reply) | ContactRequestReference retrieves the information required to create a reference (types.v1.ie. included in a shareable link) to the current account | -| ContactRequestDisable | [.berty.types.v1.ContactRequestDisable.Request](#berty.types.v1.ContactRequestDisable.Request) | [.berty.types.v1.ContactRequestDisable.Reply](#berty.types.v1.ContactRequestDisable.Reply) | ContactRequestDisable disables incoming contact requests | -| ContactRequestEnable | [.berty.types.v1.ContactRequestEnable.Request](#berty.types.v1.ContactRequestEnable.Request) | [.berty.types.v1.ContactRequestEnable.Reply](#berty.types.v1.ContactRequestEnable.Reply) | ContactRequestEnable enables incoming contact requests | -| ContactRequestResetReference | [.berty.types.v1.ContactRequestResetReference.Request](#berty.types.v1.ContactRequestResetReference.Request) | [.berty.types.v1.ContactRequestResetReference.Reply](#berty.types.v1.ContactRequestResetReference.Reply) | ContactRequestResetReference changes the contact request reference | -| ContactRequestSend | [.berty.types.v1.ContactRequestSend.Request](#berty.types.v1.ContactRequestSend.Request) | [.berty.types.v1.ContactRequestSend.Reply](#berty.types.v1.ContactRequestSend.Reply) | ContactRequestSend attempt to send a contact request | -| ContactRequestAccept | [.berty.types.v1.ContactRequestAccept.Request](#berty.types.v1.ContactRequestAccept.Request) | [.berty.types.v1.ContactRequestAccept.Reply](#berty.types.v1.ContactRequestAccept.Reply) | ContactRequestAccept accepts a contact request | -| ContactRequestDiscard | [.berty.types.v1.ContactRequestDiscard.Request](#berty.types.v1.ContactRequestDiscard.Request) | [.berty.types.v1.ContactRequestDiscard.Reply](#berty.types.v1.ContactRequestDiscard.Reply) | ContactRequestDiscard ignores a contact request, without informing the other user | -| ContactBlock | [.berty.types.v1.ContactBlock.Request](#berty.types.v1.ContactBlock.Request) | [.berty.types.v1.ContactBlock.Reply](#berty.types.v1.ContactBlock.Reply) | ContactBlock blocks a contact from sending requests | -| ContactUnblock | [.berty.types.v1.ContactUnblock.Request](#berty.types.v1.ContactUnblock.Request) | [.berty.types.v1.ContactUnblock.Reply](#berty.types.v1.ContactUnblock.Reply) | ContactUnblock unblocks a contact from sending requests | -| ContactAliasKeySend | [.berty.types.v1.ContactAliasKeySend.Request](#berty.types.v1.ContactAliasKeySend.Request) | [.berty.types.v1.ContactAliasKeySend.Reply](#berty.types.v1.ContactAliasKeySend.Reply) | ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group | -| MultiMemberGroupCreate | [.berty.types.v1.MultiMemberGroupCreate.Request](#berty.types.v1.MultiMemberGroupCreate.Request) | [.berty.types.v1.MultiMemberGroupCreate.Reply](#berty.types.v1.MultiMemberGroupCreate.Reply) | MultiMemberGroupCreate creates a new multi-member group | -| MultiMemberGroupJoin | [.berty.types.v1.MultiMemberGroupJoin.Request](#berty.types.v1.MultiMemberGroupJoin.Request) | [.berty.types.v1.MultiMemberGroupJoin.Reply](#berty.types.v1.MultiMemberGroupJoin.Reply) | MultiMemberGroupJoin joins a multi-member group | -| MultiMemberGroupLeave | [.berty.types.v1.MultiMemberGroupLeave.Request](#berty.types.v1.MultiMemberGroupLeave.Request) | [.berty.types.v1.MultiMemberGroupLeave.Reply](#berty.types.v1.MultiMemberGroupLeave.Reply) | MultiMemberGroupLeave leaves a multi-member group | -| MultiMemberGroupAliasResolverDisclose | [.berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request](#berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request) | [.berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply](#berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply) | MultiMemberGroupAliasResolverDisclose discloses your alias resolver key | -| MultiMemberGroupAdminRoleGrant | [.berty.types.v1.MultiMemberGroupAdminRoleGrant.Request](#berty.types.v1.MultiMemberGroupAdminRoleGrant.Request) | [.berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply](#berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply) | MultiMemberGroupAdminRoleGrant grants an admin role to a group member | -| MultiMemberGroupInvitationCreate | [.berty.types.v1.MultiMemberGroupInvitationCreate.Request](#berty.types.v1.MultiMemberGroupInvitationCreate.Request) | [.berty.types.v1.MultiMemberGroupInvitationCreate.Reply](#berty.types.v1.MultiMemberGroupInvitationCreate.Reply) | MultiMemberGroupInvitationCreate creates an invitation to a multi-member group | -| AppMetadataSend | [.berty.types.v1.AppMetadataSend.Request](#berty.types.v1.AppMetadataSend.Request) | [.berty.types.v1.AppMetadataSend.Reply](#berty.types.v1.AppMetadataSend.Reply) | AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members | -| AppMessageSend | [.berty.types.v1.AppMessageSend.Request](#berty.types.v1.AppMessageSend.Request) | [.berty.types.v1.AppMessageSend.Reply](#berty.types.v1.AppMessageSend.Reply) | AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members | -| GroupMetadataList | [.berty.types.v1.GroupMetadataList.Request](#berty.types.v1.GroupMetadataList.Request) | [.berty.types.v1.GroupMetadataEvent](#berty.types.v1.GroupMetadataEvent) stream | GroupMetadataList replays previous and subscribes to new metadata events from the group | -| GroupMessageList | [.berty.types.v1.GroupMessageList.Request](#berty.types.v1.GroupMessageList.Request) | [.berty.types.v1.GroupMessageEvent](#berty.types.v1.GroupMessageEvent) stream | GroupMessageList replays previous and subscribes to new message events from the group | -| GroupInfo | [.berty.types.v1.GroupInfo.Request](#berty.types.v1.GroupInfo.Request) | [.berty.types.v1.GroupInfo.Reply](#berty.types.v1.GroupInfo.Reply) | GroupInfo retrieves information about a group | -| ActivateGroup | [.berty.types.v1.ActivateGroup.Request](#berty.types.v1.ActivateGroup.Request) | [.berty.types.v1.ActivateGroup.Reply](#berty.types.v1.ActivateGroup.Reply) | ActivateGroup explicitly opens a group | -| DeactivateGroup | [.berty.types.v1.DeactivateGroup.Request](#berty.types.v1.DeactivateGroup.Request) | [.berty.types.v1.DeactivateGroup.Reply](#berty.types.v1.DeactivateGroup.Reply) | DeactivateGroup closes a group | -| MonitorGroup | [.berty.types.v1.MonitorGroup.Request](#berty.types.v1.MonitorGroup.Request) | [.berty.types.v1.MonitorGroup.Reply](#berty.types.v1.MonitorGroup.Reply) stream | Monitor Group events | -| DebugListGroups | [.berty.types.v1.DebugListGroups.Request](#berty.types.v1.DebugListGroups.Request) | [.berty.types.v1.DebugListGroups.Reply](#berty.types.v1.DebugListGroups.Reply) stream | | -| DebugInspectGroupStore | [.berty.types.v1.DebugInspectGroupStore.Request](#berty.types.v1.DebugInspectGroupStore.Request) | [.berty.types.v1.DebugInspectGroupStore.Reply](#berty.types.v1.DebugInspectGroupStore.Reply) stream | | -| DebugGroup | [.berty.types.v1.DebugGroup.Request](#berty.types.v1.DebugGroup.Request) | [.berty.types.v1.DebugGroup.Reply](#berty.types.v1.DebugGroup.Reply) | | -| SystemInfo | [.berty.types.v1.SystemInfo.Request](#berty.types.v1.SystemInfo.Request) | [.berty.types.v1.SystemInfo.Reply](#berty.types.v1.SystemInfo.Reply) | | -| AuthServiceInitFlow | [.berty.types.v1.AuthServiceInitFlow.Request](#berty.types.v1.AuthServiceInitFlow.Request) | [.berty.types.v1.AuthServiceInitFlow.Reply](#berty.types.v1.AuthServiceInitFlow.Reply) | AuthServiceInitFlow Initialize an authentication flow | -| AuthServiceCompleteFlow | [.berty.types.v1.AuthServiceCompleteFlow.Request](#berty.types.v1.AuthServiceCompleteFlow.Request) | [.berty.types.v1.AuthServiceCompleteFlow.Reply](#berty.types.v1.AuthServiceCompleteFlow.Reply) | AuthServiceCompleteFlow Completes an authentication flow | -| ServicesTokenList | [.berty.types.v1.ServicesTokenList.Request](#berty.types.v1.ServicesTokenList.Request) | [.berty.types.v1.ServicesTokenList.Reply](#berty.types.v1.ServicesTokenList.Reply) stream | ServicesTokenList Retrieves the list of services tokens | -| ReplicationServiceRegisterGroup | [.berty.types.v1.ReplicationServiceRegisterGroup.Request](#berty.types.v1.ReplicationServiceRegisterGroup.Request) | [.berty.types.v1.ReplicationServiceRegisterGroup.Reply](#berty.types.v1.ReplicationServiceRegisterGroup.Reply) | ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents | -| PeerList | [.berty.types.v1.PeerList.Request](#berty.types.v1.PeerList.Request) | [.berty.types.v1.PeerList.Reply](#berty.types.v1.PeerList.Reply) | PeerList returns a list of P2P peers | -| AttachmentPrepare | [.berty.types.v1.AttachmentPrepare.Request](#berty.types.v1.AttachmentPrepare.Request) stream | [.berty.types.v1.AttachmentPrepare.Reply](#berty.types.v1.AttachmentPrepare.Reply) | AttachmentPrepare ... | -| AttachmentRetrieve | [.berty.types.v1.AttachmentRetrieve.Request](#berty.types.v1.AttachmentRetrieve.Request) | [.berty.types.v1.AttachmentRetrieve.Reply](#berty.types.v1.AttachmentRetrieve.Reply) stream | AttachmentRetrieve returns an attachment data | - - - - -

Top

- -## bertytypes.proto - - + ### Account Account describes all the secrets that identifies an Account | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| group | [Group](#berty.types.v1.Group) | | group specifies which group is used to manage the account | +| group | [Group](#berty.protocol.v1.Group) | | group specifies which group is used to manage the account | | account_private_key | [bytes](#bytes) | | account_private_key, private part is used to signs handshake, signs device, create contacts group keys via ECDH -- public part is used to have a shareable identity | | alias_private_key | [bytes](#bytes) | | alias_private_key, private part is use to derive group members private keys, signs alias proofs, public part can be shared to contacts to prove identity | | public_rendezvous_seed | [bytes](#bytes) | | public_rendezvous_seed, rendezvous seed used for direct communication | - + ### AccountContactBlocked AccountContactBlocked indicates that a contact is blocked @@ -271,7 +211,7 @@ AccountContactBlocked indicates that a contact is blocked | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | contact_pk | [bytes](#bytes) | | contact_pk is the contact blocked | - + ### AccountContactRequestAccepted This event should be followed by an AccountGroupJoined event @@ -284,7 +224,7 @@ AccountContactRequestAccepted indicates that a contact request has been accepted | contact_pk | [bytes](#bytes) | | contact_pk is the contact whom request is accepted | | group_pk | [bytes](#bytes) | | group_pk is the 1to1 group with the requester user | - + ### AccountContactRequestDisabled AccountContactRequestDisabled indicates that the account should not be advertised on a public rendezvous point @@ -293,7 +233,7 @@ AccountContactRequestDisabled indicates that the account should not be advertise | ----- | ---- | ----- | ----------- | | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | - + ### AccountContactRequestDiscarded AccountContactRequestDiscarded indicates that a contact request has been refused @@ -303,7 +243,7 @@ AccountContactRequestDiscarded indicates that a contact request has been refused | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | contact_pk | [bytes](#bytes) | | contact_pk is the contact whom request is refused | - + ### AccountContactRequestEnabled AccountContactRequestDisabled indicates that the account should be advertised on a public rendezvous point @@ -312,7 +252,7 @@ AccountContactRequestDisabled indicates that the account should be advertised on | ----- | ---- | ----- | ----------- | | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | - + ### AccountContactRequestEnqueued This event should be followed by an AccountGroupJoined event @@ -324,10 +264,10 @@ AccountContactRequestEnqueued indicates that the account will attempt to send a | ----- | ---- | ----- | ----------- | | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | group_pk | [bytes](#bytes) | | group_pk is the 1to1 group with the requested user | -| contact | [ShareableContact](#berty.types.v1.ShareableContact) | | contact is a message describing how to connect to the other account | +| contact | [ShareableContact](#berty.protocol.v1.ShareableContact) | | contact is a message describing how to connect to the other account | | own_metadata | [bytes](#bytes) | | own_metadata is the identifying metadata that will be shared to the other account | - + ### AccountContactRequestReceived AccountContactRequestReceived indicates that the account has received a new contact request @@ -339,7 +279,7 @@ AccountContactRequestReceived indicates that the account has received a new cont | contact_rendezvous_seed | [bytes](#bytes) | | TODO: is this necessary? contact_rendezvous_seed is the rendezvous seed of the contact sending the request | | contact_metadata | [bytes](#bytes) | | TODO: is this necessary? contact_metadata is the metadata specific to the app to identify the contact for the request | - + ### AccountContactRequestReferenceReset AccountContactRequestDisabled indicates that the account should be advertised on different public rendezvous points @@ -349,7 +289,7 @@ AccountContactRequestDisabled indicates that the account should be advertised on | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | public_rendezvous_seed | [bytes](#bytes) | | public_rendezvous_seed is the new rendezvous point seed | - + ### AccountContactRequestSent AccountContactRequestSent indicates that the account has sent a contact request @@ -359,7 +299,7 @@ AccountContactRequestSent indicates that the account has sent a contact request | device_pk | [bytes](#bytes) | | device_pk is the device sending the account event, signs the message | | contact_pk | [bytes](#bytes) | | contact_pk is the contacted account | - + ### AccountContactUnblocked AccountContactUnblocked indicates that a contact is unblocked @@ -369,7 +309,7 @@ AccountContactUnblocked indicates that a contact is unblocked | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | contact_pk | [bytes](#bytes) | | contact_pk is the contact unblocked | - + ### AccountGroupJoined AccountGroupJoined indicates that the account is now part of a new group @@ -377,9 +317,9 @@ AccountGroupJoined indicates that the account is now part of a new group | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | -| group | [Group](#berty.types.v1.Group) | | group describe the joined group | +| group | [Group](#berty.protocol.v1.Group) | | group describe the joined group | - + ### AccountGroupLeft AccountGroupJoined indicates that the account has left a group @@ -389,7 +329,7 @@ AccountGroupJoined indicates that the account has left a group | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | group_pk | [bytes](#bytes) | | group_pk references the group left | - + ### AccountServiceTokenAdded AccountServiceTokenAdded indicates a token has been added to the account @@ -397,9 +337,9 @@ AccountServiceTokenAdded indicates a token has been added to the account | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | -| service_token | [ServiceToken](#berty.types.v1.ServiceToken) | | | +| service_token | [ServiceToken](#berty.protocol.v1.ServiceToken) | | | - + ### AccountServiceTokenRemoved AccountServiceTokenRemoved indicates a token has removed @@ -409,15 +349,15 @@ AccountServiceTokenRemoved indicates a token has removed | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | token_id | [string](#string) | | | - + ### ActivateGroup - + ### ActivateGroup.Reply - + ### ActivateGroup.Request @@ -426,15 +366,15 @@ AccountServiceTokenRemoved indicates a token has removed | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | | local_only | [bool](#bool) | | local_only will open the group without enabling network interactions with other members | - + ### AppMessageSend - + ### AppMessageSend.Reply - + ### AppMessageSend.Request @@ -444,7 +384,7 @@ AccountServiceTokenRemoved indicates a token has removed | payload | [bytes](#bytes) | | payload is the payload to send | | attachment_cids | [bytes](#bytes) | repeated | attachment_cids is a list of attachment cids | - + ### AppMetadata AppMetadata is an app defined message, accessible to future group members @@ -454,15 +394,15 @@ AppMetadata is an app defined message, accessible to future group members | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | message | [bytes](#bytes) | | message is the payload | - + ### AppMetadataSend - + ### AppMetadataSend.Reply - + ### AppMetadataSend.Request @@ -472,11 +412,11 @@ AppMetadata is an app defined message, accessible to future group members | payload | [bytes](#bytes) | | payload is the payload to send | | attachment_cids | [bytes](#bytes) | repeated | attachment_cids is a list of attachment cids | - + ### AttachmentPrepare - + ### AttachmentPrepare.Reply @@ -484,7 +424,7 @@ AppMetadata is an app defined message, accessible to future group members | ----- | ---- | ----- | ----------- | | attachment_cid | [bytes](#bytes) | | attachment_cid is the cid of the (encrypted) file | - + ### AttachmentPrepare.Request @@ -493,11 +433,11 @@ AppMetadata is an app defined message, accessible to future group members | block | [bytes](#bytes) | | block is a plaintext block to append | | disable_encryption | [bool](#bool) | | disable_encryption tells the protocol to store the file as plain text | - + ### AttachmentRetrieve - + ### AttachmentRetrieve.Reply @@ -505,7 +445,7 @@ AppMetadata is an app defined message, accessible to future group members | ----- | ---- | ----- | ----------- | | block | [bytes](#bytes) | | block is a plaintext block to append | - + ### AttachmentRetrieve.Request @@ -513,15 +453,15 @@ AppMetadata is an app defined message, accessible to future group members | ----- | ---- | ----- | ----------- | | attachment_cid | [bytes](#bytes) | | attachment_cid is the cid of the (encrypted) file | - + ### AuthServiceCompleteFlow - + ### AuthServiceCompleteFlow.Reply - + ### AuthServiceCompleteFlow.Request @@ -529,11 +469,11 @@ AppMetadata is an app defined message, accessible to future group members | ----- | ---- | ----- | ----------- | | callback_url | [string](#string) | | | - + ### AuthServiceInitFlow - + ### AuthServiceInitFlow.Reply @@ -542,7 +482,7 @@ AppMetadata is an app defined message, accessible to future group members | url | [string](#string) | | | | secure_url | [bool](#bool) | | | - + ### AuthServiceInitFlow.Request @@ -550,7 +490,7 @@ AppMetadata is an app defined message, accessible to future group members | ----- | ---- | ----- | ----------- | | auth_url | [string](#string) | | | - + ### ContactAddAliasKey ContactAddAliasKey is an event type where ones shares their alias public key @@ -560,15 +500,15 @@ ContactAddAliasKey is an event type where ones shares their alias public key | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message | | alias_pk | [bytes](#bytes) | | alias_pk is the alias key which will be used to verify a contact identity | - + ### ContactAliasKeySend - + ### ContactAliasKeySend.Reply - + ### ContactAliasKeySend.Request @@ -576,15 +516,15 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | contact_pk is the identifier of the contact to send the alias public key to | - + ### ContactBlock - + ### ContactBlock.Reply - + ### ContactBlock.Request @@ -592,15 +532,15 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | contact_pk | [bytes](#bytes) | | contact_pk is the identifier of the contact to block | - + ### ContactRequestAccept - + ### ContactRequestAccept.Reply - + ### ContactRequestAccept.Request @@ -608,27 +548,27 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | contact_pk | [bytes](#bytes) | | contact_pk is the identifier of the contact to accept the request from | - + ### ContactRequestDisable - + ### ContactRequestDisable.Reply - + ### ContactRequestDisable.Request - + ### ContactRequestDiscard - + ### ContactRequestDiscard.Reply - + ### ContactRequestDiscard.Request @@ -636,11 +576,11 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | contact_pk | [bytes](#bytes) | | contact_pk is the identifier of the contact to ignore the request from | - + ### ContactRequestEnable - + ### ContactRequestEnable.Reply @@ -648,15 +588,15 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | public_rendezvous_seed | [bytes](#bytes) | | public_rendezvous_seed is the rendezvous seed used by the current account | - + ### ContactRequestEnable.Request - + ### ContactRequestReference - + ### ContactRequestReference.Reply @@ -665,15 +605,15 @@ ContactAddAliasKey is an event type where ones shares their alias public key | public_rendezvous_seed | [bytes](#bytes) | | public_rendezvous_seed is the rendezvous seed used by the current account | | enabled | [bool](#bool) | | enabled indicates if incoming contact requests are enabled | - + ### ContactRequestReference.Request - + ### ContactRequestResetReference - + ### ContactRequestResetReference.Reply @@ -681,36 +621,36 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | public_rendezvous_seed | [bytes](#bytes) | | public_rendezvous_seed is the rendezvous seed used by the current account | - + ### ContactRequestResetReference.Request - + ### ContactRequestSend - + ### ContactRequestSend.Reply - + ### ContactRequestSend.Request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| contact | [ShareableContact](#berty.types.v1.ShareableContact) | | contact is a message describing how to connect to the other account | +| contact | [ShareableContact](#berty.protocol.v1.ShareableContact) | | contact is a message describing how to connect to the other account | | own_metadata | [bytes](#bytes) | | own_metadata is the identifying metadata that will be shared to the other account | - + ### ContactUnblock - + ### ContactUnblock.Reply - + ### ContactUnblock.Request @@ -718,15 +658,15 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | contact_pk | [bytes](#bytes) | | contact_pk is the identifier of the contact to unblock | - + ### DeactivateGroup - + ### DeactivateGroup.Reply - + ### DeactivateGroup.Request @@ -734,11 +674,11 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | - + ### DebugGroup - + ### DebugGroup.Reply @@ -746,7 +686,7 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | peer_ids | [string](#string) | repeated | peer_ids is the list of peer ids connected to the same group | - + ### DebugGroup.Request @@ -754,11 +694,11 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | - + ### DebugInspectGroupStore - + ### DebugInspectGroupStore.Reply @@ -766,38 +706,38 @@ ContactAddAliasKey is an event type where ones shares their alias public key | ----- | ---- | ----- | ----------- | | cid | [bytes](#bytes) | | cid is the CID of the IPFS log entry | | parent_cids | [bytes](#bytes) | repeated | parent_cids is the list of the parent entries | -| metadata_event_type | [EventType](#berty.types.v1.EventType) | | event_type metadata event type if subscribed to metadata events | +| metadata_event_type | [EventType](#berty.protocol.v1.EventType) | | event_type metadata event type if subscribed to metadata events | | device_pk | [bytes](#bytes) | | device_pk is the public key of the device signing the entry | | payload | [bytes](#bytes) | | payload is the un encrypted entry payload if available | - + ### DebugInspectGroupStore.Request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | -| log_type | [DebugInspectGroupLogType](#berty.types.v1.DebugInspectGroupLogType) | | log_type is the log to inspect | +| log_type | [DebugInspectGroupLogType](#berty.protocol.v1.DebugInspectGroupLogType) | | log_type is the log to inspect | - + ### DebugListGroups - + ### DebugListGroups.Reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | group_pk is the public key of the group | -| group_type | [GroupType](#berty.types.v1.GroupType) | | group_type is the type of the group | +| group_type | [GroupType](#berty.protocol.v1.GroupType) | | group_type is the type of the group | | contact_pk | [bytes](#bytes) | | contact_pk is the contact public key if appropriate | - + ### DebugListGroups.Request - + ### DeviceSecret DeviceSecret is encrypted for a specific member of the group @@ -807,7 +747,7 @@ DeviceSecret is encrypted for a specific member of the group | chain_key | [bytes](#bytes) | | chain_key is the current value of the chain key of the group device | | counter | [uint64](#uint64) | | counter is the current value of the counter of the group device | - + ### EncryptedMessage EncryptedMessage is used in MessageEnvelope and only readable by groups members that joined before the message was sent @@ -815,9 +755,9 @@ EncryptedMessage is used in MessageEnvelope and only readable by groups members | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | plaintext | [bytes](#bytes) | | plaintext is the app layer data | -| protocol_metadata | [ProtocolMetadata](#berty.types.v1.ProtocolMetadata) | | protocol_metadata is protocol layer data | +| protocol_metadata | [ProtocolMetadata](#berty.protocol.v1.ProtocolMetadata) | | protocol_metadata is protocol layer data | - + ### EventContext EventContext adds context (its id, its parents and its attachments) to an event @@ -829,7 +769,7 @@ EventContext adds context (its id, its parents and its attachments) to an event | group_pk | [bytes](#bytes) | | group_pk receiving the event | | attachment_cids | [bytes](#bytes) | repeated | attachment_cids is a list of attachment that can be retrieved | - + ### Group Group define a group and is enough to invite someone to it @@ -839,10 +779,10 @@ Group define a group and is enough to invite someone to it | public_key | [bytes](#bytes) | | public_key is the identifier of the group, it signs the group secret and the initial member of a multi-member group | | secret | [bytes](#bytes) | | secret is the symmetric secret of the group, which is used to encrypt the metadata | | secret_sig | [bytes](#bytes) | | secret_sig is the signature of the secret used to ensure the validity of the group | -| group_type | [GroupType](#berty.types.v1.GroupType) | | group_type specifies the type of the group, used to determine how device secrets are generated | +| group_type | [GroupType](#berty.protocol.v1.GroupType) | | group_type specifies the type of the group, used to determine how device secrets are generated | | sign_pub | [bytes](#bytes) | | sign_pub is the signature public key used to verify entries, not required when secret and secret_sig are provided | - + ### GroupAddAdditionalRendezvousSeed GroupAddAdditionalRendezvousSeed indicates that an additional rendezvous point should be used for data synchronization @@ -852,7 +792,7 @@ GroupAddAdditionalRendezvousSeed indicates that an additional rendezvous point s | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message, must be the device of an admin of the group | | seed | [bytes](#bytes) | | seed is the additional rendezvous point seed which should be used | - + ### GroupAddDeviceSecret GroupAddDeviceSecret is an event which indicates to a group member a device secret @@ -863,7 +803,7 @@ GroupAddDeviceSecret is an event which indicates to a group member a device secr | dest_member_pk | [bytes](#bytes) | | dest_member_pk is the member who should receive the secret | | payload | [bytes](#bytes) | | payload is the serialization of Payload encrypted for the specified member | - + ### GroupAddMemberDevice GroupAddMemberDevice is an event which indicates to a group a new device (and eventually a new member) is joining it @@ -877,7 +817,7 @@ When added on AccountGroup, this event should be followed by appropriate GroupAd TODO: signature of what ??? ensure it can't be replayed | - + ### GroupEnvelope GroupEnvelope is a publicly exposed structure containing a group metadata event @@ -888,7 +828,7 @@ GroupEnvelope is a publicly exposed structure containing a group metadata event | event | [bytes](#bytes) | | event is encrypted using a symmetric key shared among group members | | encrypted_attachment_cids | [bytes](#bytes) | repeated | encrypted_attachment_cids is a list of attachment CIDs encrypted specifically for replication services | - + ### GroupHeadsExport @@ -899,21 +839,21 @@ GroupEnvelope is a publicly exposed structure containing a group metadata event | metadata_heads_cids | [bytes](#bytes) | repeated | metadata_heads_cids are the heads of the metadata store that should be restored from an export | | messages_heads_cids | [bytes](#bytes) | repeated | messages_heads_cids are the heads of the metadata store that should be restored from an export | - + ### GroupInfo - + ### GroupInfo.Reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| group | [Group](#berty.types.v1.Group) | | group is the group invitation, containing the group pk and its type | +| group | [Group](#berty.protocol.v1.Group) | | group is the group invitation, containing the group pk and its type | | member_pk | [bytes](#bytes) | | member_pk is the identifier of the current member in the group | | device_pk | [bytes](#bytes) | | device_pk is the identifier of the current device in the group | - + ### GroupInfo.Request @@ -922,21 +862,21 @@ GroupEnvelope is a publicly exposed structure containing a group metadata event | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | | contact_pk | [bytes](#bytes) | | contact_pk is the identifier of the contact | - + ### GroupMessageEvent | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| event_context | [EventContext](#berty.types.v1.EventContext) | | event_context contains context information about the event | -| headers | [MessageHeaders](#berty.types.v1.MessageHeaders) | | headers contains headers of the secure message | +| event_context | [EventContext](#berty.protocol.v1.EventContext) | | event_context contains context information about the event | +| headers | [MessageHeaders](#berty.protocol.v1.MessageHeaders) | | headers contains headers of the secure message | | message | [bytes](#bytes) | | message contains the secure message payload | - + ### GroupMessageList - + ### GroupMessageList.Request @@ -949,33 +889,33 @@ GroupEnvelope is a publicly exposed structure containing a group metadata event | until_now | [bool](#bool) | | until_now will not list new event to come until_id must not be set | | reverse_order | [bool](#bool) | | reverse_order indicates whether the previous events should be returned in reverse chronological order | - + ### GroupMetadata GroupMetadata is used in GroupEnvelope and only readable by invited group members | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| event_type | [EventType](#berty.types.v1.EventType) | | event_type defines which event type is used | +| event_type | [EventType](#berty.protocol.v1.EventType) | | event_type defines which event type is used | | payload | [bytes](#bytes) | | the serialization depends on event_type, event is symmetrically encrypted | | sig | [bytes](#bytes) | | sig is the signature of the payload, it depends on the event_type for the used key | -| protocol_metadata | [ProtocolMetadata](#berty.types.v1.ProtocolMetadata) | | protocol_metadata is protocol layer data | +| protocol_metadata | [ProtocolMetadata](#berty.protocol.v1.ProtocolMetadata) | | protocol_metadata is protocol layer data | - + ### GroupMetadataEvent | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| event_context | [EventContext](#berty.types.v1.EventContext) | | event_context contains context information about the event | -| metadata | [GroupMetadata](#berty.types.v1.GroupMetadata) | | metadata contains the newly available metadata | +| event_context | [EventContext](#berty.protocol.v1.EventContext) | | event_context contains context information about the event | +| metadata | [GroupMetadata](#berty.protocol.v1.GroupMetadata) | | metadata contains the newly available metadata | | event | [bytes](#bytes) | | event_clear clear bytes for the event | - + ### GroupMetadataList - + ### GroupMetadataList.Request @@ -988,7 +928,7 @@ GroupMetadata is used in GroupEnvelope and only readable by invited group member | until_now | [bool](#bool) | | until_now will not list new event to come until_id must not be set | | reverse_order | [bool](#bool) | | reverse_order indicates whether the previous events should be returned in reverse chronological order | - + ### GroupRemoveAdditionalRendezvousSeed GroupRemoveAdditionalRendezvousSeed indicates that a previously added rendezvous point should be removed @@ -998,7 +938,7 @@ GroupRemoveAdditionalRendezvousSeed indicates that a previously added rendezvous | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message, must be the device of an admin of the group | | seed | [bytes](#bytes) | | seed is the additional rendezvous point seed which should be removed | - + ### GroupReplicating @@ -1008,11 +948,11 @@ GroupRemoveAdditionalRendezvousSeed indicates that a previously added rendezvous | authentication_url | [string](#string) | | authentication_url indicates which server has been used for authentication | | replication_server | [string](#string) | | replication_server indicates which server will be used for replication | - + ### InstanceExportData - + ### InstanceExportData.Reply @@ -1020,15 +960,15 @@ GroupRemoveAdditionalRendezvousSeed indicates that a previously added rendezvous | ----- | ---- | ----- | ----------- | | exported_data | [bytes](#bytes) | | | - + ### InstanceExportData.Request - + ### InstanceGetConfiguration - + ### InstanceGetConfiguration.Reply @@ -1039,16 +979,16 @@ GroupRemoveAdditionalRendezvousSeed indicates that a previously added rendezvous | account_group_pk | [bytes](#bytes) | | account_group_pk is the public key of the account group | | peer_id | [string](#string) | | | | listeners | [string](#string) | repeated | | -| ble_enabled | [InstanceGetConfiguration.SettingState](#berty.types.v1.InstanceGetConfiguration.SettingState) | | | -| wifi_p2p_enabled | [InstanceGetConfiguration.SettingState](#berty.types.v1.InstanceGetConfiguration.SettingState) | | MultiPeerConnectivity for Darwin and Nearby for Android | -| mdns_enabled | [InstanceGetConfiguration.SettingState](#berty.types.v1.InstanceGetConfiguration.SettingState) | | | -| relay_enabled | [InstanceGetConfiguration.SettingState](#berty.types.v1.InstanceGetConfiguration.SettingState) | | | +| ble_enabled | [InstanceGetConfiguration.SettingState](#berty.protocol.v1.InstanceGetConfiguration.SettingState) | | | +| wifi_p2p_enabled | [InstanceGetConfiguration.SettingState](#berty.protocol.v1.InstanceGetConfiguration.SettingState) | | MultiPeerConnectivity for Darwin and Nearby for Android | +| mdns_enabled | [InstanceGetConfiguration.SettingState](#berty.protocol.v1.InstanceGetConfiguration.SettingState) | | | +| relay_enabled | [InstanceGetConfiguration.SettingState](#berty.protocol.v1.InstanceGetConfiguration.SettingState) | | | - + ### InstanceGetConfiguration.Request - + ### MessageEnvelope MessageEnvelope is a publicly exposed structure containing a group secure message @@ -1060,7 +1000,7 @@ MessageEnvelope is a publicly exposed structure containing a group secure messag | nonce | [bytes](#bytes) | | nonce is a nonce for message headers | | encrypted_attachment_cids | [bytes](#bytes) | repeated | encrypted_attachment_cids is a list of attachment CIDs encrypted specifically for replication services | - + ### MessageHeaders MessageHeaders is used in MessageEnvelope and only readable by invited group members @@ -1070,9 +1010,9 @@ MessageHeaders is used in MessageEnvelope and only readable by invited group mem | counter | [uint64](#uint64) | | counter is the current counter value for the specified device | | device_pk | [bytes](#bytes) | | device_pk is the public key of the device sending the message | | sig | [bytes](#bytes) | | sig is the signature of the encrypted message using the device's private key | -| metadata | [MessageHeaders.MetadataEntry](#berty.types.v1.MessageHeaders.MetadataEntry) | repeated | metadata allow to pass custom informations | +| metadata | [MessageHeaders.MetadataEntry](#berty.protocol.v1.MessageHeaders.MetadataEntry) | repeated | metadata allow to pass custom informations | - + ### MessageHeaders.MetadataEntry @@ -1081,23 +1021,23 @@ MessageHeaders is used in MessageEnvelope and only readable by invited group mem | key | [string](#string) | | | | value | [string](#string) | | | - + ### MonitorGroup - + ### MonitorGroup.EventMonitor | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [MonitorGroup.TypeEventMonitor](#berty.types.v1.MonitorGroup.TypeEventMonitor) | | | -| advertise_group | [MonitorGroup.EventMonitorAdvertiseGroup](#berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup) | | | -| peer_found | [MonitorGroup.EventMonitorPeerFound](#berty.types.v1.MonitorGroup.EventMonitorPeerFound) | | | -| peer_join | [MonitorGroup.EventMonitorPeerJoin](#berty.types.v1.MonitorGroup.EventMonitorPeerJoin) | | | -| peer_leave | [MonitorGroup.EventMonitorPeerLeave](#berty.types.v1.MonitorGroup.EventMonitorPeerLeave) | | | +| type | [MonitorGroup.TypeEventMonitor](#berty.protocol.v1.MonitorGroup.TypeEventMonitor) | | | +| advertise_group | [MonitorGroup.EventMonitorAdvertiseGroup](#berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup) | | | +| peer_found | [MonitorGroup.EventMonitorPeerFound](#berty.protocol.v1.MonitorGroup.EventMonitorPeerFound) | | | +| peer_join | [MonitorGroup.EventMonitorPeerJoin](#berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin) | | | +| peer_leave | [MonitorGroup.EventMonitorPeerLeave](#berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave) | | | - + ### MonitorGroup.EventMonitorAdvertiseGroup @@ -1108,7 +1048,7 @@ MessageHeaders is used in MessageEnvelope and only readable by invited group mem | driver_name | [string](#string) | | driver_name used to advertise the peer | | topic | [string](#string) | | event topic | - + ### MonitorGroup.EventMonitorPeerFound @@ -1119,7 +1059,7 @@ MessageHeaders is used in MessageEnvelope and only readable by invited group mem | driver_name | [string](#string) | | driver_name used to found the peer | | topic | [string](#string) | | event topic | - + ### MonitorGroup.EventMonitorPeerJoin @@ -1130,7 +1070,7 @@ MessageHeaders is used in MessageEnvelope and only readable by invited group mem | topic | [string](#string) | | event topic | | is_self | [bool](#bool) | | is_self indecitate if the given peer is you | - + ### MonitorGroup.EventMonitorPeerLeave @@ -1140,16 +1080,16 @@ MessageHeaders is used in MessageEnvelope and only readable by invited group mem | topic | [string](#string) | | event topic | | is_self | [bool](#bool) | | is_self indecitate if the given peer is you | - + ### MonitorGroup.Reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| event | [MonitorGroup.EventMonitor](#berty.types.v1.MonitorGroup.EventMonitor) | | monitor event | +| event | [MonitorGroup.EventMonitor](#berty.protocol.v1.MonitorGroup.EventMonitor) | | monitor event | | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | - + ### MonitorGroup.Request @@ -1157,7 +1097,7 @@ MessageHeaders is used in MessageEnvelope and only readable by invited group mem | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | filter_group_pk, if set, will filter event by group PK | - + ### MultiMemberGrantAdminRole MultiMemberGrantAdminRole indicates that a group admin allows another group member to act as an admin @@ -1167,7 +1107,7 @@ MultiMemberGrantAdminRole indicates that a group admin allows another group memb | device_pk | [bytes](#bytes) | | device_pk is the device sending the event, signs the message, must be the device of an admin of the group | | grantee_member_pk | [bytes](#bytes) | | grantee_member_pk is the member public key of the member granted of the admin role | - + ### MultiMemberGroupAddAliasResolver MultiMemberGroupAddAliasResolver indicates that a group member want to disclose their presence in the group to their contacts @@ -1178,15 +1118,15 @@ MultiMemberGroupAddAliasResolver indicates that a group member want to disclose | alias_resolver | [bytes](#bytes) | | alias_resolver allows contact of an account to resolve the real identity behind an alias (Multi-Member Group Member) Generated by both contacts and account independently using: hmac(aliasPK, GroupID) | | alias_proof | [bytes](#bytes) | | alias_proof ensures that the associated alias_resolver has been issued by the right account Generated using aliasSKSig(GroupID) | - + ### MultiMemberGroupAdminRoleGrant - + ### MultiMemberGroupAdminRoleGrant.Reply - + ### MultiMemberGroupAdminRoleGrant.Request @@ -1195,15 +1135,15 @@ MultiMemberGroupAddAliasResolver indicates that a group member want to disclose | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | | member_pk | [bytes](#bytes) | | member_pk is the identifier of the member which will be granted the admin role | - + ### MultiMemberGroupAliasResolverDisclose - + ### MultiMemberGroupAliasResolverDisclose.Reply - + ### MultiMemberGroupAliasResolverDisclose.Request @@ -1211,11 +1151,11 @@ MultiMemberGroupAddAliasResolver indicates that a group member want to disclose | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | - + ### MultiMemberGroupCreate - + ### MultiMemberGroupCreate.Reply @@ -1223,23 +1163,23 @@ MultiMemberGroupAddAliasResolver indicates that a group member want to disclose | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | group_pk is the identifier of the newly created group | - + ### MultiMemberGroupCreate.Request - + ### MultiMemberGroupInvitationCreate - + ### MultiMemberGroupInvitationCreate.Reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| group | [Group](#berty.types.v1.Group) | | group is the invitation to the group | +| group | [Group](#berty.protocol.v1.Group) | | group is the invitation to the group | - + ### MultiMemberGroupInvitationCreate.Request @@ -1247,31 +1187,31 @@ MultiMemberGroupAddAliasResolver indicates that a group member want to disclose | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | group_pk is the identifier of the group | - + ### MultiMemberGroupJoin - + ### MultiMemberGroupJoin.Reply - + ### MultiMemberGroupJoin.Request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| group | [Group](#berty.types.v1.Group) | | group is the information of the group to join | +| group | [Group](#berty.protocol.v1.Group) | | group is the information of the group to join | - + ### MultiMemberGroupLeave - + ### MultiMemberGroupLeave.Reply - + ### MultiMemberGroupLeave.Request @@ -1279,7 +1219,7 @@ MultiMemberGroupAddAliasResolver indicates that a group member want to disclose | ----- | ---- | ----- | ----------- | | group_pk | [bytes](#bytes) | | | - + ### MultiMemberInitialMember MultiMemberInitialMember indicates that a member is the group creator, this event is signed using the group ID private key @@ -1288,37 +1228,37 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ----- | ---- | ----- | ----------- | | member_pk | [bytes](#bytes) | | member_pk is the public key of the member who is the group creator | - + ### PeerList - + ### PeerList.Peer | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [string](#string) | | id is the libp2p.PeerID. | -| routes | [PeerList.Route](#berty.types.v1.PeerList.Route) | repeated | routes are the list of active and known maddr. | +| routes | [PeerList.Route](#berty.protocol.v1.PeerList.Route) | repeated | routes are the list of active and known maddr. | | errors | [string](#string) | repeated | errors is a list of errors related to the peer. | -| features | [PeerList.Feature](#berty.types.v1.PeerList.Feature) | repeated | Features is a list of available features. | +| features | [PeerList.Feature](#berty.protocol.v1.PeerList.Feature) | repeated | Features is a list of available features. | | min_latency | [int64](#int64) | | MinLatency is the minimum latency across all the peer routes. | | is_active | [bool](#bool) | | IsActive is true if at least one of the route is active. | -| direction | [Direction](#berty.types.v1.Direction) | | Direction is the aggregate of all the routes's direction. | +| direction | [Direction](#berty.protocol.v1.Direction) | | Direction is the aggregate of all the routes's direction. | - + ### PeerList.Reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| peers | [PeerList.Peer](#berty.types.v1.PeerList.Peer) | repeated | | +| peers | [PeerList.Peer](#berty.protocol.v1.PeerList.Peer) | repeated | | - + ### PeerList.Request - + ### PeerList.Route @@ -1326,11 +1266,11 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ----- | ---- | ----- | ----------- | | is_active | [bool](#bool) | | IsActive indicates whether the address is currently used or just known. | | address | [string](#string) | | Address is the multiaddress via which we are connected with the peer. | -| direction | [Direction](#berty.types.v1.Direction) | | Direction is which way the connection was established. | +| direction | [Direction](#berty.protocol.v1.Direction) | | Direction is which way the connection was established. | | latency | [int64](#int64) | | Latency is the last known round trip time to the peer in ms. | -| streams | [PeerList.Stream](#berty.types.v1.PeerList.Stream) | repeated | Streams returns list of streams established with the peer. | +| streams | [PeerList.Stream](#berty.protocol.v1.PeerList.Stream) | repeated | Streams returns list of streams established with the peer. | - + ### PeerList.Stream @@ -1338,7 +1278,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ----- | ---- | ----- | ----------- | | id | [string](#string) | | id is an identifier used to write protocol headers in streams. | - + ### ProtocolMetadata @@ -1346,15 +1286,15 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ----- | ---- | ----- | ----------- | | attachments_secrets | [bytes](#bytes) | repeated | attachments_secrets is a list of secret keys used retrieve attachments | - + ### ReplicationServiceRegisterGroup - + ### ReplicationServiceRegisterGroup.Reply - + ### ReplicationServiceRegisterGroup.Request @@ -1363,11 +1303,11 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | token_id | [string](#string) | | | | group_pk | [bytes](#bytes) | | | - + ### ReplicationServiceReplicateGroup - + ### ReplicationServiceReplicateGroup.Reply @@ -1375,15 +1315,15 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ----- | ---- | ----- | ----------- | | ok | [bool](#bool) | | | - + ### ReplicationServiceReplicateGroup.Request | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| group | [Group](#berty.types.v1.Group) | | | +| group | [Group](#berty.protocol.v1.Group) | | | - + ### ServiceToken @@ -1391,10 +1331,10 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ----- | ---- | ----- | ----------- | | token | [string](#string) | | | | authentication_url | [string](#string) | | | -| supported_services | [ServiceTokenSupportedService](#berty.types.v1.ServiceTokenSupportedService) | repeated | | +| supported_services | [ServiceTokenSupportedService](#berty.protocol.v1.ServiceTokenSupportedService) | repeated | | | expiration | [int64](#int64) | | | - + ### ServiceTokenSupportedService @@ -1403,7 +1343,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | service_type | [string](#string) | | | | service_endpoint | [string](#string) | | | - + ### ServicesTokenCode @@ -1413,24 +1353,24 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | code_challenge | [string](#string) | | | | token_id | [string](#string) | | | - + ### ServicesTokenList - + ### ServicesTokenList.Reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | token_id | [string](#string) | | | -| service | [ServiceToken](#berty.types.v1.ServiceToken) | | | +| service | [ServiceToken](#berty.protocol.v1.ServiceToken) | | | - + ### ServicesTokenList.Request - + ### ShareableContact @@ -1440,19 +1380,19 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | public_rendezvous_seed | [bytes](#bytes) | | public_rendezvous_seed is the rendezvous seed used by the account to send a contact request to | | metadata | [bytes](#bytes) | | metadata is the metadata specific to the app to identify the contact for the request | - + ### SystemInfo - + ### SystemInfo.OrbitDB | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| account_metadata | [SystemInfo.OrbitDB.ReplicationStatus](#berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus) | | | +| account_metadata | [SystemInfo.OrbitDB.ReplicationStatus](#berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus) | | | - + ### SystemInfo.OrbitDB.ReplicationStatus @@ -1463,7 +1403,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | buffered | [int64](#int64) | | | | queued | [int64](#int64) | | | - + ### SystemInfo.P2P @@ -1471,7 +1411,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ----- | ---- | ----- | ----------- | | connected_peers | [int64](#int64) | | | - + ### SystemInfo.Process @@ -1500,24 +1440,24 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | working_dir | [string](#string) | | | | system_username | [string](#string) | | | - + ### SystemInfo.Reply | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| process | [SystemInfo.Process](#berty.types.v1.SystemInfo.Process) | | | -| p2p | [SystemInfo.P2P](#berty.types.v1.SystemInfo.P2P) | | | -| orbitdb | [SystemInfo.OrbitDB](#berty.types.v1.SystemInfo.OrbitDB) | | | +| process | [SystemInfo.Process](#berty.protocol.v1.SystemInfo.Process) | | | +| p2p | [SystemInfo.P2P](#berty.protocol.v1.SystemInfo.P2P) | | | +| orbitdb | [SystemInfo.OrbitDB](#berty.protocol.v1.SystemInfo.OrbitDB) | | | | warns | [string](#string) | repeated | | - + ### SystemInfo.Request - + ### ContactState @@ -1531,7 +1471,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | ContactStateDiscarded | 5 | | | ContactStateBlocked | 6 | | - + ### DebugInspectGroupLogType @@ -1541,7 +1481,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | DebugInspectGroupLogTypeMessage | 1 | | | DebugInspectGroupLogTypeMetadata | 2 | | - + ### Direction @@ -1552,7 +1492,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | OutboundDir | 2 | | | BiDir | 3 | | - + ### EventType @@ -1582,7 +1522,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | EventTypeGroupReplicating | 403 | EventTypeGroupReplicating indicates that the group has been registered for replication on a server | | EventTypeGroupMetadataPayloadSent | 1001 | EventTypeGroupMetadataPayloadSent indicates the payload includes an app specific event, unlike messages stored on the message store it is encrypted using a static key | - + ### GroupType @@ -1593,7 +1533,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | GroupTypeContact | 2 | GroupTypeContact is the group created between two accounts, available to all their devices. | | GroupTypeMultiMember | 3 | GroupTypeMultiMember is a group containing an undefined number of members. | - + ### InstanceGetConfiguration.SettingState @@ -1604,7 +1544,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | Disabled | 2 | | | Unavailable | 3 | | - + ### MonitorGroup.TypeEventMonitor @@ -1616,7 +1556,7 @@ MultiMemberInitialMember indicates that a member is the group creator, this even | TypeEventMonitorPeerJoin | 3 | | | TypeEventMonitorPeerLeave | 4 | | - + ### PeerList.Feature @@ -1633,6 +1573,52 @@ MultiMemberInitialMember indicates that a member is the group creator, this even + + +### ProtocolService +ProtocolService is the top-level API to manage an instance of the Berty Protocol. +Each Berty Protocol Instance is considered as a Berty device and is associated with a Berty user. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| InstanceExportData | [InstanceExportData.Request](#berty.protocol.v1.InstanceExportData.Request) | [InstanceExportData.Reply](#berty.protocol.v1.InstanceExportData.Reply) stream | InstanceExportData exports instance data | +| InstanceGetConfiguration | [InstanceGetConfiguration.Request](#berty.protocol.v1.InstanceGetConfiguration.Request) | [InstanceGetConfiguration.Reply](#berty.protocol.v1.InstanceGetConfiguration.Reply) | InstanceGetConfiguration gets current configuration of this protocol instance | +| ContactRequestReference | [ContactRequestReference.Request](#berty.protocol.v1.ContactRequestReference.Request) | [ContactRequestReference.Reply](#berty.protocol.v1.ContactRequestReference.Reply) | ContactRequestReference retrieves the information required to create a reference (ie. included in a shareable link) to the current account | +| ContactRequestDisable | [ContactRequestDisable.Request](#berty.protocol.v1.ContactRequestDisable.Request) | [ContactRequestDisable.Reply](#berty.protocol.v1.ContactRequestDisable.Reply) | ContactRequestDisable disables incoming contact requests | +| ContactRequestEnable | [ContactRequestEnable.Request](#berty.protocol.v1.ContactRequestEnable.Request) | [ContactRequestEnable.Reply](#berty.protocol.v1.ContactRequestEnable.Reply) | ContactRequestEnable enables incoming contact requests | +| ContactRequestResetReference | [ContactRequestResetReference.Request](#berty.protocol.v1.ContactRequestResetReference.Request) | [ContactRequestResetReference.Reply](#berty.protocol.v1.ContactRequestResetReference.Reply) | ContactRequestResetReference changes the contact request reference | +| ContactRequestSend | [ContactRequestSend.Request](#berty.protocol.v1.ContactRequestSend.Request) | [ContactRequestSend.Reply](#berty.protocol.v1.ContactRequestSend.Reply) | ContactRequestSend attempt to send a contact request | +| ContactRequestAccept | [ContactRequestAccept.Request](#berty.protocol.v1.ContactRequestAccept.Request) | [ContactRequestAccept.Reply](#berty.protocol.v1.ContactRequestAccept.Reply) | ContactRequestAccept accepts a contact request | +| ContactRequestDiscard | [ContactRequestDiscard.Request](#berty.protocol.v1.ContactRequestDiscard.Request) | [ContactRequestDiscard.Reply](#berty.protocol.v1.ContactRequestDiscard.Reply) | ContactRequestDiscard ignores a contact request, without informing the other user | +| ContactBlock | [ContactBlock.Request](#berty.protocol.v1.ContactBlock.Request) | [ContactBlock.Reply](#berty.protocol.v1.ContactBlock.Reply) | ContactBlock blocks a contact from sending requests | +| ContactUnblock | [ContactUnblock.Request](#berty.protocol.v1.ContactUnblock.Request) | [ContactUnblock.Reply](#berty.protocol.v1.ContactUnblock.Reply) | ContactUnblock unblocks a contact from sending requests | +| ContactAliasKeySend | [ContactAliasKeySend.Request](#berty.protocol.v1.ContactAliasKeySend.Request) | [ContactAliasKeySend.Reply](#berty.protocol.v1.ContactAliasKeySend.Reply) | ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group | +| MultiMemberGroupCreate | [MultiMemberGroupCreate.Request](#berty.protocol.v1.MultiMemberGroupCreate.Request) | [MultiMemberGroupCreate.Reply](#berty.protocol.v1.MultiMemberGroupCreate.Reply) | MultiMemberGroupCreate creates a new multi-member group | +| MultiMemberGroupJoin | [MultiMemberGroupJoin.Request](#berty.protocol.v1.MultiMemberGroupJoin.Request) | [MultiMemberGroupJoin.Reply](#berty.protocol.v1.MultiMemberGroupJoin.Reply) | MultiMemberGroupJoin joins a multi-member group | +| MultiMemberGroupLeave | [MultiMemberGroupLeave.Request](#berty.protocol.v1.MultiMemberGroupLeave.Request) | [MultiMemberGroupLeave.Reply](#berty.protocol.v1.MultiMemberGroupLeave.Reply) | MultiMemberGroupLeave leaves a multi-member group | +| MultiMemberGroupAliasResolverDisclose | [MultiMemberGroupAliasResolverDisclose.Request](#berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request) | [MultiMemberGroupAliasResolverDisclose.Reply](#berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply) | MultiMemberGroupAliasResolverDisclose discloses your alias resolver key | +| MultiMemberGroupAdminRoleGrant | [MultiMemberGroupAdminRoleGrant.Request](#berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request) | [MultiMemberGroupAdminRoleGrant.Reply](#berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply) | MultiMemberGroupAdminRoleGrant grants an admin role to a group member | +| MultiMemberGroupInvitationCreate | [MultiMemberGroupInvitationCreate.Request](#berty.protocol.v1.MultiMemberGroupInvitationCreate.Request) | [MultiMemberGroupInvitationCreate.Reply](#berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply) | MultiMemberGroupInvitationCreate creates an invitation to a multi-member group | +| AppMetadataSend | [AppMetadataSend.Request](#berty.protocol.v1.AppMetadataSend.Request) | [AppMetadataSend.Reply](#berty.protocol.v1.AppMetadataSend.Reply) | AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members | +| AppMessageSend | [AppMessageSend.Request](#berty.protocol.v1.AppMessageSend.Request) | [AppMessageSend.Reply](#berty.protocol.v1.AppMessageSend.Reply) | AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members | +| GroupMetadataList | [GroupMetadataList.Request](#berty.protocol.v1.GroupMetadataList.Request) | [GroupMetadataEvent](#berty.protocol.v1.GroupMetadataEvent) stream | GroupMetadataList replays previous and subscribes to new metadata events from the group | +| GroupMessageList | [GroupMessageList.Request](#berty.protocol.v1.GroupMessageList.Request) | [GroupMessageEvent](#berty.protocol.v1.GroupMessageEvent) stream | GroupMessageList replays previous and subscribes to new message events from the group | +| GroupInfo | [GroupInfo.Request](#berty.protocol.v1.GroupInfo.Request) | [GroupInfo.Reply](#berty.protocol.v1.GroupInfo.Reply) | GroupInfo retrieves information about a group | +| ActivateGroup | [ActivateGroup.Request](#berty.protocol.v1.ActivateGroup.Request) | [ActivateGroup.Reply](#berty.protocol.v1.ActivateGroup.Reply) | ActivateGroup explicitly opens a group | +| DeactivateGroup | [DeactivateGroup.Request](#berty.protocol.v1.DeactivateGroup.Request) | [DeactivateGroup.Reply](#berty.protocol.v1.DeactivateGroup.Reply) | DeactivateGroup closes a group | +| MonitorGroup | [MonitorGroup.Request](#berty.protocol.v1.MonitorGroup.Request) | [MonitorGroup.Reply](#berty.protocol.v1.MonitorGroup.Reply) stream | Monitor Group events | +| DebugListGroups | [DebugListGroups.Request](#berty.protocol.v1.DebugListGroups.Request) | [DebugListGroups.Reply](#berty.protocol.v1.DebugListGroups.Reply) stream | | +| DebugInspectGroupStore | [DebugInspectGroupStore.Request](#berty.protocol.v1.DebugInspectGroupStore.Request) | [DebugInspectGroupStore.Reply](#berty.protocol.v1.DebugInspectGroupStore.Reply) stream | | +| DebugGroup | [DebugGroup.Request](#berty.protocol.v1.DebugGroup.Request) | [DebugGroup.Reply](#berty.protocol.v1.DebugGroup.Reply) | | +| SystemInfo | [SystemInfo.Request](#berty.protocol.v1.SystemInfo.Request) | [SystemInfo.Reply](#berty.protocol.v1.SystemInfo.Reply) | | +| AuthServiceInitFlow | [AuthServiceInitFlow.Request](#berty.protocol.v1.AuthServiceInitFlow.Request) | [AuthServiceInitFlow.Reply](#berty.protocol.v1.AuthServiceInitFlow.Reply) | AuthServiceInitFlow Initialize an authentication flow | +| AuthServiceCompleteFlow | [AuthServiceCompleteFlow.Request](#berty.protocol.v1.AuthServiceCompleteFlow.Request) | [AuthServiceCompleteFlow.Reply](#berty.protocol.v1.AuthServiceCompleteFlow.Reply) | AuthServiceCompleteFlow Completes an authentication flow | +| ServicesTokenList | [ServicesTokenList.Request](#berty.protocol.v1.ServicesTokenList.Request) | [ServicesTokenList.Reply](#berty.protocol.v1.ServicesTokenList.Reply) stream | ServicesTokenList Retrieves the list of services tokens | +| ReplicationServiceRegisterGroup | [ReplicationServiceRegisterGroup.Request](#berty.protocol.v1.ReplicationServiceRegisterGroup.Request) | [ReplicationServiceRegisterGroup.Reply](#berty.protocol.v1.ReplicationServiceRegisterGroup.Reply) | ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents | +| PeerList | [PeerList.Request](#berty.protocol.v1.PeerList.Request) | [PeerList.Reply](#berty.protocol.v1.PeerList.Reply) | PeerList returns a list of P2P peers | +| AttachmentPrepare | [AttachmentPrepare.Request](#berty.protocol.v1.AttachmentPrepare.Request) stream | [AttachmentPrepare.Reply](#berty.protocol.v1.AttachmentPrepare.Reply) | AttachmentPrepare ... | +| AttachmentRetrieve | [AttachmentRetrieve.Request](#berty.protocol.v1.AttachmentRetrieve.Request) | [AttachmentRetrieve.Reply](#berty.protocol.v1.AttachmentRetrieve.Reply) stream | AttachmentRetrieve returns an attachment data | + ## Scalar Value Types diff --git a/docs/protocol/bertyprotocol.swagger.json b/docs/apis/protocoltypes.swagger.json similarity index 99% rename from docs/protocol/bertyprotocol.swagger.json rename to docs/apis/protocoltypes.swagger.json index f5c155e1d3..fbb9c6f67e 100644 --- a/docs/protocol/bertyprotocol.swagger.json +++ b/docs/apis/protocoltypes.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "bertyprotocol.proto", + "title": "protocoltypes.proto", "version": "version not set" }, "consumes": [ @@ -452,7 +452,7 @@ }, "/berty.protocol.v1/ProtocolService/ContactRequestReference": { "post": { - "summary": "ContactRequestReference retrieves the information required to create a reference (types.v1.ie. included in a shareable link) to the current account", + "summary": "ContactRequestReference retrieves the information required to create a reference (ie. included in a shareable link) to the current account", "operationId": "ProtocolService_ContactRequestReference", "responses": { "200": { diff --git a/docs/architecture/2020-11-27-adr-berty-grpc-bridge.txt b/docs/architecture/2020-11-27-adr-berty-grpc-bridge.txt new file mode 100644 index 0000000000..6541a276d9 --- /dev/null +++ b/docs/architecture/2020-11-27-adr-berty-grpc-bridge.txt @@ -0,0 +1,77 @@ +┌──────────────────────────────────────────────────────────────────────────────────────────┐ +│service BridgeService { │ +│ // CreateClient client a new bridge client │ +│ rpc CreateClient (CreateClient.Request) returns (CreateClient.Reply); │ +│ │ +│ // ClientInvokeUnary invoke a unary method │ +│ rpc ClientInvokeUnary (ClientInvokeUnary.Request) returns (ClientInvokeUnary.Reply); │ +│ │ +│ // CreateStream create a stream │ +│ rpc CreateClientStream (ClientCreateStream.Request) returns (ClientCreateStream.Reply); │ +│ │ +│ // Send Message over the given stream │ +│ rpc ClientStreamSend (ClientStreamSend.Request) returns (ClientStreamSend.Reply); │ +│ │ +│ // Recv message over the given stream │ +│ rpc ClientStreamRecv (ClientStreamRecv.Request) returns (ClientStreamRecv.Reply); │ +│ │ +│ // Close the given stream │ +│ rpc ClientStreamClose (ClientStreamClose.Request) returns (ClientStreamClose.Reply); │ +│} │ +└──────────────────────────────────────────────────────────────────────────────────────────┘ + │ + │ + │ + │ + │ + ┌──────────────────────┘ + │ + │ +┏━━━━━━┳───────────────┼────────────────────────────────────────────┐ ┏━━━━━━━━━━━━━━━━━━━━━━━━┳─────────────────────┐ ┏━━━━━━┳──────────────────────────────────────────────────────────────┐ +┃ JS ┃ │ │ ┃ NATIVE (ios/android) ┃ │ ┃ Go ┃ │ +┣━━━━━━┛ ◎ │ ┣━━━━━━━━━━━━━━━━━━━━━━━━┛ │ ┣━━━━━━┛ │ +│ ┌──────────────────┐ ┌──────────────┐ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ ┌────────────┐ ┌────────────────┐ ┌──────────────────┐ │ +│ │ │ │ RPC native │ │ │ ┌───────────────────────────────────────────┐│ │ │ │ │ │ │ │ │ +│ │ Bridge Service │ │ Transport │ │ │ │ ││ │ │ Buffer │ │ ClientConn │ │ Bridge Service │ │ +│ ┌─▶│ Client │────────▶│ (Unary Only) │──────────┼───────┼▶│InvokeMethod (Base64EncodedMessage: String)│├───────────┼───▶│ Listener │────▶│(Bridge Service)│────▶│ Server │──┐│ +│ │ │ │ │ │ │ │ │ ││ │ │ │ │ │ │ │ ││ +│ │ │ │ │ │ │ │ └───────────────────────────────────────────┘│ │ └────────────┘ └────────────────┘ └──────────────────┘ ││ +│ │ │ │ │ │ │ │ │ │ ││ +│ │ │ │ │ │ │ │ │ │ ││ +│ │ └──────────────────┘ └──────────────┘ │ │ │ │ ┌────────────────────────────────────────────────────────────┘│ +│ │ │ │ │ │ │ │ +│ └─────────────────────────────────────────────────┐ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ +│ ┌──────────────┐ │ │ │ │ │ │ ┌────────────────┐ │ +│ │ │ │ │ └──────────────────────────────────────────────┘ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ │ │ +│ ┌──────────────────────┐ │ │ │ │ │ │ │ │ ┌──────────────────────┐ │ +│ │ Messenger Service │ │ │ │ │ │ │ │ │ │ Messenger Service │ │ +│ │ Client │────┐ │ │ │ │ │ │ │ │ ┌──────▶│ Server │ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +│ └──────────────────────┘ │ │ │ │ │ │ │ │ │ │ └──────────────────────┘ │ +│ ┌──────────────────────┐ │ │ Bridge │ │ │ │ │ │ │ │ ┌──────────────────────┐ │ +│ │ Protocol Service │ │ │ Transport │ │ │ │ │ │GRPC ClientConn │ │ │ Protocol Service │ │ +│ │ Client │────┼───▶│(Stream/Unary)│──┘ │ │ └─▶│(Mixed Services)│───────┼──────▶│ Server │ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +│ └──────────────────────┘ │ │ │ │ │ │ │ │ └──────────────────────┘ │ +│ ┌──────────────────────┐ │ │ │ │ │ │ │ │ ┌──────────────────────┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +│ │ ... │────┘ │ │ │ │ │ │ └──────▶│ ... │ │ +│ │ │ │ │ │ │ │ │ │ │ │ +│ └──────────────────────┘ │ │ │ │ │ │ └──────────────────────┘ │ +│ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ +│ │ │ │ │ │ │ │ +│ └──────────────┘ │ │ └────────────────┘ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +└───────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────┘ diff --git a/docs/architecture/2020-11-27-adr-gomobile-ipfs.md b/docs/architecture/2020-11-27-adr-gomobile-ipfs.md new file mode 100644 index 0000000000..76e9cc0fba --- /dev/null +++ b/docs/architecture/2020-11-27-adr-gomobile-ipfs.md @@ -0,0 +1,132 @@ +# GomobileIPFS + +## concept + +### Driver +``` +┌───────────────┐ ┌───────────────┐ ┌───────────────┐ +│ │ │ │ │ │ +│ Native │ │ Init Driver │ │ Go │ +│ (IOS/Android) │────────────▶│ │───────────▶│ │ +│ │ │ │ │ │ +└───────────────┘ └───────────────┘ └───────────────┘ + │ │ + │ │ + │ │ + │ ▼ + │ ┌───────────────┐ + │ │ │ + │ implement │ Interface │ + └─────────────────────────────────────────────────▶│ (Driver) │ + │ │ + └───────────────┘ +``` + +- Go can call Native by calling **Driver** method directly +- Native can call Go Method with **Driver** `RegisterHandler` method + +#### RegisterHandler example +_example from berty_ +```go +// BackgroundTask + +type BackgroundTaskHandlerDriver interface { + RegisterHandler(BackgroundTaskHandler) +} + +type BackgroundTaskHandler interface { + HandleTask() LifeCycleBackgroundTask +} + +type BackgroundTaskDriver interface { + Execute() (success bool) +} +``` +[berty](https://github.com/berty/berty/blob/master/go/framework/bertybridge/driver_lifecycle.go) + + +##### implement in swift +```swift +// BackgroundTaskDriver implement BackgroundTaskHandler +public class BackgroundTaskDriver: BackgroundTaskHandlerDriverProtocol { + let handler: BackgroundTaskHandlerProtocol + func registerHandler(handler: BackgroundTaskHandlerProtocol) { + self.handler = handler + } + + func executeGoBackgroundTask() { + let success = self.handler.Execute() + } +} +``` +[berty](https://github.com/berty/berty/blob/master/js/ios/Berty/Sources/LifeCycle.swift#L24) + +##### Usage in gomobileipfs +user will then simply register the driver to ios background task system then pass it to go +```swift +// pseudo code bellow +// ... +backgroundDriver = BackgroundTaskDriver() + +// user register +registerLifecycleBackgroundTaskToIOS("myapp.ios.background-task", backgroundDriver) + +// go node init +let node = IPFSNode() +node.withBackgroundTaskDriver(backgroundDriver) +// ... +``` +[berty](https://github.com/berty/berty/blob/master/js/ios/Berty/AppDelegate.m#L54) + + +### GomobileIPFS \w berty + + +``` +┏━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━┓ +┃ ┃ ┃ ┃ +┃ ┃ ┃ ┃ +┃ Berty ┃ ┃ GoMobileIPFS ┃ +┃ ┃ ┃ ┃ +┃ ┃ ┃ ┃ +┗━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━┛ + │ │ + │ │ + │ ┌───────────┴────────────────────┐ + │ │ │ + │ │ │ + │ ▼ │ + │ ┌────────────┐ │ + │ │ │ │ + │ │ pkg │ │ + │ │ │ │ + │ └────────────┘ │ + │ │ │ + │ ┌────────┴─────────────┐ │ + │ ▼ ▼ │ + │ ┌────────────┐ ┌────────────┐ │ + │ │ │ │ │ │ + │ ┌──│ driver │ │ node │──┐ │ + │ │ │ │ │ │ │ │ + │ │ └────────────┘ └────────────┘ │ │ + │ │ ▲ │ │ + │ │ │ │ │ + ▼ │ │ │ ▼ + ┌────────────┐ │ │ │ ┌───────────┐ + │ │ │ │ │ │ │ + │ bridge │◀─┴─────────┼───────────────────────────────┴──▶│ bind │ + │ │ │ │ │ + └────────────┘ │ └───────────┘ + │ │ │ + │ │ │ + │ │ │ + gobind │ │ │ gobind + │ │ │ + │ │ │ + ▼ │ ▼ + ┏━━━━━━━━━━━━┓ │ ┏━━━━━━━━━━━━┓ + ┃ ┃ │ implement ┃ ┃ + ┃IOS/Android ┃────────────┴──────────────────────────────────┃IOS/Android ┃ + ┃ ┃ ┃ ┃ + ┗━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━┛ +``` diff --git a/docs/architecture/README.md b/docs/architecture/README.md new file mode 100644 index 0000000000..e2ad9de2e3 --- /dev/null +++ b/docs/architecture/README.md @@ -0,0 +1,3 @@ +# Architecture + +This folder mostly contains snapshots of the architecture at Berty, some documentations may be outdated, but reflect our feeling at a particular period of the project. diff --git a/docs/messenger-mvp/README.md b/docs/architecture/messenger-mvp/README.md similarity index 100% rename from docs/messenger-mvp/README.md rename to docs/architecture/messenger-mvp/README.md diff --git a/docs/messenger-mvp/contact-request.mermaid b/docs/architecture/messenger-mvp/contact-request.mermaid similarity index 100% rename from docs/messenger-mvp/contact-request.mermaid rename to docs/architecture/messenger-mvp/contact-request.mermaid diff --git a/docs/messenger-mvp/contact-request.mermaid.svg b/docs/architecture/messenger-mvp/contact-request.mermaid.svg similarity index 100% rename from docs/messenger-mvp/contact-request.mermaid.svg rename to docs/architecture/messenger-mvp/contact-request.mermaid.svg diff --git a/docs/gen.sum b/docs/gen.sum index 1b48106767..4fcabdd465 100644 --- a/docs/gen.sum +++ b/docs/gen.sum @@ -1,10 +1,9 @@ 7c41f83cba6f48f7a14a328b748dc0282a978bef ../api/bertyaccount.proto -b42d7028a61f2047e8dec016510707cc1b6f8a59 ../api/bertymessenger.proto -bb586c9f569c148685eeb572331af60504a19a05 ../api/bertymessenger.yaml -35ebc74ab251dbb359ba0d04a3dafbcb99b10f67 ../api/bertyprotocol.proto -14884bc268447c0e1d04ed82b7603c0371f66a0d ../api/bertyprotocol.yaml -23e393a8bba7426244b4747d7adb6188830756aa ../api/bertyreplication.proto +4589e8f2ea76dc6030778f5559777636dc05a401 ../api/bertyreplication.proto efe05c869eb27277829aa4018133888bf41f5e9e ../api/bertyreplication.yaml -15bab772b80f15b5af4f7049de1e70e13f7b8b00 ../api/bertytypes.proto -b3570d0af9dc0334c9d60397ec27822c33d51198 ../api/errcode.proto -cc639cd087b8393cfac6b6f819b20a52272fbc1f Makefile +56145f42756fdf8042b9897c32e18f7bf39d176b ../api/errcode.proto +7a9d57c3d1581693f3fc0040375d9ad1344629b8 ../api/messengertypes.proto +d3dee048199ba426e4daa6dc4e1c78cc7fd5505e ../api/messengertypes.yaml +82be117c46950434fc992ba05d184101ab7029ca ../api/protocoltypes.proto +14884bc268447c0e1d04ed82b7603c0371f66a0d ../api/protocoltypes.yaml +6e7a328c397bd5a08a6705127c16b1c2fe7c11c2 Makefile diff --git a/docs/ideas/distributed-entropy.md b/docs/ideas/distributed-entropy.md new file mode 100644 index 0000000000..3327f1f612 --- /dev/null +++ b/docs/ideas/distributed-entropy.md @@ -0,0 +1,22 @@ +# Distributed entropy + +Date: 2019-05-24 +Author: Antoine Eddi (aeddi) + +## Description + +The idea would be to exchange random data blocks between trusted devices (owned by the same account or by different contacts). +The exchange will take place during device-to-device handshakes, we could add a step to our handshake protocol to exchange 64 bytes of random data. +All the random data collected from different sources could be mixed up and stored securely so that it could be reused later to generate new cryptographic materials. + +NB: It is obviously out of the question to use the data provided by a single peer without mixing it with data from other sources to generate secrets. + + +## Why? + +A particular device could have an unsafe PRNG for some reason. Mixing random data provided by different devices should prevent an attack baased on PNRG weaknesses specific to a particular device. + + +## To be considered + +We don't know enough about the subject to assess whether it's a bad practice to do this kind of thing. diff --git a/docs/ideas/entropy-pool.md b/docs/ideas/entropy-pool.md new file mode 100644 index 0000000000..46a4336075 --- /dev/null +++ b/docs/ideas/entropy-pool.md @@ -0,0 +1,22 @@ +# Entropy pool + +Date: 2019-05-24 +Author: Manfred Touron (moul) + +## Description + +The idea would be to add to a pool random data blocks generated when the level of entropy provided by the OS or by dedicated hardware is at its highest. +Random data added to the pool could be reused later to generate new cryptographic materials. + +We could ensure that the pool is built when the device is idle and its battery is fully charged. +For example, in the case of a phone: when it charges during the night. + + +## Why? + +An attacker could lower the entropy level at some point and make the numbers generated predictable. + + +## To be considered + +We don't know enough about the subject to assess whether it's a bad practice to do this kind of thing. diff --git a/go.mod b/go.mod index 0715cb9032..faf34e82e2 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( bazil.org/fuse v0.0.0-20200524192727-fb710f7dfd05 // indirect berty.tech/go-ipfs-log v1.2.6 - berty.tech/go-libp2p-tor-transport v0.8.2 + berty.tech/go-libp2p-tor-transport v0.8.3 berty.tech/go-orbit-db v1.10.10 berty.tech/ipfs-webui-packed v1.0.0-v2.11.4-1 github.com/Masterminds/goutils v1.1.0 // indirect @@ -43,7 +43,7 @@ require ( github.com/ipfs/go-datastore v0.4.5 github.com/ipfs/go-ds-badger v0.2.6 github.com/ipfs/go-ipfs v0.7.1-0.20201116220946-79a55305e935 - github.com/ipfs/go-ipfs-config v0.10.0 + github.com/ipfs/go-ipfs-config v0.11.0 github.com/ipfs/go-ipfs-files v0.0.8 github.com/ipfs/go-ipfs-keystore v0.0.1 github.com/ipfs/go-ipld-cbor v0.0.5 @@ -58,10 +58,10 @@ require ( github.com/libp2p/go-libp2p-circuit v0.4.0 github.com/libp2p/go-libp2p-core v0.7.0 github.com/libp2p/go-libp2p-discovery v0.5.0 - github.com/libp2p/go-libp2p-kad-dht v0.11.0 + github.com/libp2p/go-libp2p-kad-dht v0.11.1 github.com/libp2p/go-libp2p-noise v0.1.2 // indirect github.com/libp2p/go-libp2p-pubsub v0.4.0 - github.com/libp2p/go-libp2p-quic-transport v0.9.2 + github.com/libp2p/go-libp2p-quic-transport v0.9.3 github.com/libp2p/go-libp2p-record v0.1.3 github.com/libp2p/go-libp2p-rendezvous v0.0.0-20180418151804-b7dd840ce441 github.com/libp2p/go-libp2p-transport-upgrader v0.3.0 @@ -109,17 +109,17 @@ require ( golang.org/x/tools v0.0.0-20201030010431-2feb2bb1ff51 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/genproto v0.0.0-20201022181438-0ff5f38871d5 // indirect - google.golang.org/grpc v1.33.2 + google.golang.org/grpc v1.34.0 google.golang.org/grpc/examples v0.0.0-20200922230038-4e932bbcb079 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/square/go-jose.v2 v2.5.1 - gorm.io/driver/sqlite v1.1.3 - gorm.io/gorm v1.20.7 + gorm.io/driver/sqlite v1.1.4 + gorm.io/gorm v1.20.8 moul.io/godev v1.7.0 moul.io/openfiles v1.2.0 moul.io/srand v1.6.1 moul.io/testman v1.5.0 - moul.io/u v1.19.0 + moul.io/u v1.19.1 moul.io/zapconfig v1.3.0 moul.io/zapfilter v1.6.1 moul.io/zapgorm2 v1.0.1 @@ -129,7 +129,9 @@ require ( replace ( bazil.org/fuse => bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc // specific version for iOS building github.com/agl/ed25519 => github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // latest commit before the author shutdown the repo; see https://github.com/golang/go/issues/20504 + github.com/ipfs/go-ipfs => github.com/Jorropo/go-ipfs v0.4.20-0.20201127133049-9632069f4448 // temporary, see https://github.com/ipfs/go-ipfs/issues/7791 github.com/libp2p/go-libp2p-rendezvous => github.com/berty/go-libp2p-rendezvous v0.0.0-20201028141428-5b2e7e8ff19a // use berty fork of go-libp2p-rendezvous github.com/libp2p/go-libp2p-swarm => github.com/Jorropo/go-libp2p-swarm v0.3.4 // temporary, see https://github.com/libp2p/go-libp2p-swarm/pull/227 github.com/peterbourgon/ff/v3 => github.com/moul/ff/v3 v3.0.1 // temporary, see https://github.com/peterbourgon/ff/pull/67, https://github.com/peterbourgon/ff/issues/68 + golang.org/x/mobile => github.com/aeddi/mobile v0.0.1 // temporary, see https://github.com/golang/mobile/pull/58 ) diff --git a/go.sum b/go.sum index 3913115dde..22b383b9c6 100644 --- a/go.sum +++ b/go.sum @@ -2,10 +2,10 @@ bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc h1:utDghgcjE8u+EBjHOgYT+dJPcnD bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= berty.tech/go-ipfs-log v1.2.6 h1:VBdyZgdkeIt17LS4UX6rJjmskqvfIHaOAEH9Z8aqvIM= berty.tech/go-ipfs-log v1.2.6/go.mod h1:4v7G/bAeHNQWqziNC9oZREEFYpSiejSE3+DB4G4nf9M= -berty.tech/go-libp2p-tor-transport v0.8.2 h1:yKNH38FPT7GxzbdQV3zuxbdPIE+ofyo7ouLM7R+/RrY= -berty.tech/go-libp2p-tor-transport v0.8.2/go.mod h1:/1ko5aihvU/uyHjKrunrHOam0b/Vumk87ptczocl14c= -berty.tech/go-libtor v1.0.328 h1:3MRoX3KP9CjVgN5oPu7lbQYu0US00PyHj9mhihK89jQ= -berty.tech/go-libtor v1.0.328/go.mod h1:9swOOQVb+kmvuAlsgWUK/4c52pm69AdbJsxLzk+fJEw= +berty.tech/go-libp2p-tor-transport v0.8.3 h1:KhfPBPeuvMqW/88j6BS4O1vdTIRdlMD7bsxYBcp9rts= +berty.tech/go-libp2p-tor-transport v0.8.3/go.mod h1:uttrniM0oeyYxHCpYy/gXcgZHu2zBy4F1doSUQm4rh0= +berty.tech/go-libtor v1.0.333 h1:z0Uars8ZFprlGRGDAsomBtjTQfR9T7eMBmPDaZp1GRk= +berty.tech/go-libtor v1.0.333/go.mod h1:9swOOQVb+kmvuAlsgWUK/4c52pm69AdbJsxLzk+fJEw= berty.tech/go-orbit-db v1.10.10 h1:4wljpof6+aICgDWVI9whyop99zF2SoWUT8dt/32JSfs= berty.tech/go-orbit-db v1.10.10/go.mod h1:Gl6pmjtt7Db5yA+2S14VP0XJ93Q2OslpyW/eSE9QNCg= berty.tech/ipfs-webui-packed v1.0.0-v2.11.4-1 h1:xXAS7M/RcgIWia1XkXLueirm2zDXnMMNGb3UJhfRzbo= @@ -61,6 +61,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7 h1:qELHH0AWCvf98Yf+CNIJx9vOZOfHFDDzgDRYsnNk/vs= github.com/DataDog/sketches-go v0.0.0-20190923095040-43f19ad77ff7/go.mod h1:Q5DbzQ+3AkgGwymQO7aZFNP7ns2lZKGtvRBzRXfdi60= +github.com/Jorropo/go-ipfs v0.4.20-0.20201127133049-9632069f4448 h1:E6zJ4YrZn4RJDWcKZ5WIA+z9MkfgOoQgLyMB1Qm2rHI= +github.com/Jorropo/go-ipfs v0.4.20-0.20201127133049-9632069f4448/go.mod h1:L/6+fnHQ8rUe5DMxAPB7lRS4w4e2iLLRdawzi4SvKKM= github.com/Jorropo/go-libp2p-swarm v0.3.4 h1:WXT4kyRjF+FBoVXZl7vmdxCZkI6pUvh+ZmG79Y8Iwho= github.com/Jorropo/go-libp2p-swarm v0.3.4/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -84,6 +86,8 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/aead/ecdh v0.2.0 h1:pYop54xVaq/CEREFEcukHRZfTdjiWvYIsZDXXrBapQQ= github.com/aead/ecdh v0.2.0/go.mod h1:a9HHtXuSo8J1Js1MwLQx2mBhkXMT6YwUmVVEY4tTB8U= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/aeddi/mobile v0.0.1 h1:tzxfiZg58805JUnV4W/3hu1EWPvQE1o/00ykQ94CkHk= +github.com/aeddi/mobile v0.0.1/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= @@ -110,7 +114,6 @@ github.com/atotto/clipboard v0.1.2/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= @@ -129,7 +132,6 @@ github.com/bren2010/proquint v0.0.0-20160323162903-38337c27106d/go.mod h1:Jbj8eK github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= @@ -168,6 +170,7 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -208,7 +211,6 @@ github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbj github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= -github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8= @@ -237,6 +239,7 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -259,7 +262,6 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/gabriel-vasile/mimetype v1.1.0/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pmgOisOPG40CJa6To= github.com/gabriel-vasile/mimetype v1.1.1 h1:qbN9MPuRf3bstHu9zkI9jDWNfH//9+9kHxr9oRBBBOA= github.com/gabriel-vasile/mimetype v1.1.1/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pmgOisOPG40CJa6To= github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= @@ -465,7 +467,6 @@ github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSA github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs= github.com/ipfs/go-bitswap v0.1.3/go.mod h1:YEQlFy0kkxops5Vy+OxWdRSEZIoS7I7KDIwoa5Chkps= github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.2.19/go.mod h1:C7TwBgHnu89Q8sHsTJP7IhUqF9XYLe71P4tT5adgmYo= github.com/ipfs/go-bitswap v0.3.2 h1:TdKx7lpidYe2dMAKfdeNS26y6Pc/AZX/i8doI1GV210= github.com/ipfs/go-bitswap v0.3.2/go.mod h1:AyWWfN3moBzQX0banEtfKOfbXb3ZeoOeXnZGNPV9S6w= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= @@ -504,15 +505,12 @@ github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= -github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= github.com/ipfs/go-ds-badger v0.0.7/go.mod h1:qt0/fWzZDoPW6jpQeqUjR5kBfhDNB65jd9YlmAvpQBk= github.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9DrGVwx/NOwE= github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= -github.com/ipfs/go-ds-badger v0.2.4/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= github.com/ipfs/go-ds-badger v0.2.5/go.mod h1:02rnztVKA4aZwDuaRPTf8mpqcKmXP7mLl6JPxd14JHA= github.com/ipfs/go-ds-badger v0.2.6 h1:Hy8jw4rifxtRDrqpvC1yh36oIyE37KDzsUzlHUPOFiU= github.com/ipfs/go-ds-badger v0.2.6/go.mod h1:02rnztVKA4aZwDuaRPTf8mpqcKmXP7mLl6JPxd14JHA= -github.com/ipfs/go-ds-flatfs v0.4.4/go.mod h1:e4TesLyZoA8k1gV/yCuBTnt2PJtypn4XUlB5n8KQMZY= github.com/ipfs/go-ds-flatfs v0.4.5 h1:4QceuKEbH+HVZ2ZommstJMi3o3II+dWS3IhLaD7IGHs= github.com/ipfs/go-ds-flatfs v0.4.5/go.mod h1:e4TesLyZoA8k1gV/yCuBTnt2PJtypn4XUlB5n8KQMZY= github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= @@ -524,15 +522,10 @@ github.com/ipfs/go-ds-measure v0.1.0 h1:vE4TyY4aeLeVgnnPBC5QzKIjKrqzha0NCujTfgvV github.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY= github.com/ipfs/go-filestore v0.0.3 h1:MhZ1jT5K3NewZwim6rS/akcJLm1xM+r6nz6foeB9EwE= github.com/ipfs/go-filestore v0.0.3/go.mod h1:dvXRykFzyyXN2CdNlRGzDAkXMDPyI+D7JE066SiKLSE= -github.com/ipfs/go-fs-lock v0.0.5/go.mod h1:fq8gXFwbi1on9KScveHuVJ2wjuqo5jaDgCtZdKLuCO8= github.com/ipfs/go-fs-lock v0.0.6 h1:sn3TWwNVQqSeNjlWy6zQ1uUGAZrV3hPOyEA6y1/N2a0= github.com/ipfs/go-fs-lock v0.0.6/go.mod h1:OTR+Rj9sHiRubJh3dRhD15Juhd/+w6VPOY28L7zESmM= -github.com/ipfs/go-graphsync v0.0.5/go.mod h1:SGKa4rVgCCz3KDNqe38wLEDYFa/PUF6w/ertGSQk33I= github.com/ipfs/go-graphsync v0.5.0 h1:iaByvxq88Ys1KcaQzTS1wmRhNsNEo3SaUiSGqTSbGmM= github.com/ipfs/go-graphsync v0.5.0/go.mod h1:e2ZxnClqBBYAtd901g9vXMJzS47labjAtOzsWtOzKNk= -github.com/ipfs/go-ipfs v0.6.0/go.mod h1:PzTCj8DX4ANoATun1fHyg2IpdQURJ8racXtCplsXpn0= -github.com/ipfs/go-ipfs v0.7.1-0.20201116220946-79a55305e935 h1:E1QciMSSg+b0Xx3FW314FBotOwopUVm0egCOL7ERgQo= -github.com/ipfs/go-ipfs v0.7.1-0.20201116220946-79a55305e935/go.mod h1:L/6+fnHQ8rUe5DMxAPB7lRS4w4e2iLLRdawzi4SvKKM= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= github.com/ipfs/go-ipfs-blockstore v0.1.4 h1:2SGI6U1B44aODevza8Rde3+dY30Pb+lbcObe1LETxOQ= @@ -542,13 +535,11 @@ github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtL github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= github.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7NapWLY8= github.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8= -github.com/ipfs/go-ipfs-cmds v0.2.9/go.mod h1:ZgYiWVnCk43ChwoH8hAmI1IRbuVtq3GSTHwtRB/Kqhk= github.com/ipfs/go-ipfs-cmds v0.4.0 h1:xUavIxA9Ts8U6PAHmQBvDGMlGfUrQ13Rymd+5t8LIF4= github.com/ipfs/go-ipfs-cmds v0.4.0/go.mod h1:ZgYiWVnCk43ChwoH8hAmI1IRbuVtq3GSTHwtRB/Kqhk= -github.com/ipfs/go-ipfs-config v0.8.0/go.mod h1:GQUxqb0NfkZmEU92PxqqqLVVFTLpoGGUlBaTyDaAqrE= github.com/ipfs/go-ipfs-config v0.9.0/go.mod h1:GQUxqb0NfkZmEU92PxqqqLVVFTLpoGGUlBaTyDaAqrE= -github.com/ipfs/go-ipfs-config v0.10.0 h1:QdTFdqCg3Zpvpz6wHc6B7UGwSnierqq0h8BwyUntjGA= -github.com/ipfs/go-ipfs-config v0.10.0/go.mod h1:Ei/FLgHGTdPyqCPK0oPCwGTe8VSnsjJjx7HZqUb6Ry0= +github.com/ipfs/go-ipfs-config v0.11.0 h1:w4t2pz415Gtg6MTUKAq06C7ezC59/Us+k3+n1Tje+wg= +github.com/ipfs/go-ipfs-config v0.11.0/go.mod h1:Ei/FLgHGTdPyqCPK0oPCwGTe8VSnsjJjx7HZqUb6Ry0= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= @@ -561,7 +552,6 @@ github.com/ipfs/go-ipfs-exchange-offline v0.0.1 h1:P56jYKZF7lDDOLx5SotVh5KFxoY6C github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= github.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= -github.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4= github.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6ZpusRg= github.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= github.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA= @@ -606,14 +596,12 @@ github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBW github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-log/v2 v2.1.1 h1:G4TtqN+V9y9HY9TA6BwbCVyyBZ2B9MbCjR2MtGx8FR0= github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA= github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto= github.com/ipfs/go-merkledag v0.1.0/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= -github.com/ipfs/go-merkledag v0.2.4/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.3.0/go.mod h1:4pymaZLhSLNVuiCITYrpViD6vmfZ/Ws4n/L9tfNv3S4= github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= github.com/ipfs/go-merkledag v0.3.2 h1:MRqj40QkrWkvPswXs4EfSslhZ4RVPRbxwX11js0t1xY= @@ -634,7 +622,6 @@ github.com/ipfs/go-peertaskqueue v0.2.0 h1:2cSr7exUGKYyDeUyQ7P/nHPs9P7Ht/B+ROrpN github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY= github.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8= github.com/ipfs/go-unixfs v0.1.0/go.mod h1:lysk5ELhOso8+Fed9U1QTGey2ocsfaZ18h0NCO2Fj9s= -github.com/ipfs/go-unixfs v0.2.2-0.20190827150610-868af2e9e5cb/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= @@ -642,14 +629,11 @@ github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZ github.com/ipfs/interface-go-ipfs-core v0.3.0/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s= github.com/ipfs/interface-go-ipfs-core v0.4.0 h1:+mUiamyHIwedqP8ZgbCIwpy40oX7QcXUbo4CZOeJVJg= github.com/ipfs/interface-go-ipfs-core v0.4.0/go.mod h1:UJBcU6iNennuI05amq3FQ7g0JHUkibHFAfhfUIy927o= -github.com/ipld/go-car v0.1.0/go.mod h1:RCWzaUh2i4mOEkB3W45Vc+9jnS/M6Qay5ooytiBHl3g= github.com/ipld/go-car v0.1.1-0.20201015032735-ff6ccdc46acc h1:BdI33Q56hLWG9Ef0WbQ7z+dwmbRYhTb45SMjw0RudbQ= github.com/ipld/go-car v0.1.1-0.20201015032735-ff6ccdc46acc/go.mod h1:WdIgzcEjFqydQ7jH+BXzGYxVCmLeAs5nP8Vu3Rege2Y= -github.com/ipld/go-ipld-prime v0.0.2-0.20191108012745-28a82f04c785/go.mod h1:bDDSvVz7vaK12FNvMeRYnpRFkSUPNQOiCYQezMD/P3w= github.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018 h1:RbRHv8epkmvBYA5cGfz68GUSbOgx5j/7ObLIl4Rsif0= github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM= -github.com/ipld/go-ipld-prime-proto v0.0.0-20191113031812-e32bd156a1e5/go.mod h1:gcvzoEDBjwycpXt3LBE061wT9f46szXGHAmj9uoP6fU= github.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0= github.com/ipld/go-ipld-prime-proto v0.1.0 h1:j7gjqrfwbT4+gXpHwEx5iMssma3mnctC7YaCimsFP70= github.com/ipld/go-ipld-prime-proto v0.1.0/go.mod h1:11zp8f3sHVgIqtb/c9Kr5ZGqpnCLF1IVTNOez9TopzE= @@ -690,7 +674,6 @@ github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlT github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -735,8 +718,6 @@ github.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0 github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= github.com/libp2p/go-conn-security-multistream v0.2.0 h1:uNiDjS58vrvJTg9jO6bySd1rMKejieG7v45ekqHbZ1M= github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= -github.com/libp2p/go-eventbus v0.0.2/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk= -github.com/libp2p/go-eventbus v0.0.3/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk= github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= github.com/libp2p/go-eventbus v0.2.1 h1:VanAdErQnpTioN2TowqNcOijf6YwhuODe4pPKSDpxGc= github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= @@ -748,15 +729,11 @@ github.com/libp2p/go-libp2p v0.0.2/go.mod h1:Qu8bWqFXiocPloabFGUcVG4kk94fLvfC8mW github.com/libp2p/go-libp2p v0.0.30/go.mod h1:XWT8FGHlhptAv1+3V/+J5mEpzyui/5bvFsNuWYs611A= github.com/libp2p/go-libp2p v0.1.0/go.mod h1:6D/2OBauqLUoqcADOJpn9WbKqvaM07tDw68qHM0BxUM= github.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8= -github.com/libp2p/go-libp2p v0.2.1/go.mod h1:HZbtEOrgZN4F1fGZVvkV+930Wx3DkqlpBlO8dIoZWds= -github.com/libp2p/go-libp2p v0.6.0/go.mod h1:mfKWI7Soz3ABX+XEBR61lGbg+ewyMtJHVt043oWeqwg= github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZkfEI5sT54= github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= -github.com/libp2p/go-libp2p v0.8.2/go.mod h1:NQDA/F/qArMHGe0J7sDScaKjW8Jh4y/ozQqBbYJ+BnA= github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= -github.com/libp2p/go-libp2p v0.9.6/go.mod h1:EA24aHpFs3BscMWvO286AiaKs3a7efQdLo+tbZ2tUSk= github.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8= github.com/libp2p/go-libp2p v0.10.2/go.mod h1:BYckt6lmS/oA1SlRETSPWSUulCQKiZuTVsymVMc//HQ= github.com/libp2p/go-libp2p v0.12.0 h1:+xai9RQnQ9l5elFOKvp5wRyjyWisSwEx+6nU2+onpUA= @@ -776,7 +753,6 @@ github.com/libp2p/go-libp2p-autonat v0.4.0 h1:3y8XQbpr+ssX8QfZUHekjHCYK64sj6/4hn github.com/libp2p/go-libp2p-autonat v0.4.0/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= -github.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk= @@ -791,15 +767,11 @@ github.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCy github.com/libp2p/go-libp2p-circuit v0.3.1/go.mod h1:8RMIlivu1+RxhebipJwFDA45DasLx+kkrp4IlJj53F4= github.com/libp2p/go-libp2p-circuit v0.4.0 h1:eqQ3sEYkGTtybWgr6JLqJY6QLtPWRErvFjFDfAOO1wc= github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= -github.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4= github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= -github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= -github.com/libp2p/go-libp2p-core v0.0.6/go.mod h1:0d9xmaYAVY5qmbp/fcgxHT3ZJsLjYeYPMJAUKpaCHrE= -github.com/libp2p/go-libp2p-core v0.0.9/go.mod h1:0d9xmaYAVY5qmbp/fcgxHT3ZJsLjYeYPMJAUKpaCHrE= github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= github.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= @@ -831,24 +803,21 @@ github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQO github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= github.com/libp2p/go-libp2p-discovery v0.5.0 h1:Qfl+e5+lfDgwdrXdu4YNCWyEo3fWuP+WgN9mN0iWviQ= github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= -github.com/libp2p/go-libp2p-gostream v0.2.1 h1:JjA9roGokaR2BgWmaI/3HQu1/+jSbVVDLatQGnVdGjI= -github.com/libp2p/go-libp2p-gostream v0.2.1/go.mod h1:1Mjp3LDmkqICe5tH9yLVNCqFaRTy6OwBvuJV6j1b9Nk= github.com/libp2p/go-libp2p-gostream v0.3.0 h1:rnas//vRdHYCr7bjraZJISPwZV8OGMjeX5k5fN5Ax44= github.com/libp2p/go-libp2p-gostream v0.3.0/go.mod h1:pLBQu8db7vBMNINGsAwLL/ZCE8wng5V1FThoaE5rNjc= github.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go= github.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8= -github.com/libp2p/go-libp2p-http v0.1.5 h1:FfLnzjlEzV4/6UCXCpPXRYZNoGCfogqCFjd7eF0Jbm8= -github.com/libp2p/go-libp2p-http v0.1.5/go.mod h1:2YfPjsQxUlBGFQl2u461unkQ7ukwiSs7NX2eSslOJiU= github.com/libp2p/go-libp2p-http v0.2.0 h1:GYeVd+RZzkRa8XFLITqOpcrIQG6KbFLPJqII6HHBHzY= github.com/libp2p/go-libp2p-http v0.2.0/go.mod h1:GlNKFqDZHe25LVy2CvnZKx75/jLtMaD3VxZV6N39X7E= github.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k= github.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k= -github.com/libp2p/go-libp2p-kad-dht v0.8.2/go.mod h1:u3rbYbp3CSraAHD5s81CJ3hHozKTud/UOXfAgh93Gek= github.com/libp2p/go-libp2p-kad-dht v0.8.3/go.mod h1:HnYYy8taJWESkqiESd1ngb9XX/XGGsMA5G0Vj2HoSh4= github.com/libp2p/go-libp2p-kad-dht v0.11.0 h1:ZLhlmDKsFiOkPhTzfEqBrMy/1Tqx+Dk6UgbHM5//IQM= github.com/libp2p/go-libp2p-kad-dht v0.11.0/go.mod h1:5ojtR2acDPqh/jXf5orWy8YGb8bHQDS+qeDcoscL/PI= +github.com/libp2p/go-libp2p-kad-dht v0.11.1 h1:FsriVQhOUZpCotWIjyFSjEDNJmUzuMma/RyyTDZanwc= +github.com/libp2p/go-libp2p-kad-dht v0.11.1/go.mod h1:5ojtR2acDPqh/jXf5orWy8YGb8bHQDS+qeDcoscL/PI= github.com/libp2p/go-libp2p-kbucket v0.4.2/go.mod h1:7sCeZx2GkNK1S6lQnGUW5JYZCFPnXzAZCCBBS70lytY= github.com/libp2p/go-libp2p-kbucket v0.4.7 h1:spZAcgxifvFZHBD8tErvppbnNiKA5uokDu3CV7axu70= github.com/libp2p/go-libp2p-kbucket v0.4.7/go.mod h1:XyVo99AfQH0foSf176k4jY1xUJ2+jUJIZCSDm7r2YKk= @@ -884,33 +853,27 @@ github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMg github.com/libp2p/go-libp2p-peerstore v0.0.1/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= github.com/libp2p/go-libp2p-peerstore v0.0.6/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20= github.com/libp2p/go-libp2p-peerstore v0.1.0/go.mod h1:2CeHkQsr8svp4fZ+Oi9ykN1HBb6u0MOvdJ7YIsmcwtY= -github.com/libp2p/go-libp2p-peerstore v0.1.2/go.mod h1:BJ9sHlm59/80oSkpWgr1MyY1ciXAXV397W6h1GH/uKI= github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= github.com/libp2p/go-libp2p-peerstore v0.2.0/go.mod h1:N2l3eVIeAitSg3Pi2ipSrJYnqhVnMNQZo9nkSCuAbnQ= github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= -github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U= github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s= github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk= -github.com/libp2p/go-libp2p-pubsub v0.3.0/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= -github.com/libp2p/go-libp2p-pubsub v0.3.1/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato= github.com/libp2p/go-libp2p-pubsub v0.3.3/go.mod h1:DTMSVmZZfXodB/pvdTGrY2eHPZ9W2ev7hzTH83OKHrI= github.com/libp2p/go-libp2p-pubsub v0.4.0 h1:YNVRyXqBgv9i4RG88jzoTtkSOaSB45CqHkL29NNBZb4= github.com/libp2p/go-libp2p-pubsub v0.4.0/go.mod h1:izkeMLvz6Ht8yAISXjx60XUQZMq9ZMe5h2ih4dLIBIQ= -github.com/libp2p/go-libp2p-pubsub-router v0.3.0/go.mod h1:6kZb1gGV1yGzXTfyNsi4p+hyt1JnA1OMGHeExTOJR3A= github.com/libp2p/go-libp2p-pubsub-router v0.4.0 h1:KjzTLIOBCt0+/4wH6epTxD/Qu4Up/IyeKHlj9MhWRJI= github.com/libp2p/go-libp2p-pubsub-router v0.4.0/go.mod h1:hs0j0ugcBjMOMgJ6diOlZM2rZEId/w5Gg86E+ac4SmQ= -github.com/libp2p/go-libp2p-quic-transport v0.6.0/go.mod h1:HR435saAZhTrFabI+adf3tVBY7ZJg5rKNoJ+CrIIg8c= github.com/libp2p/go-libp2p-quic-transport v0.8.0/go.mod h1:F2FG/6Bzz0U6essUVxDzE0s9CrY4XGLbl7QEmDNvU7A= github.com/libp2p/go-libp2p-quic-transport v0.9.0 h1:WPuq5nV/chmIZIzvrkC2ulSdAQ0P0BDvgvAhZFOZ59E= github.com/libp2p/go-libp2p-quic-transport v0.9.0/go.mod h1:xyY+IgxL0qsW7Kiutab0+NlxM0/p9yRtrGTYsuMWf70= -github.com/libp2p/go-libp2p-quic-transport v0.9.2 h1:0uKv1AofBFyca4pW9LGDSRwC+oSOuy8jR6Z3YqU/3nU= -github.com/libp2p/go-libp2p-quic-transport v0.9.2/go.mod h1:ZcBDR+oWQV4LyUNfbzHzor0IGYmBCMu7405lEafhCSk= +github.com/libp2p/go-libp2p-quic-transport v0.9.3 h1:e6eLN55agvemeYzdJTzIylVbLD5PJr0RJANr9HM+FVc= +github.com/libp2p/go-libp2p-quic-transport v0.9.3/go.mod h1:STiznVmrLMFPXCrkEbNna/VxgdxBatcK0SA+1FSdxnI= github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg= @@ -923,7 +886,6 @@ github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASo github.com/libp2p/go-libp2p-secio v0.0.1/go.mod h1:IdG6iQybdcYmbTzxp4J5dwtUEDTOvZrT0opIDVNPrJs= github.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0= github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= -github.com/libp2p/go-libp2p-secio v0.1.1/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= github.com/libp2p/go-libp2p-secio v0.2.1/go.mod h1:cWtZpILJqkqrSkiYcDBh5lA3wbT2Q+hz3rJQq3iftD8= github.com/libp2p/go-libp2p-secio v0.2.2 h1:rLLPvShPQAcY6eNurKNZq3eZjPWfU9kXF2eI9jIYdrg= github.com/libp2p/go-libp2p-secio v0.2.2/go.mod h1:wP3bS+m5AUnFA+OFO7Er03uO1mncHG0uVwGrwvjYlNY= @@ -951,7 +913,6 @@ github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFY github.com/libp2p/go-libp2p-yamux v0.1.3/go.mod h1:VGSQVrqkh6y4nm0189qqxMtvyBft44MOYYPpYKXiVt4= github.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8= github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI= -github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= @@ -1027,7 +988,6 @@ github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1f github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= @@ -1036,12 +996,11 @@ github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lucas-clemente/quic-go v0.16.2/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lucas-clemente/quic-go v0.18.0/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= github.com/lucas-clemente/quic-go v0.18.1 h1:DMR7guC0NtVS8zNZR3IO7NARZvZygkSC56GGtC6cyys= github.com/lucas-clemente/quic-go v0.18.1/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg= -github.com/lucas-clemente/quic-go v0.19.2 h1:w8BBYUx5Z+kNpeaOeQW/KzcNsKWhh4O6PeQhb0nURPg= -github.com/lucas-clemente/quic-go v0.19.2/go.mod h1:ZUygOqIoai0ASXXLJ92LTnKdbqh9MHCLTX6Nr1jUrK0= +github.com/lucas-clemente/quic-go v0.19.3 h1:eCDQqvGBB+kCTkA0XrAFtNe81FMa0/fn4QSoeAbmiF4= +github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8= github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s= github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= @@ -1053,10 +1012,8 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/markbates/pkger v0.17.0/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/markbates/pkger v0.17.1 h1:/MKEtWqtc0mZvu9OinB9UzVN9iYCwLWuyUv4Bw+PCno= github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= -github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI= github.com/marten-seemann/qpack v0.2.0/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= -github.com/marten-seemann/qtls v0.9.1/go.mod h1:T1MmAdDPyISzxlK6kjRr0pcZFBVd1OZbBb/j3cvzHhk= github.com/marten-seemann/qtls v0.10.0 h1:ECsuYUKalRL240rRD4Ri33ISb7kAQ3qGDlrrl55b2pc= github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= github.com/marten-seemann/qtls-go1-15 v0.1.0 h1:i/YPXVxz8q9umso/5y474CNcHmTpA+5DH+mFPjx6PZg= @@ -1082,7 +1039,6 @@ github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.4 h1:4rQjbDxdu9fSgI/r3KN72G3c2goxknAqHHgPWWs8UlI= github.com/mattn/go-sqlite3 v1.14.4/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.5 h1:1IdxlwTNazvbKJQSxoJ5/9ECbEeaTTyeU7sEAZ5KKTQ= @@ -1103,7 +1059,6 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.31 h1:sJFOl9BgwbYAWOGEwr61FU28pqsBNdpRBnhGXtO06Oo= github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= @@ -1158,7 +1113,6 @@ github.com/multiformats/go-multiaddr v0.3.1 h1:1bxa+W7j9wZKTZREySx1vPMs2TqrYWjVZ github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.0.3/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.2.0 h1:YWJoIDwLePniH7OU5hBnDZV6SWuvJqJ0YtN6pLeH9zA= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= @@ -1174,12 +1128,10 @@ github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysj github.com/multiformats/go-multiaddr-net v0.2.0 h1:MSXRGN0mFymt6B1yo/6BPnIRpLPEnKgQNvVfCX5VDJk= github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA= github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= -github.com/multiformats/go-multihash v0.0.6/go.mod h1:XuKXPp8VHcTygube3OWZC+aZrA+H1IhmjoCDtJc7PXM= github.com/multiformats/go-multihash v0.0.7/go.mod h1:XuKXPp8VHcTygube3OWZC+aZrA+H1IhmjoCDtJc7PXM= github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= @@ -1227,7 +1179,6 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= @@ -1236,7 +1187,6 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1284,7 +1234,6 @@ github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4 github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= @@ -1300,7 +1249,6 @@ github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7q github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= @@ -1310,7 +1258,6 @@ github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -1374,7 +1321,6 @@ github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHei github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= @@ -1496,10 +1442,8 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/dig v1.9.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= go.uber.org/dig v1.10.0 h1:yLmDDj9/zuDjv3gz8GQGviXMs9TfysIUMUilCpgzUJY= go.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw= -go.uber.org/fx v1.12.0/go.mod h1:egT3Kyg1JFYQkvKLZ3EsykxkNrZxgXS+gKoKo7abERY= go.uber.org/fx v1.13.1 h1:CFNTr1oin5OJ0VCZ8EycL3wzF29Jz2g0xe55RFsf2a4= go.uber.org/fx v1.13.1/go.mod h1:bREWhavnedxpJeTq9pQT53BbvwhUv7TcpsOqcH4a+3w= go.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI= @@ -1556,7 +1500,6 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 h1:umElSU9WZirRdgu2yFHY0ayQkEnKiOC1TtM3fWXFnoU= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1581,10 +1524,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de h1:OVJ6QQUBAesB8CZijKDSsXX7xYVtUhrkY0gwMfbi4p4= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= @@ -1609,7 +1548,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190228165749-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1635,7 +1573,6 @@ golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1720,7 +1657,6 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1794,7 +1730,6 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200716134326-a8f9df4c9543/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1905,8 +1840,8 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc/examples v0.0.0-20200922230038-4e932bbcb079 h1:unzgkDPNegIn/czOcgxzQaTzEzOiBH1V1j55rsEzVEg= google.golang.org/grpc/examples v0.0.0-20200922230038-4e932bbcb079/go.mod h1:Lh55/1hxmVHEkOvSIQ2uj0P12QyOCUNyRwnUlSS13hw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1927,8 +1862,6 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1957,12 +1890,13 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/sqlite v1.1.3 h1:BYfdVuZB5He/u9dt4qDpZqiqDJ6KhPqs5QUqsr/Eeuc= -gorm.io/driver/sqlite v1.1.3/go.mod h1:AKDgRWk8lcSQSw+9kxCJnX/yySj8G3rdwYlU57cB45c= +gorm.io/driver/sqlite v1.1.4 h1:PDzwYE+sI6De2+mxAneV9Xs11+ZyKV6oxD3wDGkaNvM= +gorm.io/driver/sqlite v1.1.4/go.mod h1:mJCeTFr7+crvS+TRnWc5Z3UvwxUN1BGBLMrf5LA9DYw= gorm.io/gorm v0.2.18/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -gorm.io/gorm v1.20.1/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.20.7 h1:rMS4CL3pNmYq1V5/X+nHHjh1Dx6dnf27+Cai5zabo+M= gorm.io/gorm v1.20.7/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= +gorm.io/gorm v1.20.8 h1:iToaOdZgjNvlc44NFkxfLa3U9q63qwaxt0FdNCiwOMs= +gorm.io/gorm v1.20.8/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1988,6 +1922,8 @@ moul.io/testman v1.5.0/go.mod h1:b4/5+lMsMDJtwuh25Cr0eVJ5Y4B2lSPfkzDtfct070g= moul.io/u v1.6.0/go.mod h1:yd3/IoYRIJaZWAJV2rYHvM2EPp/Pp0zSNraB5IPX+hw= moul.io/u v1.19.0 h1:TYzVanlhOK5suW4Q63OSO0qfy9IjNZUPu4IKl7e23Zw= moul.io/u v1.19.0/go.mod h1:KaaCftEbxFzGdKI+elj1xeRVrlmZvd9oa5sDhJ3qzFU= +moul.io/u v1.19.1 h1:DOy8779oAik+ccW44X3Yp+Wz7dqR5FcHBLCv752gkU0= +moul.io/u v1.19.1/go.mod h1:KaaCftEbxFzGdKI+elj1xeRVrlmZvd9oa5sDhJ3qzFU= moul.io/zapconfig v1.3.0 h1:vS5EMh04bXxqp80a6b7mUMeCYn8pEN9kIe7ZHEKfep0= moul.io/zapconfig v1.3.0/go.mod h1:9zIkSbBEmO7qv8n0h9RRPqOfiI4W7fWhDoZV2UxXxdI= moul.io/zapfilter v1.6.1 h1:D5ySvqGTADgtOmjhKCrCOnH3DHZjIqIAQD0kwCeyBIw= diff --git a/go/Makefile b/go/Makefile index daf2e35fcd..657bbe59ea 100644 --- a/go/Makefile +++ b/go/Makefile @@ -180,16 +180,15 @@ $(gen_sum): $(gen_src) generate_local: $(call check-program, shasum protoc) - $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertymessenger.proto -o ../api/bertymessenger.yaml - $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertyprotocol.proto -o ../api/bertyprotocol.yaml + $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/messengertypes.proto -o ../api/messengertypes.yaml + $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/protocoltypes.proto -o ../api/protocoltypes.yaml $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertyreplication.proto -o ../api/bertyreplication.yaml protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/errcode.proto protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/bertyaccount.proto - protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/bertytypes.proto protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/go-internal/records.proto protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/go-internal/handshake.proto - protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src --grpc-gateway_out=logtostderr=true,grpc_api_configuration=../api/bertyprotocol.yaml:$(GOPATH)/src ../api/bertyprotocol.proto - protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src --grpc-gateway_out=logtostderr=true,grpc_api_configuration=../api/bertymessenger.yaml:$(GOPATH)/src ../api/bertymessenger.proto + protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src --grpc-gateway_out=logtostderr=true,grpc_api_configuration=../api/protocoltypes.yaml:$(GOPATH)/src ../api/protocoltypes.proto + protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src --grpc-gateway_out=logtostderr=true,grpc_api_configuration=../api/messengertypes.yaml:$(GOPATH)/src ../api/messengertypes.proto protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src --grpc-gateway_out=logtostderr=true,grpc_api_configuration=../api/bertyreplication.yaml:$(GOPATH)/src ../api/bertyreplication.proto sed -i s@berty.tech/berty/go@berty.tech/berty/v2/go@ ./pkg/*/*.pb.go sed -i s@berty.tech/berty/go@berty.tech/berty/v2/go@ ./pkg/*/*.pb.gw.go diff --git a/go/cmd/berty-doctor/depaware.txt b/go/cmd/berty-doctor/depaware.txt index 8ebbd57811..37c5d569ee 100644 --- a/go/cmd/berty-doctor/depaware.txt +++ b/go/cmd/berty-doctor/depaware.txt @@ -8,7 +8,7 @@ berty.tech/berty/v2/go/cmd/berty-doctor dependencies: (generated by github.com/t 💣 berty.tech/berty/v2/go/internal/multipeer-connectivity-driver from berty.tech/berty/v2/go/internal/ipfsutil+ berty.tech/berty/v2/go/internal/proximity-transport from berty.tech/berty/v2/go/internal/multipeer-connectivity-driver berty.tech/berty/v2/go/internal/tinder from berty.tech/berty/v2/go/cmd/berty-doctor+ - berty.tech/berty/v2/go/pkg/bertytypes from berty.tech/berty/v2/go/internal/config + berty.tech/berty/v2/go/pkg/protocoltypes from berty.tech/berty/v2/go/internal/config berty.tech/berty/v2/go/pkg/errcode from berty.tech/berty/v2/go/internal/ipfsutil+ berty.tech/ipfs-webui-packed from berty.tech/berty/v2/go/internal/ipfsutil 💣 github.com/AndreasBriese/bbloom from github.com/dgraph-io/badger/table @@ -48,7 +48,7 @@ berty.tech/berty/v2/go/cmd/berty-doctor dependencies: (generated by github.com/t github.com/gabriel-vasile/mimetype/internal/json from github.com/gabriel-vasile/mimetype/internal/matchers github.com/gabriel-vasile/mimetype/internal/matchers from github.com/gabriel-vasile/mimetype github.com/gobuffalo/here from github.com/markbates/pkger/here - github.com/gofrs/uuid from berty.tech/berty/v2/go/pkg/bertytypes + github.com/gofrs/uuid from berty.tech/berty/v2/go/pkg/protocoltypes github.com/gogo/protobuf/gogoproto from berty.tech/berty/v2/go/internal/tinder+ github.com/gogo/protobuf/io from berty.tech/berty/v2/go/internal/tinder+ 💣 github.com/gogo/protobuf/proto from berty.tech/berty/v2/go/internal/tinder+ @@ -535,7 +535,7 @@ berty.tech/berty/v2/go/cmd/berty-doctor dependencies: (generated by github.com/t golang.org/x/crypto/cryptobyte from crypto/ecdsa+ golang.org/x/crypto/cryptobyte/asn1 from crypto/ecdsa+ golang.org/x/crypto/curve25519 from crypto/tls+ - golang.org/x/crypto/ed25519 from berty.tech/berty/v2/go/pkg/bertytypes+ + golang.org/x/crypto/ed25519 from berty.tech/berty/v2/go/pkg/protocoltypes+ golang.org/x/crypto/hkdf from crypto/tls+ golang.org/x/crypto/poly1305 from github.com/libp2p/go-libp2p-noise+ golang.org/x/crypto/salsa20 from github.com/ipfs/go-ipfs/core/node/libp2p @@ -615,7 +615,7 @@ berty.tech/berty/v2/go/cmd/berty-doctor dependencies: (generated by github.com/t encoding/base64 from berty.tech/berty/v2/go/internal/ipfsutil+ encoding/binary from archive/zip+ encoding/csv from github.com/gabriel-vasile/mimetype/internal/matchers - encoding/hex from berty.tech/berty/v2/go/pkg/bertytypes+ + encoding/hex from berty.tech/berty/v2/go/pkg/protocoltypes+ encoding/json from bazil.org/fuse+ encoding/pem from crypto/tls+ encoding/xml from github.com/huin/goupnp+ diff --git a/go/cmd/berty-doctor/rdvp.go b/go/cmd/berty-doctor/rdvp.go index 1fae5b32ee..f5f2330ae7 100644 --- a/go/cmd/berty-doctor/rdvp.go +++ b/go/cmd/berty-doctor/rdvp.go @@ -17,7 +17,9 @@ import ( p2p "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p-core/discovery" "github.com/libp2p/go-libp2p-core/peer" + "github.com/libp2p/go-libp2p-core/peerstore" quic "github.com/libp2p/go-libp2p-quic-transport" + "github.com/libp2p/go-libp2p/p2p/protocol/ping" ma "github.com/multiformats/go-multiaddr" "go.uber.org/zap" "moul.io/srand" @@ -26,6 +28,8 @@ import ( "berty.tech/berty/v2/go/internal/tinder" ) +const timeRounding = time.Microsecond * 10 + func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { defer (*gwg).Done() @@ -128,7 +132,16 @@ func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { } // Check if that particular addr is fine. - host.Peerstore().AddAddrs(tgtPi.ID, tgtPi.Addrs, math.MaxInt64) + host.Peerstore().AddAddrs(tgtPi.ID, tgtPi.Addrs, peerstore.PermanentAddrTTL) + + // Ping if we are in verbose + if verbose { + pingChan := ping.Ping(ctx, host, tgtPi.ID) + + defer func() { + rtr.ping = <-pingChan + }() + } // Setup discovery disc := tinder.NewRendezvousDiscovery( @@ -160,6 +173,7 @@ func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { // Advertise { + start := time.Now() duration, err := disc.Advertise(ctx, key, discovery.TTL(timeout)) if err != nil { rtr.message = fmt.Sprintf("Error advertising on %q: %s", tgtMaddr, err) @@ -168,46 +182,52 @@ func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { // We want at least an Hour of time from the RDVP, else our timeout is fine. if duration < timeout || duration >= time.Hour { rtr.message = fmt.Sprintf("Wrong time (%d) while advertising on %q", duration, tgtMaddr) - disc.Unregister(ctx, key) //nolint:errcheck + _ = disc.Unregister(ctx, key) return } + rtr.t.advertise = time.Since(start) } // FindPeers hid := host.ID() { + start := time.Now() // ReturnChannel rc, err := disc.FindPeers(ctx, key) if err != nil { rtr.message = fmt.Sprintf("Error finding peers on %q: %s", tgtMaddr, err) - disc.Unregister(ctx, key) //nolint:errcheck + _ = disc.Unregister(ctx, key) return } for v := range rc { if hid == v.ID { // Success ! + rtr.t.fetch = time.Since(start) goto TryingCheckUnregister } } // Error we weren't able to find us rtr.message = fmt.Sprintf("Wasn't able to find us on maddr %q", tgtMaddr) - disc.Unregister(ctx, key) //nolint:errcheck + _ = disc.Unregister(ctx, key) return } TryingCheckUnregister: // Unregister { + start := time.Now() err = disc.Unregister(ctx, key) if err != nil { rtr.message = fmt.Sprintf("Error unregistering us on %q: %s", tgtMaddr, err) return } + rtr.t.unregister = time.Since(start) } // FindPeers again but this time we shouldn't be there. { + start := time.Now() // ReturnChannel rc, err := disc.FindPeers(ctx, key) if err != nil { @@ -221,6 +241,7 @@ func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { return } } + rtr.t.fetchUnregistered = time.Since(start) } rtr.success = true }(lenAddrs) @@ -236,9 +257,18 @@ func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { { // Does at least one were successful ? var successCount uint + advertiseFetchRTTMinimal := time.Duration(math.MaxInt64) for _, v := range errs { if v.success { successCount++ + for _, w := range v.addrs { + if w.success { + wrtt := w.t.advertise + w.t.fetch + if wrtt < advertiseFetchRTTMinimal { + advertiseFetchRTTMinimal = wrtt + } + } + } } } if verbose || successCount == 0 { @@ -258,7 +288,18 @@ func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { fmt.Printf("RDVP %s:\n", server.id) for _, addr := range server.addrs { if addr.success { - fmt.Printf(" [%s] %q\n", green("+"), addr.target) + fmt.Printf(" [%s] %q (A: %s, F: %s, U: %s, FU: %s", + green("+"), + addr.target, + addr.t.advertise.Round(timeRounding).String(), + addr.t.fetch.Round(timeRounding).String(), + addr.t.unregister.Round(timeRounding).String(), + addr.t.fetchUnregistered.Round(timeRounding).String(), + ) + if addr.ping.Error == nil { + fmt.Printf(", P: %s", addr.ping.RTT.Round(timeRounding).String()) + } + fmt.Print(")\n") } else { fmt.Printf(" [%s] %q: %s\n", red("-"), addr.target, addr.message) } @@ -266,7 +307,7 @@ func testRDVPs(ctx context.Context, gwg *sync.WaitGroup, addrs []string) { } talkLock.Unlock() } else { - newOkS("RDVP (%d/%d)", successCount, len(errs)) + newOkS("RDVP (%d/%d, min A+F: %s)", successCount, len(errs), advertiseFetchRTTMinimal.Round(timeRounding).String()) } } } @@ -281,6 +322,13 @@ type discReturn struct { success bool target ma.Multiaddr message string + ping ping.Result + t struct { + advertise time.Duration + fetch time.Duration + unregister time.Duration + fetchUnregistered time.Duration + } } func doWriteOnHash(h io.Writer, buf []byte) { diff --git a/go/cmd/berty-integration/depaware.txt b/go/cmd/berty-integration/depaware.txt index 58f69f9de8..8fc3c7d8b0 100644 --- a/go/cmd/berty-integration/depaware.txt +++ b/go/cmd/berty-integration/depaware.txt @@ -22,7 +22,7 @@ berty.tech/berty/v2/go/cmd/berty-integration dependencies: (generated by github. L berty.tech/berty/v2/go/pkg/banner from berty.tech/berty/v2/go/pkg/bertymessenger L berty.tech/berty/v2/go/pkg/bertymessenger from berty.tech/berty/v2/go/cmd/berty-integration+ L berty.tech/berty/v2/go/pkg/bertyprotocol from berty.tech/berty/v2/go/internal/initutil+ - L berty.tech/berty/v2/go/pkg/bertytypes from berty.tech/berty/v2/go/internal/config+ + L berty.tech/berty/v2/go/pkg/protocoltypes from berty.tech/berty/v2/go/internal/config+ L berty.tech/berty/v2/go/pkg/bertyversion from berty.tech/berty/v2/go/internal/sysutil+ L berty.tech/berty/v2/go/pkg/errcode from berty.tech/berty/v2/go/internal/cryptoutil+ L berty.tech/berty/v2/go/pkg/tempdir from berty.tech/berty/v2/go/internal/initutil diff --git a/go/cmd/berty-integration/main.go b/go/cmd/berty-integration/main.go index 904bd57140..9851908f80 100644 --- a/go/cmd/berty-integration/main.go +++ b/go/cmd/berty-integration/main.go @@ -19,7 +19,7 @@ import ( "berty.tech/berty/v2/go/internal/config" "berty.tech/berty/v2/go/internal/initutil" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) func main() { @@ -54,7 +54,7 @@ type integration struct { manager initutil.Manager logger *zap.Logger ctx context.Context - client bertymessenger.MessengerServiceClient + client messengertypes.MessengerServiceClient opts struct { betabotAddr string testbotAddr string @@ -104,13 +104,13 @@ func (i *integration) testbotAdd() error { defer cancel() // parse invite URL - parsed, err := i.client.ParseDeepLink(ctx, &bertymessenger.ParseDeepLink_Request{Link: i.opts.testbotAddr}) + parsed, err := i.client.ParseDeepLink(ctx, &messengertypes.ParseDeepLink_Request{Link: i.opts.testbotAddr}) if err != nil { return err } // subscribe to events - s, err := i.client.EventStream(ctx, &bertymessenger.EventStream_Request{}) + s, err := i.client.EventStream(ctx, &messengertypes.EventStream_Request{}) if err != nil { return err } @@ -121,7 +121,7 @@ func (i *integration) testbotAdd() error { }() // send contact request - _, err = i.client.SendContactRequest(ctx, &bertymessenger.SendContactRequest_Request{ + _, err = i.client.SendContactRequest(ctx, &messengertypes.SendContactRequest_Request{ BertyID: parsed.GetLink().GetBertyID(), }) if err != nil { @@ -155,28 +155,28 @@ func (i *integration) testbotAdd() error { i.logger.Debug("new event", zap.Any("event", event)) switch event.GetType() { - case bertymessenger.StreamEvent_TypeContactUpdated: - contact := payload.(*bertymessenger.StreamEvent_ContactUpdated).Contact + case messengertypes.StreamEvent_TypeContactUpdated: + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact - if contact.State == bertymessenger.Contact_Accepted { + if contact.State == messengertypes.Contact_Accepted { contactAccepted = true } - case bertymessenger.StreamEvent_TypeConversationUpdated: - conversation := payload.(*bertymessenger.StreamEvent_ConversationUpdated).Conversation + case messengertypes.StreamEvent_TypeConversationUpdated: + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation if base64.RawURLEncoding.EncodeToString(parsed.GetLink().GetBertyID().GetAccountPK()) != conversation.ContactPublicKey { continue } conversationReady = true - case bertymessenger.StreamEvent_TypeInteractionUpdated: - interaction := payload.(*bertymessenger.StreamEvent_InteractionUpdated).Interaction + case messengertypes.StreamEvent_TypeInteractionUpdated: + interaction := payload.(*messengertypes.StreamEvent_InteractionUpdated).Interaction - if interaction.GetType() == bertymessenger.AppMessage_TypeUserMessage { + if interaction.GetType() == messengertypes.AppMessage_TypeUserMessage { payload, err := interaction.UnmarshalPayload() if err != nil { return err } - body := payload.(*bertymessenger.AppMessage_UserMessage).Body + body := payload.(*messengertypes.AppMessage_UserMessage).Body if base64.RawURLEncoding.EncodeToString(parsed.GetLink().GetBertyID().GetAccountPK()) != interaction.Conversation.ContactPublicKey { continue diff --git a/go/cmd/berty/daemon.go b/go/cmd/berty/daemon.go index 0f2e37f4f1..1b1c997d1c 100644 --- a/go/cmd/berty/daemon.go +++ b/go/cmd/berty/daemon.go @@ -7,8 +7,8 @@ import ( "github.com/peterbourgon/ff/v3/ffcli" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func daemonCommand() *ffcli.Command { @@ -58,7 +58,7 @@ func daemonCommand() *ffcli.Command { if err != nil { return err } - info, err := protocolClient.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + info, err := protocolClient.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return errcode.TODO.Wrap(err) } diff --git a/go/cmd/berty/depaware.txt b/go/cmd/berty/depaware.txt index 25a2d4d4ce..2bc0ffa1f3 100644 --- a/go/cmd/berty/depaware.txt +++ b/go/cmd/berty/depaware.txt @@ -24,7 +24,7 @@ berty.tech/berty/v2/go/cmd/berty dependencies: (generated by github.com/tailscal berty.tech/berty/v2/go/pkg/banner from berty.tech/berty/v2/go/cmd/berty+ berty.tech/berty/v2/go/pkg/bertymessenger from berty.tech/berty/v2/go/cmd/berty+ berty.tech/berty/v2/go/pkg/bertyprotocol from berty.tech/berty/v2/go/cmd/berty+ - berty.tech/berty/v2/go/pkg/bertytypes from berty.tech/berty/v2/go/cmd/berty+ + berty.tech/berty/v2/go/pkg/protocoltypes from berty.tech/berty/v2/go/cmd/berty+ berty.tech/berty/v2/go/pkg/bertyversion from berty.tech/berty/v2/go/cmd/berty+ berty.tech/berty/v2/go/pkg/errcode from berty.tech/berty/v2/go/cmd/berty+ 💣 berty.tech/berty/v2/go/pkg/tempdir from berty.tech/berty/v2/go/internal/initutil diff --git a/go/cmd/berty/export.go b/go/cmd/berty/export.go index 81b6afadf5..4ed7ea9c4e 100644 --- a/go/cmd/berty/export.go +++ b/go/cmd/berty/export.go @@ -9,7 +9,7 @@ import ( "github.com/peterbourgon/ff/v3/ffcli" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) func exportCommand() *ffcli.Command { @@ -56,7 +56,7 @@ func exportCommand() *ffcli.Command { defer func() { _ = f.Close() }() - cl, err := messenger.InstanceExportData(ctx, &bertymessenger.InstanceExportData_Request{}) + cl, err := messenger.InstanceExportData(ctx, &messengertypes.InstanceExportData_Request{}) if err != nil { return err } diff --git a/go/cmd/berty/groupinit.go b/go/cmd/berty/groupinit.go index da939da9c4..60cca24f20 100644 --- a/go/cmd/berty/groupinit.go +++ b/go/cmd/berty/groupinit.go @@ -10,18 +10,23 @@ import ( qrterminal "github.com/mdp/qrterminal/v3" "github.com/peterbourgon/ff/v3/ffcli" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/internal/bertylinks" "berty.tech/berty/v2/go/pkg/bertyprotocol" + "berty.tech/berty/v2/go/pkg/messengertypes" ) func groupinitCommand() *ffcli.Command { // FIXME: share on discord // FIXME: print berty.tech URL - var noQRFlag bool + var ( + noQRFlag bool + passphrase string + ) fsBuilder := func() (*flag.FlagSet, error) { fs := flag.NewFlagSet("berty groupinit", flag.ExitOnError) fs.String("config", "", "config file (optional)") fs.BoolVar(&noQRFlag, "no-qr", noQRFlag, "do not print the QR code in terminal") + fs.StringVar(&passphrase, "passphrase", passphrase, "optional encryption passphrase") manager.SetupLoggingFlags(fs) // also available at root level return fs, nil } @@ -44,12 +49,20 @@ func groupinitCommand() *ffcli.Command { } name := fmt.Sprintf("random-group-%d", mrand.Int31()%65535) // nolint:gosec - group := &bertymessenger.BertyGroup{ + group := &messengertypes.BertyGroup{ Group: g, DisplayName: name, } link := group.GetBertyLink() - internal, web, err := link.Marshal() + + if passphrase != "" { + link, err = bertylinks.EncryptLink(link, []byte(passphrase)) + if err != nil { + return err + } + } + + internal, web, err := bertylinks.MarshalLink(link) if err != nil { return err } diff --git a/go/cmd/berty/mini/main.go b/go/cmd/berty/mini/main.go index 9aa222fdd5..d3858f1912 100644 --- a/go/cmd/berty/mini/main.go +++ b/go/cmd/berty/mini/main.go @@ -16,14 +16,14 @@ import ( "berty.tech/berty/v2/go/internal/lifecycle" assets "berty.tech/berty/v2/go/pkg/assets" "berty.tech/berty/v2/go/pkg/bertymessenger" - "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type Opts struct { - MessengerClient bertymessenger.MessengerServiceClient - ProtocolClient bertyprotocol.ProtocolServiceClient + MessengerClient messengertypes.MessengerServiceClient + ProtocolClient protocoltypes.ProtocolServiceClient Logger *zap.Logger GroupInvitation string DisplayName string @@ -48,14 +48,14 @@ func Main(ctx context.Context, opts *Opts) error { ctx, cancel := context.WithCancel(ctx) defer cancel() - config, err := opts.ProtocolClient.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config, err := opts.ProtocolClient.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return errcode.TODO.Wrap(err) } app := tview.NewApplication() - accountGroup, err := opts.ProtocolClient.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + accountGroup, err := opts.ProtocolClient.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ GroupPK: config.AccountGroupPK, }) if err != nil { @@ -70,7 +70,7 @@ func Main(ctx context.Context, opts *Opts) error { tabbedView := newTabbedGroups(ctx, accountGroup, opts.ProtocolClient, opts.MessengerClient, app, opts.DisplayName) if len(opts.GroupInvitation) > 0 { - req := &bertytypes.GroupMetadataList_Request{GroupPK: accountGroup.Group.PublicKey} + req := &protocoltypes.GroupMetadataList_Request{GroupPK: accountGroup.Group.PublicKey} cl, err := tabbedView.protocol.GroupMetadataList(ctx, req) if err != nil { return errcode.ErrEventListMetadata.Wrap(err) @@ -87,7 +87,7 @@ func Main(ctx context.Context, opts *Opts) error { panic(err) } - if evt.Metadata.EventType != bertytypes.EventTypeAccountGroupJoined { + if evt.Metadata.EventType != protocoltypes.EventTypeAccountGroupJoined { continue } diff --git a/go/cmd/berty/mini/utils.go b/go/cmd/berty/mini/utils.go index 5d3845442d..4239da1c56 100644 --- a/go/cmd/berty/mini/utils.go +++ b/go/cmd/berty/mini/utils.go @@ -4,13 +4,13 @@ import ( "encoding/base64" "fmt" - "berty.tech/berty/v2/go/pkg/bertymessenger" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/internal/bertylinks" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func openGroupFromString(url string) (*bertytypes.Group, error) { - link, err := bertymessenger.UnmarshalLink(url) +func openGroupFromString(url string) (*protocoltypes.Group, error) { + link, err := bertylinks.UnmarshalLink(url, nil) // FIXME: support passing an optional passphrase to decrypt the link if err != nil { return nil, errcode.ErrInvalidInput.Wrap(err) } diff --git a/go/cmd/berty/mini/view_group.go b/go/cmd/berty/mini/view_group.go index b7206b3b3b..a2f5c59fc3 100644 --- a/go/cmd/berty/mini/view_group.go +++ b/go/cmd/berty/mini/view_group.go @@ -20,12 +20,12 @@ import ( "berty.tech/berty/v2/go/internal/tracer" "berty.tech/berty/v2/go/pkg/banner" - "berty.tech/berty/v2/go/pkg/bertymessenger" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type groupView struct { - g *bertytypes.Group + g *protocoltypes.Group messages *historyMessageList v *tabbedGroupsView inputHistory *inputHistory @@ -33,8 +33,8 @@ type groupView struct { memberPK []byte devicePK []byte acks sync.Map - devices map[string]*bertytypes.GroupAddMemberDevice - secrets map[string]*bertytypes.GroupAddDeviceSecret + devices map[string]*protocoltypes.GroupAddMemberDevice + secrets map[string]*protocoltypes.GroupAddDeviceSecret muAggregates sync.Mutex logger *zap.Logger hasNew int32 @@ -96,7 +96,7 @@ func (v *groupView) OnSubmit(ctx context.Context, input string) { v.inputHistory.Append(input) } -func newViewGroup(v *tabbedGroupsView, g *bertytypes.Group, memberPK, devicePK []byte, logger *zap.Logger) *groupView { +func newViewGroup(v *tabbedGroupsView, g *protocoltypes.Group, memberPK, devicePK []byte, logger *zap.Logger) *groupView { return &groupView{ memberPK: memberPK, devicePK: devicePK, @@ -106,17 +106,17 @@ func newViewGroup(v *tabbedGroupsView, g *bertytypes.Group, memberPK, devicePK [ syncMessages: make(chan *historyMessage), inputHistory: newInputHistory(), logger: logger.With(zap.String("group", pkAsShortID(g.PublicKey))), - devices: map[string]*bertytypes.GroupAddMemberDevice{}, - secrets: map[string]*bertytypes.GroupAddDeviceSecret{}, + devices: map[string]*protocoltypes.GroupAddMemberDevice{}, + secrets: map[string]*protocoltypes.GroupAddDeviceSecret{}, } } -func (v *groupView) ack(ctx context.Context, evt *bertytypes.GroupMessageEvent) { - if v.g.GroupType != bertytypes.GroupTypeContact { +func (v *groupView) ack(ctx context.Context, evt *protocoltypes.GroupMessageEvent) { + if v.g.GroupType != protocoltypes.GroupTypeContact { return } - _, err := v.v.messenger.SendAck(ctx, &bertymessenger.SendAck_Request{ + _, err := v.v.messenger.SendAck(ctx, &messengertypes.SendAck_Request{ GroupPK: evt.EventContext.GroupPK, MessageID: evt.EventContext.ID, }) @@ -141,7 +141,7 @@ func (v *groupView) loop(ctx context.Context) { }() // Open group with local only first - if _, err := v.v.protocol.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + if _, err := v.v.protocol.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: v.g.PublicKey, }); err != nil { v.messages.Append(&historyMessage{ @@ -154,7 +154,7 @@ func (v *groupView) loop(ctx context.Context) { // subscribe to group metadata monitor { - req := &bertytypes.MonitorGroup_Request{GroupPK: v.g.PublicKey} + req := &protocoltypes.MonitorGroup_Request{GroupPK: v.g.PublicKey} cl, err := v.v.protocol.MonitorGroup(ctx, req) if err != nil { panic(err) @@ -183,7 +183,7 @@ func (v *groupView) loop(ctx context.Context) { // list group message events { - req := &bertytypes.GroupMessageList_Request{GroupPK: v.g.PublicKey, UntilNow: true} + req := &protocoltypes.GroupMessageList_Request{GroupPK: v.g.PublicKey, UntilNow: true} cl, err := v.v.protocol.GroupMessageList(ctx, req) if err != nil { panic(err) @@ -199,7 +199,7 @@ func (v *groupView) loop(ctx context.Context) { } lastMessageID = evt.EventContext.ID - amp, am, err := bertymessenger.UnmarshalAppMessage(evt.GetMessage()) + amp, am, err := messengertypes.UnmarshalAppMessage(evt.GetMessage()) if err != nil { v.messages.Prepend(&historyMessage{ messageType: messageTypeMessage, @@ -210,18 +210,18 @@ func (v *groupView) loop(ctx context.Context) { } switch am.GetType() { - case bertymessenger.AppMessage_TypeAcknowledge: + case messengertypes.AppMessage_TypeAcknowledge: if !bytes.Equal(evt.Headers.DevicePK, v.devicePK) { continue } - payload := amp.(*bertymessenger.AppMessage_Acknowledge) + payload := amp.(*messengertypes.AppMessage_Acknowledge) v.acks.Store(payload.Target, true) - case bertymessenger.AppMessage_TypeReplyOptions: + case messengertypes.AppMessage_TypeReplyOptions: // TODO: - case bertymessenger.AppMessage_TypeUserMessage: - payload := amp.(*bertymessenger.AppMessage_UserMessage) + case messengertypes.AppMessage_TypeUserMessage: + payload := amp.(*messengertypes.AppMessage_UserMessage) v.messages.Prepend(&historyMessage{ messageType: messageTypeMessage, payload: []byte(payload.Body), @@ -235,7 +235,7 @@ func (v *groupView) loop(ctx context.Context) { // list group metadata events { - req := &bertytypes.GroupMetadataList_Request{GroupPK: v.g.PublicKey, UntilNow: true} + req := &protocoltypes.GroupMetadataList_Request{GroupPK: v.g.PublicKey, UntilNow: true} cl, err := v.v.protocol.GroupMetadataList(ctx, req) if err != nil { panic(err) @@ -257,9 +257,9 @@ func (v *groupView) loop(ctx context.Context) { // subscribe to group message events { - var evt *bertytypes.GroupMessageEvent + var evt *protocoltypes.GroupMessageEvent - req := &bertytypes.GroupMessageList_Request{GroupPK: v.g.PublicKey, SinceID: lastMessageID} + req := &protocoltypes.GroupMessageList_Request{GroupPK: v.g.PublicKey, SinceID: lastMessageID} cl, err := v.v.protocol.GroupMessageList(ctx, req) if err != nil { panic(err) @@ -286,7 +286,7 @@ func (v *groupView) loop(ctx context.Context) { return } - var am bertymessenger.AppMessage + var am messengertypes.AppMessage err := proto.Unmarshal(evt.Message, &am) if err != nil { v.messages.Append(&historyMessage{ @@ -300,11 +300,11 @@ func (v *groupView) loop(ctx context.Context) { } switch am.GetType() { - case bertymessenger.AppMessage_TypeAcknowledge: + case messengertypes.AppMessage_TypeAcknowledge: if !bytes.Equal(evt.Headers.DevicePK, v.devicePK) { continue } - var payload bertymessenger.AppMessage_Acknowledge + var payload messengertypes.AppMessage_Acknowledge err := proto.Unmarshal(am.GetPayload(), &payload) if err != nil { v.logger.Error("failed to unmarshal Acknowledge", zap.Error(err)) @@ -312,8 +312,8 @@ func (v *groupView) loop(ctx context.Context) { v.acks.Store(payload.Target, true) continue - case bertymessenger.AppMessage_TypeUserMessage: - var payload bertymessenger.AppMessage_UserMessage + case messengertypes.AppMessage_TypeUserMessage: + var payload messengertypes.AppMessage_UserMessage err := proto.Unmarshal(am.GetPayload(), &payload) if err != nil { v.logger.Error("failed to unmarshal UserMessage", zap.Error(err)) @@ -331,8 +331,8 @@ func (v *groupView) loop(ctx context.Context) { v.addBadge() v.ack(ctx, evt) - case bertymessenger.AppMessage_TypeReplyOptions: - var payload bertymessenger.AppMessage_ReplyOptions + case messengertypes.AppMessage_TypeReplyOptions: + var payload messengertypes.AppMessage_ReplyOptions err := proto.Unmarshal(am.GetPayload(), &payload) if err != nil { v.logger.Error("failed to unmarshal ReplyOptions", zap.Error(err)) @@ -364,9 +364,9 @@ func (v *groupView) loop(ctx context.Context) { // subscribe to group metadata events { - var evt *bertytypes.GroupMetadataEvent + var evt *protocoltypes.GroupMetadataEvent - req := &bertytypes.GroupMetadataList_Request{GroupPK: v.g.PublicKey, SinceID: lastMetadataID} + req := &protocoltypes.GroupMetadataList_Request{GroupPK: v.g.PublicKey, SinceID: lastMetadataID} cl, err := v.v.protocol.GroupMetadataList(ctx, req) if err != nil { panic(err) diff --git a/go/cmd/berty/mini/view_group_incoming.go b/go/cmd/berty/mini/view_group_incoming.go index e872b212b2..bdc0d04661 100644 --- a/go/cmd/berty/mini/view_group_incoming.go +++ b/go/cmd/berty/mini/view_group_incoming.go @@ -9,12 +9,12 @@ import ( "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func handlerAccountGroupJoined(ctx context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountGroupJoined{} +func handlerAccountGroupJoined(ctx context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountGroupJoined{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -31,8 +31,8 @@ func handlerAccountGroupJoined(ctx context.Context, v *groupView, e *bertytypes. return nil } -func handlerGroupDeviceSecretAdded(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.GroupAddDeviceSecret{} +func handlerGroupDeviceSecretAdded(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.GroupAddDeviceSecret{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -50,8 +50,8 @@ func handlerGroupDeviceSecretAdded(_ context.Context, v *groupView, e *bertytype return nil } -func handlerGroupMemberDeviceAdded(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.GroupAddMemberDevice{} +func handlerGroupMemberDeviceAdded(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.GroupAddMemberDevice{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -69,8 +69,8 @@ func handlerGroupMemberDeviceAdded(_ context.Context, v *groupView, e *bertytype return nil } -func handlerAccountContactRequestOutgoingSent(ctx context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountContactRequestSent{} +func handlerAccountContactRequestOutgoingSent(ctx context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountContactRequestSent{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -81,7 +81,7 @@ func handlerAccountContactRequestOutgoingSent(ctx context.Context, v *groupView, sender: casted.DevicePK, }, e, v, isHistory) - gInfo, err := v.v.protocol.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + gInfo, err := v.v.protocol.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: casted.ContactPK, }) if err != nil { @@ -90,7 +90,7 @@ func handlerAccountContactRequestOutgoingSent(ctx context.Context, v *groupView, v.v.lock.Lock() if _, hasValue := v.v.contactStates[string(casted.ContactPK)]; !hasValue || !isHistory { - v.v.contactStates[string(casted.ContactPK)] = bertytypes.ContactStateAdded + v.v.contactStates[string(casted.ContactPK)] = protocoltypes.ContactStateAdded } v.v.lock.Unlock() @@ -101,8 +101,8 @@ func handlerAccountContactRequestOutgoingSent(ctx context.Context, v *groupView, return nil } -func handlerAccountGroupLeft(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountGroupLeft{} +func handlerAccountGroupLeft(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountGroupLeft{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -116,8 +116,8 @@ func handlerAccountGroupLeft(_ context.Context, v *groupView, e *bertytypes.Grou return nil } -func handlerAccountContactRequestIncomingReceived(ctx context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountContactRequestReceived{} +func handlerAccountContactRequestIncomingReceived(ctx context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountContactRequestReceived{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -132,12 +132,12 @@ func handlerAccountContactRequestIncomingReceived(ctx context.Context, v *groupV v.v.lock.Lock() if _, hasValue := v.v.contactStates[string(casted.ContactPK)]; !hasValue || !isHistory { - v.v.contactStates[string(casted.ContactPK)] = bertytypes.ContactStateReceived + v.v.contactStates[string(casted.ContactPK)] = protocoltypes.ContactStateReceived } v.v.lock.Unlock() v.v.lock.Lock() - gInfo, err := v.v.protocol.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + gInfo, err := v.v.protocol.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: casted.ContactPK, }) @@ -151,8 +151,8 @@ func handlerAccountContactRequestIncomingReceived(ctx context.Context, v *groupV return nil } -func handlerAccountContactRequestIncomingDiscarded(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountContactRequestDiscarded{} +func handlerAccountContactRequestIncomingDiscarded(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountContactRequestDiscarded{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -165,15 +165,15 @@ func handlerAccountContactRequestIncomingDiscarded(_ context.Context, v *groupVi v.v.lock.Lock() if _, hasValue := v.v.contactStates[string(casted.ContactPK)]; !hasValue || !isHistory { - v.v.contactStates[string(casted.ContactPK)] = bertytypes.ContactStateRemoved + v.v.contactStates[string(casted.ContactPK)] = protocoltypes.ContactStateRemoved } v.v.lock.Unlock() return nil } -func handlerMultiMemberGroupInitialMemberAnnounced(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.MultiMemberInitialMember{} +func handlerMultiMemberGroupInitialMemberAnnounced(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.MultiMemberInitialMember{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -187,8 +187,8 @@ func handlerMultiMemberGroupInitialMemberAnnounced(_ context.Context, v *groupVi return nil } -func handlerAccountContactRequestOutgoingEnqueued(ctx context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountContactRequestEnqueued{} +func handlerAccountContactRequestOutgoingEnqueued(ctx context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountContactRequestEnqueued{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -210,12 +210,12 @@ func handlerAccountContactRequestOutgoingEnqueued(ctx context.Context, v *groupV v.v.lock.Lock() if _, hasValue := v.v.contactStates[string(casted.Contact.PK)]; !hasValue || !isHistory { - v.v.contactStates[string(casted.Contact.PK)] = bertytypes.ContactStateToRequest + v.v.contactStates[string(casted.Contact.PK)] = protocoltypes.ContactStateToRequest } v.v.lock.Unlock() v.v.lock.Lock() - gInfo, err := v.v.protocol.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + gInfo, err := v.v.protocol.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: casted.Contact.PK, }) @@ -229,8 +229,8 @@ func handlerAccountContactRequestOutgoingEnqueued(ctx context.Context, v *groupV return nil } -func handlerContactAliasKeyAdded(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.ContactAddAliasKey{} +func handlerContactAliasKeyAdded(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.ContactAddAliasKey{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -244,8 +244,8 @@ func handlerContactAliasKeyAdded(_ context.Context, v *groupView, e *bertytypes. return nil } -func handlerMultiMemberGroupAliasResolverAdded(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.MultiMemberGroupAddAliasResolver{} +func handlerMultiMemberGroupAliasResolverAdded(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.MultiMemberGroupAddAliasResolver{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -259,8 +259,8 @@ func handlerMultiMemberGroupAliasResolverAdded(_ context.Context, v *groupView, return nil } -func handlerAccountContactRequestIncomingAccepted(ctx context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountContactRequestSent{} +func handlerAccountContactRequestIncomingAccepted(ctx context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountContactRequestSent{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -271,7 +271,7 @@ func handlerAccountContactRequestIncomingAccepted(ctx context.Context, v *groupV sender: casted.DevicePK, }, e, v, isHistory) - gInfo, err := v.v.protocol.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + gInfo, err := v.v.protocol.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: casted.ContactPK, }) if err != nil { @@ -280,7 +280,7 @@ func handlerAccountContactRequestIncomingAccepted(ctx context.Context, v *groupV v.v.lock.Lock() if _, hasValue := v.v.contactStates[string(casted.ContactPK)]; !hasValue || !isHistory { - v.v.contactStates[string(casted.ContactPK)] = bertytypes.ContactStateAdded + v.v.contactStates[string(casted.ContactPK)] = protocoltypes.ContactStateAdded } v.v.lock.Unlock() @@ -290,15 +290,15 @@ func handlerAccountContactRequestIncomingAccepted(ctx context.Context, v *groupV return nil } -func handlerNoop(_ context.Context, _ *groupView, _ *bertytypes.GroupMetadataEvent, _ bool) error { +func handlerNoop(_ context.Context, _ *groupView, _ *protocoltypes.GroupMetadataEvent, _ bool) error { return nil } -func groupMonitorEventHandler(logger *zap.Logger, v *groupView, e *bertytypes.MonitorGroup_EventMonitor) { +func groupMonitorEventHandler(logger *zap.Logger, v *groupView, e *protocoltypes.MonitorGroup_EventMonitor) { var payload string switch t := e.GetType(); t { - case bertytypes.TypeEventMonitorPeerJoin: + case protocoltypes.TypeEventMonitorPeerJoin: peerjoin := e.GetPeerJoin() if peerjoin.IsSelf { payload = "you just joined this group" @@ -310,18 +310,18 @@ func groupMonitorEventHandler(logger *zap.Logger, v *groupView, e *bertytypes.Mo payload = fmt.Sprintf("peer joined <%.15s> on: %s", peerjoin.GetPeerID(), activeAddr) } - case bertytypes.TypeEventMonitorPeerLeave: + case protocoltypes.TypeEventMonitorPeerLeave: peerleave := e.GetPeerLeave() if peerleave.IsSelf { payload = "you just leaved this group" } else { payload = fmt.Sprintf("peer leaved <%.15s>", peerleave.GetPeerID()) } - case bertytypes.TypeEventMonitorAdvertiseGroup: + case protocoltypes.TypeEventMonitorAdvertiseGroup: advertisegroup := e.GetAdvertiseGroup() payload = fmt.Sprintf("local peer advertised <%.15s> on `%s`, with %d maddrs", advertisegroup.GetPeerID(), advertisegroup.GetDriverName(), len(advertisegroup.GetMaddrs())) - case bertytypes.TypeEventMonitorPeerFound: + case protocoltypes.TypeEventMonitorPeerFound: peerfound := e.GetPeerFound() payload = fmt.Sprintf("new peer found <%.15s> on `%s`, with %d maddrs", peerfound.GetPeerID(), peerfound.GetDriverName(), len(peerfound.GetMaddrs())) @@ -336,28 +336,28 @@ func groupMonitorEventHandler(logger *zap.Logger, v *groupView, e *bertytypes.Mo }) } -func metadataEventHandler(ctx context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool, logger *zap.Logger) { - actions := map[bertytypes.EventType]func(context.Context, *groupView, *bertytypes.GroupMetadataEvent, bool) error{ - bertytypes.EventTypeAccountContactBlocked: nil, // do it later - bertytypes.EventTypeAccountContactRequestDisabled: handlerNoop, - bertytypes.EventTypeAccountContactRequestEnabled: handlerNoop, - bertytypes.EventTypeAccountContactRequestIncomingAccepted: handlerAccountContactRequestIncomingAccepted, - bertytypes.EventTypeAccountContactRequestIncomingDiscarded: handlerAccountContactRequestIncomingDiscarded, - bertytypes.EventTypeAccountContactRequestIncomingReceived: handlerAccountContactRequestIncomingReceived, - bertytypes.EventTypeAccountContactRequestOutgoingEnqueued: handlerAccountContactRequestOutgoingEnqueued, - bertytypes.EventTypeAccountContactRequestOutgoingSent: handlerAccountContactRequestOutgoingSent, - bertytypes.EventTypeAccountContactRequestReferenceReset: handlerNoop, - bertytypes.EventTypeAccountContactUnblocked: nil, // do it later - bertytypes.EventTypeAccountGroupJoined: handlerAccountGroupJoined, - bertytypes.EventTypeAccountGroupLeft: handlerAccountGroupLeft, - bertytypes.EventTypeContactAliasKeyAdded: handlerContactAliasKeyAdded, - bertytypes.EventTypeGroupDeviceSecretAdded: handlerGroupDeviceSecretAdded, - bertytypes.EventTypeGroupMemberDeviceAdded: handlerGroupMemberDeviceAdded, - bertytypes.EventTypeGroupMetadataPayloadSent: nil, // do it later - bertytypes.EventTypeMultiMemberGroupAdminRoleGranted: nil, // do it later - bertytypes.EventTypeMultiMemberGroupAliasResolverAdded: handlerMultiMemberGroupAliasResolverAdded, - bertytypes.EventTypeMultiMemberGroupInitialMemberAnnounced: handlerMultiMemberGroupInitialMemberAnnounced, - bertytypes.EventTypeAccountServiceTokenAdded: handlerAccountServiceTokenAdded, +func metadataEventHandler(ctx context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool, logger *zap.Logger) { + actions := map[protocoltypes.EventType]func(context.Context, *groupView, *protocoltypes.GroupMetadataEvent, bool) error{ + protocoltypes.EventTypeAccountContactBlocked: nil, // do it later + protocoltypes.EventTypeAccountContactRequestDisabled: handlerNoop, + protocoltypes.EventTypeAccountContactRequestEnabled: handlerNoop, + protocoltypes.EventTypeAccountContactRequestIncomingAccepted: handlerAccountContactRequestIncomingAccepted, + protocoltypes.EventTypeAccountContactRequestIncomingDiscarded: handlerAccountContactRequestIncomingDiscarded, + protocoltypes.EventTypeAccountContactRequestIncomingReceived: handlerAccountContactRequestIncomingReceived, + protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued: handlerAccountContactRequestOutgoingEnqueued, + protocoltypes.EventTypeAccountContactRequestOutgoingSent: handlerAccountContactRequestOutgoingSent, + protocoltypes.EventTypeAccountContactRequestReferenceReset: handlerNoop, + protocoltypes.EventTypeAccountContactUnblocked: nil, // do it later + protocoltypes.EventTypeAccountGroupJoined: handlerAccountGroupJoined, + protocoltypes.EventTypeAccountGroupLeft: handlerAccountGroupLeft, + protocoltypes.EventTypeContactAliasKeyAdded: handlerContactAliasKeyAdded, + protocoltypes.EventTypeGroupDeviceSecretAdded: handlerGroupDeviceSecretAdded, + protocoltypes.EventTypeGroupMemberDeviceAdded: handlerGroupMemberDeviceAdded, + protocoltypes.EventTypeGroupMetadataPayloadSent: nil, // do it later + protocoltypes.EventTypeMultiMemberGroupAdminRoleGranted: nil, // do it later + protocoltypes.EventTypeMultiMemberGroupAliasResolverAdded: handlerMultiMemberGroupAliasResolverAdded, + protocoltypes.EventTypeMultiMemberGroupInitialMemberAnnounced: handlerMultiMemberGroupInitialMemberAnnounced, + protocoltypes.EventTypeAccountServiceTokenAdded: handlerAccountServiceTokenAdded, } logger.Debug("metadataEventHandler", zap.Stringer("event-type", e.Metadata.EventType)) @@ -374,8 +374,8 @@ func metadataEventHandler(ctx context.Context, v *groupView, e *bertytypes.Group } } -func handlerAccountServiceTokenAdded(_ context.Context, v *groupView, e *bertytypes.GroupMetadataEvent, isHistory bool) error { - casted := &bertytypes.AccountServiceTokenAdded{} +func handlerAccountServiceTokenAdded(_ context.Context, v *groupView, e *protocoltypes.GroupMetadataEvent, isHistory bool) error { + casted := &protocoltypes.AccountServiceTokenAdded{} if err := casted.Unmarshal(e.Event); err != nil { return err } @@ -395,7 +395,7 @@ func handlerAccountServiceTokenAdded(_ context.Context, v *groupView, e *bertyty return nil } -func addToBuffer(evt *historyMessage, _ *bertytypes.GroupMetadataEvent, v *groupView, isHistory bool) { +func addToBuffer(evt *historyMessage, _ *protocoltypes.GroupMetadataEvent, v *groupView, isHistory bool) { if isHistory { v.messages.Prepend(evt, time.Time{}) } else { diff --git a/go/cmd/berty/mini/view_group_outgoing.go b/go/cmd/berty/mini/view_group_outgoing.go index 670a5fb97f..81a4367691 100644 --- a/go/cmd/berty/mini/view_group_outgoing.go +++ b/go/cmd/berty/mini/view_group_outgoing.go @@ -15,9 +15,10 @@ import ( "github.com/mdp/qrterminal/v3" "moul.io/godev" - "berty.tech/berty/v2/go/pkg/bertymessenger" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/internal/bertylinks" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type command struct { @@ -201,14 +202,14 @@ func commandList() []*command { } func sendReplyOptions(ctx context.Context, v *groupView, cmd string) error { - options := []*bertymessenger.ReplyOption{} + options := []*messengertypes.ReplyOption{} if err := json.Unmarshal([]byte(cmd), &options); err != nil { return err } - _, err := v.v.messenger.SendReplyOptions(ctx, &bertymessenger.SendReplyOptions_Request{ + _, err := v.v.messenger.SendReplyOptions(ctx, &messengertypes.SendReplyOptions_Request{ GroupPK: v.g.PublicKey, - Options: &bertymessenger.AppMessage_ReplyOptions{ + Options: &messengertypes.AppMessage_ReplyOptions{ Options: options, }, }) @@ -226,7 +227,7 @@ func exportAccount(ctx context.Context, v *groupView, path string) error { defer func() { _ = f.Close() }() - cl, err := v.v.messenger.InstanceExportData(ctx, &bertymessenger.InstanceExportData_Request{}) + cl, err := v.v.messenger.InstanceExportData(ctx, &messengertypes.InstanceExportData_Request{}) if err != nil { return err } @@ -250,7 +251,7 @@ func exportAccount(ctx context.Context, v *groupView, path string) error { } func authInit(ctx context.Context, v *groupView, cmd string) error { - rep, err := v.v.protocol.AuthServiceInitFlow(ctx, &bertytypes.AuthServiceInitFlow_Request{ + rep, err := v.v.protocol.AuthServiceInitFlow(ctx, &protocoltypes.AuthServiceInitFlow_Request{ AuthURL: strings.TrimSpace(cmd), }) if err != nil { @@ -280,7 +281,7 @@ func authInit(ctx context.Context, v *groupView, cmd string) error { } func authComplete(ctx context.Context, v *groupView, cmd string) error { - _, err := v.v.protocol.AuthServiceCompleteFlow(ctx, &bertytypes.AuthServiceCompleteFlow_Request{ + _, err := v.v.protocol.AuthServiceCompleteFlow(ctx, &protocoltypes.AuthServiceCompleteFlow_Request{ CallbackURL: strings.TrimSpace(cmd), }) @@ -288,7 +289,7 @@ func authComplete(ctx context.Context, v *groupView, cmd string) error { } func servicesList(ctx context.Context, v *groupView, _ string) error { - cl, err := v.v.protocol.ServicesTokenList(ctx, &bertytypes.ServicesTokenList_Request{}) + cl, err := v.v.protocol.ServicesTokenList(ctx, &protocoltypes.ServicesTokenList_Request{}) if err != nil { return err } @@ -314,7 +315,7 @@ func servicesList(ctx context.Context, v *groupView, _ string) error { } func replGroup(ctx context.Context, v *groupView, cmd string) error { - if _, err := v.v.messenger.ReplicationServiceRegisterGroup(ctx, &bertymessenger.ReplicationServiceRegisterGroup_Request{ + if _, err := v.v.messenger.ReplicationServiceRegisterGroup(ctx, &messengertypes.ReplicationServiceRegisterGroup_Request{ TokenID: strings.TrimSpace(cmd), ConversationPublicKey: base64.RawURLEncoding.EncodeToString(v.g.PublicKey), }); err != nil { @@ -338,7 +339,7 @@ func setDisplayName(_ context.Context, v *groupView, cmd string) error { } func debugIPFSCommand(ctx context.Context, v *groupView, _ string) error { - config, err := v.v.protocol.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config, err := v.v.protocol.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return err } @@ -360,7 +361,7 @@ func debugIPFSCommand(ctx context.Context, v *groupView, _ string) error { } func debugSystemCommand(ctx context.Context, v *groupView, _ string) error { - info, err := v.v.messenger.SystemInfo(ctx, &bertymessenger.SystemInfo_Request{}) + info, err := v.v.messenger.SystemInfo(ctx, &messengertypes.SystemInfo_Request{}) if err != nil { return err } @@ -386,7 +387,7 @@ func contactDiscardAllCommand(ctx context.Context, v *groupView, cmd string) err toAdd := [][]byte(nil) for id, contactState := range v.v.contactStates { - if contactState != bertytypes.ContactStateReceived { + if contactState != protocoltypes.ContactStateReceived { continue } @@ -408,7 +409,7 @@ func contactAcceptAllCommand(ctx context.Context, v *groupView, cmd string) erro toAdd := [][]byte(nil) for id, contactState := range v.v.contactStates { - if contactState != bertytypes.ContactStateReceived { + if contactState != protocoltypes.ContactStateReceived { continue } @@ -439,18 +440,18 @@ func debugInspectStoreCommand(ctx context.Context, v *groupView, cmd string) err return fmt.Errorf("invalid args, expected: group_pk {message,metadata} (%w)", err) } - var logType bertytypes.DebugInspectGroupLogType + var logType protocoltypes.DebugInspectGroupLogType switch args[1] { case "message": - logType = bertytypes.DebugInspectGroupLogTypeMessage + logType = protocoltypes.DebugInspectGroupLogTypeMessage case "metadata": - logType = bertytypes.DebugInspectGroupLogTypeMetadata + logType = protocoltypes.DebugInspectGroupLogTypeMetadata default: return fmt.Errorf("invalid args, expected: group_pk {message,metadata}") } - sub, err := v.v.protocol.DebugInspectGroupStore(ctx, &bertytypes.DebugInspectGroupStore_Request{ + sub, err := v.v.protocol.DebugInspectGroupStore(ctx, &protocoltypes.DebugInspectGroupStore_Request{ GroupPK: groupPK, LogType: logType, }) @@ -478,7 +479,7 @@ func debugInspectStoreCommand(ctx context.Context, v *groupView, cmd string) err } } -func formatDebugInspectGroupStoreReply(rep *bertytypes.DebugInspectGroupStore_Reply, storeType bertytypes.DebugInspectGroupLogType) []byte { +func formatDebugInspectGroupStoreReply(rep *protocoltypes.DebugInspectGroupStore_Reply, storeType protocoltypes.DebugInspectGroupLogType) []byte { data := []string(nil) if rep.CID != nil { @@ -508,15 +509,15 @@ func formatDebugInspectGroupStoreReply(rep *bertytypes.DebugInspectGroupStore_Re data = append(data, fmt.Sprintf("device: %s", base64.StdEncoding.EncodeToString(rep.DevicePK))) } - if storeType == bertytypes.DebugInspectGroupLogTypeMessage && len(rep.Payload) > 0 { + if storeType == protocoltypes.DebugInspectGroupLogTypeMessage && len(rep.Payload) > 0 { data = append(data, fmt.Sprintf("payload: %s", string(rep.Payload))) } return []byte(strings.Join(data, ", ")) } -func formatDebugListGroupsReply(rep *bertytypes.DebugListGroups_Reply) []byte { - if rep.GroupType == bertytypes.GroupTypeContact { +func formatDebugListGroupsReply(rep *protocoltypes.DebugListGroups_Reply) []byte { + if rep.GroupType == protocoltypes.GroupTypeContact { return []byte(fmt.Sprintf("%s: %s (contact: %s)", rep.GroupType.String(), base64.StdEncoding.EncodeToString(rep.GroupPK), base64.StdEncoding.EncodeToString(rep.ContactPK))) } @@ -527,7 +528,7 @@ func debugListGroupsCommand(ctx context.Context, v *groupView, cmd string) error ctx, cancel := context.WithCancel(ctx) defer cancel() - sub, err := v.v.protocol.DebugListGroups(ctx, &bertytypes.DebugListGroups_Request{}) + sub, err := v.v.protocol.DebugListGroups(ctx, &protocoltypes.DebugListGroups_Request{}) if err != nil { return err } @@ -577,7 +578,7 @@ func debugListGroupCommand(ctx context.Context, v *groupView, cmd string) error payload: []byte(fmt.Sprintf("device pk: %s", base64.StdEncoding.EncodeToString(v.devicePK))), }) - if v.g.GroupType == bertytypes.GroupTypeMultiMember { + if v.g.GroupType == protocoltypes.GroupTypeMultiMember { v.muAggregates.Lock() v.messages.Append(&historyMessage{ @@ -607,7 +608,7 @@ func debugListGroupCommand(ctx context.Context, v *groupView, cmd string) error v.muAggregates.Unlock() } - groupDebug, err := v.v.protocol.DebugGroup(ctx, &bertytypes.DebugGroup_Request{ + groupDebug, err := v.v.protocol.DebugGroup(ctx, &protocoltypes.DebugGroup_Request{ GroupPK: v.g.PublicKey, }) if err != nil { @@ -645,7 +646,7 @@ func debugListGroupCommand(ctx context.Context, v *groupView, cmd string) error // } func aliasSendCommand(ctx context.Context, v *groupView, cmd string) error { - if _, err := v.v.protocol.ContactAliasKeySend(ctx, &bertytypes.ContactAliasKeySend_Request{ + if _, err := v.v.protocol.ContactAliasKeySend(ctx, &protocoltypes.ContactAliasKeySend_Request{ GroupPK: v.g.PublicKey, }); err != nil { return err @@ -656,7 +657,7 @@ func aliasSendCommand(ctx context.Context, v *groupView, cmd string) error { func groupInviteCommand(renderFunc func(*groupView, string)) func(ctx context.Context, v *groupView, cmd string) error { return func(ctx context.Context, v *groupView, cmd string) error { - res, err := v.v.messenger.ShareableBertyGroup(ctx, &bertymessenger.ShareableBertyGroup_Request{ + res, err := v.v.messenger.ShareableBertyGroup(ctx, &messengertypes.ShareableBertyGroup_Request{ GroupPK: v.g.PublicKey, GroupName: "some group", }) @@ -708,7 +709,7 @@ func contactAcceptCommand(ctx context.Context, v *groupView, cmd string) error { return err } - if _, err = v.v.protocol.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ + if _, err = v.v.protocol.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ ContactPK: pkBytes, }); err != nil { return err @@ -723,7 +724,7 @@ func contactDiscardCommand(ctx context.Context, v *groupView, cmd string) error return err } - if _, err = v.v.protocol.ContactRequestDiscard(ctx, &bertytypes.ContactRequestDiscard_Request{ + if _, err = v.v.protocol.ContactRequestDiscard(ctx, &protocoltypes.ContactRequestDiscard_Request{ ContactPK: pkBytes, }); err != nil { return err @@ -738,7 +739,7 @@ func groupJoinCommand(ctx context.Context, v *groupView, cmd string) error { return fmt.Errorf("err: can't join group %w", err) } - _, err = v.v.protocol.MultiMemberGroupJoin(ctx, &bertytypes.MultiMemberGroupJoin_Request{ + _, err = v.v.protocol.MultiMemberGroupJoin(ctx, &protocoltypes.MultiMemberGroupJoin_Request{ Group: g, }) @@ -746,7 +747,7 @@ func groupJoinCommand(ctx context.Context, v *groupView, cmd string) error { } func groupNewCommand(ctx context.Context, v *groupView, _ string) error { - _, err := v.v.protocol.MultiMemberGroupCreate(ctx, &bertytypes.MultiMemberGroupCreate_Request{}) + _, err := v.v.protocol.MultiMemberGroupCreate(ctx, &protocoltypes.MultiMemberGroupCreate_Request{}) return err } @@ -756,7 +757,7 @@ func contactRequestCommand(ctx context.Context, v *groupView, cmd string) error displayName := v.v.displayName v.v.lock.Unlock() - link, err := bertymessenger.UnmarshalLink(cmd) + link, err := bertylinks.UnmarshalLink(cmd, nil) // FIXME: support passing an optional passphrase to decrypt the link if err != nil { return errcode.ErrInvalidInput.Wrap(err) } @@ -764,13 +765,13 @@ func contactRequestCommand(ctx context.Context, v *groupView, cmd string) error return errcode.ErrInvalidInput.Wrap(fmt.Errorf("expected a contact URL, got %q instead", link.GetKind())) } - contact := &bertytypes.ShareableContact{ + contact := &protocoltypes.ShareableContact{ PK: link.BertyID.AccountPK, PublicRendezvousSeed: link.BertyID.PublicRendezvousSeed, Metadata: []byte(link.BertyID.DisplayName), } - _, err = v.v.protocol.ContactRequestSend(ctx, &bertytypes.ContactRequestSend_Request{ + _, err = v.v.protocol.ContactRequestSend(ctx, &protocoltypes.ContactRequestSend_Request{ Contact: contact, OwnMetadata: []byte(displayName), }) @@ -783,7 +784,7 @@ func newMessageCommand(ctx context.Context, v *groupView, cmd string) error { return nil } - _, err := v.v.messenger.SendMessage(ctx, &bertymessenger.SendMessage_Request{ + _, err := v.v.messenger.SendMessage(ctx, &messengertypes.SendMessage_Request{ GroupPK: v.g.PublicKey, Message: cmd, }) @@ -797,7 +798,7 @@ func contactShareCommand(displayFunc func(*groupView, string)) func(ctx context. displayName := v.v.displayName v.v.lock.Unlock() - res, err := v.v.messenger.InstanceShareableBertyID(ctx, &bertymessenger.InstanceShareableBertyID_Request{ + res, err := v.v.messenger.InstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{ DisplayName: displayName, }) if err != nil { @@ -850,19 +851,19 @@ func copyToClipboard(v *groupView, txt string) { } func contactRequestsOnCommand(ctx context.Context, v *groupView, cmd string) error { - _, err := v.v.protocol.ContactRequestEnable(ctx, &bertytypes.ContactRequestEnable_Request{}) + _, err := v.v.protocol.ContactRequestEnable(ctx, &protocoltypes.ContactRequestEnable_Request{}) return err } func contactRequestsOffCommand(ctx context.Context, v *groupView, cmd string) error { - _, err := v.v.protocol.ContactRequestDisable(ctx, &bertytypes.ContactRequestDisable_Request{}) + _, err := v.v.protocol.ContactRequestDisable(ctx, &protocoltypes.ContactRequestDisable_Request{}) return err } func contactRequestsReferenceResetCommand(ctx context.Context, v *groupView, cmd string) error { - _, err := v.v.protocol.ContactRequestResetReference(ctx, &bertytypes.ContactRequestResetReference_Request{}) + _, err := v.v.protocol.ContactRequestResetReference(ctx, &protocoltypes.ContactRequestResetReference_Request{}) return err } diff --git a/go/cmd/berty/mini/view_tabbed_groups.go b/go/cmd/berty/mini/view_tabbed_groups.go index d5935a2977..e53515eac2 100644 --- a/go/cmd/berty/mini/view_tabbed_groups.go +++ b/go/cmd/berty/mini/view_tabbed_groups.go @@ -10,15 +10,14 @@ import ( "github.com/gdamore/tcell" "github.com/rivo/tview" - "berty.tech/berty/v2/go/pkg/bertymessenger" - "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type tabbedGroupsView struct { ctx context.Context app *tview.Application - protocol bertyprotocol.ProtocolServiceClient + protocol protocoltypes.ProtocolServiceClient topics *tview.Table activeViewContainer *tview.Flex selectedGroupView *groupView @@ -26,9 +25,9 @@ type tabbedGroupsView struct { contactGroupViews []*groupView multiMembersGroupViews []*groupView lock sync.RWMutex - messenger bertymessenger.MessengerServiceClient + messenger messengertypes.MessengerServiceClient displayName string - contactStates map[string]bertytypes.ContactState + contactStates map[string]protocoltypes.ContactState contactNames map[string]string } @@ -114,19 +113,19 @@ func (v *tabbedGroupsView) recomputeChannelList(viewChanged bool) { } } -func (v *tabbedGroupsView) AddContextGroup(ctx context.Context, g *bertytypes.Group) { +func (v *tabbedGroupsView) AddContextGroup(ctx context.Context, g *protocoltypes.Group) { v.lock.Lock() defer v.lock.Unlock() // Check if group already opened switch g.GroupType { - case bertytypes.GroupTypeContact: + case protocoltypes.GroupTypeContact: for _, vg := range v.contactGroupViews { if bytes.Equal(vg.g.PublicKey, g.PublicKey) { return } } - case bertytypes.GroupTypeMultiMember: + case protocoltypes.GroupTypeMultiMember: for _, vg := range v.multiMembersGroupViews { if bytes.Equal(vg.g.PublicKey, g.PublicKey) { return @@ -136,7 +135,7 @@ func (v *tabbedGroupsView) AddContextGroup(ctx context.Context, g *bertytypes.Gr return } - info, err := v.protocol.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + info, err := v.protocol.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ GroupPK: g.PublicKey, }) if err != nil { @@ -147,9 +146,9 @@ func (v *tabbedGroupsView) AddContextGroup(ctx context.Context, g *bertytypes.Gr vg.welcomeGroupEventDisplay() vg.loop(v.ctx) - if g.GroupType == bertytypes.GroupTypeContact { + if g.GroupType == protocoltypes.GroupTypeContact { v.contactGroupViews = append(v.contactGroupViews, vg) - } else if g.GroupType == bertytypes.GroupTypeMultiMember { + } else if g.GroupType == protocoltypes.GroupTypeMultiMember { v.multiMembersGroupViews = append(v.multiMembersGroupViews, vg) } } @@ -223,14 +222,14 @@ func (v *tabbedGroupsView) GetHistory() tview.Primitive { return v.activeViewContainer } -func newTabbedGroups(ctx context.Context, g *bertytypes.GroupInfo_Reply, protocol bertyprotocol.ProtocolServiceClient, messenger bertymessenger.MessengerServiceClient, app *tview.Application, displayName string) *tabbedGroupsView { +func newTabbedGroups(ctx context.Context, g *protocoltypes.GroupInfo_Reply, protocol protocoltypes.ProtocolServiceClient, messenger messengertypes.MessengerServiceClient, app *tview.Application, displayName string) *tabbedGroupsView { v := &tabbedGroupsView{ ctx: ctx, topics: tview.NewTable(), protocol: protocol, messenger: messenger, app: app, - contactStates: map[string]bertytypes.ContactState{}, + contactStates: map[string]protocoltypes.ContactState{}, contactNames: map[string]string{}, displayName: displayName, } diff --git a/go/cmd/berty/peers.go b/go/cmd/berty/peers.go index 6dbaf4f6e0..ddf9f21f11 100644 --- a/go/cmd/berty/peers.go +++ b/go/cmd/berty/peers.go @@ -9,8 +9,8 @@ import ( "github.com/peterbourgon/ff/v3/ffcli" "moul.io/godev" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func peersCommand() *ffcli.Command { @@ -44,7 +44,7 @@ func peersCommand() *ffcli.Command { } for { - ret, err := protocol.PeerList(ctx, &bertytypes.PeerList_Request{}) + ret, err := protocol.PeerList(ctx, &protocoltypes.PeerList_Request{}) if err != nil { return errcode.TODO.Wrap(err) } diff --git a/go/cmd/berty/shareinvite.go b/go/cmd/berty/shareinvite.go index e97d646810..5889c7e11c 100644 --- a/go/cmd/berty/shareinvite.go +++ b/go/cmd/berty/shareinvite.go @@ -9,8 +9,8 @@ import ( qrterminal "github.com/mdp/qrterminal/v3" "github.com/peterbourgon/ff/v3/ffcli" - "berty.tech/berty/v2/go/pkg/bertymessenger" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" ) func shareInviteCommand() *ffcli.Command { @@ -18,6 +18,7 @@ func shareInviteCommand() *ffcli.Command { shareOnDevChannelFlag = false noQRFlag = false nameFlag = "" + passphrase = "" ) fsBuilder := func() (*flag.FlagSet, error) { fs := flag.NewFlagSet("berty share-invite", flag.ExitOnError) @@ -26,6 +27,7 @@ func shareInviteCommand() *ffcli.Command { manager.SetupLocalMessengerServerFlags(fs) // by default, start a new local messenger server, manager.SetupRemoteNodeFlags(fs) // but allow to set a remote server instead fs.StringVar(&nameFlag, "name", "", "override display name") + fs.StringVar(&passphrase, "passphrase", "", "optional encryption passphrase") fs.BoolVar(&shareOnDevChannelFlag, "dev-channel", shareOnDevChannelFlag, "post qrcode on dev channel") fs.BoolVar(&noQRFlag, "no-qr", noQRFlag, "do not print the QR code in terminal") return fs, nil @@ -58,7 +60,10 @@ func shareInviteCommand() *ffcli.Command { } // get shareable ID - ret, err := messenger.InstanceShareableBertyID(ctx, &bertymessenger.InstanceShareableBertyID_Request{DisplayName: name}) + ret, err := messenger.InstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{ + DisplayName: name, + Passphrase: []byte(passphrase), + }) if err != nil { return errcode.TODO.Wrap(err) } @@ -68,7 +73,7 @@ func shareInviteCommand() *ffcli.Command { qrterminal.GenerateHalfBlock(ret.InternalURL, qrterminal.L, os.Stderr) } if shareOnDevChannelFlag { - _, err = messenger.DevShareInstanceBertyID(ctx, &bertymessenger.DevShareInstanceBertyID_Request{DisplayName: name}) + _, err = messenger.DevShareInstanceBertyID(ctx, &messengertypes.DevShareInstanceBertyID_Request{DisplayName: name}) if err != nil { return errcode.TODO.Wrap(err) } diff --git a/go/cmd/berty/systeminfo.go b/go/cmd/berty/systeminfo.go index aef1f99c98..abbc824f1f 100644 --- a/go/cmd/berty/systeminfo.go +++ b/go/cmd/berty/systeminfo.go @@ -9,8 +9,8 @@ import ( "github.com/peterbourgon/ff/v3/ffcli" "moul.io/godev" - "berty.tech/berty/v2/go/pkg/bertymessenger" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" ) func systemInfoCommand() *ffcli.Command { @@ -48,7 +48,7 @@ func systemInfoCommand() *ffcli.Command { } for { - ret, err := messenger.SystemInfo(ctx, &bertymessenger.SystemInfo_Request{}) + ret, err := messenger.SystemInfo(ctx, &messengertypes.SystemInfo_Request{}) if err != nil { return errcode.TODO.Wrap(err) } diff --git a/go/cmd/betabot/depaware.txt b/go/cmd/betabot/depaware.txt index 7a510d64fa..d4b46417ef 100644 --- a/go/cmd/betabot/depaware.txt +++ b/go/cmd/betabot/depaware.txt @@ -19,7 +19,7 @@ berty.tech/berty/v2/go/cmd/betabot dependencies: (generated by github.com/tailsc berty.tech/berty/v2/go/pkg/banner from berty.tech/berty/v2/go/pkg/bertymessenger berty.tech/berty/v2/go/pkg/bertymessenger from berty.tech/berty/v2/go/cmd/betabot berty.tech/berty/v2/go/pkg/bertyprotocol from berty.tech/berty/v2/go/pkg/bertymessenger - berty.tech/berty/v2/go/pkg/bertytypes from berty.tech/berty/v2/go/internal/sysutil+ + berty.tech/berty/v2/go/pkg/protocoltypes from berty.tech/berty/v2/go/internal/sysutil+ berty.tech/berty/v2/go/pkg/bertyversion from berty.tech/berty/v2/go/cmd/betabot+ berty.tech/berty/v2/go/pkg/errcode from berty.tech/berty/v2/go/internal/cryptoutil+ berty.tech/berty/v2/go/pkg/username from berty.tech/berty/v2/go/internal/sysutil+ diff --git a/go/cmd/betabot/main.go b/go/cmd/betabot/main.go index c63457db7f..5844c170d1 100644 --- a/go/cmd/betabot/main.go +++ b/go/cmd/betabot/main.go @@ -25,8 +25,9 @@ import ( "moul.io/u" "moul.io/zapconfig" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/internal/bertylinks" "berty.tech/berty/v2/go/pkg/bertyversion" + "berty.tech/berty/v2/go/pkg/messengertypes" ) const ( @@ -53,7 +54,7 @@ type Bot struct { Convs []*Conversation StaffConvPK string } - client bertymessenger.MessengerServiceClient + client messengertypes.MessengerServiceClient storeIsNew bool storePath string storeConvMap map[*Conversation]*sync.Mutex @@ -170,12 +171,12 @@ func betabot() error { } } }() - bot.client = bertymessenger.NewMessengerServiceClient(cc) + bot.client = messengertypes.NewMessengerServiceClient(cc) } // get sharing link and print qr code { - req := &bertymessenger.InstanceShareableBertyID_Request{DisplayName: *displayName} + req := &messengertypes.InstanceShareableBertyID_Request{DisplayName: *displayName} res, err := bot.client.InstanceShareableBertyID(ctx, req) if err != nil { return fmt.Errorf("get instance shareable berty ID failed: %w", err) @@ -201,7 +202,7 @@ func betabot() error { // FIXME: or should we join the group again? case shouldJoin: bot.logger.Info("joining staff conv") - req := &bertymessenger.ConversationJoin_Request{ + req := &messengertypes.ConversationJoin_Request{ Link: *staffConvLink, } _, err := bot.client.ConversationJoin(ctx, req) @@ -210,7 +211,7 @@ func betabot() error { } // store staffConvPk - link, err := bertymessenger.UnmarshalLink(req.GetLink()) + link, err := bertylinks.UnmarshalLink(req.GetLink(), nil) if err != nil { return fmt.Errorf("parse conv link: %w", err) } @@ -227,7 +228,7 @@ func betabot() error { // event loop var wg sync.WaitGroup { - s, err := bot.client.EventStream(ctx, &bertymessenger.EventStream_Request{}) + s, err := bot.client.EventStream(ctx, &messengertypes.EventStream_Request{}) if err != nil { return fmt.Errorf("failed to listen to EventStream: %w", err) } @@ -244,7 +245,7 @@ func betabot() error { } if bot.isReplaying { - if gme.Event.Type == bertymessenger.StreamEvent_TypeListEnded { + if gme.Event.Type == messengertypes.StreamEvent_TypeListEnded { bot.logger.Info("finished replaying logs from the previous sessions", zap.Uint("count", handledEvents)) bot.isReplaying = false } @@ -272,11 +273,11 @@ func betabot() error { return nil } -func (bot *Bot) handleEvent(ctx context.Context, gme *bertymessenger.EventStream_Reply) error { - handlers := map[bertymessenger.StreamEvent_Type]func(ctx context.Context, gme *bertymessenger.EventStream_Reply, payload proto.Message) error{ - bertymessenger.StreamEvent_TypeContactUpdated: bot.handleContactUpdated, - bertymessenger.StreamEvent_TypeInteractionUpdated: bot.handleInteractionUpdated, - bertymessenger.StreamEvent_TypeConversationUpdated: bot.handleConversationUpdated, +func (bot *Bot) handleEvent(ctx context.Context, gme *messengertypes.EventStream_Reply) error { + handlers := map[messengertypes.StreamEvent_Type]func(ctx context.Context, gme *messengertypes.EventStream_Reply, payload proto.Message) error{ + messengertypes.StreamEvent_TypeContactUpdated: bot.handleContactUpdated, + messengertypes.StreamEvent_TypeInteractionUpdated: bot.handleInteractionUpdated, + messengertypes.StreamEvent_TypeConversationUpdated: bot.handleConversationUpdated, } handler, found := handlers[gme.Event.Type] @@ -298,17 +299,17 @@ func (bot *Bot) handleEvent(ctx context.Context, gme *bertymessenger.EventStream return nil } -func (bot *Bot) handleContactUpdated(ctx context.Context, _ *bertymessenger.EventStream_Reply, payload proto.Message) error { +func (bot *Bot) handleContactUpdated(ctx context.Context, _ *messengertypes.EventStream_Reply, payload proto.Message) error { // auto-accept contact requests - contact := payload.(*bertymessenger.StreamEvent_ContactUpdated).Contact + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact - if contact.State == bertymessenger.Contact_IncomingRequest { - req := &bertymessenger.ContactAccept_Request{PublicKey: contact.PublicKey} + if contact.State == messengertypes.Contact_IncomingRequest { + req := &messengertypes.ContactAccept_Request{PublicKey: contact.PublicKey} _, err := bot.client.ContactAccept(ctx, req) if err != nil { return fmt.Errorf("contact accept failed: %w", err) } - } else if contact.State == bertymessenger.Contact_Accepted { + } else if contact.State == messengertypes.Contact_Accepted { // When contact was established, send message and a group invitation time.Sleep(2 * time.Second) bot.storeMutex.Lock() @@ -325,7 +326,7 @@ func (bot *Bot) handleContactUpdated(ctx context.Context, _ *bertymessenger.Even I’m here to help you with the onboarding process. Let's test out some features together! Just type 'yes' to let me know you copy that.` - options := []*bertymessenger.ReplyOption{ + options := []*messengertypes.ReplyOption{ {Payload: "yes", Display: "Sure, go for it!"}, {Payload: "no", Display: "Show me all you can do instead!"}, } @@ -336,7 +337,7 @@ Just type 'yes' to let me know you copy that.` return nil } -func (bot *Bot) handleUserMessageInteractionUpdated(ctx context.Context, _ *bertymessenger.EventStream_Reply, interaction *bertymessenger.Interaction, payload proto.Message) error { +func (bot *Bot) handleUserMessageInteractionUpdated(ctx context.Context, _ *messengertypes.EventStream_Reply, interaction *messengertypes.Interaction, payload proto.Message) error { if interaction.IsMe || interaction.Acknowledged { return nil } @@ -349,7 +350,7 @@ func (bot *Bot) handleUserMessageInteractionUpdated(ctx context.Context, _ *bert } } bot.storeMutex.RUnlock() - receivedMessage := payload.(*bertymessenger.AppMessage_UserMessage) + receivedMessage := payload.(*messengertypes.AppMessage_UserMessage) if conv != nil && conv.IsOneToOne { unlock := bot.LockConversation(conv) success, err := [3]doStepFn{ @@ -372,9 +373,9 @@ func (bot *Bot) handleUserMessageInteractionUpdated(ctx context.Context, _ *bert return nil } -type doStepFn func(context.Context, *Conversation, *Bot, *bertymessenger.AppMessage_UserMessage, *bertymessenger.Interaction, func()) (bool, error) +type doStepFn func(context.Context, *Conversation, *Bot, *messengertypes.AppMessage_UserMessage, *messengertypes.Interaction, func()) (bool, error) -func doStep0(ctx context.Context, conv *Conversation, bot *Bot, receivedMessage *bertymessenger.AppMessage_UserMessage, interaction *bertymessenger.Interaction, unlock func()) (bool, error) { +func doStep0(ctx context.Context, conv *Conversation, bot *Bot, receivedMessage *messengertypes.AppMessage_UserMessage, interaction *messengertypes.Interaction, unlock func()) (bool, error) { if checkValidationMessage(receivedMessage.GetBody()) { conv.Step++ unlock() @@ -384,7 +385,7 @@ func doStep0(ctx context.Context, conv *Conversation, bot *Bot, receivedMessage body := `Okay, perfect! 🤙 Would you like me to invite you to a group chat to test multimember conversations? Type 'yes' to receive it! 💌` - options := []*bertymessenger.ReplyOption{ + options := []*messengertypes.ReplyOption{ {Payload: "yes", Display: "Sure, go for it!"}, {Payload: "no", Display: "Show me all you can do instead!"}, } @@ -397,7 +398,7 @@ Type 'yes' to receive it! 💌` return false, nil } -func doStep1(ctx context.Context, conv *Conversation, bot *Bot, receivedMessage *bertymessenger.AppMessage_UserMessage, interaction *bertymessenger.Interaction, unlock func()) (bool, error) { +func doStep1(ctx context.Context, conv *Conversation, bot *Bot, receivedMessage *messengertypes.AppMessage_UserMessage, interaction *messengertypes.Interaction, unlock func()) (bool, error) { if checkValidationMessage(receivedMessage.GetBody()) { conv.Step++ unlock() @@ -415,7 +416,7 @@ I’m cool, but humans are sometimes cooler than me… 🤖 ❤️` time.Sleep(1 * time.Second) { // create staff conversation - createdConv, err := bot.client.ConversationCreate(ctx, &bertymessenger.ConversationCreate_Request{ + createdConv, err := bot.client.ConversationCreate(ctx, &messengertypes.ConversationCreate_Request{ DisplayName: staffXConvPrefix + conv.ContactDisplayName, ContactsToInvite: []string{ conv.ContactPublicKey, @@ -447,7 +448,7 @@ Type /help when you need info about available test commands! 📖` return false, nil } -func doStep2(ctx context.Context, _ *Conversation, bot *Bot, receivedMessage *bertymessenger.AppMessage_UserMessage, interaction *bertymessenger.Interaction, unlock func()) (bool, error) { +func doStep2(ctx context.Context, _ *Conversation, bot *Bot, receivedMessage *messengertypes.AppMessage_UserMessage, interaction *messengertypes.Interaction, unlock func()) (bool, error) { unlock() msg := receivedMessage.GetBody() if msg[0] == '/' { @@ -484,11 +485,11 @@ func doStep2(ctx context.Context, _ *Conversation, bot *Bot, receivedMessage *be return false, nil } -func (bot *Bot) handleGroupInvitationInteractionUpdated(ctx context.Context, _ *bertymessenger.EventStream_Reply, interaction *bertymessenger.Interaction, payload proto.Message) error { +func (bot *Bot) handleGroupInvitationInteractionUpdated(ctx context.Context, _ *messengertypes.EventStream_Reply, interaction *messengertypes.Interaction, payload proto.Message) error { if !interaction.IsMe { // auto-accept invitations to group - receivedInvitation := payload.(*bertymessenger.AppMessage_GroupInvitation) - _, err := bot.client.ConversationJoin(ctx, &bertymessenger.ConversationJoin_Request{ + receivedInvitation := payload.(*messengertypes.AppMessage_GroupInvitation) + _, err := bot.client.ConversationJoin(ctx, &messengertypes.ConversationJoin_Request{ Link: receivedInvitation.GetLink(), }) if err != nil { @@ -498,12 +499,12 @@ func (bot *Bot) handleGroupInvitationInteractionUpdated(ctx context.Context, _ * return nil } -func (bot *Bot) handleInteractionUpdated(ctx context.Context, gme *bertymessenger.EventStream_Reply, payload proto.Message) error { - interaction := payload.(*bertymessenger.StreamEvent_InteractionUpdated).Interaction +func (bot *Bot) handleInteractionUpdated(ctx context.Context, gme *messengertypes.EventStream_Reply, payload proto.Message) error { + interaction := payload.(*messengertypes.StreamEvent_InteractionUpdated).Interaction - handlers := map[bertymessenger.AppMessage_Type]func(ctx context.Context, gme *bertymessenger.EventStream_Reply, interaction *bertymessenger.Interaction, payload proto.Message) error{ - bertymessenger.AppMessage_TypeUserMessage: bot.handleUserMessageInteractionUpdated, - bertymessenger.AppMessage_TypeGroupInvitation: bot.handleGroupInvitationInteractionUpdated, + handlers := map[messengertypes.AppMessage_Type]func(ctx context.Context, gme *messengertypes.EventStream_Reply, interaction *messengertypes.Interaction, payload proto.Message) error{ + messengertypes.AppMessage_TypeUserMessage: bot.handleUserMessageInteractionUpdated, + messengertypes.AppMessage_TypeGroupInvitation: bot.handleGroupInvitationInteractionUpdated, } handler, found := handlers[interaction.Type] if !found { @@ -523,9 +524,9 @@ func (bot *Bot) handleInteractionUpdated(ctx context.Context, gme *bertymessenge return nil } -func (bot *Bot) handleConversationUpdated(ctx context.Context, _ *bertymessenger.EventStream_Reply, payload proto.Message) error { +func (bot *Bot) handleConversationUpdated(ctx context.Context, _ *messengertypes.EventStream_Reply, payload proto.Message) error { // send to multimember staff conv that this user join us on Berty with the link of the group - conversation := payload.(*bertymessenger.StreamEvent_ConversationUpdated).Conversation + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation if bot.store.StaffConvPK != "" && strings.HasPrefix(conversation.GetDisplayName(), staffXConvPrefix) { userName := strings.TrimPrefix(conversation.GetDisplayName(), staffXConvPrefix) body := fmt.Sprintf( @@ -543,14 +544,14 @@ For the moment i can't send a group invitation so i share the link of the conver // time.Sleep(2 * time.Second) // { - // groupInvitation, err := proto.Marshal(&bertymessenger.AppMessage_GroupInvitation{ + // groupInvitation, err := proto.Marshal(&messengertypes.AppMessage_GroupInvitation{ // Link: conversation.GetLink(), // }) // if err != nil { // return err // } - // _, err = bot.client.Interact(ctx, &bertymessenger.Interact_Request{ - // Type: bertymessenger.AppMessage_TypeGroupInvitation, + // _, err = bot.client.Interact(ctx, &messengertypes.Interact_Request{ + // Type: messengertypes.AppMessage_TypeGroupInvitation, // Payload: groupInvitation, // ConversationPublicKey: staffConvPk, // }) @@ -564,13 +565,13 @@ For the moment i can't send a group invitation so i share the link of the conver // internal stuff -func (bot *Bot) interactUserMessage(ctx context.Context, body string, conversationPK string, replyOption []*bertymessenger.ReplyOption) error { - userMessage, err := proto.Marshal(&bertymessenger.AppMessage_UserMessage{Body: body}) +func (bot *Bot) interactUserMessage(ctx context.Context, body string, conversationPK string, replyOption []*messengertypes.ReplyOption) error { + userMessage, err := proto.Marshal(&messengertypes.AppMessage_UserMessage{Body: body}) if err != nil { return fmt.Errorf("marshal user message failed: %w", err) } - _, err = bot.client.Interact(ctx, &bertymessenger.Interact_Request{ - Type: bertymessenger.AppMessage_TypeUserMessage, + _, err = bot.client.Interact(ctx, &messengertypes.Interact_Request{ + Type: messengertypes.AppMessage_TypeUserMessage, Payload: userMessage, ConversationPublicKey: conversationPK, }) @@ -585,9 +586,9 @@ func (bot *Bot) interactUserMessage(ctx context.Context, body string, conversati return fmt.Errorf("conversation convPK failed: %w", err) } if replyOption != nil { - _, err := bot.client.SendReplyOptions(ctx, &bertymessenger.SendReplyOptions_Request{ + _, err := bot.client.SendReplyOptions(ctx, &messengertypes.SendReplyOptions_Request{ GroupPK: convPKBytes, - Options: &bertymessenger.AppMessage_ReplyOptions{ + Options: &messengertypes.AppMessage_ReplyOptions{ Options: replyOption, }, }) @@ -654,8 +655,8 @@ func safeDefaultDisplayName() string { return fmt.Sprintf("%s (betabot)", name) } -func defaultReplyOption() []*bertymessenger.ReplyOption { - return []*bertymessenger.ReplyOption{ +func defaultReplyOption() []*messengertypes.ReplyOption { + return []*messengertypes.ReplyOption{ {Payload: "/help", Display: "Display betabot commands"}, {Payload: "/demo version", Display: "What is the demo version?reload"}, } diff --git a/go/cmd/rdvp/main.go b/go/cmd/rdvp/main.go index 8a80ed6b02..5d3a52f4cf 100644 --- a/go/cmd/rdvp/main.go +++ b/go/cmd/rdvp/main.go @@ -50,6 +50,7 @@ func main() { serveURN = ":memory:" serveListeners = "/ip4/0.0.0.0/tcp/4040,/ip4/0.0.0.0/udp/4141/quic" servePK = "" + sharekeyPK = "" serveAnnounce = "" serveMetricsListeners = "" genkeyType = "Ed25519" @@ -58,15 +59,17 @@ func main() { // parse opts var ( - globalFlags = flag.NewFlagSet("berty", flag.ExitOnError) - serveFlags = flag.NewFlagSet("serve", flag.ExitOnError) - genkeyFlags = flag.NewFlagSet("genkey", flag.ExitOnError) + globalFlags = flag.NewFlagSet("berty", flag.ExitOnError) + serveFlags = flag.NewFlagSet("serve", flag.ExitOnError) + sharekeyFlags = flag.NewFlagSet("sharekey", flag.ExitOnError) + genkeyFlags = flag.NewFlagSet("genkey", flag.ExitOnError) ) globalFlags.StringVar(&logFilters, "log.filters", logFilters, "logged namespaces") globalFlags.StringVar(&logToFile, "log.file", logToFile, "if specified, will log everything in JSON into a file and nothing on stderr") globalFlags.StringVar(&logFormat, "log.format", logFormat, "if specified, will override default log format") serveFlags.StringVar(&serveURN, "db", serveURN, "rdvp sqlite URN") serveFlags.StringVar(&serveListeners, "l", serveListeners, "lists of listeners of (m)addrs separate by a comma") + sharekeyFlags.StringVar(&sharekeyPK, "pk", sharekeyPK, "private key (generated by `rdvp genkey`)") serveFlags.StringVar(&servePK, "pk", servePK, "private key (generated by `rdvp genkey`)") serveFlags.StringVar(&serveAnnounce, "announce", serveAnnounce, "addrs that will be announce by this server") serveFlags.StringVar(&serveMetricsListeners, "metrics", serveMetricsListeners, "metrics listener, if empty will disable metrics") @@ -222,6 +225,41 @@ func main() { }, } + sharekey := &ffcli.Command{ + Name: "sharekey", + ShortUsage: "rdvp [global flags] sharekey -pk PK", + FlagSet: sharekeyFlags, + Exec: func(ctx context.Context, args []string) error { + if len(args) > 0 { + return flag.ErrHelp + } + + if sharekeyPK == "" { + return flag.ErrHelp + } + + kBytes, err := base64.StdEncoding.DecodeString(sharekeyPK) + if err != nil { + return errcode.TODO.Wrap(err) + } + priv, err := libp2p_ci.UnmarshalPrivateKey(kBytes) + if err != nil { + return errcode.TODO.Wrap(err) + } + + // init p2p host + host, err := libp2p.New(ctx, + libp2p.Identity(priv), + ) + if err != nil { + return errcode.TODO.Wrap(err) + } + defer host.Close() + fmt.Println(host.ID().String()) + return nil + }, + } + genkey := &ffcli.Command{ Name: "genkey", FlagSet: genkeyFlags, @@ -249,7 +287,7 @@ func main() { ShortUsage: "rdvp [global flags] ", FlagSet: globalFlags, Options: []ff.Option{ff.WithEnvVarPrefix("RDVP")}, - Subcommands: []*ffcli.Command{serve, genkey}, + Subcommands: []*ffcli.Command{serve, genkey, sharekey}, Exec: func(context.Context, []string) error { return flag.ErrHelp }, diff --git a/go/framework/bertybridge/blackbox_test.go b/go/framework/bertybridge/blackbox_test.go index da6eba4910..61f3947849 100644 --- a/go/framework/bertybridge/blackbox_test.go +++ b/go/framework/bertybridge/blackbox_test.go @@ -10,7 +10,7 @@ import ( "berty.tech/berty/v2/go/framework/bertybridge" "berty.tech/berty/v2/go/pkg/bertyaccount" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func Example() { @@ -99,7 +99,7 @@ func Example() { // make unary call to underlying `BertyMessenger` Service { // create `InstanceGetConfiguration` Input - input := &bertytypes.InstanceGetConfiguration_Request{} + input := &protocoltypes.InstanceGetConfiguration_Request{} payload, err := proto.Marshal(input) checkErr(err) @@ -122,7 +122,7 @@ func Example() { err = decodeProtoMessage(ret, &output) checkErr(err) - var res bertytypes.InstanceGetConfiguration_Reply + var res protocoltypes.InstanceGetConfiguration_Reply err = proto.Unmarshal(output.Payload, &res) checkErr(err) diff --git a/go/framework/bertybridge/depaware.txt b/go/framework/bertybridge/depaware.txt index fe8e3bceb0..9456359e42 100644 --- a/go/framework/bertybridge/depaware.txt +++ b/go/framework/bertybridge/depaware.txt @@ -23,7 +23,7 @@ berty.tech/berty/v2/go/framework/bertybridge dependencies: (generated by github. berty.tech/berty/v2/go/pkg/bertyaccount from berty.tech/berty/v2/go/framework/bertybridge berty.tech/berty/v2/go/pkg/bertymessenger from berty.tech/berty/v2/go/framework/bertybridge+ berty.tech/berty/v2/go/pkg/bertyprotocol from berty.tech/berty/v2/go/internal/initutil+ - berty.tech/berty/v2/go/pkg/bertytypes from berty.tech/berty/v2/go/internal/config+ + berty.tech/berty/v2/go/pkg/protocoltypes from berty.tech/berty/v2/go/internal/config+ berty.tech/berty/v2/go/pkg/bertyversion from berty.tech/berty/v2/go/internal/sysutil+ berty.tech/berty/v2/go/pkg/errcode from berty.tech/berty/v2/go/framework/bertybridge+ 💣 berty.tech/berty/v2/go/pkg/tempdir from berty.tech/berty/v2/go/internal/initutil diff --git a/go/gen.sum b/go/gen.sum index bef3a415de..46deef5d84 100644 --- a/go/gen.sum +++ b/go/gen.sum @@ -1,9 +1,8 @@ 7c41f83cba6f48f7a14a328b748dc0282a978bef ../api/bertyaccount.proto -b42d7028a61f2047e8dec016510707cc1b6f8a59 ../api/bertymessenger.proto -35ebc74ab251dbb359ba0d04a3dafbcb99b10f67 ../api/bertyprotocol.proto -23e393a8bba7426244b4747d7adb6188830756aa ../api/bertyreplication.proto -15bab772b80f15b5af4f7049de1e70e13f7b8b00 ../api/bertytypes.proto -b3570d0af9dc0334c9d60397ec27822c33d51198 ../api/errcode.proto +4589e8f2ea76dc6030778f5559777636dc05a401 ../api/bertyreplication.proto +56145f42756fdf8042b9897c32e18f7bf39d176b ../api/errcode.proto c314cc3d08e8849bd0693039e42da117c39efef5 ../api/go-internal/handshake.proto 9b4665f0290b8e94e5ef4b80572a9304f587c2c7 ../api/go-internal/records.proto -99cfe39e18b83b8a18d0bc2593119270d94cf56e Makefile +5edb2f4ef0200760d8a7cb5416cf80e8a57889b4 ../api/messengertypes.proto +82be117c46950434fc992ba05d184101ab7029ca ../api/protocoltypes.proto +3a0fcfcc152627b42610cf1e5bfb5f0dad304b3f Makefile diff --git a/go/internal/bertylinks/links.go b/go/internal/bertylinks/links.go new file mode 100644 index 0000000000..b940bd57ff --- /dev/null +++ b/go/internal/bertylinks/links.go @@ -0,0 +1,423 @@ +package bertylinks + +import ( + "crypto/aes" + "fmt" + "net/url" + "strings" + + "github.com/eknkc/basex" + "github.com/gogo/protobuf/proto" + "github.com/mr-tron/base58" + + "berty.tech/berty/v2/go/internal/cryptoutil" + "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" +) + +// MarshalLink returns shareable web and internal URLs. +// +// The web URL is meant to: +// - be short, +// - have some parts that are human-readable, +// - to point to a sub-page of the berty.tech website where some JS code will parse the human-readable part. +// +// The internal URL is meant to generate the most tiny QR codes. These QR codes can only be opened by a Berty app. +// +// Marshal will return an error if the provided link does not contain all the mandatory fields; +// it may also filter-out some sensitive data. +func MarshalLink(link *messengertypes.BertyLink) (internal string, web string, err error) { + if link == nil || link.Kind == messengertypes.BertyLink_UnknownKind { + return "", "", errcode.ErrMissingInput + } + + if err := link.IsValid(); err != nil { + return "", "", err + } + + var ( + // web + kind string + machine = &messengertypes.BertyLink{} + human = url.Values{} + + // internal + qrOptimized = &messengertypes.BertyLink{} + ) + + switch link.Kind { + case messengertypes.BertyLink_ContactInviteV1Kind: + kind = "contact" + machine.BertyID = &messengertypes.BertyID{ + PublicRendezvousSeed: link.BertyID.PublicRendezvousSeed, + AccountPK: link.BertyID.AccountPK, + } + if link.BertyID.DisplayName != "" { + human.Add("name", link.BertyID.DisplayName) + } + + // for contact sharing, there are no fields to hide, so just copy the input link + *qrOptimized = *link + case messengertypes.BertyLink_GroupV1Kind: + kind = "group" + machine.BertyGroup = &messengertypes.BertyGroup{ + Group: &protocoltypes.Group{ + PublicKey: link.BertyGroup.Group.PublicKey, + Secret: link.BertyGroup.Group.Secret, + SecretSig: link.BertyGroup.Group.SecretSig, + GroupType: link.BertyGroup.Group.GroupType, + SignPub: link.BertyGroup.Group.SignPub, + }, + } + if link.BertyGroup.DisplayName != "" { + human.Add("name", link.BertyGroup.DisplayName) + } + *qrOptimized = *link + case messengertypes.BertyLink_EncryptedV1Kind: + kind = "enc" + machine.Encrypted = &messengertypes.BertyLink_Encrypted{ + Kind: link.Encrypted.Kind, + Nonce: link.Encrypted.Nonce, + } + if link.Encrypted.DisplayName != "" { + human.Add("name", link.Encrypted.DisplayName) + } + switch link.Encrypted.Kind { + case messengertypes.BertyLink_ContactInviteV1Kind: + machine.Encrypted.ContactDisplayName = link.Encrypted.ContactDisplayName + machine.Encrypted.ContactAccountPK = link.Encrypted.ContactAccountPK + machine.Encrypted.ContactPublicRendezvousSeed = link.Encrypted.ContactPublicRendezvousSeed + case messengertypes.BertyLink_GroupV1Kind: + machine.Encrypted.GroupDisplayName = link.Encrypted.GroupDisplayName + machine.Encrypted.GroupPublicKey = link.Encrypted.GroupPublicKey + machine.Encrypted.GroupSecret = link.Encrypted.GroupSecret + machine.Encrypted.GroupSecretSig = link.Encrypted.GroupSecretSig + machine.Encrypted.GroupSignPub = link.Encrypted.GroupSignPub + machine.Encrypted.GroupType = link.Encrypted.GroupType + } + *qrOptimized = *link + default: + return "", "", errcode.ErrInvalidInput + } + + // compute the web shareable link. + // in this mode, we have: + // - a human-readable link kind + // - a base58-encoded binary (proto) representation of the link (without the kind and metadata) + // - human-readable metadata, encoded as query string (including display name) + { + machineBin, err := proto.Marshal(machine) + if err != nil { + return "", "", errcode.ErrInvalidInput.Wrap(err) + } + // here we use base58 which is compressed enough whilst being easy to read by a human. + // another candidate could be base58.RawURLEncoding which is a little bit more compressed and also only containing unescaped URL chars. + machineEncoded := base58.Encode(machineBin) + path := kind + "/" + machineEncoded + if len(human) > 0 { + path += "/" + human.Encode() + } + // we use a '#' to improve privacy by preventing the webservers to get aware of the right part of this URL + web = LinkWebPrefix + path + } + + // compute the internal shareable link. + // in this mode, the url is as short as possible, in the format: berty://{base45(proto.marshal(link))}. + { + qrBin, err := proto.Marshal(qrOptimized) + if err != nil { + return "", "", errcode.ErrInvalidInput.Wrap(err) + } + // using uppercase to stay in the QR AlphaNum's 45chars alphabet + internal = LinkInternalPrefix + "PB/" + qrBaseEncoder.Encode(qrBin) + } + + return internal, web, nil +} + +// UnmarshalLink takes an URL generated by BertyLink.Marshal (or manually crafted), and returns a BertyLink object. +func UnmarshalLink(uri string, key []byte) (*messengertypes.BertyLink, error) { + if uri == "" { + return nil, errcode.ErrMissingInput + } + + // internal format + if strings.HasPrefix(strings.ToLower(uri), strings.ToLower(LinkInternalPrefix)) { + right := uri[len(LinkInternalPrefix):] + parts := strings.Split(right, "/") + if len(parts) < 2 { + return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("URI should have at least 2 parts")) + } + switch strings.ToLower(parts[0]) { + case "pb": + blob := strings.Join(parts[1:], "/") + qrBin, err := qrBaseEncoder.Decode(blob) + if err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + var link messengertypes.BertyLink + err = proto.Unmarshal(qrBin, &link) + if err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + + if link.Kind == messengertypes.BertyLink_EncryptedV1Kind { + return decryptLink(&link, key) + } + + return &link, nil + default: + return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("unsupported link type: %q", parts[0])) + } + } + + // web format + if strings.HasPrefix(strings.ToLower(uri), strings.ToLower(LinkWebPrefix)) { + parsed, err := url.Parse(uri) + if err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + if parsed.Fragment == "" { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + + rawFragment := strings.Join(strings.Split(uri, "#")[1:], "#") // required by go1.14 + // when minimal version of berty will be go1.15, we can just use `parsed.EscapedFragment()` + + link := messengertypes.BertyLink{} + parts := strings.Split(rawFragment, "/") + if len(parts) < 2 { + return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("URI should have at least 2 parts")) + } + + // decode blob + machineBin, err := base58.Decode(parts[1]) + if err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + if err := proto.Unmarshal(machineBin, &link); err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + + // decode url.Values + var human url.Values + if len(parts) > 2 { + encodedValues := strings.Join(parts[2:], "/") + human, err = url.ParseQuery(encodedValues) + if err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + } + + // per-kind merging strategies and checks + switch kind := parts[0]; kind { + case "contact": + link.Kind = messengertypes.BertyLink_ContactInviteV1Kind + if link.BertyID == nil { + link.BertyID = &messengertypes.BertyID{} + } + if name := human.Get("name"); name != "" && link.BertyID.DisplayName == "" { + link.BertyID.DisplayName = name + } + case "group": + link.Kind = messengertypes.BertyLink_GroupV1Kind + if link.BertyGroup == nil { + link.BertyGroup = &messengertypes.BertyGroup{} + } + if name := human.Get("name"); name != "" && link.BertyGroup.DisplayName == "" { + link.BertyGroup.DisplayName = name + } + case "enc": + link.Kind = messengertypes.BertyLink_EncryptedV1Kind + if link.Encrypted == nil { + return nil, errcode.ErrInvalidInput + } + if name := human.Get("name"); name != "" && link.Encrypted.DisplayName == "" { + link.Encrypted.DisplayName = name + } + default: + return nil, errcode.ErrInvalidInput + } + + if link.Kind == messengertypes.BertyLink_EncryptedV1Kind { + return decryptLink(&link, key) + } + + return &link, nil + } + + return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("unsupported link format")) +} + +func decryptLink(link *messengertypes.BertyLink, passphrase []byte) (*messengertypes.BertyLink, error) { + if link == nil || link.Kind != messengertypes.BertyLink_EncryptedV1Kind { + return nil, errcode.ErrInvalidInput + } + if passphrase == nil || string(passphrase) == "" { + return nil, errcode.ErrMessengerDeepLinkRequiresPassphrase + } + if err := link.IsValid(); err != nil { + return nil, err + } + + decrypted := messengertypes.BertyLink{ + Kind: link.Encrypted.Kind, + } + + // derive key for AES + key, _, err := cryptoutil.DeriveKey(passphrase, link.Encrypted.Nonce) + if err != nil { + return nil, errcode.ErrInternal.Wrap(err) + } + + // create stream cipher + stream, err := cryptoutil.AESCTRStream(key, link.Encrypted.Nonce) + if err != nil { + return nil, errcode.ErrInternal.Wrap(err) + } + + switch decrypted.Kind { + case messengertypes.BertyLink_ContactInviteV1Kind: + decrypted.BertyID = &messengertypes.BertyID{ + AccountPK: make([]byte, len(link.Encrypted.ContactAccountPK)), + PublicRendezvousSeed: make([]byte, len(link.Encrypted.ContactPublicRendezvousSeed)), + } + stream.XORKeyStream(decrypted.BertyID.PublicRendezvousSeed, link.Encrypted.ContactPublicRendezvousSeed) + stream.XORKeyStream(decrypted.BertyID.AccountPK, link.Encrypted.ContactAccountPK) + + if link.Encrypted.DisplayName != "" { + decrypted.BertyID.DisplayName = link.Encrypted.DisplayName + } else { + displayNameBytes := make([]byte, len(link.Encrypted.ContactDisplayName)) + stream.XORKeyStream(displayNameBytes, link.Encrypted.ContactDisplayName) + decrypted.BertyID.DisplayName = string(displayNameBytes) + } + + case messengertypes.BertyLink_GroupV1Kind: + decrypted.BertyGroup = &messengertypes.BertyGroup{ + Group: &protocoltypes.Group{ + PublicKey: make([]byte, len(link.Encrypted.GroupPublicKey)), + Secret: make([]byte, len(link.Encrypted.GroupSecret)), + SecretSig: make([]byte, len(link.Encrypted.GroupSecretSig)), + SignPub: make([]byte, len(link.Encrypted.GroupSignPub)), + GroupType: link.Encrypted.GroupType, + }, + } + stream.XORKeyStream(decrypted.BertyGroup.Group.PublicKey, link.Encrypted.GroupPublicKey) + stream.XORKeyStream(decrypted.BertyGroup.Group.Secret, link.Encrypted.GroupSecret) + stream.XORKeyStream(decrypted.BertyGroup.Group.SecretSig, link.Encrypted.GroupSecretSig) + stream.XORKeyStream(decrypted.BertyGroup.Group.SignPub, link.Encrypted.GroupSignPub) + + if link.Encrypted.DisplayName != "" { + decrypted.BertyGroup.DisplayName = link.Encrypted.DisplayName + } else { + displayNameBytes := make([]byte, len(link.Encrypted.GroupDisplayName)) + stream.XORKeyStream(displayNameBytes, link.Encrypted.GroupDisplayName) + decrypted.BertyGroup.DisplayName = string(displayNameBytes) + } + } + + return &decrypted, nil +} + +// EncryptLink converts a clear BertyLink into an encrypted one. +// +// The encrypted link can be marshaled by UnmarshalLink if a passphrase is provided in the URL. +func EncryptLink(link *messengertypes.BertyLink, passphrase []byte) (*messengertypes.BertyLink, error) { + if link == nil { + return nil, errcode.ErrInvalidInput + } + encrypted := messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_EncryptedV1Kind, + Encrypted: &messengertypes.BertyLink_Encrypted{ + Kind: link.Kind, // inherit kind from the clear link. + }, + } + // if display name is set in the encrypted part of the input link, + // then we want the display name to be available in the generated URL. + if link.Encrypted != nil { + encrypted.Encrypted.DisplayName = link.Encrypted.DisplayName + } + + // generate nonce with AES' blocksize + nonce, err := cryptoutil.GenerateNonceSize(aes.BlockSize) + if err != nil { + return nil, errcode.ErrInternal.Wrap(err) + } + encrypted.Encrypted.Nonce = nonce + + // derive key for AES + key, _, err := cryptoutil.DeriveKey(passphrase, nonce) + if err != nil { + return nil, errcode.ErrInternal.Wrap(err) + } + + // encrypt + stream, err := cryptoutil.AESCTRStream(key, nonce) + if err != nil { + return nil, errcode.ErrInternal.Wrap(err) + } + + switch link.Kind { + case messengertypes.BertyLink_ContactInviteV1Kind: + if link.BertyID == nil { + return nil, errcode.ErrInvalidInput + } + + // encrypt fields (order is important) + encrypted.Encrypted.ContactPublicRendezvousSeed = make([]byte, len(link.BertyID.PublicRendezvousSeed)) + encrypted.Encrypted.ContactAccountPK = make([]byte, len(link.BertyID.AccountPK)) + displayNameBytes := make([]byte, len(link.BertyID.DisplayName)) + stream.XORKeyStream(encrypted.Encrypted.ContactPublicRendezvousSeed, link.BertyID.PublicRendezvousSeed) + stream.XORKeyStream(encrypted.Encrypted.ContactAccountPK, link.BertyID.AccountPK) + stream.XORKeyStream(displayNameBytes, []byte(link.BertyID.DisplayName)) + if encrypted.Encrypted.DisplayName == "" { + encrypted.Encrypted.ContactDisplayName = displayNameBytes + } + + case messengertypes.BertyLink_GroupV1Kind: + if link.BertyGroup == nil || link.BertyGroup.Group == nil { + return nil, errcode.ErrInvalidInput + } + // only field that stays clear + encrypted.Encrypted.GroupType = link.BertyGroup.Group.GroupType + + // encrypt fields (order is important) + encrypted.Encrypted.GroupPublicKey = make([]byte, len(link.BertyGroup.Group.PublicKey)) + encrypted.Encrypted.GroupSecret = make([]byte, len(link.BertyGroup.Group.Secret)) + encrypted.Encrypted.GroupSecretSig = make([]byte, len(link.BertyGroup.Group.SecretSig)) + encrypted.Encrypted.GroupSignPub = make([]byte, len(link.BertyGroup.Group.SignPub)) + displayNameBytes := make([]byte, len(link.BertyGroup.DisplayName)) + stream.XORKeyStream(encrypted.Encrypted.GroupPublicKey, link.BertyGroup.Group.PublicKey) + stream.XORKeyStream(encrypted.Encrypted.GroupSecret, link.BertyGroup.Group.Secret) + stream.XORKeyStream(encrypted.Encrypted.GroupSecretSig, link.BertyGroup.Group.SecretSig) + stream.XORKeyStream(encrypted.Encrypted.GroupSignPub, link.BertyGroup.Group.SignPub) + stream.XORKeyStream(displayNameBytes, []byte(link.BertyGroup.DisplayName)) + if encrypted.Encrypted.DisplayName == "" { + encrypted.Encrypted.GroupDisplayName = displayNameBytes + } + + default: + return nil, errcode.ErrInvalidInput + } + + return &encrypted, nil +} + +const ( + LinkWebPrefix = "https://berty.tech/id#" + LinkInternalPrefix = "BERTY://" +) + +// from https://www.swisseduc.ch/informatik/theoretische_informatik/qr_codes/docs/qr_standard.pdf +// +// Alphanumeric Mode encodes data from a set of 45 characters, i.e. +// - 10 numeric digits (0 - 9) (ASCII values 30 to 39), +// - 26 alphabetic characters (A - Z) (ASCII values 41 to 5A), +// - and 9 symbols (SP, $, %, *, +, -, ., /, :) (ASCII values 20, 24, 25, 2A, 2B, 2D to 2F, 3A). +// +// we remove SP, %, +, which changes when passed through url.Encode. +// +// the generated string is longer than a base58 one, but the generated QR code is smaller which is best for scanning. +var qrBaseEncoder, _ = basex.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$*-.:/") diff --git a/go/pkg/bertymessenger/links_test.go b/go/internal/bertylinks/links_test.go similarity index 62% rename from go/pkg/bertymessenger/links_test.go rename to go/internal/bertylinks/links_test.go index 04387e4cbd..3f55eede45 100644 --- a/go/pkg/bertymessenger/links_test.go +++ b/go/internal/bertylinks/links_test.go @@ -1,4 +1,4 @@ -package bertymessenger_test +package bertylinks_test import ( "bytes" @@ -12,24 +12,25 @@ import ( "github.com/tj/assert" "moul.io/srand" - "berty.tech/berty/v2/go/pkg/bertymessenger" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/internal/bertylinks" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestMarshalLink(t *testing.T) { cases := []struct { name string - input *bertymessenger.BertyLink + input *messengertypes.BertyLink expectErr bool expectedWebURL string expectedInternalURL string }{ { "simple-contact", - &bertymessenger.BertyLink{ - Kind: bertymessenger.BertyLink_ContactInviteV1Kind, - BertyID: &bertymessenger.BertyID{ + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_ContactInviteV1Kind, + BertyID: &messengertypes.BertyID{ DisplayName: "Hello World!", PublicRendezvousSeed: []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, AccountPK: []byte{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, @@ -37,30 +38,30 @@ func TestMarshalLink(t *testing.T) { }, false, "https://berty.tech/id#contact/3geQXHmsW9rxRfQFJdu8CEuPtWkfTWgJH13NzAoGatcnh4brusu3/name=Hello+World%21", - "BERTY://CAS8232WNWU-1HTSMNYD.USC3T4F.P.J.AFKOXTKI:-N4P9IJTERR3CTFD.:N$*$3RQZLIFMT3-$IN..", + "BERTY://PB/CAS8232WNWU-1HTSMNYD.USC3T4F.P.J.AFKOXTKI:-N4P9IJTERR3CTFD.:N$*$3RQZLIFMT3-$IN..", }, { "simple-group", - &bertymessenger.BertyLink{ - Kind: bertymessenger.BertyLink_GroupV1Kind, - BertyGroup: &bertymessenger.BertyGroup{ + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_GroupV1Kind, + BertyGroup: &messengertypes.BertyGroup{ DisplayName: "The Group Name!", - Group: &bertytypes.Group{ + Group: &protocoltypes.Group{ PublicKey: []byte{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, Secret: []byte{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, SecretSig: []byte{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, - GroupType: bertytypes.GroupTypeMultiMember, + GroupType: protocoltypes.GroupTypeMultiMember, SignPub: []byte{6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}, }, }, }, false, "https://berty.tech/id#group/rUwVHzzEiMxGhM7iY4wW5yZFH3ZcjiWAhxva6tXUcfniDsoT3rmF3WdshR8955KAgeCTvirdfppTAMehPqmBV1YYjAiXYUQm98J992TuPT/name=The+Group+Name%21", - "BERTY://.H:8XWGCG68:21MATDM7JR8Y6JMNJEVPISAXL274Y3VVDOPPUGK0LUYZ9X$FPFN*T93E08Y3$RYFIQFHJ3FY*79I75LU.5SJAKCS1PRLRYVLO.4-502DA4KL*E8WCGKEE1WGET$-0G7O1S7", + "BERTY://PB/.H:8XWGCG68:21MATDM7JR8Y6JMNJEVPISAXL274Y3VVDOPPUGK0LUYZ9X$FPFN*T93E08Y3$RYFIQFHJ3FY*79I75LU.5SJAKCS1PRLRYVLO.4-502DA4KL*E8WCGKEE1WGET$-0G7O1S7", }, { "contact-with-unicode", - &bertymessenger.BertyLink{ - Kind: bertymessenger.BertyLink_ContactInviteV1Kind, - BertyID: &bertymessenger.BertyID{ + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_ContactInviteV1Kind, + BertyID: &messengertypes.BertyID{ DisplayName: `!@#$%^&*()_+ ://` + string(rune(0x1F600)), PublicRendezvousSeed: []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, AccountPK: []byte{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, @@ -68,25 +69,25 @@ func TestMarshalLink(t *testing.T) { }, false, "https://berty.tech/id#contact/3geQXHmsW9rxRfQFJdu8CEuPtWkfTWgJH13NzAoGatcnh4brusu3/name=%21%40%23%24%25%5E%26%2A%28%29_%2B+%3A%2F%2F%F0%9F%98%80", - "BERTY://BJ3W5ETGJU6$15FIE8U4:R300KUENPKC0J8YS6V02MXW9LDGPD6SVS/LU2TWQ8PGWF39R.ELP:-K:-4E30/.JNDU25WI", + "BERTY://PB/BJ3W5ETGJU6$15FIE8U4:R300KUENPKC0J8YS6V02MXW9LDGPD6SVS/LU2TWQ8PGWF39R.ELP:-K:-4E30/.JNDU25WI", }, { "group-with-unicode", - &bertymessenger.BertyLink{ - Kind: bertymessenger.BertyLink_GroupV1Kind, - BertyGroup: &bertymessenger.BertyGroup{ + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_GroupV1Kind, + BertyGroup: &messengertypes.BertyGroup{ DisplayName: `!@#$%^&*()_=+ ://` + string(rune(0x1F600)), - Group: &bertytypes.Group{ + Group: &protocoltypes.Group{ PublicKey: []byte{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, Secret: []byte{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, SecretSig: []byte{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, - GroupType: bertytypes.GroupTypeMultiMember, + GroupType: protocoltypes.GroupTypeMultiMember, SignPub: []byte{6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}, }, }, }, false, "https://berty.tech/id#group/rUwVHzzEiMxGhM7iY4wW5yZFH3ZcjiWAhxva6tXUcfniDsoT3rmF3WdshR8955KAgeCTvirdfppTAMehPqmBV1YYjAiXYUQm98J992TuPT/name=%21%40%23%24%25%5E%26%2A%28%29_%3D%2B+%3A%2F%2F%F0%9F%98%80", - "BERTY://1FKTFXAW7RN$NCK6*$DSJREWJGK9IBQPJE:FZA4ZVM9DMH55U85P7IMU7OCQ.QE:9/98RB45ENQ61/X23FSZXH/U-XZJ.$E$4JNKK9L7-9F/8Z8DP78US/-6BZXX.$BJ6$NELVC$UREEQ8E8T//0NFE2", + "BERTY://PB/1FKTFXAW7RN$NCK6*$DSJREWJGK9IBQPJE:FZA4ZVM9DMH55U85P7IMU7OCQ.QE:9/98RB45ENQ61/X23FSZXH/U-XZJ.$E$4JNKK9L7-9F/8Z8DP78US/-6BZXX.$BJ6$NELVC$UREEQ8E8T//0NFE2", }, // FIXME: invalid kind // FIXME: incomplete link @@ -102,7 +103,7 @@ func TestMarshalLink(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - internal, web, err := tc.input.Marshal() + internal, web, err := bertylinks.MarshalLink(tc.input) if tc.expectErr { require.Error(t, err) return @@ -119,11 +120,11 @@ func TestMarshalLink(t *testing.T) { ) // unmarshal and compare with original input - webLink, err := bertymessenger.UnmarshalLink(web) + webLink, err := bertylinks.UnmarshalLink(web, nil) require.NoError(t, err) assert.Equal(t, tc.input, webLink) - internalLink, err := bertymessenger.UnmarshalLink(internal) + internalLink, err := bertylinks.UnmarshalLink(internal, nil) require.NoError(t, err) assert.Equal(t, tc.input, internalLink) }) @@ -156,15 +157,15 @@ func TestUnmarshalLink(t *testing.T) { {"invalid14", "https://berty.tech/", errcode.ErrInvalidInput, false, false, ""}, {"invalid15", "https://invalid.domain/id#contact/" + validContactBlob + "/name=Alice", errcode.ErrInvalidInput, false, false, ""}, {"valid-web-contact-v1-with-name", "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice", nil, true, false, "Alice"}, - {"valid-internal-contact-v1", "BERTY://" + validContactInternalBlob, nil, true, false, "moul (cli)"}, - {"valid-internal-contact-v1-alternative-scheme", "berty://" + validContactInternalBlob, nil, true, false, "moul (cli)"}, + {"valid-internal-contact-v1", "BERTY://PB/" + validContactInternalBlob, nil, true, false, "moul (cli)"}, + {"valid-internal-contact-v1-alternative-scheme", "berty://pb/" + validContactInternalBlob, nil, true, false, "moul (cli)"}, {"valid-web-contact-v1-without-name", "https://berty.tech/id#contact/" + validContactBlob, nil, true, false, ""}, {"valid-web-contact-v1-with-unnecessary-fields", "https://berty.tech/id#contact/" + validContactBlob + "/foo=bar", nil, true, false, ""}, {"valid-web-contact-v1-with-unnecessary-fields-and-name-1", "https://berty.tech/id#contact/" + validContactBlob + "/foo=bar&name=Alice", nil, true, false, "Alice"}, {"valid-web-contact-v1-with-unnecessary-fields-and-name-2", "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice&foo=bar", nil, true, false, "Alice"}, {"valid-web-contact-v1-with-unnecessary-fields-and-name-3", "https://berty.tech/id#contact/" + validContactBlob + "/bar=foo&name=Alice&foo=bar", nil, true, false, "Alice"}, {"valid-web-group-v1", "https://berty.tech/id#group/" + validGroupBlob + "/name=random-group-34191", nil, false, true, "random-group-34191"}, - {"valid-internal-group-v1", "BERTY://" + validGroupInternalBlob, nil, false, true, "random-group-34191"}, + {"valid-internal-group-v1", "BERTY://PB/" + validGroupInternalBlob, nil, false, true, "random-group-34191"}, {"valid-escaped-name-1", "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice%20Foobar", nil, true, false, "Alice Foobar"}, {"valid-escaped-name-2", "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice+Foobar", nil, true, false, "Alice Foobar"}, {"valid-escaped-name-3", "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice Foobar", nil, true, false, "Alice Foobar"}, @@ -177,7 +178,7 @@ func TestUnmarshalLink(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - link, err := bertymessenger.UnmarshalLink(tc.input) + link, err := bertylinks.UnmarshalLink(tc.input, nil) if tc.expectedErrcode == nil { tc.expectedErrcode = errcode.ErrCode(-1) } @@ -197,9 +198,9 @@ func TestUnmarshalLink(t *testing.T) { func TestMarshalLinkFuzzing(t *testing.T) { rand.Seed(srand.Fast()) for i := 0; i < 100; i++ { - link := &bertymessenger.BertyLink{ - Kind: bertymessenger.BertyLink_ContactInviteV1Kind, - BertyID: &bertymessenger.BertyID{}, + link := &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_ContactInviteV1Kind, + BertyID: &messengertypes.BertyID{}, } name := []rune{} for i := rand.Intn(64); i > 0; i-- { @@ -210,7 +211,7 @@ func TestMarshalLinkFuzzing(t *testing.T) { link.BertyID.PublicRendezvousSeed = append(link.BertyID.PublicRendezvousSeed, byte(rand.Intn(255))) link.BertyID.AccountPK = append(link.BertyID.AccountPK, byte(rand.Intn(255))) } - internal, web, err := link.Marshal() + internal, web, err := bertylinks.MarshalLink(link) require.NoError(t, err) if os.Getenv("PRINT_FUZZ_RESULTS") == "1" { @@ -228,16 +229,141 @@ func TestMarshalLinkFuzzing(t *testing.T) { ) // unmarshal and compare with original input - webLink, err := bertymessenger.UnmarshalLink(web) + webLink, err := bertylinks.UnmarshalLink(web, nil) require.NoError(t, err) assert.Equal(t, link, webLink) - internalLink, err := bertymessenger.UnmarshalLink(internal) + internalLink, err := bertylinks.UnmarshalLink(internal, nil) require.NoError(t, err) assert.Equal(t, link, internalLink) } } +func TestEncryptLink(t *testing.T) { + cases := []struct { + name string + link *messengertypes.BertyLink + passphrase []byte + expectedErrcode error + }{ + { + "simple-contact", + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_ContactInviteV1Kind, + BertyID: &messengertypes.BertyID{ + DisplayName: "Hello World!", + PublicRendezvousSeed: []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + AccountPK: []byte{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + }, + }, + []byte("s3cur3"), + nil, + }, { + "simple-group", + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_GroupV1Kind, + BertyGroup: &messengertypes.BertyGroup{ + DisplayName: "The Group Name!", + Group: &protocoltypes.Group{ + PublicKey: []byte{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + Secret: []byte{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + SecretSig: []byte{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, + GroupType: protocoltypes.GroupTypeMultiMember, + SignPub: []byte{6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}, + }, + }, + }, + []byte("s3cur3"), + nil, + }, { + "simple-contact-clear-name", + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_ContactInviteV1Kind, + Encrypted: &messengertypes.BertyLink_Encrypted{ + DisplayName: "Hello World!", + }, + BertyID: &messengertypes.BertyID{ + DisplayName: "Hello World!", + PublicRendezvousSeed: []byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + AccountPK: []byte{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + }, + }, + []byte("s3cur3"), + nil, + }, { + "simple-group-clear-name", + &messengertypes.BertyLink{ + Kind: messengertypes.BertyLink_GroupV1Kind, + Encrypted: &messengertypes.BertyLink_Encrypted{ + DisplayName: "The Group Name!", + }, + BertyGroup: &messengertypes.BertyGroup{ + DisplayName: "The Group Name!", + Group: &protocoltypes.Group{ + PublicKey: []byte{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + Secret: []byte{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + SecretSig: []byte{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, + GroupType: protocoltypes.GroupTypeMultiMember, + SignPub: []byte{6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}, + }, + }, + }, + []byte("s3cur3"), + nil, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + encrypted, err := bertylinks.EncryptLink(tc.link, tc.passphrase) + if tc.expectedErrcode == nil { + tc.expectedErrcode = errcode.ErrCode(-1) + } + assert.Equal(t, tc.expectedErrcode.Error(), errcode.Code(err).Error()) + + internalURL, httpURL, err := bertylinks.MarshalLink(encrypted) + require.NoError(t, err) + + tc.link.Encrypted = nil // hide this before making the comparison + + // decrypt with empty passphrase, and get a passphrase required error + { + link, err := bertylinks.UnmarshalLink(internalURL, nil) + assert.Equal(t, errcode.ErrMessengerDeepLinkRequiresPassphrase.Error(), errcode.Code(err).Error()) + require.NotEqual(t, tc.link, link) + } + { + link, err := bertylinks.UnmarshalLink(httpURL, nil) + assert.Equal(t, errcode.ErrMessengerDeepLinkRequiresPassphrase.Error(), errcode.Code(err).Error()) + require.NotEqual(t, tc.link, link) + } + + // decrypt with invalid passphrase, and silently fail + { + link, err := bertylinks.UnmarshalLink(internalURL, []byte("invalid")) + require.NoError(t, err) + require.NotEqual(t, tc.link, link) + } + { + link, err := bertylinks.UnmarshalLink(httpURL, []byte("invalid")) + require.NoError(t, err) + require.NotEqual(t, tc.link, link) + } + + // decrypt with good passphrase, and compare both links + { + link, err := bertylinks.UnmarshalLink(internalURL, tc.passphrase) + require.NoError(t, err) + require.Equal(t, tc.link, link) + } + { + link, err := bertylinks.UnmarshalLink(httpURL, tc.passphrase) + require.NoError(t, err) + require.Equal(t, tc.link, link) + } + }) + } +} + func qrString(url string) string { qrOut := new(bytes.Buffer) qrterminal.GenerateHalfBlock(url, qrterminal.L, qrOut) diff --git a/go/internal/config/config.gen.go b/go/internal/config/config.gen.go index 3c8eb61f86..2cf648533d 100644 --- a/go/internal/config/config.gen.go +++ b/go/internal/config/config.gen.go @@ -4,10 +4,10 @@ package config import ( "encoding/json" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -var Config bertytypes.Config +var Config protocoltypes.Config // FIXME: make it more nicely func init() { diff --git a/go/internal/cryptoutil/cryptoutil.go b/go/internal/cryptoutil/cryptoutil.go index bd3e84fa97..022dfa1ff6 100644 --- a/go/internal/cryptoutil/cryptoutil.go +++ b/go/internal/cryptoutil/cryptoutil.go @@ -1,6 +1,8 @@ package cryptoutil import ( + "crypto/aes" + "crypto/cipher" crand "crypto/rand" "crypto/sha256" "fmt" @@ -9,13 +11,18 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" pb "github.com/libp2p/go-libp2p-core/crypto/pb" "golang.org/x/crypto/ed25519" + "golang.org/x/crypto/scrypt" "berty.tech/berty/v2/go/pkg/errcode" ) const ( - KeySize = 32 // Key size required by box - NonceSize = 24 // Nonce size required by box + KeySize = 32 // Key size required by box + NonceSize = 24 // Nonce size required by box + ScryptIterations = 1 << 15 + ScryptR = 8 + ScryptP = 1 + ScryptKeyLen = 32 ) func ConcatAndHashSha256(slices ...[]byte) *[sha256.Size]byte { @@ -43,6 +50,20 @@ func GenerateNonce() (*[NonceSize]byte, error) { return &nonce, nil } +func GenerateNonceSize(size int) ([]byte, error) { + nonce := make([]byte, size) + + readSize, err := crand.Read(nonce) + if readSize != size { + err = fmt.Errorf("size read: %d (required %d)", readSize, size) + } + if err != nil { + return nil, errcode.ErrCryptoRandomGeneration.Wrap(err) + } + + return nonce, nil +} + func NonceSliceToArray(nonceSlice []byte) (*[NonceSize]byte, error) { var nonceArray [NonceSize]byte @@ -83,7 +104,7 @@ func SeedFromEd25519PrivateKey(key crypto.PrivKey) ([]byte, error) { return r[:ed25519.PrivateKeySize-ed25519.PublicKeySize], nil } -// EdwardsToMontgomery converts ed25519 priv/pub keys to X25519 keys +// EdwardsToMontgomery converts ed25519 priv/pub keys to X25519 keys. func EdwardsToMontgomery(privKey crypto.PrivKey, pubKey crypto.PubKey) (*[32]byte, *[32]byte, error) { mongPriv, err := EdwardsToMontgomeryPriv(privKey) if err != nil { @@ -98,7 +119,7 @@ func EdwardsToMontgomery(privKey crypto.PrivKey, pubKey crypto.PubKey) (*[32]byt return mongPriv, mongPub, nil } -// EdwardsToMontgomeryPub converts ed25519 pub key to X25519 pub key +// EdwardsToMontgomeryPub converts ed25519 pub key to X25519 pub key. func EdwardsToMontgomeryPub(pubKey crypto.PubKey) (*[KeySize]byte, error) { var edPub, mongPub [KeySize]byte @@ -122,7 +143,7 @@ func EdwardsToMontgomeryPub(pubKey crypto.PubKey) (*[KeySize]byte, error) { return &mongPub, nil } -// EdwardsToMontgomeryPriv converts ed25519 priv key to X25519 priv key +// EdwardsToMontgomeryPriv converts ed25519 priv key to X25519 priv key. func EdwardsToMontgomeryPriv(privKey crypto.PrivKey) (*[KeySize]byte, error) { var edPriv [64]byte var mongPriv [KeySize]byte @@ -144,3 +165,85 @@ func EdwardsToMontgomeryPriv(privKey crypto.PrivKey) (*[KeySize]byte, error) { return &mongPriv, nil } + +// AESGCMEncrypt use AES+GCM to encrypt plaintext data. +// +// The generated output will be longer than the original plaintext input. +func AESGCMEncrypt(key, data []byte) ([]byte, error) { + blockCipher, err := aes.NewCipher(key) + if err != nil { + return nil, err + } + + gcm, err := cipher.NewGCM(blockCipher) + if err != nil { + return nil, err + } + + nonce, err := GenerateNonceSize(gcm.NonceSize()) + if err != nil { + return nil, err + } + + ciphertext := gcm.Seal(nonce, nonce, data, nil) + + return ciphertext, nil +} + +// AESGCMDecrypt uses AES+GCM to decrypt plaintext data. +func AESGCMDecrypt(key, data []byte) ([]byte, error) { + blockCipher, err := aes.NewCipher(key) + if err != nil { + return nil, err + } + + gcm, err := cipher.NewGCM(blockCipher) + if err != nil { + return nil, err + } + + nonce, ciphertext := data[:gcm.NonceSize()], data[gcm.NonceSize():] + + plaintext, err := gcm.Open(nil, nonce, ciphertext, nil) + if err != nil { + return nil, err + } + + return plaintext, nil +} + +// AESCTRStream returns a CTR stream that can be used to produce ciphertext without padding. +func AESCTRStream(key, iv []byte) (cipher.Stream, error) { + if key == nil || iv == nil { + return nil, errcode.ErrInvalidInput + } + + blockCipher, err := aes.NewCipher(key) + if err != nil { + return nil, err + } + + stream := cipher.NewCTR(blockCipher, iv) + + return stream, nil +} + +// DeriveKey takes a passphrase of any length and returns a key of fixed size. +// +// If no salt is provided, a new one will be created and returned. +func DeriveKey(passphrase, salt []byte) ([]byte, []byte, error) { + if salt == nil { + var err error + salt, err = GenerateNonceSize(ScryptKeyLen) + if err != nil { + return nil, nil, err + } + } + + key, err := scrypt.Key(passphrase, salt, ScryptIterations, ScryptR, ScryptP, ScryptKeyLen) + if err != nil { + return nil, nil, err + } + + return key, salt, nil +} diff --git a/go/internal/cryptoutil/cryptoutil_test.go b/go/internal/cryptoutil/cryptoutil_test.go index fb7ecbabcb..b5a99bc6eb 100644 --- a/go/internal/cryptoutil/cryptoutil_test.go +++ b/go/internal/cryptoutil/cryptoutil_test.go @@ -1,10 +1,12 @@ package cryptoutil import ( + "crypto/aes" "crypto/rand" "testing" "github.com/libp2p/go-libp2p-core/crypto" + "github.com/stretchr/testify/require" "berty.tech/berty/v2/go/pkg/errcode" ) @@ -47,3 +49,119 @@ func TestEdwardsToMontgomeryPriv(t *testing.T) { t.Error("Should fail with ErrInvalidInput") } } + +func TestDeriveKey(t *testing.T) { + cases := []struct { + passphrase []byte + salt []byte + }{ + {nil, nil}, + {[]byte{0x42}, []byte{0x42}}, + {nil, []byte{0x42}}, + {[]byte{0x42}, nil}, + {[]byte("hello world"), []byte("hello world")}, + {[]byte("morethan32bytes.................."), []byte("hello world")}, + {[]byte("hello world"), []byte("morethan32bytes..................")}, + {[]byte("morethan32bytes.................."), []byte("morethan32bytes..................")}, + } + for _, tc := range cases { + t.Run("", func(t *testing.T) { + key, salt, err := DeriveKey(tc.passphrase, tc.salt) + require.NoError(t, err) + require.Equal(t, ScryptKeyLen, len(key)) + if tc.salt != nil { + require.Equal(t, tc.salt, salt) + } + require.NotEqual(t, tc.passphrase, key) + }) + } +} + +func TestAESGCMEncryptDecrypt(t *testing.T) { + var ( + passphrase = []byte("my priv4te k3y") + salt = []byte("my sup3r s3lt") + message = []byte("12345678901234567890123456789012") + ) + key, salt, err := DeriveKey(passphrase, salt) + require.NoError(t, err) + require.Equal(t, salt, salt) + require.NotEqual(t, passphrase, key) + require.Equal(t, ScryptKeyLen, len(key)) + + enc, err := AESGCMEncrypt(key, message) + require.NoError(t, err) + require.NotEqual(t, message, enc) + + dec, err := AESGCMDecrypt(key, enc) + require.NoError(t, err) + require.Equal(t, message, dec) +} + +func TestAESCTRStream(t *testing.T) { + var ( + passphrase = []byte("my priv4te k3y") + message1 = []byte("hello world!") + message2 = []byte("hi planet!") + enc1 = make([]byte, len(message1)) + enc2 = make([]byte, len(message2)) + ) + + // generate nonce with AES' blocksize + nonce, err := GenerateNonceSize(aes.BlockSize) + require.NoError(t, err) + require.NotNil(t, nonce) + + // derive key for AES + key, salt, err := DeriveKey(passphrase, nonce) + require.NoError(t, err) + require.NotNil(t, key) + require.Equal(t, nonce, salt) + + // encrypt + { + stream, err := AESCTRStream(key, nonce) + require.NoError(t, err) + stream.XORKeyStream(enc1, message1) + stream.XORKeyStream(enc2, message2) + require.NotEqual(t, enc1, message1) + require.NotEqual(t, enc2, message2) + require.Equal(t, len(enc1), len(message1)) + require.Equal(t, len(enc2), len(message2)) + } + + // decrypt + { + var ( + dec1 = make([]byte, len(message1)) + dec2 = make([]byte, len(message2)) + ) + stream, err := AESCTRStream(key, nonce) + require.NoError(t, err) + stream.XORKeyStream(dec1, enc1) + stream.XORKeyStream(dec2, enc2) + require.Equal(t, dec1, message1) + require.Equal(t, dec2, message2) + } + + // silently failing invalid decrypt + { + invalidKey, _, err := DeriveKey([]byte("invalid passphrase"), nonce) + var ( + dec1 = make([]byte, len(message1)) + dec2 = make([]byte, len(message2)) + ) + require.NoError(t, err) + require.NotNil(t, invalidKey) + stream, err := AESCTRStream(invalidKey, nonce) + require.NoError(t, err) + stream.XORKeyStream(dec1, enc1) + stream.XORKeyStream(dec2, enc2) + require.NotEqual(t, dec1, message1) + require.NotEqual(t, dec2, message2) + require.NotEqual(t, dec1, enc1) + require.NotEqual(t, dec2, enc2) + require.Equal(t, len(dec1), len(enc1)) + require.Equal(t, len(dec2), len(enc2)) + } +} diff --git a/go/internal/initutil/ipfs.go b/go/internal/initutil/ipfs.go index 5478716fc9..26adba2f62 100644 --- a/go/internal/initutil/ipfs.go +++ b/go/internal/initutil/ipfs.go @@ -45,6 +45,7 @@ func (m *Manager) SetupLocalIPFSFlags(fs *flag.FlagSet) { fs.BoolVar(&m.Node.Protocol.LocalDiscovery, "p2p.local-discovery", true, "if true local discovery will be enabled") fs.DurationVar(&m.Node.Protocol.MinBackoff, "p2p.min-backoff", time.Second, "minimum p2p backoff duration") fs.DurationVar(&m.Node.Protocol.MaxBackoff, "p2p.max-backoff", time.Minute, "maximum p2p backoff duration") + fs.DurationVar(&m.Node.Protocol.PollInterval, "p2p.poll-interval", pubsub.DiscoveryPollInterval, "how long the discovery system will waits for more peers") fs.StringVar(&m.Node.Protocol.RdvpMaddrs, "p2p.rdvp", ":default:", `list of rendezvous point maddr, ":dev:" will add the default devs servers, ":none:" will disable rdvp`) fs.BoolVar(&m.Node.Protocol.Ble, "p2p.ble", ble.Supported, "if true Bluetooth Low Energy will be enabled") fs.BoolVar(&m.Node.Protocol.MultipeerConnectivity, "p2p.multipeer-connectivity", mc.Supported, "if true Multipeer Connectivity will be enabled") @@ -347,6 +348,8 @@ func (m *Manager) getLocalIPFS() (ipfsutil.ExtendedCoreAPI, *ipfs_core.IpfsNode, if err != nil { return err } + + pubsub.DiscoveryPollInterval = m.Node.Protocol.PollInterval m.Node.Protocol.pubsub, err = pubsub.NewGossipSub(m.getContext(), h, pubsub.WithMessageSigning(true), pubsub.WithFloodPublish(true), diff --git a/go/internal/initutil/manager.go b/go/internal/initutil/manager.go index c456c06e59..82ba34d99a 100644 --- a/go/internal/initutil/manager.go +++ b/go/internal/initutil/manager.go @@ -28,6 +28,8 @@ import ( "berty.tech/berty/v2/go/pkg/bertymessenger" "berty.tech/berty/v2/go/pkg/bertyprotocol" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type Manager struct { @@ -73,6 +75,7 @@ type Manager struct { RdvpMaddrs string `json:"RdvpMaddrs,omitempty"` AuthSecret string `json:"AuthSecret,omitempty"` AuthPublicKey string `json:"AuthPublicKey,omitempty"` + PollInterval time.Duration `json:"PollInterval,omitempty"` Tor struct { Mode string `json:"Mode,omitempty"` BinaryPath string `json:"BinaryPath,omitempty"` @@ -87,7 +90,7 @@ type Manager struct { pubsub *pubsub.PubSub discovery tinder.Driver server bertyprotocol.Service - client bertyprotocol.ProtocolServiceClient + client protocoltypes.ProtocolServiceClient requiredByClient bool ipfsWebUICleanup func() orbitDB *bertyprotocol.BertyOrbitDB @@ -105,11 +108,11 @@ type Manager struct { server bertymessenger.Service lcmanager *lifecycle.Manager notificationManager notification.Manager - client bertymessenger.MessengerServiceClient + client messengertypes.MessengerServiceClient db *gorm.DB dbCleanup func() requiredByClient bool - localDBState *bertymessenger.LocalDatabaseState + localDBState *messengertypes.LocalDatabaseState } GRPC struct { RemoteAddr string `json:"RemoteAddr,omitempty"` diff --git a/go/internal/initutil/manager_test.go b/go/internal/initutil/manager_test.go index 83dcaeceab..6c0f6ad503 100644 --- a/go/internal/initutil/manager_test.go +++ b/go/internal/initutil/manager_test.go @@ -13,7 +13,7 @@ import ( "moul.io/u" "berty.tech/berty/v2/go/internal/initutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func verifySetupLeakDetection(t *testing.T) { @@ -143,7 +143,7 @@ func Example_noflags() { } // retrieve config - ret, err := client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + ret, err := client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { panic(err) } @@ -209,7 +209,7 @@ func TestTwoConcurrentManagers(t *testing.T) { require.NoError(t, err) require.NotNil(t, client) - ret, err := client.InstanceGetConfiguration(ctx2, &bertytypes.InstanceGetConfiguration_Request{}) + ret, err := client.InstanceGetConfiguration(ctx2, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, ret.AccountPK) } @@ -278,7 +278,7 @@ func TestLocalProtocolServerAndClient(t *testing.T) { require.NoError(t, err) require.NotNil(t, client) - ret, err := client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + ret, err := client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, ret.AccountPK) } diff --git a/go/internal/initutil/node.go b/go/internal/initutil/node.go index eba4e0e635..08424ab775 100644 --- a/go/internal/initutil/node.go +++ b/go/internal/initutil/node.go @@ -34,6 +34,8 @@ import ( "berty.tech/berty/v2/go/pkg/bertymessenger" "berty.tech/berty/v2/go/pkg/bertyprotocol" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) const ( @@ -208,8 +210,8 @@ func (m *Manager) getLocalProtocolServer() (bertyprotocol.Service, error) { } // register grpc service - bertyprotocol.RegisterProtocolServiceServer(grpcServer, m.Node.Protocol.server) - if err := bertyprotocol.RegisterProtocolServiceHandlerServer(m.getContext(), gatewayMux, m.Node.Protocol.server); err != nil { + protocoltypes.RegisterProtocolServiceServer(grpcServer, m.Node.Protocol.server) + if err := protocoltypes.RegisterProtocolServiceHandlerServer(m.getContext(), gatewayMux, m.Node.Protocol.server); err != nil { return nil, errcode.TODO.Wrap(err) } } @@ -278,10 +280,10 @@ func (m *Manager) getGRPCClientConn() (*grpc.ClientConn, error) { } if m.Node.Protocol.server != nil { - bertyprotocol.RegisterProtocolServiceServer(grpcServer, m.Node.Protocol.server) + protocoltypes.RegisterProtocolServiceServer(grpcServer, m.Node.Protocol.server) } if m.Node.Messenger.server != nil { - bertymessenger.RegisterMessengerServiceServer(grpcServer, m.Node.Messenger.server) + messengertypes.RegisterMessengerServiceServer(grpcServer, m.Node.Messenger.server) } m.Node.GRPC.bufServerListener = bl @@ -299,7 +301,7 @@ func (m *Manager) getGRPCClientConn() (*grpc.ClientConn, error) { return m.Node.GRPC.clientConn, nil } -func (m *Manager) GetMessengerClient() (bertymessenger.MessengerServiceClient, error) { +func (m *Manager) GetMessengerClient() (messengertypes.MessengerServiceClient, error) { defer m.prepareForGetter()() return m.getMessengerClient() @@ -333,7 +335,7 @@ func (m *Manager) getLifecycleManager() *lifecycle.Manager { return m.Node.Messenger.lcmanager } -func (m *Manager) getMessengerClient() (bertymessenger.MessengerServiceClient, error) { +func (m *Manager) getMessengerClient() (messengertypes.MessengerServiceClient, error) { if m.Node.Messenger.client != nil { return m.Node.Messenger.client, nil } @@ -342,19 +344,19 @@ func (m *Manager) getMessengerClient() (bertymessenger.MessengerServiceClient, e if err != nil { return nil, errcode.TODO.Wrap(err) } - m.Node.Messenger.client = bertymessenger.NewMessengerServiceClient(grpcClient) + m.Node.Messenger.client = messengertypes.NewMessengerServiceClient(grpcClient) m.initLogger.Debug("messenger client initialized and cached") return m.Node.Messenger.client, nil } -func (m *Manager) GetProtocolClient() (bertyprotocol.ProtocolServiceClient, error) { +func (m *Manager) GetProtocolClient() (protocoltypes.ProtocolServiceClient, error) { defer m.prepareForGetter()() return m.getProtocolClient() } -func (m *Manager) getProtocolClient() (bertyprotocol.ProtocolServiceClient, error) { +func (m *Manager) getProtocolClient() (protocoltypes.ProtocolServiceClient, error) { if m.Node.Protocol.client != nil { return m.Node.Protocol.client, nil } @@ -363,7 +365,7 @@ func (m *Manager) getProtocolClient() (bertyprotocol.ProtocolServiceClient, erro if err != nil { return nil, errcode.TODO.Wrap(err) } - m.Node.Protocol.client = bertyprotocol.NewProtocolServiceClient(grpcClient) + m.Node.Protocol.client = protocoltypes.NewProtocolServiceClient(grpcClient) m.initLogger.Debug("protocol client initialized and cached") return m.Node.Protocol.client, nil @@ -554,7 +556,7 @@ func (m *Manager) restoreMessengerDataFromExport() error { return errcode.ErrInternal.Wrap(err) } - m.Node.Messenger.localDBState = &bertymessenger.LocalDatabaseState{} + m.Node.Messenger.localDBState = &messengertypes.LocalDatabaseState{} if err := bertymessenger.RestoreFromAccountExport(m.ctx, f, coreAPI, odb, m.Node.Messenger.localDBState, logger); err != nil { return errcode.ErrInternal.Wrap(err) @@ -563,13 +565,13 @@ func (m *Manager) restoreMessengerDataFromExport() error { return nil } -func (m *Manager) GetLocalMessengerServer() (bertymessenger.MessengerServiceServer, error) { +func (m *Manager) GetLocalMessengerServer() (messengertypes.MessengerServiceServer, error) { defer m.prepareForGetter()() return m.getLocalMessengerServer() } -func (m *Manager) getLocalMessengerServer() (bertymessenger.MessengerServiceServer, error) { +func (m *Manager) getLocalMessengerServer() (messengertypes.MessengerServiceServer, error) { if m.Node.Messenger.server != nil { return m.Node.Messenger.server, nil } @@ -633,8 +635,8 @@ func (m *Manager) getLocalMessengerServer() (bertymessenger.MessengerServiceServ } // register grpc service - bertymessenger.RegisterMessengerServiceServer(grpcServer, messengerServer) - if err := bertymessenger.RegisterMessengerServiceHandlerServer(m.getContext(), gatewayMux, messengerServer); err != nil { + messengertypes.RegisterMessengerServiceServer(grpcServer, messengerServer) + if err := messengertypes.RegisterMessengerServiceHandlerServer(m.getContext(), gatewayMux, messengerServer); err != nil { return nil, errcode.TODO.Wrap(err) } diff --git a/go/internal/logutil/logutil.go b/go/internal/logutil/logutil.go index d0f72832ba..97f5a9817e 100644 --- a/go/internal/logutil/logutil.go +++ b/go/internal/logutil/logutil.go @@ -26,20 +26,6 @@ func NewLogger(filters string, format string, logFile string) (*zap.Logger, func return zap.NewNop(), cleanup, nil } - // configure zap - var config zap.Config - switch logFile { - case "": - config = zap.NewDevelopmentConfig() - case "stdout", "stderr": - config = zap.NewDevelopmentConfig() - config.OutputPaths = []string{logFile} - default: - config = zap.NewProductionConfig() - config.OutputPaths = []string{logFile} - } - config.Level.SetLevel(zapcore.DebugLevel) - stableWidthNameEncoder := func(loggerName string, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(fmt.Sprintf("%-18s", loggerName)) } @@ -77,45 +63,69 @@ func NewLogger(filters string, format string, logFile string) (*zap.Logger, func } } + // configure zap + var config zap.Config switch strings.ToLower(format) { case "": - // noop + config = zap.NewDevelopmentConfig() case "json": + config = zap.NewProductionConfig() + config.Development = true config.Encoding = jsonEncoding case "light-json": + config = zap.NewProductionConfig() config.Encoding = jsonEncoding config.EncoderConfig.TimeKey = "" config.EncoderConfig.EncodeLevel = stableWidthCapitalLevelEncoder + config.Development = true config.DisableStacktrace = true case "light-console": + config = zap.NewDevelopmentConfig() config.Encoding = consoleEncoding config.EncoderConfig.TimeKey = "" config.EncoderConfig.EncodeLevel = stableWidthCapitalLevelEncoder config.DisableStacktrace = true config.EncoderConfig.EncodeName = stableWidthNameEncoder + config.Development = true case "light-color": + config = zap.NewDevelopmentConfig() config.Encoding = consoleEncoding config.EncoderConfig.TimeKey = "" config.EncoderConfig.EncodeLevel = stableWidthCapitalColorLevelEncoder config.DisableStacktrace = true config.EncoderConfig.EncodeName = stableWidthNameEncoder + config.Development = true case "console": + config = zap.NewDevelopmentConfig() config.Encoding = consoleEncoding config.EncoderConfig.EncodeTime = zapcore.RFC3339TimeEncoder config.EncoderConfig.EncodeLevel = stableWidthCapitalLevelEncoder config.DisableStacktrace = true config.EncoderConfig.EncodeName = stableWidthNameEncoder + config.Development = true case "color": + config = zap.NewDevelopmentConfig() config.Encoding = consoleEncoding config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder config.EncoderConfig.EncodeDuration = zapcore.StringDurationEncoder config.EncoderConfig.EncodeLevel = stableWidthCapitalColorLevelEncoder config.DisableStacktrace = true config.EncoderConfig.EncodeName = stableWidthNameEncoder + config.Development = true default: return nil, nil, fmt.Errorf("unknown log format: %q", format) } + config.Level = zap.NewAtomicLevelAt(zap.DebugLevel) + + switch logFile { + case "": + case "stdout", "stderr": + config.OutputPaths = []string{logFile} + default: + config.OutputPaths = []string{logFile} + } + base, err := config.Build() if err != nil { return nil, nil, err @@ -130,7 +140,7 @@ func DecorateLogger(base *zap.Logger, filters string) (*zap.Logger, func(), erro return nil, nil, err } - logger := zap.New(zapfilter.NewFilteringCore(base.Core(), filter)) + logger := zap.New(zapfilter.NewFilteringCore(base.Core(), filter), zap.AddCaller()) zap.ReplaceGlobals(logger.Named("other")) cleanup := func() { diff --git a/go/internal/logutil/logutil_test.go b/go/internal/logutil/logutil_test.go index 36d8cdc734..1a6aca0eb2 100644 --- a/go/internal/logutil/logutil_test.go +++ b/go/internal/logutil/logutil_test.go @@ -22,14 +22,14 @@ func Example_logall() { logger.Named("foo").Error("foo error") // Output: - // DEBUG bty top debug - // INFO bty top info - // WARN bty top warn - // ERROR bty top error - // DEBUG bty.foo foo debug - // INFO bty.foo foo info - // WARN bty.foo foo warn - // ERROR bty.foo foo error + // DEBUG bty logutil/logutil_test.go:14 top debug + // INFO bty logutil/logutil_test.go:15 top info + // WARN bty logutil/logutil_test.go:16 top warn + // ERROR bty logutil/logutil_test.go:17 top error + // DEBUG bty.foo logutil/logutil_test.go:19 foo debug + // INFO bty.foo logutil/logutil_test.go:20 foo info + // WARN bty.foo logutil/logutil_test.go:21 foo warn + // ERROR bty.foo logutil/logutil_test.go:22 foo error } func Example_logerrors() { @@ -55,7 +55,7 @@ func Example_logerrors() { logger.Named("foo").Named("bar").Error("foo.bar error") // Output: - // ERROR bty top error - // ERROR bty.foo foo error - // WARN bty.foo.bar foo.bar warn + // ERROR bty logutil/logutil_test.go:45 top error + // ERROR bty.foo logutil/logutil_test.go:50 foo error + // WARN bty.foo.bar logutil/logutil_test.go:54 foo.bar warn } diff --git a/go/internal/omnisearch/berty-engine.go b/go/internal/omnisearch/berty-engine.go index 10712543a5..98ea76695e 100644 --- a/go/internal/omnisearch/berty-engine.go +++ b/go/internal/omnisearch/berty-engine.go @@ -11,8 +11,8 @@ import ( pubsub "github.com/libp2p/go-libp2p-pubsub" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertymessenger" "berty.tech/berty/v2/go/pkg/bertyprotocol" + "berty.tech/berty/v2/go/pkg/messengertypes" ) type bertyEngine struct { @@ -33,7 +33,7 @@ func NewEngine(ctx context.Context, h host.Host, disc discovery.Discovery) (Engi } func (p *bertyEngine) Search(octx context.Context, gwg *sync.WaitGroup, rc chan<- *ResultReturn, previous *ResultReturn) { - if v, ok := previous.Object.(*bertymessenger.BertyID); ok { + if v, ok := previous.Object.(*messengertypes.BertyID); ok { (*gwg).Add(1) go func() { defer func() { diff --git a/go/internal/omnisearch/berty-parser.go b/go/internal/omnisearch/berty-parser.go index 31c9d31a65..e9e87553bf 100644 --- a/go/internal/omnisearch/berty-parser.go +++ b/go/internal/omnisearch/berty-parser.go @@ -1,7 +1,8 @@ package omnisearch import ( - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/internal/bertylinks" + "berty.tech/berty/v2/go/pkg/messengertypes" ) type bertyParser struct{} @@ -13,18 +14,18 @@ func NewParser() Parser { func (p bertyParser) Parse(previous *ResultReturn) *ResultReturn { str, ok := previous.Object.(string) if ok { - r, err := bertymessenger.UnmarshalLink(str) + r, err := bertylinks.UnmarshalLink(str, nil) if err != nil { return nil } switch r.Kind { - case bertymessenger.BertyLink_ContactInviteV1Kind: + case messengertypes.BertyLink_ContactInviteV1Kind: return &ResultReturn{ Object: r.BertyID, Finder: p, Previous: previous, } - case bertymessenger.BertyLink_GroupV1Kind: + case messengertypes.BertyLink_GroupV1Kind: return &ResultReturn{ Object: r.BertyGroup, Finder: p, diff --git a/go/internal/omnisearch/manager.go b/go/internal/omnisearch/manager.go index b60f582144..38dd21c892 100644 --- a/go/internal/omnisearch/manager.go +++ b/go/internal/omnisearch/manager.go @@ -12,8 +12,9 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/lifecycle" "berty.tech/berty/v2/go/internal/notification" - "berty.tech/berty/v2/go/pkg/bertymessenger" "berty.tech/berty/v2/go/pkg/bertyprotocol" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type provider struct { @@ -36,13 +37,13 @@ var ( lifecycleManagerType = reflect.TypeOf((*(*lifecycle.Manager))(nil)).Elem() ipfsutilExtendedCoreAPIType = reflect.TypeOf((*(ipfsutil.ExtendedCoreAPI))(nil)).Elem() ipfsCoreIpfsNodeType = reflect.TypeOf((*(*ipfsCore.IpfsNode))(nil)).Elem() - bertymessengerMessengerServiceServerType = reflect.TypeOf((*(bertymessenger.MessengerServiceServer))(nil)).Elem() - bertymessengerMessengerServiceClientType = reflect.TypeOf((*(bertymessenger.MessengerServiceClient))(nil)).Elem() + bertymessengerMessengerServiceServerType = reflect.TypeOf((*(messengertypes.MessengerServiceServer))(nil)).Elem() + bertymessengerMessengerServiceClientType = reflect.TypeOf((*(messengertypes.MessengerServiceClient))(nil)).Elem() bertyprotocolServiceType = reflect.TypeOf((*(bertyprotocol.Service))(nil)).Elem() zapLoggerType = reflect.TypeOf((*(*zap.Logger))(nil)).Elem() notificationManager = reflect.TypeOf((*(notification.Manager))(nil)).Elem() bertyprotocolBertyOrbitDB = reflect.TypeOf((*(*bertyprotocol.BertyOrbitDB))(nil)).Elem() - bertyprotocolProtocolServiceClient = reflect.TypeOf((*(bertyprotocol.ProtocolServiceClient))(nil)).Elem() + protocoltypesProtocolServiceClient = reflect.TypeOf((*(protocoltypes.ProtocolServiceClient))(nil)).Elem() ) func (provider) Available() []reflect.Type { @@ -56,7 +57,7 @@ func (provider) Available() []reflect.Type { zapLoggerType, notificationManager, bertyprotocolBertyOrbitDB, - bertyprotocolProtocolServiceClient, + protocoltypesProtocolServiceClient, } } @@ -82,7 +83,7 @@ func (p provider) Make(t reflect.Type) (reflect.Value, error) { r, err = p.m.GetNotificationManager() case bertyprotocolBertyOrbitDB: r, err = p.m.GetOrbitDB() - case bertyprotocolProtocolServiceClient: + case protocoltypesProtocolServiceClient: r, err = p.m.GetProtocolClient() default: err = fmt.Errorf("type %s is not available", t.Name()) diff --git a/go/internal/streamutil/func_io.go b/go/internal/streamutil/func_io.go new file mode 100644 index 0000000000..f5f9acc185 --- /dev/null +++ b/go/internal/streamutil/func_io.go @@ -0,0 +1,94 @@ +package streamutil + +import ( + "io" + + "go.uber.org/zap" + + "berty.tech/berty/v2/go/pkg/errcode" +) + +func FuncReader(readFunc func() ([]byte, error), l *zap.Logger) *io.PipeReader { + in, out := io.Pipe() + + go func() { + err := func() error { + for { + block, err := readFunc() + if err == io.EOF { + return nil + } + if err != nil { + return errcode.ErrStreamRead.Wrap(err) + } + if _, err := out.Write(block); err != nil { + return errcode.ErrStreamWrite.Wrap(err) + } + } + }() + ClosePipeOut(out, err, "FuncReader: close pipe out", l) + }() + + return in +} + +func FuncSink(buffer []byte, reader io.Reader, writeFunc func(block []byte) error) error { + for { + n, err := reader.Read(buffer) + if err == io.EOF { + return nil + } + if err != nil { + return errcode.ErrStreamRead.Wrap(err) + } + if err := writeFunc(buffer[:n]); err != nil { + return errcode.ErrStreamWrite.Wrap(err) + } + } +} + +func FuncBlockTransformer(buf []byte, reader io.Reader, l *zap.Logger, transformFunc func(block []byte) ([]byte, error)) *io.PipeReader { + in, out := io.Pipe() + + go func() { + err := func() error { + for { + n, readErr := io.ReadFull(reader, buf) + if readErr == io.EOF { + return nil + } + if readErr != nil && readErr != io.ErrUnexpectedEOF { + return errcode.ErrStreamRead.Wrap(readErr) + } + + transformed, err := transformFunc(buf[:n]) + if err != nil { + return errcode.ErrStreamTransform.Wrap(err) + } + + if _, err := out.Write(transformed); err != nil { + return errcode.ErrStreamWrite.Wrap(err) + } + + if readErr == io.ErrUnexpectedEOF { + return nil // last block can be smaller + } + } + }() + ClosePipeOut(out, err, "FuncBlockTransformer: close pipe out", l) + }() + + return in +} + +func ClosePipeOut(out *io.PipeWriter, incoming error, errPrefix string, l *zap.Logger) { + var cErr error + if incoming == nil || incoming == io.EOF { + cErr = out.Close() + } else { + cErr = out.CloseWithError(incoming) + } + if cErr != nil { + l.Error(errPrefix, zap.Error(cErr)) + } +} diff --git a/go/internal/sysutil/sysutil.go b/go/internal/sysutil/sysutil.go index e9f8a80f7f..da8ba1a9af 100644 --- a/go/internal/sysutil/sysutil.go +++ b/go/internal/sysutil/sysutil.go @@ -8,12 +8,12 @@ import ( "go.uber.org/multierr" "moul.io/openfiles" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/bertyversion" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/berty/v2/go/pkg/username" ) -func SystemInfoProcess() (*bertytypes.SystemInfo_Process, error) { +func SystemInfoProcess() (*protocoltypes.SystemInfo_Process, error) { var errs error // openfiles @@ -28,7 +28,7 @@ func SystemInfoProcess() (*bertytypes.SystemInfo_Process, error) { wd, err := syscall.Getwd() errs = multierr.Append(errs, err) - reply := bertytypes.SystemInfo_Process{ + reply := protocoltypes.SystemInfo_Process{ Nofile: nofile, TooManyOpenFiles: openfiles.IsTooManyError(nofileErr), NumCPU: int64(runtime.NumCPU()), diff --git a/go/internal/sysutil/sysutil_unix.go b/go/internal/sysutil/sysutil_unix.go index 8b1a88bb77..75e1492588 100644 --- a/go/internal/sysutil/sysutil_unix.go +++ b/go/internal/sysutil/sysutil_unix.go @@ -7,10 +7,10 @@ import ( "go.uber.org/multierr" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func appendCustomSystemInfo(reply *bertytypes.SystemInfo_Process) error { +func appendCustomSystemInfo(reply *protocoltypes.SystemInfo_Process) error { var errs error // rlimit diff --git a/go/internal/sysutil/sysutil_unsupported.go b/go/internal/sysutil/sysutil_unsupported.go index aef57f0de9..4d5837d3db 100644 --- a/go/internal/sysutil/sysutil_unsupported.go +++ b/go/internal/sysutil/sysutil_unsupported.go @@ -2,8 +2,8 @@ package sysutil -import "berty.tech/berty/v2/go/pkg/bertytypes" +import "berty.tech/berty/v2/go/pkg/protocoltypes" -func appendCustomSystemInfo(reply *bertytypes.SystemInfo_Process) error { +func appendCustomSystemInfo(reply *protocoltypes.SystemInfo_Process) error { return nil } diff --git a/go/internal/tracer/bertytypes_header.go b/go/internal/tracer/bertytypes_header.go index 0ea10add2f..02925a2608 100644 --- a/go/internal/tracer/bertytypes_header.go +++ b/go/internal/tracer/bertytypes_header.go @@ -7,11 +7,11 @@ import ( "go.opentelemetry.io/otel/api/propagation" "go.opentelemetry.io/otel/api/trace" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type metadataSupplier struct { - header *bertytypes.MessageHeaders + header *protocoltypes.MessageHeaders } func (m *metadataSupplier) Get(key string) string { @@ -32,15 +32,15 @@ func (m *metadataSupplier) Set(key string, val string) { m.header.Metadata[key] = val } -func InjectSpanContextToMessageHeaders(ctx context.Context, h *bertytypes.MessageHeaders) { +func InjectSpanContextToMessageHeaders(ctx context.Context, h *protocoltypes.MessageHeaders) { propagation.InjectHTTP(ctx, Propagators(), &metadataSupplier{h}) } -func ExtractSpanContextFromMessageHeaders(ctx context.Context, h *bertytypes.MessageHeaders) context.Context { +func ExtractSpanContextFromMessageHeaders(ctx context.Context, h *protocoltypes.MessageHeaders) context.Context { return propagation.ExtractHTTP(ctx, Propagators(), &metadataSupplier{h}) } -func SpanFromMessageHeaders(ctx context.Context, h *bertytypes.MessageHeaders, name string, attrs ...kv.KeyValue) (context.Context, trace.Span) { +func SpanFromMessageHeaders(ctx context.Context, h *protocoltypes.MessageHeaders, name string, attrs ...kv.KeyValue) (context.Context, trace.Span) { hctx := ExtractSpanContextFromMessageHeaders(context.Background(), h) sctx := trace.RemoteSpanContextFromContext(hctx) return From(ctx).Start(hctx, name, trace.LinkedTo(sctx)) diff --git a/go/pkg/bertybot/bot.go b/go/pkg/bertybot/bot.go index 2042fe1514..b456d3557e 100644 --- a/go/pkg/bertybot/bot.go +++ b/go/pkg/bertybot/bot.go @@ -9,14 +9,14 @@ import ( "go.uber.org/zap" "moul.io/u" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) type Bot struct { - client bertymessenger.MessengerServiceClient + client messengertypes.MessengerServiceClient logger *zap.Logger displayName string - bertyID *bertymessenger.InstanceShareableBertyID_Reply + bertyID *messengertypes.InstanceShareableBertyID_Reply withReplay bool withFromMyself bool withEntityUpdates bool @@ -25,7 +25,7 @@ type Bot struct { handledEvents uint commands map[string]command store struct { - conversations map[string]*bertymessenger.Conversation + conversations map[string]*messengertypes.Conversation mutex sync.Mutex } } @@ -38,7 +38,7 @@ func New(opts ...NewOption) (*Bot, error) { handlers: make(map[HandlerType][]Handler), commands: make(map[string]command), } - b.store.conversations = make(map[string]*bertymessenger.Conversation) + b.store.conversations = make(map[string]*messengertypes.Conversation) // configure bot with options for _, opt := range opts { @@ -61,7 +61,7 @@ func New(opts ...NewOption) (*Bot, error) { { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - req := &bertymessenger.InstanceShareableBertyID_Request{ + req := &messengertypes.InstanceShareableBertyID_Request{ DisplayName: b.displayName, } ret, err := b.client.InstanceShareableBertyID(ctx, req) @@ -87,7 +87,7 @@ func (b *Bot) PublicKey() string { // Start starts the main event loop and can be stopped by canceling the passed context. func (b *Bot) Start(ctx context.Context) error { b.logger.Info("connecting to the event stream") - s, err := b.client.EventStream(ctx, &bertymessenger.EventStream_Request{}) + s, err := b.client.EventStream(ctx, &messengertypes.EventStream_Request{}) if err != nil { return fmt.Errorf("failed to listen to EventStream: %w", err) } @@ -100,7 +100,7 @@ func (b *Bot) Start(ctx context.Context) error { } if b.isReplaying { - if gme.Event.Type == bertymessenger.StreamEvent_TypeListEnded { + if gme.Event.Type == messengertypes.StreamEvent_TypeListEnded { b.logger.Info("finished replaying logs from the previous sessions", zap.Uint("count", b.handledEvents)) b.isReplaying = false } diff --git a/go/pkg/bertybot/bot_test.go b/go/pkg/bertybot/bot_test.go index a7f6843bc5..261fdbf138 100644 --- a/go/pkg/bertybot/bot_test.go +++ b/go/pkg/bertybot/bot_test.go @@ -10,6 +10,7 @@ import ( "berty.tech/berty/v2/go/internal/testutil" "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) func TestUnstableBotCommunication(t *testing.T) { @@ -53,16 +54,16 @@ func TestUnstableBotCommunication(t *testing.T) { // enable contact request on client { - _, err := userClient.InstanceShareableBertyID(ctx, &bertymessenger.InstanceShareableBertyID_Request{}) + _, err := userClient.InstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{}) require.NoError(t, err) time.Sleep(200 * time.Millisecond) // FIXME: replace with dynamic waiting } // send contact request { - parsed, err := botClient.ParseDeepLink(ctx, &bertymessenger.ParseDeepLink_Request{Link: bot.BertyIDURL()}) + parsed, err := botClient.ParseDeepLink(ctx, &messengertypes.ParseDeepLink_Request{Link: bot.BertyIDURL()}) require.NoError(t, err) - _, err = userClient.SendContactRequest(ctx, &bertymessenger.SendContactRequest_Request{ + _, err = userClient.SendContactRequest(ctx, &messengertypes.SendContactRequest_Request{ BertyID: parsed.GetLink().GetBertyID(), }) require.NoError(t, err) @@ -72,7 +73,7 @@ func TestUnstableBotCommunication(t *testing.T) { require.Len(t, bot.store.conversations, 1) // get the conversation - var theConv *bertymessenger.Conversation + var theConv *messengertypes.Conversation { for _, conv := range bot.store.conversations { theConv = conv @@ -81,10 +82,10 @@ func TestUnstableBotCommunication(t *testing.T) { // send 'world!' { - userMessage, err := proto.Marshal(&bertymessenger.AppMessage_UserMessage{Body: "world!"}) + userMessage, err := proto.Marshal(&messengertypes.AppMessage_UserMessage{Body: "world!"}) require.NoError(t, err) - req := &bertymessenger.Interact_Request{ - Type: bertymessenger.AppMessage_TypeUserMessage, + req := &messengertypes.Interact_Request{ + Type: messengertypes.AppMessage_TypeUserMessage, Payload: userMessage, ConversationPublicKey: theConv.PublicKey, } @@ -95,10 +96,10 @@ func TestUnstableBotCommunication(t *testing.T) { // send /ping { - userMessage, err := proto.Marshal(&bertymessenger.AppMessage_UserMessage{Body: "/ping"}) + userMessage, err := proto.Marshal(&messengertypes.AppMessage_UserMessage{Body: "/ping"}) require.NoError(t, err) - req := &bertymessenger.Interact_Request{ - Type: bertymessenger.AppMessage_TypeUserMessage, + req := &messengertypes.Interact_Request{ + Type: messengertypes.AppMessage_TypeUserMessage, Payload: userMessage, ConversationPublicKey: theConv.PublicKey, } diff --git a/go/pkg/bertybot/context.go b/go/pkg/bertybot/context.go index e4ee427ac7..bb99a97e47 100644 --- a/go/pkg/bertybot/context.go +++ b/go/pkg/bertybot/context.go @@ -7,7 +7,7 @@ import ( "github.com/gogo/protobuf/proto" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) // Context is the main argument passed to handlers. @@ -15,9 +15,9 @@ type Context struct { // common HandlerType HandlerType EventPayload proto.Message `json:"-"` // content of the payload is already available in the parsed payloads - EventType bertymessenger.StreamEvent_Type + EventType messengertypes.StreamEvent_Type Context context.Context - Client bertymessenger.MessengerServiceClient + Client messengertypes.MessengerServiceClient Logger *zap.Logger IsReplay bool // whether the event is a replayed or a fresh event IsMe bool // whether the bot is the author @@ -25,12 +25,12 @@ type Context struct { IsNew bool // whether the event is new or an entity update // parsed payloads, depending on the context - Contact *bertymessenger.Contact `json:"Contact,omitempty"` - Conversation *bertymessenger.Conversation `json:"Conversation,omitempty"` - Interaction *bertymessenger.Interaction `json:"Interaction,omitempty"` - Member *bertymessenger.Member `json:"Member,omitempty"` - Account *bertymessenger.Account `json:"Account,omitempty"` - Device *bertymessenger.Device `json:"Device,omitempty"` + Contact *messengertypes.Contact `json:"Contact,omitempty"` + Conversation *messengertypes.Conversation `json:"Conversation,omitempty"` + Interaction *messengertypes.Interaction `json:"Interaction,omitempty"` + Member *messengertypes.Member `json:"Member,omitempty"` + Account *messengertypes.Account `json:"Account,omitempty"` + Device *messengertypes.Device `json:"Device,omitempty"` ConversationPK string `json:"ConversationPK,omitempty"` UserMessage string `json:"UserMessage,omitempty"` CommandArgs []string @@ -46,12 +46,12 @@ func (ctx *Context) ReplyString(text string) error { return fmt.Errorf("unknown conversation PK, cannot reply") } // FIXME: support group conversation - userMessage, err := proto.Marshal(&bertymessenger.AppMessage_UserMessage{Body: text}) + userMessage, err := proto.Marshal(&messengertypes.AppMessage_UserMessage{Body: text}) if err != nil { return fmt.Errorf("marshal user message failed: %w", err) } - _, err = ctx.Client.Interact(ctx.Context, &bertymessenger.Interact_Request{ - Type: bertymessenger.AppMessage_TypeUserMessage, + _, err = ctx.Client.Interact(ctx.Context, &messengertypes.Interact_Request{ + Type: messengertypes.AppMessage_TypeUserMessage, Payload: userMessage, ConversationPublicKey: ctx.ConversationPK, }) diff --git a/go/pkg/bertybot/handlers.go b/go/pkg/bertybot/handlers.go index 88fd824ec2..0902958425 100644 --- a/go/pkg/bertybot/handlers.go +++ b/go/pkg/bertybot/handlers.go @@ -7,7 +7,7 @@ import ( "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) type HandlerType uint @@ -44,7 +44,7 @@ const ( type Handler func(ctx Context) -func (b *Bot) handleEvent(ctx context.Context, event *bertymessenger.StreamEvent) error { +func (b *Bot) handleEvent(ctx context.Context, event *messengertypes.StreamEvent) error { payload, err := event.UnmarshalPayload() if err != nil { return fmt.Errorf("unmarshal event payload failed: %w", err) @@ -61,23 +61,23 @@ func (b *Bot) handleEvent(ctx context.Context, event *bertymessenger.StreamEvent // raw messenger events switch event.Type { - case bertymessenger.StreamEvent_TypeContactUpdated: - context.Contact = payload.(*bertymessenger.StreamEvent_ContactUpdated).Contact + case messengertypes.StreamEvent_TypeContactUpdated: + context.Contact = payload.(*messengertypes.StreamEvent_ContactUpdated).Contact context.ConversationPK = context.Contact.ConversationPublicKey // specialized events switch context.Contact.State { - case bertymessenger.Contact_IncomingRequest: + case messengertypes.Contact_IncomingRequest: b.callHandlers(context, IncomingContactRequestHandler) - case bertymessenger.Contact_Accepted: + case messengertypes.Contact_Accepted: b.callHandlers(context, AcceptedContactHandler) default: return fmt.Errorf("unsupported contact state: %q", context.Contact.State) } b.callHandlers(context, ContactUpdatedHandler) - case bertymessenger.StreamEvent_TypeInteractionUpdated: - context.Interaction = payload.(*bertymessenger.StreamEvent_InteractionUpdated).Interaction + case messengertypes.StreamEvent_TypeInteractionUpdated: + context.Interaction = payload.(*messengertypes.StreamEvent_InteractionUpdated).Interaction context.IsMe = context.Interaction.IsMe context.ConversationPK = context.Interaction.ConversationPublicKey context.IsAck = context.Interaction.Acknowledged @@ -88,8 +88,8 @@ func (b *Bot) handleEvent(ctx context.Context, event *bertymessenger.StreamEvent // specialized events switch context.Interaction.Type { - case bertymessenger.AppMessage_TypeUserMessage: - receivedMessage := payload.(*bertymessenger.AppMessage_UserMessage) + case messengertypes.AppMessage_TypeUserMessage: + receivedMessage := payload.(*messengertypes.AppMessage_UserMessage) context.UserMessage = receivedMessage.GetBody() if len(b.commands) > 0 && len(context.UserMessage) > 1 && strings.HasPrefix(context.UserMessage, "/") { if !context.IsMe && !context.IsReplay && !context.IsAck { @@ -110,8 +110,8 @@ func (b *Bot) handleEvent(ctx context.Context, event *bertymessenger.StreamEvent } b.callHandlers(context, InteractionUpdatedHandler) - case bertymessenger.StreamEvent_TypeConversationUpdated: - context.Conversation = payload.(*bertymessenger.StreamEvent_ConversationUpdated).Conversation + case messengertypes.StreamEvent_TypeConversationUpdated: + context.Conversation = payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation context.ConversationPK = context.Conversation.PublicKey b.store.mutex.Lock() _, found := b.store.conversations[context.ConversationPK] @@ -124,23 +124,23 @@ func (b *Bot) handleEvent(ctx context.Context, event *bertymessenger.StreamEvent } b.callHandlers(context, ConversationUpdatedHandler) - case bertymessenger.StreamEvent_TypeDeviceUpdated: - context.Device = payload.(*bertymessenger.StreamEvent_DeviceUpdated).Device + case messengertypes.StreamEvent_TypeDeviceUpdated: + context.Device = payload.(*messengertypes.StreamEvent_DeviceUpdated).Device b.callHandlers(context, DeviceUpdatedHandler) - case bertymessenger.StreamEvent_TypeAccountUpdated: - context.Account = payload.(*bertymessenger.StreamEvent_AccountUpdated).Account + case messengertypes.StreamEvent_TypeAccountUpdated: + context.Account = payload.(*messengertypes.StreamEvent_AccountUpdated).Account context.IsMe = true b.callHandlers(context, AccountUpdatedHandler) - case bertymessenger.StreamEvent_TypeMemberUpdated: - context.Member = payload.(*bertymessenger.StreamEvent_MemberUpdated).Member + case messengertypes.StreamEvent_TypeMemberUpdated: + context.Member = payload.(*messengertypes.StreamEvent_MemberUpdated).Member b.callHandlers(context, MemberUpdatedHandler) - case bertymessenger.StreamEvent_TypeListEnded: + case messengertypes.StreamEvent_TypeListEnded: b.callHandlers(context, EndOfReplayHandler) - case bertymessenger.StreamEvent_TypeNotified: + case messengertypes.StreamEvent_TypeNotified: b.callHandlers(context, NotificationHandler) default: diff --git a/go/pkg/bertybot/opts.go b/go/pkg/bertybot/opts.go index 3c5bfe0f5f..f0616dc2f8 100644 --- a/go/pkg/bertybot/opts.go +++ b/go/pkg/bertybot/opts.go @@ -8,14 +8,14 @@ import ( "go.uber.org/zap" "google.golang.org/grpc" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) // NewOption can be passed to the `New` function to configure the bot. type NewOption func(*Bot) error // WithMessengerClient passes an already initialized messenger client. -func WithMessengerClient(client bertymessenger.MessengerServiceClient) NewOption { +func WithMessengerClient(client messengertypes.MessengerServiceClient) NewOption { return func(b *Bot) error { b.client = client return nil @@ -25,7 +25,7 @@ func WithMessengerClient(client bertymessenger.MessengerServiceClient) NewOption // WithMessengerGRPCConn configures a new Messenger client from an already initialized gRPC connection. func WithMessengerGRPCConn(cc *grpc.ClientConn) NewOption { return func(b *Bot) error { - b.client = bertymessenger.NewMessengerServiceClient(cc) + b.client = messengertypes.NewMessengerServiceClient(cc) return nil } } @@ -38,7 +38,7 @@ func WithInsecureMessengerGRPCAddr(addr string) NewOption { if err != nil { return fmt.Errorf("dial error: %w", err) } - b.client = bertymessenger.NewMessengerServiceClient(cc) + b.client = messengertypes.NewMessengerServiceClient(cc) return nil } } diff --git a/go/pkg/bertybot/recipes.go b/go/pkg/bertybot/recipes.go index 5e2be850be..fb89f41710 100644 --- a/go/pkg/bertybot/recipes.go +++ b/go/pkg/bertybot/recipes.go @@ -6,7 +6,7 @@ import ( "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertymessenger" + "berty.tech/berty/v2/go/pkg/messengertypes" ) // Recipe is a set of handlers that performs common behaviors. @@ -18,7 +18,7 @@ func AutoAcceptIncomingContactRequestRecipe() Recipe { recipe[IncomingContactRequestHandler] = []Handler{ func(ctx Context) { ctx.Logger.Info("auto-accepting incoming contact request", zap.Any("contact", ctx.Contact)) - req := &bertymessenger.ContactAccept_Request{ + req := &messengertypes.ContactAccept_Request{ PublicKey: ctx.Contact.PublicKey, } _, err := ctx.Client.ContactAccept(ctx.Context, req) diff --git a/go/pkg/bertymessenger/api.go b/go/pkg/bertymessenger/api.go index c8f542c6d2..0aa2160391 100644 --- a/go/pkg/bertymessenger/api.go +++ b/go/pkg/bertymessenger/api.go @@ -2,9 +2,11 @@ package bertymessenger import ( "context" + "errors" "fmt" "io" "io/ioutil" + "net/url" "os" "strings" "time" @@ -14,20 +16,23 @@ import ( "go.uber.org/multierr" "go.uber.org/zap" + "berty.tech/berty/v2/go/internal/bertylinks" "berty.tech/berty/v2/go/internal/discordlog" + "berty.tech/berty/v2/go/internal/streamutil" "berty.tech/berty/v2/go/internal/sysutil" "berty.tech/berty/v2/go/pkg/banner" "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/berty/v2/go/pkg/username" ) -func (svc *service) DevShareInstanceBertyID(ctx context.Context, req *DevShareInstanceBertyID_Request) (*DevShareInstanceBertyID_Reply, error) { +func (svc *service) DevShareInstanceBertyID(ctx context.Context, req *messengertypes.DevShareInstanceBertyID_Request) (*messengertypes.DevShareInstanceBertyID_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() - ret, err := svc.internalInstanceShareableBertyID(ctx, &InstanceShareableBertyID_Request{ + ret, err := svc.internalInstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{ DisplayName: req.DisplayName, Reset_: req.Reset_, }) @@ -39,40 +44,40 @@ func (svc *service) DevShareInstanceBertyID(ctx context.Context, req *DevShareIn return nil, errcode.TODO.Wrap(err) } - return &DevShareInstanceBertyID_Reply{}, nil + return &messengertypes.DevShareInstanceBertyID_Reply{}, nil } -func (svc *service) InstanceShareableBertyID(ctx context.Context, req *InstanceShareableBertyID_Request) (*InstanceShareableBertyID_Reply, error) { +func (svc *service) InstanceShareableBertyID(ctx context.Context, req *messengertypes.InstanceShareableBertyID_Request) (*messengertypes.InstanceShareableBertyID_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() // need to split the function for internal calls to prevent deadlocks return svc.internalInstanceShareableBertyID(ctx, req) } -func (svc *service) internalInstanceShareableBertyID(ctx context.Context, req *InstanceShareableBertyID_Request) (*InstanceShareableBertyID_Reply, error) { +func (svc *service) internalInstanceShareableBertyID(ctx context.Context, req *messengertypes.InstanceShareableBertyID_Request) (*messengertypes.InstanceShareableBertyID_Reply, error) { if req == nil { - req = &InstanceShareableBertyID_Request{} + req = &messengertypes.InstanceShareableBertyID_Request{} } - config, err := svc.protocolClient.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config, err := svc.protocolClient.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return nil, errcode.TODO.Wrap(err) } svc.logger.Debug("enable contact request (may be already done)") - _, err = svc.protocolClient.ContactRequestEnable(ctx, &bertytypes.ContactRequestEnable_Request{}) + _, err = svc.protocolClient.ContactRequestEnable(ctx, &protocoltypes.ContactRequestEnable_Request{}) if err != nil { return nil, errcode.TODO.Wrap(err) } if req.Reset_ { svc.logger.Info("reset contact reference") - _, err = svc.protocolClient.ContactRequestResetReference(ctx, &bertytypes.ContactRequestResetReference_Request{}) + _, err = svc.protocolClient.ContactRequestResetReference(ctx, &protocoltypes.ContactRequestResetReference_Request{}) if err != nil { return nil, errcode.TODO.Wrap(err) } } - res, err := svc.protocolClient.ContactRequestReference(ctx, &bertytypes.ContactRequestReference_Request{}) + res, err := svc.protocolClient.ContactRequestReference(ctx, &protocoltypes.ContactRequestReference_Request{}) if err != nil { return nil, errcode.TODO.Wrap(err) } @@ -80,29 +85,37 @@ func (svc *service) internalInstanceShareableBertyID(ctx context.Context, req *I // if this call does not return a PublicRendezvousSeed, then we need to call Reset if res.PublicRendezvousSeed == nil { svc.logger.Info("reset contact reference") - _, err = svc.protocolClient.ContactRequestResetReference(ctx, &bertytypes.ContactRequestResetReference_Request{}) + _, err = svc.protocolClient.ContactRequestResetReference(ctx, &protocoltypes.ContactRequestResetReference_Request{}) if err != nil { return nil, errcode.TODO.Wrap(err) } } - res, err = svc.protocolClient.ContactRequestReference(ctx, &bertytypes.ContactRequestReference_Request{}) + res, err = svc.protocolClient.ContactRequestReference(ctx, &protocoltypes.ContactRequestReference_Request{}) if err != nil { return nil, errcode.TODO.Wrap(err) } displayName := strings.TrimSpace(req.DisplayName) - id := &BertyID{ + id := &messengertypes.BertyID{ DisplayName: displayName, PublicRendezvousSeed: res.PublicRendezvousSeed, AccountPK: config.AccountPK, } link := id.GetBertyLink() - internal, web, err := link.Marshal() + + if req.Passphrase != nil && string(req.Passphrase) != "" { + link, err = bertylinks.EncryptLink(link, req.Passphrase) + if err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + } + + internal, web, err := bertylinks.MarshalLink(link) if err != nil { return nil, errcode.TODO.Wrap(err) } - ret := InstanceShareableBertyID_Reply{ + ret := messengertypes.InstanceShareableBertyID_Reply{ Link: link, InternalURL: internal, WebURL: web, @@ -110,13 +123,13 @@ func (svc *service) internalInstanceShareableBertyID(ctx context.Context, req *I return &ret, nil } -func (svc *service) ParseDeepLink(_ context.Context, req *ParseDeepLink_Request) (*ParseDeepLink_Reply, error) { +func (svc *service) ParseDeepLink(_ context.Context, req *messengertypes.ParseDeepLink_Request) (*messengertypes.ParseDeepLink_Reply, error) { if req == nil { return nil, errcode.ErrMissingInput } - ret := ParseDeepLink_Reply{} + ret := messengertypes.ParseDeepLink_Reply{} - link, err := UnmarshalLink(req.Link) + link, err := bertylinks.UnmarshalLink(req.Link, req.Passphrase) if err != nil { return nil, errcode.ErrMessengerInvalidDeepLink.Wrap(err) } @@ -125,32 +138,32 @@ func (svc *service) ParseDeepLink(_ context.Context, req *ParseDeepLink_Request) return &ret, nil } -func (svc *service) ShareableBertyGroup(ctx context.Context, request *ShareableBertyGroup_Request) (*ShareableBertyGroup_Reply, error) { - if request == nil { +func (svc *service) ShareableBertyGroup(ctx context.Context, req *messengertypes.ShareableBertyGroup_Request) (*messengertypes.ShareableBertyGroup_Reply, error) { + if req == nil { return nil, errcode.ErrInvalidInput } svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() - grpInfo, err := svc.protocolClient.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ - GroupPK: request.GroupPK, + grpInfo, err := svc.protocolClient.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ + GroupPK: req.GroupPK, }) if err != nil { return nil, err } - group := &BertyGroup{ + group := &messengertypes.BertyGroup{ Group: grpInfo.Group, - DisplayName: request.GroupName, + DisplayName: req.GroupName, } link := group.GetBertyLink() - internal, web, err := link.Marshal() + internal, web, err := bertylinks.MarshalLink(link) if err != nil { return nil, errcode.TODO.Wrap(err) } - rep := ShareableBertyGroup_Reply{ + rep := messengertypes.ShareableBertyGroup_Reply{ Link: link, InternalURL: internal, WebURL: web, @@ -159,7 +172,7 @@ func (svc *service) ShareableBertyGroup(ctx context.Context, request *ShareableB } // maybe we should preserve the previous generic api -func (svc *service) SendContactRequest(ctx context.Context, req *SendContactRequest_Request) (*SendContactRequest_Reply, error) { +func (svc *service) SendContactRequest(ctx context.Context, req *messengertypes.SendContactRequest_Request) (*messengertypes.SendContactRequest_Reply, error) { if req == nil || req.BertyID == nil || req.BertyID.AccountPK == nil || req.BertyID.PublicRendezvousSeed == nil { return nil, errcode.ErrMissingInput } @@ -167,8 +180,8 @@ func (svc *service) SendContactRequest(ctx context.Context, req *SendContactRequ svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() - contactRequest := bertytypes.ContactRequestSend_Request{ - Contact: &bertytypes.ShareableContact{ + contactRequest := protocoltypes.ContactRequestSend_Request{ + Contact: &protocoltypes.ShareableContact{ PK: req.BertyID.AccountPK, PublicRendezvousSeed: req.BertyID.PublicRendezvousSeed, Metadata: req.Metadata, @@ -182,7 +195,7 @@ func (svc *service) SendContactRequest(ctx context.Context, req *SendContactRequ go svc.autoReplicateContactGroupOnAllServers(req.BertyID.AccountPK) - return &SendContactRequest_Reply{}, nil + return &messengertypes.SendContactRequest_Reply{}, nil } func (svc *service) autoReplicateContactGroupOnAllServers(contactPK []byte) { @@ -191,7 +204,7 @@ func (svc *service) autoReplicateContactGroupOnAllServers(contactPK []byte) { return } - if _, err := svc.protocolClient.ActivateGroup(svc.ctx, &bertytypes.ActivateGroup_Request{ + if _, err := svc.protocolClient.ActivateGroup(svc.ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: groupPK, LocalOnly: false, }); err != nil { @@ -202,7 +215,7 @@ func (svc *service) autoReplicateContactGroupOnAllServers(contactPK []byte) { } func (svc *service) autoReplicateGroupOnAllServers(groupPK []byte) { - replicationServices := map[string]*ServiceToken{} + replicationServices := map[string]*messengertypes.ServiceToken{} acc, err := svc.db.getAccount() if err != nil { svc.logger.Error("unable to fetch account", zap.Error(err)) @@ -225,7 +238,7 @@ func (svc *service) autoReplicateGroupOnAllServers(groupPK []byte) { } for _, s := range replicationServices { - if _, err := svc.ReplicationServiceRegisterGroup(svc.ctx, &ReplicationServiceRegisterGroup_Request{ + if _, err := svc.ReplicationServiceRegisterGroup(svc.ctx, &messengertypes.ReplicationServiceRegisterGroup_Request{ TokenID: s.TokenID, ConversationPublicKey: b64EncodeBytes(groupPK), }); err != nil { @@ -234,17 +247,17 @@ func (svc *service) autoReplicateGroupOnAllServers(groupPK []byte) { } } -func (svc *service) SystemInfo(ctx context.Context, req *SystemInfo_Request) (*SystemInfo_Reply, error) { - reply := SystemInfo_Reply{} +func (svc *service) SystemInfo(ctx context.Context, req *messengertypes.SystemInfo_Request) (*messengertypes.SystemInfo_Reply, error) { + reply := messengertypes.SystemInfo_Reply{} var errs error // messenger's process - var process *bertytypes.SystemInfo_Process + var process *protocoltypes.SystemInfo_Process { var err error process, err = sysutil.SystemInfoProcess() errs = multierr.Append(errs, err) - reply.Messenger = &SystemInfo_Messenger{Process: process} + reply.Messenger = &messengertypes.SystemInfo_Messenger{Process: process} reply.Messenger.Process.StartedAt = svc.startedAt.Unix() reply.Messenger.Process.UptimeMS = time.Since(svc.startedAt).Milliseconds() } @@ -254,14 +267,14 @@ func (svc *service) SystemInfo(ctx context.Context, req *SystemInfo_Request) (*S dbInfo, err := svc.db.getDBInfo() if err != nil { errs = multierr.Append(errs, err) - reply.Messenger.DB = &SystemInfo_DB{} + reply.Messenger.DB = &messengertypes.SystemInfo_DB{} } else { reply.Messenger.DB = dbInfo } } // protocol - protocol, err := svc.protocolClient.SystemInfo(ctx, &bertytypes.SystemInfo_Request{}) + protocol, err := svc.protocolClient.SystemInfo(ctx, &protocoltypes.SystemInfo_Request{}) errs = multierr.Append(errs, err) reply.Protocol = protocol @@ -282,30 +295,30 @@ func (svc *service) SystemInfo(ctx context.Context, req *SystemInfo_Request) (*S return &reply, nil } -func (svc *service) SendAck(ctx context.Context, request *SendAck_Request) (*SendAck_Reply, error) { +func (svc *service) SendAck(ctx context.Context, req *messengertypes.SendAck_Request) (*messengertypes.SendAck_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() - gInfo, err := svc.protocolClient.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ - GroupPK: request.GroupPK, + gInfo, err := svc.protocolClient.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ + GroupPK: req.GroupPK, }) if err != nil { return nil, err } - if gInfo.Group.GroupType != bertytypes.GroupTypeContact { - return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("only %s groups are supported", bertytypes.GroupTypeContact.String())) + if gInfo.Group.GroupType != protocoltypes.GroupTypeContact { + return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("only %s groups are supported", protocoltypes.GroupTypeContact.String())) } - am, err := AppMessage_TypeAcknowledge.MarshalPayload(0, &AppMessage_Acknowledge{ - Target: b64EncodeBytes(request.MessageID), + am, err := messengertypes.AppMessage_TypeAcknowledge.MarshalPayload(0, nil, &messengertypes.AppMessage_Acknowledge{ + Target: b64EncodeBytes(req.MessageID), }) if err != nil { return nil, err } - _, err = svc.protocolClient.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{ - GroupPK: request.GroupPK, + _, err = svc.protocolClient.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{ + GroupPK: req.GroupPK, Payload: am, }) @@ -313,29 +326,29 @@ func (svc *service) SendAck(ctx context.Context, request *SendAck_Request) (*Sen return nil, err } - return &SendAck_Reply{}, nil + return &messengertypes.SendAck_Reply{}, nil } -func (svc *service) SendMessage(ctx context.Context, request *SendMessage_Request) (*SendMessage_Reply, error) { +func (svc *service) SendMessage(ctx context.Context, req *messengertypes.SendMessage_Request) (*messengertypes.SendMessage_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() - payload, err := AppMessage_TypeUserMessage.MarshalPayload(timestampMs(time.Now()), &AppMessage_UserMessage{ - Body: request.Message, + payload, err := messengertypes.AppMessage_TypeUserMessage.MarshalPayload(timestampMs(time.Now()), nil, &messengertypes.AppMessage_UserMessage{ + Body: req.Message, }) if err != nil { return nil, err } - _, err = svc.protocolClient.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{ - GroupPK: request.GroupPK, + _, err = svc.protocolClient.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{ + GroupPK: req.GroupPK, Payload: payload, }) - return &SendMessage_Reply{}, err + return &messengertypes.SendMessage_Reply{}, err } -func (svc *service) ConversationStream(req *ConversationStream_Request, sub MessengerService_ConversationStreamServer) error { +func (svc *service) ConversationStream(req *messengertypes.ConversationStream_Request, sub messengertypes.MessengerService_ConversationStreamServer) error { // TODO: cursors // send existing convs @@ -344,7 +357,7 @@ func (svc *service) ConversationStream(req *ConversationStream_Request, sub Mess return err } for _, c := range convs { - if err := sub.Send(&ConversationStream_Reply{Conversation: c}); err != nil { + if err := sub.Send(&messengertypes.ConversationStream_Reply{Conversation: c}); err != nil { return err } } @@ -356,13 +369,13 @@ func (svc *service) ConversationStream(req *ConversationStream_Request, sub Mess errch := make(chan error) defer close(errch) n := NotifieeBundle{ - StreamEventImpl: func(e *StreamEvent) error { - if e.Type == StreamEvent_TypeConversationUpdated { - var cu StreamEvent_ConversationUpdated + StreamEventImpl: func(e *messengertypes.StreamEvent) error { + if e.Type == messengertypes.StreamEvent_TypeConversationUpdated { + var cu messengertypes.StreamEvent_ConversationUpdated if err := proto.Unmarshal(e.GetPayload(), &cu); err != nil { errch <- err } - if err := sub.Send(&ConversationStream_Reply{Conversation: cu.GetConversation()}); err != nil { + if err := sub.Send(&messengertypes.ConversationStream_Reply{Conversation: cu.GetConversation()}); err != nil { errch <- err } } @@ -381,7 +394,7 @@ func (svc *service) ConversationStream(req *ConversationStream_Request, sub Mess } } -func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_EventStreamServer) error { +func (svc *service) EventStream(req *messengertypes.EventStream_Request, sub messengertypes.MessengerService_EventStreamServer) error { // TODO: cursors // send account @@ -391,11 +404,11 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E if err != nil { return err } - au, err := proto.Marshal(&StreamEvent_AccountUpdated{Account: acc}) + au, err := proto.Marshal(&messengertypes.StreamEvent_AccountUpdated{Account: acc}) if err != nil { return err } - if err := sub.Send(&EventStream_Reply{Event: &StreamEvent{StreamEvent_TypeAccountUpdated, au, false}}); err != nil { + if err := sub.Send(&messengertypes.EventStream_Reply{Event: &messengertypes.StreamEvent{Type: messengertypes.StreamEvent_TypeAccountUpdated, Payload: au, IsNew: false}}); err != nil { return err } } @@ -408,11 +421,11 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E } svc.logger.Info("sending existing contacts", zap.Int("count", len(contacts))) for _, contact := range contacts { - cu, err := proto.Marshal(&StreamEvent_ContactUpdated{Contact: contact}) + cu, err := proto.Marshal(&messengertypes.StreamEvent_ContactUpdated{Contact: contact}) if err != nil { return err } - if err := sub.Send(&EventStream_Reply{Event: &StreamEvent{StreamEvent_TypeContactUpdated, cu, false}}); err != nil { + if err := sub.Send(&messengertypes.EventStream_Reply{Event: &messengertypes.StreamEvent{Type: messengertypes.StreamEvent_TypeContactUpdated, Payload: cu, IsNew: false}}); err != nil { return err } } @@ -426,11 +439,11 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E } svc.logger.Debug("sending existing conversations", zap.Int("count", len(convs))) for _, conv := range convs { - cu, err := proto.Marshal(&StreamEvent_ConversationUpdated{Conversation: conv}) + cu, err := proto.Marshal(&messengertypes.StreamEvent_ConversationUpdated{Conversation: conv}) if err != nil { return err } - if err := sub.Send(&EventStream_Reply{Event: &StreamEvent{StreamEvent_TypeConversationUpdated, cu, false}}); err != nil { + if err := sub.Send(&messengertypes.EventStream_Reply{Event: &messengertypes.StreamEvent{Type: messengertypes.StreamEvent_TypeConversationUpdated, Payload: cu, IsNew: false}}); err != nil { return err } } @@ -444,11 +457,11 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E } svc.logger.Info("sending existing members", zap.Int("count", len(members))) for _, member := range members { - mu, err := proto.Marshal(&StreamEvent_MemberUpdated{Member: member}) + mu, err := proto.Marshal(&messengertypes.StreamEvent_MemberUpdated{Member: member}) if err != nil { return err } - if err := sub.Send(&EventStream_Reply{Event: &StreamEvent{StreamEvent_TypeMemberUpdated, mu, false}}); err != nil { + if err := sub.Send(&messengertypes.EventStream_Reply{Event: &messengertypes.StreamEvent{Type: messengertypes.StreamEvent_TypeMemberUpdated, Payload: mu, IsNew: false}}); err != nil { return err } } @@ -462,11 +475,29 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E } svc.logger.Info("sending existing interactions", zap.Int("count", len(interactions))) for _, inte := range interactions { - iu, err := proto.Marshal(&StreamEvent_InteractionUpdated{Interaction: inte}) + iu, err := proto.Marshal(&messengertypes.StreamEvent_InteractionUpdated{Interaction: inte}) + if err != nil { + return err + } + if err := sub.Send(&messengertypes.EventStream_Reply{Event: &messengertypes.StreamEvent{Type: messengertypes.StreamEvent_TypeInteractionUpdated, Payload: iu, IsNew: false}}); err != nil { + return err + } + } + } + + // send medias + { + medias, err := svc.db.getAllMedias() + if err != nil { + return err + } + svc.logger.Info("sending existing medias", zap.Int("count", len(medias))) + for _, media := range medias { + mu, err := proto.Marshal(&messengertypes.StreamEvent_MediaUpdated{Media: media}) if err != nil { return err } - if err := sub.Send(&EventStream_Reply{Event: &StreamEvent{StreamEvent_TypeInteractionUpdated, iu, false}}); err != nil { + if err := sub.Send(&messengertypes.EventStream_Reply{Event: &messengertypes.StreamEvent{Type: messengertypes.StreamEvent_TypeMediaUpdated, Payload: mu, IsNew: false}}); err != nil { return err } } @@ -474,11 +505,11 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E // signal that we're done sending existing models { - p, err := proto.Marshal(&StreamEvent_ListEnded{}) + p, err := proto.Marshal(&messengertypes.StreamEvent_ListEnded{}) if err != nil { return err } - if err := sub.Send(&EventStream_Reply{Event: &StreamEvent{StreamEvent_TypeListEnded, p, false}}); err != nil { + if err := sub.Send(&messengertypes.EventStream_Reply{Event: &messengertypes.StreamEvent{Type: messengertypes.StreamEvent_TypeListEnded, Payload: p, IsNew: false}}); err != nil { return err } } @@ -490,9 +521,9 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E { errch := make(chan error) defer close(errch) - n := NotifieeBundle{StreamEventImpl: func(e *StreamEvent) error { + n := NotifieeBundle{StreamEventImpl: func(e *messengertypes.StreamEvent) error { svc.logger.Debug("sending stream event", zap.String("type", e.GetType().String())) - err := sub.Send(&EventStream_Reply{Event: e}) + err := sub.Send(&messengertypes.EventStream_Reply{Event: e}) if err != nil { // next commmented line allows me to manually test the behavior on a send error. How to isolate into an automatic test? // errch <- errors.New("TEST ERROR") @@ -513,14 +544,14 @@ func (svc *service) EventStream(req *EventStream_Request, sub MessengerService_E } } -func (svc *service) ConversationCreate(ctx context.Context, req *ConversationCreate_Request) (*ConversationCreate_Reply, error) { +func (svc *service) ConversationCreate(ctx context.Context, req *messengertypes.ConversationCreate_Request) (*messengertypes.ConversationCreate_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() dn := req.GetDisplayName() // Create a multimember group - cr, err := svc.protocolClient.MultiMemberGroupCreate(ctx, &bertytypes.MultiMemberGroupCreate_Request{}) + cr, err := svc.protocolClient.MultiMemberGroupCreate(ctx, &protocoltypes.MultiMemberGroupCreate_Request{}) if err != nil { return nil, err } @@ -530,34 +561,34 @@ func (svc *service) ConversationCreate(ctx context.Context, req *ConversationCre // activate group { - _, err := svc.protocolClient.ActivateGroup(svc.ctx, &bertytypes.ActivateGroup_Request{GroupPK: pk}) + _, err := svc.protocolClient.ActivateGroup(svc.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: pk}) if err != nil { svc.logger.Warn("failed to activate group", zap.String("pk", pkStr)) } } - gir, err := svc.protocolClient.GroupInfo(ctx, &bertytypes.GroupInfo_Request{GroupPK: pk}) + gir, err := svc.protocolClient.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{GroupPK: pk}) if err != nil { return nil, errcode.TODO.Wrap(err) } - group := &BertyGroup{ + group := &messengertypes.BertyGroup{ Group: gir.GetGroup(), DisplayName: req.GetDisplayName(), } link := group.GetBertyLink() - _, webURL, err := link.Marshal() + _, webURL, err := bertylinks.MarshalLink(link) if err != nil { return nil, err } // Create new conversation - conv := &Conversation{ + conv := &messengertypes.Conversation{ AccountMemberPublicKey: b64EncodeBytes(gir.GetMemberPK()), PublicKey: pkStr, DisplayName: dn, Link: webURL, - Type: Conversation_MultiMemberType, + Type: messengertypes.Conversation_MultiMemberType, LocalDevicePublicKey: b64EncodeBytes(gir.GetDevicePK()), CreatedDate: timestampMs(time.Now()), } @@ -570,7 +601,7 @@ func (svc *service) ConversationCreate(ctx context.Context, req *ConversationCre // Dispatch new conversation { - err := svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conv}, isNew) + err := svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conv}, isNew) if err != nil { svc.logger.Error("failed to dispatch ConversationUpdated event", zap.Error(err)) } @@ -579,12 +610,12 @@ func (svc *service) ConversationCreate(ctx context.Context, req *ConversationCre // Try to put group name in group metadata { err := func() error { - am, err := AppMessage_TypeSetGroupInfo.MarshalPayload(0, &AppMessage_SetGroupInfo{DisplayName: dn}) + am, err := messengertypes.AppMessage_TypeSetGroupInfo.MarshalPayload(0, nil, &messengertypes.AppMessage_SetGroupInfo{DisplayName: dn}) if err != nil { return err } - _, err = svc.protocolClient.AppMetadataSend(ctx, &bertytypes.AppMetadataSend_Request{GroupPK: pk, Payload: am}) + _, err = svc.protocolClient.AppMetadataSend(ctx, &protocoltypes.AppMetadataSend_Request{GroupPK: pk, Payload: am}) return err }() if err != nil { @@ -602,7 +633,7 @@ func (svc *service) ConversationCreate(ctx context.Context, req *ConversationCre } for _, contactPK := range req.GetContactsToInvite() { - am, err := AppMessage_TypeGroupInvitation.MarshalPayload(timestampMs(time.Now()), &AppMessage_GroupInvitation{Link: conv.GetLink()}) + am, err := messengertypes.AppMessage_TypeGroupInvitation.MarshalPayload(timestampMs(time.Now()), nil, &messengertypes.AppMessage_GroupInvitation{Link: conv.GetLink()}) if err != nil { return nil, err } @@ -610,11 +641,11 @@ func (svc *service) ConversationCreate(ctx context.Context, req *ConversationCre if err != nil { return nil, err } - ginfo, err := svc.protocolClient.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ContactPK: cpkb}) + ginfo, err := svc.protocolClient.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ContactPK: cpkb}) if err != nil { return nil, err } - _, err = svc.protocolClient.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{GroupPK: ginfo.GetGroup().GetPublicKey(), Payload: am}) + _, err = svc.protocolClient.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{GroupPK: ginfo.GetGroup().GetPublicKey(), Payload: am}) if err != nil { return nil, err } @@ -622,17 +653,17 @@ func (svc *service) ConversationCreate(ctx context.Context, req *ConversationCre go svc.autoReplicateGroupOnAllServers(pk) - rep := ConversationCreate_Reply{PublicKey: pkStr} + rep := messengertypes.ConversationCreate_Reply{PublicKey: pkStr} return &rep, nil } -func (svc *service) ConversationJoin(ctx context.Context, req *ConversationJoin_Request) (*ConversationJoin_Reply, error) { +func (svc *service) ConversationJoin(ctx context.Context, req *messengertypes.ConversationJoin_Request) (*messengertypes.ConversationJoin_Reply, error) { url := req.GetLink() if url == "" { return nil, errcode.ErrMissingInput } - link, err := UnmarshalLink(url) + link, err := bertylinks.UnmarshalLink(url, req.Passphrase) if err != nil { return nil, errcode.ErrMessengerInvalidDeepLink.Wrap(err) } @@ -646,7 +677,7 @@ func (svc *service) ConversationJoin(ctx context.Context, req *ConversationJoin_ bgroup := link.GetBertyGroup() gpkb := bgroup.GetGroup().GetPublicKey() - mmgjReq := &bertytypes.MultiMemberGroupJoin_Request{Group: bgroup.GetGroup()} + mmgjReq := &protocoltypes.MultiMemberGroupJoin_Request{Group: bgroup.GetGroup()} if _, err := svc.protocolClient.MultiMemberGroupJoin(ctx, mmgjReq); err != nil { // Rollback db ? return nil, errcode.TODO.Wrap(err) @@ -654,23 +685,23 @@ func (svc *service) ConversationJoin(ctx context.Context, req *ConversationJoin_ // activate group { - _, err := svc.protocolClient.ActivateGroup(svc.ctx, &bertytypes.ActivateGroup_Request{GroupPK: gpkb}) + _, err := svc.protocolClient.ActivateGroup(svc.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: gpkb}) if err != nil { svc.logger.Warn("failed to activate group", zap.String("pk", b64EncodeBytes(gpkb))) } } - gir, err := svc.protocolClient.GroupInfo(ctx, &bertytypes.GroupInfo_Request{GroupPK: gpkb}) + gir, err := svc.protocolClient.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{GroupPK: gpkb}) if err != nil { return nil, errcode.TODO.Wrap(err) } - conv := Conversation{ + conv := messengertypes.Conversation{ AccountMemberPublicKey: b64EncodeBytes(gir.GetMemberPK()), PublicKey: b64EncodeBytes(gpkb), DisplayName: bgroup.GetDisplayName(), Link: url, - Type: Conversation_MultiMemberType, + Type: messengertypes.Conversation_MultiMemberType, LocalDevicePublicKey: b64EncodeBytes(gir.GetDevicePK()), CreatedDate: timestampMs(time.Now()), } @@ -683,7 +714,7 @@ func (svc *service) ConversationJoin(ctx context.Context, req *ConversationJoin_ // dispatch event { - err := svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{Conversation: &conv}, isNew) + err := svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: &conv}, isNew) if err != nil { return nil, errcode.ErrInternal.Wrap(err) } @@ -696,7 +727,7 @@ func (svc *service) ConversationJoin(ctx context.Context, req *ConversationJoin_ } } - return &ConversationJoin_Reply{}, nil + return &messengertypes.ConversationJoin_Reply{}, nil } func ensureValidBase64CID(str string) error { @@ -713,7 +744,7 @@ func ensureValidBase64CID(str string) error { return nil } -func (svc *service) AccountUpdate(ctx context.Context, req *AccountUpdate_Request) (*AccountUpdate_Reply, error) { +func (svc *service) AccountUpdate(ctx context.Context, req *messengertypes.AccountUpdate_Request) (*messengertypes.AccountUpdate_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() @@ -748,7 +779,7 @@ func (svc *service) AccountUpdate(ctx context.Context, req *AccountUpdate_Reques } svc.logger.Debug("AccountUpdate: updating account", zap.String("display_name", dn), zap.String("avatar_cid", avatarCID)) - ret, err := svc.internalInstanceShareableBertyID(ctx, &InstanceShareableBertyID_Request{DisplayName: dn}) + ret, err := svc.internalInstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{DisplayName: dn}) if err != nil { svc.logger.Error("AccountUpdate: account link", zap.Error(err)) return err @@ -761,7 +792,7 @@ func (svc *service) AccountUpdate(ctx context.Context, req *AccountUpdate_Reques } // dispatch event - err = svc.dispatcher.StreamEvent(StreamEvent_TypeAccountUpdated, &StreamEvent_AccountUpdated{Account: acc}, false) + err = svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeAccountUpdated, &messengertypes.StreamEvent_AccountUpdated{Account: acc}, false) if err != nil { svc.logger.Error("AccountUpdate: failed to dispatch update", zap.Error(err)) return err @@ -785,18 +816,11 @@ func (svc *service) AccountUpdate(ctx context.Context, req *AccountUpdate_Reques } svc.logger.Debug("AccountUpdate finished", zap.Error(err)) - return &AccountUpdate_Reply{}, err + return &messengertypes.AccountUpdate_Reply{}, err } -func imin(a, b int) int { - if b < a { - return b - } - return a -} - -func (svc *service) ContactRequest(ctx context.Context, req *ContactRequest_Request) (*ContactRequest_Reply, error) { - link, err := UnmarshalLink(req.GetLink()) +func (svc *service) ContactRequest(ctx context.Context, req *messengertypes.ContactRequest_Request) (*messengertypes.ContactRequest_Reply, error) { + link, err := bertylinks.UnmarshalLink(req.GetLink(), req.Passphrase) if err != nil { return nil, errcode.ErrMessengerInvalidDeepLink.Wrap(err) } @@ -811,18 +835,18 @@ func (svc *service) ContactRequest(ctx context.Context, req *ContactRequest_Requ if err != nil { return nil, errcode.TODO.Wrap(err) } - om, err := proto.Marshal(&ContactMetadata{DisplayName: acc.GetDisplayName()}) + om, err := proto.Marshal(&messengertypes.ContactMetadata{DisplayName: acc.GetDisplayName()}) if err != nil { return nil, errcode.ErrInternal.Wrap(err) } - m, err := proto.Marshal(&ContactMetadata{DisplayName: link.BertyID.GetDisplayName()}) + m, err := proto.Marshal(&messengertypes.ContactMetadata{DisplayName: link.BertyID.GetDisplayName()}) if err != nil { return nil, errcode.ErrInternal.Wrap(err) } - contactRequest := bertytypes.ContactRequestSend_Request{ - Contact: &bertytypes.ShareableContact{ + contactRequest := protocoltypes.ContactRequestSend_Request{ + Contact: &protocoltypes.ShareableContact{ PK: link.BertyID.GetAccountPK(), PublicRendezvousSeed: link.BertyID.GetPublicRendezvousSeed(), Metadata: m, @@ -836,10 +860,10 @@ func (svc *service) ContactRequest(ctx context.Context, req *ContactRequest_Requ go svc.autoReplicateContactGroupOnAllServers(contactRequest.Contact.PK) - return &ContactRequest_Reply{}, nil + return &messengertypes.ContactRequest_Reply{}, nil } -func (svc *service) ContactAccept(ctx context.Context, req *ContactAccept_Request) (*ContactAccept_Reply, error) { +func (svc *service) ContactAccept(ctx context.Context, req *messengertypes.ContactAccept_Request) (*messengertypes.ContactAccept_Reply, error) { pk := req.GetPublicKey() if pk == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("no public key supplied")) @@ -860,21 +884,21 @@ func (svc *service) ContactAccept(ctx context.Context, req *ContactAccept_Reques return nil, errcode.TODO.Wrap(err) } - if c.State != Contact_IncomingRequest { + if c.State != messengertypes.Contact_IncomingRequest { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("contact request status is not IncomingRequest %s)", c.State.String())) } - _, err = svc.protocolClient.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ContactPK: pkb}) + _, err = svc.protocolClient.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ContactPK: pkb}) if err != nil { return nil, errcode.TODO.Wrap(err) } go svc.autoReplicateContactGroupOnAllServers(pkb) - return &ContactAccept_Reply{}, nil + return &messengertypes.ContactAccept_Reply{}, nil } -func (svc *service) Interact(ctx context.Context, req *Interact_Request) (*Interact_Reply, error) { +func (svc *service) Interact(ctx context.Context, req *messengertypes.Interact_Request) (*messengertypes.Interact_Reply, error) { gpk := req.GetConversationPublicKey() if gpk == "" { return nil, errcode.ErrMissingInput @@ -890,26 +914,37 @@ func (svc *service) Interact(ctx context.Context, req *Interact_Request) (*Inter defer svc.handlerMutex.Unlock() switch req.GetType() { - case AppMessage_TypeUserMessage: - var p AppMessage_UserMessage + case messengertypes.AppMessage_TypeUserMessage: + var p messengertypes.AppMessage_UserMessage if err := proto.Unmarshal(req.GetPayload(), &p); err != nil { return nil, errcode.ErrInvalidInput.Wrap(err) } - fp, err := AppMessage_TypeUserMessage.MarshalPayload(timestampMs(time.Now()), &p) + medias, err := svc.db.getMedias(req.GetMediaCids()) + if err != nil { + return nil, errcode.ErrDBRead.Wrap(err) + } + fp, err := messengertypes.AppMessage_TypeUserMessage.MarshalPayload(timestampMs(time.Now()), medias, &p) if err != nil { return nil, errcode.ErrInternal.Wrap(err) } - _, err = svc.protocolClient.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{GroupPK: gpkb, Payload: fp}) + cids := make([][]byte, len(req.GetMediaCids())) + for i, mediaCID := range req.GetMediaCids() { + cids[i], err = b64DecodeBytes(mediaCID) + if err != nil { + return nil, errcode.ErrDeserialization.Wrap(err) + } + } + _, err = svc.protocolClient.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{GroupPK: gpkb, Payload: fp, AttachmentCIDs: cids}) if err != nil { return nil, err } - case AppMessage_TypeAcknowledge: + case messengertypes.AppMessage_TypeAcknowledge: // trick gocritic } - return &Interact_Reply{}, nil + return &messengertypes.Interact_Reply{}, nil } -func (svc *service) AccountGet(ctx context.Context, req *AccountGet_Request) (*AccountGet_Reply, error) { +func (svc *service) AccountGet(ctx context.Context, req *messengertypes.AccountGet_Request) (*messengertypes.AccountGet_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() @@ -917,12 +952,12 @@ func (svc *service) AccountGet(ctx context.Context, req *AccountGet_Request) (*A if err != nil { return nil, err } - return &AccountGet_Reply{Account: acc}, nil + return &messengertypes.AccountGet_Reply{Account: acc}, nil } -func (svc *service) EchoTest(req *EchoTest_Request, srv MessengerService_EchoTestServer) error { +func (svc *service) EchoTest(req *messengertypes.EchoTest_Request, srv messengertypes.MessengerService_EchoTestServer) error { for { - err := srv.Send(&EchoTest_Reply{Echo: req.Echo}) + err := srv.Send(&messengertypes.EchoTest_Reply{Echo: req.Echo}) if err != nil { return err } @@ -931,13 +966,13 @@ func (svc *service) EchoTest(req *EchoTest_Request, srv MessengerService_EchoTes } } -func (svc *service) ConversationOpen(ctx context.Context, req *ConversationOpen_Request) (*ConversationOpen_Reply, error) { +func (svc *service) ConversationOpen(ctx context.Context, req *messengertypes.ConversationOpen_Request) (*messengertypes.ConversationOpen_Reply, error) { // check input if req.GroupPK == "" { return nil, errcode.ErrMissingInput } - ret := ConversationOpen_Reply{} + ret := messengertypes.ConversationOpen_Reply{} conv, updated, err := svc.db.setConversationIsOpenStatus(req.GetGroupPK(), true) @@ -947,20 +982,20 @@ func (svc *service) ConversationOpen(ctx context.Context, req *ConversationOpen_ return &ret, nil } - if err := svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conv}, false); err != nil { + if err := svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conv}, false); err != nil { return nil, errcode.TODO.Wrap(err) } return &ret, nil } -func (svc *service) ConversationClose(ctx context.Context, req *ConversationClose_Request) (*ConversationClose_Reply, error) { +func (svc *service) ConversationClose(ctx context.Context, req *messengertypes.ConversationClose_Request) (*messengertypes.ConversationClose_Reply, error) { // check input if req.GroupPK == "" { return nil, errcode.ErrMissingInput } - ret := ConversationClose_Reply{} + ret := messengertypes.ConversationClose_Reply{} conv, updated, err := svc.db.setConversationIsOpenStatus(req.GetGroupPK(), false) @@ -970,7 +1005,7 @@ func (svc *service) ConversationClose(ctx context.Context, req *ConversationClos return &ret, nil } - if err := svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conv}, false); err != nil { + if err := svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conv}, false); err != nil { return nil, errcode.TODO.Wrap(err) } @@ -978,8 +1013,8 @@ func (svc *service) ConversationClose(ctx context.Context, req *ConversationClos return &ret, nil } -func (svc *service) ServicesTokenList(request *bertytypes.ServicesTokenList_Request, server MessengerService_ServicesTokenListServer) error { - cl, err := svc.protocolClient.ServicesTokenList(server.Context(), request) +func (svc *service) ServicesTokenList(req *protocoltypes.ServicesTokenList_Request, server messengertypes.MessengerService_ServicesTokenListServer) error { + cl, err := svc.protocolClient.ServicesTokenList(server.Context(), req) if err != nil { return err } @@ -1004,8 +1039,8 @@ func (svc *service) ServicesTokenList(request *bertytypes.ServicesTokenList_Requ return nil } -func (svc *service) ReplicationServiceRegisterGroup(ctx context.Context, request *ReplicationServiceRegisterGroup_Request) (*ReplicationServiceRegisterGroup_Reply, error) { - gpk := request.GetConversationPublicKey() +func (svc *service) ReplicationServiceRegisterGroup(ctx context.Context, req *messengertypes.ReplicationServiceRegisterGroup_Request) (*messengertypes.ReplicationServiceRegisterGroup_Reply, error) { + gpk := req.GetConversationPublicKey() if gpk == "" { return nil, errcode.ErrMissingInput } @@ -1017,65 +1052,65 @@ func (svc *service) ReplicationServiceRegisterGroup(ctx context.Context, request return nil, errcode.ErrInvalidInput.Wrap(err) } - _, err = svc.protocolClient.ReplicationServiceRegisterGroup(ctx, &bertytypes.ReplicationServiceRegisterGroup_Request{ - TokenID: request.TokenID, + _, err = svc.protocolClient.ReplicationServiceRegisterGroup(ctx, &protocoltypes.ReplicationServiceRegisterGroup_Request{ + TokenID: req.TokenID, GroupPK: gpkb, }) if err != nil { - svc.logger.Error("failed to replicate group", zap.String("public-key", gpk), zap.String("token-id", request.TokenID), zap.Error(err)) + svc.logger.Error("failed to replicate group", zap.String("public-key", gpk), zap.String("token-id", req.TokenID), zap.Error(err)) return nil, err } - svc.logger.Info("replicating group", zap.String("public-key", gpk), zap.String("token-id", request.TokenID), zap.Error(err)) + svc.logger.Info("replicating group", zap.String("public-key", gpk), zap.String("token-id", req.TokenID), zap.Error(err)) - return &ReplicationServiceRegisterGroup_Reply{}, nil + return &messengertypes.ReplicationServiceRegisterGroup_Reply{}, nil } -func (svc *service) BannerQuote(ctx context.Context, request *BannerQuote_Request) (*BannerQuote_Reply, error) { +func (svc *service) BannerQuote(ctx context.Context, req *messengertypes.BannerQuote_Request) (*messengertypes.BannerQuote_Reply, error) { var quote banner.Quote - if request != nil && request.Random { + if req != nil && req.Random { quote = banner.RandomQuote() } else { quote = banner.QOTD() } - ret := BannerQuote_Reply{ + ret := messengertypes.BannerQuote_Reply{ Quote: quote.Text, Author: quote.Author, } return &ret, nil } -func (svc *service) GetUsername(ctx context.Context, request *GetUsername_Request) (*GetUsername_Reply, error) { - return &GetUsername_Reply{ +func (svc *service) GetUsername(ctx context.Context, req *messengertypes.GetUsername_Request) (*messengertypes.GetUsername_Reply, error) { + return &messengertypes.GetUsername_Reply{ Username: username.GetUsername(), }, nil } -func (svc *service) SendReplyOptions(ctx context.Context, request *SendReplyOptions_Request) (*SendReplyOptions_Reply, error) { +func (svc *service) SendReplyOptions(ctx context.Context, req *messengertypes.SendReplyOptions_Request) (*messengertypes.SendReplyOptions_Reply, error) { svc.handlerMutex.Lock() defer svc.handlerMutex.Unlock() - payload, err := AppMessage_TypeReplyOptions.MarshalPayload(timestampMs(time.Now()), request.Options) + payload, err := messengertypes.AppMessage_TypeReplyOptions.MarshalPayload(timestampMs(time.Now()), nil, req.Options) if err != nil { return nil, err } - _, err = svc.protocolClient.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{ - GroupPK: request.GroupPK, + _, err = svc.protocolClient.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{ + GroupPK: req.GroupPK, Payload: payload, }) - return &SendReplyOptions_Reply{}, err + return &messengertypes.SendReplyOptions_Reply{}, err } -func (svc *service) ReplicationSetAutoEnable(ctx context.Context, request *ReplicationSetAutoEnable_Request) (*ReplicationSetAutoEnable_Reply, error) { - config, err := svc.protocolClient.InstanceGetConfiguration(svc.ctx, &bertytypes.InstanceGetConfiguration_Request{}) +func (svc *service) ReplicationSetAutoEnable(ctx context.Context, req *messengertypes.ReplicationSetAutoEnable_Request) (*messengertypes.ReplicationSetAutoEnable_Reply, error) { + config, err := svc.protocolClient.InstanceGetConfiguration(svc.ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return nil, err } - if err := svc.db.accountSetReplicationAutoEnable(b64EncodeBytes(config.AccountPK), request.Enabled); err != nil { + if err := svc.db.accountSetReplicationAutoEnable(b64EncodeBytes(config.AccountPK), req.Enabled); err != nil { return nil, err } @@ -1085,14 +1120,14 @@ func (svc *service) ReplicationSetAutoEnable(ctx context.Context, request *Repli } // dispatch event - if err := svc.dispatcher.StreamEvent(StreamEvent_TypeAccountUpdated, &StreamEvent_AccountUpdated{Account: acc}, false); err != nil { + if err := svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeAccountUpdated, &messengertypes.StreamEvent_AccountUpdated{Account: acc}, false); err != nil { return nil, errcode.TODO.Wrap(err) } - return &ReplicationSetAutoEnable_Reply{}, nil + return &messengertypes.ReplicationSetAutoEnable_Reply{}, nil } -func (svc *service) InstanceExportData(_ *InstanceExportData_Request, server MessengerService_InstanceExportDataServer) error { +func (svc *service) InstanceExportData(_ *messengertypes.InstanceExportData_Request, server messengertypes.MessengerService_InstanceExportDataServer) error { tmpFile, err := ioutil.TempFile(os.TempDir(), "export-") if err != nil { return errcode.ErrInternal.Wrap(err) @@ -1100,7 +1135,7 @@ func (svc *service) InstanceExportData(_ *InstanceExportData_Request, server Mes defer os.Remove(tmpFile.Name()) - cl, err := svc.protocolClient.InstanceExportData(server.Context(), &bertytypes.InstanceExportData_Request{}) + cl, err := svc.protocolClient.InstanceExportData(server.Context(), &protocoltypes.InstanceExportData_Request{}) if err != nil { return errcode.ErrInternal.Wrap(err) } @@ -1144,8 +1179,121 @@ func (svc *service) InstanceExportData(_ *InstanceExportData_Request, server Mes return errcode.ErrInternal.Wrap(err) } - if err := server.Send(&InstanceExportData_Reply{ExportedData: buffer}); err != nil { + if err := server.Send(&messengertypes.InstanceExportData_Reply{ExportedData: buffer}); err != nil { + return errcode.ErrInternal.Wrap(err) + } + } +} + +func (svc *service) MediaPrepare(srv messengertypes.MessengerService_MediaPrepareServer) error { + // read header + header, err := srv.Recv() + if err != nil { + return errcode.ErrStreamHeaderRead.Wrap(err) + } + if len(header.GetBlock()) > 0 { + return errcode.ErrInvalidInput.Wrap(fmt.Errorf("expected empty block, got %v bytes", len(header.GetBlock()))) + } + if header.GetInfo() == nil { + return errcode.ErrInvalidInput.Wrap(errors.New("nil info")) + } + + var file io.ReadCloser + if header.GetUri() != "" { + // open uri file + path := header.GetUri() + u, err := url.Parse(header.GetUri()) + if err == nil && u.Scheme == "file" { + path = u.Path + } + file, err = os.Open(path) + if err != nil { + return errcode.ErrInvalidInput.Wrap(err) + } + } else { + // open requests reader + file = streamutil.FuncReader(func() ([]byte, error) { + req, err := srv.Recv() + return req.GetBlock(), err + }, svc.logger) + } + defer file.Close() + + // upload media and get cid in return + cidBytes, err := svc.attachmentPrepare(file) + if err != nil { + return errcode.ErrAttachmentPrepare.Wrap(err) + } + cid := b64EncodeBytes(cidBytes) + + svc.handlerMutex.Lock() + defer svc.handlerMutex.Unlock() + + return svc.db.tx(func(tx *dbWrapper) error { + // add to db + media := *header.Info + media.CID = cid + media.State = messengertypes.Media_StatePrepared + added, err := tx.addMedias([]*messengertypes.Media{&media}) + if err != nil { + return errcode.ErrDBWrite.Wrap(err) + } + + // dispatch event if new + if added[0] { + if err := svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeMediaUpdated, &messengertypes.StreamEvent_MediaUpdated{Media: &media}, true); err != nil { + svc.logger.Error("unable to dispatch notification for media", zap.String("cid", media.CID), zap.Error(err)) + } + } + + // reply + if err := srv.SendAndClose(&messengertypes.MediaPrepare_Reply{Cid: cid}); err != nil { + return errcode.ErrStreamSendAndClose.Wrap(err) + } + + // success + return nil + }) +} + +func (svc *service) MediaRetrieve(req *messengertypes.MediaRetrieve_Request, srv messengertypes.MessengerService_MediaRetrieveServer) error { + var attachment *io.PipeReader + if err := func() error { + svc.handlerMutex.Lock() + defer svc.handlerMutex.Unlock() + + // prepare header + medias, err := svc.db.getMedias([]string{req.GetCid()}) + if err != nil { + return errcode.ErrInvalidInput.Wrap(err) + } + if len(medias) == 0 { return errcode.ErrInternal.Wrap(err) } + media := medias[0] + + // send header + if err := srv.Send(&messengertypes.MediaRetrieve_Reply{Info: media}); err != nil { + return errcode.ErrStreamHeaderWrite.Wrap(err) + } + + // open download + if attachment, err = svc.attachmentRetrieve(req.GetCid()); err != nil { + return errcode.ErrAttachmentRetrieve.Wrap(err) + } + return nil + }(); err != nil { + return err } + defer attachment.Close() + + // stream to client + if err := streamutil.FuncSink(make([]byte, 64*1024), attachment, func(b []byte) error { + return srv.Send(&messengertypes.MediaRetrieve_Reply{Block: b}) + }); err != nil { + return errcode.ErrStreamSink.Wrap(err) + } + + // success + return nil } diff --git a/go/pkg/bertymessenger/api_test.go b/go/pkg/bertymessenger/api_test.go index 8525e4623b..26a9184497 100644 --- a/go/pkg/bertymessenger/api_test.go +++ b/go/pkg/bertymessenger/api_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "berty.tech/berty/v2/go/internal/bertylinks" "berty.tech/berty/v2/go/internal/testutil" "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestServiceInstanceShareableBertyID(t *testing.T) { @@ -29,19 +31,19 @@ func TestServiceInstanceShareableBertyID(t *testing.T) { testParseInstanceShareable(ctx, t, svc, ret1) assert.Equal(t, ret1.Link.BertyID.DisplayName, "") - ret2, err := svc.InstanceShareableBertyID(ctx, &InstanceShareableBertyID_Request{}) + ret2, err := svc.InstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{}) require.NoError(t, err) testParseInstanceShareable(ctx, t, svc, ret2) assert.Equal(t, ret2.Link.BertyID.DisplayName, "") assert.Equal(t, ret1, ret2) - ret3, err := svc.InstanceShareableBertyID(ctx, &InstanceShareableBertyID_Request{DisplayName: "Hello World! 👋"}) + ret3, err := svc.InstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{DisplayName: "Hello World! 👋"}) require.NoError(t, err) testParseInstanceShareable(ctx, t, svc, ret3) assert.Equal(t, ret3.Link.BertyID.DisplayName, "Hello World! 👋") assert.NotEqual(t, ret2.Link.BertyID, ret3.Link.BertyID) - ret4, err := svc.InstanceShareableBertyID(ctx, &InstanceShareableBertyID_Request{Reset_: true}) + ret4, err := svc.InstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{Reset_: true}) require.NoError(t, err) testParseInstanceShareable(ctx, t, svc, ret4) assert.Equal(t, ret4.Link.BertyID.DisplayName, "") @@ -54,7 +56,7 @@ func TestServiceInstanceShareableBertyID(t *testing.T) { assert.Equal(t, ret4, ret5) } -func testParseInstanceShareable(ctx context.Context, t *testing.T, svc MessengerServiceServer, ret *InstanceShareableBertyID_Reply) { +func testParseInstanceShareable(ctx context.Context, t *testing.T, svc messengertypes.MessengerServiceServer, ret *messengertypes.InstanceShareableBertyID_Reply) { t.Helper() assert.NotEmpty(t, ret.Link.BertyID) assert.NotEmpty(t, ret.Link.BertyID.PublicRendezvousSeed) @@ -63,9 +65,9 @@ func testParseInstanceShareable(ctx context.Context, t *testing.T, svc Messenger assert.NotEmpty(t, ret.InternalURL) assert.NotEqual(t, ret.WebURL, ret.InternalURL) - parsed1, err := svc.ParseDeepLink(ctx, &ParseDeepLink_Request{Link: ret.InternalURL}) + parsed1, err := svc.ParseDeepLink(ctx, &messengertypes.ParseDeepLink_Request{Link: ret.InternalURL}) require.NoError(t, err) - parsed2, err := svc.ParseDeepLink(ctx, &ParseDeepLink_Request{Link: ret.WebURL}) + parsed2, err := svc.ParseDeepLink(ctx, &messengertypes.ParseDeepLink_Request{Link: ret.WebURL}) require.NoError(t, err) assert.Equal(t, parsed1, parsed2) @@ -77,22 +79,22 @@ func testParseInstanceShareable(ctx context.Context, t *testing.T, svc Messenger func TestServiceParseDeepLink(t *testing.T) { tests := []struct { name string - request *ParseDeepLink_Request + request *messengertypes.ParseDeepLink_Request expectedErrcode error expectedValidID bool expectedName bool }{ {"nil", nil, errcode.ErrMissingInput, false, false}, - {"empty", &ParseDeepLink_Request{}, errcode.ErrMessengerInvalidDeepLink, false, false}, - {"invalid", &ParseDeepLink_Request{Link: "foobar"}, errcode.ErrMessengerInvalidDeepLink, false, false}, - {"invalid2", &ParseDeepLink_Request{Link: "BERTY://FOOBAR"}, errcode.ErrMessengerInvalidDeepLink, false, false}, - {"invalid2", &ParseDeepLink_Request{Link: "berty://foobar"}, errcode.ErrMessengerInvalidDeepLink, false, false}, - {"invalid3", &ParseDeepLink_Request{Link: "https://berty.tech/id#foobar"}, errcode.ErrMessengerInvalidDeepLink, false, false}, - {"internal", &ParseDeepLink_Request{Link: "BERTY://" + validContactInternalBlob}, nil, true, true}, - {"internal-2", &ParseDeepLink_Request{Link: "berty://" + validContactInternalBlob}, nil, true, true}, - {"weburl", &ParseDeepLink_Request{Link: "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice"}, nil, true, true}, - {"weburl-noname", &ParseDeepLink_Request{Link: "https://berty.tech/id#contact/" + validContactBlob}, nil, true, false}, - {"test-real-case", &ParseDeepLink_Request{Link: "https://berty.tech/id#contact/oZBLEm2jFndwNvX9yQTVqcMkVuuJQYMoU1XQsmxhS9Q1n1L9npGFVhrFitqR9p8Wgd8Kf3sTLdLoQxKDmr3aK2pP9humsHz/name=moul+%28cli%29"}, nil, true, true}, + {"empty", &messengertypes.ParseDeepLink_Request{}, errcode.ErrMessengerInvalidDeepLink, false, false}, + {"invalid", &messengertypes.ParseDeepLink_Request{Link: "foobar"}, errcode.ErrMessengerInvalidDeepLink, false, false}, + {"invalid2", &messengertypes.ParseDeepLink_Request{Link: "BERTY://FOOBAR"}, errcode.ErrMessengerInvalidDeepLink, false, false}, + {"invalid2", &messengertypes.ParseDeepLink_Request{Link: "berty://foobar"}, errcode.ErrMessengerInvalidDeepLink, false, false}, + {"invalid3", &messengertypes.ParseDeepLink_Request{Link: "https://berty.tech/id#foobar"}, errcode.ErrMessengerInvalidDeepLink, false, false}, + {"internal", &messengertypes.ParseDeepLink_Request{Link: "BERTY://PB/" + validContactInternalBlob}, nil, true, true}, + {"internal-2", &messengertypes.ParseDeepLink_Request{Link: "berty://pb/" + validContactInternalBlob}, nil, true, true}, + {"weburl", &messengertypes.ParseDeepLink_Request{Link: "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice"}, nil, true, true}, + {"weburl-noname", &messengertypes.ParseDeepLink_Request{Link: "https://berty.tech/id#contact/" + validContactBlob}, nil, true, false}, + {"test-real-case", &messengertypes.ParseDeepLink_Request{Link: "https://berty.tech/id#contact/oZBLEm2jFndwNvX9yQTVqcMkVuuJQYMoU1XQsmxhS9Q1n1L9npGFVhrFitqR9p8Wgd8Kf3sTLdLoQxKDmr3aK2pP9humsHz/name=moul+%28cli%29"}, nil, true, true}, } for _, tt := range tests { @@ -139,14 +141,14 @@ func TestServiceSendContactRequest(t *testing.T) { assert.Equal(t, errcode.Code(err), errcode.ErrMissingInput) assert.Nil(t, ret) - ret, err = svc.SendContactRequest(ctx, &SendContactRequest_Request{}) + ret, err = svc.SendContactRequest(ctx, &messengertypes.SendContactRequest_Request{}) assert.Equal(t, errcode.Code(err), errcode.ErrMissingInput) assert.Nil(t, ret) - parseRet, err := svc.ParseDeepLink(ctx, &ParseDeepLink_Request{Link: "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice"}) + parseRet, err := svc.ParseDeepLink(ctx, &messengertypes.ParseDeepLink_Request{Link: "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice"}) require.NoError(t, err) - ret, err = svc.SendContactRequest(ctx, &SendContactRequest_Request{BertyID: parseRet.Link.BertyID}) + ret, err = svc.SendContactRequest(ctx, &messengertypes.SendContactRequest_Request{BertyID: parseRet.Link.BertyID}) require.NoError(t, err) assert.NotNil(t, ret) } @@ -174,14 +176,14 @@ func TestSystemInfo(t *testing.T) { assert.True(t, ret.Messenger.ProtocolInSameProcess) } -func testParseSharedGroup(t *testing.T, g *bertytypes.Group, name string, ret *ShareableBertyGroup_Reply) { +func testParseSharedGroup(t *testing.T, g *protocoltypes.Group, name string, ret *messengertypes.ShareableBertyGroup_Reply) { t.Helper() - group := &BertyGroup{ + group := &messengertypes.BertyGroup{ Group: g, DisplayName: name, } link := group.GetBertyLink() - internal, web, err := link.Marshal() + internal, web, err := bertylinks.MarshalLink(link) assert.NoError(t, err) assert.Equal(t, internal, ret.InternalURL) @@ -215,7 +217,7 @@ func TestServiceShareableBertyGroup(t *testing.T) { g, _, err := bertyprotocol.NewGroupMultiMember() require.NoError(t, err) - _, err = protocol.Client.MultiMemberGroupJoin(ctx, &bertytypes.MultiMemberGroupJoin_Request{ + _, err = protocol.Client.MultiMemberGroupJoin(ctx, &protocoltypes.MultiMemberGroupJoin_Request{ Group: g, }) require.NoError(t, err) @@ -223,19 +225,19 @@ func TestServiceShareableBertyGroup(t *testing.T) { ret1, err := svc.ShareableBertyGroup(ctx, nil) require.Error(t, err) - ret1, err = svc.ShareableBertyGroup(ctx, &ShareableBertyGroup_Request{ + ret1, err = svc.ShareableBertyGroup(ctx, &messengertypes.ShareableBertyGroup_Request{ GroupPK: nil, GroupName: "", }) require.Error(t, err) - ret1, err = svc.ShareableBertyGroup(ctx, &ShareableBertyGroup_Request{ + ret1, err = svc.ShareableBertyGroup(ctx, &messengertypes.ShareableBertyGroup_Request{ GroupPK: []byte("garbage id"), GroupName: "", }) require.Error(t, err) - ret1, err = svc.ShareableBertyGroup(ctx, &ShareableBertyGroup_Request{ + ret1, err = svc.ShareableBertyGroup(ctx, &messengertypes.ShareableBertyGroup_Request{ GroupPK: g.PublicKey, GroupName: "", }) @@ -243,7 +245,7 @@ func TestServiceShareableBertyGroup(t *testing.T) { testParseSharedGroup(t, g, "", ret1) - ret1, err = svc.ShareableBertyGroup(ctx, &ShareableBertyGroup_Request{ + ret1, err = svc.ShareableBertyGroup(ctx, &messengertypes.ShareableBertyGroup_Request{ GroupPK: g.PublicKey, GroupName: "named group", }) diff --git a/go/pkg/bertymessenger/db.go b/go/pkg/bertymessenger/db.go index 880187f97f..cf9b7b3ddd 100644 --- a/go/pkg/bertymessenger/db.go +++ b/go/pkg/bertymessenger/db.go @@ -13,8 +13,9 @@ import ( "gorm.io/gorm/clause" "gorm.io/gorm/logger" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type dbWrapper struct { @@ -39,14 +40,15 @@ func newDBWrapper(db *gorm.DB, log *zap.Logger) *dbWrapper { func getDBModels() []interface{} { return []interface{}{ - &Conversation{}, - &Account{}, - &ServiceToken{}, - &Contact{}, - &Interaction{}, - &Member{}, - &Device{}, - &ConversationReplicationInfo{}, + &messengertypes.Conversation{}, + &messengertypes.Account{}, + &messengertypes.ServiceToken{}, + &messengertypes.Contact{}, + &messengertypes.Interaction{}, + &messengertypes.Member{}, + &messengertypes.Device{}, + &messengertypes.ConversationReplicationInfo{}, + &messengertypes.Media{}, } } @@ -105,7 +107,7 @@ func (d *dbWrapper) tx(txFunc func(*dbWrapper) error) error { }) } -func (d *dbWrapper) addConversationForContact(groupPK, contactPK string) (*Conversation, error) { +func (d *dbWrapper) addConversationForContact(groupPK, contactPK string) (*messengertypes.Conversation, error) { if groupPK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("no conversation public key specified")) } @@ -115,10 +117,10 @@ func (d *dbWrapper) addConversationForContact(groupPK, contactPK string) (*Conve } if err := d.tx(func(tx *dbWrapper) error { - conversation := &Conversation{ + conversation := &messengertypes.Conversation{ PublicKey: groupPK, ContactPublicKey: contactPK, - Type: Conversation_ContactType, + Type: messengertypes.Conversation_ContactType, DisplayName: "", // empty on account conversations Link: "", // empty on account conversations CreatedDate: timestampMs(time.Now()), @@ -129,7 +131,7 @@ func (d *dbWrapper) addConversationForContact(groupPK, contactPK string) (*Conve count := int64(0) if err := tx.db. - Model(&Conversation{}). + Model(&messengertypes.Conversation{}). Where("(contact_public_key == ? AND public_key != ?) OR (contact_public_key != ? AND public_key == ?)", contactPK, groupPK, contactPK, groupPK). Count(&count). Error; err != nil { @@ -152,14 +154,14 @@ func (d *dbWrapper) addConversationForContact(groupPK, contactPK string) (*Conve return d.getConversationByPK(groupPK) } -func (d *dbWrapper) addConversation(groupPK string) (*Conversation, error) { +func (d *dbWrapper) addConversation(groupPK string) (*messengertypes.Conversation, error) { if groupPK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a conversation public key is required")) } - conversation := &Conversation{ + conversation := &messengertypes.Conversation{ PublicKey: groupPK, - Type: Conversation_MultiMemberType, + Type: messengertypes.Conversation_MultiMemberType, CreatedDate: timestampMs(time.Now()), } @@ -174,7 +176,7 @@ func (d *dbWrapper) addConversation(groupPK string) (*Conversation, error) { return d.getConversationByPK(groupPK) } -func (d *dbWrapper) updateConversation(c Conversation) (bool, error) { +func (d *dbWrapper) updateConversation(c messengertypes.Conversation) (bool, error) { if c.PublicKey == "" { return false, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a conversation public key is required")) } @@ -244,7 +246,7 @@ func (d *dbWrapper) updateConversationReadState(pk string, newUnread bool, event updates["reply_options_cid"] = replyOptionsCID // db update - tx := d.db.Model(&Conversation{}).Where(&Conversation{PublicKey: pk}).Updates(updates) + tx := d.db.Model(&messengertypes.Conversation{}).Where(&messengertypes.Conversation{PublicKey: pk}).Updates(updates) if tx.Error != nil { return tx.Error @@ -262,19 +264,25 @@ func (d *dbWrapper) addAccount(pk, link string) error { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("an account public key is required")) } - if err := d.db.Model(&Account{}).FirstOrCreate(&Account{}, &Account{PublicKey: pk, Link: link}).Error; err != nil && !isSQLiteError(err, sqlite3.ErrConstraint) { + if err := d.db. + Model(&messengertypes.Account{}). + FirstOrCreate( + &messengertypes.Account{}, + &messengertypes.Account{PublicKey: pk, Link: link}, + ). + Error; err != nil && !isSQLiteError(err, sqlite3.ErrConstraint) { return err } return nil } -func (d *dbWrapper) updateAccount(pk, url, displayName, avatarCID string) (*Account, error) { +func (d *dbWrapper) updateAccount(pk, url, displayName, avatarCID string) (*messengertypes.Account, error) { if pk == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("an account public key is required")) } - acc := &Account{} + acc := &messengertypes.Account{} values := map[string]interface{}{} if url != "" { @@ -287,7 +295,7 @@ func (d *dbWrapper) updateAccount(pk, url, displayName, avatarCID string) (*Acco values["avatar_cid"] = avatarCID } - tx := d.db.Model(&Account{}).Where(&Account{PublicKey: pk}).Updates(values).First(&acc) + tx := d.db.Model(&messengertypes.Account{}).Where(&messengertypes.Account{PublicKey: pk}).Updates(values).First(&acc) if tx.Error != nil { return nil, tx.Error } @@ -295,63 +303,70 @@ func (d *dbWrapper) updateAccount(pk, url, displayName, avatarCID string) (*Acco return acc, nil } -func (d *dbWrapper) getAccount() (*Account, error) { +func (d *dbWrapper) getAccount() (*messengertypes.Account, error) { var ( - account = &Account{} + account = &messengertypes.Account{} count int64 ) - d.db.Model(&Account{}).Count(&count) + d.db.Model(&messengertypes.Account{}).Count(&count) if count > 1 { return nil, errcode.ErrDBMultipleRecords } - return account, d.db.Model(&Account{}).Preload("ServiceTokens").First(&account).Error + return account, d.db.Model(&messengertypes.Account{}).Preload("ServiceTokens").First(&account).Error } -func (d *dbWrapper) getDeviceByPK(publicKey string) (*Device, error) { +func (d *dbWrapper) getDeviceByPK(publicKey string) (*messengertypes.Device, error) { if publicKey == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a device public key is required")) } - device := &Device{} + device := &messengertypes.Device{} - if err := d.db.First(&device, &Device{PublicKey: publicKey}).Error; err != nil { + if err := d.db.First(&device, &messengertypes.Device{PublicKey: publicKey}).Error; err != nil { return nil, err } return device, nil } -func (d *dbWrapper) getContactByPK(publicKey string) (*Contact, error) { +func (d *dbWrapper) getContactByPK(publicKey string) (*messengertypes.Contact, error) { if publicKey == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a contact public key is required")) } - contact := &Contact{} + contact := &messengertypes.Contact{} - if err := d.db.First(&contact, &Contact{PublicKey: publicKey}).Error; err != nil { + if err := d.db.First(&contact, &messengertypes.Contact{PublicKey: publicKey}).Error; err != nil { return nil, err } return contact, nil } -func (d *dbWrapper) getConversationByPK(publicKey string) (*Conversation, error) { +func (d *dbWrapper) getConversationByPK(publicKey string) (*messengertypes.Conversation, error) { if publicKey == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a conversation public key is required")) } - conversation := &Conversation{} + conversation := &messengertypes.Conversation{} - if err := d.db.Preload("ReplyOptions").Preload("ReplicationInfo").First(&conversation, &Conversation{PublicKey: publicKey}).Error; err != nil { + if err := d.db. + Preload("ReplyOptions"). + Preload("ReplicationInfo"). + First( + &conversation, + &messengertypes.Conversation{PublicKey: publicKey}, + ). + Error; err != nil { return nil, err } return conversation, nil } -func (d *dbWrapper) getMemberByPK(publicKey string, convPK string) (*Member, error) { +func (d *dbWrapper) getMemberByPK(publicKey string, convPK string) (*messengertypes.Member, error) { if publicKey == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("member public key cannot be empty")) } @@ -359,55 +374,55 @@ func (d *dbWrapper) getMemberByPK(publicKey string, convPK string) (*Member, err return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("conversation public key cannot be empty")) } - member := &Member{} + member := &messengertypes.Member{} - if err := d.db.First(&member, &Member{PublicKey: publicKey, ConversationPublicKey: convPK}).Error; err != nil { + if err := d.db.First(&member, &messengertypes.Member{PublicKey: publicKey, ConversationPublicKey: convPK}).Error; err != nil { return nil, err } return member, nil } -func (d *dbWrapper) getAllConversations() ([]*Conversation, error) { - convs := []*Conversation(nil) +func (d *dbWrapper) getAllConversations() ([]*messengertypes.Conversation, error) { + convs := []*messengertypes.Conversation(nil) return convs, d.db.Preload("ReplyOptions").Preload("ReplicationInfo").Find(&convs).Error } -func (d *dbWrapper) getAllMembers() ([]*Member, error) { - members := []*Member(nil) +func (d *dbWrapper) getAllMembers() ([]*messengertypes.Member, error) { + members := []*messengertypes.Member(nil) return members, d.db.Find(&members).Error } -func (d *dbWrapper) getAllContacts() ([]*Contact, error) { - contacts := []*Contact(nil) +func (d *dbWrapper) getAllContacts() ([]*messengertypes.Contact, error) { + contacts := []*messengertypes.Contact(nil) return contacts, d.db.Find(&contacts).Error } -func (d *dbWrapper) getContactsByState(state Contact_State) ([]*Contact, error) { - contacts := []*Contact(nil) +func (d *dbWrapper) getContactsByState(state messengertypes.Contact_State) ([]*messengertypes.Contact, error) { + contacts := []*messengertypes.Contact(nil) - return contacts, d.db.Where(&Contact{State: state}).Find(&contacts).Error + return contacts, d.db.Where(&messengertypes.Contact{State: state}).Find(&contacts).Error } -func (d *dbWrapper) getAllInteractions() ([]*Interaction, error) { - interactions := []*Interaction(nil) +func (d *dbWrapper) getAllInteractions() ([]*messengertypes.Interaction, error) { + interactions := []*messengertypes.Interaction(nil) return interactions, d.db.Preload(clause.Associations).Find(&interactions).Error } -func (d *dbWrapper) getInteractionByCID(cid string) (*Interaction, error) { +func (d *dbWrapper) getInteractionByCID(cid string) (*messengertypes.Interaction, error) { if cid == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("an interaction cid is required")) } - interaction := &Interaction{} - return interaction, d.db.Preload(clause.Associations).First(&interaction, &Interaction{CID: cid}).Error + interaction := &messengertypes.Interaction{} + return interaction, d.db.Preload(clause.Associations).First(&interaction, &messengertypes.Interaction{CID: cid}).Error } -func (d *dbWrapper) addContactRequestOutgoingEnqueued(contactPK, displayName, convPK string) (*Contact, error) { +func (d *dbWrapper) addContactRequestOutgoingEnqueued(contactPK, displayName, convPK string) (*messengertypes.Contact, error) { if contactPK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a contact public key is required")) } @@ -419,15 +434,15 @@ func (d *dbWrapper) addContactRequestOutgoingEnqueued(contactPK, displayName, co return nil, err } - contact := &Contact{ + contact := &messengertypes.Contact{ PublicKey: contactPK, DisplayName: displayName, - State: Contact_OutgoingRequestEnqueued, + State: messengertypes.Contact_OutgoingRequestEnqueued, CreatedDate: timestampMs(time.Now()), ConversationPublicKey: convPK, } - tx := d.db.Where(&Contact{PublicKey: contactPK}).Create(&contact) + tx := d.db.Where(&messengertypes.Contact{PublicKey: contactPK}).Create(&contact) // if tx.Error == nil && tx.RowsAffected == 0 { // Maybe update DisplayName in some cases? @@ -437,31 +452,31 @@ func (d *dbWrapper) addContactRequestOutgoingEnqueued(contactPK, displayName, co return contact, tx.Error } -func (d *dbWrapper) addContactRequestOutgoingSent(contactPK string) (*Contact, error) { +func (d *dbWrapper) addContactRequestOutgoingSent(contactPK string) (*messengertypes.Contact, error) { if contactPK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a contact public key is required")) } - contact := &Contact{} + contact := &messengertypes.Contact{} if res := d.db. - Where(&Contact{ + Where(&messengertypes.Contact{ PublicKey: contactPK, - State: Contact_OutgoingRequestEnqueued, + State: messengertypes.Contact_OutgoingRequestEnqueued, }). - Updates(&Contact{ + Updates(&messengertypes.Contact{ SentDate: timestampMs(time.Now()), - State: Contact_OutgoingRequestSent, + State: messengertypes.Contact_OutgoingRequestSent, }); res.Error != nil { return nil, res.Error } else if res.RowsAffected == 0 { return nil, errcode.ErrDBAddContactRequestOutgoingSent.Wrap(fmt.Errorf("nothing found")) } - return contact, d.db.Where(&Contact{PublicKey: contactPK}).First(&contact).Error + return contact, d.db.Where(&messengertypes.Contact{PublicKey: contactPK}).First(&contact).Error } -func (d *dbWrapper) addContactRequestIncomingReceived(contactPK, displayName, groupPk string) (*Contact, error) { +func (d *dbWrapper) addContactRequestIncomingReceived(contactPK, displayName, groupPk string) (*messengertypes.Contact, error) { if contactPK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a contact public key is required")) } @@ -474,10 +489,10 @@ func (d *dbWrapper) addContactRequestIncomingReceived(contactPK, displayName, gr } if err := d.db. - Create(&Contact{ + Create(&messengertypes.Contact{ DisplayName: displayName, PublicKey: contactPK, - State: Contact_IncomingRequest, + State: messengertypes.Contact_IncomingRequest, CreatedDate: timestampMs(time.Now()), ConversationPublicKey: groupPk, }). @@ -488,7 +503,7 @@ func (d *dbWrapper) addContactRequestIncomingReceived(contactPK, displayName, gr return d.getContactByPK(contactPK) } -func (d *dbWrapper) addContactRequestIncomingAccepted(contactPK, groupPK string) (*Contact, error) { +func (d *dbWrapper) addContactRequestIncomingAccepted(contactPK, groupPK string) (*messengertypes.Contact, error) { if contactPK == "" { return nil, errcode.ErrInvalidInput.Wrap(errors.New("a contact public key is required")) } @@ -502,12 +517,12 @@ func (d *dbWrapper) addContactRequestIncomingAccepted(contactPK, groupPK string) return nil, err } - if contact.State != Contact_IncomingRequest { + if contact.State != messengertypes.Contact_IncomingRequest { return nil, errcode.ErrInvalidInput.Wrap(errors.New("no incoming request")) } if err := d.db.Transaction(func(db *gorm.DB) error { - contact.State = Contact_Accepted + contact.State = messengertypes.Contact_Accepted contact.ConversationPublicKey = groupPK if err := db.Save(&contact).Error; err != nil { @@ -527,14 +542,14 @@ func (d *dbWrapper) addContactRequestIncomingAccepted(contactPK, groupPK string) return contact, nil } -func (d *dbWrapper) markInteractionAsAcknowledged(cid string) (*Interaction, error) { +func (d *dbWrapper) markInteractionAsAcknowledged(cid string) (*messengertypes.Interaction, error) { if cid == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("an interaction cid is required")) } count := int64(0) - if err := d.db.Model(&Interaction{}).Where(map[string]interface{}{"cid": cid}).Count(&count).Error; err != nil { + if err := d.db.Model(&messengertypes.Interaction{}).Where(map[string]interface{}{"cid": cid}).Count(&count).Error; err != nil { return nil, err } @@ -542,7 +557,7 @@ func (d *dbWrapper) markInteractionAsAcknowledged(cid string) (*Interaction, err return nil, gorm.ErrRecordNotFound } - res := d.db.Model(&Interaction{}).Where(map[string]interface{}{"cid": cid, "acknowledged": false}).Update("acknowledged", true) + res := d.db.Model(&messengertypes.Interaction{}).Where(map[string]interface{}{"cid": cid, "acknowledged": false}).Update("acknowledged", true) if res.Error != nil { return nil, res.Error @@ -562,8 +577,8 @@ func (d *dbWrapper) getAcknowledgementsCIDsForInteraction(cid string) ([]string, var cids []string - if err := d.db.Model(&Interaction{}).Where(&Interaction{ - Type: AppMessage_TypeAcknowledge, + if err := d.db.Model(&messengertypes.Interaction{}).Where(&messengertypes.Interaction{ + Type: messengertypes.AppMessage_TypeAcknowledge, TargetCID: cid, }).Pluck("cid", &cids).Error; err != nil { return nil, err @@ -577,41 +592,41 @@ func (d *dbWrapper) deleteInteractions(cids []string) error { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("a list of cids is required")) } - return d.db.Model(&Interaction{}).Delete(&Interaction{}, &cids).Error + return d.db.Model(&messengertypes.Interaction{}).Delete(&messengertypes.Interaction{}, &cids).Error } -func (d *dbWrapper) getDBInfo() (*SystemInfo_DB, error) { +func (d *dbWrapper) getDBInfo() (*messengertypes.SystemInfo_DB, error) { var err, errs error - infos := &SystemInfo_DB{} + infos := &messengertypes.SystemInfo_DB{} - infos.Accounts, err = d.dbModelRowsCount(Account{}) + infos.Accounts, err = d.dbModelRowsCount(messengertypes.Account{}) errs = multierr.Append(errs, err) - infos.Contacts, err = d.dbModelRowsCount(Contact{}) + infos.Contacts, err = d.dbModelRowsCount(messengertypes.Contact{}) errs = multierr.Append(errs, err) - infos.Interactions, err = d.dbModelRowsCount(Interaction{}) + infos.Interactions, err = d.dbModelRowsCount(messengertypes.Interaction{}) errs = multierr.Append(errs, err) - infos.Conversations, err = d.dbModelRowsCount(Conversation{}) + infos.Conversations, err = d.dbModelRowsCount(messengertypes.Conversation{}) errs = multierr.Append(errs, err) - infos.Members, err = d.dbModelRowsCount(Member{}) + infos.Members, err = d.dbModelRowsCount(messengertypes.Member{}) errs = multierr.Append(errs, err) - infos.Devices, err = d.dbModelRowsCount(Device{}) + infos.Devices, err = d.dbModelRowsCount(messengertypes.Device{}) errs = multierr.Append(errs, err) - infos.ServiceTokens, err = d.dbModelRowsCount(ServiceToken{}) + infos.ServiceTokens, err = d.dbModelRowsCount(messengertypes.ServiceToken{}) errs = multierr.Append(errs, err) - infos.ConversationReplicationInfo, err = d.dbModelRowsCount(ConversationReplicationInfo{}) + infos.ConversationReplicationInfo, err = d.dbModelRowsCount(messengertypes.ConversationReplicationInfo{}) errs = multierr.Append(errs, err) return infos, errs } -func (d *dbWrapper) addDevice(devicePK string, memberPK string) (*Device, error) { +func (d *dbWrapper) addDevice(devicePK string, memberPK string) (*messengertypes.Device, error) { if devicePK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a device public key is required")) } @@ -626,7 +641,7 @@ func (d *dbWrapper) addDevice(devicePK string, memberPK string) (*Device, error) count := int64(0) if err := tx.db. - Model(&Device{}). + Model(&messengertypes.Device{}). Where("member_public_key != ? AND public_key == ?", memberPK, devicePK). Count(&count). Error; err != nil { @@ -640,7 +655,7 @@ func (d *dbWrapper) addDevice(devicePK string, memberPK string) (*Device, error) return tx.db. Clauses(clause.OnConflict{DoNothing: true}). - Create(&Device{ + Create(&messengertypes.Device{ PublicKey: devicePK, MemberPublicKey: memberPK, }). @@ -652,13 +667,13 @@ func (d *dbWrapper) addDevice(devicePK string, memberPK string) (*Device, error) return d.getDeviceByPK(devicePK) } -func (d *dbWrapper) updateContact(pk string, contact Contact) error { +func (d *dbWrapper) updateContact(pk string, contact messengertypes.Contact) error { if pk == "" { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("no public key specified")) } count := int64(0) - if err := d.db.Model(&Contact{}).Where(&Contact{PublicKey: pk}).Count(&count).Error; err != nil { + if err := d.db.Model(&messengertypes.Contact{}).Where(&messengertypes.Contact{PublicKey: pk}).Count(&count).Error; err != nil { return err } @@ -666,10 +681,10 @@ func (d *dbWrapper) updateContact(pk string, contact Contact) error { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("contact not found")) } - return d.db.Model(&Contact{PublicKey: pk}).Updates(&contact).Error + return d.db.Model(&messengertypes.Contact{PublicKey: pk}).Updates(&contact).Error } -func (d *dbWrapper) addInteraction(rawInte Interaction) (*Interaction, bool, error) { +func (d *dbWrapper) addInteraction(rawInte messengertypes.Interaction) (*messengertypes.Interaction, bool, error) { if rawInte.CID == "" { return nil, false, errcode.ErrInvalidInput.Wrap(fmt.Errorf("an interaction cid is required")) } @@ -696,7 +711,7 @@ func (d *dbWrapper) getReplyOptionsCIDForConversation(pk string) (string, error) cid := "" - if err := d.db.Model(&Interaction{}). + if err := d.db.Model(&messengertypes.Interaction{}). Raw(`SELECT cid FROM interactions WHERE conversation_public_key = ? @@ -711,14 +726,14 @@ func (d *dbWrapper) getReplyOptionsCIDForConversation(pk string) (string, error) AND type = ? ORDER BY ROWID DESC LIMIT 1 - `, pk, pk, AppMessage_TypeReplyOptions).Scan(&cid).Error; err != nil { + `, pk, pk, messengertypes.AppMessage_TypeReplyOptions).Scan(&cid).Error; err != nil { return "", err } return cid, nil } -func (d *dbWrapper) attributeBacklogInteractions(devicePK, groupPK, memberPK string) ([]*Interaction, error) { +func (d *dbWrapper) attributeBacklogInteractions(devicePK, groupPK, memberPK string) ([]*messengertypes.Interaction, error) { if devicePK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("missing device public key")) } @@ -732,13 +747,13 @@ func (d *dbWrapper) attributeBacklogInteractions(devicePK, groupPK, memberPK str } var ( - backlog []*Interaction + backlog []*messengertypes.Interaction cids []string ) if err := d.tx(func(tx *dbWrapper) error { res := tx.db. - Model(&Interaction{}). + Model(&messengertypes.Interaction{}). Where("device_public_key = ? AND conversation_public_key = ? AND member_public_key = \"\"", devicePK, groupPK). Order("sent_date asc") @@ -768,7 +783,7 @@ func (d *dbWrapper) attributeBacklogInteractions(devicePK, groupPK, memberPK str return backlog, nil } -func (d *dbWrapper) addMember(memberPK, groupPK, displayName string, avatarCID string) (*Member, error) { +func (d *dbWrapper) addMember(memberPK, groupPK, displayName, avatarCID string) (*messengertypes.Member, error) { if memberPK == "" { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("member public key cannot be empty")) } @@ -777,7 +792,7 @@ func (d *dbWrapper) addMember(memberPK, groupPK, displayName string, avatarCID s return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("conversation public key cannot be empty")) } - member := &Member{ + member := &messengertypes.Member{ PublicKey: memberPK, ConversationPublicKey: groupPK, AvatarCID: avatarCID, @@ -812,7 +827,7 @@ func (d *dbWrapper) addMember(memberPK, groupPK, displayName string, avatarCID s return member, nil } -func (d *dbWrapper) upsertMember(memberPK, groupPK string, m Member) (*Member, bool, error) { +func (d *dbWrapper) upsertMember(memberPK, groupPK string, m messengertypes.Member) (*messengertypes.Member, bool, error) { if memberPK == "" { return nil, false, errcode.ErrInvalidInput.Wrap(fmt.Errorf("member public key cannot be empty")) } @@ -856,7 +871,7 @@ func (d *dbWrapper) upsertMember(memberPK, groupPK string, m Member) (*Member, b return um, isNew, nil } -func (d *dbWrapper) setConversationIsOpenStatus(conversationPK string, status bool) (*Conversation, bool, error) { +func (d *dbWrapper) setConversationIsOpenStatus(conversationPK string, status bool) (*messengertypes.Conversation, bool, error) { if conversationPK == "" { return nil, false, errcode.ErrInvalidInput.Wrap(fmt.Errorf("a conversation public key is required")) } @@ -881,8 +896,8 @@ func (d *dbWrapper) setConversationIsOpenStatus(conversationPK string, status bo } if err := d.db. - Model(&Conversation{}). - Where(&Conversation{PublicKey: conversationPK}). + Model(&messengertypes.Conversation{}). + Where(&messengertypes.Conversation{PublicKey: conversationPK}). Updates(values). Error; err != nil { return nil, false, err @@ -899,8 +914,8 @@ func (d *dbWrapper) isConversationOpened(conversationPK string) (bool, error) { var ret int64 err := d.db. - Model(&Conversation{}). - Where(&Conversation{PublicKey: conversationPK, IsOpen: true}). + Model(&messengertypes.Conversation{}). + Where(&messengertypes.Conversation{PublicKey: conversationPK, IsOpen: true}). Count(&ret).Error return ret == 1, err @@ -919,7 +934,7 @@ func (d *dbLogWrapper) Trace(ctx context.Context, begin time.Time, fc func() (st d.Interface.Trace(ctx, begin, fc, err) } -func (d *dbWrapper) addServiceToken(accountPK string, serviceToken *bertytypes.ServiceToken) error { +func (d *dbWrapper) addServiceToken(accountPK string, serviceToken *protocoltypes.ServiceToken) error { if accountPK == "" { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("an account public key is required")) } @@ -930,7 +945,7 @@ func (d *dbWrapper) addServiceToken(accountPK string, serviceToken *bertytypes.S if err := d.tx(func(tx *dbWrapper) error { for _, s := range serviceToken.SupportedServices { - res := tx.db.Clauses(clause.OnConflict{DoNothing: true}).Create(&ServiceToken{ + res := tx.db.Clauses(clause.OnConflict{DoNothing: true}).Create(&messengertypes.ServiceToken{ AccountPK: accountPK, TokenID: serviceToken.TokenID(), ServiceType: s.ServiceType, @@ -957,7 +972,7 @@ func (d *dbWrapper) accountSetReplicationAutoEnable(pk string, enabled bool) err } // db update - tx := d.db.Model(&Account{}).Where(&Account{PublicKey: pk}).Updates(updates) + tx := d.db.Model(&messengertypes.Account{}).Where(&messengertypes.Account{PublicKey: pk}).Updates(updates) if tx.Error != nil { return tx.Error @@ -970,7 +985,7 @@ func (d *dbWrapper) accountSetReplicationAutoEnable(pk string, enabled bool) err return nil } -func (d *dbWrapper) saveConversationReplicationInfo(c ConversationReplicationInfo) error { +func (d *dbWrapper) saveConversationReplicationInfo(c messengertypes.ConversationReplicationInfo) error { if c.CID == "" { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("an interaction cid is required")) } @@ -982,3 +997,81 @@ func (d *dbWrapper) saveConversationReplicationInfo(c ConversationReplicationInf return nil } + +func (d *dbWrapper) addMedias(medias []*messengertypes.Media) ([]bool, error) { + if len(medias) == 0 { + return []bool{}, nil + } + for _, m := range medias { + if err := ensureValidBase64CID(m.GetCID()); err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + } + + var dbMedias []*messengertypes.Media + cids := make([]string, len(medias)) + for i, m := range medias { + cids[i] = m.GetCID() + } + err := d.db.Model(&messengertypes.Media{}).Where("cid IN ?", cids).Find(&dbMedias).Error + if err != nil { + return nil, errcode.ErrDBRead.Wrap(err) + } + + willAdd := make([]bool, len(medias)) + for i, m := range medias { + found := false + for _, n := range dbMedias { + if m.GetCID() == n.GetCID() { + found = true + break + } + } + if !found { + willAdd[i] = true + } + } + + if err := d.db.Clauses(clause.OnConflict{DoNothing: true}).Create(medias).Error; err != nil { + return nil, errcode.ErrDBWrite.Wrap(err) + } + + return willAdd, nil +} + +func (d *dbWrapper) getMedias(cids []string) ([]*messengertypes.Media, error) { + if len(cids) == 0 { + return nil, nil + } + for _, c := range cids { + if err := ensureValidBase64CID(c); err != nil { + return nil, errcode.ErrInvalidInput.Wrap(err) + } + } + + var dbMedias []*messengertypes.Media + err := d.db.Model(&messengertypes.Media{}).Where("cid IN ?", cids).Find(&dbMedias).Error + if err != nil { + return nil, errcode.ErrDBRead.Wrap(err) + } + + medias := make([]*messengertypes.Media, len(cids)) + for i, cid := range cids { + medias[i] = &messengertypes.Media{CID: cid} + for _, dbMedia := range dbMedias { + if dbMedia.GetCID() == cid { + medias[i] = dbMedia + } + } + } + return medias, nil +} + +func (d *dbWrapper) getAllMedias() ([]*messengertypes.Media, error) { + var medias []*messengertypes.Media + err := d.db.Find(&medias).Error + if err != nil { + return nil, errcode.ErrDBRead.Wrap(err) + } + return medias, nil +} diff --git a/go/pkg/bertymessenger/db_state_keeper.go b/go/pkg/bertymessenger/db_state_keeper.go index 3d1e535d3a..d170a69573 100644 --- a/go/pkg/bertymessenger/db_state_keeper.go +++ b/go/pkg/bertymessenger/db_state_keeper.go @@ -3,6 +3,8 @@ package bertymessenger import ( "go.uber.org/zap" "gorm.io/gorm" + + "berty.tech/berty/v2/go/pkg/messengertypes" ) func keepDisplayName(db *gorm.DB, logger *zap.Logger) string { @@ -55,12 +57,12 @@ func keepAutoReplicateFlag(db *gorm.DB, logger *zap.Logger) bool { return true } -func keepConversationsLocalData(db *gorm.DB, logger *zap.Logger) []*LocalConversationState { +func keepConversationsLocalData(db *gorm.DB, logger *zap.Logger) []*messengertypes.LocalConversationState { if logger == nil { logger = zap.NewNop() } - result := []*LocalConversationState{} + result := []*messengertypes.LocalConversationState{} err := db.Table("conversations").Scan(&result).Error @@ -98,8 +100,8 @@ func keepAccountStringField(db *gorm.DB, field string, logger *zap.Logger) strin return "" } -func keepDatabaseLocalState(db *gorm.DB, logger *zap.Logger) *LocalDatabaseState { - return &LocalDatabaseState{ +func keepDatabaseLocalState(db *gorm.DB, logger *zap.Logger) *messengertypes.LocalDatabaseState { + return &messengertypes.LocalDatabaseState{ PublicKey: keepAccountStringField(db, "public_key", logger), DisplayName: keepDisplayName(db, logger), ReplicateFlag: keepAutoReplicateFlag(db, logger), diff --git a/go/pkg/bertymessenger/db_state_keeper_test.go b/go/pkg/bertymessenger/db_state_keeper_test.go index 2106c2ef49..c993524a49 100644 --- a/go/pkg/bertymessenger/db_state_keeper_test.go +++ b/go/pkg/bertymessenger/db_state_keeper_test.go @@ -6,6 +6,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap" "gorm.io/gorm" + + "berty.tech/berty/v2/go/pkg/messengertypes" ) func Test_keepUsername(t *testing.T) { @@ -70,7 +72,7 @@ func Test_keepConversationsUnreadCounts(t *testing.T) { require.NoError(t, db.db.Exec(`INSERT INTO conversations (public_key, is_open, unread_count) VALUES ("pk_3", true, 3000)`).Error) res = keepConversationsLocalData(db.db, log) - expectedValues := map[string]*LocalConversationState{ + expectedValues := map[string]*messengertypes.LocalConversationState{ "pk_1": {IsOpen: true, UnreadCount: 1000}, "pk_2": {IsOpen: false, UnreadCount: 2000}, "pk_3": {IsOpen: true, UnreadCount: 3000}, diff --git a/go/pkg/bertymessenger/db_test.go b/go/pkg/bertymessenger/db_test.go index e629bf2fb1..99821cf3bc 100644 --- a/go/pkg/bertymessenger/db_test.go +++ b/go/pkg/bertymessenger/db_test.go @@ -13,8 +13,9 @@ import ( "gorm.io/gorm" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func noopReplayer(_ *dbWrapper) error { return nil } @@ -113,7 +114,7 @@ func Test_dbWrapper_getDeviceByPK(t *testing.T) { require.True(t, errors.Is(err, gorm.ErrRecordNotFound)) _ = dev - refDev := Device{ + refDev := messengertypes.Device{ PublicKey: pk1, MemberPublicKey: "ownerPK1", } @@ -125,7 +126,7 @@ func Test_dbWrapper_getDeviceByPK(t *testing.T) { require.Equal(t, refDev.PublicKey, dev.PublicKey) require.Equal(t, refDev.MemberPublicKey, dev.MemberPublicKey) - db.db.Create(&Device{ + db.db.Create(&messengertypes.Device{ PublicKey: "pk2", MemberPublicKey: "ownerPK2", }) @@ -152,10 +153,10 @@ func Test_dbWrapper_getContactByPK(t *testing.T) { require.True(t, errors.Is(err, gorm.ErrRecordNotFound)) _ = contact - refContact := Contact{ + refContact := messengertypes.Contact{ PublicKey: pk1, ConversationPublicKey: "", - State: Contact_IncomingRequest, + State: messengertypes.Contact_IncomingRequest, DisplayName: "PK1-Name", CreatedDate: 12345, SentDate: 123, @@ -172,7 +173,7 @@ func Test_dbWrapper_getContactByPK(t *testing.T) { require.Equal(t, refContact.CreatedDate, contact.CreatedDate) require.Equal(t, refContact.SentDate, contact.SentDate) - db.db.Create(&Device{ + db.db.Create(&messengertypes.Device{ PublicKey: "pk2", MemberPublicKey: "ownerPK2", }) @@ -303,7 +304,7 @@ func Test_dbWrapper_addContactRequestOutgoingSent(t *testing.T) { require.Equal(t, contactPK, contact.PublicKey) require.Equal(t, displayName, contact.DisplayName) require.Equal(t, convPK, contact.ConversationPublicKey) - require.Equal(t, Contact_OutgoingRequestEnqueued, contact.State) + require.Equal(t, messengertypes.Contact_OutgoingRequestEnqueued, contact.State) contact, err = db.addContactRequestOutgoingSent("") require.Error(t, err) @@ -317,14 +318,14 @@ func Test_dbWrapper_addContactRequestOutgoingSent(t *testing.T) { require.Equal(t, contactPK, contact.PublicKey) require.Equal(t, displayName, contact.DisplayName) require.Equal(t, convPK, contact.ConversationPublicKey) - require.Equal(t, Contact_OutgoingRequestSent, contact.State) + require.Equal(t, messengertypes.Contact_OutgoingRequestSent, contact.State) contact, err = db.getContactByPK(contactPK) require.NoError(t, err) require.Equal(t, contactPK, contact.PublicKey) require.Equal(t, displayName, contact.DisplayName) require.Equal(t, convPK, contact.ConversationPublicKey) - require.Equal(t, Contact_OutgoingRequestSent, contact.State) + require.Equal(t, messengertypes.Contact_OutgoingRequestSent, contact.State) contact, err = db.addContactRequestOutgoingSent(contactPK) require.Error(t, err) @@ -352,7 +353,7 @@ func Test_dbWrapper_addConversationForContact(t *testing.T) { require.Equal(t, "convo_1", conv.PublicKey) require.Equal(t, "contact_1", conv.ContactPublicKey) - count, err := db.dbModelRowsCount(&Conversation{}) + count, err := db.dbModelRowsCount(&messengertypes.Conversation{}) require.NoError(t, err) require.Equal(t, int64(1), count) @@ -362,7 +363,7 @@ func Test_dbWrapper_addConversationForContact(t *testing.T) { require.Equal(t, "convo_1", conv.PublicKey) require.Equal(t, "contact_1", conv.ContactPublicKey) - count, err = db.dbModelRowsCount(&Conversation{}) + count, err = db.dbModelRowsCount(&messengertypes.Conversation{}) require.NoError(t, err) require.Equal(t, int64(1), count) @@ -371,7 +372,7 @@ func Test_dbWrapper_addConversationForContact(t *testing.T) { require.Error(t, err) require.Nil(t, conv) - count, err = db.dbModelRowsCount(&Conversation{}) + count, err = db.dbModelRowsCount(&messengertypes.Conversation{}) require.NoError(t, err) require.Equal(t, int64(1), count) @@ -380,7 +381,7 @@ func Test_dbWrapper_addConversationForContact(t *testing.T) { require.Error(t, err) require.Nil(t, conv) - count, err = db.dbModelRowsCount(&Conversation{}) + count, err = db.dbModelRowsCount(&messengertypes.Conversation{}) require.NoError(t, err) require.Equal(t, int64(1), count) } @@ -426,7 +427,7 @@ func Test_dbWrapper_addInteraction(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - i, _, err := db.addInteraction(Interaction{ + i, _, err := db.addInteraction(messengertypes.Interaction{ CID: "", Payload: []byte("payload1"), }) @@ -434,7 +435,7 @@ func Test_dbWrapper_addInteraction(t *testing.T) { require.True(t, errcode.Is(err, errcode.ErrInvalidInput)) require.Nil(t, i) - i, isNew, err := db.addInteraction(Interaction{ + i, isNew, err := db.addInteraction(messengertypes.Interaction{ CID: "Qm00001", Payload: []byte("payload1"), }) @@ -445,7 +446,7 @@ func Test_dbWrapper_addInteraction(t *testing.T) { require.True(t, isNew) // Data should not be updated - i, isNew, err = db.addInteraction(Interaction{ + i, isNew, err = db.addInteraction(messengertypes.Interaction{ CID: "Qm00001", Payload: []byte("payload2"), }) @@ -455,7 +456,7 @@ func Test_dbWrapper_addInteraction(t *testing.T) { require.Equal(t, []byte("payload1"), i.Payload) require.False(t, isNew) - i, isNew, err = db.addInteraction(Interaction{ + i, isNew, err = db.addInteraction(messengertypes.Interaction{ CID: "Qm00002", Payload: []byte("payload2"), }) @@ -466,10 +467,10 @@ func Test_dbWrapper_addInteraction(t *testing.T) { require.True(t, isNew) // Test relations - require.NoError(t, db.db.Create(&Conversation{PublicKey: "conversation_3"}).Error) - require.NoError(t, db.db.Create(&Member{PublicKey: "member_3"}).Error) + require.NoError(t, db.db.Create(&messengertypes.Conversation{PublicKey: "conversation_3"}).Error) + require.NoError(t, db.db.Create(&messengertypes.Member{PublicKey: "member_3"}).Error) - i, isNew, err = db.addInteraction(Interaction{ + i, isNew, err = db.addInteraction(messengertypes.Interaction{ CID: "Qm00003", Payload: []byte("payload3"), MemberPublicKey: "member_3", @@ -532,20 +533,20 @@ func Test_dbWrapper_attributeBacklogInteractions(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - db.db.Create(&Interaction{CID: "Qm300", DevicePublicKey: "device1", ConversationPublicKey: "conv1"}) - db.db.Create(&Interaction{CID: "Qm301", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) - db.db.Create(&Interaction{CID: "Qm302", DevicePublicKey: "device2", ConversationPublicKey: "conv1"}) - db.db.Create(&Interaction{CID: "Qm303", DevicePublicKey: "device2", ConversationPublicKey: "conv3"}) - db.db.Create(&Interaction{CID: "Qm104", DevicePublicKey: "device1", ConversationPublicKey: "conv1"}) - db.db.Create(&Interaction{CID: "Qm105", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) - db.db.Create(&Interaction{CID: "Qm106", DevicePublicKey: "device2", ConversationPublicKey: "conv1"}) - db.db.Create(&Interaction{CID: "Qm107", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) - db.db.Create(&Interaction{CID: "Qm108", DevicePublicKey: "device1", ConversationPublicKey: "conv1"}) - db.db.Create(&Interaction{CID: "Qm209", DevicePublicKey: "device2", ConversationPublicKey: "conv1"}) - db.db.Create(&Interaction{CID: "Qm210", DevicePublicKey: "device1", ConversationPublicKey: "conv2"}) - db.db.Create(&Interaction{CID: "Qm211", DevicePublicKey: "device2", ConversationPublicKey: "conv3"}) - db.db.Create(&Interaction{CID: "Qm212", DevicePublicKey: "device1", ConversationPublicKey: "conv3"}) - db.db.Create(&Interaction{CID: "Qm213", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm300", DevicePublicKey: "device1", ConversationPublicKey: "conv1"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm301", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm302", DevicePublicKey: "device2", ConversationPublicKey: "conv1"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm303", DevicePublicKey: "device2", ConversationPublicKey: "conv3"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm104", DevicePublicKey: "device1", ConversationPublicKey: "conv1"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm105", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm106", DevicePublicKey: "device2", ConversationPublicKey: "conv1"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm107", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm108", DevicePublicKey: "device1", ConversationPublicKey: "conv1"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm209", DevicePublicKey: "device2", ConversationPublicKey: "conv1"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm210", DevicePublicKey: "device1", ConversationPublicKey: "conv2"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm211", DevicePublicKey: "device2", ConversationPublicKey: "conv3"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm212", DevicePublicKey: "device1", ConversationPublicKey: "conv3"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm213", DevicePublicKey: "device2", ConversationPublicKey: "conv2"}) interactions, err := db.attributeBacklogInteractions("", "conv3", "member1") require.Error(t, err) @@ -585,24 +586,24 @@ func Test_dbWrapper_dbModelRowsCount(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - count, err := db.dbModelRowsCount(&Account{}) + count, err := db.dbModelRowsCount(&messengertypes.Account{}) require.NoError(t, err) require.Equal(t, int64(0), count) - db.db.Create(&Account{PublicKey: "test1"}) + db.db.Create(&messengertypes.Account{PublicKey: "test1"}) - count, err = db.dbModelRowsCount(&Account{}) + count, err = db.dbModelRowsCount(&messengertypes.Account{}) require.NoError(t, err) require.Equal(t, int64(1), count) - db.db.Create(&Account{PublicKey: "test2"}) + db.db.Create(&messengertypes.Account{PublicKey: "test2"}) - count, err = db.dbModelRowsCount(&Account{}) + count, err = db.dbModelRowsCount(&messengertypes.Account{}) require.NoError(t, err) require.Equal(t, int64(2), count) // Another model with no data - count, err = db.dbModelRowsCount(&Contact{}) + count, err = db.dbModelRowsCount(&messengertypes.Contact{}) require.NoError(t, err) require.Equal(t, int64(0), count) @@ -628,43 +629,43 @@ func Test_dbWrapper_deleteInteractions(t *testing.T) { err = db.deleteInteractions([]string{"Qm0001", "Qm0002", "Qm0003"}) require.NoError(t, err) - db.db.Create(&Interaction{CID: "Qm0001"}) - db.db.Create(&Interaction{CID: "Qm0002"}) - db.db.Create(&Interaction{CID: "Qm0003"}) - db.db.Create(&Interaction{CID: "Qm0004"}) - db.db.Create(&Interaction{CID: "Qm0005"}) - db.db.Create(&Interaction{CID: "Qm0006"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0001"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0002"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0003"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0004"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0005"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0006"}) count := int64(0) - db.db.Model(&Interaction{}).Count(&count) + db.db.Model(&messengertypes.Interaction{}).Count(&count) require.Equal(t, int64(6), count) err = db.deleteInteractions([]string{"Qm0001", "Qm0002", "Qm0003"}) require.NoError(t, err) - db.db.Model(&Interaction{}).Count(&count) + db.db.Model(&messengertypes.Interaction{}).Count(&count) require.Equal(t, int64(3), count) - interaction := &Interaction{} + interaction := &messengertypes.Interaction{} - err = db.db.Where(&Interaction{CID: "Qm0001"}).First(&interaction).Error + err = db.db.Where(&messengertypes.Interaction{CID: "Qm0001"}).First(&interaction).Error require.Error(t, err) - err = db.db.Where(&Interaction{CID: "Qm0002"}).First(&interaction).Error + err = db.db.Where(&messengertypes.Interaction{CID: "Qm0002"}).First(&interaction).Error require.Error(t, err) - err = db.db.Where(&Interaction{CID: "Qm0004"}).First(&interaction).Error + err = db.db.Where(&messengertypes.Interaction{CID: "Qm0004"}).First(&interaction).Error require.NoError(t, err) require.Equal(t, "Qm0004", interaction.CID) } func Test_dbWrapper_getAccount(t *testing.T) { - refAccount := &Account{ + refAccount := &messengertypes.Account{ PublicKey: "pk1", Link: "https://link1/", } - refOtherAccount := &Account{ + refOtherAccount := &messengertypes.Account{ PublicKey: "pk2", Link: "https://link2/", } @@ -693,7 +694,7 @@ func Test_dbWrapper_getAccount(t *testing.T) { require.NoError(t, db.db.Delete(refOtherAccount).Error) - require.NoError(t, db.db.Create(&ServiceToken{ + require.NoError(t, db.db.Create(&messengertypes.ServiceToken{ AccountPK: refAccount.PublicKey, TokenID: "tok1", ServiceType: "srv1", @@ -724,9 +725,9 @@ func Test_dbWrapper_getAcknowledgementsCIDsForInteraction(t *testing.T) { require.NoError(t, err) require.Empty(t, cids) - db.db.Create(&Interaction{CID: "Qm0001", Type: AppMessage_TypeAcknowledge, TargetCID: "QmTarget"}) - db.db.Create(&Interaction{CID: "Qm0002", Type: AppMessage_TypeAcknowledge, TargetCID: "QmTarget"}) - db.db.Create(&Interaction{CID: "Qm0003", Type: AppMessage_TypeAcknowledge, TargetCID: "QmOtherTarget"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0001", Type: messengertypes.AppMessage_TypeAcknowledge, TargetCID: "QmTarget"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0002", Type: messengertypes.AppMessage_TypeAcknowledge, TargetCID: "QmTarget"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm0003", Type: messengertypes.AppMessage_TypeAcknowledge, TargetCID: "QmOtherTarget"}) cids, err = db.getAcknowledgementsCIDsForInteraction("QmXX") require.NoError(t, err) @@ -749,9 +750,9 @@ func Test_dbWrapper_getAllContacts(t *testing.T) { require.NoError(t, err) require.Len(t, contacts, 0) - db.db.Create(&Contact{PublicKey: "pk1"}) - db.db.Create(&Contact{PublicKey: "pk2"}) - db.db.Create(&Contact{PublicKey: "pk3"}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk1"}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk2"}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk3"}) contacts, err = db.getAllContacts() require.NoError(t, err) @@ -766,9 +767,9 @@ func Test_dbWrapper_getAllConversations(t *testing.T) { require.NoError(t, err) require.Len(t, conversations, 0) - db.db.Create(&Conversation{PublicKey: "pk1"}) - db.db.Create(&Conversation{PublicKey: "pk2"}) - db.db.Create(&Conversation{PublicKey: "pk3"}) + db.db.Create(&messengertypes.Conversation{PublicKey: "pk1"}) + db.db.Create(&messengertypes.Conversation{PublicKey: "pk2"}) + db.db.Create(&messengertypes.Conversation{PublicKey: "pk3"}) conversations, err = db.getAllConversations() require.NoError(t, err) @@ -783,9 +784,9 @@ func Test_dbWrapper_getAllInteractions(t *testing.T) { require.NoError(t, err) require.Len(t, interactions, 0) - db.db.Create(&Interaction{CID: "Qm1"}) - db.db.Create(&Interaction{CID: "Qm2"}) - db.db.Create(&Interaction{CID: "Qm3"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm1"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm2"}) + db.db.Create(&messengertypes.Interaction{CID: "Qm3"}) interactions, err = db.getAllInteractions() require.NoError(t, err) @@ -800,9 +801,9 @@ func Test_dbWrapper_getAllMembers(t *testing.T) { require.NoError(t, err) require.Len(t, members, 0) - db.db.Create(&Member{PublicKey: "pk1"}) - db.db.Create(&Member{PublicKey: "pk2"}) - db.db.Create(&Member{PublicKey: "pk3"}) + db.db.Create(&messengertypes.Member{PublicKey: "pk1"}) + db.db.Create(&messengertypes.Member{PublicKey: "pk2"}) + db.db.Create(&messengertypes.Member{PublicKey: "pk3"}) members, err = db.getAllMembers() require.NoError(t, err) @@ -813,23 +814,23 @@ func Test_dbWrapper_getContactsByState(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - contacts, err := db.getContactsByState(Contact_Accepted) + contacts, err := db.getContactsByState(messengertypes.Contact_Accepted) require.NoError(t, err) require.Len(t, contacts, 0) - db.db.Create(&Contact{PublicKey: "pk1", State: Contact_IncomingRequest}) - db.db.Create(&Contact{PublicKey: "pk2", State: Contact_OutgoingRequestEnqueued}) - db.db.Create(&Contact{PublicKey: "pk3", State: Contact_OutgoingRequestSent}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk1", State: messengertypes.Contact_IncomingRequest}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk2", State: messengertypes.Contact_OutgoingRequestEnqueued}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk3", State: messengertypes.Contact_OutgoingRequestSent}) - contacts, err = db.getContactsByState(Contact_Accepted) + contacts, err = db.getContactsByState(messengertypes.Contact_Accepted) require.NoError(t, err) require.Len(t, contacts, 0) - db.db.Create(&Contact{PublicKey: "pk4", State: Contact_Accepted}) - db.db.Create(&Contact{PublicKey: "pk5", State: Contact_Accepted}) - db.db.Create(&Contact{PublicKey: "pk6", State: Contact_Accepted}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk4", State: messengertypes.Contact_Accepted}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk5", State: messengertypes.Contact_Accepted}) + db.db.Create(&messengertypes.Contact{PublicKey: "pk6", State: messengertypes.Contact_Accepted}) - contacts, err = db.getContactsByState(Contact_Accepted) + contacts, err = db.getContactsByState(messengertypes.Contact_Accepted) require.NoError(t, err) require.Len(t, contacts, 3) } @@ -847,7 +848,7 @@ func Test_dbWrapper_updateAccount(t *testing.T) { require.Error(t, err) require.Nil(t, acc) - db.db.Create(&Account{PublicKey: "pk_1"}) + db.db.Create(&messengertypes.Account{PublicKey: "pk_1"}) acc, err = db.updateAccount("pk_1", "", "", "") require.NoError(t, err) @@ -878,75 +879,75 @@ func Test_dbWrapper_updateContact(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - err := db.updateContact("", Contact{}) + err := db.updateContact("", messengertypes.Contact{}) require.Error(t, err) require.True(t, errcode.Is(err, errcode.ErrInvalidInput)) - err = db.updateContact("pk_1", Contact{}) + err = db.updateContact("pk_1", messengertypes.Contact{}) require.Error(t, err) - require.NoError(t, db.db.Create(&Contact{PublicKey: "pk_1"}).Error) + require.NoError(t, db.db.Create(&messengertypes.Contact{PublicKey: "pk_1"}).Error) - err = db.updateContact("pk_1", Contact{}) + err = db.updateContact("pk_1", messengertypes.Contact{}) require.NoError(t, err) - err = db.updateContact("pk_1", Contact{DisplayName: "DisplayName1"}) + err = db.updateContact("pk_1", messengertypes.Contact{DisplayName: "DisplayName1"}) require.NoError(t, err) - c := &Contact{} - require.NoError(t, db.db.First(&c, &Contact{PublicKey: "pk_1"}).Error) + c := &messengertypes.Contact{} + require.NoError(t, db.db.First(&c, &messengertypes.Contact{PublicKey: "pk_1"}).Error) require.Equal(t, "pk_1", c.PublicKey) require.Equal(t, "DisplayName1", c.DisplayName) - require.Equal(t, Contact_Undefined, c.State) + require.Equal(t, messengertypes.Contact_Undefined, c.State) - err = db.updateContact("pk_1", Contact{State: Contact_Accepted}) + err = db.updateContact("pk_1", messengertypes.Contact{State: messengertypes.Contact_Accepted}) require.NoError(t, err) - c = &Contact{} - require.NoError(t, db.db.First(&c, &Contact{PublicKey: "pk_1"}).Error) + c = &messengertypes.Contact{} + require.NoError(t, db.db.First(&c, &messengertypes.Contact{PublicKey: "pk_1"}).Error) require.Equal(t, "pk_1", c.PublicKey) require.Equal(t, "DisplayName1", c.DisplayName) - require.Equal(t, Contact_Accepted, c.State) + require.Equal(t, messengertypes.Contact_Accepted, c.State) } func Test_dbWrapper_updateConversation(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - _, err := db.updateConversation(Conversation{}) + _, err := db.updateConversation(messengertypes.Conversation{}) require.True(t, errcode.Is(err, errcode.ErrInvalidInput)) require.Error(t, err) - isNew, err := db.updateConversation(Conversation{PublicKey: "conv_1"}) + isNew, err := db.updateConversation(messengertypes.Conversation{PublicKey: "conv_1"}) require.NoError(t, err) require.True(t, isNew) - c := &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "conv_1"}).First(&c).Error) + c := &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "conv_1"}).First(&c).Error) - isNew, err = db.updateConversation(Conversation{PublicKey: "conv_1", DisplayName: "DisplayName1"}) + isNew, err = db.updateConversation(messengertypes.Conversation{PublicKey: "conv_1", DisplayName: "DisplayName1"}) require.NoError(t, err) require.False(t, isNew) - c = &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "conv_1"}).First(&c).Error) + c = &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "conv_1"}).First(&c).Error) require.Equal(t, "DisplayName1", c.DisplayName) - isNew, err = db.updateConversation(Conversation{PublicKey: "conv_1", Link: "https://link1/"}) + isNew, err = db.updateConversation(messengertypes.Conversation{PublicKey: "conv_1", Link: "https://link1/"}) require.NoError(t, err) require.False(t, isNew) - c = &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "conv_1"}).First(&c).Error) + c = &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "conv_1"}).First(&c).Error) require.Equal(t, "DisplayName1", c.DisplayName) require.Equal(t, "https://link1/", c.Link) - isNew, err = db.updateConversation(Conversation{PublicKey: "conv_1", Link: "https://link2/", DisplayName: "DisplayName2"}) + isNew, err = db.updateConversation(messengertypes.Conversation{PublicKey: "conv_1", Link: "https://link2/", DisplayName: "DisplayName2"}) require.NoError(t, err) require.False(t, isNew) - c = &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "conv_1"}).First(&c).Error) + c = &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "conv_1"}).First(&c).Error) require.Equal(t, "DisplayName2", c.DisplayName) require.Equal(t, "https://link2/", c.Link) } @@ -964,7 +965,7 @@ func Test_dbWrapper_getConversationByPK(t *testing.T) { require.Error(t, err) require.Nil(t, conversation) - db.db.Create(&Conversation{PublicKey: "conversation_1"}) + db.db.Create(&messengertypes.Conversation{PublicKey: "conversation_1"}) conversation, err = db.getConversationByPK("conversation_1") require.NoError(t, err) @@ -972,7 +973,7 @@ func Test_dbWrapper_getConversationByPK(t *testing.T) { require.Equal(t, "conversation_1", conversation.PublicKey) require.Empty(t, conversation.ReplicationInfo) - require.NoError(t, db.db.Create(&ConversationReplicationInfo{ + require.NoError(t, db.db.Create(&messengertypes.ConversationReplicationInfo{ CID: "cid_1", ConversationPublicKey: "conversation_1", }).Error) @@ -994,35 +995,35 @@ func Test_dbWrapper_getDBInfo(t *testing.T) { require.Empty(t, info) for i := 0; i < 1; i++ { - db.db.Create(&Account{PublicKey: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.Account{PublicKey: fmt.Sprintf("%d", i)}) } for i := 0; i < 2; i++ { - db.db.Create(&Contact{PublicKey: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.Contact{PublicKey: fmt.Sprintf("%d", i)}) } for i := 0; i < 3; i++ { - db.db.Create(&Interaction{CID: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.Interaction{CID: fmt.Sprintf("%d", i)}) } for i := 0; i < 4; i++ { - db.db.Create(&Conversation{PublicKey: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.Conversation{PublicKey: fmt.Sprintf("%d", i)}) } for i := 0; i < 5; i++ { - db.db.Create(&Member{PublicKey: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.Member{PublicKey: fmt.Sprintf("%d", i)}) } for i := 0; i < 6; i++ { - db.db.Create(&Device{PublicKey: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.Device{PublicKey: fmt.Sprintf("%d", i)}) } for i := 0; i < 7; i++ { - db.db.Create(&ServiceToken{ServiceType: fmt.Sprintf("%d", i), TokenID: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.ServiceToken{ServiceType: fmt.Sprintf("%d", i), TokenID: fmt.Sprintf("%d", i)}) } for i := 0; i < 8; i++ { - db.db.Create(&ConversationReplicationInfo{CID: fmt.Sprintf("%d", i)}) + db.db.Create(&messengertypes.ConversationReplicationInfo{CID: fmt.Sprintf("%d", i)}) } info, err = db.getDBInfo() @@ -1040,7 +1041,7 @@ func Test_dbWrapper_getDBInfo(t *testing.T) { tables := []string(nil) err = db.db.Raw("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'").Scan(&tables).Error require.NoError(t, err) - require.Equal(t, 8, len(tables)) + require.Equal(t, 9, len(tables)) } func Test_dbWrapper_getMemberByPK(t *testing.T) { @@ -1056,7 +1057,7 @@ func Test_dbWrapper_getMemberByPK(t *testing.T) { require.Error(t, err) require.Nil(t, member) - db.db.Create(&Member{PublicKey: "member_1", ConversationPublicKey: "conv_1"}) + db.db.Create(&messengertypes.Member{PublicKey: "member_1", ConversationPublicKey: "conv_1"}) member, err = db.getMemberByPK("member_1", "conv_1") require.NoError(t, err) @@ -1101,12 +1102,12 @@ func Test_dbWrapper_markInteractionAsAcknowledged(t *testing.T) { require.Equal(t, err, gorm.ErrRecordNotFound) require.Nil(t, interaction) - require.NoError(t, db.db.Create(&Interaction{CID: "Qm0001", Acknowledged: true}).Error) + require.NoError(t, db.db.Create(&messengertypes.Interaction{CID: "Qm0001", Acknowledged: true}).Error) interaction, err = db.markInteractionAsAcknowledged("Qm0001") require.NoError(t, err) require.Nil(t, interaction) - require.NoError(t, db.db.Create(&Interaction{CID: "Qm0002", Acknowledged: false}).Error) + require.NoError(t, db.db.Create(&messengertypes.Interaction{CID: "Qm0002", Acknowledged: false}).Error) interaction, err = db.markInteractionAsAcknowledged("Qm0002") require.NoError(t, err) require.NotNil(t, interaction) @@ -1132,17 +1133,17 @@ func Test_dbWrapper_setConversationIsOpenStatus(t *testing.T) { require.Error(t, err) require.False(t, updated) - db.db.Create(&Conversation{PublicKey: "conv1", IsOpen: true}) - db.db.Create(&Conversation{PublicKey: "conv2", IsOpen: false, UnreadCount: 1000}) - db.db.Create(&Conversation{PublicKey: "conv3", IsOpen: false, UnreadCount: 2000}) + db.db.Create(&messengertypes.Conversation{PublicKey: "conv1", IsOpen: true}) + db.db.Create(&messengertypes.Conversation{PublicKey: "conv2", IsOpen: false, UnreadCount: 1000}) + db.db.Create(&messengertypes.Conversation{PublicKey: "conv3", IsOpen: false, UnreadCount: 2000}) - c := &Conversation{} + c := &messengertypes.Conversation{} conv, updated, err = db.setConversationIsOpenStatus("conv1", true) require.NoError(t, err) require.False(t, updated) - db.db.Model(&Conversation{}).Preload("ReplicationInfo").Where(&Conversation{PublicKey: "conv1"}).First(&c) + db.db.Model(&messengertypes.Conversation{}).Preload("ReplicationInfo").Where(&messengertypes.Conversation{PublicKey: "conv1"}).First(&c) require.Equal(t, "conv1", c.PublicKey) require.True(t, c.IsOpen) require.Equal(t, int32(0), c.UnreadCount) @@ -1151,15 +1152,15 @@ func Test_dbWrapper_setConversationIsOpenStatus(t *testing.T) { require.NoError(t, err) require.True(t, updated) - c = &Conversation{} - db.db.Model(&Conversation{}).Preload("ReplicationInfo").Where(&Conversation{PublicKey: "conv1"}).First(&c) + c = &messengertypes.Conversation{} + db.db.Model(&messengertypes.Conversation{}).Preload("ReplicationInfo").Where(&messengertypes.Conversation{PublicKey: "conv1"}).First(&c) require.Equal(t, "conv1", c.PublicKey) require.False(t, c.IsOpen) require.Equal(t, int32(0), c.UnreadCount) require.Equal(t, c, conv) - c = &Conversation{} - db.db.Model(&Conversation{}).Preload("ReplicationInfo").Where(&Conversation{PublicKey: "conv2"}).First(&c) + c = &messengertypes.Conversation{} + db.db.Model(&messengertypes.Conversation{}).Preload("ReplicationInfo").Where(&messengertypes.Conversation{PublicKey: "conv2"}).First(&c) require.Equal(t, "conv2", c.PublicKey) require.False(t, c.IsOpen) require.Equal(t, int32(1000), c.UnreadCount) @@ -1168,8 +1169,8 @@ func Test_dbWrapper_setConversationIsOpenStatus(t *testing.T) { require.NoError(t, err) require.True(t, updated) - c = &Conversation{} - db.db.Model(&Conversation{}).Preload("ReplicationInfo").Where(&Conversation{PublicKey: "conv2"}).First(&c) + c = &messengertypes.Conversation{} + db.db.Model(&messengertypes.Conversation{}).Preload("ReplicationInfo").Where(&messengertypes.Conversation{PublicKey: "conv2"}).First(&c) require.Equal(t, "conv2", c.PublicKey) require.True(t, c.IsOpen) require.Equal(t, int32(0), c.UnreadCount) @@ -1185,7 +1186,7 @@ func Test_dbWrapper_tx(t *testing.T) { }) require.Error(t, err) - count, err := db.dbModelRowsCount(&Account{}) + count, err := db.dbModelRowsCount(&messengertypes.Account{}) require.NoError(t, err) require.Equal(t, int64(0), count) @@ -1196,7 +1197,7 @@ func Test_dbWrapper_tx(t *testing.T) { }) require.NoError(t, err) - count, err = db.dbModelRowsCount(&Account{}) + count, err = db.dbModelRowsCount(&messengertypes.Account{}) require.NoError(t, err) require.Equal(t, int64(1), count) @@ -1207,7 +1208,7 @@ func Test_dbWrapper_tx(t *testing.T) { }) require.Error(t, err) - count, err = db.dbModelRowsCount(&Account{}) + count, err = db.dbModelRowsCount(&messengertypes.Account{}) require.NoError(t, err) require.Equal(t, int64(1), count) } @@ -1216,14 +1217,14 @@ func Test_dbWrapper_updateConversationReadState(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - c := &Conversation{} + c := &messengertypes.Conversation{} - require.NoError(t, db.db.Create(&Conversation{PublicKey: "convo_a", UnreadCount: 0, LastUpdate: timestampMs(time.Unix(10000, 0))}).Error) - require.NoError(t, db.db.Create(&Conversation{PublicKey: "convo_b", UnreadCount: 1000, LastUpdate: timestampMs(time.Unix(20000, 0))}).Error) - require.NoError(t, db.db.Create(&Conversation{PublicKey: "convo_c", UnreadCount: 2000, LastUpdate: timestampMs(time.Unix(30000, 0))}).Error) + require.NoError(t, db.db.Create(&messengertypes.Conversation{PublicKey: "convo_a", UnreadCount: 0, LastUpdate: timestampMs(time.Unix(10000, 0))}).Error) + require.NoError(t, db.db.Create(&messengertypes.Conversation{PublicKey: "convo_b", UnreadCount: 1000, LastUpdate: timestampMs(time.Unix(20000, 0))}).Error) + require.NoError(t, db.db.Create(&messengertypes.Conversation{PublicKey: "convo_c", UnreadCount: 2000, LastUpdate: timestampMs(time.Unix(30000, 0))}).Error) - c = &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "convo_a"}).Find(&c).Error) + c = &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "convo_a"}).Find(&c).Error) require.Equal(t, "convo_a", c.PublicKey) require.Equal(t, int32(0), c.UnreadCount) require.Equal(t, timestampMs(time.Unix(10000, 0)), c.LastUpdate) @@ -1234,22 +1235,22 @@ func Test_dbWrapper_updateConversationReadState(t *testing.T) { require.NoError(t, db.updateConversationReadState("convo_a", false, time.Unix(10001, 0))) - c = &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "convo_a"}).Find(&c).Error) + c = &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "convo_a"}).Find(&c).Error) require.Equal(t, "convo_a", c.PublicKey) require.Equal(t, int32(0), c.UnreadCount) require.Equal(t, timestampMs(time.Unix(10001, 0)), c.LastUpdate) require.NoError(t, db.updateConversationReadState("convo_b", true, time.Unix(20001, 0))) - c = &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "convo_b"}).Find(&c).Error) + c = &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "convo_b"}).Find(&c).Error) require.Equal(t, "convo_b", c.PublicKey) require.Equal(t, int32(1001), c.UnreadCount) require.Equal(t, timestampMs(time.Unix(20001, 0)), c.LastUpdate) - c = &Conversation{} - require.NoError(t, db.db.Where(&Conversation{PublicKey: "convo_c"}).Find(&c).Error) + c = &messengertypes.Conversation{} + require.NoError(t, db.db.Where(&messengertypes.Conversation{PublicKey: "convo_c"}).Find(&c).Error) require.Equal(t, "convo_c", c.PublicKey) require.Equal(t, int32(2000), c.UnreadCount) require.Equal(t, timestampMs(time.Unix(30000, 0)), c.LastUpdate) @@ -1286,8 +1287,8 @@ func Test_dbWrapper_isConversationOpened(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - require.NoError(t, db.db.Create(&Conversation{PublicKey: "convo_a", IsOpen: true}).Error) - require.NoError(t, db.db.Create(&Conversation{PublicKey: "convo_b", IsOpen: false}).Error) + require.NoError(t, db.db.Create(&messengertypes.Conversation{PublicKey: "convo_a", IsOpen: true}).Error) + require.NoError(t, db.db.Create(&messengertypes.Conversation{PublicKey: "convo_b", IsOpen: false}).Error) opened, err := db.isConversationOpened("") require.Error(t, err) @@ -1306,19 +1307,19 @@ func Test_dbWrapper_addServiceToken(t *testing.T) { db, dispose := getInMemoryTestDB(t) defer dispose() - tok1 := &bertytypes.ServiceToken{ + tok1 := &protocoltypes.ServiceToken{ Token: "tok1", AuthenticationURL: "https://url1/", - SupportedServices: []*bertytypes.ServiceTokenSupportedService{ + SupportedServices: []*protocoltypes.ServiceTokenSupportedService{ {ServiceType: "srv1"}, {ServiceType: "srv2"}, }, } - tok2 := &bertytypes.ServiceToken{ + tok2 := &protocoltypes.ServiceToken{ Token: "tok2", AuthenticationURL: "https://url2/", - SupportedServices: []*bertytypes.ServiceTokenSupportedService{ + SupportedServices: []*protocoltypes.ServiceTokenSupportedService{ {ServiceType: "srv3"}, {ServiceType: "srv4"}, }, @@ -1328,10 +1329,10 @@ func Test_dbWrapper_addServiceToken(t *testing.T) { require.Error(t, err) require.True(t, errcode.Is(err, errcode.ErrInvalidInput)) - err = db.addServiceToken("", &bertytypes.ServiceToken{ + err = db.addServiceToken("", &protocoltypes.ServiceToken{ Token: "tok2", AuthenticationURL: "https://url2/", - SupportedServices: []*bertytypes.ServiceTokenSupportedService{}, + SupportedServices: []*protocoltypes.ServiceTokenSupportedService{}, }) require.Error(t, err) require.True(t, errcode.Is(err, errcode.ErrInvalidInput)) @@ -1342,23 +1343,23 @@ func Test_dbWrapper_addServiceToken(t *testing.T) { err = db.addServiceToken("acc_1", tok2) require.NoError(t, err) - tok := &ServiceToken{} - require.NoError(t, db.db.Model(&ServiceToken{}).Where(&ServiceToken{TokenID: tok1.TokenID(), ServiceType: "srv1"}).First(&tok).Error) + tok := &messengertypes.ServiceToken{} + require.NoError(t, db.db.Model(&messengertypes.ServiceToken{}).Where(&messengertypes.ServiceToken{TokenID: tok1.TokenID(), ServiceType: "srv1"}).First(&tok).Error) require.Equal(t, tok1.TokenID(), tok.TokenID) require.Equal(t, "srv1", tok.ServiceType) require.Equal(t, tok1.AuthenticationURL, tok.AuthenticationURL) - tok = &ServiceToken{} - require.NoError(t, db.db.Model(&ServiceToken{}).Where(&ServiceToken{TokenID: tok2.TokenID(), ServiceType: "srv3"}).First(&tok).Error) + tok = &messengertypes.ServiceToken{} + require.NoError(t, db.db.Model(&messengertypes.ServiceToken{}).Where(&messengertypes.ServiceToken{TokenID: tok2.TokenID(), ServiceType: "srv3"}).First(&tok).Error) require.Equal(t, tok2.TokenID(), tok.TokenID) require.Equal(t, "srv3", tok.ServiceType) require.Equal(t, tok2.AuthenticationURL, tok.AuthenticationURL) - tok = &ServiceToken{} - require.Error(t, db.db.Model(&ServiceToken{}).Where(&ServiceToken{TokenID: tok1.TokenID(), ServiceType: "srv3"}).First(&tok).Error) + tok = &messengertypes.ServiceToken{} + require.Error(t, db.db.Model(&messengertypes.ServiceToken{}).Where(&messengertypes.ServiceToken{TokenID: tok1.TokenID(), ServiceType: "srv3"}).First(&tok).Error) - tok = &ServiceToken{} - require.Error(t, db.db.Model(&ServiceToken{}).Where(&ServiceToken{TokenID: tok2.TokenID(), ServiceType: "srv2"}).First(&tok).Error) + tok = &messengertypes.ServiceToken{} + require.Error(t, db.db.Model(&messengertypes.ServiceToken{}).Where(&messengertypes.ServiceToken{TokenID: tok2.TokenID(), ServiceType: "srv2"}).First(&tok).Error) } func Test_dbWrapper_getReplyOptionsCIDForConversation(t *testing.T) { @@ -1373,27 +1374,152 @@ func Test_dbWrapper_getReplyOptionsCIDForConversation(t *testing.T) { require.NoError(t, err) require.Equal(t, "", cid) - db.db.Create(&Interaction{CID: "cid_1", Type: AppMessage_TypeReplyOptions, ConversationPublicKey: "conv_1", IsMe: false}) + db.db.Create(&messengertypes.Interaction{CID: "cid_1", Type: messengertypes.AppMessage_TypeReplyOptions, ConversationPublicKey: "conv_1", IsMe: false}) cid, err = db.getReplyOptionsCIDForConversation("conv_1") require.NoError(t, err) require.Equal(t, "cid_1", cid) - db.db.Create(&Interaction{CID: "cid_2", Type: AppMessage_TypeUserMessage, ConversationPublicKey: "conv_1", IsMe: false}) + db.db.Create(&messengertypes.Interaction{CID: "cid_2", Type: messengertypes.AppMessage_TypeUserMessage, ConversationPublicKey: "conv_1", IsMe: false}) cid, err = db.getReplyOptionsCIDForConversation("conv_1") require.NoError(t, err) require.Equal(t, "cid_1", cid) - db.db.Create(&Interaction{CID: "cid_3", Type: AppMessage_TypeReplyOptions, ConversationPublicKey: "conv_1", IsMe: false}) + db.db.Create(&messengertypes.Interaction{CID: "cid_3", Type: messengertypes.AppMessage_TypeReplyOptions, ConversationPublicKey: "conv_1", IsMe: false}) cid, err = db.getReplyOptionsCIDForConversation("conv_1") require.NoError(t, err) require.Equal(t, "cid_3", cid) - db.db.Create(&Interaction{CID: "cid_4", Type: AppMessage_TypeUserMessage, ConversationPublicKey: "conv_1", IsMe: true}) + db.db.Create(&messengertypes.Interaction{CID: "cid_4", Type: messengertypes.AppMessage_TypeUserMessage, ConversationPublicKey: "conv_1", IsMe: true}) cid, err = db.getReplyOptionsCIDForConversation("conv_1") require.NoError(t, err) require.Equal(t, "", cid) } + +func Test_dbWrapper_addMedias_none(t *testing.T) { + db, dispose := getInMemoryTestDB(t) + defer dispose() + + added, err := db.addMedias([]*messengertypes.Media{}) + require.NoError(t, err) + require.Equal(t, []bool{}, added) + + var medias []*messengertypes.Media + require.NoError(t, db.db.Find(&medias).Error) + require.Empty(t, medias) +} + +func Test_dbWrapper_addMedias_one(t *testing.T) { + db, dispose := getInMemoryTestDB(t) + defer dispose() + + media := messengertypes.Media{ + CID: "EiBnLu1b0PFzPcVd_QPPfhzIs0kmzAH2g0VUfiAqvIXMLg", InteractionCID: "testInteractionCID", + MimeType: "testMimeType", Filename: "testFilename", DisplayName: "testDisplayName", + State: messengertypes.Media_StateDownloaded, + } + + added, err := db.addMedias([]*messengertypes.Media{&media}) + require.NoError(t, err) + require.Equal(t, []bool{true}, added) + + var medias []*messengertypes.Media + require.NoError(t, db.db.Find(&medias).Error) + + require.Equal(t, 1, len(medias)) + require.Equal(t, &media, medias[0]) +} + +func Test_dbWrapper_addMedias_mix(t *testing.T) { + db, dispose := getInMemoryTestDB(t) + defer dispose() + + testMedias := []*messengertypes.Media{ + {CID: "EiBnLu1b0PFzPcVd_QPPfhzIs0kmzAH2g0VUfiAqvIXMLg"}, + {CID: "EiBnLu1b0PFzPcVd_QPPfhzIs1kmzAH2g0VUfiAqvIXMLg", MimeType: "testMimeType1", Filename: "testFilename1"}, + { + CID: "EiBnLu1b0PFzPcVd_QPPfhzIs2kmzAH2g0VUfiAqvIXMLg", InteractionCID: "testInteractionCID", MimeType: "testMimeType2", + Filename: "testFilename2", DisplayName: "testDisplayName", State: messengertypes.Media_StateDownloaded, + }, + } + + added, err := db.addMedias(testMedias) + require.NoError(t, err) + require.Equal(t, []bool{true, true, true}, added) + added, err = db.addMedias(testMedias) + require.NoError(t, err) + require.Equal(t, []bool{false, false, false}, added) + + var medias []*messengertypes.Media + require.NoError(t, db.db.Find(&medias).Error) + require.Equal(t, testMedias, medias) +} + +func Test_dbWrapper_getMedias_none(t *testing.T) { + db, dispose := getInMemoryTestDB(t) + defer dispose() + + medias, err := db.getMedias(nil) + require.NoError(t, err) + require.Empty(t, medias) + + medias, err = db.getMedias([]string{}) + require.NoError(t, err) + require.Empty(t, medias) + + testMedia := messengertypes.Media{CID: "EiBnLu1b0PFzPcVd_QPPfhzIs0kmzAH2g0VUfiAqvIXMLg"} + medias, err = db.getMedias([]string{testMedia.CID}) + require.NoError(t, err) + require.Equal(t, 1, len(medias)) + require.Equal(t, &testMedia, medias[0]) +} + +func Test_dbWrapper_getMedias_one(t *testing.T) { + db, dispose := getInMemoryTestDB(t) + defer dispose() + + testMedia := messengertypes.Media{ + CID: "EiBnLu1b0PFzPcVd_QPPfhzIs0kmzAH2g0VUfiAqvIXMLg", InteractionCID: "testInteractionCID", + MimeType: "testMimeType", Filename: "testFilename", DisplayName: "testDisplayName", + State: messengertypes.Media_StateDownloaded, + } + + added, err := db.addMedias([]*messengertypes.Media{&testMedia}) + require.NoError(t, err) + require.Equal(t, []bool{true}, added) + + medias, err := db.getMedias([]string{testMedia.CID}) + require.NoError(t, err) + require.Equal(t, 1, len(medias)) + require.Equal(t, &testMedia, medias[0]) +} + +func Test_dbWrapper_getMedias_mix(t *testing.T) { + db, dispose := getInMemoryTestDB(t) + defer dispose() + + testMedias := []*messengertypes.Media{ + {CID: "EiBnLu1b0PFzPcVd_QPPfhzIs0kmzAH2g0VUfiAqvIXMLg"}, + {CID: "EiBnLu1b0PFzPcVd_QPPfhzIs1kmzAH2g0VUfiAqvIXMLg", MimeType: "testMimeType1", Filename: "testFilename1"}, + { + CID: "EiBnLu1b0PFzPcVd_QPPfhzIs2kmzAH2g0VUfiAqvIXMLg", InteractionCID: "testInteractionCID", MimeType: "testMimeType2", + Filename: "testFilename2", DisplayName: "testDisplayName", State: messengertypes.Media_StateDownloaded, + }, + } + + added, err := db.addMedias(testMedias) + require.NoError(t, err) + require.Equal(t, []bool{true, true, true}, added) + + cids := make([]string, len(testMedias)) + for i, m := range testMedias { + cids[i] = m.GetCID() + } + + medias, err := db.getMedias(cids) + require.NoError(t, err) + require.Equal(t, testMedias, medias) +} diff --git a/go/pkg/bertymessenger/db_utils.go b/go/pkg/bertymessenger/db_utils.go index ed2d4a6752..24fcdd43fc 100644 --- a/go/pkg/bertymessenger/db_utils.go +++ b/go/pkg/bertymessenger/db_utils.go @@ -8,6 +8,7 @@ import ( "gorm.io/gorm" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" ) type ColumnInfo struct { @@ -102,7 +103,7 @@ func compareDBSchema(dbA map[string][]*ColumnInfo, dbB map[string][]*ColumnInfo) return errs } -func restoreDatabaseLocalState(db *dbWrapper, state *LocalDatabaseState) error { +func restoreDatabaseLocalState(db *dbWrapper, state *messengertypes.LocalDatabaseState) error { if state == nil { return nil } diff --git a/go/pkg/bertymessenger/handlers.go b/go/pkg/bertymessenger/handlers.go index a7692f8e5a..ba9158f8ca 100644 --- a/go/pkg/bertymessenger/handlers.go +++ b/go/pkg/bertymessenger/handlers.go @@ -11,26 +11,26 @@ import ( "go.uber.org/zap" "gorm.io/gorm" - "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type eventHandler struct { ctx context.Context db *dbWrapper - protocolClient bertyprotocol.ProtocolServiceClient // TODO: on usage ensure meaningful calls + protocolClient protocoltypes.ProtocolServiceClient // TODO: on usage ensure meaningful calls logger *zap.Logger svc *service // TODO: on usage ensure not nil - metadataHandlers map[bertytypes.EventType]func(gme *bertytypes.GroupMetadataEvent) error + metadataHandlers map[protocoltypes.EventType]func(gme *protocoltypes.GroupMetadataEvent) error replay bool - appMessageHandlers map[AppMessage_Type]struct { - handler func(tx *dbWrapper, i *Interaction, amPayload proto.Message) (*Interaction, bool, error) + appMessageHandlers map[messengertypes.AppMessage_Type]struct { + handler func(tx *dbWrapper, i *messengertypes.Interaction, amPayload proto.Message) (*messengertypes.Interaction, bool, error) isVisibleEvent bool } } -func newEventHandler(ctx context.Context, db *dbWrapper, protocolClient bertyprotocol.ProtocolServiceClient, logger *zap.Logger, svc *service, replay bool) *eventHandler { +func newEventHandler(ctx context.Context, db *dbWrapper, protocolClient protocoltypes.ProtocolServiceClient, logger *zap.Logger, svc *service, replay bool) *eventHandler { if logger == nil { logger = zap.NewNop() } @@ -44,33 +44,33 @@ func newEventHandler(ctx context.Context, db *dbWrapper, protocolClient bertypro replay: replay, } - h.metadataHandlers = map[bertytypes.EventType]func(gme *bertytypes.GroupMetadataEvent) error{ - bertytypes.EventTypeAccountGroupJoined: h.accountGroupJoined, - bertytypes.EventTypeAccountContactRequestOutgoingEnqueued: h.accountContactRequestOutgoingEnqueued, - bertytypes.EventTypeAccountContactRequestOutgoingSent: h.accountContactRequestOutgoingSent, - bertytypes.EventTypeAccountContactRequestIncomingReceived: h.accountContactRequestIncomingReceived, - bertytypes.EventTypeAccountContactRequestIncomingAccepted: h.accountContactRequestIncomingAccepted, - bertytypes.EventTypeGroupMemberDeviceAdded: h.groupMemberDeviceAdded, - bertytypes.EventTypeGroupMetadataPayloadSent: h.groupMetadataPayloadSent, - bertytypes.EventTypeAccountServiceTokenAdded: h.accountServiceTokenAdded, - bertytypes.EventTypeGroupReplicating: h.groupReplicating, + h.metadataHandlers = map[protocoltypes.EventType]func(gme *protocoltypes.GroupMetadataEvent) error{ + protocoltypes.EventTypeAccountGroupJoined: h.accountGroupJoined, + protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued: h.accountContactRequestOutgoingEnqueued, + protocoltypes.EventTypeAccountContactRequestOutgoingSent: h.accountContactRequestOutgoingSent, + protocoltypes.EventTypeAccountContactRequestIncomingReceived: h.accountContactRequestIncomingReceived, + protocoltypes.EventTypeAccountContactRequestIncomingAccepted: h.accountContactRequestIncomingAccepted, + protocoltypes.EventTypeGroupMemberDeviceAdded: h.groupMemberDeviceAdded, + protocoltypes.EventTypeGroupMetadataPayloadSent: h.groupMetadataPayloadSent, + protocoltypes.EventTypeAccountServiceTokenAdded: h.accountServiceTokenAdded, + protocoltypes.EventTypeGroupReplicating: h.groupReplicating, } - h.appMessageHandlers = map[AppMessage_Type]struct { - handler func(tx *dbWrapper, i *Interaction, amPayload proto.Message) (*Interaction, bool, error) + h.appMessageHandlers = map[messengertypes.AppMessage_Type]struct { + handler func(tx *dbWrapper, i *messengertypes.Interaction, amPayload proto.Message) (*messengertypes.Interaction, bool, error) isVisibleEvent bool }{ - AppMessage_TypeAcknowledge: {h.handleAppMessageAcknowledge, false}, - AppMessage_TypeGroupInvitation: {h.handleAppMessageGroupInvitation, true}, - AppMessage_TypeUserMessage: {h.handleAppMessageUserMessage, true}, - AppMessage_TypeSetUserInfo: {h.handleAppMessageSetUserInfo, false}, - AppMessage_TypeReplyOptions: {h.handleAppMessageReplyOptions, true}, + messengertypes.AppMessage_TypeAcknowledge: {h.handleAppMessageAcknowledge, false}, + messengertypes.AppMessage_TypeGroupInvitation: {h.handleAppMessageGroupInvitation, true}, + messengertypes.AppMessage_TypeUserMessage: {h.handleAppMessageUserMessage, true}, + messengertypes.AppMessage_TypeSetUserInfo: {h.handleAppMessageSetUserInfo, false}, + messengertypes.AppMessage_TypeReplyOptions: {h.handleAppMessageReplyOptions, true}, } return h } -func (h *eventHandler) handleMetadataEvent(gme *bertytypes.GroupMetadataEvent) error { +func (h *eventHandler) handleMetadataEvent(gme *protocoltypes.GroupMetadataEvent) error { et := gme.GetMetadata().GetEventType() h.logger.Info("received protocol event", zap.String("type", et.String())) @@ -84,8 +84,8 @@ func (h *eventHandler) handleMetadataEvent(gme *bertytypes.GroupMetadataEvent) e return handler(gme) } -func (h *eventHandler) handleAppMessage(gpk string, gme *bertytypes.GroupMessageEvent, am *AppMessage) error { - if am.GetType() != AppMessage_TypeAcknowledge { +func (h *eventHandler) handleAppMessage(gpk string, gme *protocoltypes.GroupMessageEvent, am *messengertypes.AppMessage) error { + if am.GetType() != messengertypes.AppMessage_TypeAcknowledge { h.logger.Info("handling app message", zap.String("type", am.GetType().String())) } @@ -103,9 +103,16 @@ func (h *eventHandler) handleAppMessage(gpk string, gme *bertytypes.GroupMessage return nil } + medias := i.GetMedias() + var mediasAdded []bool + // start a transaction var isNew bool if err := h.db.tx(func(tx *dbWrapper) error { + if mediasAdded, err = tx.addMedias(medias); err != nil { + return err + } + if err := h.interactionFetchRelations(tx, i); err != nil { return err } @@ -136,16 +143,24 @@ func (h *eventHandler) handleAppMessage(gpk string, gme *bertytypes.GroupMessage } } + for i, media := range medias { + if mediasAdded[i] { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeMediaUpdated, &messengertypes.StreamEvent_MediaUpdated{Media: media}, true); err != nil { + h.logger.Error("unable to dispatch notification for media", zap.String("cid", media.CID), zap.Error(err)) + } + } + } + return nil } -func (h *eventHandler) accountServiceTokenAdded(gme *bertytypes.GroupMetadataEvent) error { - config, err := h.protocolClient.InstanceGetConfiguration(h.ctx, &bertytypes.InstanceGetConfiguration_Request{}) +func (h *eventHandler) accountServiceTokenAdded(gme *protocoltypes.GroupMetadataEvent) error { + config, err := h.protocolClient.InstanceGetConfiguration(h.ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return err } - var ev bertytypes.AccountServiceTokenAdded + var ev protocoltypes.AccountServiceTokenAdded if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return errcode.ErrDeserialization.Wrap(err) } @@ -161,7 +176,7 @@ func (h *eventHandler) accountServiceTokenAdded(gme *bertytypes.GroupMetadataEve return errcode.ErrDBRead.Wrap(err) } - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeAccountUpdated, &StreamEvent_AccountUpdated{Account: acc}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeAccountUpdated, &messengertypes.StreamEvent_AccountUpdated{Account: acc}, false); err != nil { return errcode.TODO.Wrap(err) } } @@ -169,8 +184,8 @@ func (h *eventHandler) accountServiceTokenAdded(gme *bertytypes.GroupMetadataEve return nil } -func (h *eventHandler) groupReplicating(gme *bertytypes.GroupMetadataEvent) error { - var ev bertytypes.GroupReplicating +func (h *eventHandler) groupReplicating(gme *protocoltypes.GroupMetadataEvent) error { + var ev protocoltypes.GroupReplicating if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return errcode.ErrDeserialization.Wrap(err) } @@ -182,7 +197,7 @@ func (h *eventHandler) groupReplicating(gme *bertytypes.GroupMetadataEvent) erro convPK := b64EncodeBytes(gme.EventContext.GroupPK) - if err := h.db.saveConversationReplicationInfo(ConversationReplicationInfo{ + if err := h.db.saveConversationReplicationInfo(messengertypes.ConversationReplicationInfo{ CID: cid.String(), ConversationPublicKey: convPK, MemberPublicKey: "", // TODO @@ -198,28 +213,28 @@ func (h *eventHandler) groupReplicating(gme *bertytypes.GroupMetadataEvent) erro if conv, err := h.db.getConversationByPK(convPK); err != nil { h.logger.Warn("unknown conversation", zap.String("conversation-pk", convPK)) - } else if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conv}, false); err != nil { + } else if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conv}, false); err != nil { return err } return nil } -func (h *eventHandler) groupMetadataPayloadSent(gme *bertytypes.GroupMetadataEvent) error { - var appMetadata bertytypes.AppMetadata +func (h *eventHandler) groupMetadataPayloadSent(gme *protocoltypes.GroupMetadataEvent) error { + var appMetadata protocoltypes.AppMetadata if err := proto.Unmarshal(gme.GetEvent(), &appMetadata); err != nil { return err } - var appMessage AppMessage + var appMessage messengertypes.AppMessage if err := proto.Unmarshal(appMetadata.GetMessage(), &appMessage); err != nil { return err } - groupMessageEvent := bertytypes.GroupMessageEvent{ + groupMessageEvent := protocoltypes.GroupMessageEvent{ EventContext: gme.GetEventContext(), Message: appMetadata.GetMessage(), - Headers: &bertytypes.MessageHeaders{DevicePK: appMetadata.GetDevicePK()}, + Headers: &protocoltypes.MessageHeaders{DevicePK: appMetadata.GetDevicePK()}, } groupPK := b64EncodeBytes(gme.GetEventContext().GetGroupPK()) @@ -227,8 +242,8 @@ func (h *eventHandler) groupMetadataPayloadSent(gme *bertytypes.GroupMetadataEve return h.handleAppMessage(groupPK, &groupMessageEvent, &appMessage) } -func (h *eventHandler) accountGroupJoined(gme *bertytypes.GroupMetadataEvent) error { - var ev bertytypes.AccountGroupJoined +func (h *eventHandler) accountGroupJoined(gme *protocoltypes.GroupMetadataEvent) error { + var ev protocoltypes.AccountGroupJoined if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return err } @@ -248,7 +263,7 @@ func (h *eventHandler) accountGroupJoined(gme *bertytypes.GroupMetadataEvent) er // dispatch event if h.svc != nil { - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conversation}, true); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conversation}, true); err != nil { return err } } @@ -256,7 +271,7 @@ func (h *eventHandler) accountGroupJoined(gme *bertytypes.GroupMetadataEvent) er // activate group if h.svc != nil { - if _, err := h.protocolClient.ActivateGroup(h.ctx, &bertytypes.ActivateGroup_Request{GroupPK: gpkb}); err != nil { + if _, err := h.protocolClient.ActivateGroup(h.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: gpkb}); err != nil { h.logger.Warn("failed to activate group", zap.String("pk", b64EncodeBytes(gpkb))) } @@ -271,8 +286,8 @@ func (h *eventHandler) accountGroupJoined(gme *bertytypes.GroupMetadataEvent) er return nil } -func (h *eventHandler) accountContactRequestOutgoingEnqueued(gme *bertytypes.GroupMetadataEvent) error { - var ev bertytypes.AccountContactRequestEnqueued +func (h *eventHandler) accountContactRequestOutgoingEnqueued(gme *protocoltypes.GroupMetadataEvent) error { + var ev protocoltypes.AccountContactRequestEnqueued if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return err } @@ -280,7 +295,7 @@ func (h *eventHandler) accountContactRequestOutgoingEnqueued(gme *bertytypes.Gro contactPKBytes := ev.GetContact().GetPK() contactPK := b64EncodeBytes(contactPKBytes) - var cm ContactMetadata + var cm messengertypes.ContactMetadata err := proto.Unmarshal(ev.GetContact().GetMetadata(), &cm) if err != nil { return err @@ -288,7 +303,7 @@ func (h *eventHandler) accountContactRequestOutgoingEnqueued(gme *bertytypes.Gro gpk := b64EncodeBytes(ev.GetGroupPK()) if gpk == "" { - groupInfoReply, err := h.protocolClient.GroupInfo(h.ctx, &bertytypes.GroupInfo_Request{ContactPK: contactPKBytes}) + groupInfoReply, err := h.protocolClient.GroupInfo(h.ctx, &protocoltypes.GroupInfo_Request{ContactPK: contactPKBytes}) if err != nil { return errcode.TODO.Wrap(err) } @@ -303,7 +318,7 @@ func (h *eventHandler) accountContactRequestOutgoingEnqueued(gme *bertytypes.Gro } // create new contact conversation - var conversation *Conversation + var conversation *messengertypes.Conversation // update db if err := h.db.tx(func(tx *dbWrapper) error { @@ -320,11 +335,11 @@ func (h *eventHandler) accountContactRequestOutgoingEnqueued(gme *bertytypes.Gro } if h.svc != nil { - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeContactUpdated, &StreamEvent_ContactUpdated{contact}, true); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeContactUpdated, &messengertypes.StreamEvent_ContactUpdated{Contact: contact}, true); err != nil { return err } - if err = h.svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conversation}, true); err != nil { + if err = h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conversation}, true); err != nil { return err } } @@ -332,8 +347,8 @@ func (h *eventHandler) accountContactRequestOutgoingEnqueued(gme *bertytypes.Gro return nil } -func (h *eventHandler) accountContactRequestOutgoingSent(gme *bertytypes.GroupMetadataEvent) error { - var ev bertytypes.AccountContactRequestSent +func (h *eventHandler) accountContactRequestOutgoingSent(gme *protocoltypes.GroupMetadataEvent) error { + var ev protocoltypes.AccountContactRequestSent if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return err } @@ -347,16 +362,16 @@ func (h *eventHandler) accountContactRequestOutgoingSent(gme *bertytypes.GroupMe // dispatch event and subscribe to group metadata if h.svc != nil { - err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeContactUpdated, &StreamEvent_ContactUpdated{contact}, false) + err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeContactUpdated, &messengertypes.StreamEvent_ContactUpdated{Contact: contact}, false) if err != nil { return err } err = h.svc.dispatcher.Notify( - StreamEvent_Notified_TypeContactRequestSent, + messengertypes.StreamEvent_Notified_TypeContactRequestSent, "Contact request sent", "To: "+contact.GetDisplayName(), - &StreamEvent_Notified_ContactRequestSent{Contact: contact}, + &messengertypes.StreamEvent_Notified_ContactRequestSent{Contact: contact}, ) if err != nil { h.logger.Warn("failed to notify", zap.Error(err)) @@ -367,7 +382,7 @@ func (h *eventHandler) accountContactRequestOutgoingSent(gme *bertytypes.GroupMe return err } - if _, err = h.protocolClient.ActivateGroup(h.ctx, &bertytypes.ActivateGroup_Request{GroupPK: groupPK}); err != nil { + if _, err = h.protocolClient.ActivateGroup(h.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: groupPK}); err != nil { h.logger.Warn("failed to activate group", zap.String("pk", b64EncodeBytes(groupPK))) } @@ -381,14 +396,14 @@ func (h *eventHandler) accountContactRequestOutgoingSent(gme *bertytypes.GroupMe return nil } -func (h *eventHandler) accountContactRequestIncomingReceived(gme *bertytypes.GroupMetadataEvent) error { - var ev bertytypes.AccountContactRequestReceived +func (h *eventHandler) accountContactRequestIncomingReceived(gme *protocoltypes.GroupMetadataEvent) error { + var ev protocoltypes.AccountContactRequestReceived if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return err } contactPK := b64EncodeBytes(ev.GetContactPK()) - var m ContactMetadata + var m messengertypes.ContactMetadata err := proto.Unmarshal(ev.GetContactMetadata(), &m) if err != nil { return err @@ -408,7 +423,7 @@ func (h *eventHandler) accountContactRequestIncomingReceived(gme *bertytypes.Gro } // create new contact conversation - var conversation *Conversation + var conversation *messengertypes.Conversation // update db if err := h.db.tx(func(tx *dbWrapper) error { @@ -425,19 +440,19 @@ func (h *eventHandler) accountContactRequestIncomingReceived(gme *bertytypes.Gro } if h.svc != nil { - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeContactUpdated, &StreamEvent_ContactUpdated{contact}, true); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeContactUpdated, &messengertypes.StreamEvent_ContactUpdated{Contact: contact}, true); err != nil { return err } - if err = h.svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conversation}, true); err != nil { + if err = h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conversation}, true); err != nil { return err } err = h.svc.dispatcher.Notify( - StreamEvent_Notified_TypeContactRequestReceived, + messengertypes.StreamEvent_Notified_TypeContactRequestReceived, "Contact request received", "From: "+contact.GetDisplayName(), - &StreamEvent_Notified_ContactRequestReceived{Contact: contact}, + &messengertypes.StreamEvent_Notified_ContactRequestReceived{Contact: contact}, ) if err != nil { h.logger.Warn("failed to notify", zap.Error(err)) @@ -447,8 +462,8 @@ func (h *eventHandler) accountContactRequestIncomingReceived(gme *bertytypes.Gro return nil } -func (h *eventHandler) accountContactRequestIncomingAccepted(gme *bertytypes.GroupMetadataEvent) error { - var ev bertytypes.AccountContactRequestAccepted +func (h *eventHandler) accountContactRequestIncomingAccepted(gme *protocoltypes.GroupMetadataEvent) error { + var ev protocoltypes.AccountContactRequestAccepted if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return err } @@ -469,12 +484,12 @@ func (h *eventHandler) accountContactRequestIncomingAccepted(gme *bertytypes.Gro if h.svc != nil { // dispatch event to subscribers - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeContactUpdated, &StreamEvent_ContactUpdated{contact}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeContactUpdated, &messengertypes.StreamEvent_ContactUpdated{Contact: contact}, false); err != nil { return err } // activate group - if _, err := h.protocolClient.ActivateGroup(h.svc.ctx, &bertytypes.ActivateGroup_Request{GroupPK: groupPK}); err != nil { + if _, err := h.protocolClient.ActivateGroup(h.svc.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: groupPK}); err != nil { h.svc.logger.Warn("failed to activate group", zap.String("pk", b64EncodeBytes(groupPK))) } @@ -489,7 +504,7 @@ func (h *eventHandler) accountContactRequestIncomingAccepted(gme *bertytypes.Gro return nil } -func (h *eventHandler) contactRequestAccepted(contact *Contact, memberPK []byte) error { +func (h *eventHandler) contactRequestAccepted(contact *messengertypes.Contact, memberPK []byte) error { // someone you invited just accepted the invitation // update contact var groupPK []byte @@ -499,7 +514,7 @@ func (h *eventHandler) contactRequestAccepted(contact *Contact, memberPK []byte) return errcode.ErrInternal.Wrap(fmt.Errorf("can't get group public key for contact %w", err)) } - contact.State = Contact_Accepted + contact.State = messengertypes.Contact_Accepted contact.ConversationPublicKey = b64EncodeBytes(groupPK) } @@ -519,12 +534,12 @@ func (h *eventHandler) contactRequestAccepted(contact *Contact, memberPK []byte) if h.svc != nil { // dispatch events - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeContactUpdated, &StreamEvent_ContactUpdated{contact}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeContactUpdated, &messengertypes.StreamEvent_ContactUpdated{Contact: contact}, false); err != nil { return err } // activate group and subscribe to message events - if _, err := h.protocolClient.ActivateGroup(h.svc.ctx, &bertytypes.ActivateGroup_Request{GroupPK: groupPK}); err != nil { + if _, err := h.protocolClient.ActivateGroup(h.svc.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: groupPK}); err != nil { h.svc.logger.Warn("failed to activate group", zap.String("pk", b64EncodeBytes(groupPK))) } @@ -538,8 +553,8 @@ func (h *eventHandler) contactRequestAccepted(contact *Contact, memberPK []byte) // * on AccountGroup when you add a new device to your group // * on ContactGroup when you or your contact add a new device // * on MultiMemberGroup when you or anyone in a multimember group adds a new device -func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent) error { - var ev bertytypes.GroupAddMemberDevice +func (h *eventHandler) groupMemberDeviceAdded(gme *protocoltypes.GroupMetadataEvent) error { + var ev protocoltypes.GroupAddMemberDevice if err := proto.Unmarshal(gme.GetEvent(), &ev); err != nil { return err } @@ -560,9 +575,9 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent if isMe, err := checkIsMe( h.ctx, h.protocolClient, - &bertytypes.GroupMessageEvent{ + &protocoltypes.GroupMessageEvent{ EventContext: gme.GetEventContext(), - Headers: &bertytypes.MessageHeaders{DevicePK: dpkb}, + Headers: &protocoltypes.MessageHeaders{DevicePK: dpkb}, }, ); err != nil { return err @@ -579,7 +594,7 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent } if h.svc != nil { - err = h.svc.dispatcher.StreamEvent(StreamEvent_TypeDeviceUpdated, &StreamEvent_DeviceUpdated{Device: device}, true) + err = h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeDeviceUpdated, &messengertypes.StreamEvent_DeviceUpdated{Device: device}, true) if err != nil { h.logger.Error("error dispatching device updated", zap.Error(err)) } @@ -587,7 +602,7 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent } // Check whether a contact request has been accepted (a device from the contact has been added to the group) - if contact, err := h.db.getContactByPK(mpk); err == nil && contact.GetState() == Contact_OutgoingRequestSent { + if contact, err := h.db.getContactByPK(mpk); err == nil && contact.GetState() == messengertypes.Contact_OutgoingRequestSent { if err := h.contactRequestAccepted(contact, mpkb); err != nil { return err } @@ -600,7 +615,7 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent return err } - userInfo := (*AppMessage_SetUserInfo)(nil) + userInfo := (*messengertypes.AppMessage_SetUserInfo)(nil) for _, elem := range backlog { h.logger.Info("found elem in backlog", zap.String("type", elem.GetType().String()), zap.String("device-pk", elem.GetDevicePublicKey()), zap.String("conv", elem.GetConversationPublicKey())) @@ -608,8 +623,8 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent elem.MemberPublicKey = mpk switch elem.GetType() { - case AppMessage_TypeSetUserInfo: - var payload AppMessage_SetUserInfo + case messengertypes.AppMessage_TypeSetUserInfo: + var payload messengertypes.AppMessage_SetUserInfo if err := proto.Unmarshal(elem.GetPayload(), &payload); err != nil { return err @@ -622,14 +637,14 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent } if h.svc != nil { - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionDeleted, &StreamEvent_InteractionDeleted{elem.GetCID()}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionDeleted, &messengertypes.StreamEvent_InteractionDeleted{CID: elem.GetCID()}, false); err != nil { return err } } default: if h.svc != nil { - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionUpdated, &StreamEvent_InteractionUpdated{elem}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionUpdated, &messengertypes.StreamEvent_InteractionUpdated{Interaction: elem}, false); err != nil { return err } } @@ -642,7 +657,7 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent } if h.svc != nil { - err = h.svc.dispatcher.StreamEvent(StreamEvent_TypeMemberUpdated, &StreamEvent_MemberUpdated{member}, true) + err = h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeMemberUpdated, &messengertypes.StreamEvent_MemberUpdated{Member: member}, true) if err != nil { return err } @@ -654,8 +669,8 @@ func (h *eventHandler) groupMemberDeviceAdded(gme *bertytypes.GroupMetadataEvent return nil } -func (h *eventHandler) handleAppMessageAcknowledge(tx *dbWrapper, i *Interaction, amPayload proto.Message) (*Interaction, bool, error) { - payload := amPayload.(*AppMessage_Acknowledge) +func (h *eventHandler) handleAppMessageAcknowledge(tx *dbWrapper, i *messengertypes.Interaction, amPayload proto.Message) (*messengertypes.Interaction, bool, error) { + payload := amPayload.(*messengertypes.AppMessage_Acknowledge) target, err := tx.markInteractionAsAcknowledged(payload.Target) switch { @@ -674,7 +689,7 @@ func (h *eventHandler) handleAppMessageAcknowledge(tx *dbWrapper, i *Interaction default: if target != nil && h.svc != nil { - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionUpdated, &StreamEvent_InteractionUpdated{target}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionUpdated, &messengertypes.StreamEvent_InteractionUpdated{Interaction: target}, false); err != nil { h.logger.Error("error while sending stream event", zap.String("public-key", i.ConversationPublicKey), zap.String("cid", i.CID), zap.Error(err)) } } @@ -683,14 +698,14 @@ func (h *eventHandler) handleAppMessageAcknowledge(tx *dbWrapper, i *Interaction } } -func (h *eventHandler) handleAppMessageGroupInvitation(tx *dbWrapper, i *Interaction, _ proto.Message) (*Interaction, bool, error) { +func (h *eventHandler) handleAppMessageGroupInvitation(tx *dbWrapper, i *messengertypes.Interaction, _ proto.Message) (*messengertypes.Interaction, bool, error) { i, isNew, err := tx.addInteraction(*i) if err != nil { return nil, isNew, err } if h.svc != nil { - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionUpdated, &StreamEvent_InteractionUpdated{i}, isNew); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionUpdated, &messengertypes.StreamEvent_InteractionUpdated{Interaction: i}, isNew); err != nil { return nil, isNew, err } } @@ -698,7 +713,7 @@ func (h *eventHandler) handleAppMessageGroupInvitation(tx *dbWrapper, i *Interac return i, isNew, err } -func (h *eventHandler) handleAppMessageUserMessage(tx *dbWrapper, i *Interaction, amPayload proto.Message) (*Interaction, bool, error) { +func (h *eventHandler) handleAppMessageUserMessage(tx *dbWrapper, i *messengertypes.Interaction, amPayload proto.Message) (*messengertypes.Interaction, bool, error) { i, isNew, err := tx.addInteraction(*i) if err != nil { return nil, isNew, err @@ -708,7 +723,7 @@ func (h *eventHandler) handleAppMessageUserMessage(tx *dbWrapper, i *Interaction return i, isNew, nil } - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionUpdated, &StreamEvent_InteractionUpdated{i}, isNew); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionUpdated, &messengertypes.StreamEvent_InteractionUpdated{Interaction: i}, isNew); err != nil { return nil, isNew, err } @@ -729,17 +744,17 @@ func (h *eventHandler) handleAppMessageUserMessage(tx *dbWrapper, i *Interaction } // fetch contact from db - var contact *Contact - if i.Conversation.Type == Conversation_ContactType { + var contact *messengertypes.Contact + if i.Conversation.Type == messengertypes.Conversation_ContactType { if contact, err = tx.getContactByPK(i.Conversation.ContactPublicKey); err != nil { h.logger.Warn("1to1 message contact not found", zap.String("public-key", i.Conversation.ContactPublicKey), zap.Error(err)) } } - payload := amPayload.(*AppMessage_UserMessage) + payload := amPayload.(*messengertypes.AppMessage_UserMessage) var title string body := payload.GetBody() - if contact != nil && i.Conversation.Type == Conversation_ContactType { + if contact != nil && i.Conversation.Type == messengertypes.Conversation_ContactType { title = contact.GetDisplayName() } else { title = i.Conversation.GetDisplayName() @@ -749,8 +764,12 @@ func (h *eventHandler) handleAppMessageUserMessage(tx *dbWrapper, i *Interaction } } - msgRecvd := StreamEvent_Notified_MessageReceived{Interaction: i, Conversation: i.Conversation, Contact: contact} - err = h.svc.dispatcher.Notify(StreamEvent_Notified_TypeMessageReceived, title, body, &msgRecvd) + msgRecvd := messengertypes.StreamEvent_Notified_MessageReceived{ + Interaction: i, + Conversation: i.Conversation, + Contact: contact, + } + err = h.svc.dispatcher.Notify(messengertypes.StreamEvent_Notified_TypeMessageReceived, title, body, &msgRecvd) if err != nil { h.logger.Error("failed to notify", zap.Error(err)) @@ -759,15 +778,15 @@ func (h *eventHandler) handleAppMessageUserMessage(tx *dbWrapper, i *Interaction return i, isNew, nil } -func (h *eventHandler) handleAppMessageSetUserInfo(tx *dbWrapper, i *Interaction, amPayload proto.Message) (*Interaction, bool, error) { +func (h *eventHandler) handleAppMessageSetUserInfo(tx *dbWrapper, i *messengertypes.Interaction, amPayload proto.Message) (*messengertypes.Interaction, bool, error) { if i.IsMe { h.logger.Info("ignoring SetUserInfo because isMe") return i, false, nil } - payload := amPayload.(*AppMessage_SetUserInfo) + payload := amPayload.(*messengertypes.AppMessage_SetUserInfo) - if i.GetConversation().GetType() == Conversation_ContactType { + if i.GetConversation().GetType() == messengertypes.Conversation_ContactType { cpk := i.GetConversation().GetContactPublicKey() c, err := tx.getContactByPK(cpk) if err != nil { @@ -781,7 +800,7 @@ func (h *eventHandler) handleAppMessageSetUserInfo(tx *dbWrapper, i *Interaction c.DisplayName = payload.GetDisplayName() c.AvatarCID = payload.GetAvatarCID() - err = tx.updateContact(cpk, Contact{DisplayName: c.GetDisplayName(), AvatarCID: c.GetAvatarCID(), InfoDate: i.GetSentDate()}) + err = tx.updateContact(cpk, messengertypes.Contact{DisplayName: c.GetDisplayName(), AvatarCID: c.GetAvatarCID(), InfoDate: i.GetSentDate()}) if err != nil { return nil, false, err } @@ -792,7 +811,7 @@ func (h *eventHandler) handleAppMessageSetUserInfo(tx *dbWrapper, i *Interaction } if h.svc != nil { - err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeContactUpdated, &StreamEvent_ContactUpdated{Contact: c}, false) + err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeContactUpdated, &messengertypes.StreamEvent_ContactUpdated{Contact: c}, false) if err != nil { return nil, false, err } @@ -825,15 +844,17 @@ func (h *eventHandler) handleAppMessageSetUserInfo(tx *dbWrapper, i *Interaction } h.logger.Debug("interesting member SetUserInfo") - member, isNew, err := tx.upsertMember(i.MemberPublicKey, i.ConversationPublicKey, - Member{DisplayName: payload.GetDisplayName(), AvatarCID: payload.GetAvatarCID(), InfoDate: i.GetSentDate()}, + member, isNew, err := tx.upsertMember( + i.MemberPublicKey, + i.ConversationPublicKey, + messengertypes.Member{DisplayName: payload.GetDisplayName(), AvatarCID: payload.GetAvatarCID(), InfoDate: i.GetSentDate()}, ) if err != nil { return nil, false, err } if h.svc != nil { - err = h.svc.dispatcher.StreamEvent(StreamEvent_TypeMemberUpdated, &StreamEvent_MemberUpdated{Member: member}, isNew) + err = h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeMemberUpdated, &messengertypes.StreamEvent_MemberUpdated{Member: member}, isNew) if err != nil { return nil, false, err } @@ -844,7 +865,7 @@ func (h *eventHandler) handleAppMessageSetUserInfo(tx *dbWrapper, i *Interaction return i, false, nil } -func interactionFromAppMessage(h *eventHandler, gpk string, gme *bertytypes.GroupMessageEvent, am *AppMessage) (*Interaction, error) { +func interactionFromAppMessage(h *eventHandler, gpk string, gme *protocoltypes.GroupMessageEvent, am *messengertypes.AppMessage) (*messengertypes.Interaction, error) { amt := am.GetType() cid, err := ipfscid.Cast(gme.GetEventContext().GetID()) if err != nil { @@ -859,9 +880,9 @@ func interactionFromAppMessage(h *eventHandler, gpk string, gme *bertytypes.Grou dpkb := gme.GetHeaders().GetDevicePK() dpk := b64EncodeBytes(dpkb) - h.logger.Debug("received app message", zap.String("type", amt.String())) + h.logger.Debug("received app message", zap.String("type", amt.String()), zap.Int("numMedias", len(am.GetMedias()))) - return &Interaction{ + i := messengertypes.Interaction{ CID: cid.String(), Type: amt, Payload: am.GetPayload(), @@ -869,10 +890,18 @@ func interactionFromAppMessage(h *eventHandler, gpk string, gme *bertytypes.Grou ConversationPublicKey: gpk, SentDate: am.GetSentDate(), DevicePublicKey: dpk, - }, nil + Medias: am.GetMedias(), + } + + for _, media := range i.Medias { + media.InteractionCID = i.CID + media.State = messengertypes.Media_StateNeverDownloaded + } + + return &i, nil } -func (h *eventHandler) interactionFetchRelations(tx *dbWrapper, i *Interaction) error { +func (h *eventHandler) interactionFetchRelations(tx *dbWrapper, i *messengertypes.Interaction) error { // fetch conv from db if conversation, err := tx.getConversationByPK(i.ConversationPublicKey); err != nil { h.logger.Warn("conversation related to interaction not found") @@ -885,7 +914,7 @@ func (h *eventHandler) interactionFetchRelations(tx *dbWrapper, i *Interaction) case i.IsMe: // myself i.MemberPublicKey = "" - case i.Conversation != nil && i.Conversation.GetType() == Conversation_ContactType: // 1-1 conversation + case i.Conversation != nil && i.Conversation.GetType() == messengertypes.Conversation_ContactType: // 1-1 conversation i.MemberPublicKey = "" // FIXME: multiple devices per contact? @@ -898,7 +927,7 @@ func (h *eventHandler) interactionFetchRelations(tx *dbWrapper, i *Interaction) } } - if i.Conversation != nil && i.Conversation.Type == Conversation_MultiMemberType && i.MemberPublicKey != "" { + if i.Conversation != nil && i.Conversation.Type == messengertypes.Conversation_MultiMemberType && i.MemberPublicKey != "" { // fetch member from db member, err := tx.getMemberByPK(i.MemberPublicKey, i.ConversationPublicKey) if err != nil { @@ -911,7 +940,7 @@ func (h *eventHandler) interactionFetchRelations(tx *dbWrapper, i *Interaction) return nil } -func (h *eventHandler) dispatchVisibleInteraction(i *Interaction) error { +func (h *eventHandler) dispatchVisibleInteraction(i *messengertypes.Interaction) error { if h.svc == nil { return nil } @@ -939,7 +968,7 @@ func (h *eventHandler) dispatchVisibleInteraction(i *Interaction) error { } // dispatch update event - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeConversationUpdated, &StreamEvent_ConversationUpdated{conv}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeConversationUpdated, &messengertypes.StreamEvent_ConversationUpdated{Conversation: conv}, false); err != nil { return err } @@ -952,7 +981,7 @@ func (h *eventHandler) sendAck(cid, conversationPK string) error { // Don't send ack if message is already acked to prevent spam in multimember groups // Maybe wait a few seconds before checking since we're likely to receive the message before any ack - amp, err := AppMessage_TypeAcknowledge.MarshalPayload(0, &AppMessage_Acknowledge{Target: cid}) + amp, err := messengertypes.AppMessage_TypeAcknowledge.MarshalPayload(0, nil, &messengertypes.AppMessage_Acknowledge{Target: cid}) if err != nil { return err } @@ -962,7 +991,7 @@ func (h *eventHandler) sendAck(cid, conversationPK string) error { return err } - if _, err = h.protocolClient.AppMessageSend(h.ctx, &bertytypes.AppMessageSend_Request{ + if _, err = h.protocolClient.AppMessageSend(h.ctx, &protocoltypes.AppMessageSend_Request{ GroupPK: cpk, Payload: amp, }); err != nil { @@ -972,7 +1001,7 @@ func (h *eventHandler) sendAck(cid, conversationPK string) error { return nil } -func (h *eventHandler) interactionConsumeAck(tx *dbWrapper, i *Interaction) error { +func (h *eventHandler) interactionConsumeAck(tx *dbWrapper, i *messengertypes.Interaction) error { cids, err := tx.getAcknowledgementsCIDsForInteraction(i.CID) if err != nil { return err @@ -991,7 +1020,7 @@ func (h *eventHandler) interactionConsumeAck(tx *dbWrapper, i *Interaction) erro if h.svc != nil { for _, c := range cids { h.logger.Debug("found ack in backlog", zap.String("target", c), zap.String("cid", i.GetCID())) - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionDeleted, &StreamEvent_InteractionDeleted{c}, false); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionDeleted, &messengertypes.StreamEvent_InteractionDeleted{CID: c}, false); err != nil { return err } } @@ -1000,7 +1029,7 @@ func (h *eventHandler) interactionConsumeAck(tx *dbWrapper, i *Interaction) erro return nil } -func (h *eventHandler) handleAppMessageReplyOptions(tx *dbWrapper, i *Interaction, _ proto.Message) (*Interaction, bool, error) { +func (h *eventHandler) handleAppMessageReplyOptions(tx *dbWrapper, i *messengertypes.Interaction, _ proto.Message) (*messengertypes.Interaction, bool, error) { i, isNew, err := tx.addInteraction(*i) if err != nil { return nil, isNew, err @@ -1010,7 +1039,7 @@ func (h *eventHandler) handleAppMessageReplyOptions(tx *dbWrapper, i *Interactio return i, isNew, nil } - if err := h.svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionUpdated, &StreamEvent_InteractionUpdated{i}, isNew); err != nil { + if err := h.svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionUpdated, &messengertypes.StreamEvent_InteractionUpdated{Interaction: i}, isNew); err != nil { return nil, isNew, err } diff --git a/go/pkg/bertymessenger/handlers_test.go b/go/pkg/bertymessenger/handlers_test.go index 8cc7a25322..842e1b8728 100644 --- a/go/pkg/bertymessenger/handlers_test.go +++ b/go/pkg/bertymessenger/handlers_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "berty.tech/berty/v2/go/pkg/bertyprotocol" + "berty.tech/berty/v2/go/pkg/messengertypes" ) type getEventHandlerForTestsOptions int @@ -33,7 +34,7 @@ func getEventHandlerForTests(t *testing.T, opts ...getEventHandlerForTestsOption if withService { var ( - s = MessengerServiceServer(nil) + s = messengertypes.MessengerServiceServer(nil) ok = true ) diff --git a/go/pkg/bertymessenger/links.go b/go/pkg/bertymessenger/links.go deleted file mode 100644 index 36997a22dd..0000000000 --- a/go/pkg/bertymessenger/links.go +++ /dev/null @@ -1,264 +0,0 @@ -package bertymessenger - -import ( - "fmt" - "net/url" - "strings" - - "github.com/eknkc/basex" - "github.com/gogo/protobuf/proto" - "github.com/mr-tron/base58" - - "berty.tech/berty/v2/go/pkg/bertytypes" - "berty.tech/berty/v2/go/pkg/errcode" -) - -// Marshal returns shareable web and internal URLs. -// -// The web URL is meant to: -// - be short, -// - have some parts that are human-readable, -// - to point to a sub-page of the berty.tech website where some JS code will parse the human-readable part. -// -// The internal URL is meant to generate the most tiny QR codes. These QR codes can only be opened by a Berty app. -// -// Marshal will return an error if the provided link does not contain all the mandatory fields; -// it may also filter-out some sensitive data. -func (link *BertyLink) Marshal() (internal string, web string, err error) { - if link == nil || link.Kind == BertyLink_UnknownKind { - return "", "", errcode.ErrMissingInput - } - - if err := link.IsValid(); err != nil { - return "", "", err - } - - var ( - // web - kind string - machine = &BertyLink{} - human = url.Values{} - - // internal - qrOptimized = &BertyLink{} - ) - - switch link.Kind { - case BertyLink_ContactInviteV1Kind: - kind = "contact" - machine.BertyID = &BertyID{ - PublicRendezvousSeed: link.BertyID.PublicRendezvousSeed, - AccountPK: link.BertyID.AccountPK, - } - if link.BertyID.DisplayName != "" { - human.Add("name", link.BertyID.DisplayName) - } - - // for contact sharing, there are no fields to hide, so just copy the input link - *qrOptimized = *link - case BertyLink_GroupV1Kind: - kind = "group" - machine.BertyGroup = &BertyGroup{ - Group: &bertytypes.Group{ - PublicKey: link.BertyGroup.Group.PublicKey, - Secret: link.BertyGroup.Group.Secret, - SecretSig: link.BertyGroup.Group.SecretSig, - GroupType: link.BertyGroup.Group.GroupType, - SignPub: link.BertyGroup.Group.SignPub, - }, - } - if link.BertyGroup.DisplayName != "" { - human.Add("name", link.BertyGroup.DisplayName) - } - *qrOptimized = *link - default: - return "", "", errcode.ErrInvalidInput - } - - // compute the web shareable link. - // in this mode, we have: - // - a human-readable link kind - // - a base58-encoded binary (proto) representation of the link (without the kind and metadata) - // - human-readable metadata, encoded as query string (including display name) - { - machineBin, err := proto.Marshal(machine) - if err != nil { - return "", "", errcode.ErrInvalidInput.Wrap(err) - } - // here we use base58 which is compressed enough whilst being easy to read by a human. - // another candidate could be base58.RawURLEncoding which is a little bit more compressed and also only containing unescaped URL chars. - machineEncoded := base58.Encode(machineBin) - path := kind + "/" + machineEncoded - if len(human) > 0 { - path += "/" + human.Encode() - } - // we use a '#' to improve privacy by preventing the webservers to get aware of the right part of this URL - web = LinkWebPrefix + path - } - - // compute the internal shareable link. - // in this mode, the url is as short as possible, in the format: berty://{base45(proto.marshal(link))}. - { - qrBin, err := proto.Marshal(qrOptimized) - if err != nil { - return "", "", errcode.ErrInvalidInput.Wrap(err) - } - // using uppercase to stay in the QR AlphaNum's 45chars alphabet - internal = LinkInternalPrefix + qrBaseEncoder.Encode(qrBin) - } - - return internal, web, nil -} - -// UnmarshalLink takes an URL generated by BertyLink.Marshal (or manually crafted), and returns a BertyLink object. -func UnmarshalLink(uri string) (*BertyLink, error) { - if uri == "" { - return nil, errcode.ErrMissingInput - } - - // internal format - if strings.HasPrefix(strings.ToLower(uri), strings.ToLower(LinkInternalPrefix)) { - blob := uri[len(LinkInternalPrefix):] - qrBin, err := qrBaseEncoder.Decode(blob) - if err != nil { - return nil, errcode.ErrInvalidInput.Wrap(err) - } - var link BertyLink - err = proto.Unmarshal(qrBin, &link) - if err != nil { - return nil, errcode.ErrInvalidInput.Wrap(err) - } - - return &link, nil - } - - // web format - if strings.HasPrefix(strings.ToLower(uri), strings.ToLower(LinkWebPrefix)) { - parsed, err := url.Parse(uri) - if err != nil { - return nil, errcode.ErrInvalidInput.Wrap(err) - } - if parsed.Fragment == "" { - return nil, errcode.ErrInvalidInput.Wrap(err) - } - - rawFragment := strings.Join(strings.Split(uri, "#")[1:], "#") // required by go1.14 - // when minimal version of berty will be go1.15, we can just use `parsed.EscapedFragment()` - - link := BertyLink{} - parts := strings.Split(rawFragment, "/") - if len(parts) < 2 { - return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("URI should have at least 2 parts")) - } - - // decode blob - machineBin, err := base58.Decode(parts[1]) - if err != nil { - return nil, errcode.ErrInvalidInput.Wrap(err) - } - if err := proto.Unmarshal(machineBin, &link); err != nil { - return nil, errcode.ErrInvalidInput.Wrap(err) - } - - // decode url.Values - var human url.Values - if len(parts) > 2 { - encodedValues := strings.Join(parts[2:], "/") - human, err = url.ParseQuery(encodedValues) - if err != nil { - return nil, errcode.ErrInvalidInput.Wrap(err) - } - } - - // per-kind merging strategies and checks - switch kind := parts[0]; kind { - case "contact": - link.Kind = BertyLink_ContactInviteV1Kind - if link.BertyID == nil { - link.BertyID = &BertyID{} - } - if name := human.Get("name"); name != "" && link.BertyID.DisplayName == "" { - link.BertyID.DisplayName = name - } - case "group": - link.Kind = BertyLink_GroupV1Kind - if link.BertyGroup == nil { - link.BertyGroup = &BertyGroup{} - } - if name := human.Get("name"); name != "" && link.BertyGroup.DisplayName == "" { - link.BertyGroup.DisplayName = name - } - default: - return nil, errcode.ErrInvalidInput - } - - return &link, nil - } - - return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("unsupported link format")) -} - -const ( - LinkWebPrefix = "https://berty.tech/id#" - LinkInternalPrefix = "BERTY://" -) - -// from https://www.swisseduc.ch/informatik/theoretische_informatik/qr_codes/docs/qr_standard.pdf -// -// Alphanumeric Mode encodes data from a set of 45 characters, i.e. -// - 10 numeric digits (0 - 9) (ASCII values 30 to 39), -// - 26 alphabetic characters (A - Z) (ASCII values 41 to 5A), -// - and 9 symbols (SP, $, %, *, +, -, ., /, :) (ASCII values 20, 24, 25, 2A, 2B, 2D to 2F, 3A). -// -// we remove SP, %, +, which changes when passed through url.Encode. -// -// the generated string is longer than a base58 one, but the generated QR code is smaller which is best for scanning. -var qrBaseEncoder, _ = basex.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$*-.:/") - -func (link *BertyLink) IsContact() bool { - return link.Kind == BertyLink_ContactInviteV1Kind && - link.IsValid() == nil -} - -func (link *BertyLink) IsGroup() bool { - return link.Kind == BertyLink_GroupV1Kind && - link.IsValid() == nil -} - -func (link *BertyLink) IsValid() error { - if link == nil { - return errcode.ErrMissingInput - } - switch link.Kind { - case BertyLink_ContactInviteV1Kind: - if link.BertyID == nil || - link.BertyID.AccountPK == nil || - link.BertyID.PublicRendezvousSeed == nil { - return errcode.ErrMissingInput - } - return nil - case BertyLink_GroupV1Kind: - if link.BertyGroup == nil { - return errcode.ErrMissingInput - } - if groupType := link.BertyGroup.Group.GroupType; groupType != bertytypes.GroupTypeMultiMember { - return errcode.ErrInvalidInput.Wrap(fmt.Errorf("can't share a %q group type", groupType)) - } - return nil - } - return errcode.ErrInvalidInput -} - -func (id *BertyID) GetBertyLink() *BertyLink { - return &BertyLink{ - Kind: BertyLink_ContactInviteV1Kind, - BertyID: id, - } -} - -func (group *BertyGroup) GetBertyLink() *BertyLink { - return &BertyLink{ - Kind: BertyLink_GroupV1Kind, - BertyGroup: group, - } -} diff --git a/go/pkg/bertymessenger/notifiee.go b/go/pkg/bertymessenger/notifiee.go index 823451fab4..791bf91f8b 100644 --- a/go/pkg/bertymessenger/notifiee.go +++ b/go/pkg/bertymessenger/notifiee.go @@ -5,11 +5,13 @@ import ( "github.com/gogo/protobuf/proto" "go.uber.org/multierr" + + "berty.tech/berty/v2/go/pkg/messengertypes" ) // Notifiee system inspired from ipfs type Notifiee interface { - StreamEvent(*StreamEvent) error + StreamEvent(*messengertypes.StreamEvent) error } type Dispatcher struct { @@ -39,13 +41,13 @@ func (d *Dispatcher) UnregisterAll() { d.mutex.Unlock() } -func (d *Dispatcher) StreamEvent(typ StreamEvent_Type, msg proto.Message, isNew bool) error { +func (d *Dispatcher) StreamEvent(typ messengertypes.StreamEvent_Type, msg proto.Message, isNew bool) error { payload, err := proto.Marshal(msg) if err != nil { return err } - event := &StreamEvent{ + event := &messengertypes.StreamEvent{ Type: typ, Payload: payload, IsNew: isNew, @@ -63,7 +65,7 @@ func (d *Dispatcher) StreamEvent(typ StreamEvent_Type, msg proto.Message, isNew return errs } -func (d *Dispatcher) Notify(typ StreamEvent_Notified_Type, title, body string, msg proto.Message) error { +func (d *Dispatcher) Notify(typ messengertypes.StreamEvent_Notified_Type, title, body string, msg proto.Message) error { var payload []byte if msg != nil { var err error @@ -72,14 +74,14 @@ func (d *Dispatcher) Notify(typ StreamEvent_Notified_Type, title, body string, m } } - event := &StreamEvent_Notified{ + event := &messengertypes.StreamEvent_Notified{ Title: title, Body: body, Type: typ, Payload: payload, } - return d.StreamEvent(StreamEvent_TypeNotified, event, false) + return d.StreamEvent(messengertypes.StreamEvent_TypeNotified, event, false) } func NewDispatcher() *Dispatcher { @@ -87,10 +89,10 @@ func NewDispatcher() *Dispatcher { } type NotifieeBundle struct { - StreamEventImpl func(c *StreamEvent) error + StreamEventImpl func(c *messengertypes.StreamEvent) error } -func (nb *NotifieeBundle) StreamEvent(c *StreamEvent) error { +func (nb *NotifieeBundle) StreamEvent(c *messengertypes.StreamEvent) error { if nb.StreamEventImpl != nil { return nb.StreamEventImpl(c) } diff --git a/go/pkg/bertymessenger/notifiee_test.go b/go/pkg/bertymessenger/notifiee_test.go index 5409f0559f..ca8c66db00 100644 --- a/go/pkg/bertymessenger/notifiee_test.go +++ b/go/pkg/bertymessenger/notifiee_test.go @@ -6,6 +6,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/multierr" + + "berty.tech/berty/v2/go/pkg/messengertypes" ) func TestDispatcher(t *testing.T) { @@ -14,7 +16,7 @@ func TestDispatcher(t *testing.T) { called := false var n NotifieeBundle const errStr = "Test error" - n.StreamEventImpl = func(e *StreamEvent) error { + n.StreamEventImpl = func(e *messengertypes.StreamEvent) error { require.True(t, e.GetIsNew()) called = true return errors.New(errStr) @@ -22,7 +24,7 @@ func TestDispatcher(t *testing.T) { d.Register(&n) defer d.Unregister(&n) - err := d.StreamEvent(StreamEvent_TypeInteractionUpdated, &StreamEvent_InteractionUpdated{}, true) + err := d.StreamEvent(messengertypes.StreamEvent_TypeInteractionUpdated, &messengertypes.StreamEvent_InteractionUpdated{}, true) errs := multierr.Errors(err) require.True(t, called) require.Equal(t, len(errs), 1) @@ -34,17 +36,17 @@ func TestDispatcher(t *testing.T) { func TestNotify(t *testing.T) { const errStr = "Test error" - const notifType StreamEvent_Notified_Type = StreamEvent_Notified_TypeBasic + const notifType messengertypes.StreamEvent_Notified_Type = messengertypes.StreamEvent_Notified_TypeBasic const title string = "title" const body string = "body" d := NewDispatcher() // register handler - var se *StreamEvent + var se *messengertypes.StreamEvent { var n NotifieeBundle - n.StreamEventImpl = func(e *StreamEvent) error { + n.StreamEventImpl = func(e *messengertypes.StreamEvent) error { se = e return errors.New(errStr) } @@ -61,13 +63,13 @@ func TestNotify(t *testing.T) { } // parse event - var notif *StreamEvent_Notified + var notif *messengertypes.StreamEvent_Notified { require.NotNil(t, se) - require.Equal(t, StreamEvent_TypeNotified, se.GetType()) + require.Equal(t, messengertypes.StreamEvent_TypeNotified, se.GetType()) sePayload, err := se.UnmarshalPayload() require.NoError(t, err) - notif = sePayload.(*StreamEvent_Notified) + notif = sePayload.(*messengertypes.StreamEvent_Notified) } // verify notif @@ -83,16 +85,16 @@ func TestNotifyWithPayload(t *testing.T) { const title string = "title" const body string = "body" const errStr = "Test error" - const notifType StreamEvent_Notified_Type = StreamEvent_Notified_TypeMessageReceived - conv := Conversation{DisplayName: "conv"} + const notifType messengertypes.StreamEvent_Notified_Type = messengertypes.StreamEvent_Notified_TypeMessageReceived + conv := messengertypes.Conversation{DisplayName: "conv"} d := NewDispatcher() // register handler - var se *StreamEvent + var se *messengertypes.StreamEvent { var n NotifieeBundle - n.StreamEventImpl = func(e *StreamEvent) error { + n.StreamEventImpl = func(e *messengertypes.StreamEvent) error { se = e return errors.New(errStr) } @@ -102,20 +104,20 @@ func TestNotifyWithPayload(t *testing.T) { // trigger notif with payload { - err := d.Notify(notifType, title, body, &StreamEvent_Notified_MessageReceived{Conversation: &conv}) + err := d.Notify(notifType, title, body, &messengertypes.StreamEvent_Notified_MessageReceived{Conversation: &conv}) errs := multierr.Errors(err) require.Equal(t, len(errs), 1) require.Equal(t, errs[0].Error(), errStr) } // parse event - var notif *StreamEvent_Notified + var notif *messengertypes.StreamEvent_Notified { require.NotNil(t, se) - require.Equal(t, StreamEvent_TypeNotified, se.GetType()) + require.Equal(t, messengertypes.StreamEvent_TypeNotified, se.GetType()) sePayload, err := se.UnmarshalPayload() require.NoError(t, err) - notif = sePayload.(*StreamEvent_Notified) + notif = sePayload.(*messengertypes.StreamEvent_Notified) } // verify notif @@ -129,7 +131,7 @@ func TestNotifyWithPayload(t *testing.T) { { notifPayload, err := notif.UnmarshalPayload() require.NoError(t, err) - msgRecvd := notifPayload.(*StreamEvent_Notified_MessageReceived) + msgRecvd := notifPayload.(*messengertypes.StreamEvent_Notified_MessageReceived) require.Equal(t, conv.DisplayName, msgRecvd.GetConversation().GetDisplayName()) } diff --git a/go/pkg/bertymessenger/replay.go b/go/pkg/bertymessenger/replay.go index e097d03639..227750c031 100644 --- a/go/pkg/bertymessenger/replay.go +++ b/go/pkg/bertymessenger/replay.go @@ -9,20 +9,20 @@ import ( "github.com/golang/protobuf/proto" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func getEventsReplayerForDB(ctx context.Context, client bertyprotocol.ProtocolServiceClient) func(db *dbWrapper) error { +func getEventsReplayerForDB(ctx context.Context, client protocoltypes.ProtocolServiceClient) func(db *dbWrapper) error { return func(db *dbWrapper) error { return replayLogsToDB(ctx, client, db) } } -func replayLogsToDB(ctx context.Context, client bertyprotocol.ProtocolServiceClient, wrappedDB *dbWrapper) error { +func replayLogsToDB(ctx context.Context, client protocoltypes.ProtocolServiceClient, wrappedDB *dbWrapper) error { // Get account infos - cfg, err := client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + cfg, err := client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return errcode.TODO.Wrap(err) } @@ -59,7 +59,7 @@ func replayLogsToDB(ctx context.Context, client bertyprotocol.ProtocolServiceCli // TODO: check with @glouvigny if we could launch the protocol // without activating the account group if !bytes.Equal(groupPK, cfg.GetAccountGroupPK()) { - if _, err := client.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + if _, err := client.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: groupPK, LocalOnly: true, }); err != nil { @@ -78,7 +78,7 @@ func replayLogsToDB(ctx context.Context, client bertyprotocol.ProtocolServiceCli // Deactivate non-account groups if !bytes.Equal(groupPK, cfg.GetAccountGroupPK()) { - if _, err := client.DeactivateGroup(ctx, &bertytypes.DeactivateGroup_Request{ + if _, err := client.DeactivateGroup(ctx, &protocoltypes.DeactivateGroup_Request{ GroupPK: groupPK, }); err != nil { return errcode.ErrGroupDeactivate.Wrap(err) @@ -95,7 +95,7 @@ func processMetadataList(ctx context.Context, groupPK []byte, handler *eventHand metaList, err := handler.protocolClient.GroupMetadataList( subCtx, - &bertytypes.GroupMetadataList_Request{ + &protocoltypes.GroupMetadataList_Request{ GroupPK: groupPK, UntilNow: true, }, @@ -130,7 +130,7 @@ func processMessageList(ctx context.Context, groupPK []byte, handler *eventHandl msgList, err := handler.protocolClient.GroupMessageList( subCtx, - &bertytypes.GroupMessageList_Request{ + &protocoltypes.GroupMessageList_Request{ GroupPK: groupPK, UntilNow: true, }, @@ -151,7 +151,7 @@ func processMessageList(ctx context.Context, groupPK []byte, handler *eventHandl return errcode.ErrEventListMessage.Wrap(err) } - var appMsg AppMessage + var appMsg messengertypes.AppMessage if err := proto.Unmarshal(message.GetMessage(), &appMsg); err != nil { return errcode.ErrDeserialization.Wrap(err) } diff --git a/go/pkg/bertymessenger/service.go b/go/pkg/bertymessenger/service.go index 4fe06df09e..f59eb6bcf3 100644 --- a/go/pkg/bertymessenger/service.go +++ b/go/pkg/bertymessenger/service.go @@ -22,14 +22,16 @@ import ( "berty.tech/berty/v2/go/internal/lifecycle" "berty.tech/berty/v2/go/internal/notification" + "berty.tech/berty/v2/go/internal/streamutil" "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/bertyversion" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type Service interface { - MessengerServiceServer + messengertypes.MessengerServiceServer Close() } @@ -39,7 +41,7 @@ var _ Service = (*service)(nil) type service struct { logger *zap.Logger isGroupMonitorEnabled bool - protocolClient bertyprotocol.ProtocolServiceClient + protocolClient protocoltypes.ProtocolServiceClient startedAt time.Time db *dbWrapper dispatcher *Dispatcher @@ -58,7 +60,7 @@ type Opts struct { DB *gorm.DB NotificationManager notification.Manager LifeCycleManager *lifecycle.Manager - StateBackup *LocalDatabaseState + StateBackup *messengertypes.LocalDatabaseState } func (opts *Opts) applyDefaults() (func(), error) { @@ -96,7 +98,7 @@ func (opts *Opts) applyDefaults() (func(), error) { return cleanup, nil } -func databaseStateRestoreAccountHandler(statePointer *LocalDatabaseState) bertyprotocol.RestoreAccountHandler { +func databaseStateRestoreAccountHandler(statePointer *messengertypes.LocalDatabaseState) bertyprotocol.RestoreAccountHandler { return bertyprotocol.RestoreAccountHandler{ Handler: func(header *tar.Header, reader *tar.Reader) (bool, error) { if header.Name != exportLocalDBState { @@ -125,11 +127,11 @@ func databaseStateRestoreAccountHandler(statePointer *LocalDatabaseState) bertyp } } -func RestoreFromAccountExport(ctx context.Context, reader io.Reader, coreAPI ipfs_interface.CoreAPI, odb *bertyprotocol.BertyOrbitDB, localDBState *LocalDatabaseState, logger *zap.Logger) error { +func RestoreFromAccountExport(ctx context.Context, reader io.Reader, coreAPI ipfs_interface.CoreAPI, odb *bertyprotocol.BertyOrbitDB, localDBState *messengertypes.LocalDatabaseState, logger *zap.Logger) error { return bertyprotocol.RestoreAccountExport(ctx, reader, coreAPI, odb, logger, databaseStateRestoreAccountHandler(localDBState)) } -func New(client bertyprotocol.ProtocolServiceClient, opts *Opts) (Service, error) { +func New(client protocoltypes.ProtocolServiceClient, opts *Opts) (Service, error) { optsCleanup, err := opts.applyDefaults() if err != nil { return nil, errcode.TODO.Wrap(err) @@ -182,7 +184,7 @@ func New(client bertyprotocol.ProtocolServiceClient, opts *Opts) (Service, error svc.eventHandler = newEventHandler(ctx, db, client, opts.Logger, &svc, false) - icr, err := client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + icr, err := client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { return nil, err } @@ -194,7 +196,7 @@ func New(client bertyprotocol.ProtocolServiceClient, opts *Opts) (Service, error switch { case err == gorm.ErrRecordNotFound: // account not found, create a new one svc.logger.Debug("account not found, creating a new one", zap.String("pk", pkStr)) - ret, err := svc.internalInstanceShareableBertyID(ctx, &InstanceShareableBertyID_Request{}) + ret, err := svc.internalInstanceShareableBertyID(ctx, &messengertypes.InstanceShareableBertyID_Request{}) if err != nil { return nil, err } @@ -216,19 +218,19 @@ func New(client bertyprotocol.ProtocolServiceClient, opts *Opts) (Service, error go svc.monitorState(ctx) // Dispatch app notifications to native manager - svc.dispatcher.Register(&NotifieeBundle{StreamEventImpl: func(se *StreamEvent) error { - if se.GetType() != StreamEvent_TypeNotified { + svc.dispatcher.Register(&NotifieeBundle{StreamEventImpl: func(se *messengertypes.StreamEvent) error { + if se.GetType() != messengertypes.StreamEvent_TypeNotified { return nil } - var notif *StreamEvent_Notified + var notif *messengertypes.StreamEvent_Notified { payload, err := se.UnmarshalPayload() if err != nil { opts.Logger.Error("unable to unmarshal Notified", zap.Error(err)) return nil } - notif = payload.(*StreamEvent_Notified) + notif = payload.(*messengertypes.StreamEvent_Notified) } if svc.lcmanager.GetCurrentState() == StateInactive { @@ -261,7 +263,7 @@ func New(client bertyprotocol.ProtocolServiceClient, opts *Opts) (Service, error return nil, err } - _, err = svc.protocolClient.ActivateGroup(svc.ctx, &bertytypes.ActivateGroup_Request{GroupPK: gpkb}) + _, err = svc.protocolClient.ActivateGroup(svc.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: gpkb}) if err != nil { return nil, err } @@ -274,7 +276,7 @@ func New(client bertyprotocol.ProtocolServiceClient, opts *Opts) (Service, error // subscribe to contact groups { - contacts, err := svc.db.getContactsByState(Contact_OutgoingRequestSent) + contacts, err := svc.db.getContactsByState(messengertypes.Contact_OutgoingRequestSent) if err != nil { return nil, err } @@ -284,7 +286,7 @@ func New(client bertyprotocol.ProtocolServiceClient, opts *Opts) (Service, error return nil, err } - _, err = svc.protocolClient.ActivateGroup(svc.ctx, &bertytypes.ActivateGroup_Request{GroupPK: gpkb}) + _, err = svc.protocolClient.ActivateGroup(svc.ctx, &protocoltypes.ActivateGroup_Request{GroupPK: gpkb}) if err != nil { return nil, err } @@ -302,7 +304,7 @@ func (svc *service) subscribeToMetadata(gpkb []byte) error { // subscribe s, err := svc.protocolClient.GroupMetadataList( svc.ctx, - &bertytypes.GroupMetadataList_Request{GroupPK: gpkb}, + &protocoltypes.GroupMetadataList_Request{GroupPK: gpkb}, ) if err != nil { return errcode.ErrEventListMetadata.Wrap(err) @@ -328,7 +330,7 @@ func (svc *service) subscribeToMetadata(gpkb []byte) error { func (svc *service) subscribeToMessages(gpkb []byte) error { ms, err := svc.protocolClient.GroupMessageList( svc.ctx, - &bertytypes.GroupMessageList_Request{GroupPK: gpkb}, + &protocoltypes.GroupMessageList_Request{GroupPK: gpkb}, ) if err != nil { return errcode.ErrEventListMessage.Wrap(err) @@ -341,7 +343,7 @@ func (svc *service) subscribeToMessages(gpkb []byte) error { return } - var am AppMessage + var am messengertypes.AppMessage if err := proto.Unmarshal(gme.GetMessage(), &am); err != nil { svc.logger.Warn("failed to unmarshal AppMessage", zap.Error(err)) return @@ -360,7 +362,7 @@ func (svc *service) subscribeToMessages(gpkb []byte) error { var monitorCounter uint64 = 0 func (svc *service) subscribeToGroupMonitor(groupPK []byte) error { - cl, err := svc.protocolClient.MonitorGroup(svc.ctx, &bertytypes.MonitorGroup_Request{ + cl, err := svc.protocolClient.MonitorGroup(svc.ctx, &protocoltypes.MonitorGroup_Request{ GroupPK: groupPK, }) if err != nil { @@ -384,7 +386,7 @@ func (svc *service) subscribeToGroupMonitor(groupPK []byte) error { return } - meta := AppMessage_MonitorMetadata{ + meta := messengertypes.AppMessage_MonitorMetadata{ Event: evt.Event, } @@ -395,15 +397,15 @@ func (svc *service) subscribeToGroupMonitor(groupPK []byte) error { } cid := fmt.Sprintf("__monitor-group-%d", seqid) - i := &Interaction{ + i := &messengertypes.Interaction{ CID: cid, - Type: AppMessage_TypeMonitorMetadata, + Type: messengertypes.AppMessage_TypeMonitorMetadata, ConversationPublicKey: b64EncodeBytes(evt.GetGroupPK()), Payload: payload, SentDate: timestampMs(time.Now()), } - err = svc.dispatcher.StreamEvent(StreamEvent_TypeInteractionUpdated, &StreamEvent_InteractionUpdated{i}, true) + err = svc.dispatcher.StreamEvent(messengertypes.StreamEvent_TypeInteractionUpdated, &messengertypes.StreamEvent_InteractionUpdated{Interaction: i}, true) if err != nil { svc.logger.Error("unable to dispatch monitor event") } @@ -427,65 +429,47 @@ func (svc *service) subscribeToGroup(gpkb []byte) error { return svc.subscribeToMessages(gpkb) } -func (svc *service) prepareAttachment(data []byte) ([]byte, error) { - // TODO: stream - +func (svc *service) attachmentPrepare(attachment io.Reader) ([]byte, error) { stream, err := svc.protocolClient.AttachmentPrepare(svc.ctx) if err != nil { - return nil, err + return nil, errcode.ErrAttachmentPrepare.Wrap(err) } // send header - if err := stream.Send(&bertytypes.AttachmentPrepare_Request{}); err != nil { - return nil, err + if err := stream.Send(&protocoltypes.AttachmentPrepare_Request{}); err != nil { + return nil, errcode.ErrStreamHeaderWrite.Wrap(err) } // send body - max := len(data) - for i := 0; i < max; { - next := i + (1024 * 64) - block := data[i:imin(next, max)] - if err := stream.Send(&bertytypes.AttachmentPrepare_Request{Block: block}); err != nil { - return nil, err - } - i = next + if err := streamutil.FuncSink(make([]byte, 64*1024), attachment, func(b []byte) error { + return stream.Send(&protocoltypes.AttachmentPrepare_Request{Block: b}) + }); err != nil { + return nil, errcode.ErrStreamSink.Wrap(err) } - // signal end of data and wait for cid + // signal end of data and pass cid reply, err := stream.CloseAndRecv() if err != nil { - return nil, err + return nil, errcode.ErrStreamCloseAndRecv.Wrap(err) } - return reply.GetAttachmentCID(), nil } -func (svc *service) retrieveAttachment(cid string) ([]byte, error) { - // TODO: stream - +func (svc *service) attachmentRetrieve(cid string) (*io.PipeReader, error) { cidBytes, err := b64DecodeBytes(cid) if err != nil { - return nil, err + return nil, errcode.ErrDeserialization.Wrap(err) } - stream, err := svc.protocolClient.AttachmentRetrieve(svc.ctx, &bertytypes.AttachmentRetrieve_Request{AttachmentCID: cidBytes}) + stream, err := svc.protocolClient.AttachmentRetrieve(svc.ctx, &protocoltypes.AttachmentRetrieve_Request{AttachmentCID: cidBytes}) if err != nil { - return nil, err + return nil, errcode.ErrAttachmentRetrieve.Wrap(err) } - data := []byte(nil) - for { + return streamutil.FuncReader(func() ([]byte, error) { reply, err := stream.Recv() - if err == io.EOF { - break - } - if err != nil { - return nil, err - } - data = append(data, reply.GetBlock()...) - } - - return data, nil + return reply.GetBlock(), err + }, svc.logger), nil } func (svc *service) sendAccountUserInfo(groupPK string) error { @@ -496,21 +480,33 @@ func (svc *service) sendAccountUserInfo(groupPK string) error { var avatarCID string var attachmentCIDs [][]byte + var medias []*messengertypes.Media if acc.GetAvatarCID() != "" { - avatarBytes, err := svc.retrieveAttachment(acc.GetAvatarCID()) + // TODO: add AttachmentRecrypt to bertyprotocol + avatar, err := svc.attachmentRetrieve(acc.GetAvatarCID()) if err != nil { - return errcode.ErrRetrieveAttachment.Wrap(err) + return errcode.ErrAttachmentRetrieve.Wrap(err) } - avatarCIDBytes, err := svc.prepareAttachment(avatarBytes) + avatarCIDBytes, err := svc.attachmentPrepare(avatar) if err != nil { - return errcode.ErrPrepareAttachment.Wrap(err) + return errcode.ErrAttachmentPrepare.Wrap(err) } avatarCID = b64EncodeBytes(avatarCIDBytes) attachmentCIDs = [][]byte{avatarCIDBytes} + + if medias, err = svc.db.getMedias([]string{acc.GetAvatarCID()}); err != nil { + return errcode.ErrDBRead.Wrap(err) + } + if len(medias) < 1 { + return errcode.ErrInternal + } + medias[0].CID = avatarCID } - am, err := AppMessage_TypeSetUserInfo.MarshalPayload(timestampMs(time.Now()), - &AppMessage_SetUserInfo{DisplayName: acc.GetDisplayName(), AvatarCID: avatarCID}, + am, err := messengertypes.AppMessage_TypeSetUserInfo.MarshalPayload( + timestampMs(time.Now()), + medias, + &messengertypes.AppMessage_SetUserInfo{DisplayName: acc.GetDisplayName(), AvatarCID: avatarCID}, ) if err != nil { return errcode.ErrSerialization.Wrap(err) @@ -519,7 +515,7 @@ func (svc *service) sendAccountUserInfo(groupPK string) error { if err != nil { return errcode.ErrDeserialization.Wrap(err) } - _, err = svc.protocolClient.AppMetadataSend(svc.ctx, &bertytypes.AppMetadataSend_Request{GroupPK: pk, Payload: am, AttachmentCIDs: attachmentCIDs}) + _, err = svc.protocolClient.AppMetadataSend(svc.ctx, &protocoltypes.AppMetadataSend_Request{GroupPK: pk, Payload: am, AttachmentCIDs: attachmentCIDs}) if err != nil { return errcode.ErrProtocolSend.Wrap(err) } diff --git a/go/pkg/bertymessenger/service_test.go b/go/pkg/bertymessenger/service_test.go index 569306fbab..86d36d3b2c 100644 --- a/go/pkg/bertymessenger/service_test.go +++ b/go/pkg/bertymessenger/service_test.go @@ -18,7 +18,8 @@ import ( "go.uber.org/zap" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestUnstableServiceStream(t *testing.T) { @@ -31,10 +32,10 @@ func TestUnstableServiceStream(t *testing.T) { // first event is account update { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeAccountUpdated) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeAccountUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - account := payload.(*StreamEvent_AccountUpdated).Account + account := payload.(*messengertypes.StreamEvent_AccountUpdated).Account require.Equal(t, account, node.GetAccount()) require.NotEmpty(t, account.Link) require.NotEmpty(t, account.PublicKey) @@ -44,7 +45,7 @@ func TestUnstableServiceStream(t *testing.T) { // second event is list end { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeListEnded) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeListEnded) require.Empty(t, event.Payload) } @@ -68,10 +69,10 @@ func TestUnstableServiceSetName(t *testing.T) { // first event is account update { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeAccountUpdated) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeAccountUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - account := payload.(*StreamEvent_AccountUpdated).Account + account := payload.(*messengertypes.StreamEvent_AccountUpdated).Account require.Equal(t, account, node.GetAccount()) require.NotEmpty(t, account.Link) require.NotEmpty(t, account.PublicKey) @@ -81,7 +82,7 @@ func TestUnstableServiceSetName(t *testing.T) { // second event is list end { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeListEnded) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeListEnded) require.Empty(t, event.Payload) } @@ -102,10 +103,10 @@ func TestUnstableServiceSetNameAsync(t *testing.T) { // first event is account update { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeAccountUpdated) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeAccountUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - account := payload.(*StreamEvent_AccountUpdated).Account + account := payload.(*messengertypes.StreamEvent_AccountUpdated).Account require.Equal(t, account, node.GetAccount()) require.NotEmpty(t, account.Link) require.NotEmpty(t, account.PublicKey) @@ -115,7 +116,7 @@ func TestUnstableServiceSetNameAsync(t *testing.T) { // second event is list end { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeListEnded) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeListEnded) require.Empty(t, event.Payload) } @@ -126,10 +127,10 @@ func TestUnstableServiceSetNameAsync(t *testing.T) { // new account update event { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeAccountUpdated) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeAccountUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - account := payload.(*StreamEvent_AccountUpdated).Account + account := payload.(*messengertypes.StreamEvent_AccountUpdated).Account require.Equal(t, account, node.GetAccount()) require.NotEmpty(t, account.Link) require.NotEmpty(t, account.PublicKey) @@ -155,7 +156,7 @@ func TestUnstableServiceStreamCancel(t *testing.T) { // first event is account update { event := node.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeAccountUpdated) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeAccountUpdated) } // cancel @@ -185,12 +186,12 @@ func TestUnstableServiceContactRequest(t *testing.T) { { link := "https://berty.tech/id#contact/" + validContactBlob + "/name=Alice" ownMetadata := []byte("bar") - metadata, err := proto.Marshal(&ContactMetadata{DisplayName: "Alice"}) + metadata, err := proto.Marshal(&messengertypes.ContactMetadata{DisplayName: "Alice"}) require.NoError(t, err) - deeplinkReply, err := node.GetClient().ParseDeepLink(ctx, &ParseDeepLink_Request{Link: link}) + deeplinkReply, err := node.GetClient().ParseDeepLink(ctx, &messengertypes.ParseDeepLink_Request{Link: link}) require.NoError(t, err) require.NoError(t, deeplinkReply.Link.IsValid()) - req := &SendContactRequest_Request{ + req := &messengertypes.SendContactRequest_Request{ BertyID: deeplinkReply.Link.BertyID, Metadata: metadata, OwnMetadata: ownMetadata, @@ -204,23 +205,23 @@ func TestUnstableServiceContactRequest(t *testing.T) { // check for ContactUpdated event { event := node.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeContactUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeContactUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - contact := payload.(*StreamEvent_ContactUpdated).Contact + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact require.NotNil(t, contact) require.Equal(t, contact.GetDisplayName(), "Alice") - require.Equal(t, contact.GetState(), Contact_OutgoingRequestEnqueued) + require.Equal(t, contact.GetState(), messengertypes.Contact_OutgoingRequestEnqueued) assert.Len(t, node.contacts, 1) } // check for the ConversationUpdated event { event := node.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).Conversation + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotNil(t, conversation) assert.Len(t, node.conversations, 1) } @@ -246,7 +247,7 @@ func TestUnstableServiceConversationCreateLive(t *testing.T) { const conversationName = "Tasty" var createdConversationPK string { - reply, err := node.GetClient().ConversationCreate(ctx, &ConversationCreate_Request{DisplayName: conversationName}) + reply, err := node.GetClient().ConversationCreate(ctx, &messengertypes.ConversationCreate_Request{DisplayName: conversationName}) require.NoError(t, err) require.NotEmpty(t, reply.GetPublicKey()) createdConversationPK = reply.GetPublicKey() @@ -255,12 +256,12 @@ func TestUnstableServiceConversationCreateLive(t *testing.T) { // check for the ConversationUpdated event { event := node.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).Conversation + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotNil(t, conversation) - require.Equal(t, conversation.GetType(), Conversation_MultiMemberType) + require.Equal(t, conversation.GetType(), messengertypes.Conversation_MultiMemberType) require.Equal(t, conversation.GetPublicKey(), createdConversationPK) require.Equal(t, conversation.GetDisplayName(), conversationName) require.NotEmpty(t, conversation.GetLink()) @@ -284,7 +285,7 @@ func TestUnstableServiceConversationCreateAsync(t *testing.T) { const conversationName = "Tasty" var createdConversationPK string { - reply, err := node.GetClient().ConversationCreate(ctx, &ConversationCreate_Request{DisplayName: conversationName}) + reply, err := node.GetClient().ConversationCreate(ctx, &messengertypes.ConversationCreate_Request{DisplayName: conversationName}) require.NoError(t, err) require.NotEmpty(t, reply.GetPublicKey()) createdConversationPK = reply.GetPublicKey() @@ -293,18 +294,18 @@ func TestUnstableServiceConversationCreateAsync(t *testing.T) { // first event is account { event := node.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeAccountUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeAccountUpdated) } // second event is the conversation, with display name { event := node.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).Conversation + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotNil(t, conversation) - require.Equal(t, conversation.GetType(), Conversation_MultiMemberType) + require.Equal(t, conversation.GetType(), messengertypes.Conversation_MultiMemberType) require.Equal(t, conversation.GetPublicKey(), createdConversationPK) require.Equal(t, conversation.GetDisplayName(), conversationName) require.NotEmpty(t, conversation.GetLink()) @@ -313,7 +314,7 @@ func TestUnstableServiceConversationCreateAsync(t *testing.T) { // then, the list end event { event := node.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeListEnded) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeListEnded) } // no more event @@ -453,19 +454,19 @@ func TestBrokenPeersCreateJoinConversation(t *testing.T) { // creator creates a new conversation convName := "Ze Conv" - createdConv, err := creator.GetClient().ConversationCreate(ctx, &ConversationCreate_Request{DisplayName: convName}) + createdConv, err := creator.GetClient().ConversationCreate(ctx, &messengertypes.ConversationCreate_Request{DisplayName: convName}) require.NoError(t, err) // get conv link gpk := createdConv.GetPublicKey() gpkb, err := b64DecodeBytes(gpk) require.NoError(t, err) - sbg, err := creator.GetClient().ShareableBertyGroup(ctx, &ShareableBertyGroup_Request{GroupPK: gpkb, GroupName: convName}) + sbg, err := creator.GetClient().ShareableBertyGroup(ctx, &messengertypes.ShareableBertyGroup_Request{GroupPK: gpkb, GroupName: convName}) require.NoError(t, err) // joiners join the conversation for _, joiner := range joiners { - ret, err := joiner.GetClient().ConversationJoin(ctx, &ConversationJoin_Request{Link: sbg.GetWebURL()}) + ret, err := joiner.GetClient().ConversationJoin(ctx, &messengertypes.ConversationJoin_Request{Link: sbg.GetWebURL()}) require.NoError(t, err) require.Empty(t, ret) } @@ -677,7 +678,7 @@ func TestBrokenConversationInvitationAndExchange(t *testing.T) { } // create group - var createdConv *Conversation + var createdConv *messengertypes.Conversation { createdConv = testCreateConversation(ctx, t, alice, "Alice & Friends", []*TestingAccount{bob, john}, logger) assert.Len(t, alice.contacts, 2) @@ -744,19 +745,19 @@ func TestBrokenConversationOpenClose(t *testing.T) { // Bob opens the conversation { - _, err := bob.GetClient().ConversationOpen(ctx, &ConversationOpen_Request{GroupPK: groupPK}) + _, err := bob.GetClient().ConversationOpen(ctx, &messengertypes.ConversationOpen_Request{GroupPK: groupPK}) require.NoError(t, err) } // Bob has a ConversationUpdated event { event := bob.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) require.NotNil(t, event.GetPayload()) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).GetConversation() - require.Equal(t, conversation.GetType(), Conversation_ContactType) + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).GetConversation() + require.Equal(t, conversation.GetType(), messengertypes.Conversation_ContactType) require.Equal(t, conversation.GetPublicKey(), groupPK) require.True(t, conversation.GetIsOpen()) require.Zero(t, conversation.GetUnreadCount()) @@ -787,19 +788,19 @@ func TestBrokenConversationOpenClose(t *testing.T) { // Bob closes the conversation { - _, err := bob.GetClient().ConversationClose(ctx, &ConversationClose_Request{GroupPK: groupPK}) + _, err := bob.GetClient().ConversationClose(ctx, &messengertypes.ConversationClose_Request{GroupPK: groupPK}) require.NoError(t, err) } // Bob has a ConversationUpdated event { event := bob.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) require.NotNil(t, event.GetPayload()) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).GetConversation() - require.Equal(t, conversation.GetType(), Conversation_ContactType) + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).GetConversation() + require.Equal(t, conversation.GetType(), messengertypes.Conversation_ContactType) require.Equal(t, conversation.GetPublicKey(), groupPK) require.False(t, conversation.GetIsOpen()) require.Equal(t, conversation.GetUnreadCount(), int32(0)) @@ -830,19 +831,19 @@ func TestBrokenConversationOpenClose(t *testing.T) { // Alice opens the conversation { - _, err := alice.GetClient().ConversationOpen(ctx, &ConversationOpen_Request{GroupPK: groupPK}) + _, err := alice.GetClient().ConversationOpen(ctx, &messengertypes.ConversationOpen_Request{GroupPK: groupPK}) require.NoError(t, err) } // Alice has a ConversationUpdated event { event := alice.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) require.NotNil(t, event.GetPayload()) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).GetConversation() - require.Equal(t, conversation.GetType(), Conversation_ContactType) + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).GetConversation() + require.Equal(t, conversation.GetType(), messengertypes.Conversation_ContactType) require.Equal(t, conversation.GetPublicKey(), groupPK) require.True(t, conversation.GetIsOpen()) require.Zero(t, conversation.GetUnreadCount()) @@ -859,27 +860,27 @@ func TestBrokenConversationOpenClose(t *testing.T) { } } -func testJoinConversation(ctx context.Context, t *testing.T, joiner *TestingAccount, existingConv *Conversation, existingDevices []*TestingAccount, logger *zap.Logger) { +func testJoinConversation(ctx context.Context, t *testing.T, joiner *TestingAccount, existingConv *messengertypes.Conversation, existingDevices []*TestingAccount, logger *zap.Logger) { t.Helper() // joiner joins the conversation { - ret, err := joiner.GetClient().ConversationJoin(ctx, &ConversationJoin_Request{Link: existingConv.GetLink()}) + ret, err := joiner.GetClient().ConversationJoin(ctx, &messengertypes.ConversationJoin_Request{Link: existingConv.GetLink()}) require.NoError(t, err) require.Empty(t, ret) logger.Debug("testJoinConversation: conversation joined") } // joiner has ConversationUpdated event - var conv *Conversation + var conv *messengertypes.Conversation { event := joiner.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).GetConversation() + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).GetConversation() require.NotNil(t, conversation) - require.Equal(t, conversation.GetType(), Conversation_MultiMemberType) + require.Equal(t, conversation.GetType(), messengertypes.Conversation_MultiMemberType) if existingConv.GetPublicKey() != "" { require.Equal(t, conversation.GetPublicKey(), existingConv.GetPublicKey()) } @@ -895,10 +896,10 @@ func testJoinConversation(ctx context.Context, t *testing.T, joiner *TestingAcco // joiner receives a device update for each existing device { event := joiner.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeDeviceUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeDeviceUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - device := payload.(*StreamEvent_DeviceUpdated).GetDevice() + device := payload.(*messengertypes.StreamEvent_DeviceUpdated).GetDevice() // FIXME: can be better to check if public key and owner public key are unique here require.NotEmpty(t, device.GetPublicKey()) require.NotEmpty(t, device.GetMemberPublicKey()) @@ -907,10 +908,10 @@ func testJoinConversation(ctx context.Context, t *testing.T, joiner *TestingAcco // each existing device receives a device update for the joiner { event := existingDevice.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeDeviceUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeDeviceUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - device := payload.(*StreamEvent_DeviceUpdated).GetDevice() + device := payload.(*messengertypes.StreamEvent_DeviceUpdated).GetDevice() // FIXME: can be better to check if public key and owner public key are unique here require.NotEmpty(t, device.GetMemberPublicKey()) require.NotEmpty(t, device.GetPublicKey()) @@ -919,10 +920,10 @@ func testJoinConversation(ctx context.Context, t *testing.T, joiner *TestingAcco // each existing device receives a member update for the joiner { event := existingDevice.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeMemberUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeMemberUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - member := payload.(*StreamEvent_MemberUpdated).GetMember() + member := payload.(*messengertypes.StreamEvent_MemberUpdated).GetMember() require.Equal(t, conv.GetPublicKey(), member.GetConversationPublicKey()) require.Equal(t, joiner.GetAccount().GetDisplayName(), member.GetDisplayName()) require.NotEmpty(t, member.GetPublicKey()) @@ -930,11 +931,11 @@ func testJoinConversation(ctx context.Context, t *testing.T, joiner *TestingAcco } } -func testAddContact(ctx context.Context, t *testing.T, requester, requested *TestingAccount) *Contact { +func testAddContact(ctx context.Context, t *testing.T, requester, requested *TestingAccount) *messengertypes.Contact { t.Helper() // Requester sends a contact request to requested { - ret, err := requester.GetClient().ContactRequest(ctx, &ContactRequest_Request{Link: requested.GetAccount().GetLink()}) + ret, err := requester.GetClient().ContactRequest(ctx, &messengertypes.ContactRequest_Request{Link: requested.GetAccount().GetLink()}) require.NoError(t, err) require.Empty(t, ret) } @@ -942,53 +943,53 @@ func testAddContact(ctx context.Context, t *testing.T, requester, requested *Tes // Requester has a contact updated event (outgoing request enqueued) { event := requester.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeContactUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeContactUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - contact := payload.(*StreamEvent_ContactUpdated).Contact + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact require.NotEmpty(t, contact.GetPublicKey()) require.Equal(t, contact.GetPublicKey(), requested.GetAccount().GetPublicKey()) if requested.GetAccount().GetDisplayName() != "" { require.Equal(t, contact.GetDisplayName(), requested.GetAccount().GetDisplayName()) } - require.Equal(t, contact.GetState(), Contact_OutgoingRequestEnqueued) + require.Equal(t, contact.GetState(), messengertypes.Contact_OutgoingRequestEnqueued) require.Empty(t, contact.GetConversationPublicKey()) } // Requester has a contact updated event (outgoing request sent) { event := requester.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeContactUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeContactUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - contact := payload.(*StreamEvent_ContactUpdated).Contact + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact require.NotEmpty(t, contact.GetPublicKey()) require.Equal(t, contact.GetPublicKey(), requested.GetAccount().GetPublicKey()) if requested.GetAccount().GetDisplayName() != "" { require.Equal(t, contact.GetDisplayName(), requested.GetAccount().GetDisplayName()) } - require.Equal(t, contact.GetState(), Contact_OutgoingRequestSent) + require.Equal(t, contact.GetState(), messengertypes.Contact_OutgoingRequestSent) require.Empty(t, contact.GetConversationPublicKey()) } // Requested receives the contact request { event := requested.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeContactUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeContactUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - contact := payload.(*StreamEvent_ContactUpdated).Contact + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact require.NotEmpty(t, contact.GetPublicKey()) require.Equal(t, contact.GetPublicKey(), requester.GetAccount().GetPublicKey()) if requester.GetAccount().GetDisplayName() != "" { require.Equal(t, contact.GetDisplayName(), requester.GetAccount().GetDisplayName()) } - require.Equal(t, contact.GetState(), Contact_IncomingRequest) + require.Equal(t, contact.GetState(), messengertypes.Contact_IncomingRequest) } // Requested accepts the contact request { - ret, err := requested.GetClient().ContactAccept(ctx, &ContactAccept_Request{PublicKey: requester.GetAccount().GetPublicKey()}) + ret, err := requested.GetClient().ContactAccept(ctx, &messengertypes.ContactAccept_Request{PublicKey: requester.GetAccount().GetPublicKey()}) require.NoError(t, err) require.Empty(t, ret) } @@ -997,40 +998,40 @@ func testAddContact(ctx context.Context, t *testing.T, requester, requested *Tes var groupPK string { event := requested.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeContactUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeContactUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - contact := payload.(*StreamEvent_ContactUpdated).Contact + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact require.NotEmpty(t, contact.GetPublicKey()) require.Equal(t, contact.GetPublicKey(), requester.GetAccount().GetPublicKey()) if requester.GetAccount().GetDisplayName() != "" { require.Equal(t, contact.GetDisplayName(), requester.GetAccount().GetDisplayName()) } - require.Equal(t, contact.GetState(), Contact_Accepted) + require.Equal(t, contact.GetState(), messengertypes.Contact_Accepted) groupPK = contact.GetConversationPublicKey() } // Requested receives the contact conversation event { event := requested.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).Conversation + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotEmpty(t, conversation.GetPublicKey()) require.Equal(t, conversation.GetPublicKey(), groupPK) require.Empty(t, conversation.GetDisplayName()) require.Empty(t, conversation.GetLink()) - require.Equal(t, conversation.GetType(), Conversation_ContactType) + require.Equal(t, conversation.GetType(), messengertypes.Conversation_ContactType) } // Requester has a device-updated event { event := requester.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeDeviceUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeDeviceUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - device := payload.(*StreamEvent_DeviceUpdated).Device + device := payload.(*messengertypes.StreamEvent_DeviceUpdated).Device require.Equal(t, requested.GetAccount().GetPublicKey(), device.GetMemberPublicKey()) require.NotEmpty(t, device.GetPublicKey()) } @@ -1038,43 +1039,43 @@ func testAddContact(ctx context.Context, t *testing.T, requester, requested *Tes // Requested has a device-updated event { event := requested.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeDeviceUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeDeviceUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - device := payload.(*StreamEvent_DeviceUpdated).Device + device := payload.(*messengertypes.StreamEvent_DeviceUpdated).Device require.Equal(t, requester.GetAccount().GetPublicKey(), device.GetMemberPublicKey()) require.NotEmpty(t, device.GetPublicKey()) } // Requester has a contact updated event (Established) - var contact *Contact + var contact *messengertypes.Contact { event := requester.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeContactUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeContactUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - contact = payload.(*StreamEvent_ContactUpdated).Contact + contact = payload.(*messengertypes.StreamEvent_ContactUpdated).Contact require.NotEmpty(t, contact.GetPublicKey()) require.Equal(t, contact.GetPublicKey(), requested.GetAccount().GetPublicKey()) if requested.GetAccount().GetDisplayName() != "" { require.Equal(t, contact.GetDisplayName(), requested.GetAccount().GetDisplayName()) } - require.Equal(t, contact.GetState(), Contact_Accepted) + require.Equal(t, contact.GetState(), messengertypes.Contact_Accepted) require.Equal(t, contact.GetConversationPublicKey(), groupPK) } // Requester receives the contact conversation event too { event := requester.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).Conversation + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotEmpty(t, conversation.GetPublicKey()) require.Equal(t, conversation.GetPublicKey(), groupPK) require.Empty(t, conversation.GetDisplayName()) require.Empty(t, conversation.GetLink()) - require.Equal(t, conversation.GetType(), Conversation_ContactType) + require.Equal(t, conversation.GetType(), messengertypes.Conversation_ContactType) } return contact @@ -1087,9 +1088,9 @@ func testSendGroupMessage(ctx context.Context, t *testing.T, groupPK string, sen var beforeSend, afterSend int64 { beforeSend = timestampMs(time.Now()) - userMessage, err := proto.Marshal(&AppMessage_UserMessage{Body: msg}) + userMessage, err := proto.Marshal(&messengertypes.AppMessage_UserMessage{Body: msg}) require.NoError(t, err) - interactionRequest := Interact_Request{Type: AppMessage_TypeUserMessage, Payload: userMessage, ConversationPublicKey: groupPK} + interactionRequest := messengertypes.Interact_Request{Type: messengertypes.AppMessage_TypeUserMessage, Payload: userMessage, ConversationPublicKey: groupPK} _, err = sender.GetClient().Interact(ctx, &interactionRequest) require.NoError(t, err) afterSend = timestampMs(time.Now()) @@ -1100,19 +1101,19 @@ func testSendGroupMessage(ctx context.Context, t *testing.T, groupPK string, sen var messageCid string { event := sender.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeInteractionUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeInteractionUpdated) eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - interaction := eventPayload.(*StreamEvent_InteractionUpdated).Interaction + interaction := eventPayload.(*messengertypes.StreamEvent_InteractionUpdated).Interaction require.NotEmpty(t, interaction.GetCID()) messageCid = interaction.GetCID() - require.Equal(t, interaction.GetType(), AppMessage_TypeUserMessage) + require.Equal(t, interaction.GetType(), messengertypes.AppMessage_TypeUserMessage) require.Equal(t, interaction.GetConversationPublicKey(), groupPK) require.True(t, interaction.GetIsMe()) require.Equal(t, interaction.GetCID(), messageCid) interactionPayload, err := interaction.UnmarshalPayload() require.NoError(t, err) - userMessage := interactionPayload.(*AppMessage_UserMessage) + userMessage := interactionPayload.(*messengertypes.AppMessage_UserMessage) require.Equal(t, userMessage.GetBody(), msg) require.LessOrEqual(t, beforeSend, interaction.GetSentDate()) require.LessOrEqual(t, interaction.GetSentDate(), afterSend) @@ -1123,10 +1124,10 @@ func testSendGroupMessage(ctx context.Context, t *testing.T, groupPK string, sen { before := sender.conversations[groupPK] event := sender.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := eventPayload.(*StreamEvent_ConversationUpdated).Conversation + conversation := eventPayload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotEmpty(t, conversation) require.Equal(t, conversation.GetPublicKey(), groupPK) require.NotZero(t, conversation.GetType()) // this helper can be called in various contexts (account, contact, multi-member) @@ -1149,10 +1150,10 @@ func testSendGroupMessage(ctx context.Context, t *testing.T, groupPK string, sen before := receiver.conversations[groupPK] event := receiver.NextEvent(t) switch event.GetType() { - case StreamEvent_TypeConversationUpdated: + case messengertypes.StreamEvent_TypeConversationUpdated: eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := eventPayload.(*StreamEvent_ConversationUpdated).Conversation + conversation := eventPayload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.Equal(t, conversation.PublicKey, groupPK) require.Equal(t, conversation.GetPublicKey(), groupPK) require.NotZero(t, conversation.GetType()) // this helper can be called in various contexts (account, contact, multi-member) @@ -1165,29 +1166,29 @@ func testSendGroupMessage(ctx context.Context, t *testing.T, groupPK string, sen require.Equal(t, conversation.GetUnreadCount(), before.GetUnreadCount()+1) } gotConversationUpdate = true - case StreamEvent_TypeInteractionUpdated: + case messengertypes.StreamEvent_TypeInteractionUpdated: eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - interaction := eventPayload.(*StreamEvent_InteractionUpdated).Interaction + interaction := eventPayload.(*messengertypes.StreamEvent_InteractionUpdated).Interaction require.NotEmpty(t, interaction.GetCID()) require.Equal(t, interaction.GetConversationPublicKey(), groupPK) interactionPayload, err := interaction.UnmarshalPayload() require.NoError(t, err) switch { - case interaction.GetType() == AppMessage_TypeAcknowledge && interaction.GetIsMe(): + case interaction.GetType() == messengertypes.AppMessage_TypeAcknowledge && interaction.GetIsMe(): require.False(t, gotOwnAck) gotOwnAck = true - ack := interactionPayload.(*AppMessage_Acknowledge) + ack := interactionPayload.(*messengertypes.AppMessage_Acknowledge) require.Equal(t, ack.GetTarget(), messageCid) - case interaction.GetType() == AppMessage_TypeAcknowledge && !interaction.GetIsMe(): - ack := interactionPayload.(*AppMessage_Acknowledge) + case interaction.GetType() == messengertypes.AppMessage_TypeAcknowledge && !interaction.GetIsMe(): + ack := interactionPayload.(*messengertypes.AppMessage_Acknowledge) require.Equal(t, ack.GetTarget(), messageCid) gotOthersAcks++ - case interaction.GetType() == AppMessage_TypeUserMessage: + case interaction.GetType() == messengertypes.AppMessage_TypeUserMessage: require.False(t, gotMsg) gotMsg = true require.Equal(t, interaction.GetCID(), messageCid) - userMessage := interactionPayload.(*AppMessage_UserMessage) + userMessage := interactionPayload.(*messengertypes.AppMessage_UserMessage) require.Equal(t, userMessage.GetBody(), msg) require.LessOrEqual(t, beforeSend, interaction.GetSentDate()) require.LessOrEqual(t, interaction.GetSentDate(), afterSend) @@ -1205,24 +1206,24 @@ func testSendGroupMessage(ctx context.Context, t *testing.T, groupPK string, sen // sender has the ack event too for i := 0; i < len(receivers); i++ { event := sender.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeInteractionUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeInteractionUpdated) eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - interaction := eventPayload.(*StreamEvent_InteractionUpdated).Interaction + interaction := eventPayload.(*messengertypes.StreamEvent_InteractionUpdated).Interaction require.NotEmpty(t, interaction.GetCID()) - require.Equal(t, interaction.GetType(), AppMessage_TypeAcknowledge) + require.Equal(t, interaction.GetType(), messengertypes.AppMessage_TypeAcknowledge) require.Equal(t, interaction.GetConversationPublicKey(), groupPK) require.False(t, interaction.GetIsMe()) interactionPayload, err := interaction.UnmarshalPayload() require.NoError(t, err) - ack := interactionPayload.(*AppMessage_Acknowledge) + ack := interactionPayload.(*messengertypes.AppMessage_Acknowledge) require.Equal(t, ack.GetTarget(), messageCid) logger.Debug("testSendGroupMessage: message ack received by creator") // FIXME: check if the ack is from the good receiver, or useless? } } -func testCreateConversation(ctx context.Context, t *testing.T, creator *TestingAccount, convName string, invitees []*TestingAccount, logger *zap.Logger) *Conversation { +func testCreateConversation(ctx context.Context, t *testing.T, creator *TestingAccount, convName string, invitees []*TestingAccount, logger *zap.Logger) *messengertypes.Conversation { t.Helper() // creator creates a conversation @@ -1232,22 +1233,22 @@ func testCreateConversation(ctx context.Context, t *testing.T, creator *TestingA for idx, invitee := range invitees { contactsToInvite[idx] = invitee.GetAccount().GetPublicKey() } - createdConv, err := creator.GetClient().ConversationCreate(ctx, &ConversationCreate_Request{DisplayName: convName, ContactsToInvite: contactsToInvite}) + createdConv, err := creator.GetClient().ConversationCreate(ctx, &messengertypes.ConversationCreate_Request{DisplayName: convName, ContactsToInvite: contactsToInvite}) require.NoError(t, err) require.NotEmpty(t, createdConv.GetPublicKey()) convPK = createdConv.GetPublicKey() } // creator has a ConversationUpdated event for the display name - var createdConv *Conversation + var createdConv *messengertypes.Conversation { event := creator.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).GetConversation() + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).GetConversation() require.NotNil(t, conversation) - require.Equal(t, Conversation_MultiMemberType, conversation.GetType()) + require.Equal(t, messengertypes.Conversation_MultiMemberType, conversation.GetType()) require.Equal(t, convPK, conversation.GetPublicKey()) require.Equal(t, convName, conversation.GetDisplayName()) createdConv = conversation @@ -1259,28 +1260,28 @@ func testCreateConversation(ctx context.Context, t *testing.T, creator *TestingA // creator see the invitation in 1-1 conv { event := creator.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeInteractionUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeInteractionUpdated) eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - interaction := eventPayload.(*StreamEvent_InteractionUpdated).GetInteraction() - require.Equal(t, interaction.GetType(), AppMessage_TypeGroupInvitation) + interaction := eventPayload.(*messengertypes.StreamEvent_InteractionUpdated).GetInteraction() + require.Equal(t, interaction.GetType(), messengertypes.AppMessage_TypeGroupInvitation) require.NotEmpty(t, interaction.GetCID()) require.NotEqual(t, convPK, interaction.GetConversationPublicKey()) require.True(t, interaction.GetIsMe()) // FIXME: require.Equal, 1to1conv.pk interactionPayload, err := interaction.UnmarshalPayload() require.NoError(t, err) - inviteLink := interactionPayload.(*AppMessage_GroupInvitation).GetLink() + inviteLink := interactionPayload.(*messengertypes.AppMessage_GroupInvitation).GetLink() require.NotEmpty(t, inviteLink) } // creator get a conversation update event { event := creator.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := eventPayload.(*StreamEvent_ConversationUpdated).Conversation + conversation := eventPayload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotEmpty(t, conversation) // require.Equal(t, conversation.GetPublicKey(), 1to1conv.pk) require.NotZero(t, conversation.GetType()) // this helper can be called in various contexts (account, contact, multi-member) @@ -1293,18 +1294,18 @@ func testCreateConversation(ctx context.Context, t *testing.T, creator *TestingA var inviteLink string { event := invitee.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeInteractionUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeInteractionUpdated) eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - interaction := eventPayload.(*StreamEvent_InteractionUpdated).GetInteraction() - require.Equal(t, interaction.GetType(), AppMessage_TypeGroupInvitation) + interaction := eventPayload.(*messengertypes.StreamEvent_InteractionUpdated).GetInteraction() + require.Equal(t, interaction.GetType(), messengertypes.AppMessage_TypeGroupInvitation) require.NotEmpty(t, interaction.GetCID()) require.NotEqual(t, convPK, interaction.GetConversationPublicKey()) require.False(t, interaction.GetIsMe()) // FIXME: require.Equal, 1to1conv.pk interactionPayload, err := interaction.UnmarshalPayload() require.NoError(t, err) - inviteLink = interactionPayload.(*AppMessage_GroupInvitation).GetLink() + inviteLink = interactionPayload.(*messengertypes.AppMessage_GroupInvitation).GetLink() require.NotEmpty(t, inviteLink) invitationLinks[invitee.GetAccount().GetPublicKey()] = inviteLink } @@ -1312,10 +1313,10 @@ func testCreateConversation(ctx context.Context, t *testing.T, creator *TestingA // invitee get a conversation update event { event := invitee.NextEvent(t) - require.Equal(t, event.GetType(), StreamEvent_TypeConversationUpdated) + require.Equal(t, event.GetType(), messengertypes.StreamEvent_TypeConversationUpdated) eventPayload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := eventPayload.(*StreamEvent_ConversationUpdated).Conversation + conversation := eventPayload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation require.NotEmpty(t, conversation) // require.Equal(t, conversation.GetPublicKey(), 1to1conv.pk) require.NotZero(t, conversation.GetType()) // this helper can be called in various contexts (account, contact, multi-member) @@ -1329,7 +1330,7 @@ func testCreateConversation(ctx context.Context, t *testing.T, creator *TestingA for _, invitee := range invitees { // invitee accepts the invitation { - conversation := &Conversation{ + conversation := &messengertypes.Conversation{ Link: invitationLinks[invitee.GetAccount().GetPublicKey()], // bonus: parse the link to get the name and public key (bonus) } @@ -1371,10 +1372,10 @@ func TestAccountUpdate(t *testing.T) { userPK := user.account.GetPublicKey() friends := nodes[1:] for _, friend := range friends { - _, err := user.client.ContactRequest(ctx, &ContactRequest_Request{Link: friend.account.GetLink()}) + _, err := user.client.ContactRequest(ctx, &messengertypes.ContactRequest_Request{Link: friend.account.GetLink()}) require.NoError(t, err) time.Sleep(1 * time.Second) - _, err = friend.client.ContactAccept(ctx, &ContactAccept_Request{PublicKey: userPK}) + _, err = friend.client.ContactAccept(ctx, &messengertypes.ContactAccept_Request{PublicKey: userPK}) require.NoError(t, err) } @@ -1389,10 +1390,10 @@ func TestAccountUpdate(t *testing.T) { stream, err := user.protocolClient.AttachmentPrepare(ctx) require.NoError(t, err) - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{})) // send header + require.NoError(t, stream.Send(&protocoltypes.AttachmentPrepare_Request{})) // send header const split = 5 - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{Block: testBlock[0:split]})) // send block - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{Block: testBlock[split:]})) // send block + require.NoError(t, stream.Send(&protocoltypes.AttachmentPrepare_Request{Block: testBlock[0:split]})) // send block + require.NoError(t, stream.Send(&protocoltypes.AttachmentPrepare_Request{Block: testBlock[split:]})) // send block reply, err := stream.CloseAndRecv() require.NoError(t, err) @@ -1400,7 +1401,7 @@ func TestAccountUpdate(t *testing.T) { logger.Info("starting update") const testName = "user" - _, err = user.client.AccountUpdate(ctx, &AccountUpdate_Request{DisplayName: testName, AvatarCID: userAvatarCID}) + _, err = user.client.AccountUpdate(ctx, &messengertypes.AccountUpdate_Request{DisplayName: testName, AvatarCID: userAvatarCID}) require.NoError(t, err) logger.Info("waiting for propagation") time.Sleep(4 * time.Second) @@ -1423,7 +1424,7 @@ func TestAccountUpdate(t *testing.T) { // check attachment cidBytes, err := b64DecodeBytes(avatarCIDInFriend) require.NoError(t, err) - stream, err := friend.protocolClient.AttachmentRetrieve(ctx, &bertytypes.AttachmentRetrieve_Request{AttachmentCID: cidBytes}) + stream, err := friend.protocolClient.AttachmentRetrieve(ctx, &protocoltypes.AttachmentRetrieve_Request{AttachmentCID: cidBytes}) require.NoError(t, err) data := []byte(nil) for { @@ -1440,8 +1441,8 @@ func TestAccountUpdate(t *testing.T) { logger.Error("test done") } -func TestAccountUpdateGroup(t *testing.T) { - testutil.FilterStabilityAndSpeed(t, testutil.Stable, testutil.Slow) +func TestUnstableAccountUpdateGroup(t *testing.T) { + testutil.FilterStabilityAndSpeed(t, testutil.Unstable, testutil.Slow) // PREPARE logger, cleanup := testutil.Logger(t) @@ -1469,7 +1470,7 @@ func TestAccountUpdateGroup(t *testing.T) { user := nodes[0] friends := nodes[1:] - ccReply, err := user.client.ConversationCreate(ctx, &ConversationCreate_Request{DisplayName: "test conv"}) + ccReply, err := user.client.ConversationCreate(ctx, &messengertypes.ConversationCreate_Request{DisplayName: "test conv"}) require.NoError(t, err) require.NotEmpty(t, ccReply.GetPublicKey()) @@ -1480,7 +1481,7 @@ func TestAccountUpdateGroup(t *testing.T) { require.NotEmpty(t, conv.GetLink()) for _, friend := range friends { - _, err = friend.client.ConversationJoin(ctx, &ConversationJoin_Request{Link: conv.GetLink()}) + _, err = friend.client.ConversationJoin(ctx, &messengertypes.ConversationJoin_Request{Link: conv.GetLink()}) require.NoError(t, err) } @@ -1493,20 +1494,20 @@ func TestAccountUpdateGroup(t *testing.T) { testBlock := []byte("hello world!") - stream, err := user.protocolClient.AttachmentPrepare(ctx) + stream, err := user.client.MediaPrepare(ctx) require.NoError(t, err) - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{})) // send header + require.NoError(t, stream.Send(&messengertypes.MediaPrepare_Request{Info: &messengertypes.Media{}})) // send header const split = 5 - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{Block: testBlock[0:split]})) // send block - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{Block: testBlock[split:]})) // send block + require.NoError(t, stream.Send(&messengertypes.MediaPrepare_Request{Block: testBlock[0:split]})) // send block + require.NoError(t, stream.Send(&messengertypes.MediaPrepare_Request{Block: testBlock[split:]})) // send block reply, err := stream.CloseAndRecv() require.NoError(t, err) - userAvatarCID := b64EncodeBytes(reply.GetAttachmentCID()) + userAvatarCID := reply.GetCid() logger.Info("starting update") const testName = "user" - _, err = user.client.AccountUpdate(ctx, &AccountUpdate_Request{DisplayName: testName, AvatarCID: userAvatarCID}) + _, err = user.client.AccountUpdate(ctx, &messengertypes.AccountUpdate_Request{DisplayName: testName, AvatarCID: userAvatarCID}) require.NoError(t, err) logger.Info("waiting for propagation") @@ -1530,7 +1531,7 @@ func TestAccountUpdateGroup(t *testing.T) { // check attachment cidBytes, err := b64DecodeBytes(avatarCIDInFriend) require.NoError(t, err) - stream, err := friend.protocolClient.AttachmentRetrieve(ctx, &bertytypes.AttachmentRetrieve_Request{AttachmentCID: cidBytes}) + stream, err := friend.protocolClient.AttachmentRetrieve(ctx, &protocoltypes.AttachmentRetrieve_Request{AttachmentCID: cidBytes}) require.NoError(t, err) data := []byte(nil) for { @@ -1547,7 +1548,7 @@ func TestAccountUpdateGroup(t *testing.T) { logger.Error("test done") } -func TestSendAttachment(t *testing.T) { +func TestSendBlob(t *testing.T) { testutil.FilterStabilityAndSpeed(t, testutil.Stable, testutil.Slow) // PREPARE @@ -1570,73 +1571,240 @@ func TestSendAttachment(t *testing.T) { defer close() } - logger.Info("Started nodes") + logger.Info("Started nodes, waiting for settlement") time.Sleep(4 * time.Second) user := nodes[0] friend := nodes[1] - userPK := user.account.GetPublicKey() + userPK := user.GetAccount().GetPublicKey() - _, err := user.client.ContactRequest(ctx, &ContactRequest_Request{Link: friend.GetLink()}) + _, err := user.client.ContactRequest(ctx, &messengertypes.ContactRequest_Request{Link: friend.GetAccount().GetLink()}) require.NoError(t, err) + logger.Info("waiting for request propagation") time.Sleep(1 * time.Second) - _, err = friend.client.ContactAccept(ctx, &ContactAccept_Request{PublicKey: userPK}) + _, err = friend.client.ContactAccept(ctx, &messengertypes.ContactAccept_Request{PublicKey: userPK}) require.NoError(t, err) - logger.Info("waiting for requests propagation") + logger.Info("waiting for contact settlement") time.Sleep(4 * time.Second) // REAL TEST - logger.Info("Starting test") + logger.Info("starting test") - testBlock := []byte("hello world!") + testData := []byte("hello world!") stream, err := user.protocolClient.AttachmentPrepare(ctx) require.NoError(t, err) - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{})) // send header + require.NoError(t, stream.Send(&protocoltypes.AttachmentPrepare_Request{})) // send header const split = 5 - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{Block: testBlock[0:split]})) // send block - require.NoError(t, stream.Send(&bertytypes.AttachmentPrepare_Request{Block: testBlock[split:]})) // send block + require.NoError(t, stream.Send(&protocoltypes.AttachmentPrepare_Request{Block: testData[0:split]})) // send block + require.NoError(t, stream.Send(&protocoltypes.AttachmentPrepare_Request{Block: testData[split:]})) // send block reply, err := stream.CloseAndRecv() require.NoError(t, err) - // attachmentCID := b64EncodeBytes(reply.GetAttachmentCID()) - - logger.Info("starting update") + logger.Info("starting send") const testName = "user" - friendAsContact, ok := user.contacts[friend.account.GetPublicKey()] - require.True(t, ok) + friendAsContact := user.GetContact(t, friend.GetAccount().GetPublicKey()) + + testCID := reply.GetAttachmentCID() + + b64CID := b64EncodeBytes(testCID) - gpkb, err := b64DecodeBytes(friendAsContact.GetConversationPublicKey()) + payload, err := proto.Marshal(&messengertypes.AppMessage_UserMessage{}) require.NoError(t, err) + _, err = user.client.Interact(ctx, &messengertypes.Interact_Request{ + ConversationPublicKey: friendAsContact.GetConversationPublicKey(), + MediaCids: []string{b64CID}, + Payload: payload, + Type: messengertypes.AppMessage_TypeUserMessage, + }) + require.NoError(t, err) + logger.Info("waiting for propagation") + time.Sleep(4 * time.Second) - _, err = user.protocolClient.AppMessageSend(ctx, - &bertytypes.AppMessageSend_Request{GroupPK: gpkb, AttachmentCIDs: [][]byte{reply.GetAttachmentCID()}}, - ) + logger.Info("checking friend", zap.String("name", friend.GetAccount().GetDisplayName())) + + inte := (*messengertypes.Interaction)(nil) + + for _, i := range friend.interactions { + if i.GetType() == messengertypes.AppMessage_TypeUserMessage { + inte = i + break + } + } + + fmt.Println("inte", inte) + + require.NotNil(t, inte) + + fmt.Println("medias", inte.GetMedias()) + + require.NotEmpty(t, inte.GetMedias()) + media := inte.GetMedias()[0] + require.NotNil(t, media) + cid := media.GetCID() + require.NotEmpty(t, cid) + require.Equal(t, b64EncodeBytes(testCID), cid) + + // check attachment + cidBytes, err := b64DecodeBytes(cid) + require.NoError(t, err) + retStream, err := friend.protocolClient.AttachmentRetrieve(ctx, &protocoltypes.AttachmentRetrieve_Request{AttachmentCID: cidBytes}) + require.NoError(t, err) + data := []byte(nil) + for { + rsp, err := retStream.Recv() + if err == io.EOF { + break + } + require.NoError(t, err) + data = append(data, rsp.GetBlock()...) + } + require.Equal(t, testData, data) +} + +func TestSendMedia(t *testing.T) { + testutil.FilterStabilityAndSpeed(t, testutil.Stable, testutil.Slow) + + // PREPARE + logger, cleanup := testutil.Logger(t) + defer cleanup() + + ctx, cancel := context.WithTimeout(context.Background(), 35*time.Second) + defer cancel() + + const l = 2 + + clients, protocols, cleanup := TestingInfra(ctx, t, l, logger) + defer cleanup() + + nodes := make([]*TestingAccount, l) + for i := range nodes { + nodes[i] = NewTestingAccount(ctx, t, clients[i], protocols[i].Client, logger) + nodes[i].SetName(t, fmt.Sprintf("node-%d", i)) + close := nodes[i].ProcessWholeStream(t) + defer close() + } + + logger.Info("Started nodes, waiting for settlement") + time.Sleep(4 * time.Second) + + user := nodes[0] + friend := nodes[1] + userPK := user.GetAccount().GetPublicKey() + + _, err := user.client.ContactRequest(ctx, &messengertypes.ContactRequest_Request{Link: friend.GetAccount().GetLink()}) + require.NoError(t, err) + logger.Info("waiting for request propagation") + time.Sleep(1 * time.Second) + _, err = friend.client.ContactAccept(ctx, &messengertypes.ContactAccept_Request{PublicKey: userPK}) + require.NoError(t, err) + + logger.Info("waiting for contact settlement") + time.Sleep(4 * time.Second) + + // REAL TEST + + logger.Info("starting test") + + testData := []byte("hello world!") + testMedia := messengertypes.Media{MimeType: "meme/quality", Filename: "mes super vacances.webm", DisplayName: "Clique"} + + stream, err := user.client.MediaPrepare(ctx) + require.NoError(t, err) + require.NoError(t, stream.Send(&messengertypes.MediaPrepare_Request{Info: &testMedia})) // send header + const split = 5 + require.NoError(t, stream.Send(&messengertypes.MediaPrepare_Request{Block: testData[0:split]})) // send block + require.NoError(t, stream.Send(&messengertypes.MediaPrepare_Request{Block: testData[split:]})) // send block + reply, err := stream.CloseAndRecv() + require.NoError(t, err) + + logger.Info("starting send") + const testName = "user" + + friendAsContact := user.GetContact(t, friend.GetAccount().GetPublicKey()) + + b64CID := reply.GetCid() + + payload, err := proto.Marshal(&messengertypes.AppMessage_UserMessage{}) + require.NoError(t, err) + _, err = user.client.Interact(ctx, &messengertypes.Interact_Request{ + ConversationPublicKey: friendAsContact.GetConversationPublicKey(), + MediaCids: []string{b64CID}, + Payload: payload, + Type: messengertypes.AppMessage_TypeUserMessage, + }) require.NoError(t, err) logger.Info("waiting for propagation") time.Sleep(4 * time.Second) - logger.Info("done waiting for propagation") - logger.Info("checking friends") + logger.Info("checking friend", zap.String("name", friend.GetAccount().GetDisplayName())) + + inte := (*messengertypes.Interaction)(nil) + + for _, i := range friend.interactions { + if i.GetType() == messengertypes.AppMessage_TypeUserMessage { + inte = i + break + } + } - logger.Info("checking node", zap.String("name", friend.account.GetDisplayName())) - _, ok = friend.contacts[userPK] - require.True(t, ok) + fmt.Println("inte", inte) + + require.NotNil(t, inte) + + fmt.Println("medias", inte.GetMedias()) + + require.NotEmpty(t, inte.GetMedias()) + media := inte.GetMedias()[0] + require.NotNil(t, media) + cid := media.GetCID() + require.NotEmpty(t, cid) + require.Equal(t, b64CID, cid) + + // check media + require.NoError(t, err) + retStream, err := friend.client.MediaRetrieve(ctx, &messengertypes.MediaRetrieve_Request{Cid: b64CID}) + require.NoError(t, err) + + // define expected result + expectedMedia := testMedia + expectedMedia.CID = cid + expectedMedia.InteractionCID = inte.GetCID() + expectedMedia.State = messengertypes.Media_StateNeverDownloaded // FIXME: should be Media_StateInCache + + // get and check header + header, err := retStream.Recv() + require.NoError(t, err) + require.Equal(t, &expectedMedia, header.GetInfo()) + + // check blocks + data := []byte(nil) + for { + rsp, err := retStream.Recv() + if err == io.EOF { + break + } + require.NoError(t, err) + data = append(data, rsp.GetBlock()...) + } + require.Equal(t, testData, data) - // FIXME: check that we recive an interaction with the correct attachment + // check that the media was sent on the event stream + clientMedia := friend.GetMedia(t, cid) + require.Equal(t, &expectedMedia, clientMedia) } func Test_exportMessengerData(t *testing.T) { db, cleanup := getInMemoryTestDB(t) defer cleanup() - db.db.Create(&Account{PublicKey: "pk_account_1", DisplayName: "display_name", ReplicateNewGroupsAutomatically: true}) - db.db.Create(&Conversation{PublicKey: "pk_conv_1", UnreadCount: 1000, IsOpen: false}) - db.db.Create(&Conversation{PublicKey: "pk_conv_2", UnreadCount: 2000, IsOpen: true}) - db.db.Create(&Conversation{PublicKey: "pk_conv_3", UnreadCount: 3000, IsOpen: false}) + db.db.Create(&messengertypes.Account{PublicKey: "pk_account_1", DisplayName: "display_name", ReplicateNewGroupsAutomatically: true}) + db.db.Create(&messengertypes.Conversation{PublicKey: "pk_conv_1", UnreadCount: 1000, IsOpen: false}) + db.db.Create(&messengertypes.Conversation{PublicKey: "pk_conv_2", UnreadCount: 2000, IsOpen: true}) + db.db.Create(&messengertypes.Conversation{PublicKey: "pk_conv_3", UnreadCount: 3000, IsOpen: false}) tmpFile, err := ioutil.TempFile(os.TempDir(), "messenger-export-") require.NoError(t, err) @@ -1659,7 +1827,7 @@ func Test_exportMessengerData(t *testing.T) { require.Equal(t, size, header.Size) require.NoError(t, err) - state := &LocalDatabaseState{} + state := &messengertypes.LocalDatabaseState{} err = proto.Unmarshal(stateBuffer.Bytes(), state) require.NoError(t, err) diff --git a/go/pkg/bertymessenger/testing.go b/go/pkg/bertymessenger/testing.go index f54066ba81..3d47a3c621 100644 --- a/go/pkg/bertymessenger/testing.go +++ b/go/pkg/bertymessenger/testing.go @@ -21,6 +21,8 @@ import ( "moul.io/zapgorm2" "berty.tech/berty/v2/go/pkg/bertyprotocol" + "berty.tech/berty/v2/go/pkg/messengertypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type TestingServiceOpts struct { @@ -29,7 +31,7 @@ type TestingServiceOpts struct { Index int } -func TestingService(ctx context.Context, t *testing.T, opts *TestingServiceOpts) (MessengerServiceServer, func()) { +func TestingService(ctx context.Context, t *testing.T, opts *TestingServiceOpts) (messengertypes.MessengerServiceServer, func()) { t.Helper() if opts.Logger == nil { opts.Logger = zap.NewNop() @@ -75,12 +77,12 @@ func TestingService(ctx context.Context, t *testing.T, opts *TestingServiceOpts) return server, cleanup } -func TestingInfra(ctx context.Context, t *testing.T, amount int, logger *zap.Logger) ([]MessengerServiceClient, []*bertyprotocol.TestingProtocol, func()) { +func TestingInfra(ctx context.Context, t *testing.T, amount int, logger *zap.Logger) ([]messengertypes.MessengerServiceClient, []*bertyprotocol.TestingProtocol, func()) { t.Helper() mocknet := libp2p_mocknet.New(ctx) protocols, cleanup := bertyprotocol.NewTestingProtocolWithMockedPeers(ctx, t, &bertyprotocol.TestingOpts{Logger: logger, Mocknet: mocknet}, nil, amount) - clients := make([]MessengerServiceClient, amount) + clients := make([]messengertypes.MessengerServiceClient, amount) for i, p := range protocols { // new messenger service @@ -89,7 +91,7 @@ func TestingInfra(ctx context.Context, t *testing.T, amount int, logger *zap.Log // new messenger client lis := bufconn.Listen(1024 * 1024) s := grpc.NewServer() - RegisterMessengerServiceServer(s, svc) + messengertypes.RegisterMessengerServiceServer(s, svc) go func() { err := s.Serve(lis) require.NoError(t, err) @@ -100,7 +102,7 @@ func TestingInfra(ctx context.Context, t *testing.T, amount int, logger *zap.Log require.NoError(t, conn.Close()) cleanupMessengerService() }, cleanup) - clients[i] = NewMessengerServiceClient(conn) + clients[i] = messengertypes.NewMessengerServiceClient(conn) } require.NoError(t, mocknet.ConnectAllButSelf()) @@ -117,9 +119,9 @@ func mkBufDialer(l *bufconn.Listener) func(context.Context, string) (net.Conn, e type TestingAccount struct { ctx context.Context logger *zap.Logger - client MessengerServiceClient - protocolClient bertyprotocol.ProtocolServiceClient - stream MessengerService_EventStreamClient + client messengertypes.MessengerServiceClient + protocolClient protocoltypes.ProtocolServiceClient + stream messengertypes.MessengerService_EventStreamClient openStreamOnce sync.Once closed bool cancelFunc func() @@ -128,13 +130,15 @@ type TestingAccount struct { tryNextMutex sync.Mutex // store - account *Account - conversations map[string]*Conversation - contacts map[string]*Contact - members map[string]*Member + account *messengertypes.Account + conversations map[string]*messengertypes.Conversation + contacts map[string]*messengertypes.Contact + members map[string]*messengertypes.Member + interactions map[string]*messengertypes.Interaction + medias map[string]*messengertypes.Media } -func NewTestingAccount(ctx context.Context, t *testing.T, client MessengerServiceClient, protocolClient bertyprotocol.ProtocolServiceClient, logger *zap.Logger) *TestingAccount { +func NewTestingAccount(ctx context.Context, t *testing.T, client messengertypes.MessengerServiceClient, protocolClient protocoltypes.ProtocolServiceClient, logger *zap.Logger) *TestingAccount { t.Helper() ctx, cancel := context.WithCancel(ctx) return &TestingAccount{ @@ -143,9 +147,11 @@ func NewTestingAccount(ctx context.Context, t *testing.T, client MessengerServic client: client, protocolClient: protocolClient, logger: logger, - conversations: make(map[string]*Conversation), - contacts: make(map[string]*Contact), - members: make(map[string]*Member), + conversations: make(map[string]*messengertypes.Conversation), + contacts: make(map[string]*messengertypes.Contact), + members: make(map[string]*messengertypes.Member), + interactions: make(map[string]*messengertypes.Interaction), + medias: make(map[string]*messengertypes.Media), } } @@ -160,7 +166,7 @@ func (a *TestingAccount) openStream(t *testing.T) { t.Helper() a.openStreamOnce.Do(func() { var err error - a.stream, err = a.client.EventStream(a.ctx, &EventStream_Request{}) + a.stream, err = a.client.EventStream(a.ctx, &messengertypes.EventStream_Request{}) require.NoError(t, err) }) } @@ -193,71 +199,67 @@ func (a *TestingAccount) ProcessWholeStream(t *testing.T) func() { return func() { close(ch) } } -func (a *TestingAccount) GetLink() string { - a.processMutex.Lock() - defer a.processMutex.Unlock() - return a.account.GetLink() -} - -func (a *TestingAccount) GetConversation(t *testing.T, pk string) *Conversation { - a.processMutex.Lock() - defer a.processMutex.Unlock() - conv, ok := a.conversations[pk] - require.True(t, ok) - return conv -} - -func (a *TestingAccount) processEvent(t *testing.T, event *StreamEvent) { +func (a *TestingAccount) processEvent(t *testing.T, event *messengertypes.StreamEvent) { a.processMutex.Lock() defer a.processMutex.Unlock() t.Helper() switch event.GetType() { - case StreamEvent_TypeAccountUpdated: + case messengertypes.StreamEvent_TypeAccountUpdated: payload, err := event.UnmarshalPayload() require.NoError(t, err) - a.account = payload.(*StreamEvent_AccountUpdated).Account - case StreamEvent_TypeContactUpdated: + a.account = payload.(*messengertypes.StreamEvent_AccountUpdated).Account + case messengertypes.StreamEvent_TypeContactUpdated: payload, err := event.UnmarshalPayload() require.NoError(t, err) - contact := payload.(*StreamEvent_ContactUpdated).Contact + contact := payload.(*messengertypes.StreamEvent_ContactUpdated).Contact a.contacts[contact.GetPublicKey()] = contact - t.Log("contact updated in", a.GetAccount().GetDisplayName(), ", name:", contact.GetDisplayName(), ", mpk:", contact.GetPublicKey(), ", acid: ", contact.GetAvatarCID()) - case StreamEvent_TypeConversationUpdated: + t.Log("contact updated in", a.account.GetDisplayName(), ", name:", contact.GetDisplayName(), ", mpk:", contact.GetPublicKey(), ", acid: ", contact.GetAvatarCID()) + case messengertypes.StreamEvent_TypeConversationUpdated: payload, err := event.UnmarshalPayload() require.NoError(t, err) - conversation := payload.(*StreamEvent_ConversationUpdated).Conversation + conversation := payload.(*messengertypes.StreamEvent_ConversationUpdated).Conversation a.conversations[conversation.GetPublicKey()] = conversation - case StreamEvent_TypeMemberUpdated: + case messengertypes.StreamEvent_TypeMemberUpdated: payload, err := event.UnmarshalPayload() require.NoError(t, err) - member := payload.(*StreamEvent_MemberUpdated).Member + member := payload.(*messengertypes.StreamEvent_MemberUpdated).Member a.members[member.GetPublicKey()] = member - t.Log("member updated in", a.GetAccount().GetDisplayName(), ", value:", member.GetDisplayName(), ", mpk:", member.GetPublicKey()) + t.Log("member updated in", a.account.GetDisplayName(), ", value:", member.GetDisplayName(), ", mpk:", member.GetPublicKey()) + case messengertypes.StreamEvent_TypeInteractionUpdated: + payload, err := event.UnmarshalPayload() + require.NoError(t, err) + inte := payload.(*messengertypes.StreamEvent_InteractionUpdated).Interaction + a.interactions[inte.GetCID()] = inte + case messengertypes.StreamEvent_TypeMediaUpdated: + payload, err := event.UnmarshalPayload() + require.NoError(t, err) + media := payload.(*messengertypes.StreamEvent_MediaUpdated).Media + a.medias[media.GetCID()] = media } } -func (a *TestingAccount) GetClient() MessengerServiceClient { +func (a *TestingAccount) GetClient() messengertypes.MessengerServiceClient { return a.client } func (a *TestingAccount) DrainInitEvents(t *testing.T) { for { event := a.TryNextEvent(t, 100*time.Millisecond) - if event.Type == StreamEvent_TypeListEnded { + if event.Type == messengertypes.StreamEvent_TypeListEnded { return } } } -func (a *TestingAccount) GetStream(t *testing.T) MessengerService_EventStreamClient { +func (a *TestingAccount) GetStream(t *testing.T) messengertypes.MessengerService_EventStreamClient { a.openStream(t) return a.stream } func (a *TestingAccount) SetName(t *testing.T, name string) { t.Helper() - _, err := a.client.AccountUpdate(a.ctx, &AccountUpdate_Request{DisplayName: name}) + _, err := a.client.AccountUpdate(a.ctx, &messengertypes.AccountUpdate_Request{DisplayName: name}) require.NoError(t, err) } @@ -265,15 +267,15 @@ func (a *TestingAccount) SetNameAndDrainUpdate(t *testing.T, name string) { t.Helper() a.SetName(t, name) event := a.NextEvent(t) - require.Equal(t, event.Type, StreamEvent_TypeAccountUpdated) + require.Equal(t, event.Type, messengertypes.StreamEvent_TypeAccountUpdated) payload, err := event.UnmarshalPayload() require.NoError(t, err) - account := payload.(*StreamEvent_AccountUpdated).Account + account := payload.(*messengertypes.StreamEvent_AccountUpdated).Account require.Equal(t, a.GetAccount(), account) require.Equal(t, name, account.DisplayName) } -func (a *TestingAccount) NextEvent(t *testing.T) *StreamEvent { +func (a *TestingAccount) NextEvent(t *testing.T) *messengertypes.StreamEvent { t.Helper() a.openStream(t) @@ -294,11 +296,37 @@ func (a *TestingAccount) NextEvent(t *testing.T) *StreamEvent { return entry.Event } -func (a *TestingAccount) GetAccount() *Account { +func (a *TestingAccount) GetAccount() *messengertypes.Account { + a.processMutex.Lock() + defer a.processMutex.Unlock() return a.account } -func (a *TestingAccount) TryNextEvent(t *testing.T, timeout time.Duration) *StreamEvent { +func (a *TestingAccount) GetContact(t *testing.T, pk string) *messengertypes.Contact { + a.processMutex.Lock() + defer a.processMutex.Unlock() + c, ok := a.contacts[pk] + require.True(t, ok) + return c +} + +func (a *TestingAccount) GetConversation(t *testing.T, pk string) *messengertypes.Conversation { + a.processMutex.Lock() + defer a.processMutex.Unlock() + conv, ok := a.conversations[pk] + require.True(t, ok) + return conv +} + +func (a *TestingAccount) GetMedia(t *testing.T, cid string) *messengertypes.Media { + a.processMutex.Lock() + defer a.processMutex.Unlock() + media, ok := a.medias[cid] + require.True(t, ok) + return media +} + +func (a *TestingAccount) TryNextEvent(t *testing.T, timeout time.Duration) *messengertypes.StreamEvent { t.Helper() a.openStream(t) @@ -306,7 +334,7 @@ func (a *TestingAccount) TryNextEvent(t *testing.T, timeout time.Duration) *Stre defer a.tryNextMutex.Unlock() done := make(chan struct{}) - var event *StreamEvent + var event *messengertypes.StreamEvent go func() { event = a.NextEvent(t) close(done) diff --git a/go/pkg/bertymessenger/util.go b/go/pkg/bertymessenger/util.go index 8d41106363..e8488aaa03 100644 --- a/go/pkg/bertymessenger/util.go +++ b/go/pkg/bertymessenger/util.go @@ -7,16 +7,15 @@ import ( "fmt" "time" - "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func checkIsMe(ctx context.Context, client bertyprotocol.ProtocolServiceClient, gme *bertytypes.GroupMessageEvent) (bool, error) { +func checkIsMe(ctx context.Context, client protocoltypes.ProtocolServiceClient, gme *protocoltypes.GroupMessageEvent) (bool, error) { gpkb := gme.GetEventContext().GetGroupPK() // TODO: support multiple devices per account - gi, err := client.GroupInfo(ctx, &bertytypes.GroupInfo_Request{GroupPK: gpkb}) + gi, err := client.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{GroupPK: gpkb}) if err != nil { return false, err } @@ -27,8 +26,8 @@ func checkIsMe(ctx context.Context, client bertyprotocol.ProtocolServiceClient, return bytes.Equal(dpk, mdpk), nil } -func groupPKFromContactPK(ctx context.Context, client bertyprotocol.ProtocolServiceClient, contactPK []byte) ([]byte, error) { - req := &bertytypes.GroupInfo_Request{ContactPK: contactPK} +func groupPKFromContactPK(ctx context.Context, client protocoltypes.ProtocolServiceClient, contactPK []byte) ([]byte, error) { + req := &protocoltypes.GroupInfo_Request{ContactPK: contactPK} groupInfo, err := client.GroupInfo(ctx, req) if err != nil { return nil, err diff --git a/go/pkg/bertyprotocol/account_export.go b/go/pkg/bertyprotocol/account_export.go index 558b6c4309..cef0ab4950 100644 --- a/go/pkg/bertyprotocol/account_export.go +++ b/go/pkg/bertyprotocol/account_export.go @@ -18,8 +18,8 @@ import ( "go.uber.org/multierr" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" orbitdb "berty.tech/go-orbit-db" ) @@ -147,7 +147,7 @@ func (s *service) exportOrbitDBGroupHeads(gc *groupContext, headsMetadata []cid. return errcode.ErrSerialization.Wrap(err) } - headsExport := &bertytypes.GroupHeadsExport{ + headsExport := &protocoltypes.GroupHeadsExport{ PublicKey: gc.group.PublicKey, SignPub: spkBytes, MetadataHeadsCIDs: cidsMeta, @@ -270,7 +270,7 @@ func readExportSecretKeyFile(expectedSize int64, reader *tar.Reader) (crypto.Pri return sk, nil } -func readExportOrbitDBGroupHeads(expectedSize int64, reader *tar.Reader) (*bertytypes.GroupHeadsExport, []cid.Cid, []cid.Cid, error) { +func readExportOrbitDBGroupHeads(expectedSize int64, reader *tar.Reader) (*protocoltypes.GroupHeadsExport, []cid.Cid, []cid.Cid, error) { if expectedSize == 0 { return nil, nil, nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("invalid expected node size")) } @@ -285,7 +285,7 @@ func readExportOrbitDBGroupHeads(expectedSize int64, reader *tar.Reader) (*berty return nil, nil, nil, errcode.ErrInternal.Wrap(fmt.Errorf("unexpected file size")) } - groupHeads := &bertytypes.GroupHeadsExport{} + groupHeads := &protocoltypes.GroupHeadsExport{} if err := groupHeads.Unmarshal(nodeContents.Bytes()); err != nil { return nil, nil, nil, errcode.ErrDeserialization.Wrap(err) } @@ -420,7 +420,7 @@ func restoreOrbitDBHeads(ctx context.Context, odb *BertyOrbitDB) RestoreAccountH return true, errcode.ErrInternal.Wrap(err) } - if err := odb.setHeadsForGroup(ctx, &bertytypes.Group{ + if err := odb.setHeadsForGroup(ctx, &protocoltypes.Group{ PublicKey: heads.PublicKey, SignPub: heads.SignPub, }, metaCIDs, messageCIDs); err != nil { diff --git a/go/pkg/bertyprotocol/account_export_test.go b/go/pkg/bertyprotocol/account_export_test.go index 3d10db715b..548fbaa11e 100644 --- a/go/pkg/bertyprotocol/account_export_test.go +++ b/go/pkg/bertyprotocol/account_export_test.go @@ -15,7 +15,7 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" orbitdb "berty.tech/go-orbit-db" "berty.tech/go-orbit-db/pubsub/pubsubraw" ) @@ -129,7 +129,7 @@ func TestUnstableRestoreAccount(t *testing.T) { require.NoError(t, err) expectedMessages := map[cid.Cid][]byte{} - var nodeAInstanceConfig *bertytypes.InstanceGetConfiguration_Reply + var nodeAInstanceConfig *protocoltypes.InstanceGetConfiguration_Reply g, _, err := NewGroupMultiMember() require.NoError(t, err) @@ -146,7 +146,7 @@ func TestUnstableRestoreAccount(t *testing.T) { serviceA, ok := nodeA.Service.(*service) require.True(t, ok) - nodeAInstanceConfig, err = nodeA.Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + nodeAInstanceConfig, err = nodeA.Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, nodeAInstanceConfig) @@ -165,10 +165,10 @@ func TestUnstableRestoreAccount(t *testing.T) { expectedMessages[op.GetEntry().GetHash()] = testPayload2 - _, err = nodeA.Client.MultiMemberGroupJoin(ctx, &bertytypes.MultiMemberGroupJoin_Request{Group: g}) + _, err = nodeA.Client.MultiMemberGroupJoin(ctx, &protocoltypes.MultiMemberGroupJoin_Request{Group: g}) require.NoError(t, err) - _, err = nodeA.Client.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{GroupPK: g.PublicKey}) + _, err = nodeA.Client.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{GroupPK: g.PublicKey}) require.NoError(t, err) op, err = serviceA.openedGroups[string(g.PublicKey)].messageStore.AddMessage(ctx, testPayload3, nil) @@ -223,7 +223,7 @@ func TestUnstableRestoreAccount(t *testing.T) { }, dsB) defer closeNodeB() - nodeBInstanceConfig, err := nodeB.Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + nodeBInstanceConfig, err := nodeB.Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, nodeBInstanceConfig) @@ -237,13 +237,13 @@ func TestUnstableRestoreAccount(t *testing.T) { require.True(t, ok) } - _, err = nodeB.Service.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{GroupPK: g.PublicKey}) + _, err = nodeB.Service.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{GroupPK: g.PublicKey}) require.NoError(t, err) for _, gPK := range [][]byte{nodeBInstanceConfig.AccountGroupPK, g.PublicKey} { sub, err := nodeB.Client.GroupMessageList( ctx, - &bertytypes.GroupMessageList_Request{ + &protocoltypes.GroupMessageList_Request{ GroupPK: gPK, UntilNow: true, }, diff --git a/go/pkg/bertyprotocol/api_app.go b/go/pkg/bertyprotocol/api_app.go index dd89a2d66a..95076804fc 100644 --- a/go/pkg/bertyprotocol/api_app.go +++ b/go/pkg/bertyprotocol/api_app.go @@ -3,11 +3,11 @@ package bertyprotocol import ( "context" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func (s *service) AppMetadataSend(ctx context.Context, req *bertytypes.AppMetadataSend_Request) (*bertytypes.AppMetadataSend_Reply, error) { +func (s *service) AppMetadataSend(ctx context.Context, req *protocoltypes.AppMetadataSend_Request) (*protocoltypes.AppMetadataSend_Reply, error) { g, err := s.getContextGroupForID(req.GroupPK) if err != nil { return nil, errcode.ErrGroupMissing.Wrap(err) @@ -17,10 +17,10 @@ func (s *service) AppMetadataSend(ctx context.Context, req *bertytypes.AppMetada return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.AppMetadataSend_Reply{}, nil + return &protocoltypes.AppMetadataSend_Reply{}, nil } -func (s *service) AppMessageSend(ctx context.Context, req *bertytypes.AppMessageSend_Request) (*bertytypes.AppMessageSend_Reply, error) { +func (s *service) AppMessageSend(ctx context.Context, req *protocoltypes.AppMessageSend_Request) (*protocoltypes.AppMessageSend_Reply, error) { g, err := s.getContextGroupForID(req.GroupPK) if err != nil { return nil, errcode.ErrGroupMissing.Wrap(err) @@ -30,5 +30,5 @@ func (s *service) AppMessageSend(ctx context.Context, req *bertytypes.AppMessage return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.AppMessageSend_Reply{}, nil + return &protocoltypes.AppMessageSend_Reply{}, nil } diff --git a/go/pkg/bertyprotocol/api_attachment.go b/go/pkg/bertyprotocol/api_attachment.go index 90d063ced2..af6a816af0 100644 --- a/go/pkg/bertyprotocol/api_attachment.go +++ b/go/pkg/bertyprotocol/api_attachment.go @@ -2,21 +2,22 @@ package bertyprotocol import ( "errors" - "io" ipfscid "github.com/ipfs/go-cid" ipfsfiles "github.com/ipfs/go-ipfs-files" ipfsoptions "github.com/ipfs/interface-go-ipfs-core/options" ipfspath "github.com/ipfs/interface-go-ipfs-core/path" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/internal/streamutil" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func (s *service) AttachmentPrepare(stream ProtocolService_AttachmentPrepareServer) error { +func (s *service) AttachmentPrepare(stream protocoltypes.ProtocolService_AttachmentPrepareServer) error { + // read header headerMsg, err := stream.Recv() if err != nil { - return errcode.ErrStreamRead.Wrap(err) + return errcode.ErrStreamHeaderRead.Wrap(err) } if len(headerMsg.GetBlock()) > 0 { return errcode.ErrInvalidInput.Wrap(errors.New("unexpected non-empty block")) @@ -26,107 +27,88 @@ func (s *service) AttachmentPrepare(stream ProtocolService_AttachmentPrepareServ } s.logger.Debug("AttachmentPrepare: header received") - plaintext, ptout := io.Pipe() + // open requests reader + plaintext := streamutil.FuncReader(func() ([]byte, error) { + msg, err := stream.Recv() + return msg.GetBlock(), err + }, s.logger) defer plaintext.Close() - go func() { - err := func() error { - for { - msg, err := stream.Recv() - if err == io.EOF { - return nil - } - if err != nil { - return errcode.ErrStreamRead.Wrap(err) - } - - if len(msg.GetBlock()) == 0 { - // receiving an empty block is equivalent to EOF to help clients with difficult plumbing - s.logger.Debug("AttachmentPrepare: empty block received, emulating EOF") - return nil - } - - if _, err := ptout.Write(msg.GetBlock()); err != nil { - return errcode.ErrStreamWrite.Wrap(err) - } - } - }() - closePipeOut(ptout, err, "AttachmentPrepare: failed to properly close plaintext reader", s.logger) - }() - + // open stream cipher sk, ciphertext, err := attachmentSealer(plaintext, s.logger) if err != nil { return errcode.ErrCryptoCipherInit.Wrap(err) } defer ciphertext.Close() + // sink ciphertext to ipfs ipfsFile := ipfsfiles.NewReaderFile(ciphertext) defer ipfsFile.Close() ipfsPath, err := s.ipfsCoreAPI.Unixfs().Add(stream.Context(), ipfsFile, attachmentForcePin) if err != nil { return errcode.ErrIPFSAdd.Wrap(err) } - cid := ipfsPath.Cid() + cid := ipfsPath.Cid().Bytes() - err = s.deviceKeystore.AttachmentPrivKeyPut(cid.Bytes(), sk) + // store associated private key + err = s.deviceKeystore.AttachmentPrivKeyPut(cid, sk) if err != nil { return errcode.ErrKeystorePut.Wrap(err) } - err = stream.SendAndClose(&bertytypes.AttachmentPrepare_Reply{ - AttachmentCID: cid.Bytes(), - }) - if err != nil { - return errcode.ErrStreamWrite.Wrap(err) + // return cid to client + if err = stream.SendAndClose(&protocoltypes.AttachmentPrepare_Reply{AttachmentCID: cid}); err != nil { + return errcode.ErrStreamSendAndClose.Wrap(err) } + // success return nil } -func (s *service) AttachmentRetrieve(req *bertytypes.AttachmentRetrieve_Request, stream ProtocolService_AttachmentRetrieveServer) error { +func (s *service) AttachmentRetrieve(req *protocoltypes.AttachmentRetrieve_Request, stream protocoltypes.ProtocolService_AttachmentRetrieveServer) error { + // deserialize cid. We could do it later but it's better to fail fast cid, err := ipfscid.Cast(req.GetAttachmentCID()) if err != nil { return errcode.ErrDeserialization.Wrap(err) } + // get associated private key sk, err := s.deviceKeystore.AttachmentPrivKey(req.GetAttachmentCID()) if err != nil { return errcode.ErrKeystoreGet.Wrap(err) } + // open ciphertext reader ipfsNode, err := s.ipfsCoreAPI.Unixfs().Get(stream.Context(), ipfspath.IpfsPath(cid)) if err != nil { return errcode.ErrIPFSGet.Wrap(err) } defer ipfsNode.Close() - ciphertext := ipfsfiles.ToFile(ipfsNode) defer ciphertext.Close() + // open stream cipher plaintext, err := attachmentOpener(ciphertext, sk, s.logger) if err != nil { return errcode.ErrCryptoCipherInit.Wrap(err) } defer plaintext.Close() - buf := make([]byte, 64*1024) - for { - n, err := plaintext.Read(buf) - if err == io.EOF { - return nil - } - if err != nil { - return errcode.ErrStreamRead.Wrap(err) - } - - reply := &bertytypes.AttachmentRetrieve_Reply{Block: buf[:n]} - if err := stream.Send(reply); err != nil { - return errcode.ErrStreamWrite.Wrap(err) - } + // sink plaintext to client + if err := streamutil.FuncSink(make([]byte, 64*1024), plaintext, func(block []byte) error { + return stream.Send(&protocoltypes.AttachmentRetrieve_Reply{Block: block}) + }); err != nil { + return errcode.ErrStreamSink.Wrap(err) } + + // success + return nil } func attachmentForcePin(settings *ipfsoptions.UnixfsAddSettings) error { + if settings == nil { + return errcode.ErrInvalidInput.Wrap(errors.New("nil ipfs settings")) + } settings.Pin = true return nil } diff --git a/go/pkg/bertyprotocol/api_client.go b/go/pkg/bertyprotocol/api_client.go index 07f3fff331..261ec3ca67 100644 --- a/go/pkg/bertyprotocol/api_client.go +++ b/go/pkg/bertyprotocol/api_client.go @@ -5,11 +5,11 @@ import ( "io" "sync" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func (s *service) InstanceExportData(_ *bertytypes.InstanceExportData_Request, server ProtocolService_InstanceExportDataServer) error { +func (s *service) InstanceExportData(_ *protocoltypes.InstanceExportData_Request, server protocoltypes.ProtocolService_InstanceExportDataServer) error { r, w := io.Pipe() var exportErr error @@ -31,7 +31,7 @@ func (s *service) InstanceExportData(_ *bertytypes.InstanceExportData_Request, s break } - if err := server.Send(&bertytypes.InstanceExportData_Reply{ExportedData: contents[:l]}); err != nil { + if err := server.Send(&protocoltypes.InstanceExportData_Reply{ExportedData: contents[:l]}); err != nil { exportErr = errcode.ErrStreamWrite.Wrap(err) break } @@ -52,7 +52,7 @@ func (s *service) InstanceExportData(_ *bertytypes.InstanceExportData_Request, s return nil } -func (s *service) InstanceGetConfiguration(ctx context.Context, req *bertytypes.InstanceGetConfiguration_Request) (*bertytypes.InstanceGetConfiguration_Reply, error) { +func (s *service) InstanceGetConfiguration(ctx context.Context, req *protocoltypes.InstanceGetConfiguration_Request) (*protocoltypes.InstanceGetConfiguration_Reply, error) { key, err := s.ipfsCoreAPI.Key().Self(ctx) if err != nil { return nil, errcode.TODO.Wrap(err) @@ -78,7 +78,7 @@ func (s *service) InstanceGetConfiguration(ctx context.Context, req *bertytypes. return nil, errcode.ErrSerialization.Wrap(err) } - return &bertytypes.InstanceGetConfiguration_Reply{ + return &protocoltypes.InstanceGetConfiguration_Reply{ AccountPK: member, DevicePK: device, AccountGroupPK: s.accountGroup.Group().PublicKey, diff --git a/go/pkg/bertyprotocol/api_contact.go b/go/pkg/bertyprotocol/api_contact.go index bc1a9edaf4..38e32facfd 100644 --- a/go/pkg/bertyprotocol/api_contact.go +++ b/go/pkg/bertyprotocol/api_contact.go @@ -5,11 +5,11 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func (s *service) ContactAliasKeySend(ctx context.Context, req *bertytypes.ContactAliasKeySend_Request) (*bertytypes.ContactAliasKeySend_Reply, error) { +func (s *service) ContactAliasKeySend(ctx context.Context, req *protocoltypes.ContactAliasKeySend_Request) (*protocoltypes.ContactAliasKeySend_Reply, error) { g, err := s.getContextGroupForID(req.GroupPK) if err != nil { return nil, errcode.ErrGroupMissing.Wrap(err) @@ -19,10 +19,10 @@ func (s *service) ContactAliasKeySend(ctx context.Context, req *bertytypes.Conta return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.ContactAliasKeySend_Reply{}, nil + return &protocoltypes.ContactAliasKeySend_Reply{}, nil } -func (s *service) ContactBlock(ctx context.Context, req *bertytypes.ContactBlock_Request) (*bertytypes.ContactBlock_Reply, error) { +func (s *service) ContactBlock(ctx context.Context, req *protocoltypes.ContactBlock_Request) (*protocoltypes.ContactBlock_Reply, error) { pk, err := crypto.UnmarshalEd25519PublicKey(req.ContactPK) if err != nil { return nil, errcode.ErrDeserialization.Wrap(err) @@ -32,10 +32,10 @@ func (s *service) ContactBlock(ctx context.Context, req *bertytypes.ContactBlock return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.ContactBlock_Reply{}, nil + return &protocoltypes.ContactBlock_Reply{}, nil } -func (s *service) ContactUnblock(ctx context.Context, req *bertytypes.ContactUnblock_Request) (*bertytypes.ContactUnblock_Reply, error) { +func (s *service) ContactUnblock(ctx context.Context, req *protocoltypes.ContactUnblock_Request) (*protocoltypes.ContactUnblock_Reply, error) { pk, err := crypto.UnmarshalEd25519PublicKey(req.ContactPK) if err != nil { return nil, errcode.ErrDeserialization.Wrap(err) @@ -45,5 +45,5 @@ func (s *service) ContactUnblock(ctx context.Context, req *bertytypes.ContactUnb return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.ContactUnblock_Reply{}, nil + return &protocoltypes.ContactUnblock_Reply{}, nil } diff --git a/go/pkg/bertyprotocol/api_contactrequest.go b/go/pkg/bertyprotocol/api_contactrequest.go index a89572a005..d87f8ff075 100644 --- a/go/pkg/bertyprotocol/api_contactrequest.go +++ b/go/pkg/bertyprotocol/api_contactrequest.go @@ -5,12 +5,12 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) // ContactRequestReference retrieves the necessary information to create a contact link -func (s *service) ContactRequestReference(context.Context, *bertytypes.ContactRequestReference_Request) (*bertytypes.ContactRequestReference_Reply, error) { +func (s *service) ContactRequestReference(context.Context, *protocoltypes.ContactRequestReference_Request) (*protocoltypes.ContactRequestReference_Reply, error) { enabled, shareableContact := s.accountGroup.MetadataStore().GetIncomingContactRequestsStatus() rdvSeed := []byte(nil) @@ -18,23 +18,23 @@ func (s *service) ContactRequestReference(context.Context, *bertytypes.ContactRe rdvSeed = shareableContact.PublicRendezvousSeed } - return &bertytypes.ContactRequestReference_Reply{ + return &protocoltypes.ContactRequestReference_Reply{ PublicRendezvousSeed: rdvSeed, Enabled: enabled, }, nil } // ContactRequestDisable disables incoming contact requests -func (s *service) ContactRequestDisable(ctx context.Context, _ *bertytypes.ContactRequestDisable_Request) (*bertytypes.ContactRequestDisable_Reply, error) { +func (s *service) ContactRequestDisable(ctx context.Context, _ *protocoltypes.ContactRequestDisable_Request) (*protocoltypes.ContactRequestDisable_Reply, error) { if _, err := s.accountGroup.MetadataStore().ContactRequestDisable(ctx); err != nil { return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.ContactRequestDisable_Reply{}, nil + return &protocoltypes.ContactRequestDisable_Reply{}, nil } // ContactRequestEnable enables incoming contact requests -func (s *service) ContactRequestEnable(ctx context.Context, _ *bertytypes.ContactRequestEnable_Request) (*bertytypes.ContactRequestEnable_Reply, error) { +func (s *service) ContactRequestEnable(ctx context.Context, _ *protocoltypes.ContactRequestEnable_Request) (*protocoltypes.ContactRequestEnable_Reply, error) { if _, err := s.accountGroup.MetadataStore().ContactRequestEnable(ctx); err != nil { return nil, errcode.ErrOrbitDBAppend.Wrap(err) } @@ -46,13 +46,13 @@ func (s *service) ContactRequestEnable(ctx context.Context, _ *bertytypes.Contac rdvSeed = shareableContact.PublicRendezvousSeed } - return &bertytypes.ContactRequestEnable_Reply{ + return &protocoltypes.ContactRequestEnable_Reply{ PublicRendezvousSeed: rdvSeed, }, nil } // ContactRequestResetReference generates a new contact request reference -func (s *service) ContactRequestResetReference(ctx context.Context, _ *bertytypes.ContactRequestResetReference_Request) (*bertytypes.ContactRequestResetReference_Reply, error) { +func (s *service) ContactRequestResetReference(ctx context.Context, _ *protocoltypes.ContactRequestResetReference_Request) (*protocoltypes.ContactRequestResetReference_Reply, error) { if _, err := s.accountGroup.MetadataStore().ContactRequestReferenceReset(ctx); err != nil { return nil, errcode.ErrOrbitDBAppend.Wrap(err) } @@ -64,13 +64,13 @@ func (s *service) ContactRequestResetReference(ctx context.Context, _ *bertytype rdvSeed = shareableContact.PublicRendezvousSeed } - return &bertytypes.ContactRequestResetReference_Reply{ + return &protocoltypes.ContactRequestResetReference_Reply{ PublicRendezvousSeed: rdvSeed, }, nil } // ContactRequestSend enqueues a new contact request to be sent -func (s *service) ContactRequestSend(ctx context.Context, req *bertytypes.ContactRequestSend_Request) (*bertytypes.ContactRequestSend_Reply, error) { +func (s *service) ContactRequestSend(ctx context.Context, req *protocoltypes.ContactRequestSend_Request) (*protocoltypes.ContactRequestSend_Reply, error) { shareableContact := req.Contact if shareableContact == nil { return nil, errcode.ErrInvalidInput @@ -80,11 +80,11 @@ func (s *service) ContactRequestSend(ctx context.Context, req *bertytypes.Contac return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.ContactRequestSend_Reply{}, nil + return &protocoltypes.ContactRequestSend_Reply{}, nil } // ContactRequestAccept accepts a contact request -func (s *service) ContactRequestAccept(ctx context.Context, req *bertytypes.ContactRequestAccept_Request) (*bertytypes.ContactRequestAccept_Reply, error) { +func (s *service) ContactRequestAccept(ctx context.Context, req *protocoltypes.ContactRequestAccept_Request) (*protocoltypes.ContactRequestAccept_Reply, error) { pk, err := crypto.UnmarshalEd25519PublicKey(req.ContactPK) if err != nil { return nil, errcode.ErrDeserialization.Wrap(err) @@ -98,11 +98,11 @@ func (s *service) ContactRequestAccept(ctx context.Context, req *bertytypes.Cont return nil, err } - return &bertytypes.ContactRequestAccept_Reply{}, nil + return &protocoltypes.ContactRequestAccept_Reply{}, nil } // ContactRequestDiscard ignores a contact request without informing the request sender -func (s *service) ContactRequestDiscard(ctx context.Context, req *bertytypes.ContactRequestDiscard_Request) (*bertytypes.ContactRequestDiscard_Reply, error) { +func (s *service) ContactRequestDiscard(ctx context.Context, req *protocoltypes.ContactRequestDiscard_Request) (*protocoltypes.ContactRequestDiscard_Reply, error) { pk, err := crypto.UnmarshalEd25519PublicKey(req.ContactPK) if err != nil { return nil, errcode.ErrDeserialization.Wrap(err) @@ -112,5 +112,5 @@ func (s *service) ContactRequestDiscard(ctx context.Context, req *bertytypes.Con return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.ContactRequestDiscard_Reply{}, nil + return &protocoltypes.ContactRequestDiscard_Reply{}, nil } diff --git a/go/pkg/bertyprotocol/api_debug.go b/go/pkg/bertyprotocol/api_debug.go index a9bfc91cc1..6fa1a3c67a 100644 --- a/go/pkg/bertyprotocol/api_debug.go +++ b/go/pkg/bertyprotocol/api_debug.go @@ -14,20 +14,20 @@ import ( "go.uber.org/zap" "berty.tech/berty/v2/go/internal/sysutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/go-orbit-db/stores/operation" ) -func (s *service) DebugListGroups(req *bertytypes.DebugListGroups_Request, srv ProtocolService_DebugListGroupsServer) error { - if err := srv.SendMsg(&bertytypes.DebugListGroups_Reply{ +func (s *service) DebugListGroups(req *protocoltypes.DebugListGroups_Request, srv protocoltypes.ProtocolService_DebugListGroupsServer) error { + if err := srv.SendMsg(&protocoltypes.DebugListGroups_Reply{ GroupPK: s.accountGroup.group.PublicKey, GroupType: s.accountGroup.group.GroupType, }); err != nil { return err } - for _, c := range s.accountGroup.MetadataStore().ListContactsByStatus(bertytypes.ContactStateAdded) { + for _, c := range s.accountGroup.MetadataStore().ListContactsByStatus(protocoltypes.ContactStateAdded) { pk, err := crypto.UnmarshalEd25519PublicKey(c.PK) if err != nil { return errcode.ErrDeserialization.Wrap(err) @@ -43,7 +43,7 @@ func (s *service) DebugListGroups(req *bertytypes.DebugListGroups_Request, srv P return errcode.ErrOrbitDBOpen.Wrap(err) } - if err := srv.SendMsg(&bertytypes.DebugListGroups_Reply{ + if err := srv.SendMsg(&protocoltypes.DebugListGroups_Reply{ GroupPK: g.PublicKey, GroupType: g.GroupType, ContactPK: c.PK, @@ -53,7 +53,7 @@ func (s *service) DebugListGroups(req *bertytypes.DebugListGroups_Request, srv P } for _, g := range s.accountGroup.MetadataStore().ListMultiMemberGroups() { - if err := srv.SendMsg(&bertytypes.DebugListGroups_Reply{ + if err := srv.SendMsg(&protocoltypes.DebugListGroups_Reply{ GroupPK: g.PublicKey, GroupType: g.GroupType, }); err != nil { @@ -64,8 +64,8 @@ func (s *service) DebugListGroups(req *bertytypes.DebugListGroups_Request, srv P return nil } -func (s *service) DebugInspectGroupStore(req *bertytypes.DebugInspectGroupStore_Request, srv ProtocolService_DebugInspectGroupStoreServer) error { - if req.LogType == bertytypes.DebugInspectGroupLogTypeUndefined { +func (s *service) DebugInspectGroupStore(req *protocoltypes.DebugInspectGroupStore_Request, srv protocoltypes.ProtocolService_DebugInspectGroupStoreServer) error { + if req.LogType == protocoltypes.DebugInspectGroupLogTypeUndefined { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("invalid log type specified")) } @@ -75,7 +75,7 @@ func (s *service) DebugInspectGroupStore(req *bertytypes.DebugInspectGroupStore_ } switch req.LogType { - case bertytypes.DebugInspectGroupLogTypeMessage: + case protocoltypes.DebugInspectGroupLogTypeMessage: for _, e := range cg.messageStore.OpLog().GetEntries().Slice() { var ( payload = []byte(nil) @@ -94,7 +94,7 @@ func (s *service) DebugInspectGroupStore(req *bertytypes.DebugInspectGroupStore_ nexts[i] = n.Bytes() } - if err := srv.SendMsg(&bertytypes.DebugInspectGroupStore_Reply{ + if err := srv.SendMsg(&protocoltypes.DebugInspectGroupStore_Reply{ CID: e.GetHash().Bytes(), ParentCIDs: nexts, DevicePK: devicePK, @@ -104,12 +104,12 @@ func (s *service) DebugInspectGroupStore(req *bertytypes.DebugInspectGroupStore_ } } - case bertytypes.DebugInspectGroupLogTypeMetadata: + case protocoltypes.DebugInspectGroupLogTypeMetadata: log := cg.metadataStore.OpLog() for _, e := range log.GetEntries().Slice() { var ( - eventType bertytypes.EventType + eventType protocoltypes.EventType payload = []byte(nil) devicePK = []byte(nil) nexts = make([][]byte, len(e.GetNext())) @@ -141,7 +141,7 @@ func (s *service) DebugInspectGroupStore(req *bertytypes.DebugInspectGroupStore_ nexts[i] = n.Bytes() } - if err := srv.SendMsg(&bertytypes.DebugInspectGroupStore_Reply{ + if err := srv.SendMsg(&protocoltypes.DebugInspectGroupStore_Reply{ CID: e.GetHash().Bytes(), ParentCIDs: nexts, Payload: payload, @@ -156,8 +156,8 @@ func (s *service) DebugInspectGroupStore(req *bertytypes.DebugInspectGroupStore_ return nil } -func (s *service) DebugGroup(ctx context.Context, request *bertytypes.DebugGroup_Request) (*bertytypes.DebugGroup_Reply, error) { - rep := &bertytypes.DebugGroup_Reply{} +func (s *service) DebugGroup(ctx context.Context, request *protocoltypes.DebugGroup_Request) (*protocoltypes.DebugGroup_Reply, error) { + rep := &protocoltypes.DebugGroup_Reply{} peers, err := s.ipfsCoreAPI.Swarm().Peers(ctx) if err != nil { @@ -176,8 +176,8 @@ func (s *service) DebugGroup(ctx context.Context, request *bertytypes.DebugGroup return rep, nil } -func (s *service) SystemInfo(ctx context.Context, request *bertytypes.SystemInfo_Request) (*bertytypes.SystemInfo_Reply, error) { - reply := bertytypes.SystemInfo_Reply{} +func (s *service) SystemInfo(ctx context.Context, request *protocoltypes.SystemInfo_Request) (*protocoltypes.SystemInfo_Reply, error) { + reply := protocoltypes.SystemInfo_Reply{} // process process, errs := sysutil.SystemInfoProcess() @@ -190,7 +190,7 @@ func (s *service) SystemInfo(ctx context.Context, request *bertytypes.SystemInfo // p2p { - reply.P2P = &bertytypes.SystemInfo_P2P{} + reply.P2P = &protocoltypes.SystemInfo_P2P{} // swarm metrics if api := s.IpfsCoreAPI(); api != nil { @@ -209,8 +209,8 @@ func (s *service) SystemInfo(ctx context.Context, request *bertytypes.SystemInfo // OrbitDB status := s.accountGroup.metadataStore.ReplicationStatus() - reply.OrbitDB = &bertytypes.SystemInfo_OrbitDB{ - AccountMetadata: &bertytypes.SystemInfo_OrbitDB_ReplicationStatus{ + reply.OrbitDB = &protocoltypes.SystemInfo_OrbitDB{ + AccountMetadata: &protocoltypes.SystemInfo_OrbitDB_ReplicationStatus{ Progress: int64(status.GetProgress()), Maximum: int64(status.GetMax()), Buffered: int64(status.GetBuffered()), @@ -230,8 +230,8 @@ func (s *service) SystemInfo(ctx context.Context, request *bertytypes.SystemInfo return &reply, nil } -func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Request) (*bertytypes.PeerList_Reply, error) { - reply := bertytypes.PeerList_Reply{} +func (s *service) PeerList(ctx context.Context, request *protocoltypes.PeerList_Request) (*protocoltypes.PeerList_Reply, error) { + reply := protocoltypes.PeerList_Reply{} api := s.IpfsCoreAPI() if api == nil { return nil, errcode.TODO.Wrap(fmt.Errorf("IPFS Core API is not available")) @@ -241,14 +241,14 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req return nil, errcode.TODO.Wrap(err) } - peers := map[peer.ID]*bertytypes.PeerList_Peer{} + peers := map[peer.ID]*protocoltypes.PeerList_Peer{} // each peer in the swarm should be visible for _, swarmPeer := range swarmPeers { - peers[swarmPeer.ID()] = &bertytypes.PeerList_Peer{ + peers[swarmPeer.ID()] = &protocoltypes.PeerList_Peer{ ID: swarmPeer.ID().Pretty(), Errors: []string{}, - Routes: []*bertytypes.PeerList_Route{}, + Routes: []*protocoltypes.PeerList_Route{}, } } // FIXME: do not restrict on swarm peers, also print some other important ones (old, etc) @@ -257,7 +257,7 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req for peerID, peer := range peers { info := s.host.Peerstore().PeerInfo(peerID) for _, addr := range info.Addrs { - peer.Routes = append(peer.Routes, &bertytypes.PeerList_Route{ + peer.Routes = append(peer.Routes, &protocoltypes.PeerList_Route{ Address: addr.String(), }) } @@ -267,10 +267,10 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req for _, swarmPeer := range swarmPeers { peer, ok := peers[swarmPeer.ID()] if !ok { - peer = &bertytypes.PeerList_Peer{ + peer = &protocoltypes.PeerList_Peer{ ID: swarmPeer.ID().Pretty(), Errors: []string{}, - Routes: []*bertytypes.PeerList_Route{}, + Routes: []*protocoltypes.PeerList_Route{}, } peer.Errors = append(peer.Errors, "peer in swarm peers, but not in peerstore") peers[swarmPeer.ID()] = peer @@ -278,7 +278,7 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req address := swarmPeer.Address().String() found := false - var selectedRoute *bertytypes.PeerList_Route + var selectedRoute *protocoltypes.PeerList_Route for _, route := range peer.Routes { if route.Address == address { found = true @@ -286,7 +286,7 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req } } if !found { - newRoute := bertytypes.PeerList_Route{Address: address} + newRoute := protocoltypes.PeerList_Route{Address: address} peer.Routes = append(peer.Routes, &newRoute) selectedRoute = &newRoute } @@ -304,9 +304,9 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req { switch swarmPeer.Direction() { case network.DirInbound: - selectedRoute.Direction = bertytypes.InboundDir + selectedRoute.Direction = protocoltypes.InboundDir case network.DirOutbound: - selectedRoute.Direction = bertytypes.OutboundDir + selectedRoute.Direction = protocoltypes.OutboundDir } } // streams @@ -315,12 +315,12 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req if err != nil { peer.Errors = append(peer.Errors, err.Error()) } else { - selectedRoute.Streams = []*bertytypes.PeerList_Stream{} + selectedRoute.Streams = []*protocoltypes.PeerList_Stream{} for _, peerStream := range peerStreams { if peerStream == "" { continue } - selectedRoute.Streams = append(selectedRoute.Streams, &bertytypes.PeerList_Stream{ + selectedRoute.Streams = append(selectedRoute.Streams, &protocoltypes.PeerList_Stream{ ID: string(peerStream), }) } @@ -330,25 +330,25 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req // compute features for _, peer := range peers { - features := map[bertytypes.PeerList_Feature]bool{} + features := map[protocoltypes.PeerList_Feature]bool{} for _, route := range peer.Routes { // FIXME: use the multiaddr library instead of string comparisons if strings.Contains(route.Address, "/quic") { - features[bertytypes.QuicFeature] = true + features[protocoltypes.QuicFeature] = true } if strings.Contains(route.Address, "/mc/") { - features[bertytypes.BLEFeature] = true - features[bertytypes.BertyFeature] = true + features[protocoltypes.BLEFeature] = true + features[protocoltypes.BertyFeature] = true } if strings.Contains(route.Address, "/tor/") { - features[bertytypes.TorFeature] = true + features[protocoltypes.TorFeature] = true } for _, stream := range route.Streams { if stream.ID == "/berty/contact_req/1.0.0" { - features[bertytypes.BertyFeature] = true + features[protocoltypes.BertyFeature] = true } if stream.ID == "/rendezvous/1.0.0" { - features[bertytypes.BertyFeature] = true + features[protocoltypes.BertyFeature] = true } } } @@ -361,20 +361,20 @@ func (s *service) PeerList(ctx context.Context, request *bertytypes.PeerList_Req for _, peer := range peers { // aggregate direction for _, route := range peer.Routes { - if route.Direction == bertytypes.UnknownDir { + if route.Direction == protocoltypes.UnknownDir { continue } switch { - case peer.Direction == bertytypes.UnknownDir: // first route with a direction + case peer.Direction == protocoltypes.UnknownDir: // first route with a direction peer.Direction = route.Direction - case peer.Direction == bertytypes.BiDir: // peer aggregate is already maximal + case peer.Direction == protocoltypes.BiDir: // peer aggregate is already maximal // noop case route.Direction == peer.Direction: // another route with the same direction // noop - case route.Direction == bertytypes.InboundDir && peer.Direction == bertytypes.OutboundDir: - peer.Direction = bertytypes.BiDir - case route.Direction == bertytypes.OutboundDir && peer.Direction == bertytypes.InboundDir: - peer.Direction = bertytypes.BiDir + case route.Direction == protocoltypes.InboundDir && peer.Direction == protocoltypes.OutboundDir: + peer.Direction = protocoltypes.BiDir + case route.Direction == protocoltypes.OutboundDir && peer.Direction == protocoltypes.InboundDir: + peer.Direction = protocoltypes.BiDir default: peer.Errors = append(peer.Errors, "failed to compute direction aggregate") } diff --git a/go/pkg/bertyprotocol/api_event.go b/go/pkg/bertyprotocol/api_event.go index a837cc9035..a303c3c1fd 100644 --- a/go/pkg/bertyprotocol/api_event.go +++ b/go/pkg/bertyprotocol/api_event.go @@ -6,8 +6,8 @@ import ( "go.uber.org/zap" "berty.tech/berty/v2/go/internal/tracer" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/go-orbit-db/events" "berty.tech/go-orbit-db/stores" ) @@ -34,7 +34,7 @@ func checkParametersConsistency(sinceID, untilID []byte, sinceNow, untilNow, rev } // GroupMetadataList replays previous and subscribes to new metadata events from the group -func (s *service) GroupMetadataList(req *bertytypes.GroupMetadataList_Request, sub ProtocolService_GroupMetadataListServer) error { +func (s *service) GroupMetadataList(req *protocoltypes.GroupMetadataList_Request, sub protocoltypes.ProtocolService_GroupMetadataListServer) error { var ( newEvents <-chan events.Event sentEvents = map[string]bool{} @@ -58,7 +58,7 @@ func (s *service) GroupMetadataList(req *bertytypes.GroupMetadataList_Request, s } listPreviousMessages := func() error { - var previousEvents <-chan *bertytypes.GroupMetadataEvent + var previousEvents <-chan *protocoltypes.GroupMetadataEvent previousEvents, err = cg.MetadataStore().ListEvents(sub.Context(), req.SinceID, req.UntilID, req.ReverseOrder) if err != nil { return err @@ -104,7 +104,7 @@ func (s *service) GroupMetadataList(req *bertytypes.GroupMetadataList_Request, s } } - e, ok := event.(*bertytypes.GroupMetadataEvent) + e, ok := event.(*protocoltypes.GroupMetadataEvent) if !ok || sentEvents[string(e.EventContext.ID)] { // Avoid sending two times the same event continue } @@ -129,7 +129,7 @@ func (s *service) GroupMetadataList(req *bertytypes.GroupMetadataList_Request, s } // GroupMessageList replays previous and subscribes to new message events from the group -func (s *service) GroupMessageList(req *bertytypes.GroupMessageList_Request, sub ProtocolService_GroupMessageListServer) error { +func (s *service) GroupMessageList(req *protocoltypes.GroupMessageList_Request, sub protocoltypes.ProtocolService_GroupMessageListServer) error { var ( newEvents <-chan events.Event sentEvents = map[string]bool{} @@ -153,7 +153,7 @@ func (s *service) GroupMessageList(req *bertytypes.GroupMessageList_Request, sub } listPreviousMessages := func() error { - var previousEvents <-chan *bertytypes.GroupMessageEvent + var previousEvents <-chan *protocoltypes.GroupMessageEvent previousEvents, err = cg.MessageStore().ListEvents(sub.Context(), req.SinceID, req.UntilID, req.ReverseOrder) if err != nil { return err @@ -199,7 +199,7 @@ func (s *service) GroupMessageList(req *bertytypes.GroupMessageList_Request, sub } } - e, ok := event.(*bertytypes.GroupMessageEvent) + e, ok := event.(*protocoltypes.GroupMessageEvent) if !ok || sentEvents[string(e.EventContext.ID)] { // Avoid sending two times the same event continue } diff --git a/go/pkg/bertyprotocol/api_group.go b/go/pkg/bertyprotocol/api_group.go index 0cda54e244..001068d548 100644 --- a/go/pkg/bertyprotocol/api_group.go +++ b/go/pkg/bertyprotocol/api_group.go @@ -10,13 +10,13 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/tinder" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func (s *service) GroupInfo(_ context.Context, req *bertytypes.GroupInfo_Request) (*bertytypes.GroupInfo_Reply, error) { +func (s *service) GroupInfo(_ context.Context, req *protocoltypes.GroupInfo_Request) (*protocoltypes.GroupInfo_Reply, error) { var ( - g *bertytypes.Group + g *protocoltypes.Group err error ) @@ -60,14 +60,14 @@ func (s *service) GroupInfo(_ context.Context, req *bertytypes.GroupInfo_Request return nil, errcode.ErrSerialization.Wrap(err) } - return &bertytypes.GroupInfo_Reply{ + return &protocoltypes.GroupInfo_Reply{ Group: g, MemberPK: member, DevicePK: device, }, nil } -func (s *service) ActivateGroup(ctx context.Context, req *bertytypes.ActivateGroup_Request) (*bertytypes.ActivateGroup_Reply, error) { +func (s *service) ActivateGroup(ctx context.Context, req *protocoltypes.ActivateGroup_Request) (*protocoltypes.ActivateGroup_Reply, error) { pk, err := crypto.UnmarshalEd25519PublicKey(req.GroupPK) if err != nil { return nil, errcode.ErrInvalidInput.Wrap(err) @@ -78,10 +78,10 @@ func (s *service) ActivateGroup(ctx context.Context, req *bertytypes.ActivateGro return nil, errcode.ErrInternal.Wrap(err) } - return &bertytypes.ActivateGroup_Reply{}, nil + return &protocoltypes.ActivateGroup_Reply{}, nil } -func (s *service) DeactivateGroup(_ context.Context, req *bertytypes.DeactivateGroup_Request) (*bertytypes.DeactivateGroup_Reply, error) { +func (s *service) DeactivateGroup(_ context.Context, req *protocoltypes.DeactivateGroup_Request) (*protocoltypes.DeactivateGroup_Reply, error) { pk, err := crypto.UnmarshalEd25519PublicKey(req.GroupPK) if err != nil { return nil, errcode.ErrInvalidInput.Wrap(err) @@ -91,10 +91,10 @@ func (s *service) DeactivateGroup(_ context.Context, req *bertytypes.DeactivateG return nil, errcode.ErrInternal.Wrap(err) } - return &bertytypes.DeactivateGroup_Reply{}, nil + return &protocoltypes.DeactivateGroup_Reply{}, nil } -func (s *service) MonitorGroup(req *bertytypes.MonitorGroup_Request, srv ProtocolService_MonitorGroupServer) error { +func (s *service) MonitorGroup(req *protocoltypes.MonitorGroup_Request, srv protocoltypes.ProtocolService_MonitorGroupServer) error { g, err := s.getContextGroupForID(req.GroupPK) if err != nil { return errcode.ErrGroupMissing.Wrap(err) @@ -113,7 +113,7 @@ func (s *service) MonitorGroup(req *bertytypes.MonitorGroup_Request, srv Protoco // @FIXME(gfanton): cached found peers should be done inside driver monitor cachedFoundPeers := make(map[peer.ID]ipfsutil.Multiaddrs) for evt := range sub.Out() { - var monitorEvent *bertytypes.MonitorGroup_EventMonitor + var monitorEvent *protocoltypes.MonitorGroup_EventMonitor switch e := evt.(type) { case ipfsutil.EvtPubSubTopic: @@ -140,12 +140,12 @@ func (s *service) MonitorGroup(req *bertytypes.MonitorGroup_Request, srv Protoco cachedFoundPeers[e.AddrInfo.ID] = newMS monitorEvent = monitorHandleDiscoveryEvent(&e, s.host) default: - monitorEvent = &bertytypes.MonitorGroup_EventMonitor{ - Type: bertytypes.TypeEventMonitorUndefined, + monitorEvent = &protocoltypes.MonitorGroup_EventMonitor{ + Type: protocoltypes.TypeEventMonitorUndefined, } } - err := srv.Send(&bertytypes.MonitorGroup_Reply{ + err := srv.Send(&protocoltypes.MonitorGroup_Reply{ GroupPK: req.GetGroupPK(), Event: monitorEvent, }) @@ -157,13 +157,13 @@ func (s *service) MonitorGroup(req *bertytypes.MonitorGroup_Request, srv Protoco return nil } -func monitorHandlePubsubEvent(e *ipfsutil.EvtPubSubTopic, h host.Host) *bertytypes.MonitorGroup_EventMonitor { - var m bertytypes.MonitorGroup_EventMonitor +func monitorHandlePubsubEvent(e *ipfsutil.EvtPubSubTopic, h host.Host) *protocoltypes.MonitorGroup_EventMonitor { + var m protocoltypes.MonitorGroup_EventMonitor switch e.EventType { case ipfsutil.TypeEventMonitorPeerJoined: - m.Type = bertytypes.TypeEventMonitorPeerJoin - m.PeerJoin = &bertytypes.MonitorGroup_EventMonitorPeerJoin{} + m.Type = protocoltypes.TypeEventMonitorPeerJoin + m.PeerJoin = &protocoltypes.MonitorGroup_EventMonitorPeerJoin{} activeConns := h.Network().ConnsToPeer(e.PeerID) m.PeerJoin.Topic = e.Topic @@ -175,27 +175,27 @@ func monitorHandlePubsubEvent(e *ipfsutil.EvtPubSubTopic, h host.Host) *bertytyp } case ipfsutil.TypeEventMonitorPeerLeaved: - m.Type = bertytypes.TypeEventMonitorPeerLeave - m.PeerLeave = &bertytypes.MonitorGroup_EventMonitorPeerLeave{} + m.Type = protocoltypes.TypeEventMonitorPeerLeave + m.PeerLeave = &protocoltypes.MonitorGroup_EventMonitorPeerLeave{} m.PeerLeave.PeerID = e.PeerID.String() m.PeerLeave.IsSelf = e.PeerID == h.ID() m.PeerLeave.Topic = e.Topic default: - m.Type = bertytypes.TypeEventMonitorUndefined + m.Type = protocoltypes.TypeEventMonitorUndefined } return &m } -func monitorHandleDiscoveryEvent(e *tinder.EvtDriverMonitor, _ host.Host) *bertytypes.MonitorGroup_EventMonitor { - var m bertytypes.MonitorGroup_EventMonitor +func monitorHandleDiscoveryEvent(e *tinder.EvtDriverMonitor, _ host.Host) *protocoltypes.MonitorGroup_EventMonitor { + var m protocoltypes.MonitorGroup_EventMonitor switch e.EventType { case tinder.TypeEventMonitorAdvertise: - m.Type = bertytypes.TypeEventMonitorAdvertiseGroup - m.AdvertiseGroup = &bertytypes.MonitorGroup_EventMonitorAdvertiseGroup{} + m.Type = protocoltypes.TypeEventMonitorAdvertiseGroup + m.AdvertiseGroup = &protocoltypes.MonitorGroup_EventMonitorAdvertiseGroup{} m.AdvertiseGroup.Topic = e.Topic m.AdvertiseGroup.PeerID = e.AddrInfo.ID.String() @@ -206,8 +206,8 @@ func monitorHandleDiscoveryEvent(e *tinder.EvtDriverMonitor, _ host.Host) *berty } case tinder.TypeEventMonitorFoundPeer: - m.Type = bertytypes.TypeEventMonitorPeerFound - m.PeerFound = &bertytypes.MonitorGroup_EventMonitorPeerFound{} + m.Type = protocoltypes.TypeEventMonitorPeerFound + m.PeerFound = &protocoltypes.MonitorGroup_EventMonitorPeerFound{} m.PeerFound.Topic = e.Topic m.PeerFound.PeerID = e.AddrInfo.ID.String() @@ -218,7 +218,7 @@ func monitorHandleDiscoveryEvent(e *tinder.EvtDriverMonitor, _ host.Host) *berty } default: - m.Type = bertytypes.TypeEventMonitorUndefined + m.Type = protocoltypes.TypeEventMonitorUndefined } return &m diff --git a/go/pkg/bertyprotocol/api_multimember.go b/go/pkg/bertyprotocol/api_multimember.go index 7c9df3b54b..c9d0bae2bb 100644 --- a/go/pkg/bertyprotocol/api_multimember.go +++ b/go/pkg/bertyprotocol/api_multimember.go @@ -6,12 +6,12 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) // MultiMemberGroupCreate creates a new MultiMember group -func (s *service) MultiMemberGroupCreate(ctx context.Context, req *bertytypes.MultiMemberGroupCreate_Request) (*bertytypes.MultiMemberGroupCreate_Reply, error) { +func (s *service) MultiMemberGroupCreate(ctx context.Context, req *protocoltypes.MultiMemberGroupCreate_Request) (*protocoltypes.MultiMemberGroupCreate_Reply, error) { g, sk, err := NewGroupMultiMember() if err != nil { return nil, errcode.ErrCryptoKeyGeneration.Wrap(err) @@ -41,23 +41,23 @@ func (s *service) MultiMemberGroupCreate(ctx context.Context, req *bertytypes.Mu return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.MultiMemberGroupCreate_Reply{ + return &protocoltypes.MultiMemberGroupCreate_Reply{ GroupPK: g.PublicKey, }, nil } // MultiMemberGroupJoin joins an existing MultiMember group using an invitation -func (s *service) MultiMemberGroupJoin(ctx context.Context, req *bertytypes.MultiMemberGroupJoin_Request) (*bertytypes.MultiMemberGroupJoin_Reply, error) { +func (s *service) MultiMemberGroupJoin(ctx context.Context, req *protocoltypes.MultiMemberGroupJoin_Request) (*protocoltypes.MultiMemberGroupJoin_Reply, error) { _, err := s.accountGroup.MetadataStore().GroupJoin(ctx, req.Group) if err != nil { return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.MultiMemberGroupJoin_Reply{}, nil + return &protocoltypes.MultiMemberGroupJoin_Reply{}, nil } // MultiMemberGroupLeave leaves a previously joined MultiMember group -func (s *service) MultiMemberGroupLeave(ctx context.Context, req *bertytypes.MultiMemberGroupLeave_Request) (*bertytypes.MultiMemberGroupLeave_Reply, error) { +func (s *service) MultiMemberGroupLeave(ctx context.Context, req *protocoltypes.MultiMemberGroupLeave_Request) (*protocoltypes.MultiMemberGroupLeave_Reply, error) { pk, err := crypto.UnmarshalEd25519PublicKey(req.GroupPK) if err != nil { return nil, errcode.ErrDeserialization.Wrap(err) @@ -70,11 +70,11 @@ func (s *service) MultiMemberGroupLeave(ctx context.Context, req *bertytypes.Mul _ = s.deactivateGroup(pk) - return &bertytypes.MultiMemberGroupLeave_Reply{}, nil + return &protocoltypes.MultiMemberGroupLeave_Reply{}, nil } // MultiMemberGroupAliasResolverDisclose sends an deviceKeystore identity proof to the group members -func (s *service) MultiMemberGroupAliasResolverDisclose(ctx context.Context, req *bertytypes.MultiMemberGroupAliasResolverDisclose_Request) (*bertytypes.MultiMemberGroupAliasResolverDisclose_Reply, error) { +func (s *service) MultiMemberGroupAliasResolverDisclose(ctx context.Context, req *protocoltypes.MultiMemberGroupAliasResolverDisclose_Request) (*protocoltypes.MultiMemberGroupAliasResolverDisclose_Reply, error) { cg, err := s.getContextGroupForID(req.GroupPK) if err != nil { return nil, errcode.ErrGroupMemberUnknownGroupID.Wrap(err) @@ -85,22 +85,22 @@ func (s *service) MultiMemberGroupAliasResolverDisclose(ctx context.Context, req return nil, errcode.ErrOrbitDBAppend.Wrap(err) } - return &bertytypes.MultiMemberGroupAliasResolverDisclose_Reply{}, nil + return &protocoltypes.MultiMemberGroupAliasResolverDisclose_Reply{}, nil } // MultiMemberGroupAdminRoleGrant grants admin role to another member of the group -func (s *service) MultiMemberGroupAdminRoleGrant(context.Context, *bertytypes.MultiMemberGroupAdminRoleGrant_Request) (*bertytypes.MultiMemberGroupAdminRoleGrant_Reply, error) { +func (s *service) MultiMemberGroupAdminRoleGrant(context.Context, *protocoltypes.MultiMemberGroupAdminRoleGrant_Request) (*protocoltypes.MultiMemberGroupAdminRoleGrant_Reply, error) { return nil, errcode.ErrNotImplemented } // MultiMemberGroupInvitationCreate creates a group invitation -func (s *service) MultiMemberGroupInvitationCreate(ctx context.Context, req *bertytypes.MultiMemberGroupInvitationCreate_Request) (*bertytypes.MultiMemberGroupInvitationCreate_Reply, error) { +func (s *service) MultiMemberGroupInvitationCreate(ctx context.Context, req *protocoltypes.MultiMemberGroupInvitationCreate_Request) (*protocoltypes.MultiMemberGroupInvitationCreate_Reply, error) { cg, err := s.getContextGroupForID(req.GroupPK) if err != nil { return nil, errcode.ErrGroupMemberUnknownGroupID.Wrap(err) } - return &bertytypes.MultiMemberGroupInvitationCreate_Reply{ + return &protocoltypes.MultiMemberGroupInvitationCreate_Reply{ Group: cg.Group(), }, nil } diff --git a/go/pkg/bertyprotocol/api_replication.go b/go/pkg/bertyprotocol/api_replication.go index 8129cf7ffc..26ecfe1c8e 100644 --- a/go/pkg/bertyprotocol/api_replication.go +++ b/go/pkg/bertyprotocol/api_replication.go @@ -9,11 +9,11 @@ import ( "google.golang.org/grpc" "berty.tech/berty/v2/go/internal/grpcutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func (s *service) ReplicationServiceRegisterGroup(ctx context.Context, request *bertytypes.ReplicationServiceRegisterGroup_Request) (*bertytypes.ReplicationServiceRegisterGroup_Reply, error) { +func (s *service) ReplicationServiceRegisterGroup(ctx context.Context, request *protocoltypes.ReplicationServiceRegisterGroup_Request) (*protocoltypes.ReplicationServiceRegisterGroup_Reply, error) { gc, err := s.getContextGroupForID(request.GroupPK) if err != nil { return nil, errcode.ErrInvalidInput.Wrap(err) @@ -57,7 +57,7 @@ func (s *service) ReplicationServiceRegisterGroup(ctx context.Context, request * client := NewReplicationServiceClient(cc) - if _, err = client.ReplicateGroup(ctx, &bertytypes.ReplicationServiceReplicateGroup_Request{ + if _, err = client.ReplicateGroup(ctx, &protocoltypes.ReplicationServiceReplicateGroup_Request{ Group: replGroup, }); err != nil { return nil, errcode.ErrServiceReplicationServer.Wrap(err) @@ -69,5 +69,5 @@ func (s *service) ReplicationServiceRegisterGroup(ctx context.Context, request * s.logger.Error("error while notifying group about replication", zap.Error(err)) } - return &bertytypes.ReplicationServiceRegisterGroup_Reply{}, nil + return &protocoltypes.ReplicationServiceRegisterGroup_Reply{}, nil } diff --git a/go/pkg/bertyprotocol/api_services_auth.go b/go/pkg/bertyprotocol/api_services_auth.go index 6c1239fb0c..c03bb90146 100644 --- a/go/pkg/bertyprotocol/api_services_auth.go +++ b/go/pkg/bertyprotocol/api_services_auth.go @@ -14,8 +14,8 @@ import ( "golang.org/x/net/context/ctxhttp" "berty.tech/berty/v2/go/internal/cryptoutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) const ( @@ -130,7 +130,7 @@ func (s *service) authInitURL(baseURL string) (string, error) { ), nil } -func (s *service) AuthServiceCompleteFlow(ctx context.Context, request *bertytypes.AuthServiceCompleteFlow_Request) (*bertytypes.AuthServiceCompleteFlow_Reply, error) { +func (s *service) AuthServiceCompleteFlow(ctx context.Context, request *protocoltypes.AuthServiceCompleteFlow_Request) (*protocoltypes.AuthServiceCompleteFlow_Reply, error) { u, err := url.Parse(request.CallbackURL) if err != nil { return nil, err @@ -195,17 +195,17 @@ func (s *service) AuthServiceCompleteFlow(ctx context.Context, request *bertytyp return nil, errcode.ErrServicesAuthInvalidResponse.Wrap(fmt.Errorf("no services returned along token")) } - services := make([]*bertytypes.ServiceTokenSupportedService, len(resMsg.Services)) + services := make([]*protocoltypes.ServiceTokenSupportedService, len(resMsg.Services)) i := 0 for k, v := range resMsg.Services { - services[i] = &bertytypes.ServiceTokenSupportedService{ + services[i] = &protocoltypes.ServiceTokenSupportedService{ ServiceType: k, ServiceEndpoint: v, } i++ } - if _, err := s.accountGroup.metadataStore.SendAccountServiceTokenAdded(ctx, &bertytypes.ServiceToken{ + if _, err := s.accountGroup.metadataStore.SendAccountServiceTokenAdded(ctx, &protocoltypes.ServiceToken{ Token: resMsg.AccessToken, AuthenticationURL: auth.baseURL, SupportedServices: services, @@ -214,28 +214,28 @@ func (s *service) AuthServiceCompleteFlow(ctx context.Context, request *bertytyp return nil, err } - return &bertytypes.AuthServiceCompleteFlow_Reply{}, nil + return &protocoltypes.AuthServiceCompleteFlow_Reply{}, nil } -func (s *service) AuthServiceInitFlow(ctx context.Context, request *bertytypes.AuthServiceInitFlow_Request) (*bertytypes.AuthServiceInitFlow_Reply, error) { +func (s *service) AuthServiceInitFlow(ctx context.Context, request *protocoltypes.AuthServiceInitFlow_Request) (*protocoltypes.AuthServiceInitFlow_Reply, error) { u, err := s.authInitURL(request.AuthURL) if err != nil { return nil, err } - return &bertytypes.AuthServiceInitFlow_Reply{ + return &protocoltypes.AuthServiceInitFlow_Reply{ URL: u, SecureURL: strings.HasPrefix(u, "https://"), }, nil } -func (s *service) ServicesTokenList(request *bertytypes.ServicesTokenList_Request, server ProtocolService_ServicesTokenListServer) error { +func (s *service) ServicesTokenList(request *protocoltypes.ServicesTokenList_Request, server protocoltypes.ProtocolService_ServicesTokenListServer) error { for _, t := range s.accountGroup.metadataStore.listServiceTokens() { if server.Context().Err() != nil { break } - if err := server.Send(&bertytypes.ServicesTokenList_Reply{ + if err := server.Send(&protocoltypes.ServicesTokenList_Reply{ TokenID: t.TokenID(), Service: t, }); err != nil { diff --git a/go/pkg/bertyprotocol/attachment_crypto.go b/go/pkg/bertyprotocol/attachment_crypto.go index 8d46277611..674b0d850a 100644 --- a/go/pkg/bertyprotocol/attachment_crypto.go +++ b/go/pkg/bertyprotocol/attachment_crypto.go @@ -15,8 +15,9 @@ import ( "golang.org/x/crypto/sha3" "berty.tech/berty/v2/go/internal/cryptoutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/internal/streamutil" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) // ⚠⚠⚠ FIXME: Needs thorough security review ⚠⚠⚠ @@ -72,38 +73,14 @@ func attachmentSealer(plaintext io.Reader, l *zap.Logger) (libp2pcrypto.PrivKey, return nil, nil, errcode.ErrCryptoCipherInit.Wrap(err) } - in, out := io.Pipe() + return sk, streamutil.FuncBlockTransformer(make([]byte, attachmentCipherblockSize-16), plaintext, l, func(pt []byte) ([]byte, error) { + ct := ac.aead.Seal([]byte(nil), ac.nonceBuf[:], pt, []byte(nil)) - buf := make([]byte, attachmentCipherblockSize-16) - go func() { - err := func() error { - for { - n, readErr := io.ReadFull(plaintext, buf) - if readErr == io.EOF { - return nil - } - if readErr != nil && readErr != io.ErrUnexpectedEOF { - return errcode.ErrStreamRead.Wrap(readErr) - } + ac.nonce.Add(ac.nonce, bigOne) + bigIntFillBytes(ac.nonce, ac.nonceBuf[:]) - ciphertext := ac.aead.Seal([]byte(nil), ac.nonceBuf[:], buf[:n], []byte(nil)) - - if _, err := out.Write(ciphertext); err != nil { - return errcode.ErrStreamWrite.Wrap(err) - } - - if readErr == io.ErrUnexpectedEOF { - return nil // last block can be smaller - } - - ac.nonce.Add(ac.nonce, bigOne) - bigIntFillBytes(ac.nonce, ac.nonceBuf[:]) - } - }() - closePipeOut(out, err, "attachmentSealer: failed to properly close ciphertext out", l) - }() - - return sk, in, nil + return ct, nil + }), nil } func attachmentOpener(ciphertext io.Reader, sk libp2pcrypto.PrivKey, l *zap.Logger) (*io.PipeReader, error) { @@ -112,41 +89,17 @@ func attachmentOpener(ciphertext io.Reader, sk libp2pcrypto.PrivKey, l *zap.Logg return nil, errcode.ErrCryptoCipherInit.Wrap(err) } - in, out := io.Pipe() - - buf := make([]byte, attachmentCipherblockSize) - go func() { - err := func() error { - for { - n, readErr := io.ReadFull(ciphertext, buf) - if readErr == io.EOF { - return nil - } - if readErr != nil && readErr != io.ErrUnexpectedEOF { - return errcode.ErrStreamRead.Wrap(readErr) - } - - plaintext, err := ac.aead.Open([]byte(nil), ac.nonceBuf[:], buf[:n], []byte(nil)) - if err != nil { - return errcode.ErrCryptoDecrypt.Wrap(err) - } - - if _, err := out.Write(plaintext); err != nil { - return errcode.ErrStreamWrite.Wrap(err) - } - - if readErr == io.ErrUnexpectedEOF { - return nil // last block can be smaller - } - - ac.nonce.Add(ac.nonce, bigOne) - bigIntFillBytes(ac.nonce, ac.nonceBuf[:]) - } - }() - closePipeOut(out, err, "attachmentOpener: failed to properly close plaintext out", l) - }() - - return in, nil + return streamutil.FuncBlockTransformer(make([]byte, attachmentCipherblockSize), ciphertext, l, func(ct []byte) ([]byte, error) { + pt, err := ac.aead.Open([]byte(nil), ac.nonceBuf[:], ct, []byte(nil)) + if err != nil { + return nil, errcode.ErrCryptoDecrypt.Wrap(err) + } + + ac.nonce.Add(ac.nonce, bigOne) + bigIntFillBytes(ac.nonce, ac.nonceBuf[:]) + + return pt, nil + }), nil } // - KEY SERIALIZATION @@ -212,7 +165,7 @@ func attachmentCIDDecrypt(sk *[cryptoutil.KeySize]byte, eCID []byte) ([]byte, er return cid, nil } -func attachmentCIDSliceEncrypt(g *bertytypes.Group, cids [][]byte) ([][]byte, error) { +func attachmentCIDSliceEncrypt(g *protocoltypes.Group, cids [][]byte) ([][]byte, error) { sk, err := attachmentCIDEncryptionKey(g.GetSharedSecret()) if err != nil { return nil, errcode.ErrCryptoKeyDerivation.Wrap(err) @@ -220,7 +173,7 @@ func attachmentCIDSliceEncrypt(g *bertytypes.Group, cids [][]byte) ([][]byte, er return mapBufArray(cids, func(cid []byte) ([]byte, error) { return attachmentCIDEncrypt(sk, cid) }) } -func attachmentCIDSliceDecrypt(g *bertytypes.Group, eCIDs [][]byte) ([][]byte, error) { +func attachmentCIDSliceDecrypt(g *protocoltypes.Group, eCIDs [][]byte) ([][]byte, error) { sk, err := attachmentCIDEncryptionKey(g.GetSharedSecret()) if err != nil { return nil, errcode.ErrCryptoKeyDerivation.Wrap(err) diff --git a/go/pkg/bertyprotocol/attachment_utils.go b/go/pkg/bertyprotocol/attachment_utils.go index 43cbb4da3e..812e8bdf51 100644 --- a/go/pkg/bertyprotocol/attachment_utils.go +++ b/go/pkg/bertyprotocol/attachment_utils.go @@ -1,26 +1,11 @@ package bertyprotocol import ( - "io" "math/big" - "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/errcode" ) -func closePipeOut(out *io.PipeWriter, incoming error, errPrefix string, l *zap.Logger) { - var cErr error - if incoming == nil || incoming == io.EOF { - cErr = out.Close() - } else { - cErr = out.CloseWithError(incoming) - } - if cErr != nil { - l.Error(errPrefix, zap.Error(cErr)) - } -} - // shim for go1.14 func bigIntFillBytes(bi *big.Int, buf []byte) { // Clear whole buffer. (This gets optimized into a memclr.) diff --git a/go/pkg/bertyprotocol/bertyprotocol.pb.go b/go/pkg/bertyprotocol/bertyprotocol.pb.go deleted file mode 100644 index 2a2006d096..0000000000 --- a/go/pkg/bertyprotocol/bertyprotocol.pb.go +++ /dev/null @@ -1,1828 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: bertyprotocol.proto - -package bertyprotocol - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - bertytypes "berty.tech/berty/v2/go/pkg/bertytypes" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("bertyprotocol.proto", fileDescriptor_047e04c733cf8554) } - -var fileDescriptor_047e04c733cf8554 = []byte{ - // 967 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x98, 0x61, 0x6f, 0x1c, 0x35, - 0x13, 0xc7, 0x75, 0x6f, 0x1e, 0x3d, 0x58, 0x85, 0x36, 0x2e, 0x14, 0x54, 0xa1, 0x36, 0x94, 0xa6, - 0x09, 0xa5, 0xdc, 0xa5, 0xa5, 0x14, 0x24, 0xc4, 0x8b, 0x6b, 0x12, 0xa2, 0x40, 0x22, 0xa2, 0x0b, - 0x48, 0xa8, 0x48, 0x48, 0xbe, 0xbd, 0xc9, 0xc5, 0x64, 0xcf, 0x5e, 0xec, 0xb9, 0xa5, 0x27, 0xf1, - 0x01, 0x78, 0x85, 0x84, 0xc4, 0x37, 0xe8, 0x17, 0x45, 0xf6, 0x3a, 0xee, 0xed, 0xda, 0xbe, 0xdd, - 0xeb, 0xbb, 0x93, 0xe7, 0x37, 0xff, 0xff, 0xec, 0x78, 0xe2, 0x5d, 0x87, 0xdc, 0x1c, 0x83, 0xc2, - 0x45, 0xa1, 0x24, 0xca, 0x4c, 0xe6, 0x7d, 0xfb, 0x83, 0x6e, 0xd8, 0xc5, 0xbe, 0x5f, 0x2d, 0x1f, - 0xdf, 0xbe, 0x61, 0x97, 0x70, 0x51, 0x80, 0xae, 0xd6, 0x9f, 0xbc, 0xda, 0x24, 0xd7, 0x4f, 0x1d, - 0x71, 0x06, 0xaa, 0xe4, 0x19, 0xd0, 0x9c, 0xd0, 0x23, 0xa1, 0x91, 0x89, 0x0c, 0x0e, 0x5e, 0x16, - 0x52, 0xe1, 0x3e, 0x43, 0x46, 0x1f, 0xf6, 0x2b, 0xbd, 0x2a, 0xbb, 0x7c, 0xdc, 0x0f, 0x99, 0xfe, - 0x08, 0x7e, 0x9f, 0x83, 0xc6, 0xdb, 0x3b, 0x9d, 0xd8, 0x22, 0x5f, 0xec, 0xf6, 0xe8, 0x9f, 0xe4, - 0x83, 0xab, 0xe8, 0x21, 0xe0, 0x9e, 0x14, 0xe7, 0x7c, 0x3a, 0x57, 0x0c, 0xb9, 0x14, 0x74, 0x37, - 0xa5, 0xd3, 0x24, 0xbd, 0x73, 0x7f, 0x8d, 0x8c, 0x22, 0x5f, 0xd0, 0x05, 0x79, 0x7f, 0x4f, 0x0a, - 0x64, 0x19, 0x3a, 0x85, 0x11, 0x9c, 0x83, 0x02, 0x91, 0x01, 0x1d, 0x34, 0xa5, 0x12, 0xa0, 0xf7, - 0xfe, 0xac, 0x7b, 0x82, 0xb1, 0xd6, 0xe4, 0xbd, 0x3a, 0xb0, 0xcf, 0x35, 0x1b, 0xe7, 0x40, 0x5b, - 0x74, 0x1c, 0xe6, 0x6d, 0x3f, 0xed, 0x8a, 0x1b, 0xd3, 0x82, 0xbc, 0x5b, 0x0f, 0x1f, 0x08, 0xeb, - 0xf9, 0x68, 0xb5, 0x48, 0x45, 0x79, 0xcb, 0x87, 0x1d, 0x69, 0xe3, 0xf8, 0x57, 0x8f, 0x7c, 0xd8, - 0x6c, 0x84, 0x86, 0xa5, 0x3e, 0x3f, 0x6d, 0x6b, 0xdb, 0x32, 0xed, 0x4b, 0x78, 0xb2, 0x66, 0x96, - 0x29, 0xe5, 0x37, 0x42, 0xeb, 0xd4, 0x19, 0x88, 0x09, 0x6d, 0x79, 0x18, 0xc3, 0xa4, 0x07, 0x3b, - 0xca, 0x46, 0x1b, 0x3d, 0xcc, 0x32, 0x28, 0xb0, 0xad, 0xd1, 0x15, 0xd5, 0xb5, 0xd1, 0x9e, 0x4e, - 0xcd, 0x53, 0xc6, 0xd4, 0xa4, 0xc3, 0x3c, 0x19, 0x6c, 0x8d, 0x79, 0x72, 0xb8, 0x31, 0xfd, 0x99, - 0x5c, 0x73, 0xe1, 0xe7, 0xb9, 0xcc, 0x2e, 0xe9, 0xfd, 0x44, 0xb2, 0x8d, 0x7a, 0x8b, 0x7b, 0x2d, - 0x94, 0x51, 0xfe, 0x95, 0xbc, 0xe3, 0x56, 0x7f, 0x12, 0x63, 0xab, 0xfd, 0x20, 0x91, 0xe5, 0xe2, - 0x5e, 0xfd, 0x7e, 0x2b, 0x67, 0xf4, 0x67, 0xe4, 0xa6, 0x5b, 0x1f, 0xe6, 0x9c, 0xe9, 0xef, 0x61, - 0x61, 0xa7, 0x21, 0xf5, 0xf4, 0xcb, 0x90, 0x77, 0xfa, 0xa4, 0x1b, 0x6c, 0xec, 0x4a, 0x72, 0xeb, - 0x64, 0x9e, 0x23, 0x3f, 0x81, 0xd9, 0x18, 0xd4, 0xa1, 0x92, 0xf3, 0x62, 0x4f, 0x01, 0x43, 0xa0, - 0xc1, 0x91, 0x15, 0xe7, 0xbc, 0xe9, 0xa3, 0xce, 0xbc, 0x9b, 0xc3, 0x66, 0xfc, 0x3b, 0xc9, 0x05, - 0x6d, 0x55, 0x31, 0x54, 0x7a, 0x0e, 0x13, 0xb4, 0x9b, 0xc3, 0x66, 0xf4, 0x18, 0x58, 0x19, 0x39, - 0xd7, 0xa2, 0x58, 0x7a, 0x0e, 0x53, 0xb8, 0x31, 0x7d, 0xd5, 0x23, 0x5b, 0xcd, 0xb8, 0xdd, 0x85, - 0x11, 0x68, 0x99, 0x97, 0xa0, 0xcc, 0xd8, 0xe6, 0x52, 0x03, 0xfd, 0xa6, 0x4d, 0x36, 0x9a, 0xe6, - 0xab, 0xfa, 0xfa, 0x4d, 0xd3, 0x4d, 0x95, 0x7f, 0xf7, 0xc8, 0x9d, 0x80, 0x9f, 0xcc, 0xb8, 0x18, - 0xc9, 0x1c, 0x0e, 0x15, 0x13, 0x48, 0x9f, 0xb5, 0xea, 0xd7, 0x78, 0x5f, 0xd7, 0xd3, 0xb5, 0xf3, - 0x4c, 0x41, 0xff, 0xf6, 0xc8, 0x66, 0x13, 0x3c, 0x12, 0x25, 0x47, 0xfb, 0x8e, 0x74, 0x03, 0xfa, - 0x55, 0x9b, 0x74, 0x33, 0xc3, 0x17, 0xf5, 0xec, 0x0d, 0x32, 0x4d, 0x59, 0x8c, 0x5c, 0x1f, 0x16, - 0xc5, 0x09, 0x20, 0x9b, 0x30, 0x64, 0xf6, 0xef, 0x72, 0xbb, 0x29, 0xd5, 0x00, 0xbc, 0xe7, 0x56, - 0x3b, 0xe8, 0x8e, 0x17, 0x1b, 0xd0, 0x9a, 0x4d, 0xc1, 0x3a, 0x3c, 0x88, 0x26, 0xfa, 0x78, 0xfa, - 0x78, 0x09, 0x38, 0xa3, 0x3f, 0x21, 0x1b, 0xf6, 0x09, 0xaf, 0xac, 0x8f, 0xb9, 0x46, 0x1a, 0x9c, - 0x17, 0x01, 0x92, 0x3e, 0x22, 0x6b, 0xe8, 0x41, 0x09, 0x02, 0x77, 0x7b, 0x94, 0x91, 0x1b, 0x6e, - 0xdd, 0xfa, 0x5b, 0x93, 0x9d, 0x44, 0xa6, 0x27, 0xbc, 0xc7, 0x47, 0xab, 0xc8, 0x2b, 0x8b, 0x1f, - 0xc8, 0x5b, 0x6e, 0xab, 0xce, 0x25, 0x8d, 0x67, 0x98, 0x90, 0x17, 0xbd, 0xbb, 0x0a, 0x31, 0x9d, - 0xf9, 0x85, 0xbc, 0x3d, 0xcc, 0x90, 0x97, 0x0c, 0xc1, 0x86, 0x68, 0xb8, 0x63, 0xcb, 0x61, 0x2f, - 0xfc, 0x71, 0x1b, 0xe6, 0x26, 0x67, 0x1f, 0x58, 0x4d, 0x3e, 0x98, 0x9c, 0x06, 0x90, 0x9e, 0x9c, - 0x10, 0x34, 0x16, 0x2f, 0xc8, 0xb5, 0x13, 0x29, 0x38, 0xca, 0x6a, 0x84, 0xc3, 0x57, 0xde, 0x72, - 0x34, 0xbd, 0x9f, 0x0d, 0xaa, 0xfa, 0x18, 0xce, 0x4c, 0xf9, 0xe3, 0xf9, 0xd4, 0x6c, 0x93, 0x8d, - 0xe8, 0x58, 0xf9, 0x35, 0x60, 0x55, 0xf9, 0x4d, 0xb0, 0x32, 0x79, 0x49, 0x6e, 0xd9, 0xd0, 0x91, - 0xd0, 0x05, 0x64, 0x55, 0xf4, 0x0c, 0xa5, 0x8a, 0xbc, 0x8a, 0xe2, 0x5c, 0xfa, 0x55, 0x94, 0xe4, - 0x2b, 0xe7, 0x11, 0x21, 0x96, 0xa8, 0x1a, 0x77, 0x2f, 0x9a, 0x5d, 0x6f, 0xdb, 0xe6, 0x4a, 0xc6, - 0x6c, 0xc7, 0x88, 0x90, 0xb3, 0x85, 0x46, 0x98, 0xd9, 0x01, 0x0d, 0x34, 0x5f, 0xc7, 0xd2, 0x9a, - 0x35, 0xc6, 0x7d, 0x1b, 0x0c, 0xe7, 0x78, 0xe1, 0x2e, 0x44, 0x47, 0x82, 0xe3, 0xb7, 0xb9, 0xfc, - 0x23, 0xfc, 0x36, 0x88, 0x40, 0xe9, 0x6f, 0x83, 0x38, 0xec, 0x2e, 0x21, 0x4b, 0xc1, 0x3d, 0x39, - 0x2b, 0x72, 0x40, 0xb0, 0x96, 0x83, 0x15, 0x2a, 0xcb, 0x60, 0xfa, 0x12, 0x92, 0x4e, 0x30, 0xd6, - 0x9c, 0x6c, 0xb8, 0xa0, 0xfe, 0x51, 0x5e, 0x82, 0x88, 0x1f, 0x53, 0x01, 0xe2, 0xed, 0xb6, 0xbb, - 0xa0, 0xd5, 0xe6, 0xff, 0xd3, 0x23, 0x77, 0xcd, 0x6f, 0x9e, 0xd9, 0x03, 0xdf, 0x81, 0x23, 0x98, - 0x72, 0x8d, 0xee, 0x75, 0x40, 0xbf, 0x6c, 0xca, 0xb5, 0x24, 0xf8, 0x3a, 0xbe, 0x58, 0x3f, 0xd1, - 0x3c, 0xfe, 0x31, 0xf9, 0xff, 0x29, 0x80, 0xb2, 0x4f, 0x1d, 0x8c, 0xc5, 0x55, 0xc4, 0x9b, 0xdc, - 0x59, 0x41, 0xb8, 0x66, 0x0e, 0x11, 0x59, 0x76, 0x31, 0x03, 0x81, 0xa7, 0x0a, 0x0a, 0xa6, 0x20, - 0x6c, 0x66, 0x80, 0xa4, 0x9b, 0x19, 0x43, 0x8b, 0x7c, 0xb1, 0xd3, 0x33, 0x77, 0xf4, 0xd7, 0xc1, - 0x11, 0xa0, 0xe2, 0x50, 0x42, 0x78, 0x95, 0x09, 0x99, 0xf4, 0x55, 0x26, 0xca, 0xda, 0xad, 0x7b, - 0xbe, 0xfd, 0x62, 0xcb, 0xc1, 0x90, 0x5d, 0x0c, 0xec, 0xcf, 0xc1, 0x54, 0x0e, 0x8a, 0xcb, 0xe9, - 0xa0, 0xf6, 0x9f, 0x87, 0xf1, 0xff, 0xec, 0xaf, 0xcf, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xf9, - 0x34, 0x07, 0x6e, 0x91, 0x10, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ context.Context - _ grpc.ClientConn -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ProtocolServiceClient is the client API for ProtocolService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ProtocolServiceClient interface { - // InstanceExportData exports instance data - InstanceExportData(ctx context.Context, in *bertytypes.InstanceExportData_Request, opts ...grpc.CallOption) (ProtocolService_InstanceExportDataClient, error) - // InstanceGetConfiguration gets current configuration of this protocol instance - InstanceGetConfiguration(ctx context.Context, in *bertytypes.InstanceGetConfiguration_Request, opts ...grpc.CallOption) (*bertytypes.InstanceGetConfiguration_Reply, error) - // ContactRequestReference retrieves the information required to create a reference (types.v1.ie. included in a shareable link) to the current account - ContactRequestReference(ctx context.Context, in *bertytypes.ContactRequestReference_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestReference_Reply, error) - // ContactRequestDisable disables incoming contact requests - ContactRequestDisable(ctx context.Context, in *bertytypes.ContactRequestDisable_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestDisable_Reply, error) - // ContactRequestEnable enables incoming contact requests - ContactRequestEnable(ctx context.Context, in *bertytypes.ContactRequestEnable_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestEnable_Reply, error) - // ContactRequestResetReference changes the contact request reference - ContactRequestResetReference(ctx context.Context, in *bertytypes.ContactRequestResetReference_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestResetReference_Reply, error) - // ContactRequestSend attempt to send a contact request - ContactRequestSend(ctx context.Context, in *bertytypes.ContactRequestSend_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestSend_Reply, error) - // ContactRequestAccept accepts a contact request - ContactRequestAccept(ctx context.Context, in *bertytypes.ContactRequestAccept_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestAccept_Reply, error) - // ContactRequestDiscard ignores a contact request, without informing the other user - ContactRequestDiscard(ctx context.Context, in *bertytypes.ContactRequestDiscard_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestDiscard_Reply, error) - // ContactBlock blocks a contact from sending requests - ContactBlock(ctx context.Context, in *bertytypes.ContactBlock_Request, opts ...grpc.CallOption) (*bertytypes.ContactBlock_Reply, error) - // ContactUnblock unblocks a contact from sending requests - ContactUnblock(ctx context.Context, in *bertytypes.ContactUnblock_Request, opts ...grpc.CallOption) (*bertytypes.ContactUnblock_Reply, error) - // ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group - ContactAliasKeySend(ctx context.Context, in *bertytypes.ContactAliasKeySend_Request, opts ...grpc.CallOption) (*bertytypes.ContactAliasKeySend_Reply, error) - // MultiMemberGroupCreate creates a new multi-member group - MultiMemberGroupCreate(ctx context.Context, in *bertytypes.MultiMemberGroupCreate_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupCreate_Reply, error) - // MultiMemberGroupJoin joins a multi-member group - MultiMemberGroupJoin(ctx context.Context, in *bertytypes.MultiMemberGroupJoin_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupJoin_Reply, error) - // MultiMemberGroupLeave leaves a multi-member group - MultiMemberGroupLeave(ctx context.Context, in *bertytypes.MultiMemberGroupLeave_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupLeave_Reply, error) - // MultiMemberGroupAliasResolverDisclose discloses your alias resolver key - MultiMemberGroupAliasResolverDisclose(ctx context.Context, in *bertytypes.MultiMemberGroupAliasResolverDisclose_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupAliasResolverDisclose_Reply, error) - // MultiMemberGroupAdminRoleGrant grants an admin role to a group member - MultiMemberGroupAdminRoleGrant(ctx context.Context, in *bertytypes.MultiMemberGroupAdminRoleGrant_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupAdminRoleGrant_Reply, error) - // MultiMemberGroupInvitationCreate creates an invitation to a multi-member group - MultiMemberGroupInvitationCreate(ctx context.Context, in *bertytypes.MultiMemberGroupInvitationCreate_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupInvitationCreate_Reply, error) - // AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members - AppMetadataSend(ctx context.Context, in *bertytypes.AppMetadataSend_Request, opts ...grpc.CallOption) (*bertytypes.AppMetadataSend_Reply, error) - // AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members - AppMessageSend(ctx context.Context, in *bertytypes.AppMessageSend_Request, opts ...grpc.CallOption) (*bertytypes.AppMessageSend_Reply, error) - // GroupMetadataList replays previous and subscribes to new metadata events from the group - GroupMetadataList(ctx context.Context, in *bertytypes.GroupMetadataList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMetadataListClient, error) - // GroupMessageList replays previous and subscribes to new message events from the group - GroupMessageList(ctx context.Context, in *bertytypes.GroupMessageList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMessageListClient, error) - // GroupInfo retrieves information about a group - GroupInfo(ctx context.Context, in *bertytypes.GroupInfo_Request, opts ...grpc.CallOption) (*bertytypes.GroupInfo_Reply, error) - // ActivateGroup explicitly opens a group - ActivateGroup(ctx context.Context, in *bertytypes.ActivateGroup_Request, opts ...grpc.CallOption) (*bertytypes.ActivateGroup_Reply, error) - // DeactivateGroup closes a group - DeactivateGroup(ctx context.Context, in *bertytypes.DeactivateGroup_Request, opts ...grpc.CallOption) (*bertytypes.DeactivateGroup_Reply, error) - // Monitor Group events - MonitorGroup(ctx context.Context, in *bertytypes.MonitorGroup_Request, opts ...grpc.CallOption) (ProtocolService_MonitorGroupClient, error) - DebugListGroups(ctx context.Context, in *bertytypes.DebugListGroups_Request, opts ...grpc.CallOption) (ProtocolService_DebugListGroupsClient, error) - DebugInspectGroupStore(ctx context.Context, in *bertytypes.DebugInspectGroupStore_Request, opts ...grpc.CallOption) (ProtocolService_DebugInspectGroupStoreClient, error) - DebugGroup(ctx context.Context, in *bertytypes.DebugGroup_Request, opts ...grpc.CallOption) (*bertytypes.DebugGroup_Reply, error) - SystemInfo(ctx context.Context, in *bertytypes.SystemInfo_Request, opts ...grpc.CallOption) (*bertytypes.SystemInfo_Reply, error) - // AuthServiceInitFlow Initialize an authentication flow - AuthServiceInitFlow(ctx context.Context, in *bertytypes.AuthServiceInitFlow_Request, opts ...grpc.CallOption) (*bertytypes.AuthServiceInitFlow_Reply, error) - // AuthServiceCompleteFlow Completes an authentication flow - AuthServiceCompleteFlow(ctx context.Context, in *bertytypes.AuthServiceCompleteFlow_Request, opts ...grpc.CallOption) (*bertytypes.AuthServiceCompleteFlow_Reply, error) - // ServicesTokenList Retrieves the list of services tokens - ServicesTokenList(ctx context.Context, in *bertytypes.ServicesTokenList_Request, opts ...grpc.CallOption) (ProtocolService_ServicesTokenListClient, error) - // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents - ReplicationServiceRegisterGroup(ctx context.Context, in *bertytypes.ReplicationServiceRegisterGroup_Request, opts ...grpc.CallOption) (*bertytypes.ReplicationServiceRegisterGroup_Reply, error) - // PeerList returns a list of P2P peers - PeerList(ctx context.Context, in *bertytypes.PeerList_Request, opts ...grpc.CallOption) (*bertytypes.PeerList_Reply, error) - // AttachmentPrepare ... - AttachmentPrepare(ctx context.Context, opts ...grpc.CallOption) (ProtocolService_AttachmentPrepareClient, error) - // AttachmentRetrieve returns an attachment data - AttachmentRetrieve(ctx context.Context, in *bertytypes.AttachmentRetrieve_Request, opts ...grpc.CallOption) (ProtocolService_AttachmentRetrieveClient, error) -} - -type protocolServiceClient struct { - cc *grpc.ClientConn -} - -func NewProtocolServiceClient(cc *grpc.ClientConn) ProtocolServiceClient { - return &protocolServiceClient{cc} -} - -func (c *protocolServiceClient) InstanceExportData(ctx context.Context, in *bertytypes.InstanceExportData_Request, opts ...grpc.CallOption) (ProtocolService_InstanceExportDataClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[0], "/berty.protocol.v1.ProtocolService/InstanceExportData", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceInstanceExportDataClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_InstanceExportDataClient interface { - Recv() (*bertytypes.InstanceExportData_Reply, error) - grpc.ClientStream -} - -type protocolServiceInstanceExportDataClient struct { - grpc.ClientStream -} - -func (x *protocolServiceInstanceExportDataClient) Recv() (*bertytypes.InstanceExportData_Reply, error) { - m := new(bertytypes.InstanceExportData_Reply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) InstanceGetConfiguration(ctx context.Context, in *bertytypes.InstanceGetConfiguration_Request, opts ...grpc.CallOption) (*bertytypes.InstanceGetConfiguration_Reply, error) { - out := new(bertytypes.InstanceGetConfiguration_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/InstanceGetConfiguration", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactRequestReference(ctx context.Context, in *bertytypes.ContactRequestReference_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestReference_Reply, error) { - out := new(bertytypes.ContactRequestReference_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestReference", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactRequestDisable(ctx context.Context, in *bertytypes.ContactRequestDisable_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestDisable_Reply, error) { - out := new(bertytypes.ContactRequestDisable_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestDisable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactRequestEnable(ctx context.Context, in *bertytypes.ContactRequestEnable_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestEnable_Reply, error) { - out := new(bertytypes.ContactRequestEnable_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestEnable", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactRequestResetReference(ctx context.Context, in *bertytypes.ContactRequestResetReference_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestResetReference_Reply, error) { - out := new(bertytypes.ContactRequestResetReference_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestResetReference", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactRequestSend(ctx context.Context, in *bertytypes.ContactRequestSend_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestSend_Reply, error) { - out := new(bertytypes.ContactRequestSend_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestSend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactRequestAccept(ctx context.Context, in *bertytypes.ContactRequestAccept_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestAccept_Reply, error) { - out := new(bertytypes.ContactRequestAccept_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestAccept", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactRequestDiscard(ctx context.Context, in *bertytypes.ContactRequestDiscard_Request, opts ...grpc.CallOption) (*bertytypes.ContactRequestDiscard_Reply, error) { - out := new(bertytypes.ContactRequestDiscard_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestDiscard", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactBlock(ctx context.Context, in *bertytypes.ContactBlock_Request, opts ...grpc.CallOption) (*bertytypes.ContactBlock_Reply, error) { - out := new(bertytypes.ContactBlock_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactUnblock(ctx context.Context, in *bertytypes.ContactUnblock_Request, opts ...grpc.CallOption) (*bertytypes.ContactUnblock_Reply, error) { - out := new(bertytypes.ContactUnblock_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactUnblock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ContactAliasKeySend(ctx context.Context, in *bertytypes.ContactAliasKeySend_Request, opts ...grpc.CallOption) (*bertytypes.ContactAliasKeySend_Reply, error) { - out := new(bertytypes.ContactAliasKeySend_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactAliasKeySend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) MultiMemberGroupCreate(ctx context.Context, in *bertytypes.MultiMemberGroupCreate_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupCreate_Reply, error) { - out := new(bertytypes.MultiMemberGroupCreate_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupCreate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) MultiMemberGroupJoin(ctx context.Context, in *bertytypes.MultiMemberGroupJoin_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupJoin_Reply, error) { - out := new(bertytypes.MultiMemberGroupJoin_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupJoin", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) MultiMemberGroupLeave(ctx context.Context, in *bertytypes.MultiMemberGroupLeave_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupLeave_Reply, error) { - out := new(bertytypes.MultiMemberGroupLeave_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupLeave", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) MultiMemberGroupAliasResolverDisclose(ctx context.Context, in *bertytypes.MultiMemberGroupAliasResolverDisclose_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupAliasResolverDisclose_Reply, error) { - out := new(bertytypes.MultiMemberGroupAliasResolverDisclose_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupAliasResolverDisclose", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) MultiMemberGroupAdminRoleGrant(ctx context.Context, in *bertytypes.MultiMemberGroupAdminRoleGrant_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupAdminRoleGrant_Reply, error) { - out := new(bertytypes.MultiMemberGroupAdminRoleGrant_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupAdminRoleGrant", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) MultiMemberGroupInvitationCreate(ctx context.Context, in *bertytypes.MultiMemberGroupInvitationCreate_Request, opts ...grpc.CallOption) (*bertytypes.MultiMemberGroupInvitationCreate_Reply, error) { - out := new(bertytypes.MultiMemberGroupInvitationCreate_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupInvitationCreate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) AppMetadataSend(ctx context.Context, in *bertytypes.AppMetadataSend_Request, opts ...grpc.CallOption) (*bertytypes.AppMetadataSend_Reply, error) { - out := new(bertytypes.AppMetadataSend_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AppMetadataSend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) AppMessageSend(ctx context.Context, in *bertytypes.AppMessageSend_Request, opts ...grpc.CallOption) (*bertytypes.AppMessageSend_Reply, error) { - out := new(bertytypes.AppMessageSend_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AppMessageSend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) GroupMetadataList(ctx context.Context, in *bertytypes.GroupMetadataList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMetadataListClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[1], "/berty.protocol.v1.ProtocolService/GroupMetadataList", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceGroupMetadataListClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_GroupMetadataListClient interface { - Recv() (*bertytypes.GroupMetadataEvent, error) - grpc.ClientStream -} - -type protocolServiceGroupMetadataListClient struct { - grpc.ClientStream -} - -func (x *protocolServiceGroupMetadataListClient) Recv() (*bertytypes.GroupMetadataEvent, error) { - m := new(bertytypes.GroupMetadataEvent) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) GroupMessageList(ctx context.Context, in *bertytypes.GroupMessageList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMessageListClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[2], "/berty.protocol.v1.ProtocolService/GroupMessageList", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceGroupMessageListClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_GroupMessageListClient interface { - Recv() (*bertytypes.GroupMessageEvent, error) - grpc.ClientStream -} - -type protocolServiceGroupMessageListClient struct { - grpc.ClientStream -} - -func (x *protocolServiceGroupMessageListClient) Recv() (*bertytypes.GroupMessageEvent, error) { - m := new(bertytypes.GroupMessageEvent) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) GroupInfo(ctx context.Context, in *bertytypes.GroupInfo_Request, opts ...grpc.CallOption) (*bertytypes.GroupInfo_Reply, error) { - out := new(bertytypes.GroupInfo_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/GroupInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ActivateGroup(ctx context.Context, in *bertytypes.ActivateGroup_Request, opts ...grpc.CallOption) (*bertytypes.ActivateGroup_Reply, error) { - out := new(bertytypes.ActivateGroup_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ActivateGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) DeactivateGroup(ctx context.Context, in *bertytypes.DeactivateGroup_Request, opts ...grpc.CallOption) (*bertytypes.DeactivateGroup_Reply, error) { - out := new(bertytypes.DeactivateGroup_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/DeactivateGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) MonitorGroup(ctx context.Context, in *bertytypes.MonitorGroup_Request, opts ...grpc.CallOption) (ProtocolService_MonitorGroupClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[3], "/berty.protocol.v1.ProtocolService/MonitorGroup", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceMonitorGroupClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_MonitorGroupClient interface { - Recv() (*bertytypes.MonitorGroup_Reply, error) - grpc.ClientStream -} - -type protocolServiceMonitorGroupClient struct { - grpc.ClientStream -} - -func (x *protocolServiceMonitorGroupClient) Recv() (*bertytypes.MonitorGroup_Reply, error) { - m := new(bertytypes.MonitorGroup_Reply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) DebugListGroups(ctx context.Context, in *bertytypes.DebugListGroups_Request, opts ...grpc.CallOption) (ProtocolService_DebugListGroupsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[4], "/berty.protocol.v1.ProtocolService/DebugListGroups", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceDebugListGroupsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_DebugListGroupsClient interface { - Recv() (*bertytypes.DebugListGroups_Reply, error) - grpc.ClientStream -} - -type protocolServiceDebugListGroupsClient struct { - grpc.ClientStream -} - -func (x *protocolServiceDebugListGroupsClient) Recv() (*bertytypes.DebugListGroups_Reply, error) { - m := new(bertytypes.DebugListGroups_Reply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) DebugInspectGroupStore(ctx context.Context, in *bertytypes.DebugInspectGroupStore_Request, opts ...grpc.CallOption) (ProtocolService_DebugInspectGroupStoreClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[5], "/berty.protocol.v1.ProtocolService/DebugInspectGroupStore", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceDebugInspectGroupStoreClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_DebugInspectGroupStoreClient interface { - Recv() (*bertytypes.DebugInspectGroupStore_Reply, error) - grpc.ClientStream -} - -type protocolServiceDebugInspectGroupStoreClient struct { - grpc.ClientStream -} - -func (x *protocolServiceDebugInspectGroupStoreClient) Recv() (*bertytypes.DebugInspectGroupStore_Reply, error) { - m := new(bertytypes.DebugInspectGroupStore_Reply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) DebugGroup(ctx context.Context, in *bertytypes.DebugGroup_Request, opts ...grpc.CallOption) (*bertytypes.DebugGroup_Reply, error) { - out := new(bertytypes.DebugGroup_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/DebugGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) SystemInfo(ctx context.Context, in *bertytypes.SystemInfo_Request, opts ...grpc.CallOption) (*bertytypes.SystemInfo_Reply, error) { - out := new(bertytypes.SystemInfo_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/SystemInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) AuthServiceInitFlow(ctx context.Context, in *bertytypes.AuthServiceInitFlow_Request, opts ...grpc.CallOption) (*bertytypes.AuthServiceInitFlow_Reply, error) { - out := new(bertytypes.AuthServiceInitFlow_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AuthServiceInitFlow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) AuthServiceCompleteFlow(ctx context.Context, in *bertytypes.AuthServiceCompleteFlow_Request, opts ...grpc.CallOption) (*bertytypes.AuthServiceCompleteFlow_Reply, error) { - out := new(bertytypes.AuthServiceCompleteFlow_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AuthServiceCompleteFlow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) ServicesTokenList(ctx context.Context, in *bertytypes.ServicesTokenList_Request, opts ...grpc.CallOption) (ProtocolService_ServicesTokenListClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[6], "/berty.protocol.v1.ProtocolService/ServicesTokenList", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceServicesTokenListClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_ServicesTokenListClient interface { - Recv() (*bertytypes.ServicesTokenList_Reply, error) - grpc.ClientStream -} - -type protocolServiceServicesTokenListClient struct { - grpc.ClientStream -} - -func (x *protocolServiceServicesTokenListClient) Recv() (*bertytypes.ServicesTokenList_Reply, error) { - m := new(bertytypes.ServicesTokenList_Reply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) ReplicationServiceRegisterGroup(ctx context.Context, in *bertytypes.ReplicationServiceRegisterGroup_Request, opts ...grpc.CallOption) (*bertytypes.ReplicationServiceRegisterGroup_Reply, error) { - out := new(bertytypes.ReplicationServiceRegisterGroup_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ReplicationServiceRegisterGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) PeerList(ctx context.Context, in *bertytypes.PeerList_Request, opts ...grpc.CallOption) (*bertytypes.PeerList_Reply, error) { - out := new(bertytypes.PeerList_Reply) - err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/PeerList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *protocolServiceClient) AttachmentPrepare(ctx context.Context, opts ...grpc.CallOption) (ProtocolService_AttachmentPrepareClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[7], "/berty.protocol.v1.ProtocolService/AttachmentPrepare", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceAttachmentPrepareClient{stream} - return x, nil -} - -type ProtocolService_AttachmentPrepareClient interface { - Send(*bertytypes.AttachmentPrepare_Request) error - CloseAndRecv() (*bertytypes.AttachmentPrepare_Reply, error) - grpc.ClientStream -} - -type protocolServiceAttachmentPrepareClient struct { - grpc.ClientStream -} - -func (x *protocolServiceAttachmentPrepareClient) Send(m *bertytypes.AttachmentPrepare_Request) error { - return x.ClientStream.SendMsg(m) -} - -func (x *protocolServiceAttachmentPrepareClient) CloseAndRecv() (*bertytypes.AttachmentPrepare_Reply, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(bertytypes.AttachmentPrepare_Reply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *protocolServiceClient) AttachmentRetrieve(ctx context.Context, in *bertytypes.AttachmentRetrieve_Request, opts ...grpc.CallOption) (ProtocolService_AttachmentRetrieveClient, error) { - stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[8], "/berty.protocol.v1.ProtocolService/AttachmentRetrieve", opts...) - if err != nil { - return nil, err - } - x := &protocolServiceAttachmentRetrieveClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ProtocolService_AttachmentRetrieveClient interface { - Recv() (*bertytypes.AttachmentRetrieve_Reply, error) - grpc.ClientStream -} - -type protocolServiceAttachmentRetrieveClient struct { - grpc.ClientStream -} - -func (x *protocolServiceAttachmentRetrieveClient) Recv() (*bertytypes.AttachmentRetrieve_Reply, error) { - m := new(bertytypes.AttachmentRetrieve_Reply) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ProtocolServiceServer is the server API for ProtocolService service. -type ProtocolServiceServer interface { - // InstanceExportData exports instance data - InstanceExportData(*bertytypes.InstanceExportData_Request, ProtocolService_InstanceExportDataServer) error - // InstanceGetConfiguration gets current configuration of this protocol instance - InstanceGetConfiguration(context.Context, *bertytypes.InstanceGetConfiguration_Request) (*bertytypes.InstanceGetConfiguration_Reply, error) - // ContactRequestReference retrieves the information required to create a reference (types.v1.ie. included in a shareable link) to the current account - ContactRequestReference(context.Context, *bertytypes.ContactRequestReference_Request) (*bertytypes.ContactRequestReference_Reply, error) - // ContactRequestDisable disables incoming contact requests - ContactRequestDisable(context.Context, *bertytypes.ContactRequestDisable_Request) (*bertytypes.ContactRequestDisable_Reply, error) - // ContactRequestEnable enables incoming contact requests - ContactRequestEnable(context.Context, *bertytypes.ContactRequestEnable_Request) (*bertytypes.ContactRequestEnable_Reply, error) - // ContactRequestResetReference changes the contact request reference - ContactRequestResetReference(context.Context, *bertytypes.ContactRequestResetReference_Request) (*bertytypes.ContactRequestResetReference_Reply, error) - // ContactRequestSend attempt to send a contact request - ContactRequestSend(context.Context, *bertytypes.ContactRequestSend_Request) (*bertytypes.ContactRequestSend_Reply, error) - // ContactRequestAccept accepts a contact request - ContactRequestAccept(context.Context, *bertytypes.ContactRequestAccept_Request) (*bertytypes.ContactRequestAccept_Reply, error) - // ContactRequestDiscard ignores a contact request, without informing the other user - ContactRequestDiscard(context.Context, *bertytypes.ContactRequestDiscard_Request) (*bertytypes.ContactRequestDiscard_Reply, error) - // ContactBlock blocks a contact from sending requests - ContactBlock(context.Context, *bertytypes.ContactBlock_Request) (*bertytypes.ContactBlock_Reply, error) - // ContactUnblock unblocks a contact from sending requests - ContactUnblock(context.Context, *bertytypes.ContactUnblock_Request) (*bertytypes.ContactUnblock_Reply, error) - // ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group - ContactAliasKeySend(context.Context, *bertytypes.ContactAliasKeySend_Request) (*bertytypes.ContactAliasKeySend_Reply, error) - // MultiMemberGroupCreate creates a new multi-member group - MultiMemberGroupCreate(context.Context, *bertytypes.MultiMemberGroupCreate_Request) (*bertytypes.MultiMemberGroupCreate_Reply, error) - // MultiMemberGroupJoin joins a multi-member group - MultiMemberGroupJoin(context.Context, *bertytypes.MultiMemberGroupJoin_Request) (*bertytypes.MultiMemberGroupJoin_Reply, error) - // MultiMemberGroupLeave leaves a multi-member group - MultiMemberGroupLeave(context.Context, *bertytypes.MultiMemberGroupLeave_Request) (*bertytypes.MultiMemberGroupLeave_Reply, error) - // MultiMemberGroupAliasResolverDisclose discloses your alias resolver key - MultiMemberGroupAliasResolverDisclose(context.Context, *bertytypes.MultiMemberGroupAliasResolverDisclose_Request) (*bertytypes.MultiMemberGroupAliasResolverDisclose_Reply, error) - // MultiMemberGroupAdminRoleGrant grants an admin role to a group member - MultiMemberGroupAdminRoleGrant(context.Context, *bertytypes.MultiMemberGroupAdminRoleGrant_Request) (*bertytypes.MultiMemberGroupAdminRoleGrant_Reply, error) - // MultiMemberGroupInvitationCreate creates an invitation to a multi-member group - MultiMemberGroupInvitationCreate(context.Context, *bertytypes.MultiMemberGroupInvitationCreate_Request) (*bertytypes.MultiMemberGroupInvitationCreate_Reply, error) - // AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members - AppMetadataSend(context.Context, *bertytypes.AppMetadataSend_Request) (*bertytypes.AppMetadataSend_Reply, error) - // AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members - AppMessageSend(context.Context, *bertytypes.AppMessageSend_Request) (*bertytypes.AppMessageSend_Reply, error) - // GroupMetadataList replays previous and subscribes to new metadata events from the group - GroupMetadataList(*bertytypes.GroupMetadataList_Request, ProtocolService_GroupMetadataListServer) error - // GroupMessageList replays previous and subscribes to new message events from the group - GroupMessageList(*bertytypes.GroupMessageList_Request, ProtocolService_GroupMessageListServer) error - // GroupInfo retrieves information about a group - GroupInfo(context.Context, *bertytypes.GroupInfo_Request) (*bertytypes.GroupInfo_Reply, error) - // ActivateGroup explicitly opens a group - ActivateGroup(context.Context, *bertytypes.ActivateGroup_Request) (*bertytypes.ActivateGroup_Reply, error) - // DeactivateGroup closes a group - DeactivateGroup(context.Context, *bertytypes.DeactivateGroup_Request) (*bertytypes.DeactivateGroup_Reply, error) - // Monitor Group events - MonitorGroup(*bertytypes.MonitorGroup_Request, ProtocolService_MonitorGroupServer) error - DebugListGroups(*bertytypes.DebugListGroups_Request, ProtocolService_DebugListGroupsServer) error - DebugInspectGroupStore(*bertytypes.DebugInspectGroupStore_Request, ProtocolService_DebugInspectGroupStoreServer) error - DebugGroup(context.Context, *bertytypes.DebugGroup_Request) (*bertytypes.DebugGroup_Reply, error) - SystemInfo(context.Context, *bertytypes.SystemInfo_Request) (*bertytypes.SystemInfo_Reply, error) - // AuthServiceInitFlow Initialize an authentication flow - AuthServiceInitFlow(context.Context, *bertytypes.AuthServiceInitFlow_Request) (*bertytypes.AuthServiceInitFlow_Reply, error) - // AuthServiceCompleteFlow Completes an authentication flow - AuthServiceCompleteFlow(context.Context, *bertytypes.AuthServiceCompleteFlow_Request) (*bertytypes.AuthServiceCompleteFlow_Reply, error) - // ServicesTokenList Retrieves the list of services tokens - ServicesTokenList(*bertytypes.ServicesTokenList_Request, ProtocolService_ServicesTokenListServer) error - // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents - ReplicationServiceRegisterGroup(context.Context, *bertytypes.ReplicationServiceRegisterGroup_Request) (*bertytypes.ReplicationServiceRegisterGroup_Reply, error) - // PeerList returns a list of P2P peers - PeerList(context.Context, *bertytypes.PeerList_Request) (*bertytypes.PeerList_Reply, error) - // AttachmentPrepare ... - AttachmentPrepare(ProtocolService_AttachmentPrepareServer) error - // AttachmentRetrieve returns an attachment data - AttachmentRetrieve(*bertytypes.AttachmentRetrieve_Request, ProtocolService_AttachmentRetrieveServer) error -} - -// UnimplementedProtocolServiceServer can be embedded to have forward compatible implementations. -type UnimplementedProtocolServiceServer struct { -} - -func (*UnimplementedProtocolServiceServer) InstanceExportData(req *bertytypes.InstanceExportData_Request, srv ProtocolService_InstanceExportDataServer) error { - return status.Errorf(codes.Unimplemented, "method InstanceExportData not implemented") -} - -func (*UnimplementedProtocolServiceServer) InstanceGetConfiguration(ctx context.Context, req *bertytypes.InstanceGetConfiguration_Request) (*bertytypes.InstanceGetConfiguration_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method InstanceGetConfiguration not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactRequestReference(ctx context.Context, req *bertytypes.ContactRequestReference_Request) (*bertytypes.ContactRequestReference_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactRequestReference not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactRequestDisable(ctx context.Context, req *bertytypes.ContactRequestDisable_Request) (*bertytypes.ContactRequestDisable_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactRequestDisable not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactRequestEnable(ctx context.Context, req *bertytypes.ContactRequestEnable_Request) (*bertytypes.ContactRequestEnable_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactRequestEnable not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactRequestResetReference(ctx context.Context, req *bertytypes.ContactRequestResetReference_Request) (*bertytypes.ContactRequestResetReference_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactRequestResetReference not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactRequestSend(ctx context.Context, req *bertytypes.ContactRequestSend_Request) (*bertytypes.ContactRequestSend_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactRequestSend not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactRequestAccept(ctx context.Context, req *bertytypes.ContactRequestAccept_Request) (*bertytypes.ContactRequestAccept_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactRequestAccept not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactRequestDiscard(ctx context.Context, req *bertytypes.ContactRequestDiscard_Request) (*bertytypes.ContactRequestDiscard_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactRequestDiscard not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactBlock(ctx context.Context, req *bertytypes.ContactBlock_Request) (*bertytypes.ContactBlock_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactBlock not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactUnblock(ctx context.Context, req *bertytypes.ContactUnblock_Request) (*bertytypes.ContactUnblock_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactUnblock not implemented") -} - -func (*UnimplementedProtocolServiceServer) ContactAliasKeySend(ctx context.Context, req *bertytypes.ContactAliasKeySend_Request) (*bertytypes.ContactAliasKeySend_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ContactAliasKeySend not implemented") -} - -func (*UnimplementedProtocolServiceServer) MultiMemberGroupCreate(ctx context.Context, req *bertytypes.MultiMemberGroupCreate_Request) (*bertytypes.MultiMemberGroupCreate_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupCreate not implemented") -} - -func (*UnimplementedProtocolServiceServer) MultiMemberGroupJoin(ctx context.Context, req *bertytypes.MultiMemberGroupJoin_Request) (*bertytypes.MultiMemberGroupJoin_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupJoin not implemented") -} - -func (*UnimplementedProtocolServiceServer) MultiMemberGroupLeave(ctx context.Context, req *bertytypes.MultiMemberGroupLeave_Request) (*bertytypes.MultiMemberGroupLeave_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupLeave not implemented") -} - -func (*UnimplementedProtocolServiceServer) MultiMemberGroupAliasResolverDisclose(ctx context.Context, req *bertytypes.MultiMemberGroupAliasResolverDisclose_Request) (*bertytypes.MultiMemberGroupAliasResolverDisclose_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupAliasResolverDisclose not implemented") -} - -func (*UnimplementedProtocolServiceServer) MultiMemberGroupAdminRoleGrant(ctx context.Context, req *bertytypes.MultiMemberGroupAdminRoleGrant_Request) (*bertytypes.MultiMemberGroupAdminRoleGrant_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupAdminRoleGrant not implemented") -} - -func (*UnimplementedProtocolServiceServer) MultiMemberGroupInvitationCreate(ctx context.Context, req *bertytypes.MultiMemberGroupInvitationCreate_Request) (*bertytypes.MultiMemberGroupInvitationCreate_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupInvitationCreate not implemented") -} - -func (*UnimplementedProtocolServiceServer) AppMetadataSend(ctx context.Context, req *bertytypes.AppMetadataSend_Request) (*bertytypes.AppMetadataSend_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppMetadataSend not implemented") -} - -func (*UnimplementedProtocolServiceServer) AppMessageSend(ctx context.Context, req *bertytypes.AppMessageSend_Request) (*bertytypes.AppMessageSend_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppMessageSend not implemented") -} - -func (*UnimplementedProtocolServiceServer) GroupMetadataList(req *bertytypes.GroupMetadataList_Request, srv ProtocolService_GroupMetadataListServer) error { - return status.Errorf(codes.Unimplemented, "method GroupMetadataList not implemented") -} - -func (*UnimplementedProtocolServiceServer) GroupMessageList(req *bertytypes.GroupMessageList_Request, srv ProtocolService_GroupMessageListServer) error { - return status.Errorf(codes.Unimplemented, "method GroupMessageList not implemented") -} - -func (*UnimplementedProtocolServiceServer) GroupInfo(ctx context.Context, req *bertytypes.GroupInfo_Request) (*bertytypes.GroupInfo_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupInfo not implemented") -} - -func (*UnimplementedProtocolServiceServer) ActivateGroup(ctx context.Context, req *bertytypes.ActivateGroup_Request) (*bertytypes.ActivateGroup_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActivateGroup not implemented") -} - -func (*UnimplementedProtocolServiceServer) DeactivateGroup(ctx context.Context, req *bertytypes.DeactivateGroup_Request) (*bertytypes.DeactivateGroup_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeactivateGroup not implemented") -} - -func (*UnimplementedProtocolServiceServer) MonitorGroup(req *bertytypes.MonitorGroup_Request, srv ProtocolService_MonitorGroupServer) error { - return status.Errorf(codes.Unimplemented, "method MonitorGroup not implemented") -} - -func (*UnimplementedProtocolServiceServer) DebugListGroups(req *bertytypes.DebugListGroups_Request, srv ProtocolService_DebugListGroupsServer) error { - return status.Errorf(codes.Unimplemented, "method DebugListGroups not implemented") -} - -func (*UnimplementedProtocolServiceServer) DebugInspectGroupStore(req *bertytypes.DebugInspectGroupStore_Request, srv ProtocolService_DebugInspectGroupStoreServer) error { - return status.Errorf(codes.Unimplemented, "method DebugInspectGroupStore not implemented") -} - -func (*UnimplementedProtocolServiceServer) DebugGroup(ctx context.Context, req *bertytypes.DebugGroup_Request) (*bertytypes.DebugGroup_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method DebugGroup not implemented") -} - -func (*UnimplementedProtocolServiceServer) SystemInfo(ctx context.Context, req *bertytypes.SystemInfo_Request) (*bertytypes.SystemInfo_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SystemInfo not implemented") -} - -func (*UnimplementedProtocolServiceServer) AuthServiceInitFlow(ctx context.Context, req *bertytypes.AuthServiceInitFlow_Request) (*bertytypes.AuthServiceInitFlow_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthServiceInitFlow not implemented") -} - -func (*UnimplementedProtocolServiceServer) AuthServiceCompleteFlow(ctx context.Context, req *bertytypes.AuthServiceCompleteFlow_Request) (*bertytypes.AuthServiceCompleteFlow_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthServiceCompleteFlow not implemented") -} - -func (*UnimplementedProtocolServiceServer) ServicesTokenList(req *bertytypes.ServicesTokenList_Request, srv ProtocolService_ServicesTokenListServer) error { - return status.Errorf(codes.Unimplemented, "method ServicesTokenList not implemented") -} - -func (*UnimplementedProtocolServiceServer) ReplicationServiceRegisterGroup(ctx context.Context, req *bertytypes.ReplicationServiceRegisterGroup_Request) (*bertytypes.ReplicationServiceRegisterGroup_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReplicationServiceRegisterGroup not implemented") -} - -func (*UnimplementedProtocolServiceServer) PeerList(ctx context.Context, req *bertytypes.PeerList_Request) (*bertytypes.PeerList_Reply, error) { - return nil, status.Errorf(codes.Unimplemented, "method PeerList not implemented") -} - -func (*UnimplementedProtocolServiceServer) AttachmentPrepare(srv ProtocolService_AttachmentPrepareServer) error { - return status.Errorf(codes.Unimplemented, "method AttachmentPrepare not implemented") -} - -func (*UnimplementedProtocolServiceServer) AttachmentRetrieve(req *bertytypes.AttachmentRetrieve_Request, srv ProtocolService_AttachmentRetrieveServer) error { - return status.Errorf(codes.Unimplemented, "method AttachmentRetrieve not implemented") -} - -func RegisterProtocolServiceServer(s *grpc.Server, srv ProtocolServiceServer) { - s.RegisterService(&_ProtocolService_serviceDesc, srv) -} - -func _ProtocolService_InstanceExportData_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.InstanceExportData_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).InstanceExportData(m, &protocolServiceInstanceExportDataServer{stream}) -} - -type ProtocolService_InstanceExportDataServer interface { - Send(*bertytypes.InstanceExportData_Reply) error - grpc.ServerStream -} - -type protocolServiceInstanceExportDataServer struct { - grpc.ServerStream -} - -func (x *protocolServiceInstanceExportDataServer) Send(m *bertytypes.InstanceExportData_Reply) error { - return x.ServerStream.SendMsg(m) -} - -func _ProtocolService_InstanceGetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.InstanceGetConfiguration_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).InstanceGetConfiguration(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/InstanceGetConfiguration", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).InstanceGetConfiguration(ctx, req.(*bertytypes.InstanceGetConfiguration_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactRequestReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactRequestReference_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactRequestReference(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestReference", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactRequestReference(ctx, req.(*bertytypes.ContactRequestReference_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactRequestDisable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactRequestDisable_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactRequestDisable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestDisable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactRequestDisable(ctx, req.(*bertytypes.ContactRequestDisable_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactRequestEnable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactRequestEnable_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactRequestEnable(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestEnable", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactRequestEnable(ctx, req.(*bertytypes.ContactRequestEnable_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactRequestResetReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactRequestResetReference_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactRequestResetReference(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestResetReference", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactRequestResetReference(ctx, req.(*bertytypes.ContactRequestResetReference_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactRequestSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactRequestSend_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactRequestSend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestSend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactRequestSend(ctx, req.(*bertytypes.ContactRequestSend_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactRequestAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactRequestAccept_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactRequestAccept(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestAccept", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactRequestAccept(ctx, req.(*bertytypes.ContactRequestAccept_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactRequestDiscard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactRequestDiscard_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactRequestDiscard(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestDiscard", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactRequestDiscard(ctx, req.(*bertytypes.ContactRequestDiscard_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactBlock_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactBlock(ctx, req.(*bertytypes.ContactBlock_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactUnblock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactUnblock_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactUnblock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactUnblock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactUnblock(ctx, req.(*bertytypes.ContactUnblock_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ContactAliasKeySend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ContactAliasKeySend_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ContactAliasKeySend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ContactAliasKeySend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ContactAliasKeySend(ctx, req.(*bertytypes.ContactAliasKeySend_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_MultiMemberGroupCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.MultiMemberGroupCreate_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).MultiMemberGroupCreate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupCreate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).MultiMemberGroupCreate(ctx, req.(*bertytypes.MultiMemberGroupCreate_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_MultiMemberGroupJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.MultiMemberGroupJoin_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).MultiMemberGroupJoin(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupJoin", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).MultiMemberGroupJoin(ctx, req.(*bertytypes.MultiMemberGroupJoin_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_MultiMemberGroupLeave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.MultiMemberGroupLeave_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).MultiMemberGroupLeave(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupLeave", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).MultiMemberGroupLeave(ctx, req.(*bertytypes.MultiMemberGroupLeave_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_MultiMemberGroupAliasResolverDisclose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.MultiMemberGroupAliasResolverDisclose_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).MultiMemberGroupAliasResolverDisclose(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupAliasResolverDisclose", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).MultiMemberGroupAliasResolverDisclose(ctx, req.(*bertytypes.MultiMemberGroupAliasResolverDisclose_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_MultiMemberGroupAdminRoleGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.MultiMemberGroupAdminRoleGrant_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).MultiMemberGroupAdminRoleGrant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupAdminRoleGrant", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).MultiMemberGroupAdminRoleGrant(ctx, req.(*bertytypes.MultiMemberGroupAdminRoleGrant_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_MultiMemberGroupInvitationCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.MultiMemberGroupInvitationCreate_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).MultiMemberGroupInvitationCreate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupInvitationCreate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).MultiMemberGroupInvitationCreate(ctx, req.(*bertytypes.MultiMemberGroupInvitationCreate_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_AppMetadataSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.AppMetadataSend_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).AppMetadataSend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/AppMetadataSend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).AppMetadataSend(ctx, req.(*bertytypes.AppMetadataSend_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_AppMessageSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.AppMessageSend_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).AppMessageSend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/AppMessageSend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).AppMessageSend(ctx, req.(*bertytypes.AppMessageSend_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_GroupMetadataList_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.GroupMetadataList_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).GroupMetadataList(m, &protocolServiceGroupMetadataListServer{stream}) -} - -type ProtocolService_GroupMetadataListServer interface { - Send(*bertytypes.GroupMetadataEvent) error - grpc.ServerStream -} - -type protocolServiceGroupMetadataListServer struct { - grpc.ServerStream -} - -func (x *protocolServiceGroupMetadataListServer) Send(m *bertytypes.GroupMetadataEvent) error { - return x.ServerStream.SendMsg(m) -} - -func _ProtocolService_GroupMessageList_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.GroupMessageList_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).GroupMessageList(m, &protocolServiceGroupMessageListServer{stream}) -} - -type ProtocolService_GroupMessageListServer interface { - Send(*bertytypes.GroupMessageEvent) error - grpc.ServerStream -} - -type protocolServiceGroupMessageListServer struct { - grpc.ServerStream -} - -func (x *protocolServiceGroupMessageListServer) Send(m *bertytypes.GroupMessageEvent) error { - return x.ServerStream.SendMsg(m) -} - -func _ProtocolService_GroupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.GroupInfo_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).GroupInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/GroupInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).GroupInfo(ctx, req.(*bertytypes.GroupInfo_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ActivateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ActivateGroup_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ActivateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ActivateGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ActivateGroup(ctx, req.(*bertytypes.ActivateGroup_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_DeactivateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.DeactivateGroup_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).DeactivateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/DeactivateGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).DeactivateGroup(ctx, req.(*bertytypes.DeactivateGroup_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_MonitorGroup_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.MonitorGroup_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).MonitorGroup(m, &protocolServiceMonitorGroupServer{stream}) -} - -type ProtocolService_MonitorGroupServer interface { - Send(*bertytypes.MonitorGroup_Reply) error - grpc.ServerStream -} - -type protocolServiceMonitorGroupServer struct { - grpc.ServerStream -} - -func (x *protocolServiceMonitorGroupServer) Send(m *bertytypes.MonitorGroup_Reply) error { - return x.ServerStream.SendMsg(m) -} - -func _ProtocolService_DebugListGroups_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.DebugListGroups_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).DebugListGroups(m, &protocolServiceDebugListGroupsServer{stream}) -} - -type ProtocolService_DebugListGroupsServer interface { - Send(*bertytypes.DebugListGroups_Reply) error - grpc.ServerStream -} - -type protocolServiceDebugListGroupsServer struct { - grpc.ServerStream -} - -func (x *protocolServiceDebugListGroupsServer) Send(m *bertytypes.DebugListGroups_Reply) error { - return x.ServerStream.SendMsg(m) -} - -func _ProtocolService_DebugInspectGroupStore_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.DebugInspectGroupStore_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).DebugInspectGroupStore(m, &protocolServiceDebugInspectGroupStoreServer{stream}) -} - -type ProtocolService_DebugInspectGroupStoreServer interface { - Send(*bertytypes.DebugInspectGroupStore_Reply) error - grpc.ServerStream -} - -type protocolServiceDebugInspectGroupStoreServer struct { - grpc.ServerStream -} - -func (x *protocolServiceDebugInspectGroupStoreServer) Send(m *bertytypes.DebugInspectGroupStore_Reply) error { - return x.ServerStream.SendMsg(m) -} - -func _ProtocolService_DebugGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.DebugGroup_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).DebugGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/DebugGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).DebugGroup(ctx, req.(*bertytypes.DebugGroup_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_SystemInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.SystemInfo_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).SystemInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/SystemInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).SystemInfo(ctx, req.(*bertytypes.SystemInfo_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_AuthServiceInitFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.AuthServiceInitFlow_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).AuthServiceInitFlow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/AuthServiceInitFlow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).AuthServiceInitFlow(ctx, req.(*bertytypes.AuthServiceInitFlow_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_AuthServiceCompleteFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.AuthServiceCompleteFlow_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).AuthServiceCompleteFlow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/AuthServiceCompleteFlow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).AuthServiceCompleteFlow(ctx, req.(*bertytypes.AuthServiceCompleteFlow_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_ServicesTokenList_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.ServicesTokenList_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).ServicesTokenList(m, &protocolServiceServicesTokenListServer{stream}) -} - -type ProtocolService_ServicesTokenListServer interface { - Send(*bertytypes.ServicesTokenList_Reply) error - grpc.ServerStream -} - -type protocolServiceServicesTokenListServer struct { - grpc.ServerStream -} - -func (x *protocolServiceServicesTokenListServer) Send(m *bertytypes.ServicesTokenList_Reply) error { - return x.ServerStream.SendMsg(m) -} - -func _ProtocolService_ReplicationServiceRegisterGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ReplicationServiceRegisterGroup_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).ReplicationServiceRegisterGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/ReplicationServiceRegisterGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).ReplicationServiceRegisterGroup(ctx, req.(*bertytypes.ReplicationServiceRegisterGroup_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_PeerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.PeerList_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProtocolServiceServer).PeerList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/berty.protocol.v1.ProtocolService/PeerList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProtocolServiceServer).PeerList(ctx, req.(*bertytypes.PeerList_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProtocolService_AttachmentPrepare_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ProtocolServiceServer).AttachmentPrepare(&protocolServiceAttachmentPrepareServer{stream}) -} - -type ProtocolService_AttachmentPrepareServer interface { - SendAndClose(*bertytypes.AttachmentPrepare_Reply) error - Recv() (*bertytypes.AttachmentPrepare_Request, error) - grpc.ServerStream -} - -type protocolServiceAttachmentPrepareServer struct { - grpc.ServerStream -} - -func (x *protocolServiceAttachmentPrepareServer) SendAndClose(m *bertytypes.AttachmentPrepare_Reply) error { - return x.ServerStream.SendMsg(m) -} - -func (x *protocolServiceAttachmentPrepareServer) Recv() (*bertytypes.AttachmentPrepare_Request, error) { - m := new(bertytypes.AttachmentPrepare_Request) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ProtocolService_AttachmentRetrieve_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.AttachmentRetrieve_Request) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ProtocolServiceServer).AttachmentRetrieve(m, &protocolServiceAttachmentRetrieveServer{stream}) -} - -type ProtocolService_AttachmentRetrieveServer interface { - Send(*bertytypes.AttachmentRetrieve_Reply) error - grpc.ServerStream -} - -type protocolServiceAttachmentRetrieveServer struct { - grpc.ServerStream -} - -func (x *protocolServiceAttachmentRetrieveServer) Send(m *bertytypes.AttachmentRetrieve_Reply) error { - return x.ServerStream.SendMsg(m) -} - -var _ProtocolService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "berty.protocol.v1.ProtocolService", - HandlerType: (*ProtocolServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "InstanceGetConfiguration", - Handler: _ProtocolService_InstanceGetConfiguration_Handler, - }, - { - MethodName: "ContactRequestReference", - Handler: _ProtocolService_ContactRequestReference_Handler, - }, - { - MethodName: "ContactRequestDisable", - Handler: _ProtocolService_ContactRequestDisable_Handler, - }, - { - MethodName: "ContactRequestEnable", - Handler: _ProtocolService_ContactRequestEnable_Handler, - }, - { - MethodName: "ContactRequestResetReference", - Handler: _ProtocolService_ContactRequestResetReference_Handler, - }, - { - MethodName: "ContactRequestSend", - Handler: _ProtocolService_ContactRequestSend_Handler, - }, - { - MethodName: "ContactRequestAccept", - Handler: _ProtocolService_ContactRequestAccept_Handler, - }, - { - MethodName: "ContactRequestDiscard", - Handler: _ProtocolService_ContactRequestDiscard_Handler, - }, - { - MethodName: "ContactBlock", - Handler: _ProtocolService_ContactBlock_Handler, - }, - { - MethodName: "ContactUnblock", - Handler: _ProtocolService_ContactUnblock_Handler, - }, - { - MethodName: "ContactAliasKeySend", - Handler: _ProtocolService_ContactAliasKeySend_Handler, - }, - { - MethodName: "MultiMemberGroupCreate", - Handler: _ProtocolService_MultiMemberGroupCreate_Handler, - }, - { - MethodName: "MultiMemberGroupJoin", - Handler: _ProtocolService_MultiMemberGroupJoin_Handler, - }, - { - MethodName: "MultiMemberGroupLeave", - Handler: _ProtocolService_MultiMemberGroupLeave_Handler, - }, - { - MethodName: "MultiMemberGroupAliasResolverDisclose", - Handler: _ProtocolService_MultiMemberGroupAliasResolverDisclose_Handler, - }, - { - MethodName: "MultiMemberGroupAdminRoleGrant", - Handler: _ProtocolService_MultiMemberGroupAdminRoleGrant_Handler, - }, - { - MethodName: "MultiMemberGroupInvitationCreate", - Handler: _ProtocolService_MultiMemberGroupInvitationCreate_Handler, - }, - { - MethodName: "AppMetadataSend", - Handler: _ProtocolService_AppMetadataSend_Handler, - }, - { - MethodName: "AppMessageSend", - Handler: _ProtocolService_AppMessageSend_Handler, - }, - { - MethodName: "GroupInfo", - Handler: _ProtocolService_GroupInfo_Handler, - }, - { - MethodName: "ActivateGroup", - Handler: _ProtocolService_ActivateGroup_Handler, - }, - { - MethodName: "DeactivateGroup", - Handler: _ProtocolService_DeactivateGroup_Handler, - }, - { - MethodName: "DebugGroup", - Handler: _ProtocolService_DebugGroup_Handler, - }, - { - MethodName: "SystemInfo", - Handler: _ProtocolService_SystemInfo_Handler, - }, - { - MethodName: "AuthServiceInitFlow", - Handler: _ProtocolService_AuthServiceInitFlow_Handler, - }, - { - MethodName: "AuthServiceCompleteFlow", - Handler: _ProtocolService_AuthServiceCompleteFlow_Handler, - }, - { - MethodName: "ReplicationServiceRegisterGroup", - Handler: _ProtocolService_ReplicationServiceRegisterGroup_Handler, - }, - { - MethodName: "PeerList", - Handler: _ProtocolService_PeerList_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "InstanceExportData", - Handler: _ProtocolService_InstanceExportData_Handler, - ServerStreams: true, - }, - { - StreamName: "GroupMetadataList", - Handler: _ProtocolService_GroupMetadataList_Handler, - ServerStreams: true, - }, - { - StreamName: "GroupMessageList", - Handler: _ProtocolService_GroupMessageList_Handler, - ServerStreams: true, - }, - { - StreamName: "MonitorGroup", - Handler: _ProtocolService_MonitorGroup_Handler, - ServerStreams: true, - }, - { - StreamName: "DebugListGroups", - Handler: _ProtocolService_DebugListGroups_Handler, - ServerStreams: true, - }, - { - StreamName: "DebugInspectGroupStore", - Handler: _ProtocolService_DebugInspectGroupStore_Handler, - ServerStreams: true, - }, - { - StreamName: "ServicesTokenList", - Handler: _ProtocolService_ServicesTokenList_Handler, - ServerStreams: true, - }, - { - StreamName: "AttachmentPrepare", - Handler: _ProtocolService_AttachmentPrepare_Handler, - ClientStreams: true, - }, - { - StreamName: "AttachmentRetrieve", - Handler: _ProtocolService_AttachmentRetrieve_Handler, - ServerStreams: true, - }, - }, - Metadata: "bertyprotocol.proto", -} diff --git a/go/pkg/bertyprotocol/bertyreplication.pb.go b/go/pkg/bertyprotocol/bertyreplication.pb.go index 8f22c3fe97..1be0395815 100644 --- a/go/pkg/bertyprotocol/bertyreplication.pb.go +++ b/go/pkg/bertyprotocol/bertyreplication.pb.go @@ -13,7 +13,7 @@ import ( codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - bertytypes "berty.tech/berty/v2/go/pkg/bertytypes" + protocoltypes "berty.tech/berty/v2/go/pkg/protocoltypes" ) // Reference imports to suppress errors if they are not otherwise used. @@ -32,17 +32,17 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("bertyreplication.proto", fileDescriptor_07ad8506da4f8389) } var fileDescriptor_07ad8506da4f8389 = []byte{ - // 156 bytes of a gzipped FileDescriptorProto + // 153 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0x4a, 0x2d, 0x2a, 0xa9, 0x2c, 0x4a, 0x2d, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0x12, 0x04, 0x8b, 0x43, 0x38, 0xc9, 0xf9, 0x39, 0x7a, 0x65, 0x86, 0x52, 0x02, - 0x60, 0xa1, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x88, 0xb8, 0xd1, 0x4c, 0x46, 0x2e, 0xa1, 0x20, 0x84, - 0xd6, 0xe0, 0xd4, 0xa2, 0xb2, 0xcc, 0xe4, 0x54, 0xa1, 0x26, 0x46, 0x2e, 0x3e, 0x98, 0x70, 0xaa, - 0x7b, 0x51, 0x7e, 0x69, 0x81, 0x90, 0x85, 0x1e, 0xc4, 0x3c, 0x88, 0xee, 0x32, 0x43, 0x3d, 0x4c, - 0x6d, 0xa8, 0x3a, 0xf4, 0x82, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0xa4, 0xcc, 0xc8, 0xd0, 0x59, - 0x90, 0x53, 0xe9, 0xa4, 0x1e, 0xa5, 0x0a, 0xd5, 0x98, 0x9a, 0x9c, 0xa1, 0x0f, 0x66, 0xea, 0xa7, - 0xe7, 0xeb, 0x17, 0x64, 0xa7, 0x43, 0x38, 0x30, 0x9f, 0x25, 0xb1, 0x81, 0x59, 0xc6, 0x80, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x6e, 0x4a, 0x04, 0x6b, 0x0a, 0x01, 0x00, 0x00, + 0x2f, 0xc9, 0x17, 0x12, 0x04, 0x8b, 0x43, 0x38, 0xc9, 0xf9, 0x39, 0x7a, 0x65, 0x86, 0x52, 0xc2, + 0x30, 0x4e, 0x49, 0x65, 0x41, 0x6a, 0x31, 0x44, 0xca, 0x68, 0x3e, 0x23, 0x97, 0x50, 0x10, 0x42, + 0x77, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, 0x50, 0x07, 0x23, 0x17, 0x1f, 0x4c, 0x38, 0xd5, + 0xbd, 0x28, 0xbf, 0xb4, 0x40, 0xc8, 0x5a, 0x0f, 0xc3, 0x48, 0x3d, 0x4c, 0x9d, 0xa8, 0x9a, 0xf4, + 0x82, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0xa4, 0x2c, 0xc9, 0xd3, 0x5c, 0x90, 0x53, 0xe9, 0xa4, + 0x1e, 0xa5, 0x0a, 0xd1, 0x5b, 0x92, 0x9a, 0x9c, 0xa1, 0x0f, 0x66, 0xea, 0xa7, 0xe7, 0xeb, 0x17, + 0x64, 0xa7, 0x43, 0x38, 0x30, 0x23, 0x93, 0xd8, 0xc0, 0x2c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x59, 0x67, 0x56, 0xfa, 0x13, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -60,7 +60,7 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ReplicationServiceClient interface { // ReplicateGroup - ReplicateGroup(ctx context.Context, in *bertytypes.ReplicationServiceReplicateGroup_Request, opts ...grpc.CallOption) (*bertytypes.ReplicationServiceReplicateGroup_Reply, error) + ReplicateGroup(ctx context.Context, in *protocoltypes.ReplicationServiceReplicateGroup_Request, opts ...grpc.CallOption) (*protocoltypes.ReplicationServiceReplicateGroup_Reply, error) } type replicationServiceClient struct { @@ -71,8 +71,8 @@ func NewReplicationServiceClient(cc *grpc.ClientConn) ReplicationServiceClient { return &replicationServiceClient{cc} } -func (c *replicationServiceClient) ReplicateGroup(ctx context.Context, in *bertytypes.ReplicationServiceReplicateGroup_Request, opts ...grpc.CallOption) (*bertytypes.ReplicationServiceReplicateGroup_Reply, error) { - out := new(bertytypes.ReplicationServiceReplicateGroup_Reply) +func (c *replicationServiceClient) ReplicateGroup(ctx context.Context, in *protocoltypes.ReplicationServiceReplicateGroup_Request, opts ...grpc.CallOption) (*protocoltypes.ReplicationServiceReplicateGroup_Reply, error) { + out := new(protocoltypes.ReplicationServiceReplicateGroup_Reply) err := c.cc.Invoke(ctx, "/berty.protocol.v1.ReplicationService/ReplicateGroup", in, out, opts...) if err != nil { return nil, err @@ -83,14 +83,14 @@ func (c *replicationServiceClient) ReplicateGroup(ctx context.Context, in *berty // ReplicationServiceServer is the server API for ReplicationService service. type ReplicationServiceServer interface { // ReplicateGroup - ReplicateGroup(context.Context, *bertytypes.ReplicationServiceReplicateGroup_Request) (*bertytypes.ReplicationServiceReplicateGroup_Reply, error) + ReplicateGroup(context.Context, *protocoltypes.ReplicationServiceReplicateGroup_Request) (*protocoltypes.ReplicationServiceReplicateGroup_Reply, error) } // UnimplementedReplicationServiceServer can be embedded to have forward compatible implementations. type UnimplementedReplicationServiceServer struct { } -func (*UnimplementedReplicationServiceServer) ReplicateGroup(ctx context.Context, req *bertytypes.ReplicationServiceReplicateGroup_Request) (*bertytypes.ReplicationServiceReplicateGroup_Reply, error) { +func (*UnimplementedReplicationServiceServer) ReplicateGroup(ctx context.Context, req *protocoltypes.ReplicationServiceReplicateGroup_Request) (*protocoltypes.ReplicationServiceReplicateGroup_Reply, error) { return nil, status.Errorf(codes.Unimplemented, "method ReplicateGroup not implemented") } @@ -99,7 +99,7 @@ func RegisterReplicationServiceServer(s *grpc.Server, srv ReplicationServiceServ } func _ReplicationService_ReplicateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(bertytypes.ReplicationServiceReplicateGroup_Request) + in := new(protocoltypes.ReplicationServiceReplicateGroup_Request) if err := dec(in); err != nil { return nil, err } @@ -111,7 +111,7 @@ func _ReplicationService_ReplicateGroup_Handler(srv interface{}, ctx context.Con FullMethod: "/berty.protocol.v1.ReplicationService/ReplicateGroup", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReplicationServiceServer).ReplicateGroup(ctx, req.(*bertytypes.ReplicationServiceReplicateGroup_Request)) + return srv.(ReplicationServiceServer).ReplicateGroup(ctx, req.(*protocoltypes.ReplicationServiceReplicateGroup_Request)) } return interceptor(ctx, in, info, handler) } diff --git a/go/pkg/bertyprotocol/bertyreplication.pb.gw.go b/go/pkg/bertyprotocol/bertyreplication.pb.gw.go index eba0cf5846..b363d27312 100644 --- a/go/pkg/bertyprotocol/bertyreplication.pb.gw.go +++ b/go/pkg/bertyprotocol/bertyreplication.pb.gw.go @@ -23,7 +23,7 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) // Suppress "imported and not used" errors @@ -38,7 +38,7 @@ var ( ) func request_ReplicationService_ReplicateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ReplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ReplicationServiceReplicateGroup_Request + var protoReq protocoltypes.ReplicationServiceReplicateGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -54,7 +54,7 @@ func request_ReplicationService_ReplicateGroup_0(ctx context.Context, marshaler } func local_request_ReplicationService_ReplicateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ReplicationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ReplicationServiceReplicateGroup_Request + var protoReq protocoltypes.ReplicationServiceReplicateGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) diff --git a/go/pkg/bertyprotocol/blackbox_test.go b/go/pkg/bertyprotocol/blackbox_test.go index 9a65ffdda3..1a4b32c753 100644 --- a/go/pkg/bertyprotocol/blackbox_test.go +++ b/go/pkg/bertyprotocol/blackbox_test.go @@ -10,7 +10,7 @@ import ( "berty.tech/berty/v2/go/internal/testutil" "berty.tech/berty/v2/go/pkg/bertyprotocol" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestTestingClient_impl(t *testing.T) { @@ -27,7 +27,7 @@ func TestTestingClient_impl(t *testing.T) { defer cleanup() // test service - _, _ = client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + _, _ = client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) status := client.Status() expected := bertyprotocol.Status{} assert.Equal(t, expected, status) @@ -42,7 +42,7 @@ func ExampleNew_basic() { panic(err) } - ret, err := client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + ret, err := client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) if err != nil { panic(err) } diff --git a/go/pkg/bertyprotocol/client.go b/go/pkg/bertyprotocol/client.go index 30bc8d3da3..2eb301f104 100644 --- a/go/pkg/bertyprotocol/client.go +++ b/go/pkg/bertyprotocol/client.go @@ -7,18 +7,19 @@ import ( "berty.tech/berty/v2/go/internal/grpcutil" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) const ClientBufferSize = 256 * 1024 type Client interface { - ProtocolServiceClient + protocoltypes.ProtocolServiceClient Close() error } type client struct { - ProtocolServiceClient + protocoltypes.ProtocolServiceClient l *grpcutil.BufListener cc *grpc.ClientConn @@ -62,7 +63,7 @@ func NewClientFromServer(ctx context.Context, s *grpc.Server, svc Service, opts return nil, err } - RegisterProtocolServiceServer(s, svc) + protocoltypes.RegisterProtocolServiceServer(s, svc) go func() { err := s.Serve(bl) if err != nil && !(err == grpc.ErrServerStopped || err.Error() == "closed") { @@ -70,6 +71,6 @@ func NewClientFromServer(ctx context.Context, s *grpc.Server, svc Service, opts } }() - c := client{ProtocolServiceClient: NewProtocolServiceClient(cc), cc: cc, l: bl} + c := client{ProtocolServiceClient: protocoltypes.NewProtocolServiceClient(cc), cc: cc, l: bl} return &c, nil } diff --git a/go/pkg/bertyprotocol/contact_request_manager.go b/go/pkg/bertyprotocol/contact_request_manager.go index 4aecd40ed0..badc6878db 100644 --- a/go/pkg/bertyprotocol/contact_request_manager.go +++ b/go/pkg/bertyprotocol/contact_request_manager.go @@ -15,12 +15,12 @@ import ( "berty.tech/berty/v2/go/internal/handshake" "berty.tech/berty/v2/go/internal/ipfsutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type pendingRequestDetails struct { - contact *bertytypes.ShareableContact + contact *protocoltypes.ShareableContact ownMetadata []byte } @@ -43,7 +43,7 @@ type contactRequestsManager struct { toAdd map[string]*pendingRequest } -func (c *contactRequestsManager) metadataRequestDisabled(_ *bertytypes.GroupMetadataEvent) error { +func (c *contactRequestsManager) metadataRequestDisabled(_ *protocoltypes.GroupMetadataEvent) error { c.enabled = false if c.announceCancel != nil { c.announceCancel() @@ -55,7 +55,7 @@ func (c *contactRequestsManager) metadataRequestDisabled(_ *bertytypes.GroupMeta return nil } -func (c *contactRequestsManager) metadataRequestEnabled(_ *bertytypes.GroupMetadataEvent) error { +func (c *contactRequestsManager) metadataRequestEnabled(_ *protocoltypes.GroupMetadataEvent) error { c.ipfs.SetStreamHandler(contactRequestV1, c.incomingHandler) c.enabled = true @@ -66,8 +66,8 @@ func (c *contactRequestsManager) metadataRequestEnabled(_ *bertytypes.GroupMetad return c.enableIncomingRequests() } -func (c *contactRequestsManager) metadataRequestReset(evt *bertytypes.GroupMetadataEvent) error { - e := &bertytypes.AccountContactRequestReferenceReset{} +func (c *contactRequestsManager) metadataRequestReset(evt *protocoltypes.GroupMetadataEvent) error { + e := &protocoltypes.AccountContactRequestReferenceReset{} if err := e.Unmarshal(evt.Event); err != nil { return errcode.ErrDeserialization.Wrap(err) } @@ -81,20 +81,20 @@ func (c *contactRequestsManager) metadataRequestReset(evt *bertytypes.GroupMetad return c.enableIncomingRequests() } -func (c *contactRequestsManager) metadataRequestEnqueued(evt *bertytypes.GroupMetadataEvent) error { - e := &bertytypes.AccountContactRequestEnqueued{} +func (c *contactRequestsManager) metadataRequestEnqueued(evt *protocoltypes.GroupMetadataEvent) error { + e := &protocoltypes.AccountContactRequestEnqueued{} if err := e.Unmarshal(evt.Event); err != nil { return err } - return c.enqueueRequest(&bertytypes.ShareableContact{ + return c.enqueueRequest(&protocoltypes.ShareableContact{ PK: e.Contact.PK, PublicRendezvousSeed: e.Contact.PublicRendezvousSeed, }, e.OwnMetadata) } -func (c *contactRequestsManager) metadataRequestSent(evt *bertytypes.GroupMetadataEvent) error { - e := &bertytypes.AccountContactRequestSent{} +func (c *contactRequestsManager) metadataRequestSent(evt *protocoltypes.GroupMetadataEvent) error { + e := &protocoltypes.AccountContactRequestSent{} if err := e.Unmarshal(evt.Event); err != nil { return err } @@ -107,8 +107,8 @@ func (c *contactRequestsManager) metadataRequestSent(evt *bertytypes.GroupMetada return nil } -func (c *contactRequestsManager) metadataRequestReceived(evt *bertytypes.GroupMetadataEvent) error { - e := &bertytypes.AccountContactRequestReceived{} +func (c *contactRequestsManager) metadataRequestReceived(evt *protocoltypes.GroupMetadataEvent) error { + e := &protocoltypes.AccountContactRequestReceived{} if err := e.Unmarshal(evt.Event); err != nil { return err } @@ -121,7 +121,7 @@ func (c *contactRequestsManager) metadataRequestReceived(evt *bertytypes.GroupMe return nil } -func (c *contactRequestsManager) enqueueRequest(contact *bertytypes.ShareableContact, ownMetadata []byte) error { +func (c *contactRequestsManager) enqueueRequest(contact *protocoltypes.ShareableContact, ownMetadata []byte) error { pk, err := crypto.UnmarshalEd25519PublicKey(contact.PK) if err != nil { return err @@ -202,13 +202,13 @@ func (c *contactRequestsManager) enqueueRequest(contact *bertytypes.ShareableCon } func (c *contactRequestsManager) metadataWatcher(ctx context.Context) { - handlers := map[bertytypes.EventType]func(*bertytypes.GroupMetadataEvent) error{ - bertytypes.EventTypeAccountContactRequestDisabled: c.metadataRequestDisabled, - bertytypes.EventTypeAccountContactRequestEnabled: c.metadataRequestEnabled, - bertytypes.EventTypeAccountContactRequestReferenceReset: c.metadataRequestReset, - bertytypes.EventTypeAccountContactRequestOutgoingEnqueued: c.metadataRequestEnqueued, - bertytypes.EventTypeAccountContactRequestOutgoingSent: c.metadataRequestSent, - bertytypes.EventTypeAccountContactRequestIncomingReceived: c.metadataRequestReceived, + handlers := map[protocoltypes.EventType]func(*protocoltypes.GroupMetadataEvent) error{ + protocoltypes.EventTypeAccountContactRequestDisabled: c.metadataRequestDisabled, + protocoltypes.EventTypeAccountContactRequestEnabled: c.metadataRequestEnabled, + protocoltypes.EventTypeAccountContactRequestReferenceReset: c.metadataRequestReset, + protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued: c.metadataRequestEnqueued, + protocoltypes.EventTypeAccountContactRequestOutgoingSent: c.metadataRequestSent, + protocoltypes.EventTypeAccountContactRequestIncomingReceived: c.metadataRequestReceived, } c.lock.Lock() @@ -220,12 +220,12 @@ func (c *contactRequestsManager) metadataWatcher(ctx context.Context) { } if c.enabled && len(c.seed) > 0 { - if err := c.metadataRequestEnabled(&bertytypes.GroupMetadataEvent{}); err != nil { + if err := c.metadataRequestEnabled(&protocoltypes.GroupMetadataEvent{}); err != nil { c.logger.Warn("unable to enable metadata request", zap.Error(err)) } } - for _, contact := range c.metadataStore.ListContactsByStatus(bertytypes.ContactStateToRequest) { + for _, contact := range c.metadataStore.ListContactsByStatus(protocoltypes.ContactStateToRequest) { ownMeta, err := c.metadataStore.GetRequestOwnMetadataForContact(contact.PK) if err != nil { c.logger.Warn("error while retrieving own metadata for contact", zap.Binary("pk", contact.PK), zap.Error(err)) @@ -240,7 +240,7 @@ func (c *contactRequestsManager) metadataWatcher(ctx context.Context) { chSub := c.metadataStore.Subscribe(ctx) go func() { for evt := range chSub { - e, ok := evt.(*bertytypes.GroupMetadataEvent) + e, ok := evt.(*protocoltypes.GroupMetadataEvent) if !ok { continue } @@ -286,14 +286,14 @@ func (c *contactRequestsManager) incomingHandler(stream network.Stream) { return } - contact := &bertytypes.ShareableContact{} + contact := &protocoltypes.ShareableContact{} if err := reader.ReadMsg(contact); err != nil { c.logger.Error("an error occurred while retrieving contact information", zap.Error(err)) return } - if err := contact.CheckFormat(bertytypes.ShareableContactOptionsAllowMissingRDVSeed); err != nil { + if err := contact.CheckFormat(protocoltypes.ShareableContactOptionsAllowMissingRDVSeed); err != nil { c.logger.Error("an error occurred while verifying contact information", zap.Error(err)) return } @@ -303,7 +303,7 @@ func (c *contactRequestsManager) incomingHandler(stream network.Stream) { return } - if _, err = c.metadataStore.ContactRequestIncomingReceived(c.ctx, &bertytypes.ShareableContact{ + if _, err = c.metadataStore.ContactRequestIncomingReceived(c.ctx, &protocoltypes.ShareableContact{ PK: otherPKBytes, PublicRendezvousSeed: contact.PublicRendezvousSeed, Metadata: contact.Metadata, @@ -321,7 +321,7 @@ func (c *contactRequestsManager) performSend(otherPK crypto.PubKey, stream netwo }() c.lock.Lock() - if c.metadataStore.checkContactStatus(otherPK, bertytypes.ContactStateAdded) { + if c.metadataStore.checkContactStatus(otherPK, protocoltypes.ContactStateAdded) { // Nothing to do, contact has already been requested c.lock.Unlock() return nil diff --git a/go/pkg/bertyprotocol/contact_request_manager_test.go b/go/pkg/bertyprotocol/contact_request_manager_test.go index e8b4445095..d28c2b7289 100644 --- a/go/pkg/bertyprotocol/contact_request_manager_test.go +++ b/go/pkg/bertyprotocol/contact_request_manager_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestContactRequestFlow(t *testing.T) { @@ -31,39 +31,39 @@ func TestContactRequestFlow(t *testing.T) { pts, cleanup := NewTestingProtocolWithMockedPeers(ctx, t, &opts, nil, 2) defer cleanup() - _, err := pts[0].Client.ContactRequestEnable(ctx, &bertytypes.ContactRequestEnable_Request{}) + _, err := pts[0].Client.ContactRequestEnable(ctx, &protocoltypes.ContactRequestEnable_Request{}) require.NoError(t, err) - _, err = pts[1].Client.ContactRequestEnable(ctx, &bertytypes.ContactRequestEnable_Request{}) + _, err = pts[1].Client.ContactRequestEnable(ctx, &protocoltypes.ContactRequestEnable_Request{}) require.NoError(t, err) - config0, err := pts[0].Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config0, err := pts[0].Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, config0) - config1, err := pts[1].Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config1, err := pts[1].Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, config1) - ref0, err := pts[0].Client.ContactRequestResetReference(ctx, &bertytypes.ContactRequestResetReference_Request{}) + ref0, err := pts[0].Client.ContactRequestResetReference(ctx, &protocoltypes.ContactRequestResetReference_Request{}) require.NoError(t, err) require.NotNil(t, ref0) - ref1, err := pts[1].Client.ContactRequestResetReference(ctx, &bertytypes.ContactRequestResetReference_Request{}) + ref1, err := pts[1].Client.ContactRequestResetReference(ctx, &protocoltypes.ContactRequestResetReference_Request{}) require.NoError(t, err) require.NotNil(t, ref1) subCtx, subCancel := context.WithCancel(ctx) defer subCancel() - subMeta0, err := pts[0].Client.GroupMetadataList(subCtx, &bertytypes.GroupMetadataList_Request{ + subMeta0, err := pts[0].Client.GroupMetadataList(subCtx, &protocoltypes.GroupMetadataList_Request{ GroupPK: config0.AccountGroupPK, }) require.NoError(t, err) found := false - _, err = pts[1].Client.ContactRequestSend(ctx, &bertytypes.ContactRequestSend_Request{ - Contact: &bertytypes.ShareableContact{ + _, err = pts[1].Client.ContactRequestSend(ctx, &protocoltypes.ContactRequestSend_Request{ + Contact: &protocoltypes.ShareableContact{ PK: config0.AccountPK, PublicRendezvousSeed: ref0.PublicRendezvousSeed, }, @@ -79,11 +79,11 @@ func TestContactRequestFlow(t *testing.T) { require.NoError(t, err) - if evt == nil || evt.Metadata.EventType != bertytypes.EventTypeAccountContactRequestIncomingReceived { + if evt == nil || evt.Metadata.EventType != protocoltypes.EventTypeAccountContactRequestIncomingReceived { continue } - req := &bertytypes.AccountContactRequestReceived{} + req := &protocoltypes.AccountContactRequestReceived{} err = req.Unmarshal(evt.Event) require.NoError(t, err) @@ -95,42 +95,42 @@ func TestContactRequestFlow(t *testing.T) { require.True(t, found) - _, err = pts[1].Client.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ + _, err = pts[1].Client.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ ContactPK: config0.AccountPK, }) require.Error(t, err) - _, err = pts[1].Client.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ + _, err = pts[1].Client.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ ContactPK: config1.AccountPK, }) require.Error(t, err) - _, err = pts[0].Client.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ + _, err = pts[0].Client.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ ContactPK: config0.AccountPK, }) require.Error(t, err) - _, err = pts[0].Client.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ + _, err = pts[0].Client.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ ContactPK: config1.AccountPK, }) require.NoError(t, err) - grpInfo, err := pts[0].Client.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + grpInfo, err := pts[0].Client.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: config1.AccountPK, }) require.NoError(t, err) - _, err = pts[0].Client.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + _, err = pts[0].Client.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: grpInfo.Group.PublicKey, }) require.NoError(t, err) - _, err = pts[1].Client.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + _, err = pts[1].Client.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: grpInfo.Group.PublicKey, }) @@ -155,32 +155,32 @@ func TestContactRequestFlowWithoutIncoming(t *testing.T) { pts, cleanup := NewTestingProtocolWithMockedPeers(ctx, t, &opts, nil, 2) defer cleanup() - _, err := pts[0].Client.ContactRequestEnable(ctx, &bertytypes.ContactRequestEnable_Request{}) + _, err := pts[0].Client.ContactRequestEnable(ctx, &protocoltypes.ContactRequestEnable_Request{}) require.NoError(t, err) - config0, err := pts[0].Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config0, err := pts[0].Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, config0) - config1, err := pts[1].Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config1, err := pts[1].Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, config1) - ref0, err := pts[0].Client.ContactRequestResetReference(ctx, &bertytypes.ContactRequestResetReference_Request{}) + ref0, err := pts[0].Client.ContactRequestResetReference(ctx, &protocoltypes.ContactRequestResetReference_Request{}) require.NoError(t, err) require.NotNil(t, ref0) subCtx, subCancel := context.WithCancel(ctx) defer subCancel() - subMeta0, err := pts[0].Client.GroupMetadataList(subCtx, &bertytypes.GroupMetadataList_Request{ + subMeta0, err := pts[0].Client.GroupMetadataList(subCtx, &protocoltypes.GroupMetadataList_Request{ GroupPK: config0.AccountGroupPK, }) require.NoError(t, err) found := false - _, err = pts[1].Client.ContactRequestSend(ctx, &bertytypes.ContactRequestSend_Request{ - Contact: &bertytypes.ShareableContact{ + _, err = pts[1].Client.ContactRequestSend(ctx, &protocoltypes.ContactRequestSend_Request{ + Contact: &protocoltypes.ShareableContact{ PK: config0.AccountPK, PublicRendezvousSeed: ref0.PublicRendezvousSeed, }, @@ -196,11 +196,11 @@ func TestContactRequestFlowWithoutIncoming(t *testing.T) { require.NoError(t, err) - if evt == nil || evt.Metadata.EventType != bertytypes.EventTypeAccountContactRequestIncomingReceived { + if evt == nil || evt.Metadata.EventType != protocoltypes.EventTypeAccountContactRequestIncomingReceived { continue } - req := &bertytypes.AccountContactRequestReceived{} + req := &protocoltypes.AccountContactRequestReceived{} err = req.Unmarshal(evt.Event) require.NoError(t, err) @@ -212,13 +212,13 @@ func TestContactRequestFlowWithoutIncoming(t *testing.T) { require.True(t, found) - _, err = pts[0].Client.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ + _, err = pts[0].Client.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ ContactPK: config1.AccountPK, }) require.NoError(t, err) - _, err = pts[0].Client.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + _, err = pts[0].Client.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: config1.AccountPK, }) require.NoError(t, err) diff --git a/go/pkg/bertyprotocol/events.go b/go/pkg/bertyprotocol/events.go index 7cb23aaec9..fc4fa83373 100644 --- a/go/pkg/bertyprotocol/events.go +++ b/go/pkg/bertyprotocol/events.go @@ -8,46 +8,46 @@ import ( "golang.org/x/crypto/nacl/secretbox" "berty.tech/berty/v2/go/internal/cryptoutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ipfslog "berty.tech/go-ipfs-log" ) -var eventTypesMapper = map[bertytypes.EventType]struct { +var eventTypesMapper = map[protocoltypes.EventType]struct { Message proto.Message SigChecker sigChecker }{ - bertytypes.EventTypeGroupMemberDeviceAdded: {Message: &bertytypes.GroupAddMemberDevice{}, SigChecker: sigCheckerMemberDeviceAdded}, - bertytypes.EventTypeGroupDeviceSecretAdded: {Message: &bertytypes.GroupAddDeviceSecret{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountGroupJoined: {Message: &bertytypes.AccountGroupJoined{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountGroupLeft: {Message: &bertytypes.AccountGroupLeft{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestDisabled: {Message: &bertytypes.AccountContactRequestDisabled{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestEnabled: {Message: &bertytypes.AccountContactRequestEnabled{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestReferenceReset: {Message: &bertytypes.AccountContactRequestReferenceReset{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestOutgoingEnqueued: {Message: &bertytypes.AccountContactRequestEnqueued{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestOutgoingSent: {Message: &bertytypes.AccountContactRequestSent{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestIncomingReceived: {Message: &bertytypes.AccountContactRequestReceived{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestIncomingDiscarded: {Message: &bertytypes.AccountContactRequestDiscarded{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactRequestIncomingAccepted: {Message: &bertytypes.AccountContactRequestAccepted{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactBlocked: {Message: &bertytypes.AccountContactBlocked{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountContactUnblocked: {Message: &bertytypes.AccountContactUnblocked{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeContactAliasKeyAdded: {Message: &bertytypes.ContactAddAliasKey{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeMultiMemberGroupAliasResolverAdded: {Message: &bertytypes.MultiMemberGroupAddAliasResolver{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeMultiMemberGroupInitialMemberAnnounced: {Message: &bertytypes.MultiMemberInitialMember{}, SigChecker: sigCheckerGroupSigned}, - bertytypes.EventTypeMultiMemberGroupAdminRoleGranted: {Message: &bertytypes.MultiMemberGrantAdminRole{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeGroupMetadataPayloadSent: {Message: &bertytypes.AppMetadata{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountServiceTokenAdded: {Message: &bertytypes.AccountServiceTokenAdded{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeAccountServiceTokenRemoved: {Message: &bertytypes.AccountServiceTokenRemoved{}, SigChecker: sigCheckerDeviceSigned}, - bertytypes.EventTypeGroupReplicating: {Message: &bertytypes.GroupReplicating{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeGroupMemberDeviceAdded: {Message: &protocoltypes.GroupAddMemberDevice{}, SigChecker: sigCheckerMemberDeviceAdded}, + protocoltypes.EventTypeGroupDeviceSecretAdded: {Message: &protocoltypes.GroupAddDeviceSecret{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountGroupJoined: {Message: &protocoltypes.AccountGroupJoined{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountGroupLeft: {Message: &protocoltypes.AccountGroupLeft{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestDisabled: {Message: &protocoltypes.AccountContactRequestDisabled{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestEnabled: {Message: &protocoltypes.AccountContactRequestEnabled{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestReferenceReset: {Message: &protocoltypes.AccountContactRequestReferenceReset{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued: {Message: &protocoltypes.AccountContactRequestEnqueued{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestOutgoingSent: {Message: &protocoltypes.AccountContactRequestSent{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestIncomingReceived: {Message: &protocoltypes.AccountContactRequestReceived{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestIncomingDiscarded: {Message: &protocoltypes.AccountContactRequestDiscarded{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactRequestIncomingAccepted: {Message: &protocoltypes.AccountContactRequestAccepted{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactBlocked: {Message: &protocoltypes.AccountContactBlocked{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountContactUnblocked: {Message: &protocoltypes.AccountContactUnblocked{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeContactAliasKeyAdded: {Message: &protocoltypes.ContactAddAliasKey{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeMultiMemberGroupAliasResolverAdded: {Message: &protocoltypes.MultiMemberGroupAddAliasResolver{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeMultiMemberGroupInitialMemberAnnounced: {Message: &protocoltypes.MultiMemberInitialMember{}, SigChecker: sigCheckerGroupSigned}, + protocoltypes.EventTypeMultiMemberGroupAdminRoleGranted: {Message: &protocoltypes.MultiMemberGrantAdminRole{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeGroupMetadataPayloadSent: {Message: &protocoltypes.AppMetadata{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountServiceTokenAdded: {Message: &protocoltypes.AccountServiceTokenAdded{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeAccountServiceTokenRemoved: {Message: &protocoltypes.AccountServiceTokenRemoved{}, SigChecker: sigCheckerDeviceSigned}, + protocoltypes.EventTypeGroupReplicating: {Message: &protocoltypes.GroupReplicating{}, SigChecker: sigCheckerDeviceSigned}, } -func newEventContext(eventID cid.Cid, parentIDs []cid.Cid, g *bertytypes.Group, attachmentsCIDs [][]byte) *bertytypes.EventContext { +func newEventContext(eventID cid.Cid, parentIDs []cid.Cid, g *protocoltypes.Group, attachmentsCIDs [][]byte) *protocoltypes.EventContext { parentIDsBytes := make([][]byte, len(parentIDs)) for i, parentID := range parentIDs { parentIDsBytes[i] = parentID.Bytes() } - return &bertytypes.EventContext{ + return &protocoltypes.EventContext{ ID: eventID.Bytes(), ParentIDs: parentIDsBytes, GroupPK: g.PublicKey, @@ -84,7 +84,7 @@ func getParentsForCID(log ipfslog.Log, c cid.Cid) []cid.Cid { return ret } -func newGroupMetadataEventFromEntry(log ipfslog.Log, e ipfslog.Entry, metadata *bertytypes.GroupMetadata, event proto.Message, g *bertytypes.Group, attachmentsCIDs [][]byte) (*bertytypes.GroupMetadataEvent, error) { +func newGroupMetadataEventFromEntry(log ipfslog.Log, e ipfslog.Entry, metadata *protocoltypes.GroupMetadata, event proto.Message, g *protocoltypes.Group, attachmentsCIDs [][]byte) (*protocoltypes.GroupMetadataEvent, error) { // TODO: if parent is a merge node we should return the next nodes of it eventBytes, err := proto.Marshal(event) @@ -94,7 +94,7 @@ func newGroupMetadataEventFromEntry(log ipfslog.Log, e ipfslog.Entry, metadata * evtCtx := newEventContext(e.GetHash(), getParentsForCID(log, e.GetHash()), g, attachmentsCIDs) - gme := bertytypes.GroupMetadataEvent{ + gme := protocoltypes.GroupMetadataEvent{ EventContext: evtCtx, Metadata: metadata, Event: eventBytes, @@ -103,8 +103,8 @@ func newGroupMetadataEventFromEntry(log ipfslog.Log, e ipfslog.Entry, metadata * return &gme, nil } -func openGroupEnvelope(g *bertytypes.Group, envelopeBytes []byte, devKS DeviceKeystore) (*bertytypes.GroupMetadata, proto.Message, [][]byte, error) { - env := &bertytypes.GroupEnvelope{} +func openGroupEnvelope(g *protocoltypes.Group, envelopeBytes []byte, devKS DeviceKeystore) (*protocoltypes.GroupMetadata, proto.Message, [][]byte, error) { + env := &protocoltypes.GroupEnvelope{} if err := env.Unmarshal(envelopeBytes); err != nil { return nil, nil, nil, errcode.ErrInvalidInput.Wrap(err) } @@ -119,7 +119,7 @@ func openGroupEnvelope(g *bertytypes.Group, envelopeBytes []byte, devKS DeviceKe return nil, nil, nil, errcode.ErrGroupMemberLogEventOpen } - metadataEvent := &bertytypes.GroupMetadata{} + metadataEvent := &protocoltypes.GroupMetadata{} err = metadataEvent.Unmarshal(data) if err != nil { @@ -152,7 +152,7 @@ func openGroupEnvelope(g *bertytypes.Group, envelopeBytes []byte, devKS DeviceKe return metadataEvent, payload, attachmentsCIDs, nil } -func sealGroupEnvelope(g *bertytypes.Group, eventType bertytypes.EventType, payload proto.Marshaler, payloadSig []byte, attachmentsCIDs [][]byte, attachmentsSecrets [][]byte) ([]byte, error) { +func sealGroupEnvelope(g *protocoltypes.Group, eventType protocoltypes.EventType, payload proto.Marshaler, payloadSig []byte, attachmentsCIDs [][]byte, attachmentsSecrets [][]byte) ([]byte, error) { payloadBytes, err := payload.Marshal() if err != nil { return nil, errcode.TODO.Wrap(err) @@ -163,11 +163,11 @@ func sealGroupEnvelope(g *bertytypes.Group, eventType bertytypes.EventType, payl return nil, errcode.ErrCryptoNonceGeneration.Wrap(err) } - event := &bertytypes.GroupMetadata{ + event := &protocoltypes.GroupMetadata{ EventType: eventType, Payload: payloadBytes, Sig: payloadSig, - ProtocolMetadata: &bertytypes.ProtocolMetadata{AttachmentsSecrets: attachmentsSecrets}, + ProtocolMetadata: &protocoltypes.ProtocolMetadata{AttachmentsSecrets: attachmentsSecrets}, } eventClearBytes, err := event.Marshal() @@ -182,7 +182,7 @@ func sealGroupEnvelope(g *bertytypes.Group, eventType bertytypes.EventType, payl return nil, errcode.ErrCryptoEncrypt.Wrap(err) } - env := &bertytypes.GroupEnvelope{ + env := &protocoltypes.GroupEnvelope{ Event: eventBytes, Nonce: nonce[:], EncryptedAttachmentCIDs: eCIDs, diff --git a/go/pkg/bertyprotocol/events_sig_checkers.go b/go/pkg/bertyprotocol/events_sig_checkers.go index 3daa544e88..d774c4cecc 100644 --- a/go/pkg/bertyprotocol/events_sig_checkers.go +++ b/go/pkg/bertyprotocol/events_sig_checkers.go @@ -4,13 +4,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/libp2p/go-libp2p-core/crypto" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -type sigChecker func(g *bertytypes.Group, metadata *bertytypes.GroupMetadata, message proto.Message) error +type sigChecker func(g *protocoltypes.Group, metadata *protocoltypes.GroupMetadata, message proto.Message) error -func sigCheckerGroupSigned(g *bertytypes.Group, metadata *bertytypes.GroupMetadata, message proto.Message) error { +func sigCheckerGroupSigned(g *protocoltypes.Group, metadata *protocoltypes.GroupMetadata, message proto.Message) error { pk, err := g.GetPubKey() if err != nil { return err @@ -33,7 +33,7 @@ type eventDeviceSigned interface { GetDevicePK() []byte } -func sigCheckerDeviceSigned(g *bertytypes.Group, metadata *bertytypes.GroupMetadata, message proto.Message) error { +func sigCheckerDeviceSigned(g *protocoltypes.Group, metadata *protocoltypes.GroupMetadata, message proto.Message) error { msg, ok := message.(eventDeviceSigned) if !ok { return errcode.ErrDeserialization @@ -56,8 +56,8 @@ func sigCheckerDeviceSigned(g *bertytypes.Group, metadata *bertytypes.GroupMetad return nil } -func sigCheckerMemberDeviceAdded(g *bertytypes.Group, metadata *bertytypes.GroupMetadata, message proto.Message) error { - msg, ok := message.(*bertytypes.GroupAddMemberDevice) +func sigCheckerMemberDeviceAdded(g *protocoltypes.Group, metadata *protocoltypes.GroupMetadata, message proto.Message) error { + msg, ok := message.(*protocoltypes.GroupAddMemberDevice) if !ok { return errcode.ErrDeserialization } diff --git a/go/pkg/bertyprotocol/group.go b/go/pkg/bertyprotocol/group.go index e575038290..abb30a16b2 100644 --- a/go/pkg/bertyprotocol/group.go +++ b/go/pkg/bertyprotocol/group.go @@ -19,8 +19,8 @@ import ( "berty.tech/berty/v2/go/internal/cryptoutil" "berty.tech/berty/v2/go/internal/ipfsutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/go-orbit-db/stores" ) @@ -28,7 +28,7 @@ const CurrentGroupVersion = 1 // NewGroupMultiMember creates a new Group object and an invitation to be used by // the first member of the group -func NewGroupMultiMember() (*bertytypes.Group, crypto.PrivKey, error) { +func NewGroupMultiMember() (*protocoltypes.Group, crypto.PrivKey, error) { priv, pub, err := crypto.GenerateEd25519Key(crand.Reader) if err != nil { return nil, nil, errcode.ErrCryptoKeyGeneration.Wrap(err) @@ -54,11 +54,11 @@ func NewGroupMultiMember() (*bertytypes.Group, crypto.PrivKey, error) { return nil, nil, errcode.ErrCryptoSignature.Wrap(err) } - group := &bertytypes.Group{ + group := &protocoltypes.Group{ PublicKey: pubBytes, Secret: signingBytes, SecretSig: skSig, - GroupType: bertytypes.GroupTypeMultiMember, + GroupType: protocoltypes.GroupTypeMultiMember, } return group, priv, nil @@ -108,7 +108,7 @@ func getKeysForGroupOfContact(contactPairSK crypto.PrivKey) (crypto.PrivKey, cry return groupSK, groupSecretSK, nil } -func getGroupForContact(contactPairSK crypto.PrivKey) (*bertytypes.Group, error) { +func getGroupForContact(contactPairSK crypto.PrivKey) (*protocoltypes.Group, error) { groupSK, groupSecretSK, err := getKeysForGroupOfContact(contactPairSK) if err != nil { return nil, errcode.ErrCryptoKeyGeneration.Wrap(err) @@ -123,15 +123,15 @@ func getGroupForContact(contactPairSK crypto.PrivKey) (*bertytypes.Group, error) return nil, errcode.ErrSerialization.Wrap(err) } - return &bertytypes.Group{ + return &protocoltypes.Group{ PublicKey: pubBytes, Secret: signingBytes, SecretSig: nil, - GroupType: bertytypes.GroupTypeContact, + GroupType: protocoltypes.GroupTypeContact, }, nil } -func getGroupForAccount(priv, signing crypto.PrivKey) (*bertytypes.Group, error) { +func getGroupForAccount(priv, signing crypto.PrivKey) (*protocoltypes.Group, error) { pubBytes, err := priv.GetPublic().Raw() if err != nil { return nil, errcode.ErrSerialization.Wrap(err) @@ -142,16 +142,16 @@ func getGroupForAccount(priv, signing crypto.PrivKey) (*bertytypes.Group, error) return nil, errcode.ErrSerialization.Wrap(err) } - return &bertytypes.Group{ + return &protocoltypes.Group{ PublicKey: pubBytes, Secret: signingBytes, SecretSig: nil, - GroupType: bertytypes.GroupTypeAccount, + GroupType: protocoltypes.GroupTypeAccount, }, nil } -func metadataStoreListSecrets(ctx context.Context, gc *groupContext) map[crypto.PubKey]*bertytypes.DeviceSecret { - publishedSecrets := map[crypto.PubKey]*bertytypes.DeviceSecret{} +func metadataStoreListSecrets(ctx context.Context, gc *groupContext) map[crypto.PubKey]*protocoltypes.DeviceSecret { + publishedSecrets := map[crypto.PubKey]*protocoltypes.DeviceSecret{} m := gc.MetadataStore() ownSK := gc.getMemberPrivKey() @@ -189,12 +189,12 @@ func FillMessageKeysHolderUsingNewData(ctx context.Context, gc *groupContext) <- go func() { for evt := range sub { - e, ok := evt.(*bertytypes.GroupMetadataEvent) + e, ok := evt.(*protocoltypes.GroupMetadataEvent) if !ok { continue } - if e.Metadata.EventType != bertytypes.EventTypeGroupDeviceSecretAdded { + if e.Metadata.EventType != protocoltypes.EventTypeGroupDeviceSecretAdded { continue } @@ -373,7 +373,7 @@ func SendSecretsToExistingMembers(ctx context.Context, gctx *groupContext, conta members := gctx.MetadataStore().ListMembers() // Force sending secret to contact member in contact group - if gctx.group.GroupType == bertytypes.GroupTypeContact && len(members) < 2 && contact != nil { + if gctx.group.GroupType == protocoltypes.GroupTypeContact && len(members) < 2 && contact != nil { // Check if contact member is already listed found := false for _, member := range members { @@ -420,16 +420,16 @@ func WatchNewMembersAndSendSecrets(ctx context.Context, logger *zap.Logger, gctx go func() { for evt := range sub { - e, ok := evt.(*bertytypes.GroupMetadataEvent) + e, ok := evt.(*protocoltypes.GroupMetadataEvent) if !ok { continue } - if e.Metadata.EventType != bertytypes.EventTypeGroupMemberDeviceAdded { + if e.Metadata.EventType != protocoltypes.EventTypeGroupMemberDeviceAdded { continue } - event := &bertytypes.GroupAddMemberDevice{} + event := &protocoltypes.GroupAddMemberDevice{} if err := event.Unmarshal(e.Event); err != nil { logger.Error("unable to unmarshal payload", zap.Error(err)) continue @@ -456,12 +456,12 @@ func WatchNewMembersAndSendSecrets(ctx context.Context, logger *zap.Logger, gctx return ch } -func openDeviceSecret(m *bertytypes.GroupMetadata, localMemberPrivateKey crypto.PrivKey, group *bertytypes.Group) (crypto.PubKey, *bertytypes.DeviceSecret, error) { - if m == nil || m.EventType != bertytypes.EventTypeGroupDeviceSecretAdded { +func openDeviceSecret(m *protocoltypes.GroupMetadata, localMemberPrivateKey crypto.PrivKey, group *protocoltypes.Group) (crypto.PubKey, *protocoltypes.DeviceSecret, error) { + if m == nil || m.EventType != protocoltypes.EventTypeGroupDeviceSecretAdded { return nil, nil, errcode.ErrInvalidInput } - s := &bertytypes.GroupAddDeviceSecret{} + s := &protocoltypes.GroupAddDeviceSecret{} if err := s.Unmarshal(m.Payload); err != nil { return nil, nil, errcode.ErrDeserialization.Wrap(err) } @@ -486,7 +486,7 @@ func openDeviceSecret(m *bertytypes.GroupMetadata, localMemberPrivateKey crypto. } nonce := groupIDToNonce(group) - decryptedSecret := &bertytypes.DeviceSecret{} + decryptedSecret := &protocoltypes.DeviceSecret{} decryptedMessage, ok := box.Open(nil, s.Payload, nonce, mongPub, mongPriv) if !ok { return nil, nil, errcode.ErrCryptoDecrypt @@ -500,7 +500,7 @@ func openDeviceSecret(m *bertytypes.GroupMetadata, localMemberPrivateKey crypto. return senderDevicePubKey, decryptedSecret, nil } -func groupIDToNonce(group *bertytypes.Group) *[cryptoutil.NonceSize]byte { +func groupIDToNonce(group *protocoltypes.Group) *[cryptoutil.NonceSize]byte { // Nonce doesn't need to be secret, random nor unpredictable, it just needs // to be used only once for a given {sender, receiver} set and we will send // only one SecretEntryPayload per {localDevicePrivKey, remoteMemberPubKey} diff --git a/go/pkg/bertyprotocol/group_context.go b/go/pkg/bertyprotocol/group_context.go index 1d1f8c5a3a..ad44ffebe7 100644 --- a/go/pkg/bertyprotocol/group_context.go +++ b/go/pkg/bertyprotocol/group_context.go @@ -7,11 +7,11 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type groupContext struct { - group *bertytypes.Group + group *protocoltypes.Group metadataStore *metadataStore messageStore *messageStore messageKeystore *messageKeystore @@ -35,7 +35,7 @@ func (gc *groupContext) MetadataStore() *metadataStore { return gc.metadataStore } -func (gc *groupContext) Group() *bertytypes.Group { +func (gc *groupContext) Group() *protocoltypes.Group { return gc.group } @@ -54,7 +54,7 @@ func (gc *groupContext) Close() error { return nil } -func newContextGroup(group *bertytypes.Group, metadataStore *metadataStore, messageStore *messageStore, messageKeystore *messageKeystore, memberDevice *ownMemberDevice, logger *zap.Logger) *groupContext { +func newContextGroup(group *protocoltypes.Group, metadataStore *metadataStore, messageStore *messageStore, messageKeystore *messageKeystore, memberDevice *ownMemberDevice, logger *zap.Logger) *groupContext { if logger == nil { logger = zap.NewNop() } diff --git a/go/pkg/bertyprotocol/group_test.go b/go/pkg/bertyprotocol/group_test.go index 0259d3b21f..bb8e704208 100644 --- a/go/pkg/bertyprotocol/group_test.go +++ b/go/pkg/bertyprotocol/group_test.go @@ -7,7 +7,7 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" "github.com/stretchr/testify/require" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestGetGroupForContact(t *testing.T) { @@ -17,7 +17,7 @@ func TestGetGroupForContact(t *testing.T) { g, err := getGroupForContact(sk) require.NoError(t, err) - require.Equal(t, g.GroupType, bertytypes.GroupTypeContact) + require.Equal(t, g.GroupType, protocoltypes.GroupTypeContact) require.Equal(t, len(g.PublicKey), 32) require.Equal(t, len(g.Secret), 32) } diff --git a/go/pkg/bertyprotocol/iface_account.go b/go/pkg/bertyprotocol/iface_account.go index 0bd502d62e..3fa00526ae 100644 --- a/go/pkg/bertyprotocol/iface_account.go +++ b/go/pkg/bertyprotocol/iface_account.go @@ -7,8 +7,8 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type AccountKeys interface { @@ -16,7 +16,7 @@ type AccountKeys interface { AccountProofPrivKey() (crypto.PrivKey, error) DevicePrivKey() (crypto.PrivKey, error) ContactGroupPrivKey(pk crypto.PubKey) (crypto.PrivKey, error) - MemberDeviceForGroup(g *bertytypes.Group) (*OwnMemberDevice, error) + MemberDeviceForGroup(g *protocoltypes.Group) (*OwnMemberDevice, error) } // OwnMemberDevice is own local device part of a group @@ -36,10 +36,10 @@ func (d *OwnMemberDevice) Public() *MemberDevice { type MemberDevice struct { Member crypto.PubKey Device crypto.PubKey - Secret *bertytypes.DeviceSecret + Secret *protocoltypes.DeviceSecret } -func NewDeviceSecret() (*bertytypes.DeviceSecret, error) { +func NewDeviceSecret() (*protocoltypes.DeviceSecret, error) { counter, err := crand.Int(crand.Reader, big.NewInt(0).SetUint64(math.MaxUint64)) if err != nil { return nil, errcode.ErrCryptoRandomGeneration.Wrap(err) @@ -51,7 +51,7 @@ func NewDeviceSecret() (*bertytypes.DeviceSecret, error) { return nil, errcode.ErrCryptoRandomGeneration.Wrap(err) } - return &bertytypes.DeviceSecret{ + return &protocoltypes.DeviceSecret{ ChainKey: chainKey, Counter: counter.Uint64(), }, nil diff --git a/go/pkg/bertyprotocol/keystore_device.go b/go/pkg/bertyprotocol/keystore_device.go index a81ae76043..cacb0598cf 100644 --- a/go/pkg/bertyprotocol/keystore_device.go +++ b/go/pkg/bertyprotocol/keystore_device.go @@ -16,8 +16,8 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" "berty.tech/berty/v2/go/internal/cryptoutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type DeviceKeystore interface { @@ -25,7 +25,7 @@ type DeviceKeystore interface { AccountProofPrivKey() (crypto.PrivKey, error) DevicePrivKey() (crypto.PrivKey, error) ContactGroupPrivKey(pk crypto.PubKey) (crypto.PrivKey, error) - MemberDeviceForGroup(g *bertytypes.Group) (*ownMemberDevice, error) + MemberDeviceForGroup(g *protocoltypes.Group) (*ownMemberDevice, error) RestoreAccountKeys(accountKey crypto.PrivKey, accountProofKey crypto.PrivKey) error AttachmentPrivKey(cid []byte) (crypto.PrivKey, error) @@ -102,14 +102,14 @@ func (a *deviceKeystore) memberDeviceForMultiMemberGroup(groupPK crypto.PubKey) }, nil } -func (a *deviceKeystore) MemberDeviceForGroup(g *bertytypes.Group) (*ownMemberDevice, error) { +func (a *deviceKeystore) MemberDeviceForGroup(g *protocoltypes.Group) (*ownMemberDevice, error) { pk, err := g.GetPubKey() if err != nil { return nil, errcode.ErrInvalidInput.Wrap(err) } switch g.GroupType { - case bertytypes.GroupTypeAccount, bertytypes.GroupTypeContact: + case protocoltypes.GroupTypeAccount, protocoltypes.GroupTypeContact: memberSK, err := a.AccountPrivKey() if err != nil { return nil, err @@ -125,7 +125,7 @@ func (a *deviceKeystore) MemberDeviceForGroup(g *bertytypes.Group) (*ownMemberDe device: deviceSK, }, nil - case bertytypes.GroupTypeMultiMember: + case protocoltypes.GroupTypeMultiMember: return a.memberDeviceForMultiMemberGroup(pk) } @@ -360,7 +360,7 @@ type memberDevice struct { device crypto.PubKey } -func newDeviceSecret() (*bertytypes.DeviceSecret, error) { +func newDeviceSecret() (*protocoltypes.DeviceSecret, error) { counter, err := crand.Int(crand.Reader, big.NewInt(0).SetUint64(math.MaxUint64)) if err != nil { return nil, errcode.ErrCryptoRandomGeneration.Wrap(err) @@ -372,7 +372,7 @@ func newDeviceSecret() (*bertytypes.DeviceSecret, error) { return nil, errcode.ErrCryptoRandomGeneration.Wrap(err) } - return &bertytypes.DeviceSecret{ + return &protocoltypes.DeviceSecret{ ChainKey: chainKey, Counter: counter.Uint64(), }, nil diff --git a/go/pkg/bertyprotocol/keystore_message.go b/go/pkg/bertyprotocol/keystore_message.go index e54db048a0..9cd47d2162 100644 --- a/go/pkg/bertyprotocol/keystore_message.go +++ b/go/pkg/bertyprotocol/keystore_message.go @@ -12,8 +12,8 @@ import ( "golang.org/x/crypto/nacl/secretbox" "berty.tech/berty/v2/go/internal/cryptoutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type messageKeystore struct { @@ -28,7 +28,7 @@ type decryptInfo struct { Cid cid.Cid } -func (m *messageKeystore) getDeviceChainKey(groupPK, pk crypto.PubKey) (*bertytypes.DeviceSecret, error) { +func (m *messageKeystore) getDeviceChainKey(groupPK, pk crypto.PubKey) (*protocoltypes.DeviceSecret, error) { if m == nil { return nil, errcode.ErrInvalidInput } @@ -53,7 +53,7 @@ func (m *messageKeystore) getDeviceChainKey(groupPK, pk crypto.PubKey) (*bertyty return nil, errcode.ErrMessageKeyPersistenceGet.Wrap(err) } - ds := &bertytypes.DeviceSecret{} + ds := &protocoltypes.DeviceSecret{} if err := ds.Unmarshal(dsBytes); err != nil { return nil, errcode.ErrInvalidInput } @@ -84,7 +84,7 @@ func (m *messageKeystore) delPrecomputedKey(groupPK, device crypto.PubKey, count return nil } -func (m *messageKeystore) postDecryptActions(di *decryptInfo, g *bertytypes.Group, ownPK crypto.PubKey, headers *bertytypes.MessageHeaders) error { +func (m *messageKeystore) postDecryptActions(di *decryptInfo, g *protocoltypes.Group, ownPK crypto.PubKey, headers *protocoltypes.MessageHeaders) error { if m == nil { return errcode.ErrInvalidInput } @@ -96,7 +96,7 @@ func (m *messageKeystore) postDecryptActions(di *decryptInfo, g *bertytypes.Grou } var ( - ds *bertytypes.DeviceSecret + ds *protocoltypes.DeviceSecret err error ) @@ -137,7 +137,7 @@ func (m *messageKeystore) postDecryptActions(di *decryptInfo, g *bertytypes.Grou return nil } -func (m *messageKeystore) GetDeviceSecret(g *bertytypes.Group, acc DeviceKeystore) (*bertytypes.DeviceSecret, error) { +func (m *messageKeystore) GetDeviceSecret(g *protocoltypes.Group, acc DeviceKeystore) (*protocoltypes.DeviceSecret, error) { if m == nil { return nil, errcode.ErrInvalidInput } @@ -177,7 +177,7 @@ func (m *messageKeystore) GetDeviceSecret(g *bertytypes.Group, acc DeviceKeystor return ds, nil } -func (m *messageKeystore) RegisterChainKey(g *bertytypes.Group, devicePK crypto.PubKey, ds *bertytypes.DeviceSecret, isOwnPK bool) error { +func (m *messageKeystore) RegisterChainKey(g *protocoltypes.Group, devicePK crypto.PubKey, ds *protocoltypes.DeviceSecret, isOwnPK bool) error { if m == nil { return errcode.ErrInvalidInput } @@ -188,7 +188,7 @@ func (m *messageKeystore) RegisterChainKey(g *bertytypes.Group, devicePK crypto. return m.registerChainKey(g, devicePK, ds, isOwnPK) } -func (m *messageKeystore) registerChainKey(g *bertytypes.Group, devicePK crypto.PubKey, ds *bertytypes.DeviceSecret, isOwnPK bool) error { +func (m *messageKeystore) registerChainKey(g *protocoltypes.Group, devicePK crypto.PubKey, ds *protocoltypes.DeviceSecret, isOwnPK bool) error { if m == nil { return errcode.ErrInvalidInput } @@ -223,7 +223,7 @@ func (m *messageKeystore) registerChainKey(g *bertytypes.Group, devicePK crypto. return nil } -func (m *messageKeystore) preComputeKeys(device crypto.PubKey, g *bertytypes.Group, ds *bertytypes.DeviceSecret) (*bertytypes.DeviceSecret, error) { +func (m *messageKeystore) preComputeKeys(device crypto.PubKey, g *protocoltypes.Group, ds *protocoltypes.DeviceSecret) (*protocoltypes.DeviceSecret, error) { if m == nil { return nil, errcode.ErrInvalidInput } @@ -269,7 +269,7 @@ func (m *messageKeystore) preComputeKeys(device crypto.PubKey, g *bertytypes.Gro ck = newCK } - return &bertytypes.DeviceSecret{ + return &protocoltypes.DeviceSecret{ Counter: counter, ChainKey: ck, }, nil @@ -350,7 +350,7 @@ func (m *messageKeystore) putKeyForCID(id cid.Cid, key *[32]byte) error { return nil } -func (m *messageKeystore) OpenEnvelope(ctx context.Context, g *bertytypes.Group, ownPK crypto.PubKey, data []byte, id cid.Cid) (*bertytypes.MessageHeaders, *bertytypes.EncryptedMessage, [][]byte, error) { +func (m *messageKeystore) OpenEnvelope(ctx context.Context, g *protocoltypes.Group, ownPK crypto.PubKey, data []byte, id cid.Cid) (*protocoltypes.MessageHeaders, *protocoltypes.EncryptedMessage, [][]byte, error) { if m == nil || g == nil { return nil, nil, nil, errcode.ErrInvalidInput } @@ -377,7 +377,7 @@ func (m *messageKeystore) OpenEnvelope(ctx context.Context, g *bertytypes.Group, return nil, nil, nil, errcode.TODO.Wrap(err) } - var msg bertytypes.EncryptedMessage + var msg protocoltypes.EncryptedMessage err = msg.Unmarshal(msgBytes) if err != nil { return nil, nil, nil, errcode.ErrDeserialization.Wrap(err) @@ -391,7 +391,7 @@ func (m *messageKeystore) OpenEnvelope(ctx context.Context, g *bertytypes.Group, return headers, &msg, attachmentsCIDs, nil } -func (m *messageKeystore) openPayload(id cid.Cid, groupPK crypto.PubKey, payload []byte, headers *bertytypes.MessageHeaders) ([]byte, *decryptInfo, error) { +func (m *messageKeystore) openPayload(id cid.Cid, groupPK crypto.PubKey, payload []byte, headers *protocoltypes.MessageHeaders) ([]byte, *decryptInfo, error) { if m == nil { return nil, nil, errcode.ErrInvalidInput } @@ -458,7 +458,7 @@ func (m *messageKeystore) getPrecomputedKeyExpectedCount() int { return m.preComputedKeysCount } -func (m *messageKeystore) putDeviceChainKey(groupPK, device crypto.PubKey, ds *bertytypes.DeviceSecret) error { +func (m *messageKeystore) putDeviceChainKey(groupPK, device crypto.PubKey, ds *protocoltypes.DeviceSecret) error { if m == nil { return errcode.ErrInvalidInput } @@ -488,7 +488,7 @@ func (m *messageKeystore) putDeviceChainKey(groupPK, device crypto.PubKey, ds *b return nil } -func (m *messageKeystore) SealEnvelope(ctx context.Context, g *bertytypes.Group, deviceSK crypto.PrivKey, payload []byte, attachmentsCIDs [][]byte) ([]byte, error) { +func (m *messageKeystore) SealEnvelope(ctx context.Context, g *protocoltypes.Group, deviceSK crypto.PrivKey, payload []byte, attachmentsCIDs [][]byte) ([]byte, error) { if m == nil { return nil, errcode.ErrInvalidInput } @@ -522,7 +522,7 @@ func (m *messageKeystore) SealEnvelope(ctx context.Context, g *bertytypes.Group, return env, nil } -func (m *messageKeystore) deriveDeviceSecret(g *bertytypes.Group, deviceSK crypto.PrivKey) error { +func (m *messageKeystore) deriveDeviceSecret(g *protocoltypes.Group, deviceSK crypto.PrivKey) error { if m == nil { return errcode.ErrInvalidInput } @@ -546,7 +546,7 @@ func (m *messageKeystore) deriveDeviceSecret(g *bertytypes.Group, deviceSK crypt return errcode.ErrCryptoKeyGeneration.Wrap(err) } - if err = m.putDeviceChainKey(groupPK, deviceSK.GetPublic(), &bertytypes.DeviceSecret{ + if err = m.putDeviceChainKey(groupPK, deviceSK.GetPublic(), &protocoltypes.DeviceSecret{ ChainKey: ck, Counter: ds.Counter + 1, }); err != nil { @@ -560,7 +560,7 @@ func (m *messageKeystore) deriveDeviceSecret(g *bertytypes.Group, deviceSK crypt return nil } -func (m *messageKeystore) updateCurrentKey(groupPK, pk crypto.PubKey, ds *bertytypes.DeviceSecret) error { +func (m *messageKeystore) updateCurrentKey(groupPK, pk crypto.PubKey, ds *protocoltypes.DeviceSecret) error { if m == nil { return errcode.ErrInvalidInput } diff --git a/go/pkg/bertyprotocol/keystore_message_utils.go b/go/pkg/bertyprotocol/keystore_message_utils.go index 60fd22bbc8..fa42db91d8 100644 --- a/go/pkg/bertyprotocol/keystore_message_utils.go +++ b/go/pkg/bertyprotocol/keystore_message_utils.go @@ -18,11 +18,11 @@ import ( "berty.tech/berty/v2/go/internal/cryptoutil" "berty.tech/berty/v2/go/internal/tracer" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func sealPayload(payload []byte, ds *bertytypes.DeviceSecret, deviceSK crypto.PrivKey, g *bertytypes.Group) ([]byte, []byte, error) { +func sealPayload(payload []byte, ds *protocoltypes.DeviceSecret, deviceSK crypto.PrivKey, g *protocoltypes.Group) ([]byte, []byte, error) { var ( msgKey [32]byte err error @@ -40,7 +40,7 @@ func sealPayload(payload []byte, ds *bertytypes.DeviceSecret, deviceSK crypto.Pr return secretbox.Seal(nil, payload, uint64AsNonce(ds.Counter+1), &msgKey), sig, nil } -func sealEnvelopeInternal(ctx context.Context, payload []byte, ds *bertytypes.DeviceSecret, deviceSK crypto.PrivKey, g *bertytypes.Group, attachmentsCIDs [][]byte) ([]byte, error) { +func sealEnvelopeInternal(ctx context.Context, payload []byte, ds *protocoltypes.DeviceSecret, deviceSK crypto.PrivKey, g *protocoltypes.Group, attachmentsCIDs [][]byte) ([]byte, error) { encryptedPayload, sig, err := sealPayload(payload, ds, deviceSK, g) if err != nil { return nil, errcode.ErrCryptoEncrypt.Wrap(err) @@ -51,7 +51,7 @@ func sealEnvelopeInternal(ctx context.Context, payload []byte, ds *bertytypes.De return nil, errcode.ErrSerialization.Wrap(err) } - h := &bertytypes.MessageHeaders{ + h := &protocoltypes.MessageHeaders{ Counter: ds.Counter + 1, DevicePK: devicePKRaw, Sig: sig, @@ -76,7 +76,7 @@ func sealEnvelopeInternal(ctx context.Context, payload []byte, ds *bertytypes.De return nil, errcode.ErrCryptoEncrypt.Wrap(err) } - env, err := proto.Marshal(&bertytypes.MessageEnvelope{ + env, err := proto.Marshal(&protocoltypes.MessageEnvelope{ MessageHeaders: encryptedHeaders, Message: encryptedPayload, Nonce: nonce[:], @@ -89,8 +89,8 @@ func sealEnvelopeInternal(ctx context.Context, payload []byte, ds *bertytypes.De return env, nil } -func openEnvelopeHeaders(data []byte, g *bertytypes.Group) (*bertytypes.MessageEnvelope, *bertytypes.MessageHeaders, error) { - env := &bertytypes.MessageEnvelope{} +func openEnvelopeHeaders(data []byte, g *protocoltypes.Group) (*protocoltypes.MessageEnvelope, *protocoltypes.MessageHeaders, error) { + env := &protocoltypes.MessageEnvelope{} err := env.Unmarshal(data) if err != nil { return nil, nil, errcode.ErrDeserialization.Wrap(err) @@ -106,7 +106,7 @@ func openEnvelopeHeaders(data []byte, g *bertytypes.Group) (*bertytypes.MessageE return nil, nil, errcode.ErrCryptoDecrypt.Wrap(fmt.Errorf("secretbox failed to open headers")) } - headers := &bertytypes.MessageHeaders{} + headers := &protocoltypes.MessageHeaders{} if err := headers.Unmarshal(headersBytes); err != nil { return nil, nil, errcode.ErrDeserialization.Wrap(err) } diff --git a/go/pkg/bertyprotocol/keystore_message_utils_test.go b/go/pkg/bertyprotocol/keystore_message_utils_test.go index 31235c0885..d79713264c 100644 --- a/go/pkg/bertyprotocol/keystore_message_utils_test.go +++ b/go/pkg/bertyprotocol/keystore_message_utils_test.go @@ -15,10 +15,10 @@ import ( "github.com/stretchr/testify/require" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func addDummyMemberInMetadataStore(ctx context.Context, t testing.TB, ms *metadataStore, g *bertytypes.Group, memberPK crypto.PubKey, join bool) (crypto.PubKey, *bertytypes.DeviceSecret) { +func addDummyMemberInMetadataStore(ctx context.Context, t testing.TB, ms *metadataStore, g *protocoltypes.Group, memberPK crypto.PubKey, join bool) (crypto.PubKey, *protocoltypes.DeviceSecret) { t.Helper() acc := NewDeviceKeystore(keystore.NewMemKeystore()) @@ -39,8 +39,8 @@ func addDummyMemberInMetadataStore(ctx context.Context, t testing.TB, ms *metada return md.device.GetPublic(), ds } -func mustDeviceSecret(t testing.TB) func(ds *bertytypes.DeviceSecret, err error) *bertytypes.DeviceSecret { - return func(ds *bertytypes.DeviceSecret, err error) *bertytypes.DeviceSecret { +func mustDeviceSecret(t testing.TB) func(ds *protocoltypes.DeviceSecret, err error) *protocoltypes.DeviceSecret { + return func(ds *protocoltypes.DeviceSecret, err error) *protocoltypes.DeviceSecret { t.Helper() if err != nil { @@ -51,7 +51,7 @@ func mustDeviceSecret(t testing.TB) func(ds *bertytypes.DeviceSecret, err error) } } -func mustMessageHeaders(t testing.TB, pk crypto.PubKey, counter uint64) *bertytypes.MessageHeaders { +func mustMessageHeaders(t testing.TB, pk crypto.PubKey, counter uint64) *protocoltypes.MessageHeaders { t.Helper() pkB, err := pk.Raw() @@ -59,7 +59,7 @@ func mustMessageHeaders(t testing.TB, pk crypto.PubKey, counter uint64) *bertyty t.Fatal(err) } - return &bertytypes.MessageHeaders{ + return &protocoltypes.MessageHeaders{ Counter: counter, DevicePK: pkB, Sig: nil, @@ -284,7 +284,7 @@ func Test_EncryptMessageEnvelope(t *testing.T) { ds2, err := newDeviceSecret() assert.NoError(t, err) - payloadRef1, err := (&bertytypes.EncryptedMessage{Plaintext: []byte("Test payload 1")}).Marshal() + payloadRef1, err := (&protocoltypes.EncryptedMessage{Plaintext: []byte("Test payload 1")}).Marshal() assert.NoError(t, err) err = mkh2.RegisterChainKey(g, omd2.device.GetPublic(), ds2, true) @@ -352,7 +352,7 @@ func Test_EncryptMessageEnvelopeAndDerive(t *testing.T) { initialCounter := ds1.Counter for i := 0; i < 1000; i++ { - payloadRef, err := (&bertytypes.EncryptedMessage{Plaintext: []byte("Test payload 1")}).Marshal() + payloadRef, err := (&protocoltypes.EncryptedMessage{Plaintext: []byte("Test payload 1")}).Marshal() assert.NoError(t, err) envEncrypted, err := mkh1.SealEnvelope(ctx, g, omd1.device, payloadRef, nil) assert.NoError(t, err) @@ -403,7 +403,7 @@ func testMessageKeyHolderCatchUp(t *testing.T, expectedNewDevices int, isSlow bo ms1 := peer.GC.MetadataStore() devicesPK := make([]crypto.PubKey, expectedNewDevices) - deviceSecrets := make([]*bertytypes.DeviceSecret, expectedNewDevices) + deviceSecrets := make([]*protocoltypes.DeviceSecret, expectedNewDevices) for i := 0; i < expectedNewDevices; i++ { devicesPK[i], deviceSecrets[i] = addDummyMemberInMetadataStore(ctx, t, ms1, peer.GC.Group(), peer.GC.MemberPubKey(), true) @@ -464,7 +464,7 @@ func testMessageKeyHolderSubscription(t *testing.T, expectedNewDevices int, isSl ms1 := peer.GC.MetadataStore() devicesPK := make([]crypto.PubKey, expectedNewDevices) - deviceSecrets := make([]*bertytypes.DeviceSecret, expectedNewDevices) + deviceSecrets := make([]*protocoltypes.DeviceSecret, expectedNewDevices) subCtx, subCancel := context.WithCancel(ctx) ch := FillMessageKeysHolderUsingNewData(subCtx, peer.GC) diff --git a/go/pkg/bertyprotocol/orbitdb.go b/go/pkg/bertyprotocol/orbitdb.go index 63ef259ed6..cf6e871030 100644 --- a/go/pkg/bertyprotocol/orbitdb.go +++ b/go/pkg/bertyprotocol/orbitdb.go @@ -15,8 +15,8 @@ import ( "go.uber.org/zap" "berty.tech/berty/v2/go/internal/ipfsutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/go-ipfs-log/identityprovider" orbitdb "berty.tech/go-orbit-db" "berty.tech/go-orbit-db/baseorbitdb" @@ -75,7 +75,7 @@ func (n *NewOrbitDBOptions) applyDefaults() { type BertyOrbitDB struct { baseorbitdb.BaseOrbitDB - groups sync.Map // map[string]*bertytypes.Group + groups sync.Map // map[string]*protocoltypes.Group groupContexts sync.Map // map[string]*groupContext groupsSigPubKey sync.Map // map[string]crypto.PubKey keyStore *BertySignedKeyStore @@ -83,7 +83,7 @@ type BertyOrbitDB struct { deviceKeystore DeviceKeystore } -func (s *BertyOrbitDB) registerGroupPrivateKey(g *bertytypes.Group) error { +func (s *BertyOrbitDB) registerGroupPrivateKey(g *protocoltypes.Group) error { groupID := g.GroupIDAsString() gSigSK, err := g.GetSigningPrivKey() @@ -102,7 +102,7 @@ func (s *BertyOrbitDB) registerGroupPrivateKey(g *bertytypes.Group) error { return nil } -func (s *BertyOrbitDB) registerGroupSigningPubKey(g *bertytypes.Group) error { +func (s *BertyOrbitDB) registerGroupSigningPubKey(g *protocoltypes.Group) error { groupID := g.GroupIDAsString() var gSigPK crypto.PubKey @@ -189,7 +189,7 @@ func (s *BertyOrbitDB) openAccountGroup(ctx context.Context, options *orbitdb.Cr return gc, nil } -func (s *BertyOrbitDB) setHeadsForGroup(ctx context.Context, g *bertytypes.Group, metaHeads, messageHeads []cid.Cid) error { +func (s *BertyOrbitDB) setHeadsForGroup(ctx context.Context, g *protocoltypes.Group, metaHeads, messageHeads []cid.Cid) error { id := g.GroupIDAsString() var ( @@ -249,7 +249,7 @@ func (s *BertyOrbitDB) setHeadsForGroup(ctx context.Context, g *bertytypes.Group return nil } -func (s *BertyOrbitDB) openGroup(ctx context.Context, g *bertytypes.Group, options *orbitdb.CreateDBOptions) (*groupContext, error) { +func (s *BertyOrbitDB) openGroup(ctx context.Context, g *protocoltypes.Group, options *orbitdb.CreateDBOptions) (*groupContext, error) { if s.deviceKeystore == nil || s.messageKeystore == nil { return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("db open in naive mode")) } @@ -299,7 +299,7 @@ func (s *BertyOrbitDB) openGroup(ctx context.Context, g *bertytypes.Group, optio return gc, nil } -func (s *BertyOrbitDB) openGroupReplication(ctx context.Context, g *bertytypes.Group, options *orbitdb.CreateDBOptions) error { +func (s *BertyOrbitDB) openGroupReplication(ctx context.Context, g *protocoltypes.Group, options *orbitdb.CreateDBOptions) error { if g == nil || len(g.PublicKey) == 0 { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("missing group or group pubkey")) } @@ -355,7 +355,7 @@ func (s *BertyOrbitDB) SetGroupSigPubKey(groupID string, pubKey crypto.PubKey) e return nil } -func (s *BertyOrbitDB) storeForGroup(ctx context.Context, o iface.BaseOrbitDB, g *bertytypes.Group, options *orbitdb.CreateDBOptions, storeType string, groupOpenMode GroupOpenMode) (iface.Store, error) { +func (s *BertyOrbitDB) storeForGroup(ctx context.Context, o iface.BaseOrbitDB, g *protocoltypes.Group, options *orbitdb.CreateDBOptions, storeType string, groupOpenMode GroupOpenMode) (iface.Store, error) { options, err := DefaultOrbitDBOptions(g, options, s.keyStore, storeType, groupOpenMode) if err != nil { return nil, err @@ -373,7 +373,7 @@ func (s *BertyOrbitDB) storeForGroup(ctx context.Context, o iface.BaseOrbitDB, g return store, nil } -func (s *BertyOrbitDB) groupMetadataStore(ctx context.Context, g *bertytypes.Group, options *orbitdb.CreateDBOptions) (*metadataStore, error) { +func (s *BertyOrbitDB) groupMetadataStore(ctx context.Context, g *protocoltypes.Group, options *orbitdb.CreateDBOptions) (*metadataStore, error) { store, err := s.storeForGroup(ctx, s, g, options, groupMetadataStoreType, GroupOpenModeWrite) if err != nil { return nil, errors.Wrap(err, "unable to open database") @@ -387,7 +387,7 @@ func (s *BertyOrbitDB) groupMetadataStore(ctx context.Context, g *bertytypes.Gro return sStore, nil } -func (s *BertyOrbitDB) groupMessageStore(ctx context.Context, g *bertytypes.Group, options *orbitdb.CreateDBOptions) (*messageStore, error) { +func (s *BertyOrbitDB) groupMessageStore(ctx context.Context, g *protocoltypes.Group, options *orbitdb.CreateDBOptions) (*messageStore, error) { store, err := s.storeForGroup(ctx, s, g, options, groupMessageStoreType, GroupOpenModeWrite) if err != nil { return nil, errors.Wrap(err, "unable to open database") @@ -401,7 +401,7 @@ func (s *BertyOrbitDB) groupMessageStore(ctx context.Context, g *bertytypes.Grou return mStore, nil } -func (s *BertyOrbitDB) getGroupFromOptions(options *iface.NewStoreOptions) (*bertytypes.Group, error) { +func (s *BertyOrbitDB) getGroupFromOptions(options *iface.NewStoreOptions) (*protocoltypes.Group, error) { groupIDs, err := options.AccessController.GetAuthorizedByRole(identityGroupIDKey) if err != nil { return nil, errcode.TODO.Wrap(err) @@ -416,7 +416,7 @@ func (s *BertyOrbitDB) getGroupFromOptions(options *iface.NewStoreOptions) (*ber return nil, errcode.ErrInvalidInput } - typed, ok := g.(*bertytypes.Group) + typed, ok := g.(*protocoltypes.Group) if !ok { return nil, errcode.ErrInvalidInput } diff --git a/go/pkg/bertyprotocol/orbitdb_many_adds_berty_test.go b/go/pkg/bertyprotocol/orbitdb_many_adds_berty_test.go index b036e6d088..76f15bcc29 100644 --- a/go/pkg/bertyprotocol/orbitdb_many_adds_berty_test.go +++ b/go/pkg/bertyprotocol/orbitdb_many_adds_berty_test.go @@ -18,10 +18,10 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) -func testAddBerty(ctx context.Context, t *testing.T, node ipfsutil.CoreAPIMock, g *bertytypes.Group, pathBase string, amountToAdd, amountCurrentlyPresent int) { +func testAddBerty(ctx context.Context, t *testing.T, node ipfsutil.CoreAPIMock, g *protocoltypes.Group, pathBase string, amountToAdd, amountCurrentlyPresent int) { t.Helper() testutil.FilterSpeed(t, testutil.Slow) @@ -91,7 +91,7 @@ func testAddBerty(ctx context.Context, t *testing.T, node ipfsutil.CoreAPIMock, // Watch for incoming new messages go func() { for e := range gc.MessageStore().Subscribe(ctx) { - _, ok := e.(*bertytypes.GroupMessageEvent) + _, ok := e.(*protocoltypes.GroupMessageEvent) if !ok { continue } diff --git a/go/pkg/bertyprotocol/orbitdb_many_adds_test.go b/go/pkg/bertyprotocol/orbitdb_many_adds_test.go index 5f4a1eda73..fefaafd8f7 100644 --- a/go/pkg/bertyprotocol/orbitdb_many_adds_test.go +++ b/go/pkg/bertyprotocol/orbitdb_many_adds_test.go @@ -11,7 +11,7 @@ import ( "berty.tech/berty/v2/go/internal/cryptoutil" "berty.tech/berty/v2/go/internal/ipfsutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" orbitdb "berty.tech/go-orbit-db" ) @@ -58,7 +58,7 @@ func TestAdd(t *testing.T) { t.Fatal(err) } - g := &bertytypes.Group{PublicKey: pubkB, Secret: sigkB} + g := &protocoltypes.Group{PublicKey: pubkB, Secret: sigkB} opts, err := DefaultOrbitDBOptions(g, &orbitdb.CreateDBOptions{}, ks, "log", GroupOpenModeWrite) if err != nil { t.Fatal(err) diff --git a/go/pkg/bertyprotocol/orbitdb_test.go b/go/pkg/bertyprotocol/orbitdb_test.go index d5fec016fc..0ebcd55430 100644 --- a/go/pkg/bertyprotocol/orbitdb_test.go +++ b/go/pkg/bertyprotocol/orbitdb_test.go @@ -18,7 +18,7 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" orbitdb "berty.tech/go-orbit-db" "berty.tech/go-orbit-db/pubsub/pubsubraw" ) @@ -196,21 +196,21 @@ func TestDifferentStores(t *testing.T) { assert.Equal(t, 4, len(ops4)) } -func testFilterAppMetadata(t *testing.T, events <-chan *bertytypes.GroupMetadataEvent) []*bertytypes.AppMetadata { +func testFilterAppMetadata(t *testing.T, events <-chan *protocoltypes.GroupMetadataEvent) []*protocoltypes.AppMetadata { t.Helper() - out := []*bertytypes.AppMetadata(nil) + out := []*protocoltypes.AppMetadata(nil) for evt := range events { if evt == nil { continue } - if evt.Metadata.EventType != bertytypes.EventTypeGroupMetadataPayloadSent { + if evt.Metadata.EventType != protocoltypes.EventTypeGroupMetadataPayloadSent { continue } - m := &bertytypes.AppMetadata{} + m := &protocoltypes.AppMetadata{} if err := m.Unmarshal(evt.Event); err != nil { continue } diff --git a/go/pkg/bertyprotocol/orbitdb_utils_test.go b/go/pkg/bertyprotocol/orbitdb_utils_test.go index 21c15bea5c..0c265a62b0 100644 --- a/go/pkg/bertyprotocol/orbitdb_utils_test.go +++ b/go/pkg/bertyprotocol/orbitdb_utils_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" "berty.tech/berty/v2/go/internal/ipfsutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type mockedPeer struct { @@ -177,13 +177,13 @@ func inviteAllPeersToGroup(ctx context.Context, t *testing.T, peers []*mockedPee for e := range p.GC.MetadataStore().Subscribe(ctx) { switch e.(type) { - case *bertytypes.GroupMetadataEvent: - casted, _ := e.(*bertytypes.GroupMetadataEvent) - if casted.Metadata.EventType != bertytypes.EventTypeGroupMemberDeviceAdded { + case *protocoltypes.GroupMetadataEvent: + casted, _ := e.(*protocoltypes.GroupMetadataEvent) + if casted.Metadata.EventType != protocoltypes.EventTypeGroupMemberDeviceAdded { continue } - memdev := &bertytypes.GroupAddMemberDevice{} + memdev := &protocoltypes.GroupAddMemberDevice{} if err := memdev.Unmarshal(casted.Event); err != nil { errChan <- err wg.Done() @@ -222,7 +222,7 @@ func inviteAllPeersToGroup(ctx context.Context, t *testing.T, peers []*mockedPee } } -func waitForBertyEventType(ctx context.Context, t *testing.T, ms *metadataStore, eventType bertytypes.EventType, eventCount int, done chan struct{}) { +func waitForBertyEventType(ctx context.Context, t *testing.T, ms *metadataStore, eventType protocoltypes.EventType, eventCount int, done chan struct{}) { t.Helper() ctx, cancel := context.WithCancel(ctx) @@ -232,12 +232,12 @@ func waitForBertyEventType(ctx context.Context, t *testing.T, ms *metadataStore, for evt := range ms.Subscribe(ctx) { switch evt.(type) { - case *bertytypes.GroupMetadataEvent: - if evt.(*bertytypes.GroupMetadataEvent).Metadata.EventType != eventType { + case *protocoltypes.GroupMetadataEvent: + if evt.(*protocoltypes.GroupMetadataEvent).Metadata.EventType != eventType { continue } - eID := string(evt.(*bertytypes.GroupMetadataEvent).EventContext.ID) + eID := string(evt.(*protocoltypes.GroupMetadataEvent).EventContext.ID) if _, ok := handledEvents[eID]; ok { continue @@ -245,8 +245,8 @@ func waitForBertyEventType(ctx context.Context, t *testing.T, ms *metadataStore, handledEvents[eID] = struct{}{} - e := &bertytypes.GroupAddDeviceSecret{} - if err := e.Unmarshal(evt.(*bertytypes.GroupMetadataEvent).Event); err != nil { + e := &protocoltypes.GroupAddDeviceSecret{} + if err := e.Unmarshal(evt.(*protocoltypes.GroupMetadataEvent).Event); err != nil { t.Fatalf(" err: %+v\n", err.Error()) } diff --git a/go/pkg/bertyprotocol/scenario_test.go b/go/pkg/bertyprotocol/scenario_test.go index 80fc92f3d1..9f7a4e917a 100644 --- a/go/pkg/bertyprotocol/scenario_test.go +++ b/go/pkg/bertyprotocol/scenario_test.go @@ -24,8 +24,8 @@ import ( "berty.tech/berty/v2/go/internal/testutil" "berty.tech/berty/v2/go/internal/tracer" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type testCase struct { @@ -158,7 +158,7 @@ func TestScenario_MessageAccountGroup(t *testing.T) { testingScenario(t, cases, func(ctx context.Context, t *testing.T, tps ...*TestingProtocol) { // Get account config - config, err := tps[0].Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config, err := tps[0].Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, config) @@ -194,7 +194,7 @@ func TestScenario_MessageAccountAndMultiMemberGroups(t *testing.T) { // Send messages on account groups for _, account := range tps { // Get account config - config, err := account.Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config, err := account.Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, config) @@ -235,7 +235,7 @@ func TestScenario_MessageAccountAndContactGroups(t *testing.T) { // Send messages on account groups for _, account := range tps { // Get account config - config, err := account.Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + config, err := account.Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, config) @@ -302,9 +302,9 @@ func TestScenario_ReplicateMessage(t *testing.T) { // token, err := issuer.IssueToken([]string{ServiceReplicationID}) // require.NoError(t, err) // - // _, err = nodeA.Service.(*service).accountGroup.metadataStore.SendAccountServiceTokenAdded(ctx, &bertytypes.ServiceToken{ + // _, err = nodeA.Service.(*service).accountGroup.metadataStore.SendAccountServiceTokenAdded(ctx, &protocoltypes.ServiceToken{ // Token: token, - // SupportedServices: []*bertytypes.ServiceTokenSupportedService{ + // SupportedServices: []*protocoltypes.ServiceTokenSupportedService{ // { // ServiceType: ServiceReplicationID, // ServiceEndpoint: "", // TODO @@ -317,18 +317,18 @@ func TestScenario_ReplicateMessage(t *testing.T) { require.NoError(t, err) // TODO: handle auth - _, err = replPeer.Service.ReplicateGroup(ctx, &bertytypes.ReplicationServiceReplicateGroup_Request{ + _, err = replPeer.Service.ReplicateGroup(ctx, &protocoltypes.ReplicationServiceReplicateGroup_Request{ Group: groupReplicable, }) require.NoError(t, err) - _, err = nodeA.Service.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{ + _, err = nodeA.Service.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{ GroupPK: group.PublicKey, Payload: []byte("test1"), }) require.NoError(t, err) - _, err = nodeB.Service.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{ + _, err = nodeB.Service.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{ GroupPK: group.PublicKey, Payload: []byte("test2"), }) @@ -336,7 +336,7 @@ func TestScenario_ReplicateMessage(t *testing.T) { closeNodeB() - _, err = nodeA.Service.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{ + _, err = nodeA.Service.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{ GroupPK: group.PublicKey, Payload: []byte("test3"), }) @@ -352,7 +352,7 @@ func TestScenario_ReplicateMessage(t *testing.T) { }, dsB) defer closeNodeB() - _, err = nodeB.Service.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + _, err = nodeB.Service.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: group.PublicKey, }) @@ -445,7 +445,7 @@ func testingScenario(t *testing.T, tcs []testCase, tf testFunc) { } } -func createMultiMemberGroupInstance(ctx context.Context, t *testing.T, tps ...*TestingProtocol) *bertytypes.Group { +func createMultiMemberGroupInstance(ctx context.Context, t *testing.T, tps ...*TestingProtocol) *protocoltypes.Group { logTree(t, "Create and Join MultiMember Group", 0, true) start := time.Now() @@ -462,7 +462,7 @@ func createMultiMemberGroupInstance(ctx context.Context, t *testing.T, tps ...*T // check if everything is ready for _, pt := range tps { - _, err := pt.Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + _, err := pt.Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) } @@ -475,7 +475,7 @@ func createMultiMemberGroupInstance(ctx context.Context, t *testing.T, tps ...*T start := time.Now() for _, pt := range tps { - req := bertytypes.MultiMemberGroupJoin_Request{ + req := protocoltypes.MultiMemberGroupJoin_Request{ Group: group, } @@ -495,7 +495,7 @@ func createMultiMemberGroupInstance(ctx context.Context, t *testing.T, tps ...*T start := time.Now() for i, pt := range tps { - res, err := pt.Client.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + res, err := pt.Client.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ GroupPK: group.PublicKey, }) require.NoError(t, err) @@ -514,7 +514,7 @@ func createMultiMemberGroupInstance(ctx context.Context, t *testing.T, tps ...*T start := time.Now() for i, pt := range tps { - _, err := pt.Client.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + _, err := pt.Client.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: group.PublicKey, }) @@ -546,7 +546,7 @@ func createMultiMemberGroupInstance(ctx context.Context, t *testing.T, tps ...*T ctx, cancel := context.WithCancel(ctx) defer cancel() - sub, inErr := tp.Client.GroupMetadataList(ctx, &bertytypes.GroupMetadataList_Request{ + sub, inErr := tp.Client.GroupMetadataList(ctx, &protocoltypes.GroupMetadataList_Request{ GroupPK: group.PublicKey, }) if inErr != nil { @@ -622,21 +622,21 @@ func addAsContact(ctx context.Context, t *testing.T, senders, receivers []*Testi substart := time.Now() // Get sender/receiver configs - senderCfg, err := sender.Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + senderCfg, err := sender.Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, senderCfg) - receiverCfg, err := receiver.Client.InstanceGetConfiguration(ctx, &bertytypes.InstanceGetConfiguration_Request{}) + receiverCfg, err := receiver.Client.InstanceGetConfiguration(ctx, &protocoltypes.InstanceGetConfiguration_Request{}) require.NoError(t, err) require.NotNil(t, receiverCfg) // Setup receiver's sharable contact var receiverRDVSeed []byte - crf, err := receiver.Client.ContactRequestReference(ctx, &bertytypes.ContactRequestReference_Request{}) + crf, err := receiver.Client.ContactRequestReference(ctx, &protocoltypes.ContactRequestReference_Request{}) if err != nil || !crf.Enabled || len(crf.PublicRendezvousSeed) == 0 { - _, err = receiver.Client.ContactRequestEnable(ctx, &bertytypes.ContactRequestEnable_Request{}) + _, err = receiver.Client.ContactRequestEnable(ctx, &protocoltypes.ContactRequestEnable_Request{}) require.NoError(t, err) - receiverRDV, err := receiver.Client.ContactRequestResetReference(ctx, &bertytypes.ContactRequestResetReference_Request{}) + receiverRDV, err := receiver.Client.ContactRequestResetReference(ctx, &protocoltypes.ContactRequestResetReference_Request{}) require.NoError(t, err) require.NotNil(t, receiverRDV) receiverRDVSeed = receiverRDV.PublicRendezvousSeed @@ -644,13 +644,13 @@ func addAsContact(ctx context.Context, t *testing.T, senders, receivers []*Testi receiverRDVSeed = crf.PublicRendezvousSeed } - receiverSharableContact := &bertytypes.ShareableContact{ + receiverSharableContact := &protocoltypes.ShareableContact{ PK: receiverCfg.AccountPK, PublicRendezvousSeed: receiverRDVSeed, } // Sender sends contact request - _, err = sender.Client.ContactRequestSend(ctx, &bertytypes.ContactRequestSend_Request{ + _, err = sender.Client.ContactRequestSend(ctx, &protocoltypes.ContactRequestSend_Request{ Contact: receiverSharableContact, }) @@ -690,7 +690,7 @@ func addAsContact(ctx context.Context, t *testing.T, senders, receivers []*Testi // Receiver subscribes to handle incoming contact request subCtx, subCancel := context.WithCancel(ctx) - subReceiver, err := receiver.Client.GroupMetadataList(subCtx, &bertytypes.GroupMetadataList_Request{ + subReceiver, err := receiver.Client.GroupMetadataList(subCtx, &protocoltypes.GroupMetadataList_Request{ GroupPK: receiverCfg.AccountGroupPK, }) require.NoError(t, err) @@ -705,11 +705,11 @@ func addAsContact(ctx context.Context, t *testing.T, senders, receivers []*Testi require.NoError(t, err) - if evt == nil || evt.Metadata.EventType != bertytypes.EventTypeAccountContactRequestIncomingReceived { + if evt == nil || evt.Metadata.EventType != protocoltypes.EventTypeAccountContactRequestIncomingReceived { continue } - req := &bertytypes.AccountContactRequestReceived{} + req := &protocoltypes.AccountContactRequestReceived{} err = req.Unmarshal(evt.Event) require.NoError(t, err) @@ -727,7 +727,7 @@ func addAsContact(ctx context.Context, t *testing.T, senders, receivers []*Testi substart = time.Now() // Receiver accepts contact request - _, err = receiver.Client.ContactRequestAccept(ctx, &bertytypes.ContactRequestAccept_Request{ + _, err = receiver.Client.ContactRequestAccept(ctx, &protocoltypes.ContactRequestAccept_Request{ ContactPK: senderCfg.AccountPK, }) @@ -737,25 +737,25 @@ func addAsContact(ctx context.Context, t *testing.T, senders, receivers []*Testi substart = time.Now() // Both receiver and sender activate the contact group - grpInfo, err := sender.Client.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + grpInfo, err := sender.Client.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: receiverCfg.AccountPK, }) require.NoError(t, err) - _, err = sender.Client.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + _, err = sender.Client.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: grpInfo.Group.PublicKey, }) require.NoError(t, err) - grpInfo2, err := receiver.Client.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + grpInfo2, err := receiver.Client.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: senderCfg.AccountPK, }) require.NoError(t, err) require.Equal(t, grpInfo.Group.PublicKey, grpInfo2.Group.PublicKey) - _, err = receiver.Client.ActivateGroup(ctx, &bertytypes.ActivateGroup_Request{ + _, err = receiver.Client.ActivateGroup(ctx, &protocoltypes.ActivateGroup_Request{ GroupPK: grpInfo2.Group.PublicKey, }) @@ -787,7 +787,7 @@ func sendMessageToContact(ctx context.Context, t *testing.T, messages []string, } // Get contact group - contactGroup, err := sender.Client.GroupInfo(ctx, &bertytypes.GroupInfo_Request{ + contactGroup, err := sender.Client.GroupInfo(ctx, &protocoltypes.GroupInfo_Request{ ContactPK: getAccountPubKey(t, receiver), }) require.NoError(t, err) @@ -846,7 +846,7 @@ func sendMessageOnGroup(ctx context.Context, t *testing.T, senders, receivers [] for _, sender := range senders { senderID := getAccountB64PubKey(t, sender) for _, message := range messages { - _, err := sender.Client.AppMessageSend(ctx, &bertytypes.AppMessageSend_Request{ + _, err := sender.Client.AppMessageSend(ctx, &protocoltypes.AppMessageSend_Request{ GroupPK: groupPK, Payload: []byte(senderID + " - " + message), }) @@ -873,7 +873,7 @@ func sendMessageOnGroup(ctx context.Context, t *testing.T, senders, receivers [] defer subCancel() defer wg.Done() - sub, err := receiver.Client.GroupMessageList(subCtx, &bertytypes.GroupMessageList_Request{ + sub, err := receiver.Client.GroupMessageList(subCtx, &protocoltypes.GroupMessageList_Request{ GroupPK: groupPK, }) if !assert.NoError(t, err) { @@ -952,7 +952,7 @@ func sendMessageOnGroup(ctx context.Context, t *testing.T, senders, receivers [] defer subCancel() defer wg.Done() - req := bertytypes.GroupMessageList_Request{ + req := protocoltypes.GroupMessageList_Request{ GroupPK: groupPK, UntilNow: true, } @@ -1021,13 +1021,13 @@ func sendMessageOnGroup(ctx context.Context, t *testing.T, senders, receivers [] logTree(t, "duration: %s", 0, false, time.Since(start)) } -func isEventAddSecretTargetedToMember(ownRawPK []byte, evt *bertytypes.GroupMetadataEvent) ([]byte, error) { +func isEventAddSecretTargetedToMember(ownRawPK []byte, evt *protocoltypes.GroupMetadataEvent) ([]byte, error) { // Only count EventTypeGroupDeviceSecretAdded events - if evt.Metadata.EventType != bertytypes.EventTypeGroupDeviceSecretAdded { + if evt.Metadata.EventType != protocoltypes.EventTypeGroupDeviceSecretAdded { return nil, nil } - sec := &bertytypes.GroupAddDeviceSecret{} + sec := &protocoltypes.GroupAddDeviceSecret{} err := sec.Unmarshal(evt.Event) if err != nil { return nil, err diff --git a/go/pkg/bertyprotocol/service.go b/go/pkg/bertyprotocol/service.go index 9192cfe3f6..1bac97af44 100644 --- a/go/pkg/bertyprotocol/service.go +++ b/go/pkg/bertyprotocol/service.go @@ -17,9 +17,9 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/tinder" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/bertyversion" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/go-orbit-db/baseorbitdb" "berty.tech/go-orbit-db/iface" ) @@ -28,7 +28,7 @@ var _ Service = (*service)(nil) // Service is the main Berty Protocol interface type Service interface { - ProtocolServiceServer + protocoltypes.ProtocolServiceServer Close() error Status() Status @@ -44,7 +44,7 @@ type service struct { accountGroup *groupContext deviceKeystore DeviceKeystore openedGroups map[string]*groupContext - groups map[string]*bertytypes.Group + groups map[string]*protocoltypes.Group lock sync.RWMutex authSession atomic.Value close func() error @@ -182,7 +182,7 @@ func New(ctx context.Context, opts Opts) (Service, error) { close: opts.close, accountGroup: acc, startedAt: time.Now(), - groups: map[string]*bertytypes.Group{ + groups: map[string]*protocoltypes.Group{ string(acc.Group().PublicKey): acc.Group(), }, openedGroups: map[string]*groupContext{ diff --git a/go/pkg/bertyprotocol/service_group.go b/go/pkg/bertyprotocol/service_group.go index b49a964249..3ff8070787 100644 --- a/go/pkg/bertyprotocol/service_group.go +++ b/go/pkg/bertyprotocol/service_group.go @@ -6,8 +6,8 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/go-orbit-db/iface" ) @@ -25,12 +25,12 @@ func (s *service) indexGroups() error { } contacts := s.accountGroup.MetadataStore().ListContactsByStatus( - bertytypes.ContactStateToRequest, - bertytypes.ContactStateReceived, - bertytypes.ContactStateAdded, - bertytypes.ContactStateRemoved, - bertytypes.ContactStateDiscarded, - bertytypes.ContactStateBlocked, + protocoltypes.ContactStateToRequest, + protocoltypes.ContactStateReceived, + protocoltypes.ContactStateAdded, + protocoltypes.ContactStateRemoved, + protocoltypes.ContactStateDiscarded, + protocoltypes.ContactStateBlocked, ) for _, contact := range contacts { if _, ok := s.groups[string(contact.PK)]; ok { @@ -58,7 +58,7 @@ func (s *service) indexGroups() error { return nil } -func (s *service) getContactGroup(key crypto.PubKey) (*bertytypes.Group, error) { +func (s *service) getContactGroup(key crypto.PubKey) (*protocoltypes.Group, error) { sk, err := s.deviceKeystore.ContactGroupPrivKey(key) if err != nil { return nil, errcode.ErrCryptoKeyGeneration.Wrap(err) @@ -72,7 +72,7 @@ func (s *service) getContactGroup(key crypto.PubKey) (*bertytypes.Group, error) return g, nil } -func (s *service) getGroupForPK(pk crypto.PubKey) (*bertytypes.Group, error) { +func (s *service) getGroupForPK(pk crypto.PubKey) (*protocoltypes.Group, error) { id, err := pk.Raw() if err != nil { return nil, errcode.ErrSerialization.Wrap(err) @@ -112,7 +112,7 @@ func (s *service) deactivateGroup(pk crypto.PubKey) error { return nil } - if cg.Group().GroupType == bertytypes.GroupTypeAccount { + if cg.Group().GroupType == protocoltypes.GroupTypeAccount { return errcode.ErrInvalidInput.Wrap(fmt.Errorf("can't deactivate account group")) } @@ -149,7 +149,7 @@ func (s *service) activateGroup(pk crypto.PubKey, localOnly bool) error { defer s.lock.Unlock() switch g.GroupType { - case bertytypes.GroupTypeContact, bertytypes.GroupTypeMultiMember: + case protocoltypes.GroupTypeContact, protocoltypes.GroupTypeMultiMember: dbOpts := &iface.CreateDBOptions{LocalOnly: &localOnly} gc, err := s.odb.openGroup(s.ctx, g, dbOpts) @@ -158,7 +158,7 @@ func (s *service) activateGroup(pk crypto.PubKey, localOnly bool) error { } var contactPK crypto.PubKey - if g.GroupType == bertytypes.GroupTypeContact { + if g.GroupType == protocoltypes.GroupTypeContact { contact := s.accountGroup.metadataStore.GetContactFromGroupPK(id) if contact != nil { contactPK, err = contact.GetPubKey() @@ -177,7 +177,7 @@ func (s *service) activateGroup(pk crypto.PubKey, localOnly bool) error { TagGroupContextPeers(s.ctx, gc, s.ipfsCoreAPI, 42) return nil - case bertytypes.GroupTypeAccount: + case protocoltypes.GroupTypeAccount: return errcode.ErrInternal.Wrap(fmt.Errorf("deviceKeystore group should already be opened")) } diff --git a/go/pkg/bertyprotocol/services_auth.go b/go/pkg/bertyprotocol/services_auth.go index 1251834d2f..58c520a1cb 100644 --- a/go/pkg/bertyprotocol/services_auth.go +++ b/go/pkg/bertyprotocol/services_auth.go @@ -14,8 +14,8 @@ import ( "gopkg.in/square/go-jose.v2" "berty.tech/berty/v2/go/internal/cryptoutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) type ContextAuthValue uint32 @@ -110,7 +110,7 @@ func (r *AuthTokenIssuer) IssueCode(codeChallenge string, services []string) (st return "", errcode.ErrInvalidInput.Wrap(fmt.Errorf("no codeChallenge specified")) } - codePayload := &bertytypes.ServicesTokenCode{ + codePayload := &protocoltypes.ServicesTokenCode{ Services: services, CodeChallenge: codeChallenge, } @@ -151,13 +151,13 @@ func (r *AuthTokenVerifier) decryptVerify(token string) ([]byte, error) { return decrypted, nil } -func (r *AuthTokenVerifier) VerifyCode(code, codeVerifier string) (*bertytypes.ServicesTokenCode, error) { +func (r *AuthTokenVerifier) VerifyCode(code, codeVerifier string) (*protocoltypes.ServicesTokenCode, error) { decrypted, err := r.decryptVerify(code) if err != nil { return nil, err } - codeObj := &bertytypes.ServicesTokenCode{} + codeObj := &protocoltypes.ServicesTokenCode{} if err := codeObj.Unmarshal(decrypted); err != nil { return nil, err } @@ -179,7 +179,7 @@ func (r *AuthTokenIssuer) IssueToken(services []string) (string, error) { return "", errcode.ErrInvalidInput.Wrap(fmt.Errorf("no services specified")) } - tokenPayload := &bertytypes.ServicesTokenCode{ + tokenPayload := &protocoltypes.ServicesTokenCode{ Services: services, TokenID: tokenID.String(), } @@ -192,13 +192,13 @@ func (r *AuthTokenIssuer) IssueToken(services []string) (string, error) { return r.encryptSign(payload) } -func (r *AuthTokenVerifier) VerifyToken(token, serviceID string) (*bertytypes.ServicesTokenCode, error) { +func (r *AuthTokenVerifier) VerifyToken(token, serviceID string) (*protocoltypes.ServicesTokenCode, error) { decrypted, err := r.decryptVerify(token) if err != nil { return nil, err } - tokenObj := &bertytypes.ServicesTokenCode{} + tokenObj := &protocoltypes.ServicesTokenCode{} if err := tokenObj.Unmarshal(decrypted); err != nil { return nil, err } diff --git a/go/pkg/bertyprotocol/services_replication.go b/go/pkg/bertyprotocol/services_replication.go index b5dd34903c..9741c730ca 100644 --- a/go/pkg/bertyprotocol/services_replication.go +++ b/go/pkg/bertyprotocol/services_replication.go @@ -8,8 +8,8 @@ import ( "github.com/ipfs/go-datastore/query" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) const ( @@ -24,7 +24,7 @@ type replicationService struct { ctx context.Context } -func (s *replicationService) GroupRegister(token string, group *bertytypes.Group) error { +func (s *replicationService) GroupRegister(token string, group *protocoltypes.Group) error { data, err := group.Marshal() if err != nil { s.logger.Error("error while marshaling request", zap.Error(err)) @@ -41,15 +41,15 @@ func (s *replicationService) GroupRegister(token string, group *bertytypes.Group return s.GroupSubscribe(group) } -func (s *replicationService) GroupSubscribe(group *bertytypes.Group) error { +func (s *replicationService) GroupSubscribe(group *protocoltypes.Group) error { return s.odb.openGroupReplication(s.ctx, group, nil) } -func (s *replicationService) ReplicateGroup(_ context.Context, req *bertytypes.ReplicationServiceReplicateGroup_Request) (*bertytypes.ReplicationServiceReplicateGroup_Reply, error) { +func (s *replicationService) ReplicateGroup(_ context.Context, req *protocoltypes.ReplicationServiceReplicateGroup_Request) (*protocoltypes.ReplicationServiceReplicateGroup_Reply, error) { // TODO: retrieve auth token err := s.GroupRegister("TODO", req.Group) - return &bertytypes.ReplicationServiceReplicateGroup_Reply{}, err + return &protocoltypes.ReplicationServiceReplicateGroup_Reply{}, err } func (s *replicationService) Close() error { @@ -92,7 +92,7 @@ func NewReplicationService(ctx context.Context, store ds.Datastore, odb *BertyOr } for data := range res.Next() { - group := &bertytypes.Group{} + group := &protocoltypes.Group{} if err := group.Unmarshal(data.Value); err != nil { logger.Error("unable to unmarshal group data", zap.Error(err)) continue diff --git a/go/pkg/bertyprotocol/services_replication_test.go b/go/pkg/bertyprotocol/services_replication_test.go index f5126db9dd..d509142296 100644 --- a/go/pkg/bertyprotocol/services_replication_test.go +++ b/go/pkg/bertyprotocol/services_replication_test.go @@ -17,7 +17,7 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" orbitdb "berty.tech/go-orbit-db" ) @@ -75,12 +75,12 @@ func TestReplicationService_GroupSubscribe(t *testing.T) { err = repl.GroupSubscribe(replGroup) require.NoError(t, err) - err = repl.GroupSubscribe(&bertytypes.Group{ + err = repl.GroupSubscribe(&protocoltypes.Group{ PublicKey: nil, }) require.Error(t, err) - err = repl.GroupSubscribe(&bertytypes.Group{ + err = repl.GroupSubscribe(&protocoltypes.Group{ PublicKey: nil, }) require.Error(t, err) @@ -199,7 +199,7 @@ func TestReplicationService_Flow(t *testing.T) { require.NoError(t, err) // TODO: handle auth - _, err = replPeer.Service.ReplicateGroup(ctx, &bertytypes.ReplicationServiceReplicateGroup_Request{ + _, err = replPeer.Service.ReplicateGroup(ctx, &protocoltypes.ReplicationServiceReplicateGroup_Request{ Group: groupReplicable, }) require.NoError(t, err) diff --git a/go/pkg/bertyprotocol/store_message.go b/go/pkg/bertyprotocol/store_message.go index 6b3ec6f634..7127d60244 100644 --- a/go/pkg/bertyprotocol/store_message.go +++ b/go/pkg/bertyprotocol/store_message.go @@ -11,8 +11,8 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ipfslog "berty.tech/go-ipfs-log" "berty.tech/go-ipfs-log/identityprovider" ipliface "berty.tech/go-ipfs-log/iface" @@ -31,7 +31,7 @@ type messageStore struct { devKS DeviceKeystore mks *messageKeystore - g *bertytypes.Group + g *protocoltypes.Group logger *zap.Logger cache map[string]*ring.Ring cacheLock sync.Mutex @@ -89,7 +89,7 @@ func (m *messageStore) openMessageCacheForPK(ctx context.Context, devicePK []byt m.cacheLock.Unlock() } -func (m *messageStore) openMessage(ctx context.Context, e ipfslog.Entry, enableCache bool) (*bertytypes.GroupMessageEvent, error) { +func (m *messageStore) openMessage(ctx context.Context, e ipfslog.Entry, enableCache bool) (*protocoltypes.GroupMessageEvent, error) { if e == nil { return nil, errcode.ErrInvalidInput } @@ -123,7 +123,7 @@ func (m *messageStore) openMessage(ctx context.Context, e ipfslog.Entry, enableC } eventContext := newEventContext(e.GetHash(), e.GetNext(), m.g, attachmentsCIDs) - return &bertytypes.GroupMessageEvent{ + return &protocoltypes.GroupMessageEvent{ EventContext: eventContext, Headers: headers, Message: msg.GetPlaintext(), @@ -131,13 +131,13 @@ func (m *messageStore) openMessage(ctx context.Context, e ipfslog.Entry, enableC } // FIXME: use iterator instead to reduce resource usage (require go-ipfs-log improvements) -func (m *messageStore) ListEvents(ctx context.Context, since, until []byte, reverse bool) (<-chan *bertytypes.GroupMessageEvent, error) { +func (m *messageStore) ListEvents(ctx context.Context, since, until []byte, reverse bool) (<-chan *protocoltypes.GroupMessageEvent, error) { entries, err := getEntriesInRange(m.OpLog().GetEntries().Reverse().Slice(), since, until) if err != nil { return nil, err } - out := make(chan *bertytypes.GroupMessageEvent) + out := make(chan *protocoltypes.GroupMessageEvent) go func() { iterateOverEntries( @@ -171,9 +171,9 @@ func (m *messageStore) AddMessage(ctx context.Context, payload []byte, attachmen return nil, errcode.ErrKeystoreGet.Wrap(err) } - msg, err := (&bertytypes.EncryptedMessage{ + msg, err := (&protocoltypes.EncryptedMessage{ Plaintext: payload, - ProtocolMetadata: &bertytypes.ProtocolMetadata{AttachmentsSecrets: attachmentsSecrets}, + ProtocolMetadata: &protocoltypes.ProtocolMetadata{AttachmentsSecrets: attachmentsSecrets}, }).Marshal() if err != nil { return nil, errcode.ErrInternal.Wrap(err) diff --git a/go/pkg/bertyprotocol/store_message_test.go b/go/pkg/bertyprotocol/store_message_test.go index 0f0591268a..6c72d2c2db 100644 --- a/go/pkg/bertyprotocol/store_message_test.go +++ b/go/pkg/bertyprotocol/store_message_test.go @@ -11,11 +11,11 @@ import ( "github.com/stretchr/testify/require" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ipfslog "berty.tech/go-ipfs-log" ) -func countEntries(out <-chan *bertytypes.GroupMessageEvent) int { +func countEntries(out <-chan *protocoltypes.GroupMessageEvent) int { found := 0 for range out { diff --git a/go/pkg/bertyprotocol/store_metadata.go b/go/pkg/bertyprotocol/store_metadata.go index b0caf25762..b480b2facd 100644 --- a/go/pkg/bertyprotocol/store_metadata.go +++ b/go/pkg/bertyprotocol/store_metadata.go @@ -15,8 +15,8 @@ import ( "golang.org/x/crypto/nacl/box" "berty.tech/berty/v2/go/internal/cryptoutil" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ipfslog "berty.tech/go-ipfs-log" "berty.tech/go-ipfs-log/identityprovider" ipliface "berty.tech/go-ipfs-log/iface" @@ -31,22 +31,22 @@ const groupMetadataStoreType = "berty_group_metadata" type metadataStore struct { basestore.BaseStore - g *bertytypes.Group + g *protocoltypes.Group devKS DeviceKeystore mks *messageKeystore logger *zap.Logger } func isMultiMemberGroup(m *metadataStore) bool { - return m.g.GroupType == bertytypes.GroupTypeMultiMember + return m.g.GroupType == protocoltypes.GroupTypeMultiMember } func isAccountGroup(m *metadataStore) bool { - return m.g.GroupType == bertytypes.GroupTypeAccount + return m.g.GroupType == protocoltypes.GroupTypeAccount } func isContactGroup(m *metadataStore) bool { - return m.g.GroupType == bertytypes.GroupTypeContact + return m.g.GroupType == protocoltypes.GroupTypeContact } func (m *metadataStore) typeChecker(types ...func(m *metadataStore) bool) bool { @@ -71,7 +71,7 @@ func (m *metadataStore) setLogger(l *zap.Logger) { } } -func openMetadataEntry(log ipfslog.Log, e ipfslog.Entry, g *bertytypes.Group, devKS DeviceKeystore) (*bertytypes.GroupMetadataEvent, proto.Message, error) { +func openMetadataEntry(log ipfslog.Log, e ipfslog.Entry, g *protocoltypes.Group, devKS DeviceKeystore) (*protocoltypes.GroupMetadataEvent, proto.Message, error) { op, err := operation.ParseOperation(e) if err != nil { return nil, nil, err @@ -91,13 +91,13 @@ func openMetadataEntry(log ipfslog.Log, e ipfslog.Entry, g *bertytypes.Group, de } // FIXME: use iterator instead to reduce resource usage (require go-ipfs-log improvements) -func (m *metadataStore) ListEvents(ctx context.Context, since, until []byte, reverse bool) (<-chan *bertytypes.GroupMetadataEvent, error) { +func (m *metadataStore) ListEvents(ctx context.Context, since, until []byte, reverse bool) (<-chan *protocoltypes.GroupMetadataEvent, error) { entries, err := getEntriesInRange(m.OpLog().GetEntries().Reverse().Slice(), since, until) if err != nil { return nil, err } - out := make(chan *bertytypes.GroupMetadataEvent) + out := make(chan *protocoltypes.GroupMetadataEvent) go func() { iterateOverEntries( @@ -130,7 +130,7 @@ func (m *metadataStore) AddDeviceToGroup(ctx context.Context) (operation.Operati return metadataStoreAddDeviceToGroup(ctx, m, m.g, md) } -func metadataStoreAddDeviceToGroup(ctx context.Context, m *metadataStore, g *bertytypes.Group, md *ownMemberDevice) (operation.Operation, error) { +func metadataStoreAddDeviceToGroup(ctx context.Context, m *metadataStore, g *protocoltypes.Group, md *ownMemberDevice) (operation.Operation, error) { device, err := md.device.GetPublic().Raw() if err != nil { return nil, errcode.ErrSerialization.Wrap(err) @@ -151,7 +151,7 @@ func metadataStoreAddDeviceToGroup(ctx context.Context, m *metadataStore, g *ber return nil, errcode.ErrCryptoSignature.Wrap(err) } - event := &bertytypes.GroupAddMemberDevice{ + event := &protocoltypes.GroupAddMemberDevice{ MemberPK: member, DevicePK: device, MemberSig: memberSig, @@ -164,7 +164,7 @@ func metadataStoreAddDeviceToGroup(ctx context.Context, m *metadataStore, g *ber m.logger.Info("announcing device on store") - return metadataStoreAddEvent(ctx, m, g, bertytypes.EventTypeGroupMemberDeviceAdded, event, sig, nil) + return metadataStoreAddEvent(ctx, m, g, protocoltypes.EventTypeGroupMemberDeviceAdded, event, sig, nil) } func (m *metadataStore) SendSecret(ctx context.Context, memberPK crypto.PubKey) (operation.Operation, error) { @@ -194,7 +194,7 @@ func (m *metadataStore) SendSecret(ctx context.Context, memberPK crypto.PubKey) return metadataStoreSendSecret(ctx, m, m.g, md, memberPK, ds) } -func metadataStoreSendSecret(ctx context.Context, m *metadataStore, g *bertytypes.Group, md *ownMemberDevice, memberPK crypto.PubKey, ds *bertytypes.DeviceSecret) (operation.Operation, error) { +func metadataStoreSendSecret(ctx context.Context, m *metadataStore, g *protocoltypes.Group, md *ownMemberDevice, memberPK crypto.PubKey, ds *protocoltypes.DeviceSecret) (operation.Operation, error) { payload, err := newSecretEntryPayload(md.device, memberPK, ds, g) if err != nil { return nil, errcode.ErrInternal.Wrap(err) @@ -210,7 +210,7 @@ func metadataStoreSendSecret(ctx context.Context, m *metadataStore, g *bertytype return nil, errcode.ErrSerialization.Wrap(err) } - event := &bertytypes.GroupAddDeviceSecret{ + event := &protocoltypes.GroupAddDeviceSecret{ DevicePK: devicePKRaw, DestMemberPK: memberPKRaw, Payload: payload, @@ -221,7 +221,7 @@ func metadataStoreSendSecret(ctx context.Context, m *metadataStore, g *bertytype return nil, errcode.ErrCryptoSignature.Wrap(err) } - return metadataStoreAddEvent(ctx, m, g, bertytypes.EventTypeGroupDeviceSecretAdded, event, sig, nil) + return metadataStoreAddEvent(ctx, m, g, protocoltypes.EventTypeGroupDeviceSecretAdded, event, sig, nil) } func (m *metadataStore) ClaimGroupOwnership(ctx context.Context, groupSK crypto.PrivKey) (operation.Operation, error) { @@ -239,7 +239,7 @@ func (m *metadataStore) ClaimGroupOwnership(ctx context.Context, groupSK crypto. return nil, errcode.ErrSerialization.Wrap(err) } - event := &bertytypes.MultiMemberInitialMember{ + event := &protocoltypes.MultiMemberInitialMember{ MemberPK: memberPK, } @@ -248,7 +248,7 @@ func (m *metadataStore) ClaimGroupOwnership(ctx context.Context, groupSK crypto. return nil, errcode.ErrCryptoSignature.Wrap(err) } - return metadataStoreAddEvent(ctx, m, m.g, bertytypes.EventTypeMultiMemberGroupInitialMemberAnnounced, event, sig, nil) + return metadataStoreAddEvent(ctx, m, m.g, protocoltypes.EventTypeMultiMemberGroupInitialMemberAnnounced, event, sig, nil) } func signProto(message proto.Message, sk crypto.PrivKey) ([]byte, error) { @@ -265,7 +265,7 @@ func signProto(message proto.Message, sk crypto.PrivKey) ([]byte, error) { return sig, nil } -func metadataStoreAddEvent(ctx context.Context, m *metadataStore, g *bertytypes.Group, eventType bertytypes.EventType, event proto.Marshaler, sig []byte, attachmentsCIDs [][]byte) (operation.Operation, error) { +func metadataStoreAddEvent(ctx context.Context, m *metadataStore, g *protocoltypes.Group, eventType protocoltypes.EventType, event proto.Marshaler, sig []byte, attachmentsCIDs [][]byte) (operation.Operation, error) { attachmentsSecrets, err := m.devKS.AttachmentSecretSlice(attachmentsCIDs) if err != nil { return nil, errcode.ErrKeystoreGet.Wrap(err) @@ -311,7 +311,7 @@ func (m *metadataStore) ListAdmins() []crypto.PubKey { return m.Index().(*metadataStoreIndex).listAdmins() } -func (m *metadataStore) GetIncomingContactRequestsStatus() (bool, *bertytypes.ShareableContact) { +func (m *metadataStore) GetIncomingContactRequestsStatus() (bool, *protocoltypes.ShareableContact) { if !m.typeChecker(isAccountGroup) { return false, nil } @@ -331,7 +331,7 @@ func (m *metadataStore) GetIncomingContactRequestsStatus() (bool, *bertytypes.Sh return enabled, nil } - contactRef := &bertytypes.ShareableContact{ + contactRef := &protocoltypes.ShareableContact{ PK: pkBytes, PublicRendezvousSeed: seed, } @@ -351,7 +351,7 @@ func (m *metadataStore) ListDevices() []crypto.PubKey { return m.Index().(*metadataStoreIndex).listDevices() } -func (m *metadataStore) ListMultiMemberGroups() []*bertytypes.Group { +func (m *metadataStore) ListMultiMemberGroups() []*protocoltypes.Group { if !m.typeChecker(isAccountGroup) { return nil } @@ -363,7 +363,7 @@ func (m *metadataStore) ListMultiMemberGroups() []*bertytypes.Group { idx.lock.Lock() defer idx.lock.Unlock() - groups := []*bertytypes.Group(nil) + groups := []*protocoltypes.Group(nil) for _, g := range idx.groups { if g.state != accountGroupJoinedStateJoined { @@ -393,7 +393,7 @@ func (m *metadataStore) GetRequestOwnMetadataForContact(pk []byte) ([]byte, erro return meta, nil } -func (m *metadataStore) ListContactsByStatus(states ...bertytypes.ContactState) []*bertytypes.ShareableContact { +func (m *metadataStore) ListContactsByStatus(states ...protocoltypes.ContactState) []*protocoltypes.ShareableContact { if !m.typeChecker(isAccountGroup) { return nil } @@ -405,7 +405,7 @@ func (m *metadataStore) ListContactsByStatus(states ...bertytypes.ContactState) idx.lock.Lock() defer idx.lock.Unlock() - contacts := []*bertytypes.ShareableContact(nil) + contacts := []*protocoltypes.ShareableContact(nil) for _, c := range idx.contacts { hasState := false @@ -424,7 +424,7 @@ func (m *metadataStore) ListContactsByStatus(states ...bertytypes.ContactState) return contacts } -func (m *metadataStore) GetContactFromGroupPK(groupPK []byte) *bertytypes.ShareableContact { +func (m *metadataStore) GetContactFromGroupPK(groupPK []byte) *protocoltypes.ShareableContact { if !m.typeChecker(isAccountGroup) { return nil } @@ -461,7 +461,7 @@ func (m *metadataStore) checkIfInGroup(pk []byte) bool { } // GroupJoin indicates the payload includes that the deviceKeystore has joined a group -func (m *metadataStore) GroupJoin(ctx context.Context, g *bertytypes.Group) (operation.Operation, error) { +func (m *metadataStore) GroupJoin(ctx context.Context, g *protocoltypes.Group) (operation.Operation, error) { if !m.typeChecker(isAccountGroup) { return nil, errcode.ErrGroupInvalidType } @@ -474,9 +474,9 @@ func (m *metadataStore) GroupJoin(ctx context.Context, g *bertytypes.Group) (ope return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("already present in group")) } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountGroupJoined{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountGroupJoined{ Group: g, - }, bertytypes.EventTypeAccountGroupJoined, nil) + }, protocoltypes.EventTypeAccountGroupJoined, nil) } // GroupLeave indicates the payload includes that the deviceKeystore has left a group @@ -498,7 +498,7 @@ func (m *metadataStore) GroupLeave(ctx context.Context, pk crypto.PubKey) (opera return nil, errcode.ErrInvalidInput } - return m.groupAction(ctx, pk, &bertytypes.AccountGroupLeft{}, bertytypes.EventTypeAccountGroupLeft) + return m.groupAction(ctx, pk, &protocoltypes.AccountGroupLeft{}, protocoltypes.EventTypeAccountGroupLeft) } // ContactRequestDisable indicates the payload includes that the deviceKeystore has disabled incoming contact requests @@ -507,7 +507,7 @@ func (m *metadataStore) ContactRequestDisable(ctx context.Context) (operation.Op return nil, errcode.ErrGroupInvalidType } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountContactRequestDisabled{}, bertytypes.EventTypeAccountContactRequestDisabled, nil) + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountContactRequestDisabled{}, protocoltypes.EventTypeAccountContactRequestDisabled, nil) } // ContactRequestEnable indicates the payload includes that the deviceKeystore has enabled incoming contact requests @@ -516,7 +516,7 @@ func (m *metadataStore) ContactRequestEnable(ctx context.Context) (operation.Ope return nil, errcode.ErrGroupInvalidType } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountContactRequestEnabled{}, bertytypes.EventTypeAccountContactRequestEnabled, nil) + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountContactRequestEnabled{}, protocoltypes.EventTypeAccountContactRequestEnabled, nil) } // ContactRequestReferenceReset indicates the payload includes that the deviceKeystore has a new contact request reference @@ -525,18 +525,18 @@ func (m *metadataStore) ContactRequestReferenceReset(ctx context.Context) (opera return nil, errcode.ErrGroupInvalidType } - seed, err := ioutil.ReadAll(io.LimitReader(crand.Reader, bertytypes.RendezvousSeedLength)) + seed, err := ioutil.ReadAll(io.LimitReader(crand.Reader, protocoltypes.RendezvousSeedLength)) if err != nil { return nil, errcode.ErrCryptoKeyGeneration.Wrap(err) } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountContactRequestReferenceReset{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountContactRequestReferenceReset{ PublicRendezvousSeed: seed, - }, bertytypes.EventTypeAccountContactRequestReferenceReset, nil) + }, protocoltypes.EventTypeAccountContactRequestReferenceReset, nil) } // ContactRequestOutgoingEnqueue indicates the payload includes that the deviceKeystore will attempt to send a new contact request -func (m *metadataStore) ContactRequestOutgoingEnqueue(ctx context.Context, contact *bertytypes.ShareableContact, ownMetadata []byte) (operation.Operation, error) { +func (m *metadataStore) ContactRequestOutgoingEnqueue(ctx context.Context, contact *protocoltypes.ShareableContact, ownMetadata []byte) (operation.Operation, error) { if !m.typeChecker(isAccountGroup) { return nil, errcode.ErrGroupInvalidType } @@ -559,22 +559,22 @@ func (m *metadataStore) ContactRequestOutgoingEnqueue(ctx context.Context, conta return nil, errcode.ErrDeserialization.Wrap(err) } - if m.checkContactStatus(pk, bertytypes.ContactStateAdded) { + if m.checkContactStatus(pk, protocoltypes.ContactStateAdded) { return nil, errcode.ErrContactRequestContactAlreadyAdded } - if m.checkContactStatus(pk, bertytypes.ContactStateRemoved, bertytypes.ContactStateDiscarded, bertytypes.ContactStateReceived) { + if m.checkContactStatus(pk, protocoltypes.ContactStateRemoved, protocoltypes.ContactStateDiscarded, protocoltypes.ContactStateReceived) { return m.ContactRequestOutgoingSent(ctx, pk) } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountContactRequestEnqueued{ - Contact: &bertytypes.ShareableContact{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountContactRequestEnqueued{ + Contact: &protocoltypes.ShareableContact{ PK: contact.PK, PublicRendezvousSeed: contact.PublicRendezvousSeed, Metadata: contact.Metadata, }, OwnMetadata: ownMetadata, - }, bertytypes.EventTypeAccountContactRequestOutgoingEnqueued, nil) + }, protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued, nil) } // ContactRequestOutgoingSent indicates the payload includes that the deviceKeystore has sent a contact request @@ -584,31 +584,31 @@ func (m *metadataStore) ContactRequestOutgoingSent(ctx context.Context, pk crypt } switch m.getContactStatus(pk) { - case bertytypes.ContactStateToRequest: - case bertytypes.ContactStateReceived: - case bertytypes.ContactStateRemoved: - case bertytypes.ContactStateDiscarded: + case protocoltypes.ContactStateToRequest: + case protocoltypes.ContactStateReceived: + case protocoltypes.ContactStateRemoved: + case protocoltypes.ContactStateDiscarded: - case bertytypes.ContactStateUndefined: + case protocoltypes.ContactStateUndefined: return nil, errcode.ErrContactRequestContactUndefined - case bertytypes.ContactStateAdded: + case protocoltypes.ContactStateAdded: return nil, errcode.ErrContactRequestContactAlreadyAdded - case bertytypes.ContactStateBlocked: + case protocoltypes.ContactStateBlocked: return nil, errcode.ErrContactRequestContactBlocked default: return nil, errcode.ErrInvalidInput } - return m.contactAction(ctx, pk, &bertytypes.AccountContactRequestSent{}, bertytypes.EventTypeAccountContactRequestOutgoingSent) + return m.contactAction(ctx, pk, &protocoltypes.AccountContactRequestSent{}, protocoltypes.EventTypeAccountContactRequestOutgoingSent) } // ContactRequestIncomingReceived indicates the payload includes that the deviceKeystore has received a contact request -func (m *metadataStore) ContactRequestIncomingReceived(ctx context.Context, contact *bertytypes.ShareableContact) (operation.Operation, error) { +func (m *metadataStore) ContactRequestIncomingReceived(ctx context.Context, contact *protocoltypes.ShareableContact) (operation.Operation, error) { if !m.typeChecker(isAccountGroup) { return nil, errcode.ErrGroupInvalidType } - if err := contact.CheckFormat(bertytypes.ShareableContactOptionsAllowMissingRDVSeed); err != nil { + if err := contact.CheckFormat(protocoltypes.ShareableContactOptionsAllowMissingRDVSeed); err != nil { return nil, errcode.ErrInvalidInput.Wrap(err) } @@ -627,31 +627,31 @@ func (m *metadataStore) ContactRequestIncomingReceived(ctx context.Context, cont } switch m.getContactStatus(pk) { - case bertytypes.ContactStateUndefined: - case bertytypes.ContactStateRemoved: - case bertytypes.ContactStateDiscarded: + case protocoltypes.ContactStateUndefined: + case protocoltypes.ContactStateRemoved: + case protocoltypes.ContactStateDiscarded: // If incoming request comes from an account for which an outgoing request // is in "sending" state, mark the outgoing request as "sent" - case bertytypes.ContactStateToRequest: + case protocoltypes.ContactStateToRequest: return m.ContactRequestOutgoingSent(ctx, pk) // Errors - case bertytypes.ContactStateReceived: + case protocoltypes.ContactStateReceived: return nil, errcode.ErrContactRequestIncomingAlreadyReceived - case bertytypes.ContactStateAdded: + case protocoltypes.ContactStateAdded: return nil, errcode.ErrContactRequestContactAlreadyAdded - case bertytypes.ContactStateBlocked: + case protocoltypes.ContactStateBlocked: return nil, errcode.ErrContactRequestContactBlocked default: return nil, errcode.ErrInvalidInput } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountContactRequestReceived{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountContactRequestReceived{ ContactPK: contact.PK, ContactRendezvousSeed: contact.PublicRendezvousSeed, ContactMetadata: contact.Metadata, - }, bertytypes.EventTypeAccountContactRequestIncomingReceived, nil) + }, protocoltypes.EventTypeAccountContactRequestIncomingReceived, nil) } // ContactRequestIncomingDiscard indicates the payload includes that the deviceKeystore has ignored a contact request @@ -660,11 +660,11 @@ func (m *metadataStore) ContactRequestIncomingDiscard(ctx context.Context, pk cr return nil, errcode.ErrGroupInvalidType } - if !m.checkContactStatus(pk, bertytypes.ContactStateReceived) { + if !m.checkContactStatus(pk, protocoltypes.ContactStateReceived) { return nil, errcode.ErrInvalidInput } - return m.contactAction(ctx, pk, &bertytypes.AccountContactRequestDiscarded{}, bertytypes.EventTypeAccountContactRequestIncomingDiscarded) + return m.contactAction(ctx, pk, &protocoltypes.AccountContactRequestDiscarded{}, protocoltypes.EventTypeAccountContactRequestIncomingDiscarded) } // ContactRequestIncomingAccept indicates the payload includes that the deviceKeystore has accepted a contact request @@ -673,11 +673,11 @@ func (m *metadataStore) ContactRequestIncomingAccept(ctx context.Context, pk cry return nil, errcode.ErrGroupInvalidType } - if !m.checkContactStatus(pk, bertytypes.ContactStateReceived) { + if !m.checkContactStatus(pk, protocoltypes.ContactStateReceived) { return nil, errcode.ErrInvalidInput } - return m.contactAction(ctx, pk, &bertytypes.AccountContactRequestAccepted{}, bertytypes.EventTypeAccountContactRequestIncomingAccepted) + return m.contactAction(ctx, pk, &protocoltypes.AccountContactRequestAccepted{}, protocoltypes.EventTypeAccountContactRequestIncomingAccepted) } // ContactBlock indicates the payload includes that the deviceKeystore has blocked a contact @@ -695,11 +695,11 @@ func (m *metadataStore) ContactBlock(ctx context.Context, pk crypto.PubKey) (ope return nil, errcode.ErrInvalidInput } - if m.checkContactStatus(pk, bertytypes.ContactStateBlocked) { + if m.checkContactStatus(pk, protocoltypes.ContactStateBlocked) { return nil, errcode.ErrInvalidInput } - return m.contactAction(ctx, pk, &bertytypes.AccountContactBlocked{}, bertytypes.EventTypeAccountContactBlocked) + return m.contactAction(ctx, pk, &protocoltypes.AccountContactBlocked{}, protocoltypes.EventTypeAccountContactBlocked) } // ContactUnblock indicates the payload includes that the deviceKeystore has unblocked a contact @@ -708,11 +708,11 @@ func (m *metadataStore) ContactUnblock(ctx context.Context, pk crypto.PubKey) (o return nil, errcode.ErrGroupInvalidType } - if !m.checkContactStatus(pk, bertytypes.ContactStateBlocked) { + if !m.checkContactStatus(pk, protocoltypes.ContactStateBlocked) { return nil, errcode.ErrInvalidInput } - return m.contactAction(ctx, pk, &bertytypes.AccountContactUnblocked{}, bertytypes.EventTypeAccountContactUnblocked) + return m.contactAction(ctx, pk, &protocoltypes.AccountContactUnblocked{}, protocoltypes.EventTypeAccountContactUnblocked) } func (m *metadataStore) ContactSendAliasKey(ctx context.Context) (operation.Operation, error) { @@ -730,9 +730,9 @@ func (m *metadataStore) ContactSendAliasKey(ctx context.Context) (operation.Oper return nil, errcode.ErrInternal.Wrap(err) } - return m.attributeSignAndAddEvent(ctx, &bertytypes.ContactAddAliasKey{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.ContactAddAliasKey{ AliasPK: alias, - }, bertytypes.EventTypeContactAliasKeyAdded, nil) + }, protocoltypes.EventTypeContactAliasKeyAdded, nil) } func (m *metadataStore) SendAliasProof(ctx context.Context) (operation.Operation, error) { @@ -743,19 +743,19 @@ func (m *metadataStore) SendAliasProof(ctx context.Context) (operation.Operation resolver := []byte(nil) // TODO: should be a hmac value of something for quicker searches proof := []byte(nil) // TODO: should be a signed value of something - return m.attributeSignAndAddEvent(ctx, &bertytypes.MultiMemberGroupAddAliasResolver{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.MultiMemberGroupAddAliasResolver{ AliasResolver: resolver, AliasProof: proof, - }, bertytypes.EventTypeMultiMemberGroupAliasResolverAdded, nil) + }, protocoltypes.EventTypeMultiMemberGroupAliasResolverAdded, nil) } func (m *metadataStore) SendAppMetadata(ctx context.Context, message []byte, attachmentsCIDs [][]byte) (operation.Operation, error) { - return m.attributeSignAndAddEvent(ctx, &bertytypes.AppMetadata{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AppMetadata{ Message: message, - }, bertytypes.EventTypeGroupMetadataPayloadSent, attachmentsCIDs) + }, protocoltypes.EventTypeGroupMetadataPayloadSent, attachmentsCIDs) } -func (m *metadataStore) SendAccountServiceTokenAdded(ctx context.Context, token *bertytypes.ServiceToken) (operation.Operation, error) { +func (m *metadataStore) SendAccountServiceTokenAdded(ctx context.Context, token *protocoltypes.ServiceToken) (operation.Operation, error) { if !m.typeChecker(isAccountGroup) { return nil, errcode.ErrGroupInvalidType } @@ -768,9 +768,9 @@ func (m *metadataStore) SendAccountServiceTokenAdded(ctx context.Context, token return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("token has already been registered")) } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountServiceTokenAdded{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountServiceTokenAdded{ ServiceToken: token, - }, bertytypes.EventTypeAccountServiceTokenAdded, nil) + }, protocoltypes.EventTypeAccountServiceTokenAdded, nil) } func (m *metadataStore) SendAccountServiceTokenRemoved(ctx context.Context, tokenID string) (operation.Operation, error) { @@ -788,16 +788,16 @@ func (m *metadataStore) SendAccountServiceTokenRemoved(ctx context.Context, toke return nil, errcode.ErrInvalidInput.Wrap(fmt.Errorf("token already removed")) } - return m.attributeSignAndAddEvent(ctx, &bertytypes.AccountServiceTokenRemoved{ + return m.attributeSignAndAddEvent(ctx, &protocoltypes.AccountServiceTokenRemoved{ TokenID: tokenID, - }, bertytypes.EventTypeAccountServiceTokenRemoved, nil) + }, protocoltypes.EventTypeAccountServiceTokenRemoved, nil) } -func (m *metadataStore) SendGroupReplicating(ctx context.Context, t *bertytypes.ServiceToken, endpoint string) (operation.Operation, error) { - return m.attributeSignAndAddEvent(ctx, &bertytypes.GroupReplicating{ +func (m *metadataStore) SendGroupReplicating(ctx context.Context, t *protocoltypes.ServiceToken, endpoint string) (operation.Operation, error) { + return m.attributeSignAndAddEvent(ctx, &protocoltypes.GroupReplicating{ AuthenticationURL: t.AuthenticationURL, ReplicationServer: endpoint, - }, bertytypes.EventTypeGroupReplicating, nil) + }, protocoltypes.EventTypeGroupReplicating, nil) } type accountSignableEvent interface { @@ -816,7 +816,7 @@ type accountGroupEvent interface { SetGroupPK([]byte) } -func (m *metadataStore) attributeSignAndAddEvent(ctx context.Context, evt accountSignableEvent, eventType bertytypes.EventType, attachmentsCIDs [][]byte) (operation.Operation, error) { +func (m *metadataStore) attributeSignAndAddEvent(ctx context.Context, evt accountSignableEvent, eventType protocoltypes.EventType, attachmentsCIDs [][]byte) (operation.Operation, error) { md, err := m.devKS.MemberDeviceForGroup(m.g) if err != nil { return nil, errcode.ErrInternal.Wrap(err) @@ -837,7 +837,7 @@ func (m *metadataStore) attributeSignAndAddEvent(ctx context.Context, evt accoun return metadataStoreAddEvent(ctx, m, m.g, eventType, evt, sig, attachmentsCIDs) } -func (m *metadataStore) contactAction(ctx context.Context, pk crypto.PubKey, event accountContactEvent, evtType bertytypes.EventType) (operation.Operation, error) { +func (m *metadataStore) contactAction(ctx context.Context, pk crypto.PubKey, event accountContactEvent, evtType protocoltypes.EventType) (operation.Operation, error) { if pk == nil || event == nil { return nil, errcode.ErrInvalidInput } @@ -852,7 +852,7 @@ func (m *metadataStore) contactAction(ctx context.Context, pk crypto.PubKey, eve return m.attributeSignAndAddEvent(ctx, event, evtType, nil) } -func (m *metadataStore) groupAction(ctx context.Context, pk crypto.PubKey, event accountGroupEvent, evtType bertytypes.EventType) (operation.Operation, error) { +func (m *metadataStore) groupAction(ctx context.Context, pk crypto.PubKey, event accountGroupEvent, evtType protocoltypes.EventType) (operation.Operation, error) { pkBytes, err := pk.Raw() if err != nil { return nil, errcode.ErrSerialization.Wrap(err) @@ -863,21 +863,21 @@ func (m *metadataStore) groupAction(ctx context.Context, pk crypto.PubKey, event return m.attributeSignAndAddEvent(ctx, event, evtType, nil) } -func (m *metadataStore) getContactStatus(pk crypto.PubKey) bertytypes.ContactState { +func (m *metadataStore) getContactStatus(pk crypto.PubKey) protocoltypes.ContactState { if pk == nil { - return bertytypes.ContactStateUndefined + return protocoltypes.ContactStateUndefined } contact, err := m.Index().(*metadataStoreIndex).getContact(pk) if err != nil { m.logger.Warn("unable to get contact for public key", zap.Error(err)) - return bertytypes.ContactStateUndefined + return protocoltypes.ContactStateUndefined } return contact.state } -func (m *metadataStore) checkContactStatus(pk crypto.PubKey, states ...bertytypes.ContactState) bool { +func (m *metadataStore) checkContactStatus(pk crypto.PubKey, states ...protocoltypes.ContactState) bool { contactStatus := m.getContactStatus(pk) for _, s := range states { @@ -889,11 +889,11 @@ func (m *metadataStore) checkContactStatus(pk crypto.PubKey, states ...bertytype return false } -func (m *metadataStore) listServiceTokens() []*bertytypes.ServiceToken { +func (m *metadataStore) listServiceTokens() []*protocoltypes.ServiceToken { return m.Index().(*metadataStoreIndex).listServiceTokens() } -func (m *metadataStore) getServiceToken(tokenID string) (*bertytypes.ServiceToken, error) { +func (m *metadataStore) getServiceToken(tokenID string) (*protocoltypes.ServiceToken, error) { m.Index().(*metadataStoreIndex).lock.RLock() defer m.Index().(*metadataStoreIndex).lock.RUnlock() @@ -906,7 +906,7 @@ func (m *metadataStore) getServiceToken(tokenID string) (*bertytypes.ServiceToke } type EventMetadataReceived struct { - MetaEvent *bertytypes.GroupMetadataEvent + MetaEvent *protocoltypes.GroupMetadataEvent Event proto.Message } @@ -1000,7 +1000,7 @@ func constructorFactoryGroupMetadata(s *BertyOrbitDB) iface.StoreConstructor { } } -func newSecretEntryPayload(localDevicePrivKey crypto.PrivKey, remoteMemberPubKey crypto.PubKey, secret *bertytypes.DeviceSecret, group *bertytypes.Group) ([]byte, error) { +func newSecretEntryPayload(localDevicePrivKey crypto.PrivKey, remoteMemberPubKey crypto.PubKey, secret *protocoltypes.DeviceSecret, group *protocoltypes.Group) ([]byte, error) { message, err := secret.Marshal() if err != nil { return nil, errcode.ErrSerialization.Wrap(err) diff --git a/go/pkg/bertyprotocol/store_metadata_index.go b/go/pkg/bertyprotocol/store_metadata_index.go index a6bcf51ed6..a76082f852 100644 --- a/go/pkg/bertyprotocol/store_metadata_index.go +++ b/go/pkg/bertyprotocol/store_metadata_index.go @@ -9,8 +9,8 @@ import ( "github.com/libp2p/go-libp2p-core/crypto" "go.uber.org/zap" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" ipfslog "berty.tech/go-ipfs-log" "berty.tech/go-orbit-db/events" "berty.tech/go-orbit-db/iface" @@ -26,16 +26,16 @@ type metadataStoreIndex struct { contacts map[string]*accountContact contactsFromGroupPK map[string]*accountContact groups map[string]*accountGroup - serviceTokens map[string]*bertytypes.ServiceToken + serviceTokens map[string]*protocoltypes.ServiceToken contactRequestMetadata map[string][]byte contactRequestSeed []byte contactRequestEnabled *bool - eventHandlers map[bertytypes.EventType][]func(event proto.Message) error + eventHandlers map[protocoltypes.EventType][]func(event proto.Message) error postIndexActions []func() error - eventsContactAddAliasKey []*bertytypes.ContactAddAliasKey + eventsContactAddAliasKey []*protocoltypes.ContactAddAliasKey ownAliasKeySent bool otherAliasKey []byte - g *bertytypes.Group + g *protocoltypes.Group ownMemberDevice *memberDevice deviceKeystore DeviceKeystore ctx context.Context @@ -66,7 +66,7 @@ func (m *metadataStoreIndex) UpdateIndex(log ipfslog.Log, _ []ipfslog.Entry) err m.contacts = map[string]*accountContact{} m.contactsFromGroupPK = map[string]*accountContact{} m.groups = map[string]*accountGroup{} - m.serviceTokens = map[string]*bertytypes.ServiceToken{} + m.serviceTokens = map[string]*protocoltypes.ServiceToken{} m.contactRequestMetadata = map[string][]byte{} m.contactRequestEnabled = nil m.contactRequestSeed = []byte(nil) @@ -77,7 +77,7 @@ func (m *metadataStoreIndex) UpdateIndex(log ipfslog.Log, _ []ipfslog.Entry) err _, alreadyHandledEvent := m.handledEvents[e.GetHash().String()] // TODO: improve account events handling - if m.g.GroupType != bertytypes.GroupTypeAccount && alreadyHandledEvent { + if m.g.GroupType != protocoltypes.GroupTypeAccount && alreadyHandledEvent { continue } @@ -122,7 +122,7 @@ func (m *metadataStoreIndex) UpdateIndex(log ipfslog.Log, _ []ipfslog.Entry) err } func (m *metadataStoreIndex) handleGroupAddMemberDevice(event proto.Message) error { - e, ok := event.(*bertytypes.GroupAddMemberDevice) + e, ok := event.(*protocoltypes.GroupAddMemberDevice) if !ok { return errcode.ErrInvalidInput } @@ -155,7 +155,7 @@ func (m *metadataStoreIndex) handleGroupAddMemberDevice(event proto.Message) err } func (m *metadataStoreIndex) handleGroupAddDeviceSecret(event proto.Message) error { - e, ok := event.(*bertytypes.GroupAddDeviceSecret) + e, ok := event.(*protocoltypes.GroupAddDeviceSecret) if !ok { return errcode.ErrInvalidInput } @@ -243,7 +243,7 @@ func (m *metadataStoreIndex) listContacts() map[string]*accountContact { for k, contact := range m.contacts { contacts[k] = &accountContact{ state: contact.state, - contact: &bertytypes.ShareableContact{ + contact: &protocoltypes.ShareableContact{ PK: contact.contact.PK, PublicRendezvousSeed: contact.contact.PublicRendezvousSeed, Metadata: contact.contact.Metadata, @@ -306,16 +306,16 @@ const ( type accountGroup struct { state accountGroupJoinedState - group *bertytypes.Group + group *protocoltypes.Group } type accountContact struct { - state bertytypes.ContactState - contact *bertytypes.ShareableContact + state protocoltypes.ContactState + contact *protocoltypes.ShareableContact } func (m *metadataStoreIndex) handleGroupJoined(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountGroupJoined) + evt, ok := event.(*protocoltypes.AccountGroupJoined) if !ok { return errcode.ErrInvalidInput } @@ -334,7 +334,7 @@ func (m *metadataStoreIndex) handleGroupJoined(event proto.Message) error { } func (m *metadataStoreIndex) handleGroupLeft(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountGroupLeft) + evt, ok := event.(*protocoltypes.AccountGroupLeft) if !ok { return errcode.ErrInvalidInput } @@ -356,7 +356,7 @@ func (m *metadataStoreIndex) handleContactRequestDisabled(event proto.Message) e return nil } - _, ok := event.(*bertytypes.AccountContactRequestDisabled) + _, ok := event.(*protocoltypes.AccountContactRequestDisabled) if !ok { return errcode.ErrInvalidInput } @@ -372,7 +372,7 @@ func (m *metadataStoreIndex) handleContactRequestEnabled(event proto.Message) er return nil } - _, ok := event.(*bertytypes.AccountContactRequestEnabled) + _, ok := event.(*protocoltypes.AccountContactRequestEnabled) if !ok { return errcode.ErrInvalidInput } @@ -384,7 +384,7 @@ func (m *metadataStoreIndex) handleContactRequestEnabled(event proto.Message) er } func (m *metadataStoreIndex) handleContactRequestReferenceReset(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactRequestReferenceReset) + evt, ok := event.(*protocoltypes.AccountContactRequestReferenceReset) if !ok { return errcode.ErrInvalidInput } @@ -399,7 +399,7 @@ func (m *metadataStoreIndex) handleContactRequestReferenceReset(event proto.Mess } func (m *metadataStoreIndex) registerContactFromGroupPK(ac *accountContact) error { - if m.g.GroupType != bertytypes.GroupTypeAccount { + if m.g.GroupType != protocoltypes.GroupTypeAccount { return errcode.ErrGroupInvalidType } @@ -424,7 +424,7 @@ func (m *metadataStoreIndex) registerContactFromGroupPK(ac *accountContact) erro } func (m *metadataStoreIndex) handleContactRequestOutgoingEnqueued(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactRequestEnqueued) + evt, ok := event.(*protocoltypes.AccountContactRequestEnqueued) if ko := !ok || evt.Contact == nil; ko { return errcode.ErrInvalidInput } @@ -446,8 +446,8 @@ func (m *metadataStoreIndex) handleContactRequestOutgoingEnqueued(event proto.Me } ac := &accountContact{ - state: bertytypes.ContactStateToRequest, - contact: &bertytypes.ShareableContact{ + state: protocoltypes.ContactStateToRequest, + contact: &protocoltypes.ShareableContact{ PK: evt.Contact.PK, Metadata: evt.Contact.Metadata, PublicRendezvousSeed: evt.Contact.PublicRendezvousSeed, @@ -461,7 +461,7 @@ func (m *metadataStoreIndex) handleContactRequestOutgoingEnqueued(event proto.Me } func (m *metadataStoreIndex) handleContactRequestOutgoingSent(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactRequestSent) + evt, ok := event.(*protocoltypes.AccountContactRequestSent) if !ok { return errcode.ErrInvalidInput } @@ -471,8 +471,8 @@ func (m *metadataStoreIndex) handleContactRequestOutgoingSent(event proto.Messag } ac := &accountContact{ - state: bertytypes.ContactStateAdded, - contact: &bertytypes.ShareableContact{ + state: protocoltypes.ContactStateAdded, + contact: &protocoltypes.ShareableContact{ PK: evt.ContactPK, }, } @@ -484,7 +484,7 @@ func (m *metadataStoreIndex) handleContactRequestOutgoingSent(event proto.Messag } func (m *metadataStoreIndex) handleContactRequestIncomingReceived(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactRequestReceived) + evt, ok := event.(*protocoltypes.AccountContactRequestReceived) if !ok { return errcode.ErrInvalidInput } @@ -502,8 +502,8 @@ func (m *metadataStoreIndex) handleContactRequestIncomingReceived(event proto.Me } ac := &accountContact{ - state: bertytypes.ContactStateReceived, - contact: &bertytypes.ShareableContact{ + state: protocoltypes.ContactStateReceived, + contact: &protocoltypes.ShareableContact{ PK: evt.ContactPK, Metadata: evt.ContactMetadata, PublicRendezvousSeed: evt.ContactRendezvousSeed, @@ -517,7 +517,7 @@ func (m *metadataStoreIndex) handleContactRequestIncomingReceived(event proto.Me } func (m *metadataStoreIndex) handleContactRequestIncomingDiscarded(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactRequestDiscarded) + evt, ok := event.(*protocoltypes.AccountContactRequestDiscarded) if !ok { return errcode.ErrInvalidInput } @@ -527,8 +527,8 @@ func (m *metadataStoreIndex) handleContactRequestIncomingDiscarded(event proto.M } ac := &accountContact{ - state: bertytypes.ContactStateDiscarded, - contact: &bertytypes.ShareableContact{ + state: protocoltypes.ContactStateDiscarded, + contact: &protocoltypes.ShareableContact{ PK: evt.ContactPK, }, } @@ -540,7 +540,7 @@ func (m *metadataStoreIndex) handleContactRequestIncomingDiscarded(event proto.M } func (m *metadataStoreIndex) handleContactRequestIncomingAccepted(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactRequestAccepted) + evt, ok := event.(*protocoltypes.AccountContactRequestAccepted) if !ok { return errcode.ErrInvalidInput } @@ -550,8 +550,8 @@ func (m *metadataStoreIndex) handleContactRequestIncomingAccepted(event proto.Me } ac := &accountContact{ - state: bertytypes.ContactStateAdded, - contact: &bertytypes.ShareableContact{ + state: protocoltypes.ContactStateAdded, + contact: &protocoltypes.ShareableContact{ PK: evt.ContactPK, }, } @@ -563,7 +563,7 @@ func (m *metadataStoreIndex) handleContactRequestIncomingAccepted(event proto.Me } func (m *metadataStoreIndex) handleContactBlocked(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactBlocked) + evt, ok := event.(*protocoltypes.AccountContactBlocked) if !ok { return errcode.ErrInvalidInput } @@ -573,8 +573,8 @@ func (m *metadataStoreIndex) handleContactBlocked(event proto.Message) error { } ac := &accountContact{ - state: bertytypes.ContactStateBlocked, - contact: &bertytypes.ShareableContact{ + state: protocoltypes.ContactStateBlocked, + contact: &protocoltypes.ShareableContact{ PK: evt.ContactPK, }, } @@ -586,7 +586,7 @@ func (m *metadataStoreIndex) handleContactBlocked(event proto.Message) error { } func (m *metadataStoreIndex) handleContactUnblocked(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountContactUnblocked) + evt, ok := event.(*protocoltypes.AccountContactUnblocked) if !ok { return errcode.ErrInvalidInput } @@ -596,8 +596,8 @@ func (m *metadataStoreIndex) handleContactUnblocked(event proto.Message) error { } ac := &accountContact{ - state: bertytypes.ContactStateRemoved, - contact: &bertytypes.ShareableContact{ + state: protocoltypes.ContactStateRemoved, + contact: &protocoltypes.ShareableContact{ PK: evt.ContactPK, }, } @@ -609,7 +609,7 @@ func (m *metadataStoreIndex) handleContactUnblocked(event proto.Message) error { } func (m *metadataStoreIndex) handleContactAliasKeyAdded(event proto.Message) error { - evt, ok := event.(*bertytypes.ContactAddAliasKey) + evt, ok := event.(*protocoltypes.ContactAddAliasKey) if !ok { return errcode.ErrInvalidInput } @@ -619,11 +619,11 @@ func (m *metadataStoreIndex) handleContactAliasKeyAdded(event proto.Message) err return nil } -func (m *metadataStoreIndex) listServiceTokens() []*bertytypes.ServiceToken { +func (m *metadataStoreIndex) listServiceTokens() []*protocoltypes.ServiceToken { m.lock.RLock() defer m.lock.RUnlock() - ret := []*bertytypes.ServiceToken(nil) + ret := []*protocoltypes.ServiceToken(nil) for _, t := range m.serviceTokens { if t == nil { @@ -637,7 +637,7 @@ func (m *metadataStoreIndex) listServiceTokens() []*bertytypes.ServiceToken { } func (m *metadataStoreIndex) handleAccountServiceTokenAdded(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountServiceTokenAdded) + evt, ok := event.(*protocoltypes.AccountServiceTokenAdded) if !ok { return errcode.ErrInvalidInput } @@ -652,7 +652,7 @@ func (m *metadataStoreIndex) handleAccountServiceTokenAdded(event proto.Message) } func (m *metadataStoreIndex) handleAccountServiceTokenRemoved(event proto.Message) error { - evt, ok := event.(*bertytypes.AccountServiceTokenRemoved) + evt, ok := event.(*protocoltypes.AccountServiceTokenRemoved) if !ok { return errcode.ErrInvalidInput } @@ -663,7 +663,7 @@ func (m *metadataStoreIndex) handleAccountServiceTokenRemoved(event proto.Messag } func (m *metadataStoreIndex) handleMultiMemberInitialMember(event proto.Message) error { - e, ok := event.(*bertytypes.MultiMemberInitialMember) + e, ok := event.(*protocoltypes.MultiMemberInitialMember) if !ok { return errcode.ErrInvalidInput } @@ -764,7 +764,7 @@ func (m *metadataStoreIndex) postHandlerSentAliases() error { } // newMetadataIndex returns a new index to manage the list of the group members -func newMetadataIndex(ctx context.Context, eventEmitter events.EmitterInterface, g *bertytypes.Group, md *memberDevice, devKS DeviceKeystore) iface.IndexConstructor { +func newMetadataIndex(ctx context.Context, eventEmitter events.EmitterInterface, g *protocoltypes.Group, md *memberDevice, devKS DeviceKeystore) iface.IndexConstructor { return func(publicKey []byte) iface.StoreIndex { m := &metadataStoreIndex{ members: map[string][]*memberDevice{}, @@ -775,7 +775,7 @@ func newMetadataIndex(ctx context.Context, eventEmitter events.EmitterInterface, contacts: map[string]*accountContact{}, contactsFromGroupPK: map[string]*accountContact{}, groups: map[string]*accountGroup{}, - serviceTokens: map[string]*bertytypes.ServiceToken{}, + serviceTokens: map[string]*protocoltypes.ServiceToken{}, contactRequestMetadata: map[string][]byte{}, g: g, eventEmitter: eventEmitter, @@ -785,26 +785,26 @@ func newMetadataIndex(ctx context.Context, eventEmitter events.EmitterInterface, logger: zap.NewNop(), } - m.eventHandlers = map[bertytypes.EventType][]func(event proto.Message) error{ - bertytypes.EventTypeAccountContactBlocked: {m.handleContactBlocked}, - bertytypes.EventTypeAccountContactRequestDisabled: {m.handleContactRequestDisabled}, - bertytypes.EventTypeAccountContactRequestEnabled: {m.handleContactRequestEnabled}, - bertytypes.EventTypeAccountContactRequestIncomingAccepted: {m.handleContactRequestIncomingAccepted}, - bertytypes.EventTypeAccountContactRequestIncomingDiscarded: {m.handleContactRequestIncomingDiscarded}, - bertytypes.EventTypeAccountContactRequestIncomingReceived: {m.handleContactRequestIncomingReceived}, - bertytypes.EventTypeAccountContactRequestOutgoingEnqueued: {m.handleContactRequestOutgoingEnqueued}, - bertytypes.EventTypeAccountContactRequestOutgoingSent: {m.handleContactRequestOutgoingSent}, - bertytypes.EventTypeAccountContactRequestReferenceReset: {m.handleContactRequestReferenceReset}, - bertytypes.EventTypeAccountContactUnblocked: {m.handleContactUnblocked}, - bertytypes.EventTypeAccountGroupJoined: {m.handleGroupJoined}, - bertytypes.EventTypeAccountGroupLeft: {m.handleGroupLeft}, - bertytypes.EventTypeContactAliasKeyAdded: {m.handleContactAliasKeyAdded}, - bertytypes.EventTypeGroupDeviceSecretAdded: {m.handleGroupAddDeviceSecret}, - bertytypes.EventTypeGroupMemberDeviceAdded: {m.handleGroupAddMemberDevice}, - bertytypes.EventTypeMultiMemberGroupAdminRoleGranted: {m.handleMultiMemberGrantAdminRole}, - bertytypes.EventTypeMultiMemberGroupInitialMemberAnnounced: {m.handleMultiMemberInitialMember}, - bertytypes.EventTypeAccountServiceTokenAdded: {m.handleAccountServiceTokenAdded}, - bertytypes.EventTypeAccountServiceTokenRemoved: {m.handleAccountServiceTokenRemoved}, + m.eventHandlers = map[protocoltypes.EventType][]func(event proto.Message) error{ + protocoltypes.EventTypeAccountContactBlocked: {m.handleContactBlocked}, + protocoltypes.EventTypeAccountContactRequestDisabled: {m.handleContactRequestDisabled}, + protocoltypes.EventTypeAccountContactRequestEnabled: {m.handleContactRequestEnabled}, + protocoltypes.EventTypeAccountContactRequestIncomingAccepted: {m.handleContactRequestIncomingAccepted}, + protocoltypes.EventTypeAccountContactRequestIncomingDiscarded: {m.handleContactRequestIncomingDiscarded}, + protocoltypes.EventTypeAccountContactRequestIncomingReceived: {m.handleContactRequestIncomingReceived}, + protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued: {m.handleContactRequestOutgoingEnqueued}, + protocoltypes.EventTypeAccountContactRequestOutgoingSent: {m.handleContactRequestOutgoingSent}, + protocoltypes.EventTypeAccountContactRequestReferenceReset: {m.handleContactRequestReferenceReset}, + protocoltypes.EventTypeAccountContactUnblocked: {m.handleContactUnblocked}, + protocoltypes.EventTypeAccountGroupJoined: {m.handleGroupJoined}, + protocoltypes.EventTypeAccountGroupLeft: {m.handleGroupLeft}, + protocoltypes.EventTypeContactAliasKeyAdded: {m.handleContactAliasKeyAdded}, + protocoltypes.EventTypeGroupDeviceSecretAdded: {m.handleGroupAddDeviceSecret}, + protocoltypes.EventTypeGroupMemberDeviceAdded: {m.handleGroupAddMemberDevice}, + protocoltypes.EventTypeMultiMemberGroupAdminRoleGranted: {m.handleMultiMemberGrantAdminRole}, + protocoltypes.EventTypeMultiMemberGroupInitialMemberAnnounced: {m.handleMultiMemberInitialMember}, + protocoltypes.EventTypeAccountServiceTokenAdded: {m.handleAccountServiceTokenAdded}, + protocoltypes.EventTypeAccountServiceTokenRemoved: {m.handleAccountServiceTokenRemoved}, } m.postIndexActions = []func() error{ diff --git a/go/pkg/bertyprotocol/store_metadata_test.go b/go/pkg/bertyprotocol/store_metadata_test.go index 6497f42364..27579474a7 100644 --- a/go/pkg/bertyprotocol/store_metadata_test.go +++ b/go/pkg/bertyprotocol/store_metadata_test.go @@ -19,7 +19,7 @@ import ( "berty.tech/berty/v2/go/internal/ipfsutil" "berty.tech/berty/v2/go/internal/testutil" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestMetadataStoreSecret_Basic(t *testing.T) { @@ -45,8 +45,8 @@ func TestMetadataStoreSecret_Basic(t *testing.T) { go WatchNewMembersAndSendSecrets(ctx, logger, peers[0].GC) go WatchNewMembersAndSendSecrets(ctx, logger, peers[1].GC) - go waitForBertyEventType(ctx, t, msA, bertytypes.EventTypeGroupDeviceSecretAdded, 2, secretsAdded) - go waitForBertyEventType(ctx, t, msB, bertytypes.EventTypeGroupDeviceSecretAdded, 2, secretsAdded) + go waitForBertyEventType(ctx, t, msA, protocoltypes.EventTypeGroupDeviceSecretAdded, 2, secretsAdded) + go waitForBertyEventType(ctx, t, msB, protocoltypes.EventTypeGroupDeviceSecretAdded, 2, secretsAdded) inviteAllPeersToGroup(ctx, t, peers, groupSK) devPkA := peers[0].GC.DevicePubKey() @@ -118,7 +118,7 @@ func testMemberStore(t *testing.T, memberCount, deviceCount int) { done := make(chan struct{}) for _, peer := range peers { - go waitForBertyEventType(ctx, t, peer.GC.MetadataStore(), bertytypes.EventTypeGroupMemberDeviceAdded, len(peers), done) + go waitForBertyEventType(ctx, t, peer.GC.MetadataStore(), protocoltypes.EventTypeGroupMemberDeviceAdded, len(peers), done) } for i, peer := range peers { @@ -260,7 +260,7 @@ func TestMetadataContactLifecycle(t *testing.T) { err error meta = make([]*metadataStore, peersCount) ownCG = make([]*groupContext, peersCount) - contacts = make([]*bertytypes.ShareableContact, peersCount) + contacts = make([]*protocoltypes.ShareableContact, peersCount) ) api, cleanupNode := ipfsAPIUsingMockNet(ctx, t) @@ -305,7 +305,7 @@ func TestMetadataContactLifecycle(t *testing.T) { require.Equal(t, len(meta[0].Index().(*metadataStoreIndex).contacts), 1) require.NotNil(t, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)]) - require.Equal(t, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].state, bertytypes.ContactStateToRequest) + require.Equal(t, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].state, protocoltypes.ContactStateToRequest) require.Equal(t, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].contact.PK, contact2PK) require.Equal(t, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].contact.PublicRendezvousSeed, contact2RDVS) require.Equal(t, contacts[0].Metadata, meta[0].Index().(*metadataStoreIndex).contactRequestMetadata[string(contact2PK)]) @@ -329,7 +329,7 @@ func TestMetadataContactLifecycle(t *testing.T) { require.Equal(t, 1, len(meta[0].Index().(*metadataStoreIndex).contacts)) require.NotNil(t, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)]) - require.Equal(t, bertytypes.ContactStateToRequest, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].state) + require.Equal(t, protocoltypes.ContactStateToRequest, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].state) require.Equal(t, contact2PK, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].contact.PK) require.Equal(t, contact2RDVS, meta[0].Index().(*metadataStoreIndex).contacts[string(contact2PK)].contact.PublicRendezvousSeed) require.Equal(t, contacts[0].Metadata, meta[0].Index().(*metadataStoreIndex).contactRequestMetadata[string(contact2PK)]) @@ -349,32 +349,32 @@ func TestMetadataContactLifecycle(t *testing.T) { _, err = meta[0].ContactRequestOutgoingSent(ctx, ownCG[0].MemberPubKey()) require.Error(t, err) - meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].state = bertytypes.ContactStateAdded + meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].state = protocoltypes.ContactStateAdded _, err = meta[0].ContactRequestOutgoingSent(ctx, ownCG[1].MemberPubKey()) require.Error(t, err) - meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].state = bertytypes.ContactStateToRequest + meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].state = protocoltypes.ContactStateToRequest _, err = meta[0].ContactRequestOutgoingSent(ctx, ownCG[1].MemberPubKey()) require.NoError(t, err) require.Equal(t, len(meta[0].Index().(*metadataStoreIndex).contacts), 1) require.NotNil(t, meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)]) - require.Equal(t, bertytypes.ContactStateAdded, meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].state) + require.Equal(t, protocoltypes.ContactStateAdded, meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].state) require.Equal(t, contacts[1].PK, meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].contact.PK) require.Equal(t, contacts[1].PublicRendezvousSeed, meta[0].Index().(*metadataStoreIndex).contacts[string(contacts[1].PK)].contact.PublicRendezvousSeed) // Marking as received - _, err = meta[1].ContactRequestIncomingReceived(ctx, &bertytypes.ShareableContact{}) + _, err = meta[1].ContactRequestIncomingReceived(ctx, &protocoltypes.ShareableContact{}) require.Error(t, err) - _, err = meta[1].ContactRequestIncomingReceived(ctx, &bertytypes.ShareableContact{PK: []byte("invalid"), PublicRendezvousSeed: []byte("invalid")}) + _, err = meta[1].ContactRequestIncomingReceived(ctx, &protocoltypes.ShareableContact{PK: []byte("invalid"), PublicRendezvousSeed: []byte("invalid")}) require.Error(t, err) - _, err = meta[1].ContactRequestIncomingReceived(ctx, &bertytypes.ShareableContact{PK: []byte("invalid"), PublicRendezvousSeed: contacts[0].PublicRendezvousSeed}) + _, err = meta[1].ContactRequestIncomingReceived(ctx, &protocoltypes.ShareableContact{PK: []byte("invalid"), PublicRendezvousSeed: contacts[0].PublicRendezvousSeed}) require.Error(t, err) - _, err = meta[1].ContactRequestIncomingReceived(ctx, &bertytypes.ShareableContact{PK: contacts[0].PK, PublicRendezvousSeed: []byte("invalid")}) + _, err = meta[1].ContactRequestIncomingReceived(ctx, &protocoltypes.ShareableContact{PK: contacts[0].PK, PublicRendezvousSeed: []byte("invalid")}) require.Error(t, err) _, err = meta[1].ContactRequestIncomingReceived(ctx, contacts[1]) @@ -385,7 +385,7 @@ func TestMetadataContactLifecycle(t *testing.T) { require.Equal(t, len(meta[1].Index().(*metadataStoreIndex).contacts), 1) require.NotNil(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)]) - require.Equal(t, bertytypes.ContactStateReceived, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state) + require.Equal(t, protocoltypes.ContactStateReceived, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state) require.Equal(t, contacts[0].PK, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].contact.PK) require.Equal(t, contacts[0].PublicRendezvousSeed, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].contact.PublicRendezvousSeed) require.Equal(t, contacts[0].Metadata, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].contact.Metadata) @@ -406,7 +406,7 @@ func TestMetadataContactLifecycle(t *testing.T) { require.Equal(t, len(meta[1].Index().(*metadataStoreIndex).contacts), 1) require.NotNil(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)]) - require.Equal(t, bertytypes.ContactStateAdded, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state) + require.Equal(t, protocoltypes.ContactStateAdded, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state) require.Equal(t, contacts[0].PK, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].contact.PK) require.Equal(t, contacts[0].PublicRendezvousSeed, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].contact.PublicRendezvousSeed) @@ -423,7 +423,7 @@ func TestMetadataContactLifecycle(t *testing.T) { require.Equal(t, 2, len(meta[1].Index().(*metadataStoreIndex).contacts)) - require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[3].PK)].state, bertytypes.ContactStateAdded) + require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[3].PK)].state, protocoltypes.ContactStateAdded) // Refuse contact @@ -431,7 +431,7 @@ func TestMetadataContactLifecycle(t *testing.T) { require.NoError(t, err) require.Equal(t, len(meta[1].Index().(*metadataStoreIndex).contacts), 3) - require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, bertytypes.ContactStateReceived) + require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, protocoltypes.ContactStateReceived) _, err = meta[1].ContactRequestIncomingDiscard(ctx, nil) require.Error(t, err) @@ -449,7 +449,7 @@ func TestMetadataContactLifecycle(t *testing.T) { require.NoError(t, err) require.Equal(t, len(meta[1].Index().(*metadataStoreIndex).contacts), 3) - require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, bertytypes.ContactStateDiscarded) + require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, protocoltypes.ContactStateDiscarded) // Allow receiving requests again after discarded @@ -457,23 +457,23 @@ func TestMetadataContactLifecycle(t *testing.T) { require.NoError(t, err) require.Equal(t, len(meta[1].Index().(*metadataStoreIndex).contacts), 3) - require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, bertytypes.ContactStateReceived) + require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, protocoltypes.ContactStateReceived) _, err = meta[1].ContactRequestOutgoingEnqueue(ctx, contacts[2], contacts[1].Metadata) require.NoError(t, err) require.Equal(t, len(meta[1].Index().(*metadataStoreIndex).contacts), 3) - require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, bertytypes.ContactStateAdded) + require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, protocoltypes.ContactStateAdded) // Auto accept discarded requests - meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state = bertytypes.ContactStateDiscarded + meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state = protocoltypes.ContactStateDiscarded _, err = meta[1].ContactRequestOutgoingEnqueue(ctx, contacts[2], contacts[1].Metadata) require.NoError(t, err) require.Equal(t, len(meta[1].Index().(*metadataStoreIndex).contacts), 3) - require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, bertytypes.ContactStateAdded) + require.Equal(t, meta[1].Index().(*metadataStoreIndex).contacts[string(contacts[2].PK)].state, protocoltypes.ContactStateAdded) // Block contact @@ -486,29 +486,29 @@ func TestMetadataContactLifecycle(t *testing.T) { _, err = meta[2].ContactBlock(ctx, ownCG[0].MemberPubKey()) require.NoError(t, err) require.Equal(t, len(meta[2].Index().(*metadataStoreIndex).contacts), 1) - require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, bertytypes.ContactStateBlocked) + require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, protocoltypes.ContactStateBlocked) _, err = meta[2].ContactBlock(ctx, ownCG[0].MemberPubKey()) require.Error(t, err) require.Equal(t, len(meta[2].Index().(*metadataStoreIndex).contacts), 1) - require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, bertytypes.ContactStateBlocked) + require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, protocoltypes.ContactStateBlocked) // Unblock contact _, err = meta[2].ContactUnblock(ctx, ownCG[1].MemberPubKey()) require.Error(t, err) require.Equal(t, len(meta[2].Index().(*metadataStoreIndex).contacts), 1) - require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, bertytypes.ContactStateBlocked) + require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, protocoltypes.ContactStateBlocked) _, err = meta[2].ContactUnblock(ctx, ownCG[0].MemberPubKey()) require.NoError(t, err) require.Equal(t, len(meta[2].Index().(*metadataStoreIndex).contacts), 1) - require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, bertytypes.ContactStateRemoved) + require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, protocoltypes.ContactStateRemoved) _, err = meta[2].ContactUnblock(ctx, ownCG[0].MemberPubKey()) require.Error(t, err) require.Equal(t, len(meta[2].Index().(*metadataStoreIndex).contacts), 1) - require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, bertytypes.ContactStateRemoved) + require.Equal(t, meta[2].Index().(*metadataStoreIndex).contacts[string(contacts[0].PK)].state, protocoltypes.ContactStateRemoved) } func TestMetadataAliasLifecycle(t *testing.T) { @@ -621,30 +621,30 @@ func TestMetadataGroupsLifecycle(t *testing.T) { require.Equal(t, groups[second].SecretSig, g2.SecretSig) require.Equal(t, groups[second].GroupType, g2.GroupType) - _, err = ownCG.MetadataStore().GroupJoin(ctx, &bertytypes.Group{ + _, err = ownCG.MetadataStore().GroupJoin(ctx, &protocoltypes.Group{ PublicKey: []byte("invalid_pk"), Secret: g3.Secret, SecretSig: g3.SecretSig, - GroupType: bertytypes.GroupTypeMultiMember, + GroupType: protocoltypes.GroupTypeMultiMember, }) require.Error(t, err) groups = ownCG.MetadataStore().ListMultiMemberGroups() require.Len(t, groups, 2) - _, err = ownCG.MetadataStore().GroupJoin(ctx, &bertytypes.Group{ + _, err = ownCG.MetadataStore().GroupJoin(ctx, &protocoltypes.Group{ PublicKey: g3.PublicKey, Secret: nil, SecretSig: g3.SecretSig, - GroupType: bertytypes.GroupTypeMultiMember, + GroupType: protocoltypes.GroupTypeMultiMember, }) require.Error(t, err) - _, err = ownCG.MetadataStore().GroupJoin(ctx, &bertytypes.Group{ + _, err = ownCG.MetadataStore().GroupJoin(ctx, &protocoltypes.Group{ PublicKey: g3.PublicKey, Secret: g3.Secret, SecretSig: []byte("invalid_sig"), - GroupType: bertytypes.GroupTypeMultiMember, + GroupType: protocoltypes.GroupTypeMultiMember, }) require.Error(t, err) @@ -711,9 +711,9 @@ func TestMultiDevices_Basic(t *testing.T) { err error meta = make([]*metadataStore, totalDevices) ownCG = make([]*groupContext, totalDevices) - contacts = make([]*bertytypes.ShareableContact, totalDevices) + contacts = make([]*protocoltypes.ShareableContact, totalDevices) listContacts map[string]*accountContact - groups []*bertytypes.Group + groups []*protocoltypes.Group ) // Activate account group + contact request @@ -739,10 +739,10 @@ func TestMultiDevices_Basic(t *testing.T) { } syncChan := make(chan struct{}) - go waitForBertyEventType(ctx, t, meta[pi[0][0]], bertytypes.EventTypeAccountContactRequestOutgoingEnqueued, 1, syncChan) - go waitForBertyEventType(ctx, t, meta[pi[0][1]], bertytypes.EventTypeAccountContactRequestOutgoingEnqueued, 1, syncChan) - go waitForBertyEventType(ctx, t, meta[pi[1][0]], bertytypes.EventTypeAccountContactRequestIncomingReceived, 1, syncChan) - go waitForBertyEventType(ctx, t, meta[pi[1][1]], bertytypes.EventTypeAccountContactRequestIncomingReceived, 1, syncChan) + go waitForBertyEventType(ctx, t, meta[pi[0][0]], protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued, 1, syncChan) + go waitForBertyEventType(ctx, t, meta[pi[0][1]], protocoltypes.EventTypeAccountContactRequestOutgoingEnqueued, 1, syncChan) + go waitForBertyEventType(ctx, t, meta[pi[1][0]], protocoltypes.EventTypeAccountContactRequestIncomingReceived, 1, syncChan) + go waitForBertyEventType(ctx, t, meta[pi[1][1]], protocoltypes.EventTypeAccountContactRequestIncomingReceived, 1, syncChan) // Add peers to contact // Enqueuing outgoing @@ -788,8 +788,8 @@ func TestMultiDevices_Basic(t *testing.T) { // Activate group for 2nd peer's 1st device groups = meta[pi[1][0]].ListMultiMemberGroups() require.Len(t, groups, 0) - go waitForBertyEventType(ctx, t, meta[pi[1][0]], bertytypes.EventTypeAccountGroupJoined, 1, syncChan) - go waitForBertyEventType(ctx, t, meta[pi[1][1]], bertytypes.EventTypeAccountGroupJoined, 1, syncChan) + go waitForBertyEventType(ctx, t, meta[pi[1][0]], protocoltypes.EventTypeAccountGroupJoined, 1, syncChan) + go waitForBertyEventType(ctx, t, meta[pi[1][1]], protocoltypes.EventTypeAccountGroupJoined, 1, syncChan) _, err = meta[pi[1][0]].GroupJoin(ctx, peers[pi[1][0]].GC.group) require.NoError(t, err) for i := 0; i < 2; i++ { diff --git a/go/pkg/bertyprotocol/store_options.go b/go/pkg/bertyprotocol/store_options.go index 76e4a6a3bc..f26880d51a 100644 --- a/go/pkg/bertyprotocol/store_options.go +++ b/go/pkg/bertyprotocol/store_options.go @@ -3,14 +3,14 @@ package bertyprotocol import ( "encoding/hex" - "berty.tech/berty/v2/go/pkg/bertytypes" "berty.tech/berty/v2/go/pkg/errcode" + "berty.tech/berty/v2/go/pkg/protocoltypes" "berty.tech/go-ipfs-log/identityprovider" orbitdb "berty.tech/go-orbit-db" "berty.tech/go-orbit-db/accesscontroller" ) -func DefaultOrbitDBOptions(g *bertytypes.Group, options *orbitdb.CreateDBOptions, keystore *BertySignedKeyStore, storeType string, groupOpenMode GroupOpenMode) (*orbitdb.CreateDBOptions, error) { +func DefaultOrbitDBOptions(g *protocoltypes.Group, options *orbitdb.CreateDBOptions, keystore *BertySignedKeyStore, storeType string, groupOpenMode GroupOpenMode) (*orbitdb.CreateDBOptions, error) { var err error if options == nil { @@ -54,7 +54,7 @@ func DefaultOrbitDBOptions(g *bertytypes.Group, options *orbitdb.CreateDBOptions return options, nil } -func defaultACForGroup(g *bertytypes.Group, storeType string) (accesscontroller.ManifestParams, error) { +func defaultACForGroup(g *protocoltypes.Group, storeType string) (accesscontroller.ManifestParams, error) { groupID := g.GroupIDAsString() sigPK, err := g.GetSigningPubKey() @@ -88,7 +88,7 @@ func defaultACForGroup(g *bertytypes.Group, storeType string) (accesscontroller. return param, nil } -func defaultIdentityForGroup(g *bertytypes.Group, ks *BertySignedKeyStore) (*identityprovider.Identity, error) { +func defaultIdentityForGroup(g *protocoltypes.Group, ks *BertySignedKeyStore) (*identityprovider.Identity, error) { sigPK, err := g.GetSigningPubKey() if err != nil { return nil, errcode.TODO.Wrap(err) @@ -111,7 +111,7 @@ func defaultIdentityForGroup(g *bertytypes.Group, ks *BertySignedKeyStore) (*ide return identity, nil } -func readIdentityForGroup(g *bertytypes.Group, ks *BertySignedKeyStore) (*identityprovider.Identity, error) { +func readIdentityForGroup(g *protocoltypes.Group, ks *BertySignedKeyStore) (*identityprovider.Identity, error) { sigPK, err := g.GetSigningPubKey() if err != nil { return nil, errcode.TODO.Wrap(err) diff --git a/go/pkg/bertyprotocol/testing_test.go b/go/pkg/bertyprotocol/testing_test.go index 4f2a9d487c..7bb898e5c5 100644 --- a/go/pkg/bertyprotocol/testing_test.go +++ b/go/pkg/bertyprotocol/testing_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "berty.tech/berty/v2/go/pkg/protocoltypes" ) func TestClient_impl(t *testing.T) { var _ Service = (*service)(nil) - var _ ProtocolServiceServer = (*service)(nil) + var _ protocoltypes.ProtocolServiceServer = (*service)(nil) } func TestEmptyArgs(t *testing.T) { diff --git a/go/pkg/bertytypes/example_test.go b/go/pkg/bertytypes/example_test.go deleted file mode 100644 index 73ca0c2157..0000000000 --- a/go/pkg/bertytypes/example_test.go +++ /dev/null @@ -1 +0,0 @@ -package bertytypes_test diff --git a/go/pkg/errcode/errcode.pb.go b/go/pkg/errcode/errcode.pb.go index c5ebcfd1df..0fd1947f09 100644 --- a/go/pkg/errcode/errcode.pb.go +++ b/go/pkg/errcode/errcode.pb.go @@ -38,6 +38,12 @@ const ( ErrDeserialization ErrCode = 104 ErrStreamRead ErrCode = 105 ErrStreamWrite ErrCode = 106 + ErrStreamTransform ErrCode = 110 + ErrStreamSendAndClose ErrCode = 111 + ErrStreamHeaderWrite ErrCode = 112 + ErrStreamHeaderRead ErrCode = 115 + ErrStreamSink ErrCode = 113 + ErrStreamCloseAndRecv ErrCode = 114 ErrMissingMapKey ErrCode = 107 ErrDBWrite ErrCode = 108 ErrDBRead ErrCode = 109 @@ -95,6 +101,7 @@ const ( ErrBridgeInterrupted ErrCode = 1600 ErrBridgeNotRunning ErrCode = 1601 ErrMessengerInvalidDeepLink ErrCode = 2000 + ErrMessengerDeepLinkRequiresPassphrase ErrCode = 2001 ErrDBEntryAlreadyExists ErrCode = 2100 ErrDBAddConversation ErrCode = 2101 ErrDBAddContactRequestOutgoingSent ErrCode = 2102 @@ -106,8 +113,8 @@ const ( ErrReplayProcessGroupMetadata ErrCode = 2200 ErrReplayProcessGroupMessage ErrCode = 2201 // API internals errors - ErrPrepareAttachment ErrCode = 2300 - ErrRetrieveAttachment ErrCode = 2301 + ErrAttachmentPrepare ErrCode = 2300 + ErrAttachmentRetrieve ErrCode = 2301 ErrProtocolSend ErrCode = 2302 ErrCLINoTermcaps ErrCode = 3001 ErrServicesAuth ErrCode = 4000 @@ -154,6 +161,12 @@ var ErrCode_name = map[int32]string{ 104: "ErrDeserialization", 105: "ErrStreamRead", 106: "ErrStreamWrite", + 110: "ErrStreamTransform", + 111: "ErrStreamSendAndClose", + 112: "ErrStreamHeaderWrite", + 115: "ErrStreamHeaderRead", + 113: "ErrStreamSink", + 114: "ErrStreamCloseAndRecv", 107: "ErrMissingMapKey", 108: "ErrDBWrite", 109: "ErrDBRead", @@ -210,6 +223,7 @@ var ErrCode_name = map[int32]string{ 1600: "ErrBridgeInterrupted", 1601: "ErrBridgeNotRunning", 2000: "ErrMessengerInvalidDeepLink", + 2001: "ErrMessengerDeepLinkRequiresPassphrase", 2100: "ErrDBEntryAlreadyExists", 2101: "ErrDBAddConversation", 2102: "ErrDBAddContactRequestOutgoingSent", @@ -220,8 +234,8 @@ var ErrCode_name = map[int32]string{ 2107: "ErrDBMultipleRecords", 2200: "ErrReplayProcessGroupMetadata", 2201: "ErrReplayProcessGroupMessage", - 2300: "ErrPrepareAttachment", - 2301: "ErrRetrieveAttachment", + 2300: "ErrAttachmentPrepare", + 2301: "ErrAttachmentRetrieve", 2302: "ErrProtocolSend", 3001: "ErrCLINoTermcaps", 4000: "ErrServicesAuth", @@ -257,44 +271,50 @@ var ErrCode_name = map[int32]string{ } var ErrCode_value = map[string]int32{ - "Undefined": 0, - "TODO": 666, - "ErrNotImplemented": 777, - "ErrInternal": 888, - "ErrInvalidInput": 100, - "ErrInvalidRange": 101, - "ErrMissingInput": 102, - "ErrSerialization": 103, - "ErrDeserialization": 104, - "ErrStreamRead": 105, - "ErrStreamWrite": 106, - "ErrMissingMapKey": 107, - "ErrDBWrite": 108, - "ErrDBRead": 109, - "ErrCryptoRandomGeneration": 200, - "ErrCryptoKeyGeneration": 201, - "ErrCryptoNonceGeneration": 202, - "ErrCryptoSignature": 203, - "ErrCryptoSignatureVerification": 204, - "ErrCryptoDecrypt": 205, - "ErrCryptoDecryptPayload": 206, - "ErrCryptoEncrypt": 207, - "ErrCryptoKeyConversion": 208, - "ErrCryptoCipherInit": 209, - "ErrCryptoKeyDerivation": 210, - "ErrMap": 300, - "ErrForEach": 301, - "ErrKeystoreGet": 400, - "ErrKeystorePut": 401, - "ErrOrbitDBInit": 1000, - "ErrOrbitDBOpen": 1001, - "ErrOrbitDBAppend": 1002, - "ErrOrbitDBDeserialization": 1003, - "ErrOrbitDBStoreCast": 1004, - "ErrIPFSAdd": 1050, - "ErrIPFSGet": 1051, - "ErrHandshakeOwnEphemeralKeyGenSend": 1100, - "ErrHandshakePeerEphemeralKeyRecv": 1101, + "Undefined": 0, + "TODO": 666, + "ErrNotImplemented": 777, + "ErrInternal": 888, + "ErrInvalidInput": 100, + "ErrInvalidRange": 101, + "ErrMissingInput": 102, + "ErrSerialization": 103, + "ErrDeserialization": 104, + "ErrStreamRead": 105, + "ErrStreamWrite": 106, + "ErrStreamTransform": 110, + "ErrStreamSendAndClose": 111, + "ErrStreamHeaderWrite": 112, + "ErrStreamHeaderRead": 115, + "ErrStreamSink": 113, + "ErrStreamCloseAndRecv": 114, + "ErrMissingMapKey": 107, + "ErrDBWrite": 108, + "ErrDBRead": 109, + "ErrCryptoRandomGeneration": 200, + "ErrCryptoKeyGeneration": 201, + "ErrCryptoNonceGeneration": 202, + "ErrCryptoSignature": 203, + "ErrCryptoSignatureVerification": 204, + "ErrCryptoDecrypt": 205, + "ErrCryptoDecryptPayload": 206, + "ErrCryptoEncrypt": 207, + "ErrCryptoKeyConversion": 208, + "ErrCryptoCipherInit": 209, + "ErrCryptoKeyDerivation": 210, + "ErrMap": 300, + "ErrForEach": 301, + "ErrKeystoreGet": 400, + "ErrKeystorePut": 401, + "ErrOrbitDBInit": 1000, + "ErrOrbitDBOpen": 1001, + "ErrOrbitDBAppend": 1002, + "ErrOrbitDBDeserialization": 1003, + "ErrOrbitDBStoreCast": 1004, + "ErrIPFSAdd": 1050, + "ErrIPFSGet": 1051, + "ErrHandshakeOwnEphemeralKeyGenSend": 1100, + "ErrHandshakePeerEphemeralKeyRecv": 1101, "ErrHandshakeRequesterAuthenticateBoxKeyGen": 1102, "ErrHandshakeResponderAcceptBoxKeyGen": 1103, "ErrHandshakeRequesterHello": 1104, @@ -324,6 +344,7 @@ var ErrCode_value = map[string]int32{ "ErrBridgeInterrupted": 1600, "ErrBridgeNotRunning": 1601, "ErrMessengerInvalidDeepLink": 2000, + "ErrMessengerDeepLinkRequiresPassphrase": 2001, "ErrDBEntryAlreadyExists": 2100, "ErrDBAddConversation": 2101, "ErrDBAddContactRequestOutgoingSent": 2102, @@ -334,8 +355,8 @@ var ErrCode_value = map[string]int32{ "ErrDBMultipleRecords": 2107, "ErrReplayProcessGroupMetadata": 2200, "ErrReplayProcessGroupMessage": 2201, - "ErrPrepareAttachment": 2300, - "ErrRetrieveAttachment": 2301, + "ErrAttachmentPrepare": 2300, + "ErrAttachmentRetrieve": 2301, "ErrProtocolSend": 2302, "ErrCLINoTermcaps": 3001, "ErrServicesAuth": 4000, @@ -429,106 +450,111 @@ func init() { func init() { proto.RegisterFile("errcode.proto", fileDescriptor_4240057316120df7) } var fileDescriptor_4240057316120df7 = []byte{ - // 1610 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x97, 0x49, 0x93, 0x1c, 0x47, - 0x15, 0x80, 0xdd, 0x36, 0xd6, 0xf4, 0xa4, 0xb6, 0x37, 0x29, 0x59, 0x92, 0x65, 0x5b, 0x3d, 0x16, - 0x96, 0xdb, 0x08, 0xd0, 0x44, 0xc0, 0x8d, 0x5b, 0x2f, 0x35, 0xe3, 0x0e, 0xcd, 0xd2, 0xd1, 0x2d, - 0xe1, 0x08, 0x6e, 0xa9, 0xca, 0x37, 0xd5, 0x49, 0x57, 0x67, 0x96, 0xb3, 0xb2, 0xda, 0x6e, 0xce, - 0x40, 0xb0, 0x63, 0x83, 0x17, 0x59, 0x86, 0x08, 0x56, 0x03, 0x11, 0x10, 0xc1, 0x62, 0x16, 0xc3, - 0x05, 0x6e, 0x2c, 0x5e, 0xc6, 0x86, 0x23, 0x1c, 0xb8, 0xb1, 0xfd, 0x00, 0x11, 0x01, 0x04, 0x91, - 0x55, 0xaf, 0x67, 0xaa, 0x67, 0x9a, 0xc1, 0xa7, 0xe9, 0x79, 0xef, 0xcb, 0xb7, 0xe5, 0xcb, 0x97, - 0x59, 0xec, 0x38, 0x5a, 0x1b, 0x1a, 0x89, 0x57, 0x12, 0x6b, 0x9c, 0xe1, 0xc7, 0x6f, 0xa0, 0x75, - 0x93, 0x2b, 0x24, 0x3c, 0x7f, 0x3a, 0x32, 0x91, 0xc9, 0x35, 0x2b, 0xfe, 0x57, 0x01, 0x5d, 0xfc, - 0x00, 0x63, 0x81, 0xb5, 0x6d, 0x74, 0x42, 0xc5, 0x29, 0x7f, 0x0f, 0xbb, 0xdb, 0xb3, 0xe9, 0xb9, - 0xca, 0xf2, 0x5d, 0x8f, 0x9c, 0x78, 0xdf, 0x99, 0x2b, 0x33, 0x26, 0xae, 0x04, 0xd6, 0xb6, 0x8c, - 0xc4, 0x5e, 0x01, 0x5d, 0x7e, 0xe9, 0x3c, 0x5b, 0x20, 0x11, 0x3f, 0xce, 0x16, 0xaf, 0x6b, 0x89, - 0xdb, 0x4a, 0xa3, 0x84, 0x3b, 0xf8, 0x22, 0x7b, 0xc7, 0xb5, 0xad, 0xf6, 0x16, 0xdc, 0xba, 0x9b, - 0x9f, 0x61, 0x4b, 0x81, 0xb5, 0x9b, 0xc6, 0x75, 0x46, 0x49, 0x8c, 0x23, 0xd4, 0x0e, 0x25, 0x7c, - 0xf2, 0x08, 0x07, 0x76, 0x34, 0xb0, 0xb6, 0xa3, 0x1d, 0x5a, 0x2d, 0x62, 0xb8, 0x7d, 0x84, 0x9f, - 0x62, 0x27, 0x73, 0xc9, 0x58, 0xc4, 0x4a, 0x76, 0x74, 0x92, 0x39, 0x90, 0xb3, 0xc2, 0x9e, 0xd0, - 0x11, 0x02, 0x92, 0x70, 0x43, 0xa5, 0xa9, 0xd2, 0x51, 0x41, 0x6e, 0xf3, 0xd3, 0x0c, 0x02, 0x6b, - 0xfb, 0x68, 0x95, 0x88, 0xd5, 0x47, 0x84, 0x53, 0x46, 0x43, 0xc4, 0xcf, 0x30, 0x9e, 0x27, 0x98, - 0xce, 0xc8, 0x07, 0x7c, 0x89, 0x1d, 0xf7, 0xb4, 0xb3, 0x28, 0x46, 0x3d, 0x14, 0x12, 0x14, 0xe7, - 0xec, 0xc4, 0xae, 0xe8, 0x31, 0xab, 0x1c, 0xc2, 0x87, 0xc9, 0x28, 0x79, 0xda, 0x10, 0xc9, 0x55, - 0x9c, 0xc0, 0x90, 0x9f, 0x28, 0xaa, 0xd6, 0x2c, 0xa8, 0xd8, 0x67, 0x9f, 0xff, 0x9f, 0x1b, 0x1a, - 0xf1, 0x0b, 0xec, 0x5e, 0x5f, 0x17, 0x3b, 0x49, 0x9c, 0xe9, 0x09, 0x2d, 0xcd, 0x68, 0x0d, 0x35, - 0xda, 0xc2, 0xf5, 0xaf, 0x2b, 0xfc, 0x3e, 0x76, 0x66, 0x57, 0x7f, 0x15, 0x27, 0x25, 0xe5, 0x6f, - 0x2a, 0xfc, 0x01, 0x76, 0x6e, 0x57, 0xb9, 0x69, 0x74, 0x88, 0x25, 0xf5, 0x6f, 0x2b, 0xfc, 0x6c, - 0x9e, 0x4f, 0xa1, 0xee, 0xab, 0x48, 0x0b, 0x97, 0x59, 0x84, 0xdf, 0x55, 0xf8, 0x3b, 0xd9, 0x85, - 0x83, 0x8a, 0x0f, 0xa2, 0x55, 0xdb, 0x2a, 0x2c, 0x56, 0xbf, 0x5a, 0xe1, 0xf7, 0xe4, 0xe9, 0x14, - 0x50, 0x1b, 0x43, 0xff, 0x17, 0x5e, 0xab, 0xf0, 0xfb, 0xd9, 0xd9, 0xfd, 0xe2, 0xae, 0x98, 0xc4, - 0x46, 0x48, 0x78, 0x7d, 0x76, 0x51, 0xa0, 0x8b, 0x45, 0x6f, 0x1c, 0xc8, 0xa2, 0x65, 0xf4, 0x18, - 0x6d, 0xea, 0x1d, 0xed, 0x54, 0xf8, 0x39, 0x76, 0x6a, 0x57, 0xd9, 0x52, 0xc9, 0x00, 0x6d, 0x47, - 0x2b, 0x07, 0x6f, 0x1e, 0x58, 0xd6, 0x46, 0xab, 0xc6, 0x45, 0x7c, 0x6f, 0x55, 0xf8, 0x51, 0x76, - 0xc4, 0x97, 0x5b, 0x24, 0xf0, 0xdd, 0x3b, 0xf9, 0xc9, 0xbc, 0xca, 0xab, 0xc6, 0x06, 0x22, 0x1c, - 0xc0, 0xf7, 0xee, 0xe4, 0xa7, 0xf2, 0x0d, 0xba, 0x8a, 0x93, 0xd4, 0x19, 0x8b, 0x6b, 0xe8, 0xe0, - 0xa9, 0xbb, 0xf6, 0x09, 0xbb, 0x99, 0x83, 0xa7, 0xa7, 0xc2, 0x2d, 0x7b, 0x43, 0xb9, 0x76, 0x33, - 0xf7, 0xfc, 0x97, 0x85, 0x59, 0xe1, 0x56, 0x82, 0x1a, 0xfe, 0xba, 0x40, 0xc9, 0x91, 0xb0, 0x91, - 0x24, 0xa8, 0x25, 0xfc, 0x6d, 0x81, 0xb6, 0x90, 0xc4, 0xfb, 0xbb, 0xe7, 0xef, 0x0b, 0x94, 0x1f, - 0xe9, 0xfb, 0xde, 0x73, 0x4b, 0xa4, 0x0e, 0xfe, 0xb1, 0x40, 0x51, 0x77, 0xba, 0xab, 0xfd, 0x86, - 0x94, 0x70, 0xab, 0x5a, 0x12, 0xf8, 0x88, 0x5f, 0xac, 0xf2, 0x3a, 0xbb, 0x18, 0x58, 0xfb, 0xa8, - 0xd0, 0x32, 0x1d, 0x88, 0x21, 0x6e, 0x3d, 0xa1, 0x83, 0x64, 0x80, 0x23, 0xb4, 0x22, 0x2e, 0xba, - 0xa1, 0xef, 0x83, 0x78, 0xb5, 0xca, 0x2f, 0xb1, 0xe5, 0x32, 0xd8, 0x45, 0xb4, 0x65, 0xb2, 0x87, - 0xe1, 0x18, 0x5e, 0xab, 0xf2, 0x15, 0x76, 0xb9, 0x8c, 0xf5, 0xf0, 0xf1, 0x0c, 0x53, 0x87, 0xb6, - 0x91, 0xb9, 0x01, 0x6a, 0xe7, 0xb7, 0x1f, 0x9b, 0xe6, 0xc9, 0xc2, 0x36, 0xbc, 0x5e, 0xe5, 0xef, - 0x62, 0x0f, 0xcd, 0x2e, 0x48, 0x13, 0xa3, 0x25, 0xda, 0x46, 0x18, 0x62, 0xe2, 0xf6, 0xd0, 0x37, - 0xaa, 0xbc, 0xc6, 0xce, 0xcf, 0xb5, 0xfd, 0x28, 0xc6, 0xb1, 0x81, 0x9d, 0x39, 0x00, 0xd9, 0x2a, - 0x80, 0x37, 0xab, 0xfc, 0x61, 0xf6, 0xe0, 0xff, 0x8d, 0x0e, 0xde, 0xaa, 0xf2, 0x65, 0x76, 0xdf, - 0x21, 0x41, 0xc1, 0xef, 0x0f, 0x94, 0x63, 0xcf, 0x52, 0x38, 0xd4, 0xe6, 0x89, 0x18, 0x65, 0x84, - 0xf0, 0x87, 0x2a, 0x7f, 0x90, 0xdd, 0x9f, 0x4f, 0x25, 0xed, 0x44, 0xe8, 0x08, 0xea, 0x8b, 0x11, - 0x36, 0xc2, 0xd0, 0x64, 0xda, 0xc1, 0xf7, 0x17, 0xa9, 0x00, 0xb3, 0x08, 0xfd, 0xd7, 0x88, 0x2d, - 0x0a, 0x39, 0x69, 0x48, 0x89, 0x12, 0x7e, 0xb0, 0xc8, 0x1f, 0x62, 0xb5, 0xff, 0x85, 0x36, 0x63, - 0x13, 0x0e, 0x51, 0xc2, 0x0f, 0x17, 0x29, 0xc9, 0xb9, 0xd4, 0xde, 0x58, 0xfc, 0xd1, 0x22, 0x7f, - 0x2f, 0x7b, 0xe4, 0x00, 0xd7, 0xd1, 0xa1, 0x19, 0x29, 0x1d, 0x91, 0xe7, 0x1e, 0x86, 0xa8, 0xc6, - 0x28, 0xe1, 0xe5, 0x45, 0x2a, 0xee, 0x9a, 0x35, 0x59, 0xb2, 0x81, 0xa3, 0x1b, 0x68, 0xd7, 0x4d, - 0x14, 0x8c, 0x51, 0xbb, 0xbc, 0x7b, 0x9f, 0x61, 0x14, 0xdd, 0x1c, 0x60, 0x6f, 0x34, 0x3c, 0xcb, - 0xa8, 0x22, 0x25, 0xea, 0xba, 0xf6, 0x15, 0xd3, 0xb9, 0xa4, 0xd3, 0x86, 0xe7, 0x18, 0xbf, 0xc8, - 0x1e, 0x98, 0x22, 0x7d, 0x0c, 0x2d, 0xba, 0x2d, 0x37, 0x40, 0x3f, 0x36, 0x5d, 0xb1, 0x02, 0x9e, - 0x67, 0x94, 0x64, 0x89, 0xa1, 0x88, 0xfb, 0xa8, 0xdd, 0x35, 0x43, 0xdc, 0x4d, 0x46, 0x67, 0xa3, - 0x30, 0x5e, 0xcc, 0xed, 0x6b, 0x93, 0x04, 0xe1, 0x05, 0xc6, 0x4f, 0xe7, 0x73, 0xbb, 0x08, 0xa4, - 0x18, 0xa9, 0x70, 0x8b, 0xd1, 0x11, 0xcc, 0xa5, 0x8d, 0xd0, 0xf9, 0x69, 0x80, 0xf0, 0x22, 0xa3, - 0x49, 0x97, 0x8b, 0xdb, 0x28, 0xa6, 0x8a, 0x2f, 0x31, 0xbe, 0xc4, 0x8e, 0xed, 0xd9, 0xdf, 0x36, - 0xf0, 0x65, 0xc6, 0xef, 0x65, 0xa7, 0x03, 0x6b, 0xf3, 0xcc, 0xd7, 0x95, 0x8f, 0xd9, 0x09, 0x29, - 0x9c, 0x80, 0xdb, 0xd3, 0x68, 0x4a, 0xaa, 0x34, 0x15, 0x11, 0xc2, 0x3f, 0x19, 0x75, 0x1c, 0x09, - 0xae, 0xe2, 0xa4, 0xeb, 0xc7, 0x57, 0xea, 0x50, 0x87, 0xf9, 0x18, 0xf9, 0xe3, 0xd1, 0xc3, 0x08, - 0x7f, 0x96, 0xff, 0x74, 0x94, 0x1c, 0x37, 0xad, 0x92, 0x11, 0xe6, 0x77, 0x99, 0xcd, 0x12, 0x7f, - 0xc1, 0xfd, 0xf2, 0x18, 0x39, 0x2e, 0x54, 0x9b, 0xc6, 0xf5, 0x32, 0xad, 0x7d, 0xc2, 0xbf, 0x3a, - 0x56, 0x32, 0x8b, 0x3a, 0xc2, 0xe9, 0xe5, 0xd6, 0x46, 0x4c, 0xd6, 0x95, 0x1e, 0xc2, 0xce, 0x49, - 0x1a, 0xc8, 0xed, 0x66, 0xa0, 0x9d, 0x9d, 0x50, 0x99, 0x83, 0x27, 0x55, 0xea, 0x52, 0x78, 0x19, - 0xc8, 0x69, 0xbb, 0xd9, 0x90, 0x92, 0xa6, 0x6e, 0x31, 0x97, 0x7e, 0x0c, 0x34, 0x5b, 0xa6, 0xaa, - 0x52, 0x97, 0x6d, 0x65, 0x2e, 0x32, 0x4a, 0x47, 0x7e, 0xb3, 0xe0, 0x27, 0xc0, 0x2f, 0xb3, 0x4b, - 0x87, 0x83, 0x81, 0x7e, 0x3c, 0xc3, 0x4c, 0xc2, 0x4f, 0x81, 0xbf, 0x9b, 0x3d, 0x3c, 0x9f, 0x9d, - 0xb6, 0xee, 0x6e, 0xcf, 0xfe, 0xec, 0x6d, 0xc0, 0xc5, 0x81, 0x46, 0x09, 0xaf, 0x00, 0x5d, 0x5a, - 0x39, 0x5c, 0x6a, 0xcf, 0x36, 0x8e, 0x55, 0x88, 0xc5, 0x11, 0xfc, 0xf9, 0x5e, 0xba, 0x1b, 0x59, - 0xec, 0x54, 0x12, 0x63, 0x0f, 0x43, 0x63, 0x65, 0x0a, 0xbf, 0x00, 0x6a, 0xdb, 0x1e, 0x26, 0xb1, - 0x98, 0x74, 0xad, 0x09, 0x31, 0x4d, 0xc9, 0x0e, 0x35, 0xc0, 0xcd, 0x25, 0xea, 0xfe, 0x79, 0x4c, - 0xd1, 0x09, 0x2f, 0x2c, 0x91, 0x87, 0xae, 0xc5, 0x44, 0x58, 0x6c, 0x38, 0x27, 0xc2, 0x81, 0x7f, - 0xa8, 0xc0, 0xbf, 0x96, 0xf8, 0x79, 0x76, 0x4f, 0xbe, 0xda, 0x59, 0x85, 0xe3, 0xb2, 0xee, 0xdf, - 0x4b, 0xd4, 0xce, 0x5d, 0xff, 0x90, 0x0a, 0x4d, 0x9c, 0x4f, 0xed, 0xff, 0x2c, 0x4d, 0xaf, 0xcb, - 0xf5, 0xce, 0xa6, 0xb9, 0x86, 0x76, 0x14, 0x8a, 0x24, 0x85, 0x57, 0xce, 0x12, 0xdc, 0x47, 0xeb, - 0x73, 0x4b, 0xfd, 0xf4, 0x83, 0xaf, 0xd4, 0x28, 0x81, 0xb2, 0xd4, 0xbf, 0x94, 0xb4, 0x72, 0xf9, - 0x75, 0x83, 0x12, 0xbe, 0x5a, 0xa3, 0xbb, 0xa8, 0xcc, 0x3c, 0x66, 0x8d, 0x8e, 0xfa, 0xce, 0x9f, - 0x87, 0xaf, 0xd5, 0xa8, 0x88, 0x65, 0xfd, 0xf4, 0xb9, 0x94, 0xcf, 0xd0, 0x14, 0xe1, 0xeb, 0x35, - 0xca, 0xa3, 0x0c, 0xf9, 0xdf, 0x68, 0xe1, 0x1b, 0x35, 0xaa, 0x50, 0x59, 0xe7, 0xdf, 0x74, 0xad, - 0x81, 0x88, 0x63, 0xdf, 0xa0, 0xf0, 0xcd, 0x1a, 0xf5, 0xd5, 0xfe, 0xe5, 0x2a, 0xc4, 0xe9, 0x09, - 0x37, 0x43, 0xd4, 0xf0, 0xd2, 0x21, 0xe0, 0xa6, 0x71, 0xfd, 0x2c, 0x49, 0x8c, 0xf5, 0x5b, 0xff, - 0xad, 0x1a, 0x1d, 0x82, 0x32, 0x48, 0x53, 0xa9, 0x30, 0xf5, 0xed, 0x79, 0x79, 0x93, 0xb3, 0xeb, - 0xbd, 0x75, 0xf8, 0xce, 0xbe, 0x94, 0xfc, 0xfe, 0x4e, 0x1f, 0x3a, 0x1f, 0x5d, 0x9e, 0xb5, 0x5e, - 0xd2, 0x51, 0xd2, 0x1f, 0x5b, 0xa6, 0x3b, 0xe0, 0x20, 0x41, 0x83, 0x29, 0xd0, 0x32, 0x31, 0x4a, - 0x3b, 0xf8, 0xf8, 0x32, 0x6d, 0x5d, 0xd3, 0xbf, 0x85, 0xa7, 0x97, 0xc8, 0x27, 0xea, 0x54, 0xb5, - 0xb2, 0x74, 0xd3, 0x74, 0xda, 0xfd, 0x04, 0x43, 0xb5, 0xad, 0xfc, 0x1b, 0x77, 0x1e, 0x42, 0x67, - 0xd9, 0xcf, 0x6f, 0x94, 0xf0, 0xa9, 0x3a, 0x6d, 0x5e, 0x19, 0x99, 0x3e, 0x80, 0xdb, 0xab, 0xc6, - 0x8e, 0x84, 0x83, 0x4f, 0xcf, 0x83, 0xd6, 0x4d, 0x14, 0xf9, 0x83, 0x12, 0x1a, 0x2b, 0x9c, 0xb1, - 0xf0, 0x99, 0x3a, 0x95, 0xab, 0x0c, 0xad, 0xf5, 0xba, 0xad, 0x56, 0xac, 0x7c, 0xb7, 0x7e, 0xb6, - 0x4e, 0x97, 0x49, 0x59, 0xef, 0xa3, 0x98, 0x26, 0xf4, 0xb9, 0x3a, 0xd5, 0xac, 0x0c, 0xb4, 0x85, - 0x13, 0x9b, 0xc6, 0xad, 0x9a, 0x4c, 0x4b, 0xf8, 0x7c, 0x9d, 0xba, 0xb5, 0x4c, 0x4c, 0x0f, 0xda, - 0xf5, 0x44, 0xfa, 0x6e, 0x7c, 0x6a, 0x9e, 0x9b, 0x0d, 0xa1, 0x45, 0x84, 0x36, 0xbf, 0xb3, 0x9e, - 0x9e, 0xe7, 0x86, 0x80, 0x56, 0x6c, 0x52, 0x84, 0x2f, 0xcc, 0x73, 0x43, 0x35, 0x69, 0xad, 0x77, - 0x1a, 0x36, 0x4a, 0xe1, 0x8b, 0x75, 0x7a, 0x46, 0x96, 0x99, 0xd5, 0x7e, 0x60, 0xad, 0xb1, 0xf0, - 0xcc, 0x21, 0x75, 0xa7, 0x19, 0xfa, 0x6c, 0x9d, 0x1e, 0x13, 0xb3, 0xbb, 0xd7, 0x14, 0xe1, 0x30, - 0x4b, 0xf6, 0x76, 0xf0, 0xb9, 0x79, 0xd9, 0x74, 0xda, 0x6b, 0xa8, 0x57, 0x85, 0x8a, 0x51, 0xc2, - 0xf3, 0xf3, 0x62, 0x6d, 0x59, 0xcc, 0x1b, 0x89, 0x98, 0x9b, 0xf5, 0xe6, 0xa5, 0x9d, 0x3f, 0x5f, - 0xb8, 0xe3, 0x43, 0xb5, 0xe2, 0x63, 0xca, 0x61, 0x38, 0x58, 0xc9, 0x7f, 0xae, 0x44, 0x66, 0x25, - 0x19, 0x46, 0x2b, 0xf4, 0x79, 0x75, 0xe3, 0x48, 0xfe, 0x49, 0xf6, 0xfe, 0xff, 0x06, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xf1, 0x83, 0x00, 0xc8, 0x0d, 0x00, 0x00, + // 1685 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xc9, 0x73, 0x5c, 0x47, + 0x19, 0xcf, 0x24, 0xc4, 0x1a, 0xb5, 0xb7, 0x4f, 0x6d, 0xc7, 0x6b, 0xe2, 0x51, 0x4c, 0x9c, 0x09, + 0x06, 0xac, 0x2a, 0xb8, 0x71, 0x9b, 0x4d, 0xf2, 0x94, 0xb5, 0x4c, 0xcd, 0xc8, 0xa4, 0x8a, 0x5b, + 0xfb, 0xf5, 0xa7, 0x37, 0x8d, 0xde, 0x74, 0x3f, 0xf7, 0xeb, 0x51, 0x32, 0x9c, 0x81, 0x62, 0x27, + 0x81, 0x2c, 0x8e, 0x03, 0x55, 0xec, 0x4b, 0x15, 0x54, 0xb1, 0x84, 0x25, 0x70, 0x81, 0x1b, 0x4b, + 0x16, 0x3b, 0x70, 0x84, 0x03, 0x27, 0xd6, 0x3f, 0x20, 0x54, 0x01, 0x45, 0x75, 0xbf, 0x6f, 0x34, + 0x6f, 0xa4, 0x41, 0xe4, 0xa4, 0xd1, 0xf7, 0xfd, 0xfa, 0xdb, 0xb7, 0xc7, 0x8e, 0xa2, 0xb5, 0x91, + 0x91, 0x78, 0x25, 0xb5, 0xc6, 0x19, 0x7e, 0xf4, 0x06, 0x5a, 0x37, 0xba, 0x42, 0xc4, 0x73, 0x27, + 0x63, 0x13, 0x9b, 0xc0, 0x59, 0xf2, 0xbf, 0x72, 0xd0, 0xc5, 0xf7, 0x31, 0xd6, 0xb2, 0xb6, 0x89, + 0x4e, 0xa8, 0x24, 0xe3, 0xef, 0x62, 0xf7, 0x7b, 0x6c, 0x76, 0xa6, 0xb4, 0x78, 0xdf, 0x63, 0xc7, + 0xde, 0x73, 0xea, 0xca, 0x94, 0x88, 0x2b, 0x2d, 0x6b, 0x1b, 0x46, 0x62, 0x37, 0x07, 0x5d, 0xfe, + 0xf3, 0x79, 0x36, 0x47, 0x24, 0x7e, 0x94, 0xcd, 0x5f, 0xd7, 0x12, 0xb7, 0x94, 0x46, 0x09, 0xf7, + 0xf0, 0x79, 0xf6, 0xb6, 0xcd, 0x8d, 0xe6, 0x06, 0xdc, 0xbe, 0x9f, 0x9f, 0x62, 0x0b, 0x2d, 0x6b, + 0xd7, 0x8d, 0x6b, 0x0f, 0xd2, 0x04, 0x07, 0xa8, 0x1d, 0x4a, 0xf8, 0xf8, 0x21, 0x0e, 0xec, 0x70, + 0xcb, 0xda, 0xb6, 0x76, 0x68, 0xb5, 0x48, 0xe0, 0xcd, 0x43, 0xfc, 0x04, 0x3b, 0x1e, 0x28, 0x3b, + 0x22, 0x51, 0xb2, 0xad, 0xd3, 0xa1, 0x03, 0x39, 0x4d, 0xec, 0x0a, 0x1d, 0x23, 0x20, 0x11, 0xd7, + 0x54, 0x96, 0x29, 0x1d, 0xe7, 0xc8, 0x2d, 0x7e, 0x92, 0x41, 0xcb, 0xda, 0x1e, 0x5a, 0x25, 0x12, + 0xf5, 0x21, 0xe1, 0x94, 0xd1, 0x10, 0xf3, 0x53, 0x8c, 0x07, 0x07, 0xb3, 0x29, 0x7a, 0x9f, 0x2f, + 0xb0, 0xa3, 0x1e, 0xed, 0x2c, 0x8a, 0x41, 0x17, 0x85, 0x04, 0xc5, 0x39, 0x3b, 0xb6, 0x4b, 0x7a, + 0xdc, 0x2a, 0x87, 0xf0, 0x41, 0x7a, 0x9e, 0xd3, 0x36, 0xad, 0xd0, 0xd9, 0x96, 0xb1, 0x03, 0xd0, + 0xfc, 0x2c, 0x7b, 0x60, 0x97, 0xde, 0x43, 0x2d, 0x6b, 0x5a, 0x36, 0x12, 0x93, 0x21, 0x18, 0x7e, + 0x86, 0x9d, 0xdc, 0x65, 0x5d, 0x45, 0x21, 0xd1, 0xe6, 0xc2, 0x52, 0x7e, 0x9a, 0x9d, 0xd8, 0xc3, + 0x09, 0x9a, 0xb3, 0x29, 0x63, 0x7a, 0x4a, 0x6f, 0xc3, 0xcd, 0x29, 0x05, 0x41, 0x72, 0x4d, 0xcb, + 0x2e, 0x46, 0x3b, 0x60, 0xc9, 0x51, 0xf2, 0x7e, 0x4d, 0xa4, 0xd7, 0x70, 0x04, 0xdb, 0xfc, 0x58, + 0x9e, 0xc9, 0x7a, 0xae, 0x2c, 0xf1, 0x19, 0x09, 0xff, 0x07, 0x15, 0x03, 0x7e, 0x81, 0x9d, 0xf5, + 0xb9, 0xb2, 0xa3, 0xd4, 0x99, 0xae, 0xd0, 0xd2, 0x0c, 0x56, 0x50, 0xa3, 0xcd, 0xc3, 0xf1, 0xab, + 0x12, 0x3f, 0xcf, 0x4e, 0xed, 0xf2, 0xaf, 0xe1, 0xa8, 0xc0, 0xfc, 0x75, 0x89, 0x3f, 0xc4, 0xce, + 0xec, 0x32, 0xd7, 0x8d, 0x8e, 0xb0, 0xc0, 0xfe, 0x4d, 0x89, 0x9f, 0x0e, 0x41, 0xca, 0xd9, 0x3d, + 0x15, 0x6b, 0xe1, 0x86, 0x16, 0xe1, 0xb7, 0x25, 0xfe, 0x76, 0x76, 0x61, 0x3f, 0xe3, 0xfd, 0x68, + 0xd5, 0x96, 0x8a, 0xf2, 0xd7, 0xaf, 0x94, 0xf8, 0x03, 0xc1, 0x9d, 0x1c, 0xd4, 0xc4, 0xc8, 0xff, + 0x85, 0x57, 0x4b, 0xfc, 0x41, 0x76, 0x7a, 0x2f, 0xb9, 0x23, 0x46, 0x89, 0x11, 0x12, 0x5e, 0x9b, + 0x7e, 0xd4, 0xd2, 0xf9, 0xa3, 0xd7, 0xf7, 0x79, 0xd1, 0x30, 0x7a, 0x07, 0x6d, 0xe6, 0x15, 0xdd, + 0x29, 0xf1, 0x33, 0x21, 0xfc, 0x39, 0xb3, 0xa1, 0xd2, 0x3e, 0xda, 0xb6, 0x56, 0x0e, 0xee, 0xee, + 0x7b, 0xd6, 0x44, 0xab, 0x76, 0x72, 0xfb, 0xde, 0x28, 0xf1, 0xc3, 0xec, 0x90, 0x0f, 0xb7, 0x48, + 0xe1, 0x3b, 0xf7, 0xf2, 0xe3, 0x21, 0xca, 0xcb, 0xc6, 0xb6, 0x44, 0xd4, 0x87, 0xef, 0xde, 0xcb, + 0x4f, 0x84, 0xa2, 0xb9, 0x86, 0xa3, 0xcc, 0x19, 0x8b, 0x2b, 0xe8, 0xe0, 0xa9, 0xfb, 0xf6, 0x10, + 0x3b, 0x43, 0x07, 0x4f, 0x8f, 0x89, 0x1b, 0xf6, 0x86, 0x72, 0xcd, 0x7a, 0xd0, 0xfc, 0x97, 0xb9, + 0x69, 0xe2, 0x46, 0x8a, 0x1a, 0xfe, 0x3a, 0x47, 0xce, 0x11, 0xb1, 0x96, 0xa6, 0xa8, 0x25, 0xfc, + 0x6d, 0x8e, 0x52, 0x48, 0xe4, 0xbd, 0x15, 0xfd, 0xf7, 0x39, 0xf2, 0x8f, 0xf8, 0x3d, 0xaf, 0xb9, + 0x21, 0x32, 0x07, 0xff, 0x98, 0x23, 0xab, 0xdb, 0x9d, 0xe5, 0x5e, 0x4d, 0x4a, 0xb8, 0x5d, 0x2e, + 0x10, 0xbc, 0xc5, 0x2f, 0x96, 0x79, 0x95, 0x5d, 0x6c, 0x59, 0x7b, 0x55, 0x68, 0x99, 0xf5, 0xc5, + 0x36, 0x6e, 0x3c, 0xa1, 0x5b, 0x69, 0x1f, 0x07, 0x68, 0x45, 0x92, 0x57, 0x83, 0x2f, 0x72, 0x78, + 0xa5, 0xcc, 0x2f, 0xb1, 0xc5, 0x22, 0xb0, 0x83, 0x68, 0x8b, 0xc8, 0x50, 0xa2, 0xaf, 0x96, 0xf9, + 0x12, 0xbb, 0x5c, 0x84, 0x75, 0xf1, 0xe6, 0x10, 0x33, 0x87, 0xb6, 0x36, 0x74, 0x7d, 0xd4, 0xce, + 0xa7, 0x1f, 0xeb, 0xe6, 0xc9, 0x5c, 0x36, 0xbc, 0x56, 0xe6, 0xef, 0x60, 0x8f, 0x4c, 0x3f, 0xc8, + 0x52, 0xa3, 0x25, 0xda, 0x5a, 0x14, 0x61, 0xea, 0x26, 0xd0, 0xd7, 0xcb, 0xbc, 0xc2, 0xce, 0xcd, + 0x94, 0x7d, 0x15, 0x93, 0xc4, 0xc0, 0x9d, 0x19, 0x00, 0x92, 0x95, 0x03, 0xee, 0x96, 0xf9, 0xa3, + 0xec, 0xe1, 0xff, 0x6b, 0x1d, 0xbc, 0x51, 0xe6, 0x8b, 0xec, 0xfc, 0x01, 0x46, 0xc1, 0xef, 0xf6, + 0x85, 0x63, 0x22, 0x29, 0xda, 0xd6, 0xe6, 0x89, 0x04, 0x65, 0x8c, 0xf0, 0xfb, 0x32, 0x7f, 0x98, + 0x3d, 0x18, 0x26, 0xa5, 0x76, 0x22, 0x72, 0x04, 0xea, 0x89, 0x01, 0xd6, 0xa2, 0xc8, 0x0c, 0xb5, + 0x83, 0xef, 0xcd, 0x53, 0x00, 0xa6, 0x21, 0xf4, 0x5f, 0x2d, 0xb1, 0x28, 0xe4, 0xa8, 0x26, 0x25, + 0x4a, 0xf8, 0xfe, 0x3c, 0x7f, 0x84, 0x55, 0xfe, 0x17, 0xb4, 0x9e, 0x98, 0x68, 0x1b, 0x25, 0xfc, + 0x60, 0x9e, 0x9c, 0x9c, 0x89, 0x9a, 0x8c, 0xea, 0x1f, 0xce, 0xf3, 0x77, 0xb3, 0xc7, 0xf6, 0xe1, + 0xda, 0x3a, 0x32, 0x03, 0xa5, 0x63, 0xd2, 0xdc, 0xc5, 0x08, 0xd5, 0x0e, 0x4a, 0x78, 0x69, 0x9e, + 0x82, 0xbb, 0x62, 0xcd, 0x30, 0x5d, 0xc3, 0xc1, 0x0d, 0xb4, 0xab, 0x26, 0x6e, 0xed, 0xa0, 0x76, + 0xa1, 0x7a, 0x9f, 0x61, 0x64, 0xdd, 0x0c, 0xc0, 0x64, 0x34, 0x3c, 0xcb, 0x28, 0x22, 0x05, 0xd4, + 0x75, 0xed, 0x23, 0xa6, 0x03, 0xa5, 0xdd, 0x84, 0xe7, 0x18, 0xbf, 0xc8, 0x1e, 0x1a, 0x43, 0x7a, + 0x18, 0x59, 0x74, 0x1b, 0xae, 0x8f, 0x7e, 0x94, 0xbb, 0xfc, 0x05, 0x3c, 0xcf, 0xc8, 0xc9, 0x02, + 0x86, 0x2c, 0xee, 0xa1, 0x76, 0x9b, 0x86, 0x70, 0xb7, 0x18, 0xf5, 0x46, 0x2e, 0x3c, 0xdf, 0x25, + 0x9b, 0xa3, 0x14, 0xe1, 0x05, 0xc6, 0x4f, 0x86, 0x5d, 0x92, 0x1b, 0x92, 0x8f, 0x54, 0xb8, 0xcd, + 0xa8, 0x05, 0x03, 0xb5, 0x16, 0x39, 0x3f, 0x0d, 0x10, 0x5e, 0x64, 0x34, 0xe9, 0x02, 0xb9, 0x89, + 0x62, 0xcc, 0xf8, 0x02, 0xe3, 0x0b, 0xec, 0xc8, 0x44, 0xfe, 0x96, 0x81, 0x2f, 0x32, 0x7e, 0x36, + 0xec, 0x81, 0xe0, 0xf9, 0xaa, 0xf2, 0x36, 0x3b, 0x21, 0x85, 0x13, 0xf0, 0xe6, 0xd8, 0x9a, 0x02, + 0x2b, 0xcb, 0x44, 0x8c, 0xf0, 0x4f, 0x46, 0x15, 0x47, 0x84, 0x6b, 0x38, 0xea, 0xf8, 0xf1, 0x95, + 0x39, 0xd4, 0x51, 0x18, 0x23, 0x7f, 0x38, 0x7c, 0x10, 0xc2, 0xf7, 0xf2, 0x1f, 0x0f, 0x93, 0xe2, + 0xba, 0x55, 0x32, 0xc6, 0xb0, 0x5f, 0xed, 0x30, 0xf5, 0x4b, 0xf7, 0x17, 0x47, 0x48, 0x71, 0xce, + 0x5a, 0x37, 0xae, 0x3b, 0xd4, 0xda, 0x3b, 0xfc, 0xcb, 0x23, 0x05, 0xb1, 0xa8, 0x63, 0x1c, 0x2f, + 0xdc, 0x26, 0x62, 0xba, 0xea, 0x17, 0xd2, 0x9d, 0xe3, 0xfc, 0x9d, 0xec, 0xd1, 0x22, 0x62, 0xcc, + 0xf2, 0x15, 0xa3, 0x2c, 0x66, 0x1d, 0x91, 0x65, 0x69, 0xdf, 0x8a, 0x0c, 0xe1, 0xee, 0x71, 0x9a, + 0xde, 0xcd, 0x7a, 0x4b, 0x3b, 0x3b, 0xa2, 0x9c, 0xb4, 0x9e, 0x54, 0x99, 0xcb, 0xe0, 0x25, 0x20, + 0x0b, 0x9b, 0xf5, 0x9a, 0x94, 0x34, 0xa2, 0xf3, 0x21, 0xf6, 0x23, 0xa0, 0x41, 0x34, 0x66, 0x15, + 0x4a, 0x72, 0x63, 0xe8, 0x62, 0xa3, 0x74, 0xec, 0x33, 0x0b, 0x3f, 0x06, 0x7e, 0x99, 0x5d, 0x3a, + 0x18, 0xd8, 0xd2, 0x37, 0x87, 0x38, 0x94, 0xf0, 0x13, 0x20, 0xd3, 0x67, 0x60, 0xc7, 0x75, 0xbe, + 0x5b, 0xe0, 0x3f, 0x7d, 0x0b, 0xe0, 0xbc, 0xfb, 0x51, 0xc2, 0xcb, 0x40, 0x1b, 0x2e, 0x80, 0x0b, + 0xb5, 0xdc, 0xc4, 0x1d, 0x15, 0x61, 0xde, 0xaf, 0x3f, 0x9b, 0xb8, 0xbb, 0x36, 0x4c, 0x9c, 0x4a, + 0x13, 0xec, 0x62, 0x64, 0xac, 0xcc, 0xe0, 0xe7, 0x40, 0x35, 0xde, 0xc5, 0x34, 0x11, 0xa3, 0x8e, + 0x35, 0x11, 0x66, 0x19, 0xc9, 0xa1, 0x6a, 0xb9, 0xb5, 0x40, 0xad, 0x32, 0x0b, 0x93, 0x97, 0xcd, + 0x0b, 0x0b, 0xa4, 0xa1, 0xe6, 0x9c, 0x88, 0xfa, 0xfe, 0xc4, 0xea, 0x58, 0x4c, 0x85, 0x45, 0xf8, + 0xd7, 0x02, 0x3f, 0x17, 0x0e, 0x89, 0x09, 0xab, 0x8b, 0xce, 0x2a, 0xdc, 0x41, 0xf8, 0xf7, 0x02, + 0xd5, 0x7e, 0xc7, 0x5f, 0x82, 0x91, 0x49, 0xc2, 0x88, 0xff, 0xcf, 0xc2, 0x78, 0xb7, 0xae, 0xb6, + 0xd7, 0xcd, 0x26, 0xda, 0x41, 0x24, 0xd2, 0x0c, 0x5e, 0x3e, 0x4d, 0xe0, 0x1e, 0x5a, 0xef, 0x5b, + 0xe6, 0x47, 0x25, 0x7c, 0xa9, 0x42, 0x0e, 0x14, 0xa9, 0xfe, 0xd4, 0xd3, 0xca, 0x85, 0xdd, 0x84, + 0x12, 0xbe, 0x5c, 0xa1, 0xc5, 0x55, 0xc4, 0x3c, 0x6e, 0x8d, 0x8e, 0x7b, 0xce, 0x37, 0xcf, 0x57, + 0x2a, 0x14, 0xc4, 0x22, 0x7f, 0x7c, 0xef, 0x85, 0x81, 0x9b, 0x21, 0x7c, 0xb5, 0x42, 0x7e, 0x14, + 0x41, 0xfe, 0x37, 0x5a, 0xf8, 0x5a, 0x85, 0x22, 0x54, 0xe4, 0xf9, 0xa3, 0xb4, 0xd1, 0x17, 0x49, + 0xe2, 0x6b, 0x15, 0xbe, 0x5e, 0xa1, 0xba, 0xda, 0xfb, 0x5c, 0x45, 0x38, 0x1e, 0x07, 0x66, 0x1b, + 0x35, 0x7c, 0xe3, 0x00, 0xe0, 0xba, 0x71, 0xbd, 0x61, 0x9a, 0x1a, 0xeb, 0x53, 0xff, 0xcd, 0x0a, + 0x75, 0x4c, 0x11, 0x48, 0x23, 0x2c, 0x17, 0xf5, 0xad, 0x59, 0x7e, 0x93, 0xb2, 0xeb, 0xdd, 0x55, + 0xf8, 0xf6, 0x1e, 0x97, 0x7c, 0x7e, 0xc7, 0x57, 0xd1, 0x87, 0x17, 0xa7, 0xa5, 0x17, 0x78, 0xe4, + 0xf4, 0x47, 0x16, 0x69, 0x61, 0xec, 0x47, 0xd0, 0x14, 0x6b, 0x69, 0x99, 0x1a, 0xa5, 0x1d, 0x7c, + 0x74, 0x91, 0x52, 0x57, 0xf7, 0xc7, 0xfc, 0x78, 0xe3, 0x7c, 0xac, 0x4a, 0x51, 0x2b, 0x52, 0xd7, + 0x4d, 0xbb, 0xd9, 0x4b, 0x31, 0x52, 0x5b, 0xca, 0x1f, 0xe9, 0xb3, 0x20, 0xd4, 0xcb, 0x7e, 0xd8, + 0xa3, 0x84, 0x4f, 0x54, 0x29, 0x79, 0x45, 0xc8, 0xf8, 0x82, 0x6f, 0x2e, 0x1b, 0x3b, 0x10, 0x0e, + 0x3e, 0x39, 0x0b, 0xb4, 0x6a, 0xe2, 0x30, 0x44, 0x22, 0x63, 0x85, 0x33, 0x16, 0x3e, 0x55, 0xa5, + 0x70, 0x15, 0x41, 0x2b, 0xdd, 0x4e, 0xa3, 0x91, 0x28, 0xdf, 0xf1, 0x9f, 0xae, 0xd2, 0xe6, 0x29, + 0xf2, 0xbd, 0x15, 0x63, 0x87, 0x3e, 0x53, 0xa5, 0x98, 0x15, 0x01, 0x4d, 0xe1, 0xc4, 0xba, 0x71, + 0xcb, 0x66, 0xa8, 0x25, 0x7c, 0xb6, 0x4a, 0xd5, 0x5a, 0x44, 0x8c, 0x1b, 0xed, 0x7a, 0x2a, 0x7d, + 0x35, 0x3e, 0x35, 0x4b, 0xcd, 0x9a, 0xd0, 0x22, 0x46, 0x1b, 0x16, 0xdc, 0xd3, 0xb3, 0xd4, 0x10, + 0x20, 0xff, 0x02, 0xf8, 0xdc, 0x2c, 0x35, 0x14, 0x93, 0xc6, 0x6a, 0xbb, 0x66, 0xe3, 0x0c, 0x3e, + 0x5f, 0xa5, 0x9b, 0xb3, 0x88, 0x59, 0xee, 0xb5, 0xac, 0x35, 0x16, 0x9e, 0x39, 0x20, 0xee, 0x34, + 0x43, 0x9f, 0xad, 0xd2, 0xe5, 0x31, 0x9d, 0xbd, 0xba, 0x88, 0xb6, 0x87, 0xe9, 0x24, 0x83, 0xcf, + 0xcd, 0xf2, 0xa6, 0xdd, 0x5c, 0x41, 0xbd, 0x2c, 0x54, 0x82, 0x12, 0x9e, 0x9f, 0x65, 0x6b, 0xc3, + 0x62, 0x28, 0x24, 0xc2, 0xdc, 0xaa, 0xd6, 0x2f, 0xdd, 0xf9, 0xd3, 0x85, 0x7b, 0x3e, 0x50, 0xc9, + 0xbf, 0x06, 0x1d, 0x46, 0xfd, 0xa5, 0xf0, 0x73, 0x29, 0x36, 0x4b, 0xe9, 0x76, 0xbc, 0x44, 0xdf, + 0x87, 0x37, 0x0e, 0x85, 0x6f, 0xca, 0xf7, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x99, 0x01, 0x17, + 0x6b, 0x89, 0x0e, 0x00, 0x00, } diff --git a/go/pkg/messengertypes/links.go b/go/pkg/messengertypes/links.go new file mode 100644 index 0000000000..52c3b5d5bf --- /dev/null +++ b/go/pkg/messengertypes/links.go @@ -0,0 +1,76 @@ +package messengertypes + +import ( + fmt "fmt" + + "berty.tech/berty/v2/go/pkg/errcode" + protocoltypes "berty.tech/berty/v2/go/pkg/protocoltypes" +) + +func (link *BertyLink) IsValid() error { + if link == nil { + return errcode.ErrMissingInput + } + switch link.Kind { + case BertyLink_ContactInviteV1Kind: + if link.BertyID == nil || + link.BertyID.AccountPK == nil || + link.BertyID.PublicRendezvousSeed == nil { + return errcode.ErrMissingInput + } + return nil + + case BertyLink_GroupV1Kind: + if link.BertyGroup == nil { + return errcode.ErrMissingInput + } + if groupType := link.BertyGroup.Group.GroupType; groupType != protocoltypes.GroupTypeMultiMember { + return errcode.ErrInvalidInput.Wrap(fmt.Errorf("can't share a %q group type", groupType)) + } + return nil + + case BertyLink_EncryptedV1Kind: + if link.Encrypted == nil { + return errcode.ErrMissingInput + } + switch link.Encrypted.Kind { + case BertyLink_ContactInviteV1Kind: + if link.Encrypted.ContactAccountPK == nil || + link.Encrypted.ContactPublicRendezvousSeed == nil { + return errcode.ErrMissingInput + } + case BertyLink_GroupV1Kind: + if groupType := link.Encrypted.GroupType; groupType != protocoltypes.GroupTypeMultiMember { + return errcode.ErrInvalidInput.Wrap(fmt.Errorf("can't share a %q group type", groupType)) + } + default: + return errcode.ErrInvalidInput + } + return nil + } + return errcode.ErrInvalidInput +} + +func (link *BertyLink) IsContact() bool { + return link.Kind == BertyLink_ContactInviteV1Kind && + link.IsValid() == nil +} + +func (link *BertyLink) IsGroup() bool { + return link.Kind == BertyLink_GroupV1Kind && + link.IsValid() == nil +} + +func (id *BertyID) GetBertyLink() *BertyLink { + return &BertyLink{ + Kind: BertyLink_ContactInviteV1Kind, + BertyID: id, + } +} + +func (group *BertyGroup) GetBertyLink() *BertyLink { + return &BertyLink{ + Kind: BertyLink_GroupV1Kind, + BertyGroup: group, + } +} diff --git a/go/pkg/bertymessenger/bertymessenger.pb.go b/go/pkg/messengertypes/messengertypes.pb.go similarity index 78% rename from go/pkg/bertymessenger/bertymessenger.pb.go rename to go/pkg/messengertypes/messengertypes.pb.go index cdbee682dc..4fb092b22f 100644 --- a/go/pkg/bertymessenger/bertymessenger.pb.go +++ b/go/pkg/messengertypes/messengertypes.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: bertymessenger.proto +// source: messengertypes.proto -package bertymessenger +package messengertypes import ( context "context" @@ -14,7 +14,7 @@ import ( codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - bertytypes "berty.tech/berty/v2/go/pkg/bertytypes" + protocoltypes "berty.tech/berty/v2/go/pkg/protocoltypes" ) // Reference imports to suppress errors if they are not otherwise used. @@ -36,18 +36,21 @@ const ( BertyLink_UnknownKind BertyLink_Kind = 0 BertyLink_ContactInviteV1Kind BertyLink_Kind = 1 BertyLink_GroupV1Kind BertyLink_Kind = 2 + BertyLink_EncryptedV1Kind BertyLink_Kind = 3 ) var BertyLink_Kind_name = map[int32]string{ 0: "UnknownKind", 1: "ContactInviteV1Kind", 2: "GroupV1Kind", + 3: "EncryptedV1Kind", } var BertyLink_Kind_value = map[string]int32{ "UnknownKind": 0, "ContactInviteV1Kind": 1, "GroupV1Kind": 2, + "EncryptedV1Kind": 3, } func (x BertyLink_Kind) String() string { @@ -55,7 +58,7 @@ func (x BertyLink_Kind) String() string { } func (BertyLink_Kind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{7, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{7, 0} } type AppMessage_Type int32 @@ -69,19 +72,20 @@ const ( AppMessage_TypeSetUserInfo AppMessage_Type = 5 AppMessage_TypeAcknowledge AppMessage_Type = 6 AppMessage_TypeReplyOptions AppMessage_Type = 7 - AppMessage_TypeMonitorMetadata AppMessage_Type = 8 + // these shouldn't be sent on the network + AppMessage_TypeMonitorMetadata AppMessage_Type = 100 ) var AppMessage_Type_name = map[int32]string{ - 0: "Undefined", - 1: "TypeUserMessage", - 2: "TypeUserReaction", - 3: "TypeGroupInvitation", - 4: "TypeSetGroupInfo", - 5: "TypeSetUserInfo", - 6: "TypeAcknowledge", - 7: "TypeReplyOptions", - 8: "TypeMonitorMetadata", + 0: "Undefined", + 1: "TypeUserMessage", + 2: "TypeUserReaction", + 3: "TypeGroupInvitation", + 4: "TypeSetGroupInfo", + 5: "TypeSetUserInfo", + 6: "TypeAcknowledge", + 7: "TypeReplyOptions", + 100: "TypeMonitorMetadata", } var AppMessage_Type_value = map[string]int32{ @@ -93,7 +97,7 @@ var AppMessage_Type_value = map[string]int32{ "TypeSetUserInfo": 5, "TypeAcknowledge": 6, "TypeReplyOptions": 7, - "TypeMonitorMetadata": 8, + "TypeMonitorMetadata": 100, } func (x AppMessage_Type) String() string { @@ -101,7 +105,52 @@ func (x AppMessage_Type) String() string { } func (AppMessage_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 0} +} + +type Media_State int32 + +const ( + Media_StateUnknown Media_State = 0 + // specific to media received + Media_StateNeverDownloaded Media_State = 1 + Media_StatePartiallyDownloaded Media_State = 2 + Media_StateDownloaded Media_State = 3 + Media_StateInCache Media_State = 4 + Media_StateInvalidCrypto Media_State = 5 + // specific to media sent + Media_StatePrepared Media_State = 100 + Media_StateAttached Media_State = 101 +) + +var Media_State_name = map[int32]string{ + 0: "StateUnknown", + 1: "StateNeverDownloaded", + 2: "StatePartiallyDownloaded", + 3: "StateDownloaded", + 4: "StateInCache", + 5: "StateInvalidCrypto", + 100: "StatePrepared", + 101: "StateAttached", +} + +var Media_State_value = map[string]int32{ + "StateUnknown": 0, + "StateNeverDownloaded": 1, + "StatePartiallyDownloaded": 2, + "StateDownloaded": 3, + "StateInCache": 4, + "StateInvalidCrypto": 5, + "StatePrepared": 100, + "StateAttached": 101, +} + +func (x Media_State) String() string { + return proto.EnumName(Media_State_name, int32(x)) +} + +func (Media_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{21, 0} } type Contact_State int32 @@ -135,7 +184,7 @@ func (x Contact_State) String() string { } func (Contact_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{21, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{22, 0} } type Conversation_Type int32 @@ -166,7 +215,7 @@ func (x Conversation_Type) String() string { } func (Conversation_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{22, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{23, 0} } type StreamEvent_Type int32 @@ -183,6 +232,7 @@ const ( StreamEvent_TypeMemberUpdated StreamEvent_Type = 8 StreamEvent_TypeDeviceUpdated StreamEvent_Type = 9 StreamEvent_TypeNotified StreamEvent_Type = 10 + StreamEvent_TypeMediaUpdated StreamEvent_Type = 11 ) var StreamEvent_Type_name = map[int32]string{ @@ -197,6 +247,7 @@ var StreamEvent_Type_name = map[int32]string{ 8: "TypeMemberUpdated", 9: "TypeDeviceUpdated", 10: "TypeNotified", + 11: "TypeMediaUpdated", } var StreamEvent_Type_value = map[string]int32{ @@ -211,6 +262,7 @@ var StreamEvent_Type_value = map[string]int32{ "TypeMemberUpdated": 8, "TypeDeviceUpdated": 9, "TypeNotified": 10, + "TypeMediaUpdated": 11, } func (x StreamEvent_Type) String() string { @@ -218,7 +270,7 @@ func (x StreamEvent_Type) String() string { } func (StreamEvent_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 0} } type StreamEvent_Notified_Type int32 @@ -252,7 +304,7 @@ func (x StreamEvent_Notified_Type) String() string { } func (StreamEvent_Notified_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 9, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 10, 0} } type ConversationOpen struct { @@ -262,7 +314,7 @@ func (m *ConversationOpen) Reset() { *m = ConversationOpen{} } func (m *ConversationOpen) String() string { return proto.CompactTextString(m) } func (*ConversationOpen) ProtoMessage() {} func (*ConversationOpen) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{0} + return fileDescriptor_0eab5f5532ffdd8b, []int{0} } func (m *ConversationOpen) XXX_Unmarshal(b []byte) error { @@ -295,7 +347,7 @@ func (m *ConversationOpen_Request) Reset() { *m = ConversationOpen_Reque func (m *ConversationOpen_Request) String() string { return proto.CompactTextString(m) } func (*ConversationOpen_Request) ProtoMessage() {} func (*ConversationOpen_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{0, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{0, 0} } func (m *ConversationOpen_Request) XXX_Unmarshal(b []byte) error { @@ -334,7 +386,7 @@ func (m *ConversationOpen_Reply) Reset() { *m = ConversationOpen_Reply{} func (m *ConversationOpen_Reply) String() string { return proto.CompactTextString(m) } func (*ConversationOpen_Reply) ProtoMessage() {} func (*ConversationOpen_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{0, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{0, 1} } func (m *ConversationOpen_Reply) XXX_Unmarshal(b []byte) error { @@ -366,7 +418,7 @@ func (m *ConversationClose) Reset() { *m = ConversationClose{} } func (m *ConversationClose) String() string { return proto.CompactTextString(m) } func (*ConversationClose) ProtoMessage() {} func (*ConversationClose) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{1} + return fileDescriptor_0eab5f5532ffdd8b, []int{1} } func (m *ConversationClose) XXX_Unmarshal(b []byte) error { @@ -399,7 +451,7 @@ func (m *ConversationClose_Request) Reset() { *m = ConversationClose_Req func (m *ConversationClose_Request) String() string { return proto.CompactTextString(m) } func (*ConversationClose_Request) ProtoMessage() {} func (*ConversationClose_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{1, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{1, 0} } func (m *ConversationClose_Request) XXX_Unmarshal(b []byte) error { @@ -438,7 +490,7 @@ func (m *ConversationClose_Reply) Reset() { *m = ConversationClose_Reply func (m *ConversationClose_Reply) String() string { return proto.CompactTextString(m) } func (*ConversationClose_Reply) ProtoMessage() {} func (*ConversationClose_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{1, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{1, 1} } func (m *ConversationClose_Reply) XXX_Unmarshal(b []byte) error { @@ -470,7 +522,7 @@ func (m *EchoTest) Reset() { *m = EchoTest{} } func (m *EchoTest) String() string { return proto.CompactTextString(m) } func (*EchoTest) ProtoMessage() {} func (*EchoTest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{2} + return fileDescriptor_0eab5f5532ffdd8b, []int{2} } func (m *EchoTest) XXX_Unmarshal(b []byte) error { @@ -504,7 +556,7 @@ func (m *EchoTest_Request) Reset() { *m = EchoTest_Request{} } func (m *EchoTest_Request) String() string { return proto.CompactTextString(m) } func (*EchoTest_Request) ProtoMessage() {} func (*EchoTest_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{2, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{2, 0} } func (m *EchoTest_Request) XXX_Unmarshal(b []byte) error { @@ -551,7 +603,7 @@ func (m *EchoTest_Reply) Reset() { *m = EchoTest_Reply{} } func (m *EchoTest_Reply) String() string { return proto.CompactTextString(m) } func (*EchoTest_Reply) ProtoMessage() {} func (*EchoTest_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{2, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{2, 1} } func (m *EchoTest_Reply) XXX_Unmarshal(b []byte) error { @@ -590,7 +642,7 @@ func (m *InstanceShareableBertyID) Reset() { *m = InstanceShareableBerty func (m *InstanceShareableBertyID) String() string { return proto.CompactTextString(m) } func (*InstanceShareableBertyID) ProtoMessage() {} func (*InstanceShareableBertyID) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{3} + return fileDescriptor_0eab5f5532ffdd8b, []int{3} } func (m *InstanceShareableBertyID) XXX_Unmarshal(b []byte) error { @@ -619,13 +671,15 @@ type InstanceShareableBertyID_Request struct { // reset will regenerate a new link Reset_ bool `protobuf:"varint,1,opt,name=reset,proto3" json:"reset,omitempty"` DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // optional passphase to encrypt the link + Passphrase []byte `protobuf:"bytes,3,opt,name=passphrase,proto3" json:"passphrase,omitempty"` } func (m *InstanceShareableBertyID_Request) Reset() { *m = InstanceShareableBertyID_Request{} } func (m *InstanceShareableBertyID_Request) String() string { return proto.CompactTextString(m) } func (*InstanceShareableBertyID_Request) ProtoMessage() {} func (*InstanceShareableBertyID_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{3, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{3, 0} } func (m *InstanceShareableBertyID_Request) XXX_Unmarshal(b []byte) error { @@ -664,6 +718,13 @@ func (m *InstanceShareableBertyID_Request) GetDisplayName() string { return "" } +func (m *InstanceShareableBertyID_Request) GetPassphrase() []byte { + if m != nil { + return m.Passphrase + } + return nil +} + type InstanceShareableBertyID_Reply struct { Link *BertyLink `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` InternalURL string `protobuf:"bytes,2,opt,name=internal_url,json=internalUrl,proto3" json:"internal_url,omitempty"` @@ -674,7 +735,7 @@ func (m *InstanceShareableBertyID_Reply) Reset() { *m = InstanceShareabl func (m *InstanceShareableBertyID_Reply) String() string { return proto.CompactTextString(m) } func (*InstanceShareableBertyID_Reply) ProtoMessage() {} func (*InstanceShareableBertyID_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{3, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{3, 1} } func (m *InstanceShareableBertyID_Reply) XXX_Unmarshal(b []byte) error { @@ -727,7 +788,7 @@ func (m *ShareableBertyGroup) Reset() { *m = ShareableBertyGroup{} } func (m *ShareableBertyGroup) String() string { return proto.CompactTextString(m) } func (*ShareableBertyGroup) ProtoMessage() {} func (*ShareableBertyGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{4} + return fileDescriptor_0eab5f5532ffdd8b, []int{4} } func (m *ShareableBertyGroup) XXX_Unmarshal(b []byte) error { @@ -761,7 +822,7 @@ func (m *ShareableBertyGroup_Request) Reset() { *m = ShareableBertyGroup func (m *ShareableBertyGroup_Request) String() string { return proto.CompactTextString(m) } func (*ShareableBertyGroup_Request) ProtoMessage() {} func (*ShareableBertyGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{4, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{4, 0} } func (m *ShareableBertyGroup_Request) XXX_Unmarshal(b []byte) error { @@ -810,7 +871,7 @@ func (m *ShareableBertyGroup_Reply) Reset() { *m = ShareableBertyGroup_R func (m *ShareableBertyGroup_Reply) String() string { return proto.CompactTextString(m) } func (*ShareableBertyGroup_Reply) ProtoMessage() {} func (*ShareableBertyGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{4, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{4, 1} } func (m *ShareableBertyGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -863,7 +924,7 @@ func (m *DevShareInstanceBertyID) Reset() { *m = DevShareInstanceBertyID func (m *DevShareInstanceBertyID) String() string { return proto.CompactTextString(m) } func (*DevShareInstanceBertyID) ProtoMessage() {} func (*DevShareInstanceBertyID) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{5} + return fileDescriptor_0eab5f5532ffdd8b, []int{5} } func (m *DevShareInstanceBertyID) XXX_Unmarshal(b []byte) error { @@ -898,7 +959,7 @@ func (m *DevShareInstanceBertyID_Request) Reset() { *m = DevShareInstanc func (m *DevShareInstanceBertyID_Request) String() string { return proto.CompactTextString(m) } func (*DevShareInstanceBertyID_Request) ProtoMessage() {} func (*DevShareInstanceBertyID_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{5, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{5, 0} } func (m *DevShareInstanceBertyID_Request) XXX_Unmarshal(b []byte) error { @@ -944,7 +1005,7 @@ func (m *DevShareInstanceBertyID_Reply) Reset() { *m = DevShareInstanceB func (m *DevShareInstanceBertyID_Reply) String() string { return proto.CompactTextString(m) } func (*DevShareInstanceBertyID_Reply) ProtoMessage() {} func (*DevShareInstanceBertyID_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{5, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{5, 1} } func (m *DevShareInstanceBertyID_Reply) XXX_Unmarshal(b []byte) error { @@ -976,7 +1037,7 @@ func (m *ParseDeepLink) Reset() { *m = ParseDeepLink{} } func (m *ParseDeepLink) String() string { return proto.CompactTextString(m) } func (*ParseDeepLink) ProtoMessage() {} func (*ParseDeepLink) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{6} + return fileDescriptor_0eab5f5532ffdd8b, []int{6} } func (m *ParseDeepLink) XXX_Unmarshal(b []byte) error { @@ -1003,13 +1064,15 @@ var xxx_messageInfo_ParseDeepLink proto.InternalMessageInfo type ParseDeepLink_Request struct { Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` + // optional passphase to decrypt the link + Passphrase []byte `protobuf:"bytes,2,opt,name=passphrase,proto3" json:"passphrase,omitempty"` } func (m *ParseDeepLink_Request) Reset() { *m = ParseDeepLink_Request{} } func (m *ParseDeepLink_Request) String() string { return proto.CompactTextString(m) } func (*ParseDeepLink_Request) ProtoMessage() {} func (*ParseDeepLink_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{6, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{6, 0} } func (m *ParseDeepLink_Request) XXX_Unmarshal(b []byte) error { @@ -1041,6 +1104,13 @@ func (m *ParseDeepLink_Request) GetLink() string { return "" } +func (m *ParseDeepLink_Request) GetPassphrase() []byte { + if m != nil { + return m.Passphrase + } + return nil +} + type ParseDeepLink_Reply struct { Link *BertyLink `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` } @@ -1049,7 +1119,7 @@ func (m *ParseDeepLink_Reply) Reset() { *m = ParseDeepLink_Reply{} } func (m *ParseDeepLink_Reply) String() string { return proto.CompactTextString(m) } func (*ParseDeepLink_Reply) ProtoMessage() {} func (*ParseDeepLink_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{6, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{6, 1} } func (m *ParseDeepLink_Reply) XXX_Unmarshal(b []byte) error { @@ -1082,16 +1152,17 @@ func (m *ParseDeepLink_Reply) GetLink() *BertyLink { } type BertyLink struct { - Kind BertyLink_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=berty.messenger.v1.BertyLink_Kind" json:"kind,omitempty"` - BertyID *BertyID `protobuf:"bytes,2,opt,name=berty_id,json=bertyId,proto3" json:"berty_id,omitempty"` - BertyGroup *BertyGroup `protobuf:"bytes,3,opt,name=berty_group,json=bertyGroup,proto3" json:"berty_group,omitempty"` + Kind BertyLink_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=berty.messenger.v1.BertyLink_Kind" json:"kind,omitempty"` + BertyID *BertyID `protobuf:"bytes,2,opt,name=berty_id,json=bertyId,proto3" json:"berty_id,omitempty"` + BertyGroup *BertyGroup `protobuf:"bytes,3,opt,name=berty_group,json=bertyGroup,proto3" json:"berty_group,omitempty"` + Encrypted *BertyLink_Encrypted `protobuf:"bytes,4,opt,name=encrypted,proto3" json:"encrypted,omitempty"` } func (m *BertyLink) Reset() { *m = BertyLink{} } func (m *BertyLink) String() string { return proto.CompactTextString(m) } func (*BertyLink) ProtoMessage() {} func (*BertyLink) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{7} + return fileDescriptor_0eab5f5532ffdd8b, []int{7} } func (m *BertyLink) XXX_Unmarshal(b []byte) error { @@ -1137,6 +1208,151 @@ func (m *BertyLink) GetBertyGroup() *BertyGroup { return nil } +func (m *BertyLink) GetEncrypted() *BertyLink_Encrypted { + if m != nil { + return m.Encrypted + } + return nil +} + +// Encrypted is a clear structure containing clear and encrypted fields. +// +// We prefer to use a clear struct with encrypted fields instead of a simple +// encrypted struct, to improves chances of having a valid structure even +// with an invalid passphase. This will force an attacker to have more resources +// to test more false-positive guesses. +type BertyLink_Encrypted struct { + // kind is a clear representation of the unencrypted link type. + Kind BertyLink_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=berty.messenger.v1.BertyLink_Kind" json:"kind,omitempty"` + // nonce is a clear field used by scrypt as "salt" to derive the passphrase and + // also used by cipher.NewCTR as "iv" to initialize a stream cipher. + Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // display_name is an optional clear representation of the display name. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + ContactPublicRendezvousSeed []byte `protobuf:"bytes,10,opt,name=contact_public_rendezvous_seed,json=contactPublicRendezvousSeed,proto3" json:"contact_public_rendezvous_seed,omitempty"` + ContactAccountPK []byte `protobuf:"bytes,11,opt,name=contact_account_pk,json=contactAccountPk,proto3" json:"contact_account_pk,omitempty"` + ContactDisplayName []byte `protobuf:"bytes,12,opt,name=contact_display_name,json=contactDisplayName,proto3" json:"contact_display_name,omitempty"` + GroupPublicKey []byte `protobuf:"bytes,20,opt,name=group_public_key,json=groupPublicKey,proto3" json:"group_public_key,omitempty"` + GroupSecret []byte `protobuf:"bytes,21,opt,name=group_secret,json=groupSecret,proto3" json:"group_secret,omitempty"` + GroupSecretSig []byte `protobuf:"bytes,22,opt,name=group_secret_sig,json=groupSecretSig,proto3" json:"group_secret_sig,omitempty"` + GroupType protocoltypes.GroupType `protobuf:"varint,23,opt,name=group_type,json=groupType,proto3,enum=berty.protocol.v1.GroupType" json:"group_type,omitempty"` + GroupSignPub []byte `protobuf:"bytes,24,opt,name=group_sign_pub,json=groupSignPub,proto3" json:"group_sign_pub,omitempty"` + GroupDisplayName []byte `protobuf:"bytes,25,opt,name=group_display_name,json=groupDisplayName,proto3" json:"group_display_name,omitempty"` +} + +func (m *BertyLink_Encrypted) Reset() { *m = BertyLink_Encrypted{} } +func (m *BertyLink_Encrypted) String() string { return proto.CompactTextString(m) } +func (*BertyLink_Encrypted) ProtoMessage() {} +func (*BertyLink_Encrypted) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{7, 0} +} + +func (m *BertyLink_Encrypted) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BertyLink_Encrypted.Unmarshal(m, b) +} + +func (m *BertyLink_Encrypted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BertyLink_Encrypted.Marshal(b, m, deterministic) +} + +func (m *BertyLink_Encrypted) XXX_Merge(src proto.Message) { + xxx_messageInfo_BertyLink_Encrypted.Merge(m, src) +} + +func (m *BertyLink_Encrypted) XXX_Size() int { + return xxx_messageInfo_BertyLink_Encrypted.Size(m) +} + +func (m *BertyLink_Encrypted) XXX_DiscardUnknown() { + xxx_messageInfo_BertyLink_Encrypted.DiscardUnknown(m) +} + +var xxx_messageInfo_BertyLink_Encrypted proto.InternalMessageInfo + +func (m *BertyLink_Encrypted) GetKind() BertyLink_Kind { + if m != nil { + return m.Kind + } + return BertyLink_UnknownKind +} + +func (m *BertyLink_Encrypted) GetNonce() []byte { + if m != nil { + return m.Nonce + } + return nil +} + +func (m *BertyLink_Encrypted) GetDisplayName() string { + if m != nil { + return m.DisplayName + } + return "" +} + +func (m *BertyLink_Encrypted) GetContactPublicRendezvousSeed() []byte { + if m != nil { + return m.ContactPublicRendezvousSeed + } + return nil +} + +func (m *BertyLink_Encrypted) GetContactAccountPK() []byte { + if m != nil { + return m.ContactAccountPK + } + return nil +} + +func (m *BertyLink_Encrypted) GetContactDisplayName() []byte { + if m != nil { + return m.ContactDisplayName + } + return nil +} + +func (m *BertyLink_Encrypted) GetGroupPublicKey() []byte { + if m != nil { + return m.GroupPublicKey + } + return nil +} + +func (m *BertyLink_Encrypted) GetGroupSecret() []byte { + if m != nil { + return m.GroupSecret + } + return nil +} + +func (m *BertyLink_Encrypted) GetGroupSecretSig() []byte { + if m != nil { + return m.GroupSecretSig + } + return nil +} + +func (m *BertyLink_Encrypted) GetGroupType() protocoltypes.GroupType { + if m != nil { + return m.GroupType + } + return protocoltypes.GroupTypeUndefined +} + +func (m *BertyLink_Encrypted) GetGroupSignPub() []byte { + if m != nil { + return m.GroupSignPub + } + return nil +} + +func (m *BertyLink_Encrypted) GetGroupDisplayName() []byte { + if m != nil { + return m.GroupDisplayName + } + return nil +} + type SendContactRequest struct { } @@ -1144,7 +1360,7 @@ func (m *SendContactRequest) Reset() { *m = SendContactRequest{} } func (m *SendContactRequest) String() string { return proto.CompactTextString(m) } func (*SendContactRequest) ProtoMessage() {} func (*SendContactRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{8} + return fileDescriptor_0eab5f5532ffdd8b, []int{8} } func (m *SendContactRequest) XXX_Unmarshal(b []byte) error { @@ -1179,7 +1395,7 @@ func (m *SendContactRequest_Request) Reset() { *m = SendContactRequest_R func (m *SendContactRequest_Request) String() string { return proto.CompactTextString(m) } func (*SendContactRequest_Request) ProtoMessage() {} func (*SendContactRequest_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{8, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{8, 0} } func (m *SendContactRequest_Request) XXX_Unmarshal(b []byte) error { @@ -1232,7 +1448,7 @@ func (m *SendContactRequest_Reply) Reset() { *m = SendContactRequest_Rep func (m *SendContactRequest_Reply) String() string { return proto.CompactTextString(m) } func (*SendContactRequest_Reply) ProtoMessage() {} func (*SendContactRequest_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{8, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{8, 1} } func (m *SendContactRequest_Reply) XXX_Unmarshal(b []byte) error { @@ -1264,7 +1480,7 @@ func (m *SendAck) Reset() { *m = SendAck{} } func (m *SendAck) String() string { return proto.CompactTextString(m) } func (*SendAck) ProtoMessage() {} func (*SendAck) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{9} + return fileDescriptor_0eab5f5532ffdd8b, []int{9} } func (m *SendAck) XXX_Unmarshal(b []byte) error { @@ -1298,7 +1514,7 @@ func (m *SendAck_Request) Reset() { *m = SendAck_Request{} } func (m *SendAck_Request) String() string { return proto.CompactTextString(m) } func (*SendAck_Request) ProtoMessage() {} func (*SendAck_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{9, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{9, 0} } func (m *SendAck_Request) XXX_Unmarshal(b []byte) error { @@ -1344,7 +1560,7 @@ func (m *SendAck_Reply) Reset() { *m = SendAck_Reply{} } func (m *SendAck_Reply) String() string { return proto.CompactTextString(m) } func (*SendAck_Reply) ProtoMessage() {} func (*SendAck_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{9, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{9, 1} } func (m *SendAck_Reply) XXX_Unmarshal(b []byte) error { @@ -1376,7 +1592,7 @@ func (m *SendMessage) Reset() { *m = SendMessage{} } func (m *SendMessage) String() string { return proto.CompactTextString(m) } func (*SendMessage) ProtoMessage() {} func (*SendMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{10} + return fileDescriptor_0eab5f5532ffdd8b, []int{10} } func (m *SendMessage) XXX_Unmarshal(b []byte) error { @@ -1410,7 +1626,7 @@ func (m *SendMessage_Request) Reset() { *m = SendMessage_Request{} } func (m *SendMessage_Request) String() string { return proto.CompactTextString(m) } func (*SendMessage_Request) ProtoMessage() {} func (*SendMessage_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{10, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{10, 0} } func (m *SendMessage_Request) XXX_Unmarshal(b []byte) error { @@ -1456,7 +1672,7 @@ func (m *SendMessage_Reply) Reset() { *m = SendMessage_Reply{} } func (m *SendMessage_Reply) String() string { return proto.CompactTextString(m) } func (*SendMessage_Reply) ProtoMessage() {} func (*SendMessage_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{10, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{10, 1} } func (m *SendMessage_Reply) XXX_Unmarshal(b []byte) error { @@ -1488,7 +1704,7 @@ func (m *SendReplyOptions) Reset() { *m = SendReplyOptions{} } func (m *SendReplyOptions) String() string { return proto.CompactTextString(m) } func (*SendReplyOptions) ProtoMessage() {} func (*SendReplyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{11} + return fileDescriptor_0eab5f5532ffdd8b, []int{11} } func (m *SendReplyOptions) XXX_Unmarshal(b []byte) error { @@ -1522,7 +1738,7 @@ func (m *SendReplyOptions_Request) Reset() { *m = SendReplyOptions_Reque func (m *SendReplyOptions_Request) String() string { return proto.CompactTextString(m) } func (*SendReplyOptions_Request) ProtoMessage() {} func (*SendReplyOptions_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{11, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{11, 0} } func (m *SendReplyOptions_Request) XXX_Unmarshal(b []byte) error { @@ -1568,7 +1784,7 @@ func (m *SendReplyOptions_Reply) Reset() { *m = SendReplyOptions_Reply{} func (m *SendReplyOptions_Reply) String() string { return proto.CompactTextString(m) } func (*SendReplyOptions_Reply) ProtoMessage() {} func (*SendReplyOptions_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{11, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{11, 1} } func (m *SendReplyOptions_Reply) XXX_Unmarshal(b []byte) error { @@ -1603,7 +1819,7 @@ func (m *BertyID) Reset() { *m = BertyID{} } func (m *BertyID) String() string { return proto.CompactTextString(m) } func (*BertyID) ProtoMessage() {} func (*BertyID) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{12} + return fileDescriptor_0eab5f5532ffdd8b, []int{12} } func (m *BertyID) XXX_Unmarshal(b []byte) error { @@ -1650,15 +1866,15 @@ func (m *BertyID) GetDisplayName() string { } type BertyGroup struct { - Group *bertytypes.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Group *protocoltypes.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` } func (m *BertyGroup) Reset() { *m = BertyGroup{} } func (m *BertyGroup) String() string { return proto.CompactTextString(m) } func (*BertyGroup) ProtoMessage() {} func (*BertyGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{13} + return fileDescriptor_0eab5f5532ffdd8b, []int{13} } func (m *BertyGroup) XXX_Unmarshal(b []byte) error { @@ -1683,7 +1899,7 @@ func (m *BertyGroup) XXX_DiscardUnknown() { var xxx_messageInfo_BertyGroup proto.InternalMessageInfo -func (m *BertyGroup) GetGroup() *bertytypes.Group { +func (m *BertyGroup) GetGroup() *protocoltypes.Group { if m != nil { return m.Group } @@ -1697,17 +1913,19 @@ func (m *BertyGroup) GetDisplayName() string { return "" } +// AppMessage is the app layer format type AppMessage struct { Type AppMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=berty.messenger.v1.AppMessage_Type" json:"type,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` SentDate int64 `protobuf:"varint,3,opt,name=sent_date,json=sentDate,proto3" json:"sentDate"` + Medias []*Media `protobuf:"bytes,4,rep,name=medias,proto3" json:"medias,omitempty"` } func (m *AppMessage) Reset() { *m = AppMessage{} } func (m *AppMessage) String() string { return proto.CompactTextString(m) } func (*AppMessage) ProtoMessage() {} func (*AppMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14} + return fileDescriptor_0eab5f5532ffdd8b, []int{14} } func (m *AppMessage) XXX_Unmarshal(b []byte) error { @@ -1753,6 +1971,13 @@ func (m *AppMessage) GetSentDate() int64 { return 0 } +func (m *AppMessage) GetMedias() []*Media { + if m != nil { + return m.Medias + } + return nil +} + type AppMessage_UserMessage struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` } @@ -1761,7 +1986,7 @@ func (m *AppMessage_UserMessage) Reset() { *m = AppMessage_UserMessage{} func (m *AppMessage_UserMessage) String() string { return proto.CompactTextString(m) } func (*AppMessage_UserMessage) ProtoMessage() {} func (*AppMessage_UserMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 0} } func (m *AppMessage_UserMessage) XXX_Unmarshal(b []byte) error { @@ -1802,7 +2027,7 @@ func (m *AppMessage_UserReaction) Reset() { *m = AppMessage_UserReaction func (m *AppMessage_UserReaction) String() string { return proto.CompactTextString(m) } func (*AppMessage_UserReaction) ProtoMessage() {} func (*AppMessage_UserReaction) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 1} } func (m *AppMessage_UserReaction) XXX_Unmarshal(b []byte) error { @@ -1849,7 +2074,7 @@ func (m *AppMessage_GroupInvitation) Reset() { *m = AppMessage_GroupInvi func (m *AppMessage_GroupInvitation) String() string { return proto.CompactTextString(m) } func (*AppMessage_GroupInvitation) ProtoMessage() {} func (*AppMessage_GroupInvitation) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 2} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 2} } func (m *AppMessage_GroupInvitation) XXX_Unmarshal(b []byte) error { @@ -1890,7 +2115,7 @@ func (m *AppMessage_SetGroupInfo) Reset() { *m = AppMessage_SetGroupInfo func (m *AppMessage_SetGroupInfo) String() string { return proto.CompactTextString(m) } func (*AppMessage_SetGroupInfo) ProtoMessage() {} func (*AppMessage_SetGroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 3} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 3} } func (m *AppMessage_SetGroupInfo) XXX_Unmarshal(b []byte) error { @@ -1938,7 +2163,7 @@ func (m *AppMessage_SetUserInfo) Reset() { *m = AppMessage_SetUserInfo{} func (m *AppMessage_SetUserInfo) String() string { return proto.CompactTextString(m) } func (*AppMessage_SetUserInfo) ProtoMessage() {} func (*AppMessage_SetUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 4} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 4} } func (m *AppMessage_SetUserInfo) XXX_Unmarshal(b []byte) error { @@ -1985,7 +2210,7 @@ func (m *AppMessage_Acknowledge) Reset() { *m = AppMessage_Acknowledge{} func (m *AppMessage_Acknowledge) String() string { return proto.CompactTextString(m) } func (*AppMessage_Acknowledge) ProtoMessage() {} func (*AppMessage_Acknowledge) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 5} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 5} } func (m *AppMessage_Acknowledge) XXX_Unmarshal(b []byte) error { @@ -2025,7 +2250,7 @@ func (m *AppMessage_ReplyOptions) Reset() { *m = AppMessage_ReplyOptions func (m *AppMessage_ReplyOptions) String() string { return proto.CompactTextString(m) } func (*AppMessage_ReplyOptions) ProtoMessage() {} func (*AppMessage_ReplyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 6} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 6} } func (m *AppMessage_ReplyOptions) XXX_Unmarshal(b []byte) error { @@ -2058,14 +2283,14 @@ func (m *AppMessage_ReplyOptions) GetOptions() []*ReplyOption { } type AppMessage_MonitorMetadata struct { - Event *bertytypes.MonitorGroup_EventMonitor `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + Event *protocoltypes.MonitorGroup_EventMonitor `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` } func (m *AppMessage_MonitorMetadata) Reset() { *m = AppMessage_MonitorMetadata{} } func (m *AppMessage_MonitorMetadata) String() string { return proto.CompactTextString(m) } func (*AppMessage_MonitorMetadata) ProtoMessage() {} func (*AppMessage_MonitorMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{14, 7} + return fileDescriptor_0eab5f5532ffdd8b, []int{14, 7} } func (m *AppMessage_MonitorMetadata) XXX_Unmarshal(b []byte) error { @@ -2090,7 +2315,7 @@ func (m *AppMessage_MonitorMetadata) XXX_DiscardUnknown() { var xxx_messageInfo_AppMessage_MonitorMetadata proto.InternalMessageInfo -func (m *AppMessage_MonitorMetadata) GetEvent() *bertytypes.MonitorGroup_EventMonitor { +func (m *AppMessage_MonitorMetadata) GetEvent() *protocoltypes.MonitorGroup_EventMonitor { if m != nil { return m.Event } @@ -2106,7 +2331,7 @@ func (m *ReplyOption) Reset() { *m = ReplyOption{} } func (m *ReplyOption) String() string { return proto.CompactTextString(m) } func (*ReplyOption) ProtoMessage() {} func (*ReplyOption) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{15} + return fileDescriptor_0eab5f5532ffdd8b, []int{15} } func (m *ReplyOption) XXX_Unmarshal(b []byte) error { @@ -2152,7 +2377,7 @@ func (m *SystemInfo) Reset() { *m = SystemInfo{} } func (m *SystemInfo) String() string { return proto.CompactTextString(m) } func (*SystemInfo) ProtoMessage() {} func (*SystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{16} + return fileDescriptor_0eab5f5532ffdd8b, []int{16} } func (m *SystemInfo) XXX_Unmarshal(b []byte) error { @@ -2184,7 +2409,7 @@ func (m *SystemInfo_Request) Reset() { *m = SystemInfo_Request{} } func (m *SystemInfo_Request) String() string { return proto.CompactTextString(m) } func (*SystemInfo_Request) ProtoMessage() {} func (*SystemInfo_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{16, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{16, 0} } func (m *SystemInfo_Request) XXX_Unmarshal(b []byte) error { @@ -2210,15 +2435,15 @@ func (m *SystemInfo_Request) XXX_DiscardUnknown() { var xxx_messageInfo_SystemInfo_Request proto.InternalMessageInfo type SystemInfo_Reply struct { - Protocol *bertytypes.SystemInfo_Reply `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` - Messenger *SystemInfo_Messenger `protobuf:"bytes,2,opt,name=messenger,proto3" json:"messenger,omitempty"` + Protocol *protocoltypes.SystemInfo_Reply `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` + Messenger *SystemInfo_Messenger `protobuf:"bytes,2,opt,name=messenger,proto3" json:"messenger,omitempty"` } func (m *SystemInfo_Reply) Reset() { *m = SystemInfo_Reply{} } func (m *SystemInfo_Reply) String() string { return proto.CompactTextString(m) } func (*SystemInfo_Reply) ProtoMessage() {} func (*SystemInfo_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{16, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{16, 1} } func (m *SystemInfo_Reply) XXX_Unmarshal(b []byte) error { @@ -2243,7 +2468,7 @@ func (m *SystemInfo_Reply) XXX_DiscardUnknown() { var xxx_messageInfo_SystemInfo_Reply proto.InternalMessageInfo -func (m *SystemInfo_Reply) GetProtocol() *bertytypes.SystemInfo_Reply { +func (m *SystemInfo_Reply) GetProtocol() *protocoltypes.SystemInfo_Reply { if m != nil { return m.Protocol } @@ -2258,17 +2483,17 @@ func (m *SystemInfo_Reply) GetMessenger() *SystemInfo_Messenger { } type SystemInfo_Messenger struct { - Process *bertytypes.SystemInfo_Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` - Warns []string `protobuf:"bytes,2,rep,name=warns,proto3" json:"warns,omitempty"` - ProtocolInSameProcess bool `protobuf:"varint,3,opt,name=protocol_in_same_process,json=protocolInSameProcess,proto3" json:"protocol_in_same_process,omitempty"` - DB *SystemInfo_DB `protobuf:"bytes,4,opt,name=db,proto3" json:"db,omitempty"` + Process *protocoltypes.SystemInfo_Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` + Warns []string `protobuf:"bytes,2,rep,name=warns,proto3" json:"warns,omitempty"` + ProtocolInSameProcess bool `protobuf:"varint,3,opt,name=protocol_in_same_process,json=protocolInSameProcess,proto3" json:"protocol_in_same_process,omitempty"` + DB *SystemInfo_DB `protobuf:"bytes,4,opt,name=db,proto3" json:"db,omitempty"` } func (m *SystemInfo_Messenger) Reset() { *m = SystemInfo_Messenger{} } func (m *SystemInfo_Messenger) String() string { return proto.CompactTextString(m) } func (*SystemInfo_Messenger) ProtoMessage() {} func (*SystemInfo_Messenger) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{16, 2} + return fileDescriptor_0eab5f5532ffdd8b, []int{16, 2} } func (m *SystemInfo_Messenger) XXX_Unmarshal(b []byte) error { @@ -2293,7 +2518,7 @@ func (m *SystemInfo_Messenger) XXX_DiscardUnknown() { var xxx_messageInfo_SystemInfo_Messenger proto.InternalMessageInfo -func (m *SystemInfo_Messenger) GetProcess() *bertytypes.SystemInfo_Process { +func (m *SystemInfo_Messenger) GetProcess() *protocoltypes.SystemInfo_Process { if m != nil { return m.Process } @@ -2336,7 +2561,7 @@ func (m *SystemInfo_DB) Reset() { *m = SystemInfo_DB{} } func (m *SystemInfo_DB) String() string { return proto.CompactTextString(m) } func (*SystemInfo_DB) ProtoMessage() {} func (*SystemInfo_DB) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{16, 3} + return fileDescriptor_0eab5f5532ffdd8b, []int{16, 3} } func (m *SystemInfo_DB) XXX_Unmarshal(b []byte) error { @@ -2424,7 +2649,7 @@ func (m *ConversationJoin) Reset() { *m = ConversationJoin{} } func (m *ConversationJoin) String() string { return proto.CompactTextString(m) } func (*ConversationJoin) ProtoMessage() {} func (*ConversationJoin) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{17} + return fileDescriptor_0eab5f5532ffdd8b, []int{17} } func (m *ConversationJoin) XXX_Unmarshal(b []byte) error { @@ -2451,13 +2676,15 @@ var xxx_messageInfo_ConversationJoin proto.InternalMessageInfo type ConversationJoin_Request struct { Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` + // optional passphase to decrypt the link + Passphrase []byte `protobuf:"bytes,2,opt,name=passphrase,proto3" json:"passphrase,omitempty"` } func (m *ConversationJoin_Request) Reset() { *m = ConversationJoin_Request{} } func (m *ConversationJoin_Request) String() string { return proto.CompactTextString(m) } func (*ConversationJoin_Request) ProtoMessage() {} func (*ConversationJoin_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{17, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{17, 0} } func (m *ConversationJoin_Request) XXX_Unmarshal(b []byte) error { @@ -2489,6 +2716,13 @@ func (m *ConversationJoin_Request) GetLink() string { return "" } +func (m *ConversationJoin_Request) GetPassphrase() []byte { + if m != nil { + return m.Passphrase + } + return nil +} + type ConversationJoin_Reply struct { } @@ -2496,7 +2730,7 @@ func (m *ConversationJoin_Reply) Reset() { *m = ConversationJoin_Reply{} func (m *ConversationJoin_Reply) String() string { return proto.CompactTextString(m) } func (*ConversationJoin_Reply) ProtoMessage() {} func (*ConversationJoin_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{17, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{17, 1} } func (m *ConversationJoin_Reply) XXX_Unmarshal(b []byte) error { @@ -2534,7 +2768,7 @@ func (m *Account) Reset() { *m = Account{} } func (m *Account) String() string { return proto.CompactTextString(m) } func (*Account) ProtoMessage() {} func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{18} + return fileDescriptor_0eab5f5532ffdd8b, []int{18} } func (m *Account) XXX_Unmarshal(b []byte) error { @@ -2613,7 +2847,7 @@ func (m *ServiceToken) Reset() { *m = ServiceToken{} } func (m *ServiceToken) String() string { return proto.CompactTextString(m) } func (*ServiceToken) ProtoMessage() {} func (*ServiceToken) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{19} + return fileDescriptor_0eab5f5532ffdd8b, []int{19} } func (m *ServiceToken) XXX_Unmarshal(b []byte) error { @@ -2686,13 +2920,14 @@ type Interaction struct { SentDate int64 `protobuf:"varint,9,opt,name=sent_date,json=sentDate,proto3" json:"sent_date,omitempty"` Acknowledged bool `protobuf:"varint,10,opt,name=acknowledged,proto3" json:"acknowledged,omitempty"` TargetCID string `protobuf:"bytes,13,opt,name=target_cid,json=targetCid,proto3" json:"target_cid,omitempty" gorm:"index;column:target_cid"` + Medias []*Media `protobuf:"bytes,15,rep,name=medias,proto3" json:"medias,omitempty"` } func (m *Interaction) Reset() { *m = Interaction{} } func (m *Interaction) String() string { return proto.CompactTextString(m) } func (*Interaction) ProtoMessage() {} func (*Interaction) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{20} + return fileDescriptor_0eab5f5532ffdd8b, []int{20} } func (m *Interaction) XXX_Unmarshal(b []byte) error { @@ -2801,6 +3036,94 @@ func (m *Interaction) GetTargetCID() string { return "" } +func (m *Interaction) GetMedias() []*Media { + if m != nil { + return m.Medias + } + return nil +} + +type Media struct { + CID string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty" gorm:"primaryKey;column:cid"` + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"` + DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // these should not be sent on the bertyprotocol layer + InteractionCID string `protobuf:"bytes,100,opt,name=interaction_cid,json=interactionCid,proto3" json:"interaction_cid,omitempty" gorm:"index;column:interaction_cid"` + State Media_State `protobuf:"varint,103,opt,name=state,proto3,enum=berty.messenger.v1.Media_State" json:"state,omitempty"` +} + +func (m *Media) Reset() { *m = Media{} } +func (m *Media) String() string { return proto.CompactTextString(m) } +func (*Media) ProtoMessage() {} +func (*Media) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{21} +} + +func (m *Media) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Media.Unmarshal(m, b) +} + +func (m *Media) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Media.Marshal(b, m, deterministic) +} + +func (m *Media) XXX_Merge(src proto.Message) { + xxx_messageInfo_Media.Merge(m, src) +} + +func (m *Media) XXX_Size() int { + return xxx_messageInfo_Media.Size(m) +} + +func (m *Media) XXX_DiscardUnknown() { + xxx_messageInfo_Media.DiscardUnknown(m) +} + +var xxx_messageInfo_Media proto.InternalMessageInfo + +func (m *Media) GetCID() string { + if m != nil { + return m.CID + } + return "" +} + +func (m *Media) GetMimeType() string { + if m != nil { + return m.MimeType + } + return "" +} + +func (m *Media) GetFilename() string { + if m != nil { + return m.Filename + } + return "" +} + +func (m *Media) GetDisplayName() string { + if m != nil { + return m.DisplayName + } + return "" +} + +func (m *Media) GetInteractionCID() string { + if m != nil { + return m.InteractionCID + } + return "" +} + +func (m *Media) GetState() Media_State { + if m != nil { + return m.State + } + return Media_StateUnknown +} + type Contact struct { PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" gorm:"primaryKey"` ConversationPublicKey string `protobuf:"bytes,2,opt,name=conversation_public_key,json=conversationPublicKey,proto3" json:"conversation_public_key,omitempty"` @@ -2819,7 +3142,7 @@ func (m *Contact) Reset() { *m = Contact{} } func (m *Contact) String() string { return proto.CompactTextString(m) } func (*Contact) ProtoMessage() {} func (*Contact) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{21} + return fileDescriptor_0eab5f5532ffdd8b, []int{22} } func (m *Contact) XXX_Unmarshal(b []byte) error { @@ -2942,7 +3265,7 @@ func (m *Conversation) Reset() { *m = Conversation{} } func (m *Conversation) String() string { return proto.CompactTextString(m) } func (*Conversation) ProtoMessage() {} func (*Conversation) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{22} + return fileDescriptor_0eab5f5532ffdd8b, []int{23} } func (m *Conversation) XXX_Unmarshal(b []byte) error { @@ -3098,7 +3421,7 @@ func (m *ConversationReplicationInfo) Reset() { *m = ConversationReplica func (m *ConversationReplicationInfo) String() string { return proto.CompactTextString(m) } func (*ConversationReplicationInfo) ProtoMessage() {} func (*ConversationReplicationInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{23} + return fileDescriptor_0eab5f5532ffdd8b, []int{24} } func (m *ConversationReplicationInfo) XXX_Unmarshal(b []byte) error { @@ -3172,7 +3495,7 @@ func (m *Member) Reset() { *m = Member{} } func (m *Member) String() string { return proto.CompactTextString(m) } func (*Member) ProtoMessage() {} func (*Member) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{24} + return fileDescriptor_0eab5f5532ffdd8b, []int{25} } func (m *Member) XXX_Unmarshal(b []byte) error { @@ -3255,7 +3578,7 @@ func (m *Device) Reset() { *m = Device{} } func (m *Device) String() string { return proto.CompactTextString(m) } func (*Device) ProtoMessage() {} func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{25} + return fileDescriptor_0eab5f5532ffdd8b, []int{26} } func (m *Device) XXX_Unmarshal(b []byte) error { @@ -3302,7 +3625,7 @@ func (m *ContactMetadata) Reset() { *m = ContactMetadata{} } func (m *ContactMetadata) String() string { return proto.CompactTextString(m) } func (*ContactMetadata) ProtoMessage() {} func (*ContactMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{26} + return fileDescriptor_0eab5f5532ffdd8b, []int{27} } func (m *ContactMetadata) XXX_Unmarshal(b []byte) error { @@ -3345,7 +3668,7 @@ func (m *StreamEvent) Reset() { *m = StreamEvent{} } func (m *StreamEvent) String() string { return proto.CompactTextString(m) } func (*StreamEvent) ProtoMessage() {} func (*StreamEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27} + return fileDescriptor_0eab5f5532ffdd8b, []int{28} } func (m *StreamEvent) XXX_Unmarshal(b []byte) error { @@ -3399,7 +3722,7 @@ func (m *StreamEvent_ConversationUpdated) Reset() { *m = StreamEvent_Con func (m *StreamEvent_ConversationUpdated) String() string { return proto.CompactTextString(m) } func (*StreamEvent_ConversationUpdated) ProtoMessage() {} func (*StreamEvent_ConversationUpdated) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 0} } func (m *StreamEvent_ConversationUpdated) XXX_Unmarshal(b []byte) error { @@ -3439,7 +3762,7 @@ func (m *StreamEvent_ConversationDeleted) Reset() { *m = StreamEvent_Con func (m *StreamEvent_ConversationDeleted) String() string { return proto.CompactTextString(m) } func (*StreamEvent_ConversationDeleted) ProtoMessage() {} func (*StreamEvent_ConversationDeleted) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 1} } func (m *StreamEvent_ConversationDeleted) XXX_Unmarshal(b []byte) error { @@ -3479,7 +3802,7 @@ func (m *StreamEvent_InteractionUpdated) Reset() { *m = StreamEvent_Inte func (m *StreamEvent_InteractionUpdated) String() string { return proto.CompactTextString(m) } func (*StreamEvent_InteractionUpdated) ProtoMessage() {} func (*StreamEvent_InteractionUpdated) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 2} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 2} } func (m *StreamEvent_InteractionUpdated) XXX_Unmarshal(b []byte) error { @@ -3519,7 +3842,7 @@ func (m *StreamEvent_InteractionDeleted) Reset() { *m = StreamEvent_Inte func (m *StreamEvent_InteractionDeleted) String() string { return proto.CompactTextString(m) } func (*StreamEvent_InteractionDeleted) ProtoMessage() {} func (*StreamEvent_InteractionDeleted) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 3} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 3} } func (m *StreamEvent_InteractionDeleted) XXX_Unmarshal(b []byte) error { @@ -3559,7 +3882,7 @@ func (m *StreamEvent_ContactUpdated) Reset() { *m = StreamEvent_ContactU func (m *StreamEvent_ContactUpdated) String() string { return proto.CompactTextString(m) } func (*StreamEvent_ContactUpdated) ProtoMessage() {} func (*StreamEvent_ContactUpdated) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 4} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 4} } func (m *StreamEvent_ContactUpdated) XXX_Unmarshal(b []byte) error { @@ -3599,7 +3922,7 @@ func (m *StreamEvent_AccountUpdated) Reset() { *m = StreamEvent_AccountU func (m *StreamEvent_AccountUpdated) String() string { return proto.CompactTextString(m) } func (*StreamEvent_AccountUpdated) ProtoMessage() {} func (*StreamEvent_AccountUpdated) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 5} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 5} } func (m *StreamEvent_AccountUpdated) XXX_Unmarshal(b []byte) error { @@ -3639,7 +3962,7 @@ func (m *StreamEvent_MemberUpdated) Reset() { *m = StreamEvent_MemberUpd func (m *StreamEvent_MemberUpdated) String() string { return proto.CompactTextString(m) } func (*StreamEvent_MemberUpdated) ProtoMessage() {} func (*StreamEvent_MemberUpdated) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 6} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 6} } func (m *StreamEvent_MemberUpdated) XXX_Unmarshal(b []byte) error { @@ -3679,7 +4002,7 @@ func (m *StreamEvent_DeviceUpdated) Reset() { *m = StreamEvent_DeviceUpd func (m *StreamEvent_DeviceUpdated) String() string { return proto.CompactTextString(m) } func (*StreamEvent_DeviceUpdated) ProtoMessage() {} func (*StreamEvent_DeviceUpdated) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 7} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 7} } func (m *StreamEvent_DeviceUpdated) XXX_Unmarshal(b []byte) error { @@ -3718,7 +4041,7 @@ func (m *StreamEvent_ListEnded) Reset() { *m = StreamEvent_ListEnded{} } func (m *StreamEvent_ListEnded) String() string { return proto.CompactTextString(m) } func (*StreamEvent_ListEnded) ProtoMessage() {} func (*StreamEvent_ListEnded) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 8} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 8} } func (m *StreamEvent_ListEnded) XXX_Unmarshal(b []byte) error { @@ -3743,6 +4066,46 @@ func (m *StreamEvent_ListEnded) XXX_DiscardUnknown() { var xxx_messageInfo_StreamEvent_ListEnded proto.InternalMessageInfo +type StreamEvent_MediaUpdated struct { + Media *Media `protobuf:"bytes,1,opt,name=media,proto3" json:"media,omitempty"` +} + +func (m *StreamEvent_MediaUpdated) Reset() { *m = StreamEvent_MediaUpdated{} } +func (m *StreamEvent_MediaUpdated) String() string { return proto.CompactTextString(m) } +func (*StreamEvent_MediaUpdated) ProtoMessage() {} +func (*StreamEvent_MediaUpdated) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 9} +} + +func (m *StreamEvent_MediaUpdated) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StreamEvent_MediaUpdated.Unmarshal(m, b) +} + +func (m *StreamEvent_MediaUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StreamEvent_MediaUpdated.Marshal(b, m, deterministic) +} + +func (m *StreamEvent_MediaUpdated) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamEvent_MediaUpdated.Merge(m, src) +} + +func (m *StreamEvent_MediaUpdated) XXX_Size() int { + return xxx_messageInfo_StreamEvent_MediaUpdated.Size(m) +} + +func (m *StreamEvent_MediaUpdated) XXX_DiscardUnknown() { + xxx_messageInfo_StreamEvent_MediaUpdated.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamEvent_MediaUpdated proto.InternalMessageInfo + +func (m *StreamEvent_MediaUpdated) GetMedia() *Media { + if m != nil { + return m.Media + } + return nil +} + type StreamEvent_Notified struct { Type StreamEvent_Notified_Type `protobuf:"varint,1,opt,name=type,proto3,enum=berty.messenger.v1.StreamEvent_Notified_Type" json:"type,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` @@ -3754,7 +4117,7 @@ func (m *StreamEvent_Notified) Reset() { *m = StreamEvent_Notified{} } func (m *StreamEvent_Notified) String() string { return proto.CompactTextString(m) } func (*StreamEvent_Notified) ProtoMessage() {} func (*StreamEvent_Notified) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 9} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 10} } func (m *StreamEvent_Notified) XXX_Unmarshal(b []byte) error { @@ -3814,7 +4177,7 @@ func (m *StreamEvent_Notified_Basic) Reset() { *m = StreamEvent_Notified func (m *StreamEvent_Notified_Basic) String() string { return proto.CompactTextString(m) } func (*StreamEvent_Notified_Basic) ProtoMessage() {} func (*StreamEvent_Notified_Basic) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 9, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 10, 0} } func (m *StreamEvent_Notified_Basic) XXX_Unmarshal(b []byte) error { @@ -3849,7 +4212,7 @@ func (m *StreamEvent_Notified_MessageReceived) Reset() { *m = StreamEven func (m *StreamEvent_Notified_MessageReceived) String() string { return proto.CompactTextString(m) } func (*StreamEvent_Notified_MessageReceived) ProtoMessage() {} func (*StreamEvent_Notified_MessageReceived) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 9, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 10, 1} } func (m *StreamEvent_Notified_MessageReceived) XXX_Unmarshal(b []byte) error { @@ -3905,7 +4268,7 @@ func (m *StreamEvent_Notified_ContactRequestSent) Reset() { func (m *StreamEvent_Notified_ContactRequestSent) String() string { return proto.CompactTextString(m) } func (*StreamEvent_Notified_ContactRequestSent) ProtoMessage() {} func (*StreamEvent_Notified_ContactRequestSent) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 9, 2} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 10, 2} } func (m *StreamEvent_Notified_ContactRequestSent) XXX_Unmarshal(b []byte) error { @@ -3950,7 +4313,7 @@ func (m *StreamEvent_Notified_ContactRequestReceived) String() string { } func (*StreamEvent_Notified_ContactRequestReceived) ProtoMessage() {} func (*StreamEvent_Notified_ContactRequestReceived) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{27, 9, 3} + return fileDescriptor_0eab5f5532ffdd8b, []int{28, 10, 3} } func (m *StreamEvent_Notified_ContactRequestReceived) XXX_Unmarshal(b []byte) error { @@ -3989,7 +4352,7 @@ func (m *ConversationStream) Reset() { *m = ConversationStream{} } func (m *ConversationStream) String() string { return proto.CompactTextString(m) } func (*ConversationStream) ProtoMessage() {} func (*ConversationStream) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{28} + return fileDescriptor_0eab5f5532ffdd8b, []int{29} } func (m *ConversationStream) XXX_Unmarshal(b []byte) error { @@ -4023,7 +4386,7 @@ func (m *ConversationStream_Request) Reset() { *m = ConversationStream_R func (m *ConversationStream_Request) String() string { return proto.CompactTextString(m) } func (*ConversationStream_Request) ProtoMessage() {} func (*ConversationStream_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{28, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{29, 0} } func (m *ConversationStream_Request) XXX_Unmarshal(b []byte) error { @@ -4070,7 +4433,7 @@ func (m *ConversationStream_Reply) Reset() { *m = ConversationStream_Rep func (m *ConversationStream_Reply) String() string { return proto.CompactTextString(m) } func (*ConversationStream_Reply) ProtoMessage() {} func (*ConversationStream_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{28, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{29, 1} } func (m *ConversationStream_Reply) XXX_Unmarshal(b []byte) error { @@ -4109,7 +4472,7 @@ func (m *ConversationCreate) Reset() { *m = ConversationCreate{} } func (m *ConversationCreate) String() string { return proto.CompactTextString(m) } func (*ConversationCreate) ProtoMessage() {} func (*ConversationCreate) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{29} + return fileDescriptor_0eab5f5532ffdd8b, []int{30} } func (m *ConversationCreate) XXX_Unmarshal(b []byte) error { @@ -4143,7 +4506,7 @@ func (m *ConversationCreate_Request) Reset() { *m = ConversationCreate_R func (m *ConversationCreate_Request) String() string { return proto.CompactTextString(m) } func (*ConversationCreate_Request) ProtoMessage() {} func (*ConversationCreate_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{29, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{30, 0} } func (m *ConversationCreate_Request) XXX_Unmarshal(b []byte) error { @@ -4190,7 +4553,7 @@ func (m *ConversationCreate_Reply) Reset() { *m = ConversationCreate_Rep func (m *ConversationCreate_Reply) String() string { return proto.CompactTextString(m) } func (*ConversationCreate_Reply) ProtoMessage() {} func (*ConversationCreate_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{29, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{30, 1} } func (m *ConversationCreate_Reply) XXX_Unmarshal(b []byte) error { @@ -4229,7 +4592,7 @@ func (m *AccountGet) Reset() { *m = AccountGet{} } func (m *AccountGet) String() string { return proto.CompactTextString(m) } func (*AccountGet) ProtoMessage() {} func (*AccountGet) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{30} + return fileDescriptor_0eab5f5532ffdd8b, []int{31} } func (m *AccountGet) XXX_Unmarshal(b []byte) error { @@ -4261,7 +4624,7 @@ func (m *AccountGet_Request) Reset() { *m = AccountGet_Request{} } func (m *AccountGet_Request) String() string { return proto.CompactTextString(m) } func (*AccountGet_Request) ProtoMessage() {} func (*AccountGet_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{30, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{31, 0} } func (m *AccountGet_Request) XXX_Unmarshal(b []byte) error { @@ -4294,7 +4657,7 @@ func (m *AccountGet_Reply) Reset() { *m = AccountGet_Reply{} } func (m *AccountGet_Reply) String() string { return proto.CompactTextString(m) } func (*AccountGet_Reply) ProtoMessage() {} func (*AccountGet_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{30, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{31, 1} } func (m *AccountGet_Reply) XXX_Unmarshal(b []byte) error { @@ -4333,7 +4696,7 @@ func (m *EventStream) Reset() { *m = EventStream{} } func (m *EventStream) String() string { return proto.CompactTextString(m) } func (*EventStream) ProtoMessage() {} func (*EventStream) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{31} + return fileDescriptor_0eab5f5532ffdd8b, []int{32} } func (m *EventStream) XXX_Unmarshal(b []byte) error { @@ -4367,7 +4730,7 @@ func (m *EventStream_Request) Reset() { *m = EventStream_Request{} } func (m *EventStream_Request) String() string { return proto.CompactTextString(m) } func (*EventStream_Request) ProtoMessage() {} func (*EventStream_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{31, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{32, 0} } func (m *EventStream_Request) XXX_Unmarshal(b []byte) error { @@ -4414,7 +4777,7 @@ func (m *EventStream_Reply) Reset() { *m = EventStream_Reply{} } func (m *EventStream_Reply) String() string { return proto.CompactTextString(m) } func (*EventStream_Reply) ProtoMessage() {} func (*EventStream_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{31, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{32, 1} } func (m *EventStream_Reply) XXX_Unmarshal(b []byte) error { @@ -4453,7 +4816,7 @@ func (m *AccountUpdate) Reset() { *m = AccountUpdate{} } func (m *AccountUpdate) String() string { return proto.CompactTextString(m) } func (*AccountUpdate) ProtoMessage() {} func (*AccountUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{32} + return fileDescriptor_0eab5f5532ffdd8b, []int{33} } func (m *AccountUpdate) XXX_Unmarshal(b []byte) error { @@ -4487,7 +4850,7 @@ func (m *AccountUpdate_Request) Reset() { *m = AccountUpdate_Request{} } func (m *AccountUpdate_Request) String() string { return proto.CompactTextString(m) } func (*AccountUpdate_Request) ProtoMessage() {} func (*AccountUpdate_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{32, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{33, 0} } func (m *AccountUpdate_Request) XXX_Unmarshal(b []byte) error { @@ -4533,7 +4896,7 @@ func (m *AccountUpdate_Reply) Reset() { *m = AccountUpdate_Reply{} } func (m *AccountUpdate_Reply) String() string { return proto.CompactTextString(m) } func (*AccountUpdate_Reply) ProtoMessage() {} func (*AccountUpdate_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{32, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{33, 1} } func (m *AccountUpdate_Reply) XXX_Unmarshal(b []byte) error { @@ -4565,7 +4928,7 @@ func (m *ContactRequest) Reset() { *m = ContactRequest{} } func (m *ContactRequest) String() string { return proto.CompactTextString(m) } func (*ContactRequest) ProtoMessage() {} func (*ContactRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{33} + return fileDescriptor_0eab5f5532ffdd8b, []int{34} } func (m *ContactRequest) XXX_Unmarshal(b []byte) error { @@ -4592,13 +4955,15 @@ var xxx_messageInfo_ContactRequest proto.InternalMessageInfo type ContactRequest_Request struct { Link string `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"` + // optional passphase to decrypt the link + Passphrase []byte `protobuf:"bytes,2,opt,name=passphrase,proto3" json:"passphrase,omitempty"` } func (m *ContactRequest_Request) Reset() { *m = ContactRequest_Request{} } func (m *ContactRequest_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequest_Request) ProtoMessage() {} func (*ContactRequest_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{33, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{34, 0} } func (m *ContactRequest_Request) XXX_Unmarshal(b []byte) error { @@ -4630,6 +4995,13 @@ func (m *ContactRequest_Request) GetLink() string { return "" } +func (m *ContactRequest_Request) GetPassphrase() []byte { + if m != nil { + return m.Passphrase + } + return nil +} + type ContactRequest_Reply struct { } @@ -4637,7 +5009,7 @@ func (m *ContactRequest_Reply) Reset() { *m = ContactRequest_Reply{} } func (m *ContactRequest_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequest_Reply) ProtoMessage() {} func (*ContactRequest_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{33, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{34, 1} } func (m *ContactRequest_Reply) XXX_Unmarshal(b []byte) error { @@ -4669,7 +5041,7 @@ func (m *ContactAccept) Reset() { *m = ContactAccept{} } func (m *ContactAccept) String() string { return proto.CompactTextString(m) } func (*ContactAccept) ProtoMessage() {} func (*ContactAccept) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{34} + return fileDescriptor_0eab5f5532ffdd8b, []int{35} } func (m *ContactAccept) XXX_Unmarshal(b []byte) error { @@ -4702,7 +5074,7 @@ func (m *ContactAccept_Request) Reset() { *m = ContactAccept_Request{} } func (m *ContactAccept_Request) String() string { return proto.CompactTextString(m) } func (*ContactAccept_Request) ProtoMessage() {} func (*ContactAccept_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{34, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{35, 0} } func (m *ContactAccept_Request) XXX_Unmarshal(b []byte) error { @@ -4741,7 +5113,7 @@ func (m *ContactAccept_Reply) Reset() { *m = ContactAccept_Reply{} } func (m *ContactAccept_Reply) String() string { return proto.CompactTextString(m) } func (*ContactAccept_Reply) ProtoMessage() {} func (*ContactAccept_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{34, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{35, 1} } func (m *ContactAccept_Reply) XXX_Unmarshal(b []byte) error { @@ -4773,7 +5145,7 @@ func (m *Interact) Reset() { *m = Interact{} } func (m *Interact) String() string { return proto.CompactTextString(m) } func (*Interact) ProtoMessage() {} func (*Interact) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{35} + return fileDescriptor_0eab5f5532ffdd8b, []int{36} } func (m *Interact) XXX_Unmarshal(b []byte) error { @@ -4802,13 +5174,14 @@ type Interact_Request struct { Type AppMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=berty.messenger.v1.AppMessage_Type" json:"type,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` ConversationPublicKey string `protobuf:"bytes,3,opt,name=conversation_public_key,json=conversationPublicKey,proto3" json:"conversation_public_key,omitempty"` + MediaCids []string `protobuf:"bytes,4,rep,name=media_cids,json=mediaCids,proto3" json:"media_cids,omitempty"` } func (m *Interact_Request) Reset() { *m = Interact_Request{} } func (m *Interact_Request) String() string { return proto.CompactTextString(m) } func (*Interact_Request) ProtoMessage() {} func (*Interact_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{35, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{36, 0} } func (m *Interact_Request) XXX_Unmarshal(b []byte) error { @@ -4854,6 +5227,13 @@ func (m *Interact_Request) GetConversationPublicKey() string { return "" } +func (m *Interact_Request) GetMediaCids() []string { + if m != nil { + return m.MediaCids + } + return nil +} + type Interact_Reply struct { } @@ -4861,7 +5241,7 @@ func (m *Interact_Reply) Reset() { *m = Interact_Reply{} } func (m *Interact_Reply) String() string { return proto.CompactTextString(m) } func (*Interact_Reply) ProtoMessage() {} func (*Interact_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{35, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{36, 1} } func (m *Interact_Reply) XXX_Unmarshal(b []byte) error { @@ -4893,7 +5273,7 @@ func (m *ReplicationServiceRegisterGroup) Reset() { *m = ReplicationServ func (m *ReplicationServiceRegisterGroup) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceRegisterGroup) ProtoMessage() {} func (*ReplicationServiceRegisterGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{36} + return fileDescriptor_0eab5f5532ffdd8b, []int{37} } func (m *ReplicationServiceRegisterGroup) XXX_Unmarshal(b []byte) error { @@ -4929,7 +5309,7 @@ func (m *ReplicationServiceRegisterGroup_Request) Reset() { func (m *ReplicationServiceRegisterGroup_Request) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceRegisterGroup_Request) ProtoMessage() {} func (*ReplicationServiceRegisterGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{36, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{37, 0} } func (m *ReplicationServiceRegisterGroup_Request) XXX_Unmarshal(b []byte) error { @@ -4975,7 +5355,7 @@ func (m *ReplicationServiceRegisterGroup_Reply) Reset() { *m = Replicati func (m *ReplicationServiceRegisterGroup_Reply) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceRegisterGroup_Reply) ProtoMessage() {} func (*ReplicationServiceRegisterGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{36, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{37, 1} } func (m *ReplicationServiceRegisterGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -5007,7 +5387,7 @@ func (m *ReplicationSetAutoEnable) Reset() { *m = ReplicationSetAutoEnab func (m *ReplicationSetAutoEnable) String() string { return proto.CompactTextString(m) } func (*ReplicationSetAutoEnable) ProtoMessage() {} func (*ReplicationSetAutoEnable) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{37} + return fileDescriptor_0eab5f5532ffdd8b, []int{38} } func (m *ReplicationSetAutoEnable) XXX_Unmarshal(b []byte) error { @@ -5040,7 +5420,7 @@ func (m *ReplicationSetAutoEnable_Request) Reset() { *m = ReplicationSet func (m *ReplicationSetAutoEnable_Request) String() string { return proto.CompactTextString(m) } func (*ReplicationSetAutoEnable_Request) ProtoMessage() {} func (*ReplicationSetAutoEnable_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{37, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{38, 0} } func (m *ReplicationSetAutoEnable_Request) XXX_Unmarshal(b []byte) error { @@ -5079,7 +5459,7 @@ func (m *ReplicationSetAutoEnable_Reply) Reset() { *m = ReplicationSetAu func (m *ReplicationSetAutoEnable_Reply) String() string { return proto.CompactTextString(m) } func (*ReplicationSetAutoEnable_Reply) ProtoMessage() {} func (*ReplicationSetAutoEnable_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{37, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{38, 1} } func (m *ReplicationSetAutoEnable_Reply) XXX_Unmarshal(b []byte) error { @@ -5111,7 +5491,7 @@ func (m *BannerQuote) Reset() { *m = BannerQuote{} } func (m *BannerQuote) String() string { return proto.CompactTextString(m) } func (*BannerQuote) ProtoMessage() {} func (*BannerQuote) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{38} + return fileDescriptor_0eab5f5532ffdd8b, []int{39} } func (m *BannerQuote) XXX_Unmarshal(b []byte) error { @@ -5144,7 +5524,7 @@ func (m *BannerQuote_Request) Reset() { *m = BannerQuote_Request{} } func (m *BannerQuote_Request) String() string { return proto.CompactTextString(m) } func (*BannerQuote_Request) ProtoMessage() {} func (*BannerQuote_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{38, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{39, 0} } func (m *BannerQuote_Request) XXX_Unmarshal(b []byte) error { @@ -5185,7 +5565,7 @@ func (m *BannerQuote_Reply) Reset() { *m = BannerQuote_Reply{} } func (m *BannerQuote_Reply) String() string { return proto.CompactTextString(m) } func (*BannerQuote_Reply) ProtoMessage() {} func (*BannerQuote_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{38, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{39, 1} } func (m *BannerQuote_Reply) XXX_Unmarshal(b []byte) error { @@ -5231,7 +5611,7 @@ func (m *GetUsername) Reset() { *m = GetUsername{} } func (m *GetUsername) String() string { return proto.CompactTextString(m) } func (*GetUsername) ProtoMessage() {} func (*GetUsername) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{39} + return fileDescriptor_0eab5f5532ffdd8b, []int{40} } func (m *GetUsername) XXX_Unmarshal(b []byte) error { @@ -5263,7 +5643,7 @@ func (m *GetUsername_Request) Reset() { *m = GetUsername_Request{} } func (m *GetUsername_Request) String() string { return proto.CompactTextString(m) } func (*GetUsername_Request) ProtoMessage() {} func (*GetUsername_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{39, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{40, 0} } func (m *GetUsername_Request) XXX_Unmarshal(b []byte) error { @@ -5296,7 +5676,7 @@ func (m *GetUsername_Reply) Reset() { *m = GetUsername_Reply{} } func (m *GetUsername_Reply) String() string { return proto.CompactTextString(m) } func (*GetUsername_Reply) ProtoMessage() {} func (*GetUsername_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{39, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{40, 1} } func (m *GetUsername_Reply) XXX_Unmarshal(b []byte) error { @@ -5335,7 +5715,7 @@ func (m *InstanceExportData) Reset() { *m = InstanceExportData{} } func (m *InstanceExportData) String() string { return proto.CompactTextString(m) } func (*InstanceExportData) ProtoMessage() {} func (*InstanceExportData) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{40} + return fileDescriptor_0eab5f5532ffdd8b, []int{41} } func (m *InstanceExportData) XXX_Unmarshal(b []byte) error { @@ -5367,7 +5747,7 @@ func (m *InstanceExportData_Request) Reset() { *m = InstanceExportData_R func (m *InstanceExportData_Request) String() string { return proto.CompactTextString(m) } func (*InstanceExportData_Request) ProtoMessage() {} func (*InstanceExportData_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{40, 0} + return fileDescriptor_0eab5f5532ffdd8b, []int{41, 0} } func (m *InstanceExportData_Request) XXX_Unmarshal(b []byte) error { @@ -5400,7 +5780,7 @@ func (m *InstanceExportData_Reply) Reset() { *m = InstanceExportData_Rep func (m *InstanceExportData_Reply) String() string { return proto.CompactTextString(m) } func (*InstanceExportData_Reply) ProtoMessage() {} func (*InstanceExportData_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{40, 1} + return fileDescriptor_0eab5f5532ffdd8b, []int{41, 1} } func (m *InstanceExportData_Reply) XXX_Unmarshal(b []byte) error { @@ -5444,7 +5824,7 @@ func (m *LocalDatabaseState) Reset() { *m = LocalDatabaseState{} } func (m *LocalDatabaseState) String() string { return proto.CompactTextString(m) } func (*LocalDatabaseState) ProtoMessage() {} func (*LocalDatabaseState) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{41} + return fileDescriptor_0eab5f5532ffdd8b, []int{42} } func (m *LocalDatabaseState) XXX_Unmarshal(b []byte) error { @@ -5515,7 +5895,7 @@ func (m *LocalConversationState) Reset() { *m = LocalConversationState{} func (m *LocalConversationState) String() string { return proto.CompactTextString(m) } func (*LocalConversationState) ProtoMessage() {} func (*LocalConversationState) Descriptor() ([]byte, []int) { - return fileDescriptor_fd3bf21e238da6aa, []int{42} + return fileDescriptor_0eab5f5532ffdd8b, []int{43} } func (m *LocalConversationState) XXX_Unmarshal(b []byte) error { @@ -5568,9 +5948,258 @@ func (m *LocalConversationState) GetType() Conversation_Type { return Conversation_Undefined } +type MediaPrepare struct { +} + +func (m *MediaPrepare) Reset() { *m = MediaPrepare{} } +func (m *MediaPrepare) String() string { return proto.CompactTextString(m) } +func (*MediaPrepare) ProtoMessage() {} +func (*MediaPrepare) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{44} +} + +func (m *MediaPrepare) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MediaPrepare.Unmarshal(m, b) +} + +func (m *MediaPrepare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MediaPrepare.Marshal(b, m, deterministic) +} + +func (m *MediaPrepare) XXX_Merge(src proto.Message) { + xxx_messageInfo_MediaPrepare.Merge(m, src) +} + +func (m *MediaPrepare) XXX_Size() int { + return xxx_messageInfo_MediaPrepare.Size(m) +} + +func (m *MediaPrepare) XXX_DiscardUnknown() { + xxx_messageInfo_MediaPrepare.DiscardUnknown(m) +} + +var xxx_messageInfo_MediaPrepare proto.InternalMessageInfo + +type MediaPrepare_Request struct { + Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` + Info *Media `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` +} + +func (m *MediaPrepare_Request) Reset() { *m = MediaPrepare_Request{} } +func (m *MediaPrepare_Request) String() string { return proto.CompactTextString(m) } +func (*MediaPrepare_Request) ProtoMessage() {} +func (*MediaPrepare_Request) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{44, 0} +} + +func (m *MediaPrepare_Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MediaPrepare_Request.Unmarshal(m, b) +} + +func (m *MediaPrepare_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MediaPrepare_Request.Marshal(b, m, deterministic) +} + +func (m *MediaPrepare_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_MediaPrepare_Request.Merge(m, src) +} + +func (m *MediaPrepare_Request) XXX_Size() int { + return xxx_messageInfo_MediaPrepare_Request.Size(m) +} + +func (m *MediaPrepare_Request) XXX_DiscardUnknown() { + xxx_messageInfo_MediaPrepare_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_MediaPrepare_Request proto.InternalMessageInfo + +func (m *MediaPrepare_Request) GetBlock() []byte { + if m != nil { + return m.Block + } + return nil +} + +func (m *MediaPrepare_Request) GetInfo() *Media { + if m != nil { + return m.Info + } + return nil +} + +func (m *MediaPrepare_Request) GetUri() string { + if m != nil { + return m.Uri + } + return "" +} + +type MediaPrepare_Reply struct { + Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MediaPrepare_Reply) Reset() { *m = MediaPrepare_Reply{} } +func (m *MediaPrepare_Reply) String() string { return proto.CompactTextString(m) } +func (*MediaPrepare_Reply) ProtoMessage() {} +func (*MediaPrepare_Reply) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{44, 1} +} + +func (m *MediaPrepare_Reply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MediaPrepare_Reply.Unmarshal(m, b) +} + +func (m *MediaPrepare_Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MediaPrepare_Reply.Marshal(b, m, deterministic) +} + +func (m *MediaPrepare_Reply) XXX_Merge(src proto.Message) { + xxx_messageInfo_MediaPrepare_Reply.Merge(m, src) +} + +func (m *MediaPrepare_Reply) XXX_Size() int { + return xxx_messageInfo_MediaPrepare_Reply.Size(m) +} + +func (m *MediaPrepare_Reply) XXX_DiscardUnknown() { + xxx_messageInfo_MediaPrepare_Reply.DiscardUnknown(m) +} + +var xxx_messageInfo_MediaPrepare_Reply proto.InternalMessageInfo + +func (m *MediaPrepare_Reply) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +type MediaRetrieve struct { +} + +func (m *MediaRetrieve) Reset() { *m = MediaRetrieve{} } +func (m *MediaRetrieve) String() string { return proto.CompactTextString(m) } +func (*MediaRetrieve) ProtoMessage() {} +func (*MediaRetrieve) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{45} +} + +func (m *MediaRetrieve) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MediaRetrieve.Unmarshal(m, b) +} + +func (m *MediaRetrieve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MediaRetrieve.Marshal(b, m, deterministic) +} + +func (m *MediaRetrieve) XXX_Merge(src proto.Message) { + xxx_messageInfo_MediaRetrieve.Merge(m, src) +} + +func (m *MediaRetrieve) XXX_Size() int { + return xxx_messageInfo_MediaRetrieve.Size(m) +} + +func (m *MediaRetrieve) XXX_DiscardUnknown() { + xxx_messageInfo_MediaRetrieve.DiscardUnknown(m) +} + +var xxx_messageInfo_MediaRetrieve proto.InternalMessageInfo + +type MediaRetrieve_Request struct { + Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` +} + +func (m *MediaRetrieve_Request) Reset() { *m = MediaRetrieve_Request{} } +func (m *MediaRetrieve_Request) String() string { return proto.CompactTextString(m) } +func (*MediaRetrieve_Request) ProtoMessage() {} +func (*MediaRetrieve_Request) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{45, 0} +} + +func (m *MediaRetrieve_Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MediaRetrieve_Request.Unmarshal(m, b) +} + +func (m *MediaRetrieve_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MediaRetrieve_Request.Marshal(b, m, deterministic) +} + +func (m *MediaRetrieve_Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_MediaRetrieve_Request.Merge(m, src) +} + +func (m *MediaRetrieve_Request) XXX_Size() int { + return xxx_messageInfo_MediaRetrieve_Request.Size(m) +} + +func (m *MediaRetrieve_Request) XXX_DiscardUnknown() { + xxx_messageInfo_MediaRetrieve_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_MediaRetrieve_Request proto.InternalMessageInfo + +func (m *MediaRetrieve_Request) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +type MediaRetrieve_Reply struct { + Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` + Info *Media `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` +} + +func (m *MediaRetrieve_Reply) Reset() { *m = MediaRetrieve_Reply{} } +func (m *MediaRetrieve_Reply) String() string { return proto.CompactTextString(m) } +func (*MediaRetrieve_Reply) ProtoMessage() {} +func (*MediaRetrieve_Reply) Descriptor() ([]byte, []int) { + return fileDescriptor_0eab5f5532ffdd8b, []int{45, 1} +} + +func (m *MediaRetrieve_Reply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MediaRetrieve_Reply.Unmarshal(m, b) +} + +func (m *MediaRetrieve_Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MediaRetrieve_Reply.Marshal(b, m, deterministic) +} + +func (m *MediaRetrieve_Reply) XXX_Merge(src proto.Message) { + xxx_messageInfo_MediaRetrieve_Reply.Merge(m, src) +} + +func (m *MediaRetrieve_Reply) XXX_Size() int { + return xxx_messageInfo_MediaRetrieve_Reply.Size(m) +} + +func (m *MediaRetrieve_Reply) XXX_DiscardUnknown() { + xxx_messageInfo_MediaRetrieve_Reply.DiscardUnknown(m) +} + +var xxx_messageInfo_MediaRetrieve_Reply proto.InternalMessageInfo + +func (m *MediaRetrieve_Reply) GetBlock() []byte { + if m != nil { + return m.Block + } + return nil +} + +func (m *MediaRetrieve_Reply) GetInfo() *Media { + if m != nil { + return m.Info + } + return nil +} + func init() { proto.RegisterEnum("berty.messenger.v1.BertyLink_Kind", BertyLink_Kind_name, BertyLink_Kind_value) proto.RegisterEnum("berty.messenger.v1.AppMessage_Type", AppMessage_Type_name, AppMessage_Type_value) + proto.RegisterEnum("berty.messenger.v1.Media_State", Media_State_name, Media_State_value) proto.RegisterEnum("berty.messenger.v1.Contact_State", Contact_State_name, Contact_State_value) proto.RegisterEnum("berty.messenger.v1.Conversation_Type", Conversation_Type_name, Conversation_Type_value) proto.RegisterEnum("berty.messenger.v1.StreamEvent_Type", StreamEvent_Type_name, StreamEvent_Type_value) @@ -5597,6 +6226,7 @@ func init() { proto.RegisterType((*ParseDeepLink_Request)(nil), "berty.messenger.v1.ParseDeepLink.Request") proto.RegisterType((*ParseDeepLink_Reply)(nil), "berty.messenger.v1.ParseDeepLink.Reply") proto.RegisterType((*BertyLink)(nil), "berty.messenger.v1.BertyLink") + proto.RegisterType((*BertyLink_Encrypted)(nil), "berty.messenger.v1.BertyLink.Encrypted") proto.RegisterType((*SendContactRequest)(nil), "berty.messenger.v1.SendContactRequest") proto.RegisterType((*SendContactRequest_Request)(nil), "berty.messenger.v1.SendContactRequest.Request") proto.RegisterType((*SendContactRequest_Reply)(nil), "berty.messenger.v1.SendContactRequest.Reply") @@ -5632,6 +6262,7 @@ func init() { proto.RegisterType((*Account)(nil), "berty.messenger.v1.Account") proto.RegisterType((*ServiceToken)(nil), "berty.messenger.v1.ServiceToken") proto.RegisterType((*Interaction)(nil), "berty.messenger.v1.Interaction") + proto.RegisterType((*Media)(nil), "berty.messenger.v1.Media") proto.RegisterType((*Contact)(nil), "berty.messenger.v1.Contact") proto.RegisterType((*Conversation)(nil), "berty.messenger.v1.Conversation") proto.RegisterType((*ConversationReplicationInfo)(nil), "berty.messenger.v1.ConversationReplicationInfo") @@ -5648,6 +6279,7 @@ func init() { proto.RegisterType((*StreamEvent_MemberUpdated)(nil), "berty.messenger.v1.StreamEvent.MemberUpdated") proto.RegisterType((*StreamEvent_DeviceUpdated)(nil), "berty.messenger.v1.StreamEvent.DeviceUpdated") proto.RegisterType((*StreamEvent_ListEnded)(nil), "berty.messenger.v1.StreamEvent.ListEnded") + proto.RegisterType((*StreamEvent_MediaUpdated)(nil), "berty.messenger.v1.StreamEvent.MediaUpdated") proto.RegisterType((*StreamEvent_Notified)(nil), "berty.messenger.v1.StreamEvent.Notified") proto.RegisterType((*StreamEvent_Notified_Basic)(nil), "berty.messenger.v1.StreamEvent.Notified.Basic") proto.RegisterType((*StreamEvent_Notified_MessageReceived)(nil), "berty.messenger.v1.StreamEvent.Notified.MessageReceived") @@ -5694,252 +6326,296 @@ func init() { proto.RegisterType((*InstanceExportData_Reply)(nil), "berty.messenger.v1.InstanceExportData.Reply") proto.RegisterType((*LocalDatabaseState)(nil), "berty.messenger.v1.LocalDatabaseState") proto.RegisterType((*LocalConversationState)(nil), "berty.messenger.v1.LocalConversationState") -} - -func init() { proto.RegisterFile("bertymessenger.proto", fileDescriptor_fd3bf21e238da6aa) } - -var fileDescriptor_fd3bf21e238da6aa = []byte{ - // 3838 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5b, 0xcb, 0x6f, 0x1c, 0x59, - 0x57, 0x4f, 0xf5, 0xbb, 0x4f, 0xb7, 0xe3, 0xf2, 0x8d, 0xe3, 0x78, 0xca, 0x24, 0x1d, 0x57, 0xde, - 0x2f, 0x9b, 0x78, 0x3c, 0x99, 0x2f, 0x99, 0x00, 0x72, 0xdb, 0xf9, 0x12, 0xe3, 0x38, 0xf1, 0x94, - 0x93, 0x19, 0x69, 0x66, 0xa0, 0x55, 0xee, 0xba, 0xee, 0xd4, 0xb8, 0xbb, 0xaa, 0xa7, 0xaa, 0xda, - 0x4e, 0x23, 0x36, 0x20, 0x10, 0x08, 0x09, 0x34, 0xd2, 0x80, 0x04, 0x12, 0x1b, 0x16, 0x23, 0x21, - 0x24, 0x90, 0xf8, 0x2f, 0x58, 0x82, 0x46, 0x48, 0xac, 0x7a, 0xe1, 0xd9, 0xb1, 0x41, 0x8a, 0xd8, - 0x22, 0xd0, 0x7d, 0x55, 0xdd, 0xea, 0xae, 0x7e, 0xd8, 0x09, 0x88, 0x5d, 0xd7, 0xb9, 0xbf, 0x73, - 0xee, 0xe3, 0x3c, 0xef, 0xa3, 0x61, 0x76, 0x0f, 0x7b, 0x41, 0xb7, 0x85, 0x7d, 0x1f, 0x3b, 0x0d, - 0xec, 0x2d, 0xb5, 0x3d, 0x37, 0x70, 0x11, 0xa2, 0xd4, 0xa5, 0x88, 0x7c, 0x78, 0x5f, 0x9b, 0x6d, - 0xb8, 0x0d, 0x97, 0x36, 0x2f, 0x93, 0x5f, 0x0c, 0xa9, 0xa9, 0x14, 0x19, 0x74, 0xdb, 0xd8, 0x67, - 0x14, 0xfd, 0x05, 0xa8, 0xeb, 0xae, 0x73, 0x88, 0x3d, 0xdf, 0x0c, 0x6c, 0xd7, 0x79, 0xd9, 0xc6, - 0x8e, 0x76, 0x1f, 0xf2, 0x06, 0xfe, 0xae, 0x83, 0xfd, 0x00, 0x5d, 0x87, 0x42, 0xc3, 0x73, 0x3b, - 0xed, 0x5a, 0xfb, 0x60, 0x5e, 0xb9, 0xac, 0xdc, 0x2c, 0x56, 0x4b, 0xc7, 0xbd, 0x4a, 0xfe, 0x29, - 0xa1, 0xed, 0x6c, 0x19, 0x79, 0xda, 0xb8, 0x73, 0xa0, 0xe5, 0x21, 0x6b, 0xe0, 0x76, 0xb3, 0xab, - 0xbf, 0x84, 0x19, 0x59, 0xde, 0x7a, 0xd3, 0xf5, 0xf1, 0x7b, 0x09, 0xfc, 0x06, 0x0a, 0x4f, 0xea, - 0x6f, 0xdc, 0x57, 0xd8, 0x0f, 0xb4, 0x8f, 0x23, 0x39, 0xb3, 0x90, 0xb5, 0x70, 0xd3, 0xec, 0x52, - 0x21, 0x19, 0x83, 0x7d, 0x20, 0x04, 0x19, 0x5c, 0x7f, 0xe3, 0xce, 0xa7, 0x88, 0x64, 0x83, 0xfe, - 0xd6, 0x16, 0xb8, 0xa4, 0xb0, 0x51, 0x89, 0x1a, 0xf5, 0xff, 0x54, 0x60, 0x7e, 0xd3, 0xf1, 0x03, - 0xd3, 0xa9, 0xe3, 0xdd, 0x37, 0xa6, 0x87, 0xcd, 0xbd, 0x26, 0xae, 0x92, 0x45, 0xda, 0xdc, 0xd0, - 0xaa, 0xb1, 0xee, 0x3c, 0xec, 0xe3, 0x80, 0x32, 0x17, 0x0c, 0xf6, 0x81, 0x16, 0xa1, 0x6c, 0xd9, - 0x7e, 0xbb, 0x69, 0x76, 0x6b, 0x8e, 0xd9, 0xc2, 0xbc, 0xdb, 0x12, 0xa7, 0xbd, 0x30, 0x5b, 0x58, - 0xfb, 0x41, 0x11, 0xdd, 0xdf, 0x87, 0x4c, 0xd3, 0x76, 0xd8, 0xac, 0x4b, 0x2b, 0x17, 0x97, 0x06, - 0x95, 0xb6, 0x44, 0x3b, 0x7e, 0x6e, 0x3b, 0x07, 0x06, 0x85, 0xa2, 0x15, 0x28, 0xdb, 0x4e, 0x80, - 0x3d, 0xc7, 0x6c, 0xd6, 0x3a, 0x5e, 0x93, 0xc9, 0xaf, 0x4e, 0x1f, 0xf7, 0x2a, 0xa5, 0x4d, 0x4e, - 0x7f, 0x6d, 0x3c, 0x37, 0x4a, 0x02, 0xf4, 0xda, 0x6b, 0xa2, 0x2b, 0x90, 0x3f, 0xc2, 0x7b, 0x14, - 0x9e, 0xa6, 0x70, 0x38, 0xee, 0x55, 0x72, 0x5f, 0xe2, 0x3d, 0x82, 0xcc, 0x1d, 0xe1, 0xbd, 0xd7, - 0x5e, 0x53, 0xff, 0x2f, 0x05, 0xce, 0xc5, 0xa7, 0x4b, 0x15, 0xa0, 0xed, 0x0c, 0x57, 0x54, 0x39, - 0x59, 0x51, 0xe8, 0x22, 0x00, 0xc3, 0x49, 0x2b, 0x50, 0xa4, 0x94, 0xff, 0xc7, 0xf3, 0xdf, 0x87, - 0x0b, 0x1b, 0xf8, 0x90, 0xae, 0x80, 0xd0, 0xfe, 0x87, 0x54, 0x7a, 0x68, 0xbc, 0xdf, 0xc2, 0xd4, - 0x8e, 0xe9, 0xf9, 0x78, 0x03, 0xe3, 0x36, 0x99, 0x97, 0x76, 0x31, 0x92, 0x8e, 0xa4, 0xf5, 0x28, - 0xb2, 0x09, 0x6b, 0x8f, 0x4e, 0xbf, 0x58, 0xfa, 0x5f, 0xa7, 0xa0, 0x18, 0xd2, 0xd0, 0x03, 0xc8, - 0x1c, 0xd8, 0x8e, 0x45, 0x05, 0x9c, 0x5d, 0xd1, 0x47, 0x0a, 0x58, 0xda, 0xb2, 0x1d, 0xcb, 0xa0, - 0x78, 0xb4, 0x0e, 0x05, 0x0a, 0xad, 0xd9, 0x16, 0x9d, 0x59, 0x69, 0x65, 0x61, 0x28, 0xef, 0xe6, - 0x06, 0xb3, 0x09, 0xfe, 0x61, 0xe4, 0x29, 0x70, 0xd3, 0x42, 0x2f, 0xa1, 0xc4, 0x84, 0x50, 0x3b, - 0xa0, 0x7a, 0x28, 0xad, 0x5c, 0x1a, 0x2a, 0x87, 0xda, 0x54, 0xf5, 0xec, 0x71, 0xaf, 0x02, 0xd1, - 0xb7, 0x01, 0x7b, 0xe1, 0x6f, 0x7d, 0x0d, 0x32, 0x64, 0x8c, 0x68, 0x1a, 0x4a, 0xaf, 0x9d, 0x03, - 0xc7, 0x3d, 0x72, 0xc8, 0xa7, 0x7a, 0x06, 0x5d, 0x80, 0x73, 0xeb, 0xae, 0x13, 0x98, 0xf5, 0x60, - 0xd3, 0x39, 0xb4, 0x03, 0xfc, 0xc5, 0x7d, 0xda, 0xa0, 0x10, 0x24, 0x65, 0xe5, 0x84, 0x94, 0xfe, - 0xf7, 0x0a, 0xa0, 0x5d, 0xec, 0x58, 0x1c, 0xce, 0xb5, 0xa0, 0xfd, 0xa9, 0x12, 0x69, 0x44, 0x9e, - 0xbb, 0x72, 0xda, 0xb9, 0x6b, 0x50, 0x68, 0xe1, 0xc0, 0xb4, 0xcc, 0xc0, 0xa4, 0x0b, 0x58, 0x36, - 0xc2, 0x6f, 0x62, 0x3a, 0xee, 0x91, 0x53, 0x0b, 0xdb, 0xd3, 0xb4, 0xbd, 0xe4, 0x1e, 0x39, 0xdb, - 0x9c, 0x14, 0x99, 0x8e, 0x0f, 0x79, 0x32, 0xdc, 0xb5, 0xfa, 0x81, 0x56, 0x3b, 0xb9, 0x57, 0xde, - 0x05, 0x20, 0x63, 0x36, 0x1b, 0x58, 0x28, 0xb2, 0x5c, 0x9d, 0x3a, 0xee, 0x55, 0x8a, 0xdb, 0x8c, - 0xba, 0xb9, 0x61, 0x14, 0x39, 0x60, 0xd3, 0x8a, 0x3a, 0xad, 0x43, 0x89, 0x74, 0xca, 0x41, 0xda, - 0xd6, 0xc9, 0x3b, 0x9e, 0x87, 0x3c, 0x97, 0xcb, 0x1d, 0x43, 0x7c, 0x46, 0x9d, 0xfc, 0x85, 0x02, - 0x2a, 0xe9, 0x85, 0x7e, 0xbd, 0x6c, 0x93, 0x34, 0xe1, 0x6b, 0x6f, 0x4f, 0xde, 0xd5, 0x13, 0xc8, - 0xbb, 0x8c, 0x9b, 0x5b, 0xea, 0x9d, 0x24, 0x6d, 0xad, 0xb5, 0xdb, 0x7c, 0x3a, 0x4b, 0x72, 0x87, - 0x86, 0xe0, 0x8d, 0xc6, 0xf5, 0xbd, 0x02, 0x42, 0x9d, 0x68, 0x15, 0xe6, 0xda, 0x9d, 0xbd, 0xa6, - 0x5d, 0xaf, 0x79, 0xd8, 0xb1, 0xf0, 0xef, 0x1c, 0xba, 0x1d, 0xbf, 0xe6, 0x63, 0xcc, 0x0c, 0xa3, - 0x6c, 0xcc, 0xb2, 0x56, 0x23, 0x6c, 0xdc, 0xc5, 0xd8, 0x22, 0xab, 0x6e, 0xd6, 0xeb, 0x6e, 0xc7, - 0x09, 0xc8, 0xd8, 0xa5, 0x55, 0x5f, 0x63, 0xd4, 0x9d, 0x2d, 0xa3, 0xc8, 0x01, 0x3b, 0x07, 0x03, - 0x81, 0x24, 0x3d, 0x10, 0x48, 0xf4, 0x6f, 0x40, 0xf2, 0x08, 0x74, 0x07, 0xb2, 0xcc, 0xa1, 0x98, - 0x71, 0x9e, 0xe7, 0xd3, 0x65, 0xe9, 0xfc, 0xf0, 0xfe, 0x12, 0xf3, 0x1b, 0x86, 0x99, 0x20, 0x4c, - 0xe9, 0xff, 0x9a, 0x03, 0x88, 0x96, 0x07, 0x7d, 0x0a, 0x19, 0x22, 0x8a, 0x87, 0x8c, 0x2b, 0x63, - 0x16, 0xf3, 0x55, 0xb7, 0x8d, 0x0d, 0xca, 0x40, 0x74, 0xde, 0x36, 0xbb, 0x4d, 0xd7, 0xe4, 0x96, - 0x66, 0x88, 0x4f, 0x74, 0x0b, 0x8a, 0x3e, 0x76, 0x82, 0x9a, 0x65, 0x06, 0x6c, 0x7e, 0xe9, 0x6a, - 0xf9, 0xdf, 0x7b, 0x95, 0x02, 0x21, 0x6e, 0x98, 0x01, 0x36, 0xc2, 0x5f, 0xda, 0x22, 0x94, 0x5e, - 0xfb, 0xd8, 0x13, 0x83, 0x41, 0x90, 0xd9, 0x73, 0xad, 0xae, 0x88, 0x8e, 0xe4, 0xb7, 0xf6, 0x18, - 0xca, 0x04, 0x62, 0x60, 0xb3, 0x4e, 0x54, 0x87, 0xe6, 0x20, 0x17, 0x98, 0x5e, 0x03, 0x07, 0x7c, - 0xe9, 0xf8, 0x17, 0x89, 0xdb, 0xb8, 0xe5, 0x7e, 0x6b, 0xf3, 0x39, 0xb3, 0x0f, 0xed, 0x1a, 0x4c, - 0xd3, 0x05, 0xa2, 0x81, 0x82, 0x16, 0x27, 0x61, 0x08, 0x4e, 0x49, 0x21, 0x78, 0x07, 0xca, 0xbb, - 0x38, 0xe0, 0xc8, 0x7d, 0x77, 0x60, 0x1d, 0x95, 0x81, 0x75, 0x24, 0x29, 0xd0, 0x3c, 0x34, 0x03, - 0xd3, 0xab, 0xd5, 0xb9, 0xb3, 0x15, 0x8d, 0x22, 0xa3, 0xac, 0xdb, 0x96, 0xf6, 0xdb, 0xc4, 0xa9, - 0x02, 0x32, 0xf2, 0x49, 0x05, 0xde, 0x1d, 0x14, 0xc8, 0xed, 0x88, 0x09, 0x25, 0xde, 0x1b, 0xc9, - 0xbf, 0x06, 0xa5, 0xb5, 0x3a, 0x09, 0x8a, 0x4d, 0x6c, 0x35, 0xb0, 0xb4, 0x2a, 0x29, 0x79, 0x55, - 0xb4, 0x4d, 0x28, 0xcb, 0x0e, 0x80, 0x1e, 0x46, 0xee, 0xa3, 0x5c, 0x4e, 0xdf, 0x2c, 0xad, 0x54, - 0x92, 0x34, 0x2e, 0xb1, 0x44, 0x2e, 0x63, 0xc0, 0xf4, 0xb6, 0xeb, 0xd8, 0x81, 0xeb, 0x89, 0xb8, - 0x85, 0x7e, 0x03, 0xb2, 0xf8, 0x10, 0x3b, 0x01, 0xb7, 0xcd, 0x5b, 0xfd, 0xb6, 0xc9, 0xf1, 0x74, - 0x5d, 0x97, 0x9e, 0x10, 0x24, 0xa7, 0x18, 0x8c, 0x4f, 0xff, 0x27, 0x05, 0x32, 0xc4, 0xa6, 0xd0, - 0x14, 0x14, 0x5f, 0x3b, 0x16, 0xde, 0xb7, 0x1d, 0x4c, 0x22, 0xfc, 0x39, 0x98, 0x26, 0x64, 0xc9, - 0x36, 0x54, 0x05, 0xcd, 0x82, 0x2a, 0x88, 0xc2, 0x1a, 0xd4, 0x14, 0x49, 0x06, 0x84, 0xda, 0xa7, - 0x65, 0x35, 0x2d, 0xe0, 0xb2, 0x5e, 0xd5, 0x8c, 0x90, 0x2c, 0xe9, 0x46, 0xcd, 0x0a, 0xa2, 0xb4, - 0xa0, 0x6a, 0x4e, 0xf0, 0xcb, 0xcb, 0xa7, 0xe6, 0x45, 0x77, 0x7d, 0x2b, 0xa1, 0x16, 0xf4, 0x35, - 0x28, 0x49, 0x50, 0xe2, 0x1e, 0x5c, 0xb9, 0x5c, 0xd7, 0xe2, 0xb3, 0xdf, 0x71, 0x8a, 0xa1, 0xe3, - 0xe8, 0x3f, 0x66, 0x01, 0x76, 0xbb, 0x7e, 0x80, 0x5b, 0x64, 0x5c, 0x5a, 0x31, 0x8c, 0x8e, 0x24, - 0x61, 0xf1, 0x1a, 0xe1, 0x31, 0x14, 0x68, 0x0d, 0x5f, 0x77, 0x9b, 0x7c, 0xd5, 0x2f, 0xf7, 0xaf, - 0x7a, 0x24, 0x82, 0x29, 0xd2, 0x08, 0x39, 0xd0, 0x2f, 0xa1, 0x18, 0x2a, 0x9a, 0xc7, 0xcf, 0x9b, - 0x49, 0x06, 0x20, 0x89, 0xd8, 0x16, 0x74, 0x23, 0x62, 0xd5, 0x7e, 0x52, 0xa0, 0x18, 0x36, 0xa0, - 0xc7, 0x90, 0x6f, 0x7b, 0x6e, 0x1d, 0xfb, 0x3e, 0x1f, 0x92, 0x3e, 0x62, 0x48, 0x3b, 0x0c, 0x69, - 0x08, 0x16, 0xe2, 0xb8, 0x47, 0xa6, 0x47, 0xe3, 0x79, 0x9a, 0x38, 0x2e, 0xfd, 0x40, 0x9f, 0xc2, - 0xbc, 0x18, 0x75, 0xcd, 0x76, 0x6a, 0xbe, 0xd9, 0xc2, 0x35, 0xd1, 0x49, 0x9a, 0x56, 0x66, 0xe7, - 0x45, 0xfb, 0xa6, 0xb3, 0x6b, 0xb6, 0x30, 0x97, 0x8b, 0x1e, 0x42, 0xca, 0xda, 0x9b, 0xcf, 0xd0, - 0x71, 0x2c, 0x8e, 0x99, 0xdb, 0x46, 0xb5, 0x9a, 0x3b, 0xee, 0x55, 0x52, 0x1b, 0x55, 0x23, 0x65, - 0xed, 0x69, 0x3f, 0xa6, 0x20, 0xb5, 0x51, 0x25, 0xc9, 0x9c, 0xc7, 0x6b, 0x36, 0x9f, 0xb4, 0x11, - 0x7e, 0x93, 0xb6, 0x3a, 0xab, 0x25, 0x58, 0xfe, 0x49, 0x1b, 0xe1, 0x37, 0xba, 0x0a, 0x53, 0x75, - 0x69, 0x17, 0xc4, 0xc6, 0x99, 0x36, 0xe2, 0x44, 0xa4, 0xf3, 0xf2, 0x96, 0x19, 0xb0, 0x4f, 0x47, - 0x9a, 0x36, 0x62, 0x34, 0x96, 0x4f, 0x5b, 0x7b, 0xd8, 0xf3, 0xe7, 0xb3, 0xb4, 0x59, 0x7c, 0x52, - 0xb3, 0xc2, 0x87, 0x76, 0x1d, 0xfb, 0xf3, 0x39, 0xd6, 0xc2, 0x3f, 0xd1, 0x35, 0x38, 0xeb, 0x63, - 0x8f, 0xfc, 0xae, 0x05, 0xee, 0x01, 0x76, 0xfc, 0xf9, 0x3c, 0xeb, 0x9e, 0x53, 0x5f, 0x51, 0x22, - 0xaa, 0xc2, 0x45, 0x79, 0x3c, 0x35, 0x0f, 0xb7, 0x9b, 0x76, 0x9d, 0xfd, 0xb6, 0x9d, 0x7d, 0x77, - 0xbe, 0x40, 0xb9, 0x16, 0x64, 0x90, 0x11, 0x61, 0xc8, 0xb2, 0xe9, 0x8f, 0xe2, 0xdb, 0xc7, 0xdf, - 0x74, 0x6d, 0x67, 0x5c, 0x8d, 0x1b, 0xe5, 0xdb, 0x34, 0xe4, 0x79, 0x62, 0x44, 0xab, 0x00, 0x3c, - 0xdf, 0x1e, 0x60, 0xee, 0x26, 0xd5, 0xf3, 0xef, 0x7a, 0x95, 0x99, 0x86, 0xeb, 0xb5, 0x1e, 0xe9, - 0x6d, 0xcf, 0x6e, 0x99, 0x5e, 0x77, 0x0b, 0x77, 0x75, 0xa3, 0xc8, 0x80, 0x5b, 0xb8, 0x3b, 0x41, - 0x8e, 0x43, 0xcf, 0x62, 0xa1, 0x34, 0x4f, 0x05, 0xdf, 0x8a, 0x85, 0xd2, 0x77, 0xbd, 0xca, 0x3c, - 0xeb, 0xa5, 0xee, 0x36, 0x3b, 0x2d, 0xe7, 0x51, 0x84, 0xd7, 0xa5, 0x30, 0x1b, 0xce, 0x25, 0x1d, - 0xcd, 0x05, 0xbd, 0x19, 0x58, 0xe9, 0x2c, 0x0d, 0xa5, 0x97, 0x13, 0xad, 0x4d, 0x5a, 0xfd, 0x6a, - 0xe5, 0x5d, 0xaf, 0xb2, 0xc0, 0xba, 0xdd, 0x77, 0x3d, 0x6c, 0x37, 0x9c, 0x2d, 0xdc, 0x7d, 0x14, - 0xd6, 0x09, 0x7a, 0xbf, 0xb2, 0x2c, 0xd0, 0x85, 0x7e, 0x70, 0xcd, 0xc1, 0x47, 0xac, 0xb4, 0xf6, - 0x6b, 0x66, 0x27, 0x70, 0x5b, 0x66, 0x60, 0xd7, 0xcd, 0x66, 0xb3, 0x4b, 0x0d, 0xa1, 0x50, 0xbd, - 0xf0, 0xae, 0x57, 0x39, 0xc7, 0x64, 0x5b, 0x78, 0xdf, 0xec, 0x34, 0x83, 0x47, 0x81, 0xd7, 0xc1, - 0xba, 0x51, 0x09, 0x45, 0xbc, 0xc0, 0x47, 0x34, 0x14, 0xfa, 0x6b, 0x32, 0xbf, 0xfe, 0xb7, 0x29, - 0x92, 0xfd, 0xa2, 0x7e, 0xfb, 0x2a, 0x1a, 0x45, 0xca, 0x44, 0x49, 0x15, 0xcd, 0x67, 0x50, 0xa0, - 0xcb, 0x50, 0x0b, 0xb3, 0xd6, 0x65, 0x52, 0xb9, 0x51, 0x51, 0x74, 0xa1, 0x13, 0xd4, 0x99, 0xa7, - 0x1c, 0x9b, 0x16, 0x7a, 0x0a, 0xe5, 0x70, 0x2d, 0x49, 0x19, 0xc2, 0x76, 0x6f, 0x57, 0xc9, 0x66, - 0x4f, 0x0c, 0xa9, 0xdb, 0xc6, 0xc9, 0x42, 0x4a, 0x7e, 0x84, 0x40, 0x1b, 0x80, 0xcc, 0x4e, 0xf0, - 0x06, 0x3b, 0x81, 0xb0, 0x66, 0xb2, 0x19, 0xcc, 0x30, 0x9b, 0x3a, 0xee, 0x55, 0x66, 0xd6, 0x62, - 0xad, 0x64, 0x5f, 0x38, 0x13, 0x67, 0x20, 0xfb, 0xc8, 0x4b, 0x00, 0xf8, 0x6d, 0xdb, 0xf6, 0x28, - 0x81, 0xfb, 0x9e, 0x44, 0xd1, 0xff, 0x23, 0x03, 0x6c, 0x13, 0xca, 0x8b, 0x91, 0x87, 0x90, 0xae, - 0xf3, 0x7d, 0x43, 0xb1, 0x7a, 0xe3, 0xb8, 0x57, 0x49, 0x33, 0xdb, 0xfa, 0x95, 0xfe, 0xd1, 0x7e, - 0xc6, 0xcd, 0x8c, 0xda, 0x17, 0xe1, 0x41, 0x9b, 0xbc, 0xf0, 0x4a, 0x4d, 0x5c, 0x78, 0x55, 0xd5, - 0x77, 0xbd, 0x4a, 0x99, 0x49, 0xb6, 0x1d, 0x0b, 0xbf, 0xd5, 0x79, 0x29, 0x76, 0x1b, 0x66, 0x58, - 0x7c, 0xa8, 0x49, 0xee, 0x44, 0xad, 0xde, 0x98, 0x66, 0x0d, 0x3b, 0xa1, 0xf7, 0xdc, 0x86, 0x19, - 0x16, 0x31, 0x64, 0x6c, 0x99, 0x61, 0x59, 0x43, 0x84, 0x5d, 0x81, 0x1c, 0x63, 0xa7, 0x41, 0xa1, - 0xb4, 0xa2, 0x25, 0x0d, 0x72, 0x9b, 0x22, 0x0c, 0x8e, 0x44, 0xcf, 0xe0, 0x42, 0x2c, 0xbe, 0x48, - 0xbd, 0x30, 0xdd, 0x0e, 0x4e, 0xe2, 0xbc, 0xcc, 0x10, 0xf5, 0xbe, 0x01, 0x65, 0xb9, 0x81, 0x87, - 0xf4, 0x44, 0x27, 0x93, 0xa3, 0x91, 0x11, 0xe3, 0x92, 0xb3, 0x6d, 0x36, 0x5e, 0xa6, 0x9e, 0x83, - 0xac, 0xed, 0xd7, 0x5a, 0x98, 0xf9, 0x8f, 0x91, 0xb1, 0xfd, 0x6d, 0x8c, 0x16, 0xe4, 0xda, 0xb5, - 0xc8, 0x02, 0xbc, 0xa8, 0x56, 0x49, 0xe8, 0x36, 0xa3, 0x12, 0xc1, 0x9a, 0x07, 0xca, 0x18, 0xa3, - 0xa1, 0x17, 0x00, 0xac, 0xf4, 0xa2, 0xa1, 0x67, 0x8a, 0x4e, 0x79, 0x99, 0xf8, 0xce, 0x2b, 0x4a, - 0x65, 0xe6, 0x71, 0x49, 0x9a, 0xbf, 0xb0, 0x8c, 0x88, 0x4b, 0x37, 0x8a, 0xec, 0x63, 0xdd, 0xb6, - 0xf4, 0x3f, 0xcb, 0x42, 0x9e, 0xef, 0x5e, 0x4f, 0x19, 0x2f, 0x1f, 0x0c, 0xd7, 0x08, 0x0b, 0x9d, - 0x13, 0xae, 0x7f, 0xfa, 0x54, 0xeb, 0xff, 0x29, 0x64, 0xfd, 0x80, 0x2c, 0x66, 0x86, 0xda, 0xf9, - 0xe2, 0x10, 0x76, 0x32, 0xbf, 0xa5, 0x5d, 0x02, 0x34, 0x18, 0x7e, 0x20, 0xcc, 0x67, 0xc7, 0x85, - 0xf9, 0xe2, 0x7b, 0x84, 0xf9, 0x45, 0x28, 0xd7, 0x3d, 0x6c, 0x06, 0xd8, 0x62, 0x9a, 0x67, 0xa9, - 0xb3, 0xc4, 0x69, 0x54, 0xf9, 0x31, 0xcb, 0x28, 0xf4, 0x59, 0xc6, 0xd7, 0x72, 0x5a, 0x4e, 0x0f, - 0x73, 0x95, 0x0d, 0x0a, 0xa9, 0x5e, 0x7b, 0xd7, 0xab, 0x2c, 0x0e, 0x64, 0x81, 0xed, 0xb8, 0xa3, - 0xea, 0x51, 0x66, 0x5f, 0x80, 0x22, 0xc9, 0xcc, 0xac, 0x67, 0x60, 0x3d, 0x13, 0x02, 0xe9, 0x59, - 0x77, 0x21, 0x4b, 0x97, 0x2d, 0xa1, 0x82, 0xde, 0x74, 0xea, 0x6e, 0xcb, 0x76, 0x1a, 0x3c, 0x2f, - 0xab, 0x0a, 0x5a, 0x80, 0x0b, 0x2f, 0x3b, 0x41, 0xc3, 0x8d, 0x88, 0x4f, 0x9c, 0xef, 0x3a, 0xb8, - 0x83, 0x2d, 0x56, 0x48, 0xf7, 0x35, 0xee, 0x62, 0x27, 0x50, 0xd3, 0xa8, 0x0c, 0x85, 0xb5, 0x7a, - 0x1d, 0xb7, 0x03, 0x6c, 0xa9, 0x19, 0xfd, 0x6f, 0x0a, 0x50, 0x96, 0xf5, 0x7d, 0x4a, 0xab, 0x7c, - 0x18, 0x0b, 0x7f, 0xd7, 0xc6, 0x59, 0x95, 0xbc, 0xf3, 0xbc, 0x00, 0x79, 0xdb, 0xaf, 0xb9, 0x6d, - 0xec, 0xf0, 0x4a, 0x30, 0x67, 0xfb, 0x2f, 0xdb, 0xd8, 0x19, 0x30, 0x99, 0xcc, 0x38, 0x93, 0x99, - 0xf9, 0x00, 0x95, 0x41, 0x56, 0xaa, 0x0c, 0x16, 0xa1, 0xdc, 0x71, 0x3c, 0x6c, 0x5a, 0x35, 0x9a, - 0x1c, 0x69, 0x64, 0xc9, 0x1a, 0x25, 0x46, 0x5b, 0xa7, 0x35, 0x4f, 0x05, 0x4a, 0x4d, 0xd3, 0x0f, - 0x6a, 0x9d, 0xb6, 0x64, 0x68, 0x40, 0x48, 0xaf, 0x29, 0x05, 0xdd, 0x05, 0xc4, 0x2b, 0x4a, 0xd9, - 0x53, 0x0b, 0xb4, 0x17, 0x95, 0xb7, 0x44, 0x4e, 0xfa, 0x09, 0xe4, 0x39, 0x8d, 0xda, 0xff, 0x90, - 0xc3, 0x2b, 0x71, 0xfc, 0x25, 0xb0, 0x68, 0x35, 0x2a, 0x30, 0x61, 0xb8, 0xbd, 0xf2, 0xd0, 0x1e, - 0x16, 0x9f, 0x0f, 0xe1, 0x23, 0x51, 0x17, 0x0c, 0xe6, 0x9b, 0x12, 0x1d, 0xe1, 0x1c, 0x07, 0xf4, - 0x59, 0x33, 0xfa, 0x04, 0x2e, 0x34, 0xdd, 0xba, 0xd9, 0xac, 0x0d, 0x4b, 0x3e, 0xb3, 0xb4, 0x79, - 0xa3, 0x2f, 0x03, 0xf5, 0xfb, 0xe5, 0xd4, 0xa0, 0x5f, 0xee, 0xc1, 0x0c, 0x29, 0x70, 0xba, 0x35, - 0xbe, 0x4f, 0xa5, 0x8a, 0x3d, 0x4b, 0x15, 0xfb, 0xe0, 0xb8, 0x57, 0x99, 0x96, 0xf7, 0x6f, 0x4c, - 0xbd, 0x95, 0x98, 0x7a, 0x07, 0x98, 0x75, 0x63, 0xda, 0x93, 0x79, 0x6c, 0x0b, 0x7d, 0x01, 0x53, - 0x31, 0xd8, 0xfc, 0x34, 0x5d, 0xeb, 0xc4, 0xbd, 0xb3, 0x54, 0x1e, 0x54, 0xd5, 0xe3, 0x5e, 0x25, - 0xb6, 0xff, 0x36, 0xca, 0xb2, 0x68, 0xf4, 0x47, 0x0a, 0xa8, 0x03, 0x05, 0xb8, 0x4a, 0x15, 0xb2, - 0x3c, 0x36, 0xce, 0xc6, 0x8b, 0xf2, 0xea, 0x9d, 0x77, 0xbd, 0xca, 0x8d, 0x81, 0xa8, 0xb2, 0x9e, - 0x14, 0xda, 0xf9, 0x0c, 0xe5, 0x92, 0xfe, 0x79, 0xf2, 0x3e, 0x7c, 0x1a, 0x4a, 0xbc, 0xe6, 0x23, - 0xad, 0xec, 0x84, 0x95, 0x1b, 0x13, 0x25, 0xa4, 0x48, 0x9c, 0xd9, 0xee, 0x34, 0x03, 0x9b, 0x29, - 0x9c, 0x12, 0xd3, 0xfa, 0x3f, 0xa6, 0x60, 0x61, 0xc4, 0x58, 0xdf, 0xa7, 0x6c, 0x3a, 0x6d, 0x36, - 0x4b, 0xac, 0x91, 0xd2, 0xc9, 0x35, 0xd2, 0x87, 0xa9, 0x25, 0xef, 0x01, 0x92, 0x75, 0x4b, 0x8a, - 0x55, 0xec, 0xf1, 0x70, 0x31, 0x23, 0xb5, 0xec, 0xd2, 0x06, 0xfd, 0x87, 0x34, 0xe4, 0xd8, 0x22, - 0xfe, 0x5f, 0xed, 0x8b, 0x72, 0xef, 0x11, 0xfd, 0xb6, 0xc7, 0x95, 0x79, 0x43, 0xc6, 0x3b, 0x44, - 0x3b, 0xb1, 0x14, 0x97, 0x8f, 0xa7, 0xb8, 0x0f, 0x54, 0x08, 0xae, 0x46, 0x29, 0x3a, 0x3b, 0x2e, - 0x45, 0x87, 0xb9, 0x57, 0xff, 0x5d, 0xc8, 0x31, 0xd2, 0x29, 0x95, 0xf2, 0x38, 0xc9, 0xec, 0x52, - 0x43, 0x0a, 0xe1, 0x7e, 0x43, 0xd4, 0x57, 0x61, 0x9a, 0x7b, 0xdb, 0xb6, 0x74, 0x9b, 0x30, 0xe6, - 0x20, 0x51, 0xff, 0xa9, 0x0c, 0xa5, 0xdd, 0xc0, 0xc3, 0x66, 0x8b, 0x1e, 0xb9, 0xa1, 0x5f, 0xc4, - 0x8e, 0x78, 0xaf, 0x26, 0xee, 0x52, 0x23, 0xf8, 0x64, 0x67, 0xbc, 0xe7, 0x21, 0x67, 0xfb, 0x64, - 0x4b, 0xca, 0x53, 0x70, 0xd6, 0xf6, 0x5f, 0xe0, 0x23, 0xed, 0x6b, 0x7a, 0x33, 0x13, 0x2e, 0x3a, - 0x4b, 0x69, 0xd6, 0x80, 0x06, 0x95, 0xd3, 0x68, 0x50, 0x5b, 0x8d, 0x0b, 0xdf, 0xc0, 0x4d, 0x4c, - 0x84, 0x5f, 0x1c, 0x54, 0x8c, 0xa4, 0x01, 0xed, 0x4b, 0x40, 0x52, 0x48, 0x16, 0x23, 0x5a, 0x83, - 0x92, 0x74, 0xe2, 0xc2, 0x07, 0x34, 0x2e, 0x9e, 0x1b, 0x32, 0x8f, 0xb6, 0x1c, 0x13, 0x2c, 0x46, - 0xf3, 0x91, 0x1c, 0xda, 0xf2, 0x3c, 0xb4, 0xd1, 0xd0, 0xa5, 0x3d, 0x85, 0xb3, 0x5c, 0x9b, 0x62, - 0x14, 0x52, 0xf6, 0x56, 0x26, 0xcf, 0xde, 0x44, 0x10, 0x8f, 0xca, 0x92, 0x20, 0x9e, 0x78, 0x47, - 0x09, 0xe2, 0x4c, 0x86, 0xc0, 0x6a, 0xeb, 0x30, 0xc5, 0x42, 0x8e, 0x90, 0x13, 0xed, 0xf8, 0x94, - 0x49, 0x77, 0x7c, 0x44, 0x08, 0x73, 0x11, 0x49, 0x08, 0x73, 0x9f, 0x51, 0x42, 0xb8, 0xa3, 0x71, - 0xa4, 0x56, 0x82, 0xe2, 0x73, 0x9b, 0x94, 0xa3, 0x16, 0xb6, 0xb4, 0x3f, 0xcc, 0x42, 0xe1, 0x85, - 0x1b, 0xd8, 0xfb, 0x36, 0xd5, 0x94, 0x6c, 0xbd, 0xf7, 0xc6, 0x59, 0xaf, 0xe0, 0x93, 0xcd, 0x78, - 0x16, 0xb2, 0x81, 0x1d, 0x34, 0xc5, 0x65, 0x0b, 0xfb, 0x08, 0x2f, 0x1b, 0x32, 0xd1, 0x65, 0xc3, - 0xf0, 0xdd, 0xa2, 0x96, 0x87, 0x6c, 0xd5, 0xf4, 0xed, 0xba, 0xf6, 0x2f, 0x0a, 0x4c, 0xf3, 0x5d, - 0xb9, 0x81, 0xeb, 0xd8, 0x3e, 0xfc, 0x20, 0xd6, 0x34, 0xe0, 0x22, 0xa9, 0x53, 0x05, 0x39, 0xc9, - 0xa0, 0xd2, 0x27, 0x30, 0xa8, 0x2d, 0x40, 0xf1, 0x1b, 0x52, 0x52, 0xf9, 0x9f, 0x56, 0xd8, 0x4b, - 0x98, 0x8b, 0x0b, 0x0b, 0x97, 0xe9, 0x74, 0x02, 0xf5, 0x23, 0x5e, 0x9b, 0x94, 0x20, 0xcf, 0xef, - 0x81, 0xd5, 0x33, 0xa4, 0x50, 0xa1, 0x67, 0x22, 0x44, 0x27, 0xaa, 0x12, 0x1e, 0xcb, 0xc7, 0x15, - 0xa3, 0xa6, 0x90, 0x06, 0x73, 0xa4, 0x61, 0x70, 0x7a, 0x6a, 0x1a, 0x5d, 0x02, 0x6d, 0xb0, 0x2d, - 0xe4, 0xcd, 0xe8, 0x7f, 0x92, 0x4a, 0xae, 0x8a, 0x66, 0x60, 0x8a, 0x90, 0x43, 0x83, 0x65, 0x3b, - 0x2b, 0x2e, 0xaa, 0x3f, 0xf8, 0xa9, 0xa9, 0xa4, 0x46, 0x1e, 0x2e, 0xd4, 0xb4, 0x18, 0xe0, 0x60, - 0x8c, 0x52, 0x33, 0x09, 0x6d, 0x82, 0x2f, 0x8b, 0xe6, 0x00, 0x49, 0x83, 0x17, 0x3c, 0x39, 0x41, - 0x8f, 0x07, 0x08, 0x35, 0x8f, 0xce, 0xc3, 0x0c, 0x5b, 0x21, 0xc9, 0xdf, 0xd5, 0x82, 0x20, 0xc7, - 0x3c, 0x58, 0x2d, 0x22, 0x15, 0xca, 0x84, 0x2c, 0xbc, 0x49, 0x05, 0xfd, 0x2f, 0x15, 0x6a, 0x24, - 0xe1, 0x0c, 0x98, 0xd3, 0xf5, 0xbd, 0xce, 0x89, 0x42, 0x50, 0xc6, 0x60, 0x1f, 0xc4, 0xcd, 0xda, - 0xe2, 0x62, 0x38, 0x63, 0xd0, 0xdf, 0xda, 0xb6, 0xb8, 0xcd, 0xf8, 0x20, 0x89, 0x61, 0x60, 0x68, - 0xeb, 0x74, 0x7b, 0xa0, 0x7d, 0x15, 0x0d, 0x6d, 0xa2, 0xeb, 0x37, 0xb1, 0xef, 0xf2, 0x6b, 0x81, - 0x5b, 0xb3, 0xe9, 0xcb, 0x02, 0x7e, 0x27, 0x21, 0xf6, 0x5d, 0xfe, 0x2b, 0x97, 0xbd, 0x38, 0xd0, - 0xae, 0x8b, 0x19, 0x8c, 0xce, 0x3e, 0xfa, 0x97, 0x00, 0x5c, 0x13, 0x4f, 0x71, 0x20, 0xdf, 0xe8, - 0xfc, 0xba, 0x10, 0x70, 0xba, 0xd0, 0xad, 0xff, 0xbe, 0x02, 0x25, 0x1a, 0xf1, 0xde, 0x47, 0x0f, - 0xd2, 0x20, 0x62, 0x17, 0x79, 0x95, 0x31, 0x51, 0x56, 0x5c, 0xdf, 0x7d, 0xaf, 0xc0, 0x54, 0xcc, - 0xd0, 0xb4, 0xc3, 0x13, 0xad, 0xf9, 0xb3, 0x84, 0x2b, 0xcf, 0x53, 0xd5, 0xa3, 0xd1, 0xfd, 0xc2, - 0x2f, 0xc2, 0x24, 0x2b, 0x56, 0x7a, 0xd2, 0x9b, 0x89, 0x2a, 0x4c, 0x71, 0x4e, 0x76, 0xda, 0xa1, - 0xdd, 0x8c, 0x18, 0xc7, 0xd4, 0x18, 0xa1, 0x8c, 0xbf, 0x53, 0xa0, 0x20, 0xbc, 0x55, 0xfb, 0x73, - 0xe9, 0x95, 0xc9, 0xff, 0xc2, 0x35, 0xfb, 0x83, 0x31, 0x25, 0xf8, 0x90, 0x5a, 0x3b, 0xf6, 0x24, - 0xa3, 0x62, 0xc4, 0xf7, 0x21, 0x24, 0x25, 0xe3, 0x86, 0xed, 0x07, 0x98, 0x5d, 0xda, 0x6a, 0x76, - 0xec, 0x85, 0x46, 0x78, 0xce, 0x2f, 0x3d, 0xe2, 0xe3, 0xe7, 0xfc, 0xd1, 0x91, 0xfe, 0x29, 0x77, - 0x68, 0xd1, 0xb8, 0x9e, 0xc1, 0x7c, 0x6c, 0x58, 0xc1, 0x5a, 0x27, 0x70, 0x9f, 0x38, 0xe6, 0x5e, - 0x13, 0x6b, 0x57, 0xa2, 0xf1, 0xcc, 0x43, 0x1e, 0x53, 0xa2, 0xc5, 0x9f, 0x6a, 0x89, 0xcf, 0x48, - 0x52, 0x03, 0x4a, 0x55, 0xd3, 0x71, 0xb0, 0xf7, 0x79, 0xc7, 0xa5, 0xaf, 0x0d, 0x42, 0xe6, 0x39, - 0xc8, 0x79, 0xa6, 0x63, 0xb9, 0x2d, 0xce, 0xcb, 0xbf, 0xb4, 0x4f, 0x84, 0x47, 0xcc, 0x42, 0xf6, - 0x3b, 0xc2, 0xc4, 0x95, 0xcd, 0x3e, 0x08, 0x1b, 0xd9, 0xe8, 0xb9, 0x9e, 0xb8, 0x66, 0x67, 0x5f, - 0xfa, 0xaf, 0x41, 0xe9, 0x29, 0xbb, 0x51, 0x26, 0xa6, 0x2e, 0xfb, 0xf9, 0x15, 0x21, 0x50, 0x83, - 0x42, 0x87, 0xb7, 0x73, 0x99, 0xe1, 0xb7, 0xbe, 0x4d, 0x4a, 0x49, 0xf6, 0x22, 0xed, 0xc9, 0xdb, - 0xb6, 0xeb, 0x05, 0x1b, 0x66, 0x60, 0xca, 0x52, 0xee, 0x0a, 0x29, 0x57, 0x60, 0x0a, 0x53, 0x04, - 0x3b, 0x11, 0x31, 0xf9, 0xcb, 0x94, 0xb2, 0x20, 0x12, 0x46, 0xfd, 0x8f, 0x53, 0x80, 0x9e, 0xd3, - 0xe3, 0x14, 0x33, 0x30, 0xf7, 0x4c, 0x1f, 0xb3, 0x13, 0xc2, 0xd1, 0x46, 0x3c, 0xc9, 0xfe, 0xf1, - 0x1a, 0x9c, 0x8d, 0xee, 0xa3, 0xf6, 0x9b, 0x66, 0x83, 0x57, 0xff, 0x53, 0x21, 0xf5, 0x97, 0x4d, - 0xb3, 0x81, 0xf6, 0xe1, 0x23, 0x76, 0xd8, 0x13, 0xbb, 0xf9, 0xac, 0x89, 0x73, 0x60, 0xb2, 0xf9, - 0xba, 0x9d, 0xe4, 0x01, 0x74, 0xcc, 0xf1, 0x1c, 0x63, 0x06, 0xd8, 0x60, 0x27, 0x47, 0x32, 0xdd, - 0xdf, 0x15, 0x47, 0xc4, 0xe2, 0x3c, 0x4a, 0x3a, 0x8a, 0x2b, 0x71, 0xda, 0x73, 0xdb, 0x39, 0xd0, - 0xff, 0x41, 0x81, 0xb9, 0x64, 0xb1, 0x13, 0x2c, 0x47, 0xec, 0x2c, 0x2f, 0x35, 0x78, 0x96, 0x37, - 0xf4, 0x20, 0x52, 0x1c, 0x6e, 0x66, 0x4e, 0x7c, 0xb8, 0xb9, 0xf2, 0xdf, 0x73, 0xa0, 0x86, 0x37, - 0xeb, 0xdc, 0x25, 0xd1, 0x1f, 0x8c, 0x78, 0xb0, 0x8a, 0x56, 0x93, 0xeb, 0xcc, 0x64, 0xf4, 0x92, - 0xb0, 0xa8, 0x95, 0x13, 0x72, 0x11, 0xe3, 0xeb, 0x24, 0xbe, 0x1f, 0x45, 0x89, 0x47, 0x55, 0x09, - 0xc0, 0xb0, 0xef, 0x7b, 0x93, 0x33, 0x90, 0x6e, 0x7f, 0x4f, 0x19, 0xfa, 0x70, 0x13, 0x7d, 0x3c, - 0x64, 0x6f, 0x91, 0x04, 0x0e, 0xfb, 0xbf, 0x7f, 0x32, 0x26, 0x32, 0x86, 0x7a, 0xdf, 0x9b, 0x4e, - 0x74, 0x2b, 0x49, 0x46, 0x0c, 0x12, 0x76, 0x77, 0x63, 0x12, 0x28, 0xe9, 0xc4, 0x4b, 0x7a, 0xac, - 0x88, 0x96, 0x92, 0xaf, 0x95, 0xfb, 0x71, 0x61, 0x77, 0x77, 0x27, 0xc6, 0x93, 0x3e, 0x7f, 0x2b, - 0xf6, 0xf8, 0x0f, 0xdd, 0x18, 0xc6, 0x1c, 0x3d, 0xa7, 0x63, 0xbd, 0x5c, 0x1b, 0x0f, 0x24, 0xe2, - 0x9b, 0x83, 0xaf, 0xfe, 0xd0, 0xd0, 0x01, 0xca, 0xa8, 0xb0, 0xa3, 0xdb, 0x13, 0xa2, 0x49, 0x6f, - 0x9f, 0x87, 0xcf, 0x27, 0xd1, 0x95, 0x61, 0x6c, 0x6b, 0xf5, 0x48, 0x33, 0x8b, 0xa3, 0x41, 0x44, - 0xe4, 0x57, 0xf2, 0x93, 0x1c, 0x74, 0x7d, 0xcc, 0x83, 0x12, 0x21, 0xf8, 0xea, 0x58, 0x1c, 0x91, - 0xfd, 0x45, 0xf4, 0xca, 0x1d, 0x25, 0x72, 0x88, 0xd6, 0x50, 0xae, 0x3e, 0x06, 0xd5, 0x6e, 0x76, - 0x7f, 0x55, 0x41, 0x41, 0x52, 0xa5, 0x9e, 0x6c, 0x47, 0x83, 0xb8, 0xd1, 0x76, 0x94, 0x88, 0x67, - 0xbd, 0xd6, 0x62, 0x05, 0x69, 0xb2, 0x25, 0x49, 0x80, 0xd1, 0x96, 0x14, 0x07, 0xb2, 0x0e, 0xbc, - 0xa4, 0x2a, 0x7f, 0xfc, 0xb4, 0x18, 0x6e, 0xf2, 0x69, 0x85, 0x78, 0x6e, 0xbf, 0xfd, 0x4f, 0x5d, - 0xd0, 0x58, 0x09, 0x04, 0x35, 0xda, 0x7e, 0x13, 0xd0, 0xdc, 0xd8, 0xa2, 0xdd, 0x42, 0xb2, 0xb1, - 0x45, 0xed, 0xa3, 0x8d, 0x2d, 0x86, 0xe3, 0x11, 0x2c, 0x56, 0xaa, 0x27, 0x47, 0xb0, 0x18, 0x64, - 0x74, 0x04, 0xeb, 0x87, 0x92, 0x4e, 0xf6, 0xfb, 0xab, 0x6f, 0x74, 0x7b, 0xd4, 0x16, 0xbf, 0x2f, - 0x72, 0xdd, 0x9c, 0x08, 0xcb, 0x27, 0x13, 0xab, 0xd5, 0x93, 0x27, 0x13, 0x83, 0x8c, 0x9e, 0x4c, - 0x3f, 0x94, 0x74, 0xf2, 0x2a, 0xaa, 0xe5, 0x93, 0xdd, 0x53, 0xb4, 0x8e, 0x76, 0x4f, 0x09, 0x95, - 0x60, 0x51, 0xb4, 0x5e, 0x18, 0x6b, 0x51, 0x04, 0x35, 0xb9, 0x45, 0x71, 0x34, 0xe9, 0xcd, 0x4d, - 0xf8, 0x67, 0x0e, 0xba, 0x37, 0xd6, 0x05, 0x08, 0x2c, 0xec, 0xef, 0xce, 0xa4, 0x70, 0xd2, 0xa1, - 0x0d, 0x33, 0xbc, 0x6a, 0xf1, 0xe9, 0xce, 0xe0, 0xb9, 0xed, 0x47, 0xda, 0x89, 0xde, 0x03, 0xf6, - 0x43, 0x06, 0xb4, 0x33, 0x12, 0xca, 0xe2, 0xc1, 0x5f, 0x8d, 0xdf, 0xbf, 0xa0, 0xcf, 0x86, 0x3d, - 0x6f, 0x1d, 0xc1, 0x14, 0x8e, 0xe5, 0xe1, 0xe9, 0x98, 0xc9, 0x32, 0x90, 0x8a, 0x6d, 0xd8, 0x26, - 0x26, 0xb9, 0x62, 0x1b, 0x86, 0x1e, 0x5d, 0xb1, 0x8d, 0xe0, 0xe2, 0xd9, 0x5d, 0xda, 0x00, 0x25, - 0xc7, 0x64, 0x09, 0x30, 0x3a, 0x26, 0xc7, 0x81, 0x5c, 0xbc, 0xb4, 0xed, 0x49, 0x16, 0x2f, 0x01, - 0x46, 0x8b, 0x8f, 0x03, 0x89, 0xf8, 0x20, 0x69, 0x5b, 0x94, 0x1c, 0xf0, 0x07, 0x71, 0xa3, 0x03, - 0x7e, 0x22, 0x9e, 0x9a, 0x55, 0x75, 0xf5, 0xfb, 0x9f, 0x2f, 0x9d, 0xf9, 0xe7, 0x9f, 0x2f, 0x9d, - 0xf9, 0xb7, 0x9f, 0x2f, 0x9d, 0xf9, 0xea, 0x3a, 0x37, 0x47, 0x5c, 0x7f, 0xb3, 0x4c, 0x7f, 0x2e, - 0x37, 0xdc, 0xe5, 0xf6, 0x41, 0x63, 0x39, 0xfe, 0xa7, 0xbc, 0xbd, 0x1c, 0x7d, 0x8d, 0xfa, 0xf1, - 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x71, 0xb9, 0x4d, 0x2b, 0xad, 0x37, 0x00, 0x00, + proto.RegisterType((*MediaPrepare)(nil), "berty.messenger.v1.MediaPrepare") + proto.RegisterType((*MediaPrepare_Request)(nil), "berty.messenger.v1.MediaPrepare.Request") + proto.RegisterType((*MediaPrepare_Reply)(nil), "berty.messenger.v1.MediaPrepare.Reply") + proto.RegisterType((*MediaRetrieve)(nil), "berty.messenger.v1.MediaRetrieve") + proto.RegisterType((*MediaRetrieve_Request)(nil), "berty.messenger.v1.MediaRetrieve.Request") + proto.RegisterType((*MediaRetrieve_Reply)(nil), "berty.messenger.v1.MediaRetrieve.Reply") +} + +func init() { proto.RegisterFile("messengertypes.proto", fileDescriptor_0eab5f5532ffdd8b) } + +var fileDescriptor_0eab5f5532ffdd8b = []byte{ + // 4441 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5b, 0x4d, 0x6c, 0x1c, 0xd9, + 0x56, 0x4e, 0xf5, 0x8f, 0xbb, 0xfb, 0x74, 0x3b, 0x2e, 0xdf, 0x38, 0x4e, 0xa7, 0x3c, 0x49, 0x27, + 0x95, 0xdf, 0xc9, 0x24, 0xce, 0x8b, 0x27, 0x33, 0x43, 0x32, 0xef, 0x31, 0x72, 0xdb, 0x79, 0x19, + 0x93, 0x38, 0xf1, 0x2b, 0xc7, 0x33, 0x68, 0x1e, 0xd0, 0x54, 0x57, 0x5d, 0x77, 0x0a, 0x77, 0x57, + 0xf5, 0x54, 0x55, 0xdb, 0xd3, 0x4f, 0x6c, 0x40, 0x20, 0x10, 0x4f, 0xa0, 0x91, 0x1e, 0x48, 0xb0, + 0x03, 0x24, 0x24, 0xf4, 0x10, 0x48, 0x08, 0x89, 0x2d, 0x5b, 0xd8, 0x3d, 0x36, 0x88, 0x55, 0x2f, + 0x3c, 0x3b, 0x96, 0xd9, 0x23, 0xa1, 0xfb, 0x57, 0x75, 0xab, 0xbb, 0xfa, 0x27, 0x76, 0x40, 0xac, + 0xdc, 0xf7, 0xdc, 0xef, 0x9c, 0xfb, 0x73, 0x7e, 0xee, 0x39, 0xb7, 0xae, 0x61, 0xa9, 0x83, 0x83, + 0x00, 0xbb, 0x2d, 0xec, 0x87, 0xfd, 0x2e, 0x0e, 0x56, 0xbb, 0xbe, 0x17, 0x7a, 0x08, 0x35, 0x49, + 0x7b, 0x35, 0xea, 0x5b, 0x3d, 0x7c, 0xa0, 0x2d, 0xb5, 0xbc, 0x96, 0x47, 0xbb, 0xef, 0x93, 0x5f, + 0x0c, 0xa9, 0x9d, 0xa3, 0x7f, 0x2c, 0xaf, 0x2d, 0xb1, 0xeb, 0x2f, 0x40, 0xdd, 0xf0, 0xdc, 0x43, + 0xec, 0x07, 0x66, 0xe8, 0x78, 0xee, 0xcb, 0x2e, 0x76, 0xb5, 0x07, 0x50, 0x30, 0xf0, 0xd7, 0x3d, + 0x1c, 0x84, 0xe8, 0x26, 0x14, 0x5b, 0xbe, 0xd7, 0xeb, 0x36, 0xba, 0x07, 0x55, 0xe5, 0x8a, 0x72, + 0xbb, 0x54, 0x2f, 0x1f, 0x0f, 0x6a, 0x85, 0xa7, 0x84, 0xb6, 0xf3, 0xcc, 0x28, 0xd0, 0xce, 0x9d, + 0x03, 0xad, 0x00, 0x79, 0x03, 0x77, 0xdb, 0x7d, 0xfd, 0x25, 0x2c, 0xca, 0xf2, 0x36, 0xda, 0x5e, + 0x80, 0x4f, 0x25, 0xf0, 0xd7, 0xa0, 0xf8, 0xc4, 0x7a, 0xed, 0xbd, 0xc2, 0x41, 0xa8, 0x7d, 0x18, + 0xcb, 0x59, 0x82, 0xbc, 0x8d, 0xdb, 0x66, 0x9f, 0x0a, 0xc9, 0x19, 0xac, 0x81, 0x10, 0xe4, 0xb0, + 0xf5, 0xda, 0xab, 0x66, 0x88, 0x64, 0x83, 0xfe, 0xd6, 0x56, 0xb8, 0xa4, 0xa8, 0x53, 0x89, 0x3b, + 0xf5, 0x3f, 0xcd, 0x40, 0x75, 0xcb, 0x0d, 0x42, 0xd3, 0xb5, 0xf0, 0xee, 0x6b, 0xd3, 0xc7, 0x66, + 0xb3, 0x8d, 0xeb, 0x64, 0x47, 0xb7, 0x36, 0xb5, 0x66, 0x62, 0x38, 0x1f, 0x07, 0x38, 0xa4, 0xcc, + 0x45, 0x83, 0x35, 0xd0, 0x55, 0xa8, 0xd8, 0x4e, 0xd0, 0x6d, 0x9b, 0xfd, 0x86, 0x6b, 0x76, 0x30, + 0x1f, 0xb6, 0xcc, 0x69, 0x2f, 0xcc, 0x0e, 0x46, 0x97, 0x01, 0xba, 0x66, 0x10, 0x74, 0x5f, 0xfb, + 0x66, 0x80, 0xab, 0xd9, 0x2b, 0xca, 0xed, 0x8a, 0x21, 0x51, 0xb4, 0x9f, 0x29, 0x62, 0x7a, 0x0f, + 0x20, 0xd7, 0x76, 0x5c, 0xb6, 0x2b, 0xe5, 0xb5, 0x4b, 0xab, 0xa3, 0x7a, 0x5d, 0xa5, 0x13, 0x7b, + 0xee, 0xb8, 0x07, 0x06, 0x85, 0xa2, 0x35, 0xa8, 0x38, 0x6e, 0x88, 0x7d, 0xd7, 0x6c, 0x37, 0x7a, + 0x7e, 0x9b, 0x8d, 0x5f, 0x5f, 0x38, 0x1e, 0xd4, 0xca, 0x5b, 0x9c, 0xbe, 0x67, 0x3c, 0x37, 0xca, + 0x02, 0xb4, 0xe7, 0xb7, 0xd1, 0x35, 0x28, 0x1c, 0xe1, 0x26, 0x85, 0x67, 0x29, 0x1c, 0x8e, 0x07, + 0xb5, 0xb9, 0x2f, 0x71, 0x93, 0x20, 0xe7, 0x8e, 0x70, 0x73, 0xcf, 0x6f, 0xeb, 0xff, 0xad, 0xc0, + 0xb9, 0xe4, 0x76, 0x50, 0x05, 0x69, 0x3b, 0xe3, 0x15, 0x59, 0x49, 0x57, 0x24, 0xba, 0x04, 0xc0, + 0x70, 0xd2, 0x0e, 0x95, 0x28, 0x85, 0xec, 0xcf, 0xff, 0xd3, 0xf5, 0xef, 0xc3, 0x85, 0x4d, 0x7c, + 0x48, 0x77, 0x40, 0x58, 0x87, 0x30, 0x8a, 0xfa, 0xe9, 0x8d, 0x22, 0x36, 0xee, 0x3f, 0x52, 0x60, + 0x7e, 0xc7, 0xf4, 0x03, 0xbc, 0x89, 0x71, 0x97, 0x2c, 0x4c, 0xfb, 0x41, 0x2c, 0x1e, 0x49, 0x1b, + 0x52, 0xe2, 0x2b, 0x4e, 0x9a, 0x53, 0x66, 0xc4, 0x9c, 0x1e, 0x9f, 0x7c, 0x37, 0xf5, 0x9f, 0x17, + 0xa0, 0x14, 0xd1, 0xd0, 0xc7, 0x90, 0x3b, 0x70, 0x5c, 0x9b, 0x0a, 0x38, 0xbb, 0xa6, 0x4f, 0x14, + 0xb0, 0xfa, 0xcc, 0x71, 0x6d, 0x83, 0xe2, 0xd1, 0x06, 0x14, 0x29, 0xb4, 0xe1, 0xd8, 0x74, 0x7e, + 0xe5, 0xb5, 0x95, 0xb1, 0xbc, 0x5b, 0x9b, 0xcc, 0x68, 0x78, 0xc3, 0x28, 0x50, 0xe0, 0x96, 0x8d, + 0x3e, 0x83, 0x32, 0x13, 0x42, 0x0d, 0x85, 0x2a, 0xaa, 0xbc, 0x76, 0x79, 0xac, 0x1c, 0x6a, 0x74, + 0x06, 0x34, 0xa3, 0xdf, 0xe8, 0x09, 0x94, 0xb0, 0x6b, 0xf9, 0xfd, 0x6e, 0x88, 0xed, 0x6a, 0x8e, + 0xb2, 0xdf, 0x9a, 0xbc, 0x84, 0x27, 0x02, 0x6e, 0xc4, 0x9c, 0xda, 0xbf, 0xe4, 0xa0, 0x14, 0x75, + 0x9c, 0x78, 0x4b, 0x96, 0x20, 0xef, 0x7a, 0xae, 0x25, 0xf4, 0xc5, 0x1a, 0x23, 0x76, 0x92, 0x1d, + 0x0d, 0x1e, 0x1b, 0x70, 0xd9, 0xf2, 0xdc, 0xd0, 0xb4, 0xc2, 0x46, 0xb7, 0xd7, 0x6c, 0x3b, 0x56, + 0xc3, 0xc7, 0xae, 0x8d, 0x7f, 0x72, 0xe8, 0xf5, 0x82, 0x46, 0x80, 0xb1, 0x5d, 0x05, 0x2a, 0x71, + 0x85, 0xa3, 0x76, 0x28, 0xc8, 0x88, 0x30, 0xbb, 0x18, 0xdb, 0xa8, 0x0e, 0x48, 0x08, 0x31, 0x2d, + 0xcb, 0xeb, 0xb9, 0x21, 0x71, 0xd9, 0x32, 0x75, 0xd9, 0xa5, 0xe3, 0x41, 0x8d, 0xc4, 0x7f, 0xd2, + 0xbb, 0xce, 0x3a, 0x77, 0x9e, 0x19, 0xaa, 0x95, 0xa4, 0x1c, 0xa0, 0xef, 0xc1, 0x92, 0x90, 0x91, + 0x98, 0x73, 0x85, 0x0e, 0x2f, 0xe4, 0x6f, 0x4a, 0x53, 0xbf, 0x0d, 0x2a, 0x0f, 0x0f, 0x6c, 0xe2, + 0x07, 0xb8, 0x5f, 0x5d, 0xa2, 0xe8, 0xb3, 0x2c, 0x32, 0x50, 0xf2, 0x33, 0xdc, 0x27, 0xfb, 0xc0, + 0x90, 0x01, 0xb6, 0x7c, 0x1c, 0x56, 0xcf, 0x53, 0x54, 0x99, 0xd2, 0x76, 0x29, 0x29, 0x16, 0xc6, + 0x20, 0x8d, 0xc0, 0x69, 0x55, 0x97, 0x25, 0x61, 0x0c, 0xb6, 0xeb, 0xb4, 0xd0, 0xa7, 0x22, 0xda, + 0x90, 0x33, 0xae, 0x7a, 0x81, 0x2a, 0xea, 0x3d, 0xae, 0x28, 0x71, 0xfc, 0x11, 0x3d, 0x51, 0x2b, + 0x79, 0xd5, 0xef, 0x62, 0x1e, 0x8b, 0xc8, 0x4f, 0x74, 0x1d, 0xce, 0xf2, 0x61, 0x9c, 0x96, 0x4b, + 0x26, 0x5e, 0xad, 0xd2, 0x41, 0xd8, 0xfc, 0x76, 0x9d, 0x96, 0xbb, 0xd3, 0x6b, 0xa2, 0xbb, 0x80, + 0x18, 0x2a, 0xb1, 0x13, 0x17, 0x29, 0x92, 0x4d, 0x53, 0xda, 0x07, 0xfd, 0x0b, 0xc8, 0x11, 0x4b, + 0x40, 0x0b, 0x50, 0xde, 0x73, 0x0f, 0x5c, 0xef, 0xc8, 0x25, 0x4d, 0xf5, 0x0c, 0xba, 0x00, 0xe7, + 0xf8, 0xc6, 0x6f, 0xb9, 0x87, 0x4e, 0x88, 0xbf, 0x78, 0x40, 0x3b, 0x14, 0x82, 0xa4, 0xb3, 0xe3, + 0x84, 0x0c, 0x3a, 0x07, 0x0b, 0x91, 0x0d, 0x72, 0x62, 0x56, 0xff, 0x7b, 0x05, 0xd0, 0x2e, 0x76, + 0x6d, 0x2e, 0x83, 0xc7, 0x0c, 0xed, 0x8f, 0x95, 0x38, 0x7e, 0xc8, 0x9e, 0xa8, 0x9c, 0xd4, 0x13, + 0x35, 0x28, 0x76, 0x70, 0x68, 0xda, 0x66, 0x68, 0x72, 0xf3, 0x8d, 0xda, 0x44, 0x73, 0xde, 0x91, + 0xdb, 0x88, 0xfa, 0xd9, 0xe9, 0x56, 0xf6, 0x8e, 0xdc, 0x6d, 0x4e, 0x8a, 0x23, 0x5d, 0x00, 0x05, + 0x32, 0xdd, 0x75, 0xeb, 0x40, 0x6b, 0xbc, 0xfd, 0x21, 0x72, 0x17, 0x80, 0xcc, 0xd9, 0x6c, 0x61, + 0x11, 0x56, 0x2a, 0xf5, 0xf9, 0xe3, 0x41, 0xad, 0xb4, 0xcd, 0xa8, 0x5b, 0x9b, 0x46, 0x89, 0x03, + 0xb6, 0xec, 0x78, 0x50, 0x0b, 0xca, 0x64, 0x50, 0x0e, 0xd2, 0x9e, 0xbd, 0xfd, 0xc0, 0x55, 0x28, + 0x70, 0xb9, 0x3c, 0x8e, 0x8b, 0x66, 0x3c, 0xc8, 0x9f, 0x29, 0xa0, 0x92, 0x51, 0x68, 0xeb, 0x65, + 0x97, 0x64, 0x3d, 0x81, 0xf6, 0xcd, 0xdb, 0x0f, 0xf5, 0x04, 0x0a, 0x1e, 0xe3, 0xe6, 0x71, 0xf3, + 0x83, 0x34, 0x6d, 0xad, 0x77, 0xbb, 0x7c, 0x39, 0xab, 0xf2, 0x80, 0x86, 0xe0, 0x8d, 0xe7, 0xf5, + 0xad, 0x02, 0x42, 0x9d, 0xe8, 0x21, 0x2c, 0x8f, 0x09, 0x20, 0x74, 0x46, 0xc6, 0x52, 0x37, 0x2d, + 0x72, 0xdc, 0x05, 0x90, 0x22, 0x86, 0xb4, 0xeb, 0x71, 0xa8, 0x28, 0x99, 0x51, 0x8c, 0x98, 0x1e, + 0xcf, 0xf4, 0x06, 0x40, 0x1c, 0xaf, 0xd1, 0x2a, 0xe4, 0x59, 0x78, 0x67, 0xc6, 0x59, 0x1d, 0xe7, + 0xa6, 0x06, 0x83, 0xcd, 0x70, 0xb0, 0xea, 0x3f, 0x2d, 0x00, 0xc4, 0x3b, 0x84, 0x3e, 0x81, 0x1c, + 0x8d, 0x03, 0x2c, 0x60, 0x5f, 0x9b, 0xb2, 0x9f, 0x34, 0x1c, 0x50, 0x06, 0xa2, 0xf6, 0xae, 0xd9, + 0x6f, 0x7b, 0x26, 0x37, 0x36, 0x43, 0x34, 0xd1, 0xfb, 0x50, 0x0a, 0xb0, 0x1b, 0x36, 0x6c, 0x33, + 0x64, 0x4b, 0xcc, 0xd6, 0x2b, 0xff, 0x35, 0xa8, 0x15, 0x09, 0x71, 0xd3, 0x0c, 0xb1, 0x11, 0xfd, + 0x42, 0x0f, 0x60, 0xae, 0x83, 0x6d, 0xc7, 0x0c, 0xaa, 0xb9, 0x2b, 0xd9, 0xdb, 0xe5, 0xb5, 0x8b, + 0x69, 0xe3, 0x6f, 0x13, 0x84, 0xc1, 0x81, 0xda, 0x55, 0x28, 0xef, 0x05, 0xd8, 0x17, 0xf3, 0x47, + 0x90, 0x6b, 0x7a, 0x76, 0x5f, 0x64, 0x00, 0xe4, 0xb7, 0xf6, 0x7d, 0xa8, 0x10, 0x88, 0x81, 0x4d, + 0x8b, 0x28, 0x1c, 0x2d, 0xc3, 0x5c, 0x68, 0xfa, 0x2d, 0x1c, 0xf2, 0x0d, 0xe7, 0x2d, 0x72, 0xe8, + 0xe0, 0x8e, 0xf7, 0x5b, 0x0e, 0xdf, 0x26, 0xd6, 0xd0, 0x6e, 0xc0, 0x02, 0xdd, 0x53, 0x1a, 0x73, + 0x68, 0x86, 0x1e, 0xa5, 0x19, 0x99, 0x38, 0xcd, 0xd0, 0x76, 0xa0, 0xb2, 0x8b, 0x43, 0x8e, 0xdc, + 0xf7, 0x46, 0xb6, 0x5e, 0x19, 0x3d, 0xab, 0x2e, 0x01, 0x98, 0x87, 0x66, 0x68, 0xfa, 0x0d, 0x8b, + 0xbb, 0x68, 0xc9, 0x28, 0x31, 0xca, 0x86, 0x63, 0x6b, 0xbf, 0x41, 0x5c, 0x31, 0x24, 0x33, 0x9f, + 0x55, 0xe0, 0xdd, 0x51, 0x81, 0xdc, 0xfa, 0x98, 0x50, 0xe2, 0xf3, 0xb1, 0xfc, 0x1b, 0x50, 0x5e, + 0xb7, 0x48, 0x7c, 0x6d, 0x63, 0xbb, 0x85, 0xa5, 0x5d, 0xc9, 0xc8, 0xbb, 0xa2, 0x6d, 0x41, 0x45, + 0x76, 0x1b, 0xf4, 0x28, 0x76, 0x3a, 0x85, 0x2a, 0xa9, 0x96, 0xa6, 0x24, 0x89, 0x25, 0x76, 0xb4, + 0x3d, 0x58, 0xd8, 0xf6, 0x5c, 0x27, 0xf4, 0x7c, 0x11, 0xed, 0x50, 0x1d, 0xf2, 0xf8, 0x10, 0xbb, + 0x21, 0xb7, 0xe8, 0xbb, 0x29, 0x16, 0xcd, 0x59, 0xe8, 0xd6, 0xae, 0x3e, 0x21, 0x60, 0x4e, 0x31, + 0x18, 0xab, 0xfe, 0xaf, 0x0a, 0xe4, 0xe8, 0x69, 0x34, 0x0f, 0xa5, 0x3d, 0xd7, 0xc6, 0xfb, 0x8e, + 0x8b, 0xc9, 0x79, 0x71, 0x0e, 0x16, 0x08, 0x59, 0x32, 0x0f, 0x55, 0x41, 0x4b, 0xa0, 0x0a, 0xa2, + 0x30, 0x08, 0x35, 0x43, 0x8e, 0x16, 0x42, 0x1d, 0x52, 0xb4, 0x9a, 0x15, 0x70, 0x59, 0xb5, 0x6a, + 0x4e, 0x48, 0x96, 0xd4, 0xa3, 0xe6, 0x05, 0x51, 0xda, 0x53, 0x75, 0x4e, 0xf0, 0xcb, 0x3b, 0xa8, + 0x16, 0xc4, 0x70, 0x43, 0x9b, 0xa1, 0xda, 0xfa, 0x3a, 0x94, 0x25, 0x28, 0x71, 0x2a, 0xae, 0x5f, + 0xae, 0x6e, 0xd1, 0x1c, 0x76, 0xb7, 0x52, 0xe4, 0x6e, 0xfa, 0xdf, 0xe5, 0x01, 0x76, 0xfb, 0x41, + 0x88, 0x3b, 0x64, 0x5e, 0x5a, 0x29, 0x0a, 0xab, 0xda, 0xb7, 0x51, 0xe1, 0xf0, 0x19, 0x14, 0xc5, + 0x0e, 0xf3, 0x8d, 0xbf, 0x96, 0xb2, 0xf1, 0xb1, 0x14, 0xa6, 0x4e, 0x23, 0x62, 0x42, 0x3f, 0x84, + 0x52, 0xa4, 0x6e, 0x1e, 0x7b, 0x6f, 0xa7, 0x99, 0x81, 0x24, 0x62, 0x5b, 0xd0, 0x8d, 0x98, 0x55, + 0xfb, 0x0f, 0x05, 0x4a, 0x51, 0x07, 0xfa, 0x0c, 0x0a, 0x5d, 0xdf, 0xb3, 0x70, 0x10, 0xf0, 0x59, + 0xdd, 0x98, 0x3c, 0xab, 0x1d, 0x06, 0x36, 0x04, 0x17, 0xf1, 0xe0, 0x23, 0xd3, 0xa7, 0xc7, 0x41, + 0x96, 0x78, 0x30, 0x6d, 0xa0, 0x4f, 0xa0, 0x2a, 0x04, 0x34, 0x1c, 0xb7, 0x11, 0x98, 0x1d, 0xdc, + 0x10, 0xe3, 0x64, 0x69, 0x1d, 0x72, 0x5e, 0xf4, 0x6f, 0xb9, 0xbb, 0x66, 0x07, 0x73, 0xb9, 0xe8, + 0x11, 0x64, 0xec, 0x26, 0xcf, 0x85, 0xaf, 0x4e, 0x59, 0xde, 0x66, 0xbd, 0x3e, 0x77, 0x3c, 0xa8, + 0x65, 0x36, 0xeb, 0x46, 0xc6, 0x6e, 0x6a, 0x7f, 0x93, 0x81, 0xcc, 0x66, 0x9d, 0xe4, 0x02, 0x3c, + 0xdc, 0xb3, 0x25, 0x65, 0x8d, 0xa8, 0x4d, 0xfa, 0x78, 0x16, 0xc8, 0x8e, 0xaf, 0xac, 0x11, 0xb5, + 0xd1, 0x75, 0x98, 0xb7, 0xa4, 0x3b, 0x01, 0x36, 0xcf, 0xac, 0x91, 0x24, 0x22, 0x9d, 0x17, 0x73, + 0xcc, 0x8c, 0x03, 0x3a, 0xd3, 0xac, 0x91, 0xa0, 0xb1, 0xe3, 0xb8, 0xd3, 0xc4, 0x7e, 0x50, 0xcd, + 0xd3, 0x6e, 0xd1, 0xa4, 0xc6, 0x85, 0x0f, 0x1d, 0x0b, 0x07, 0xd5, 0x39, 0xd6, 0xc3, 0x9b, 0xe8, + 0x06, 0x9c, 0x0d, 0xb0, 0x4f, 0x7e, 0x37, 0x42, 0xef, 0x00, 0xbb, 0x41, 0xb5, 0xc0, 0x86, 0xe7, + 0xd4, 0x57, 0x94, 0x88, 0xea, 0x70, 0x49, 0x9e, 0x4f, 0xc3, 0xc7, 0xdd, 0xb6, 0x63, 0xb1, 0xdf, + 0x8e, 0xbb, 0xef, 0x55, 0x8b, 0x94, 0x6b, 0x45, 0x06, 0x19, 0x31, 0x86, 0x6c, 0x9b, 0xfe, 0x55, + 0xf2, 0x32, 0xe5, 0x57, 0x3c, 0xc7, 0x3d, 0x6d, 0x41, 0x17, 0x1f, 0xe7, 0x59, 0x28, 0xf0, 0x73, + 0x17, 0x3d, 0x04, 0x90, 0xd2, 0x6a, 0x76, 0x8d, 0x72, 0xfe, 0xcd, 0xa0, 0xb6, 0xd8, 0xf2, 0xfc, + 0xce, 0x63, 0xbd, 0xeb, 0x3b, 0x1d, 0xd3, 0xef, 0x3f, 0xc3, 0x7d, 0xdd, 0x28, 0x75, 0xe5, 0x44, + 0x7b, 0xda, 0x6d, 0xc5, 0xe7, 0x89, 0x98, 0x5b, 0xa0, 0x82, 0xdf, 0x4f, 0xc4, 0xdc, 0x37, 0x83, + 0x5a, 0x95, 0x8d, 0x62, 0x79, 0xed, 0x5e, 0xc7, 0x7d, 0x1c, 0xe3, 0x75, 0x29, 0x1e, 0x47, 0x6b, + 0xcd, 0x4a, 0x6b, 0x7d, 0x3d, 0xa2, 0x89, 0x3c, 0x8d, 0xb9, 0x57, 0x52, 0xad, 0x51, 0xd2, 0x4e, + 0xbd, 0xf6, 0x66, 0x50, 0x5b, 0x61, 0xc3, 0xee, 0x7b, 0x3e, 0x76, 0x5a, 0xee, 0x33, 0xdc, 0x7f, + 0x1c, 0xa5, 0x21, 0xfa, 0xb0, 0x32, 0x6d, 0xd0, 0x85, 0xfe, 0x70, 0xc3, 0xc5, 0x47, 0xac, 0x8e, + 0x0c, 0x1a, 0x66, 0x2f, 0xf4, 0x3a, 0x66, 0xe8, 0x58, 0x66, 0xbb, 0xdd, 0xa7, 0x86, 0x52, 0xac, + 0x5f, 0x78, 0x33, 0xa8, 0x9d, 0x63, 0xb2, 0x6d, 0xbc, 0x6f, 0xf6, 0xda, 0xe1, 0xe3, 0xd0, 0xef, + 0x61, 0xdd, 0xa8, 0x45, 0x22, 0x5e, 0xe0, 0x23, 0x1a, 0x30, 0x83, 0x75, 0x99, 0x5f, 0xff, 0xdb, + 0x0c, 0x39, 0x26, 0xe3, 0x71, 0x87, 0x12, 0x26, 0x45, 0x3a, 0xb2, 0xd2, 0x12, 0xa6, 0x4f, 0xa1, + 0x48, 0xb7, 0xa1, 0x11, 0x1d, 0x6f, 0x57, 0x48, 0x62, 0x48, 0x45, 0xd1, 0x8d, 0x4e, 0x51, 0x67, + 0x81, 0x72, 0x6c, 0xd9, 0xe8, 0x29, 0x54, 0xa2, 0xbd, 0x24, 0x29, 0x0e, 0xbb, 0xcb, 0xb8, 0x7e, + 0x3c, 0xa8, 0x95, 0xc5, 0x94, 0xfa, 0x5d, 0x9c, 0x2e, 0xa4, 0x1c, 0xc4, 0x08, 0xb4, 0x09, 0xc8, + 0xec, 0x85, 0xaf, 0xb1, 0x1b, 0x0a, 0x6b, 0xef, 0xf9, 0x6d, 0xea, 0x7c, 0xa5, 0xfa, 0xf9, 0xe3, + 0x41, 0x6d, 0x71, 0x3d, 0xd1, 0xbb, 0x67, 0x3c, 0x37, 0x16, 0x93, 0x0c, 0x7b, 0x7e, 0x9b, 0x98, + 0x31, 0xfe, 0xa6, 0xeb, 0xf8, 0x94, 0xc0, 0x7d, 0x53, 0xa2, 0xe8, 0x7f, 0x9d, 0x07, 0x76, 0x25, + 0xc3, 0xb3, 0x96, 0x47, 0x90, 0xb5, 0x78, 0x59, 0x52, 0xaa, 0xdf, 0x3a, 0x1e, 0xd4, 0xb2, 0xcc, + 0xb6, 0xde, 0x1b, 0x9e, 0xed, 0xa7, 0xdc, 0xcc, 0xa8, 0x7d, 0x11, 0x1e, 0xb4, 0xc5, 0x93, 0xba, + 0xcc, 0xcc, 0x49, 0x5d, 0x5d, 0x7d, 0x33, 0xa8, 0x55, 0x98, 0x64, 0xc7, 0xb5, 0xf1, 0x37, 0x3a, + 0x4f, 0xf3, 0xee, 0xc0, 0x22, 0x8b, 0x1f, 0x72, 0x95, 0x4a, 0xad, 0xde, 0x58, 0x60, 0x1d, 0x71, + 0x99, 0x7a, 0x07, 0x16, 0x59, 0x44, 0x91, 0xb1, 0x15, 0x86, 0x65, 0x1d, 0x31, 0x76, 0x8d, 0x64, + 0x7e, 0x84, 0x9d, 0x06, 0x8d, 0xf2, 0x9a, 0x96, 0x9e, 0xf9, 0x11, 0x84, 0xc1, 0x91, 0xe8, 0x73, + 0xb8, 0x90, 0x88, 0x3f, 0xd2, 0x28, 0x4c, 0xb7, 0xa3, 0x8b, 0x38, 0x2f, 0x33, 0xc4, 0xa3, 0x6f, + 0x42, 0x45, 0xee, 0xe0, 0x21, 0x3f, 0xd5, 0xc9, 0xe4, 0x68, 0x65, 0x24, 0xb8, 0xe4, 0x33, 0x39, + 0x9f, 0x4c, 0x81, 0xcf, 0x41, 0xde, 0x09, 0x1a, 0x1d, 0xcc, 0xfc, 0xc7, 0xc8, 0x39, 0xc1, 0x36, + 0x46, 0x2b, 0x72, 0x5e, 0x5c, 0x62, 0x07, 0x40, 0x94, 0x09, 0xeb, 0x50, 0x31, 0xe3, 0x44, 0x82, + 0xdd, 0x5a, 0x14, 0x8d, 0x04, 0x0d, 0xbd, 0x00, 0x60, 0x39, 0x1a, 0x0d, 0x3d, 0xf3, 0x74, 0xc9, + 0xf7, 0x89, 0xef, 0xbc, 0xa2, 0x54, 0x66, 0x1e, 0x97, 0xa5, 0xf5, 0x0b, 0xcb, 0x88, 0xb9, 0x74, + 0xa3, 0xc4, 0x1a, 0x24, 0x00, 0xc5, 0xd9, 0xf7, 0xc2, 0x8c, 0xd9, 0xb7, 0xfe, 0x26, 0x0b, 0x79, + 0x4a, 0x39, 0x8d, 0x79, 0xae, 0x40, 0xa9, 0xe3, 0x74, 0xb8, 0x57, 0xb2, 0x10, 0x5b, 0x24, 0x04, + 0xea, 0x6c, 0x1a, 0x14, 0xf7, 0x9d, 0x36, 0x96, 0xea, 0xa3, 0xa8, 0x3d, 0x12, 0x9e, 0x73, 0xa3, + 0xe1, 0xb9, 0x09, 0x0b, 0xd2, 0x71, 0x48, 0x37, 0xca, 0xa6, 0x53, 0x7c, 0x74, 0x3c, 0xa8, 0x9d, + 0x95, 0xfc, 0x8b, 0xcd, 0xf6, 0x5a, 0xca, 0x6e, 0x0d, 0xf1, 0xeb, 0xc6, 0x59, 0x89, 0x42, 0xf6, + 0xed, 0x23, 0xc8, 0x07, 0x21, 0x51, 0x62, 0x8b, 0xfa, 0x57, 0x6d, 0xec, 0xb6, 0xad, 0xee, 0x12, + 0x98, 0xc1, 0xd0, 0xfa, 0x3f, 0x2b, 0x90, 0xa7, 0x04, 0xa4, 0x42, 0x85, 0xfe, 0xe0, 0xd7, 0x1d, + 0xea, 0x19, 0x54, 0x85, 0x25, 0x4a, 0x79, 0x81, 0x0f, 0xb1, 0xbf, 0xe9, 0x1d, 0xb9, 0xc4, 0x8c, + 0xb0, 0xad, 0x2a, 0xe8, 0x3d, 0xa8, 0xd2, 0x9e, 0x1d, 0xd3, 0x0f, 0x1d, 0x12, 0x53, 0xa5, 0x5e, + 0x7a, 0xf1, 0x41, 0x7b, 0x25, 0x62, 0x36, 0x12, 0xbf, 0xe5, 0x6e, 0x98, 0xd6, 0x6b, 0xac, 0xe6, + 0xd0, 0x32, 0x20, 0x4e, 0x39, 0x34, 0xdb, 0x8e, 0xbd, 0xe1, 0xf7, 0xbb, 0x21, 0x49, 0x61, 0x17, + 0x61, 0x9e, 0x09, 0xf7, 0x71, 0xd7, 0xf4, 0xb1, 0xad, 0xda, 0x11, 0x69, 0x3d, 0x0c, 0x09, 0xb3, + 0xad, 0x62, 0xfd, 0x4f, 0xf2, 0x50, 0xe0, 0x97, 0x28, 0x27, 0x3c, 0x57, 0x3f, 0x1e, 0xef, 0xb9, + 0x4c, 0xff, 0x33, 0xfa, 0x69, 0xf6, 0x44, 0x7e, 0xfa, 0x89, 0xd0, 0x57, 0x8e, 0xea, 0xeb, 0xea, + 0x18, 0x76, 0xb2, 0xbe, 0x84, 0xc6, 0x46, 0xec, 0x2d, 0x3f, 0x2d, 0x1d, 0x28, 0x9d, 0x22, 0x1d, + 0xb8, 0x0a, 0x15, 0xcb, 0xc7, 0x66, 0x88, 0x6d, 0x16, 0x21, 0x58, 0x0a, 0x56, 0xe6, 0x34, 0x1a, + 0x24, 0x12, 0x11, 0xa4, 0x38, 0x14, 0x41, 0x7e, 0x2c, 0xa7, 0x77, 0xd9, 0x71, 0x21, 0x75, 0x93, + 0x42, 0xea, 0x37, 0xde, 0x0c, 0x6a, 0x57, 0x47, 0xb2, 0x85, 0xed, 0x64, 0x40, 0xd7, 0xe3, 0x0c, + 0x71, 0x05, 0x4a, 0x24, 0xc3, 0x63, 0x23, 0x03, 0x1b, 0x99, 0x10, 0xc8, 0xc8, 0xba, 0x27, 0xec, + 0x7a, 0xb4, 0x1e, 0xdb, 0x72, 0x2d, 0xaf, 0xe3, 0xb8, 0x2d, 0x9e, 0xdf, 0xa9, 0x0a, 0x5a, 0x81, + 0x0b, 0x2f, 0x7b, 0x61, 0xcb, 0x8b, 0x89, 0x4f, 0xdc, 0xaf, 0x7b, 0xb8, 0x47, 0xcd, 0xf9, 0x02, + 0x9c, 0x1b, 0xea, 0xdc, 0xc5, 0x6e, 0xa8, 0x66, 0x51, 0x05, 0x8a, 0xeb, 0x96, 0x85, 0xbb, 0x21, + 0xb6, 0xd5, 0x9c, 0xfe, 0x57, 0x45, 0xa8, 0xc8, 0xfa, 0x3e, 0xa1, 0x55, 0x3e, 0x4a, 0x1c, 0x93, + 0x37, 0xa6, 0x59, 0x95, 0x7c, 0xfb, 0x71, 0x01, 0x0a, 0x4e, 0xd0, 0xf0, 0xba, 0xd8, 0xe5, 0x15, + 0xc5, 0x9c, 0x13, 0xbc, 0xec, 0x62, 0x77, 0x96, 0x10, 0x95, 0x34, 0x99, 0xc5, 0x77, 0x90, 0x41, + 0xe6, 0xa5, 0x0c, 0xf2, 0x2a, 0x54, 0x7a, 0xae, 0x8f, 0x4d, 0xbb, 0x41, 0x93, 0x28, 0x7a, 0x02, + 0xe5, 0x8d, 0x32, 0xa3, 0x6d, 0xd0, 0xdc, 0xb8, 0x06, 0xe5, 0xb6, 0x19, 0x84, 0x8d, 0x5e, 0x57, + 0x32, 0x34, 0x20, 0xa4, 0x3d, 0x4a, 0x41, 0x77, 0xe3, 0xfb, 0x70, 0x69, 0x5b, 0x8b, 0x74, 0x14, + 0x35, 0x71, 0x91, 0x4e, 0xb6, 0xf1, 0x23, 0x28, 0x70, 0x1a, 0xb5, 0xff, 0x31, 0x77, 0xa8, 0xe2, + 0x16, 0x56, 0x60, 0xd1, 0xc3, 0xb8, 0x50, 0x81, 0xf1, 0xf6, 0xca, 0x53, 0x80, 0xa8, 0x88, 0x79, + 0x04, 0x17, 0x45, 0xfe, 0x38, 0x9a, 0x97, 0x94, 0xe9, 0x0c, 0x97, 0x39, 0x60, 0xc8, 0x9a, 0xd1, + 0x47, 0x70, 0xa1, 0xed, 0x59, 0x66, 0xbb, 0x31, 0x2e, 0x49, 0x59, 0xa2, 0xdd, 0x9b, 0x43, 0x99, + 0xca, 0xb0, 0x5f, 0xce, 0x8f, 0xfa, 0x65, 0x13, 0x16, 0x49, 0x22, 0xdc, 0x6f, 0xf0, 0x8b, 0x0f, + 0xaa, 0xd8, 0xb3, 0x54, 0xb1, 0x1f, 0x1f, 0x0f, 0x6a, 0x0b, 0xf2, 0x6d, 0x00, 0x53, 0x6f, 0x2d, + 0xa1, 0xde, 0x11, 0x66, 0xdd, 0x58, 0xf0, 0x65, 0x1e, 0xc7, 0x46, 0x5f, 0xc0, 0x7c, 0x02, 0x56, + 0x5d, 0xa0, 0x7b, 0x9d, 0x7a, 0xf8, 0x48, 0xc7, 0x5c, 0x5d, 0x3d, 0x1e, 0xd4, 0x12, 0x17, 0x3a, + 0x46, 0x45, 0x16, 0x8d, 0xfe, 0x40, 0x01, 0x75, 0xa4, 0x90, 0x53, 0xa9, 0x42, 0xee, 0x4f, 0x8d, + 0xb3, 0xc9, 0xe2, 0xae, 0xfe, 0xc1, 0x9b, 0x41, 0xed, 0xd6, 0x48, 0x54, 0xd9, 0x48, 0x0b, 0xed, + 0x7c, 0x85, 0x72, 0x69, 0xf8, 0x3c, 0xfd, 0x56, 0x67, 0x01, 0xca, 0xbc, 0x36, 0x20, 0xbd, 0xec, + 0xf6, 0x9f, 0x1b, 0x13, 0x25, 0xd0, 0x43, 0x70, 0xbb, 0xd7, 0x0e, 0x1d, 0xa6, 0x70, 0x4a, 0xcc, + 0xea, 0xff, 0x98, 0x81, 0x95, 0x09, 0x73, 0x3d, 0x4d, 0xfe, 0x72, 0xd2, 0xd3, 0x2c, 0x35, 0x97, + 0xce, 0xa6, 0xe7, 0xd2, 0xef, 0xa6, 0xe6, 0xb8, 0x07, 0x48, 0xd6, 0x2d, 0x29, 0x6a, 0xb0, 0xcf, + 0xc3, 0xc5, 0xa2, 0xd4, 0xb3, 0x4b, 0x3b, 0xf4, 0x9f, 0x65, 0x61, 0x8e, 0x6d, 0xe2, 0xff, 0x55, + 0xfd, 0x3c, 0x77, 0x8a, 0xe8, 0xb7, 0x3d, 0xad, 0x1c, 0x18, 0x33, 0xdf, 0x31, 0xda, 0x49, 0x1c, + 0x71, 0x85, 0xe4, 0x11, 0xf7, 0x8e, 0x0a, 0x86, 0x87, 0xf1, 0x11, 0x9d, 0x9f, 0x76, 0x44, 0x47, + 0x67, 0xaf, 0xfe, 0xdb, 0x30, 0xc7, 0x48, 0x27, 0x54, 0xca, 0xf7, 0xd3, 0xcc, 0x2e, 0x33, 0xa6, + 0x60, 0x1a, 0x36, 0x44, 0xfd, 0x21, 0x2c, 0x70, 0x6f, 0xdb, 0x96, 0x3e, 0x6a, 0x4d, 0xb9, 0x99, + 0xd6, 0x7f, 0x3e, 0x0f, 0xe5, 0xdd, 0xd0, 0xc7, 0x66, 0x87, 0x5e, 0xe0, 0xa2, 0x5f, 0x4a, 0x7c, + 0x66, 0xb8, 0x9e, 0x7a, 0x9b, 0x11, 0xc3, 0x67, 0xfb, 0xce, 0x70, 0x1e, 0xe6, 0x9c, 0xa0, 0xe1, + 0xe2, 0x23, 0x7e, 0x04, 0xe7, 0x9d, 0xe0, 0x05, 0x3e, 0xd2, 0x7e, 0x4c, 0xbf, 0x1a, 0x46, 0x9b, + 0xce, 0x8e, 0x34, 0x7b, 0x44, 0x83, 0xca, 0x49, 0x34, 0xa8, 0x3d, 0x4c, 0x0a, 0xdf, 0xc4, 0x6d, + 0x4c, 0x84, 0x5f, 0x1a, 0x55, 0x8c, 0xa4, 0x01, 0xed, 0x4b, 0x40, 0x52, 0x48, 0x16, 0x33, 0x5a, + 0x87, 0xb2, 0x54, 0x58, 0xf0, 0x09, 0x4d, 0x8b, 0xe7, 0x86, 0xcc, 0xa3, 0xdd, 0x4f, 0x08, 0x16, + 0xb3, 0xb9, 0x28, 0x87, 0xb6, 0x02, 0x0f, 0x6d, 0x34, 0x74, 0x69, 0x4f, 0xe1, 0x2c, 0xd7, 0xa6, + 0x98, 0x85, 0x74, 0x7a, 0x2b, 0xb3, 0x9f, 0xde, 0x44, 0x10, 0x8f, 0xca, 0x92, 0x20, 0x7e, 0xf0, + 0x4e, 0x12, 0xc4, 0x99, 0x0c, 0x81, 0xd5, 0x36, 0x60, 0x9e, 0x85, 0x1c, 0x21, 0x27, 0xbe, 0x19, + 0x50, 0x66, 0xbd, 0x19, 0x20, 0x42, 0x98, 0x8b, 0x48, 0x42, 0x98, 0xfb, 0x4c, 0x12, 0xc2, 0x1d, + 0x8d, 0x23, 0xb5, 0x32, 0x94, 0x9e, 0x3b, 0x24, 0x1d, 0xb5, 0xb1, 0xad, 0x7d, 0x06, 0x15, 0x5a, + 0xc2, 0x09, 0x81, 0xf7, 0x21, 0x4f, 0x4b, 0x60, 0x2e, 0x6f, 0x42, 0xa9, 0xcc, 0x70, 0xda, 0xef, + 0xe7, 0xa1, 0xf8, 0xc2, 0x0b, 0x9d, 0x7d, 0x87, 0xaa, 0x5a, 0x36, 0xff, 0x7b, 0xd3, 0xcc, 0x5f, + 0xf0, 0xc9, 0x7e, 0xb0, 0x04, 0xf9, 0xd0, 0x09, 0xdb, 0xa2, 0x28, 0x66, 0x8d, 0xe8, 0xf3, 0x57, + 0x2e, 0xfe, 0xfc, 0x35, 0xfe, 0x5a, 0x42, 0x2b, 0x40, 0xbe, 0x6e, 0x06, 0x8e, 0xa5, 0xfd, 0xbb, + 0x02, 0x0b, 0xfc, 0xfa, 0xc7, 0xc0, 0x16, 0x76, 0x0e, 0xdf, 0x89, 0x39, 0x8e, 0xf8, 0x58, 0xe6, + 0x44, 0x51, 0x52, 0xb2, 0xc8, 0xec, 0x5b, 0x58, 0xe4, 0x33, 0x40, 0xc9, 0x2f, 0xfd, 0xa4, 0x74, + 0x38, 0xa9, 0xb0, 0x97, 0xb0, 0x9c, 0x14, 0x16, 0x6d, 0xd3, 0xc9, 0x04, 0xea, 0x47, 0x3c, 0xb9, + 0x29, 0x43, 0x21, 0xae, 0xfa, 0xe7, 0xa1, 0x44, 0x2f, 0xdf, 0x88, 0x4e, 0x54, 0x25, 0xfa, 0x4a, + 0x94, 0x54, 0x8c, 0x9a, 0x41, 0x1a, 0x2c, 0x93, 0x8e, 0xd1, 0xe5, 0xa9, 0x59, 0x74, 0x19, 0xb4, + 0xd1, 0xbe, 0x88, 0x37, 0xa7, 0xff, 0x65, 0x26, 0x3d, 0xad, 0x5a, 0x84, 0x79, 0x42, 0x8e, 0x2c, + 0x9e, 0x95, 0x66, 0x5c, 0xd4, 0x70, 0xf4, 0x54, 0x33, 0x69, 0x9d, 0x3c, 0xde, 0xa8, 0x59, 0x31, + 0xc1, 0xd1, 0x20, 0xa7, 0xe6, 0x52, 0xfa, 0x04, 0x5f, 0x1e, 0x2d, 0x03, 0x92, 0x26, 0x2f, 0x78, + 0xe6, 0x04, 0x3d, 0x19, 0x61, 0xd4, 0x02, 0x3a, 0x0f, 0x8b, 0x6c, 0x87, 0xa4, 0x80, 0xa1, 0x16, + 0x05, 0x39, 0x11, 0x02, 0xd4, 0x12, 0x52, 0xa1, 0x42, 0xc8, 0xc2, 0x9b, 0x54, 0x10, 0x5f, 0xe7, + 0x64, 0xcf, 0x56, 0xcb, 0xfa, 0x9f, 0x2b, 0xd4, 0x74, 0xa2, 0x75, 0x31, 0x57, 0x1c, 0x7a, 0x4a, + 0x19, 0x47, 0xb6, 0x9c, 0xc1, 0x1a, 0xc4, 0xf9, 0xba, 0xe2, 0xd9, 0x43, 0xce, 0xa0, 0xbf, 0xb5, + 0x6d, 0xf1, 0xc9, 0xed, 0x9d, 0x9c, 0x37, 0x23, 0x53, 0xdb, 0xa0, 0x55, 0x87, 0xf6, 0x55, 0x3c, + 0xb5, 0x99, 0x3e, 0x13, 0x8b, 0x72, 0x2e, 0x68, 0x84, 0x5e, 0xc3, 0xa1, 0x8f, 0x69, 0xf8, 0x27, + 0x33, 0x51, 0xce, 0x05, 0xaf, 0x3c, 0xf6, 0xc8, 0x46, 0xbb, 0x29, 0x56, 0x30, 0xf9, 0x50, 0xd3, + 0xbf, 0x04, 0xe0, 0xfa, 0x79, 0x8a, 0x43, 0xf9, 0xb3, 0xe3, 0x2f, 0x0b, 0x01, 0x27, 0x3b, 0x11, + 0xf4, 0xdf, 0x55, 0xa0, 0x4c, 0xe3, 0xe0, 0x69, 0xf4, 0x20, 0x4d, 0x22, 0xf1, 0xc1, 0xb9, 0x36, + 0x25, 0xf6, 0x8a, 0x6f, 0xcc, 0xdf, 0x2a, 0x30, 0x9f, 0x30, 0x3f, 0xed, 0xf0, 0xad, 0xf6, 0xfc, + 0xf3, 0x94, 0x4f, 0xf3, 0x27, 0x4a, 0x73, 0xe3, 0xcf, 0x5b, 0xbf, 0x1a, 0x9d, 0xdd, 0x62, 0xa7, + 0xdf, 0xd5, 0x87, 0xb3, 0x3a, 0xcc, 0xc7, 0x2f, 0xdc, 0x70, 0x37, 0xd4, 0x6e, 0xc7, 0x82, 0xa7, + 0xa4, 0x36, 0x91, 0x8c, 0x7f, 0x53, 0xa0, 0x28, 0x7c, 0x5c, 0xfb, 0x27, 0xe9, 0x8d, 0xd5, 0xff, + 0xc2, 0x0b, 0x93, 0x8f, 0xa7, 0x64, 0xfe, 0xe3, 0x52, 0xfc, 0x4b, 0x00, 0xf4, 0x70, 0x26, 0x7b, + 0xcc, 0x9e, 0x9c, 0x94, 0x8c, 0x12, 0xa5, 0x6c, 0x38, 0x76, 0x90, 0x78, 0xaf, 0x54, 0x33, 0x92, + 0xd5, 0x11, 0x49, 0x14, 0x70, 0xcb, 0x09, 0x42, 0xcc, 0x1e, 0x26, 0x68, 0x4e, 0xe2, 0xf9, 0x52, + 0xf4, 0x95, 0x4a, 0x7a, 0xb0, 0xcd, 0xbf, 0x52, 0xc5, 0x1f, 0xa4, 0x4e, 0x58, 0x37, 0xc6, 0xf3, + 0xfa, 0x1c, 0xaa, 0x89, 0x69, 0x85, 0xeb, 0xbd, 0xd0, 0x7b, 0xe2, 0x9a, 0xcd, 0x36, 0xd6, 0xae, + 0xc5, 0xf3, 0xa9, 0x42, 0x01, 0x53, 0xa2, 0xcd, 0x9f, 0xdd, 0x8a, 0x66, 0x2c, 0xa9, 0x05, 0xe5, + 0xba, 0xe9, 0xba, 0xd8, 0xff, 0x51, 0xcf, 0x0b, 0xb1, 0x76, 0x35, 0x66, 0x5e, 0x86, 0x39, 0xdf, + 0x74, 0x6d, 0xaf, 0xc3, 0x79, 0x79, 0x4b, 0xfb, 0x48, 0x38, 0xd4, 0x12, 0xe4, 0xbf, 0x26, 0x4c, + 0xdc, 0x16, 0x58, 0x83, 0xb0, 0x91, 0xf2, 0xd3, 0xf3, 0xc5, 0x6b, 0x12, 0xd6, 0xd2, 0x7f, 0x00, + 0xe5, 0xa7, 0xec, 0xd5, 0x04, 0xf1, 0x14, 0x39, 0x4c, 0x5c, 0x13, 0x02, 0x35, 0x28, 0xf6, 0x78, + 0x3f, 0x97, 0x19, 0xb5, 0xf5, 0x6d, 0x92, 0xe0, 0xb2, 0xd7, 0xc5, 0x4f, 0xbe, 0xe9, 0x7a, 0x7e, + 0xb8, 0x69, 0x86, 0xa6, 0x2c, 0xe5, 0xae, 0x90, 0x72, 0x0d, 0xe6, 0x31, 0x45, 0xb0, 0x7b, 0x1a, + 0x93, 0x3f, 0xdb, 0xaa, 0x08, 0x22, 0x61, 0xd4, 0xff, 0x30, 0x03, 0xe8, 0x39, 0xbd, 0xe4, 0x31, + 0x43, 0xb3, 0x69, 0x06, 0x98, 0xdd, 0x5b, 0x4e, 0xb6, 0xf1, 0x59, 0xaa, 0xda, 0x1b, 0x70, 0x36, + 0xfe, 0x9a, 0xba, 0xdf, 0x36, 0x5b, 0xbc, 0x26, 0x99, 0x8f, 0xa8, 0x3f, 0x6c, 0x9b, 0x2d, 0xb4, + 0x0f, 0x17, 0xd9, 0x15, 0x54, 0xe2, 0xbb, 0x7e, 0x43, 0xdc, 0x4e, 0x93, 0x92, 0xf0, 0x4e, 0x9a, + 0x83, 0xd0, 0x39, 0x27, 0x8f, 0x28, 0x33, 0xc4, 0x06, 0xbb, 0xcf, 0x92, 0xe9, 0xc1, 0xae, 0xb8, + 0xb8, 0x16, 0xb7, 0x64, 0xd2, 0x05, 0x61, 0x99, 0xd3, 0x9e, 0x3b, 0xee, 0x81, 0xfe, 0x0f, 0x0a, + 0x2c, 0xa7, 0x8b, 0x9d, 0x61, 0x3b, 0x12, 0x37, 0x8c, 0x99, 0xd1, 0x1b, 0xc6, 0xb1, 0xd7, 0xa3, + 0xe2, 0xca, 0x35, 0xf7, 0xd6, 0x57, 0xae, 0xfa, 0x4f, 0x15, 0x9e, 0x92, 0xf3, 0x8f, 0x15, 0xda, + 0x6f, 0x26, 0xce, 0x85, 0x66, 0xdb, 0xb3, 0xf8, 0xeb, 0x41, 0x83, 0x35, 0xd0, 0x3d, 0xc8, 0xd1, + 0xdb, 0xac, 0xcc, 0xb4, 0x94, 0x9d, 0xc2, 0x90, 0x0a, 0xd9, 0x9e, 0xef, 0xf0, 0x08, 0x42, 0x7e, + 0x6a, 0x17, 0x85, 0x71, 0xa9, 0x52, 0x45, 0x45, 0x0b, 0x29, 0xfd, 0x27, 0xa4, 0x6c, 0x21, 0xbc, + 0x38, 0xf4, 0x1d, 0x7c, 0x88, 0xb5, 0x95, 0x78, 0x36, 0x23, 0x68, 0xed, 0xb9, 0xe4, 0x3c, 0xa7, + 0x9e, 0xe8, 0xda, 0x2f, 0xaa, 0xa0, 0x46, 0x8f, 0x68, 0x78, 0x70, 0x42, 0xbf, 0xa7, 0x8c, 0xff, + 0x37, 0x0d, 0xf4, 0x30, 0x3d, 0x8d, 0x4f, 0x47, 0xaf, 0x0a, 0xdf, 0x5a, 0x7b, 0x4b, 0x2e, 0xb2, + 0xc0, 0x5e, 0xea, 0x7f, 0x45, 0xa0, 0xd4, 0xab, 0xc4, 0x14, 0x60, 0x34, 0xf6, 0xbd, 0xd9, 0x19, + 0xc8, 0xb0, 0xbf, 0xa3, 0x8c, 0xfd, 0x77, 0x04, 0xf4, 0xe1, 0x98, 0xda, 0x2f, 0x0d, 0x1c, 0x8d, + 0xff, 0xe0, 0xed, 0x98, 0xc8, 0x1c, 0xac, 0xa1, 0x7f, 0x54, 0x40, 0xef, 0xa7, 0xc9, 0x48, 0x40, + 0xa2, 0xe1, 0x6e, 0xcd, 0x02, 0x25, 0x83, 0xf8, 0x69, 0x6f, 0x9a, 0xd1, 0x6a, 0xfa, 0xf3, 0x90, + 0x61, 0x5c, 0x34, 0xdc, 0xdd, 0x99, 0xf1, 0x64, 0xcc, 0x5f, 0x4f, 0xbc, 0x11, 0x46, 0xb7, 0xc6, + 0x31, 0xc7, 0xaf, 0x6e, 0xd9, 0x28, 0x37, 0xa6, 0x03, 0x89, 0xf8, 0xf6, 0xe8, 0xe3, 0x60, 0x34, + 0x76, 0x82, 0x32, 0x2a, 0x1a, 0xe8, 0xce, 0x8c, 0x68, 0x32, 0xda, 0x8f, 0xa2, 0x57, 0xd6, 0xe8, + 0xda, 0x38, 0xb6, 0x75, 0x2b, 0xd6, 0xcc, 0xd5, 0xc9, 0x20, 0x22, 0xf2, 0x2b, 0xf9, 0x01, 0x1e, + 0xba, 0x39, 0xe5, 0xe1, 0x98, 0x10, 0x7c, 0x7d, 0x2a, 0x8e, 0xc8, 0xfe, 0x22, 0xfe, 0xdf, 0x2e, + 0x94, 0xca, 0x21, 0x7a, 0x23, 0xb9, 0xfa, 0x14, 0x54, 0xb7, 0xdd, 0xff, 0x9e, 0x82, 0xc2, 0xb4, + 0x92, 0x27, 0xdd, 0x8e, 0x46, 0x71, 0x93, 0xed, 0x28, 0x15, 0xcf, 0x46, 0x6d, 0x24, 0x32, 0xfb, + 0x74, 0x4b, 0x92, 0x00, 0x93, 0x2d, 0x29, 0x09, 0x64, 0x03, 0xf8, 0x69, 0xe5, 0xd2, 0xf4, 0x65, + 0x31, 0xdc, 0xec, 0xcb, 0x8a, 0xf0, 0xdc, 0x7e, 0x87, 0x9f, 0xb4, 0xa1, 0xa9, 0x12, 0x08, 0x6a, + 0xb2, 0xfd, 0xa6, 0xa0, 0xb9, 0xb1, 0xc5, 0x65, 0x57, 0xba, 0xb1, 0xc5, 0xfd, 0x93, 0x8d, 0x2d, + 0x81, 0xe3, 0x11, 0x2c, 0x51, 0xf3, 0xa4, 0x47, 0xb0, 0x04, 0x64, 0x72, 0x04, 0x1b, 0x86, 0x92, + 0x41, 0xf6, 0x87, 0xcb, 0x18, 0x74, 0x67, 0xd2, 0x0d, 0xca, 0x50, 0xe4, 0xba, 0x3d, 0x13, 0x96, + 0x2f, 0x26, 0x51, 0xd4, 0xa4, 0x2f, 0x26, 0x01, 0x99, 0xbc, 0x98, 0x61, 0x28, 0x19, 0xe4, 0x55, + 0x5c, 0xf4, 0xa4, 0xbb, 0xa7, 0xe8, 0x9d, 0xec, 0x9e, 0x12, 0x2a, 0xc5, 0xa2, 0x68, 0xe6, 0x34, + 0xd5, 0xa2, 0x08, 0x6a, 0x76, 0x8b, 0xe2, 0x68, 0x32, 0x9a, 0x97, 0xf2, 0xff, 0xa8, 0xe8, 0xde, + 0x54, 0x17, 0x20, 0xb0, 0x68, 0xbc, 0x0f, 0x66, 0x85, 0xf3, 0x01, 0x79, 0xd6, 0x12, 0xd0, 0x1a, + 0xe9, 0xb9, 0x13, 0x84, 0x28, 0xed, 0x25, 0xf8, 0x08, 0x6a, 0x64, 0x7d, 0xd3, 0xd0, 0x2c, 0x2a, + 0xfc, 0xc5, 0xf4, 0x7a, 0x0e, 0x7d, 0x3a, 0xee, 0x55, 0xfb, 0x04, 0xa6, 0x68, 0x3a, 0x8f, 0x4e, + 0xc6, 0x4c, 0x36, 0x83, 0xe4, 0x6d, 0xe3, 0x8a, 0xba, 0xf4, 0xbc, 0x6d, 0x1c, 0x7a, 0x72, 0xde, + 0x36, 0x81, 0x8b, 0x9f, 0xf1, 0x52, 0x41, 0x98, 0x1e, 0x99, 0x25, 0xc0, 0xe4, 0xc8, 0x9c, 0x04, + 0x72, 0xf1, 0x52, 0x19, 0x98, 0x2e, 0x5e, 0x02, 0x4c, 0x16, 0x9f, 0x04, 0x12, 0xf1, 0x61, 0x5a, + 0x99, 0x98, 0x1e, 0xf6, 0x47, 0x71, 0x93, 0xc3, 0x7e, 0x2a, 0x9e, 0x99, 0x55, 0x33, 0x59, 0x90, + 0xa0, 0xdb, 0x63, 0x13, 0x77, 0x8e, 0x88, 0x46, 0xba, 0x39, 0x03, 0xb2, 0xdb, 0xee, 0xdf, 0x56, + 0x10, 0x1e, 0xaa, 0x33, 0xd2, 0xa3, 0x58, 0x02, 0x32, 0x39, 0x8a, 0x0d, 0x43, 0xe9, 0x52, 0xea, + 0x0f, 0xbf, 0xfd, 0xee, 0xf2, 0x99, 0x5f, 0x7c, 0x77, 0xf9, 0xcc, 0x7f, 0x7e, 0x77, 0xf9, 0xcc, + 0x57, 0x37, 0x19, 0x5f, 0x88, 0xad, 0xd7, 0xf7, 0xe9, 0xcf, 0xfb, 0x2d, 0xef, 0x7e, 0xf7, 0xa0, + 0x75, 0x3f, 0xf9, 0xef, 0xf5, 0xcd, 0x39, 0xea, 0x7e, 0x1f, 0xfe, 0x4f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x9d, 0xfb, 0xa5, 0xa0, 0x77, 0x3f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5991,7 +6667,7 @@ type MessengerServiceClient interface { ConversationOpen(ctx context.Context, in *ConversationOpen_Request, opts ...grpc.CallOption) (*ConversationOpen_Reply, error) ConversationClose(ctx context.Context, in *ConversationClose_Request, opts ...grpc.CallOption) (*ConversationClose_Reply, error) // ServicesTokenList Retrieves the list of service server tokens - ServicesTokenList(ctx context.Context, in *bertytypes.ServicesTokenList_Request, opts ...grpc.CallOption) (MessengerService_ServicesTokenListClient, error) + ServicesTokenList(ctx context.Context, in *protocoltypes.ServicesTokenList_Request, opts ...grpc.CallOption) (MessengerService_ServicesTokenListClient, error) // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents ReplicationServiceRegisterGroup(ctx context.Context, in *ReplicationServiceRegisterGroup_Request, opts ...grpc.CallOption) (*ReplicationServiceRegisterGroup_Reply, error) // ReplicationSetAutoEnable Sets whether new groups should be replicated automatically or not @@ -6002,6 +6678,10 @@ type MessengerServiceClient interface { GetUsername(ctx context.Context, in *GetUsername_Request, opts ...grpc.CallOption) (*GetUsername_Reply, error) // InstanceExportData exports instance data InstanceExportData(ctx context.Context, in *InstanceExportData_Request, opts ...grpc.CallOption) (MessengerService_InstanceExportDataClient, error) + // MediaPrepare allows to upload a file and returns a cid to attach to messages + MediaPrepare(ctx context.Context, opts ...grpc.CallOption) (MessengerService_MediaPrepareClient, error) + // MediaRetrieve allows to download a file attached to a message + MediaRetrieve(ctx context.Context, in *MediaRetrieve_Request, opts ...grpc.CallOption) (MessengerService_MediaRetrieveClient, error) } type messengerServiceClient struct { @@ -6270,7 +6950,7 @@ func (c *messengerServiceClient) ConversationClose(ctx context.Context, in *Conv return out, nil } -func (c *messengerServiceClient) ServicesTokenList(ctx context.Context, in *bertytypes.ServicesTokenList_Request, opts ...grpc.CallOption) (MessengerService_ServicesTokenListClient, error) { +func (c *messengerServiceClient) ServicesTokenList(ctx context.Context, in *protocoltypes.ServicesTokenList_Request, opts ...grpc.CallOption) (MessengerService_ServicesTokenListClient, error) { stream, err := c.cc.NewStream(ctx, &_MessengerService_serviceDesc.Streams[3], "/berty.messenger.v1.MessengerService/ServicesTokenList", opts...) if err != nil { return nil, err @@ -6286,7 +6966,7 @@ func (c *messengerServiceClient) ServicesTokenList(ctx context.Context, in *bert } type MessengerService_ServicesTokenListClient interface { - Recv() (*bertytypes.ServicesTokenList_Reply, error) + Recv() (*protocoltypes.ServicesTokenList_Reply, error) grpc.ClientStream } @@ -6294,8 +6974,8 @@ type messengerServiceServicesTokenListClient struct { grpc.ClientStream } -func (x *messengerServiceServicesTokenListClient) Recv() (*bertytypes.ServicesTokenList_Reply, error) { - m := new(bertytypes.ServicesTokenList_Reply) +func (x *messengerServiceServicesTokenListClient) Recv() (*protocoltypes.ServicesTokenList_Reply, error) { + m := new(protocoltypes.ServicesTokenList_Reply) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -6370,6 +7050,72 @@ func (x *messengerServiceInstanceExportDataClient) Recv() (*InstanceExportData_R return m, nil } +func (c *messengerServiceClient) MediaPrepare(ctx context.Context, opts ...grpc.CallOption) (MessengerService_MediaPrepareClient, error) { + stream, err := c.cc.NewStream(ctx, &_MessengerService_serviceDesc.Streams[5], "/berty.messenger.v1.MessengerService/MediaPrepare", opts...) + if err != nil { + return nil, err + } + x := &messengerServiceMediaPrepareClient{stream} + return x, nil +} + +type MessengerService_MediaPrepareClient interface { + Send(*MediaPrepare_Request) error + CloseAndRecv() (*MediaPrepare_Reply, error) + grpc.ClientStream +} + +type messengerServiceMediaPrepareClient struct { + grpc.ClientStream +} + +func (x *messengerServiceMediaPrepareClient) Send(m *MediaPrepare_Request) error { + return x.ClientStream.SendMsg(m) +} + +func (x *messengerServiceMediaPrepareClient) CloseAndRecv() (*MediaPrepare_Reply, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(MediaPrepare_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *messengerServiceClient) MediaRetrieve(ctx context.Context, in *MediaRetrieve_Request, opts ...grpc.CallOption) (MessengerService_MediaRetrieveClient, error) { + stream, err := c.cc.NewStream(ctx, &_MessengerService_serviceDesc.Streams[6], "/berty.messenger.v1.MessengerService/MediaRetrieve", opts...) + if err != nil { + return nil, err + } + x := &messengerServiceMediaRetrieveClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type MessengerService_MediaRetrieveClient interface { + Recv() (*MediaRetrieve_Reply, error) + grpc.ClientStream +} + +type messengerServiceMediaRetrieveClient struct { + grpc.ClientStream +} + +func (x *messengerServiceMediaRetrieveClient) Recv() (*MediaRetrieve_Reply, error) { + m := new(MediaRetrieve_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // MessengerServiceServer is the server API for MessengerService service. type MessengerServiceServer interface { // InstanceShareableBertyID returns a Berty ID that can be shared as a string, QR code or deep link. @@ -6407,7 +7153,7 @@ type MessengerServiceServer interface { ConversationOpen(context.Context, *ConversationOpen_Request) (*ConversationOpen_Reply, error) ConversationClose(context.Context, *ConversationClose_Request) (*ConversationClose_Reply, error) // ServicesTokenList Retrieves the list of service server tokens - ServicesTokenList(*bertytypes.ServicesTokenList_Request, MessengerService_ServicesTokenListServer) error + ServicesTokenList(*protocoltypes.ServicesTokenList_Request, MessengerService_ServicesTokenListServer) error // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents ReplicationServiceRegisterGroup(context.Context, *ReplicationServiceRegisterGroup_Request) (*ReplicationServiceRegisterGroup_Reply, error) // ReplicationSetAutoEnable Sets whether new groups should be replicated automatically or not @@ -6418,6 +7164,10 @@ type MessengerServiceServer interface { GetUsername(context.Context, *GetUsername_Request) (*GetUsername_Reply, error) // InstanceExportData exports instance data InstanceExportData(*InstanceExportData_Request, MessengerService_InstanceExportDataServer) error + // MediaPrepare allows to upload a file and returns a cid to attach to messages + MediaPrepare(MessengerService_MediaPrepareServer) error + // MediaRetrieve allows to download a file attached to a message + MediaRetrieve(*MediaRetrieve_Request, MessengerService_MediaRetrieveServer) error } // UnimplementedMessengerServiceServer can be embedded to have forward compatible implementations. @@ -6508,7 +7258,7 @@ func (*UnimplementedMessengerServiceServer) ConversationClose(ctx context.Contex return nil, status.Errorf(codes.Unimplemented, "method ConversationClose not implemented") } -func (*UnimplementedMessengerServiceServer) ServicesTokenList(req *bertytypes.ServicesTokenList_Request, srv MessengerService_ServicesTokenListServer) error { +func (*UnimplementedMessengerServiceServer) ServicesTokenList(req *protocoltypes.ServicesTokenList_Request, srv MessengerService_ServicesTokenListServer) error { return status.Errorf(codes.Unimplemented, "method ServicesTokenList not implemented") } @@ -6532,6 +7282,14 @@ func (*UnimplementedMessengerServiceServer) InstanceExportData(req *InstanceExpo return status.Errorf(codes.Unimplemented, "method InstanceExportData not implemented") } +func (*UnimplementedMessengerServiceServer) MediaPrepare(srv MessengerService_MediaPrepareServer) error { + return status.Errorf(codes.Unimplemented, "method MediaPrepare not implemented") +} + +func (*UnimplementedMessengerServiceServer) MediaRetrieve(req *MediaRetrieve_Request, srv MessengerService_MediaRetrieveServer) error { + return status.Errorf(codes.Unimplemented, "method MediaRetrieve not implemented") +} + func RegisterMessengerServiceServer(s *grpc.Server, srv MessengerServiceServer) { s.RegisterService(&_MessengerService_serviceDesc, srv) } @@ -6924,7 +7682,7 @@ func _MessengerService_ConversationClose_Handler(srv interface{}, ctx context.Co } func _MessengerService_ServicesTokenList_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(bertytypes.ServicesTokenList_Request) + m := new(protocoltypes.ServicesTokenList_Request) if err := stream.RecvMsg(m); err != nil { return err } @@ -6932,7 +7690,7 @@ func _MessengerService_ServicesTokenList_Handler(srv interface{}, stream grpc.Se } type MessengerService_ServicesTokenListServer interface { - Send(*bertytypes.ServicesTokenList_Reply) error + Send(*protocoltypes.ServicesTokenList_Reply) error grpc.ServerStream } @@ -6940,7 +7698,7 @@ type messengerServiceServicesTokenListServer struct { grpc.ServerStream } -func (x *messengerServiceServicesTokenListServer) Send(m *bertytypes.ServicesTokenList_Reply) error { +func (x *messengerServiceServicesTokenListServer) Send(m *protocoltypes.ServicesTokenList_Reply) error { return x.ServerStream.SendMsg(m) } @@ -7037,6 +7795,53 @@ func (x *messengerServiceInstanceExportDataServer) Send(m *InstanceExportData_Re return x.ServerStream.SendMsg(m) } +func _MessengerService_MediaPrepare_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MessengerServiceServer).MediaPrepare(&messengerServiceMediaPrepareServer{stream}) +} + +type MessengerService_MediaPrepareServer interface { + SendAndClose(*MediaPrepare_Reply) error + Recv() (*MediaPrepare_Request, error) + grpc.ServerStream +} + +type messengerServiceMediaPrepareServer struct { + grpc.ServerStream +} + +func (x *messengerServiceMediaPrepareServer) SendAndClose(m *MediaPrepare_Reply) error { + return x.ServerStream.SendMsg(m) +} + +func (x *messengerServiceMediaPrepareServer) Recv() (*MediaPrepare_Request, error) { + m := new(MediaPrepare_Request) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _MessengerService_MediaRetrieve_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(MediaRetrieve_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(MessengerServiceServer).MediaRetrieve(m, &messengerServiceMediaRetrieveServer{stream}) +} + +type MessengerService_MediaRetrieveServer interface { + Send(*MediaRetrieve_Reply) error + grpc.ServerStream +} + +type messengerServiceMediaRetrieveServer struct { + grpc.ServerStream +} + +func (x *messengerServiceMediaRetrieveServer) Send(m *MediaRetrieve_Reply) error { + return x.ServerStream.SendMsg(m) +} + var _MessengerService_serviceDesc = grpc.ServiceDesc{ ServiceName: "berty.messenger.v1.MessengerService", HandlerType: (*MessengerServiceServer)(nil), @@ -7156,6 +7961,16 @@ var _MessengerService_serviceDesc = grpc.ServiceDesc{ Handler: _MessengerService_InstanceExportData_Handler, ServerStreams: true, }, + { + StreamName: "MediaPrepare", + Handler: _MessengerService_MediaPrepare_Handler, + ClientStreams: true, + }, + { + StreamName: "MediaRetrieve", + Handler: _MessengerService_MediaRetrieve_Handler, + ServerStreams: true, + }, }, - Metadata: "bertymessenger.proto", + Metadata: "messengertypes.proto", } diff --git a/go/pkg/bertymessenger/bertymessenger.pb.gw.go b/go/pkg/messengertypes/messengertypes.pb.gw.go similarity index 94% rename from go/pkg/bertymessenger/bertymessenger.pb.gw.go rename to go/pkg/messengertypes/messengertypes.pb.gw.go index b9ed0d833a..6643aede22 100644 --- a/go/pkg/bertymessenger/bertymessenger.pb.gw.go +++ b/go/pkg/messengertypes/messengertypes.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: bertymessenger.proto +// source: messengertypes.proto /* -Package bertymessenger is a reverse proxy. +Package messengertypes is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package bertymessenger +package messengertypes import ( "context" @@ -23,7 +23,7 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - "berty.tech/berty/v2/go/pkg/bertytypes" + "berty.tech/berty/v2/go/pkg/protocoltypes" ) // Suppress "imported and not used" errors @@ -686,7 +686,7 @@ func local_request_MessengerService_ConversationClose_0(ctx context.Context, mar } func request_MessengerService_ServicesTokenList_0(ctx context.Context, marshaler runtime.Marshaler, client MessengerServiceClient, req *http.Request, pathParams map[string]string) (MessengerService_ServicesTokenListClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.ServicesTokenList_Request + var protoReq protocoltypes.ServicesTokenList_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -861,6 +861,73 @@ func request_MessengerService_InstanceExportData_0(ctx context.Context, marshale return stream, metadata, nil } +func request_MessengerService_MediaPrepare_0(ctx context.Context, marshaler runtime.Marshaler, client MessengerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var metadata runtime.ServerMetadata + stream, err := client.MediaPrepare(ctx) + if err != nil { + grpclog.Infof("Failed to start streaming: %v", err) + return nil, metadata, err + } + dec := marshaler.NewDecoder(req.Body) + for { + var protoReq MediaPrepare_Request + err = dec.Decode(&protoReq) + if err == io.EOF { + break + } + if err != nil { + grpclog.Infof("Failed to decode request: %v", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err = stream.Send(&protoReq); err != nil { + if err == io.EOF { + break + } + grpclog.Infof("Failed to send request: %v", err) + return nil, metadata, err + } + } + + if err := stream.CloseSend(); err != nil { + grpclog.Infof("Failed to terminate client stream: %v", err) + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + grpclog.Infof("Failed to get header from client: %v", err) + return nil, metadata, err + } + metadata.HeaderMD = header + + msg, err := stream.CloseAndRecv() + metadata.TrailerMD = stream.Trailer() + return msg, metadata, err +} + +func request_MessengerService_MediaRetrieve_0(ctx context.Context, marshaler runtime.Marshaler, client MessengerServiceClient, req *http.Request, pathParams map[string]string) (MessengerService_MediaRetrieveClient, runtime.ServerMetadata, error) { + var protoReq MediaRetrieve_Request + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.MediaRetrieve(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + // RegisterMessengerServiceHandlerServer registers the http handlers for service MessengerService to "mux". // UnaryRPC :call MessengerServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1385,6 +1452,20 @@ func RegisterMessengerServiceHandlerServer(ctx context.Context, mux *runtime.Ser return }) + mux.Handle("POST", pattern_MessengerService_MediaPrepare_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("POST", pattern_MessengerService_MediaRetrieve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + return nil } @@ -1938,6 +2019,44 @@ func RegisterMessengerServiceHandlerClient(ctx context.Context, mux *runtime.Ser forward_MessengerService_InstanceExportData_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) + mux.Handle("POST", pattern_MessengerService_MediaPrepare_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MessengerService_MediaPrepare_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessengerService_MediaPrepare_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + mux.Handle("POST", pattern_MessengerService_MediaRetrieve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MessengerService_MediaRetrieve_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessengerService_MediaRetrieve_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + }) + return nil } @@ -1995,6 +2114,10 @@ var ( pattern_MessengerService_GetUsername_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"berty.messenger.v1", "MessengerService", "GetUsername"}, "", runtime.AssumeColonVerbOpt(true))) pattern_MessengerService_InstanceExportData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"berty.messenger.v1", "MessengerService", "InstanceExportData"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_MessengerService_MediaPrepare_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"berty.messenger.v1", "MessengerService", "MediaPrepare"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_MessengerService_MediaRetrieve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"berty.messenger.v1", "MessengerService", "MediaRetrieve"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -2051,4 +2174,8 @@ var ( forward_MessengerService_GetUsername_0 = runtime.ForwardResponseMessage forward_MessengerService_InstanceExportData_0 = runtime.ForwardResponseStream + + forward_MessengerService_MediaPrepare_0 = runtime.ForwardResponseMessage + + forward_MessengerService_MediaRetrieve_0 = runtime.ForwardResponseStream ) diff --git a/go/pkg/bertymessenger/types.go b/go/pkg/messengertypes/types.go similarity index 89% rename from go/pkg/bertymessenger/types.go rename to go/pkg/messengertypes/types.go index 939d7350dc..a2371dfe24 100644 --- a/go/pkg/bertymessenger/types.go +++ b/go/pkg/messengertypes/types.go @@ -1,4 +1,4 @@ -package bertymessenger +package messengertypes import ( "encoding/json" @@ -40,13 +40,26 @@ func (x *AppMessage_Type) MarshalJSON() ([]byte, error) { return json.Marshal(AppMessage_Undefined.String()) } -func (x AppMessage_Type) MarshalPayload(sentDate int64, payload proto.Message) ([]byte, error) { +func (x AppMessage_Type) MarshalPayload(sentDate int64, medias []*Media, payload proto.Message) ([]byte, error) { p, err := proto.Marshal(payload) if err != nil { return nil, err } - return proto.Marshal(&AppMessage{Type: x, Payload: p, SentDate: sentDate}) + return proto.Marshal(&AppMessage{Type: x, Payload: p, SentDate: sentDate, Medias: mediaSliceFilterForNetwork(medias)}) +} + +func mediaSliceFilterForNetwork(dbMedias []*Media) []*Media { + networkMedias := make([]*Media, len(dbMedias)) + for i, dbMedia := range dbMedias { + networkMedias[i] = &Media{ + CID: dbMedia.GetCID(), + MimeType: dbMedia.GetMimeType(), + Filename: dbMedia.GetFilename(), + DisplayName: dbMedia.GetDisplayName(), + } + } + return networkMedias } // UnmarshalPayload tries to parse an AppMessage payload in the corresponding type. @@ -111,6 +124,8 @@ func (event *StreamEvent) UnmarshalPayload() (proto.Message, error) { message = &StreamEvent_MemberUpdated{} case StreamEvent_TypeDeviceUpdated: message = &StreamEvent_DeviceUpdated{} + case StreamEvent_TypeMediaUpdated: + message = &StreamEvent_MediaUpdated{} case StreamEvent_TypeNotified: message = &StreamEvent_Notified{} case StreamEvent_TypeListEnded: diff --git a/go/pkg/bertytypes/auth.go b/go/pkg/protocoltypes/auth.go similarity index 89% rename from go/pkg/bertytypes/auth.go rename to go/pkg/protocoltypes/auth.go index 01104d3877..fc13cf8c16 100644 --- a/go/pkg/bertytypes/auth.go +++ b/go/pkg/protocoltypes/auth.go @@ -1,4 +1,4 @@ -package bertytypes +package protocoltypes import ( fmt "fmt" diff --git a/go/pkg/bertytypes/config.go b/go/pkg/protocoltypes/config.go similarity index 96% rename from go/pkg/bertytypes/config.go rename to go/pkg/protocoltypes/config.go index 637b6fc613..ed8d340616 100644 --- a/go/pkg/bertytypes/config.go +++ b/go/pkg/protocoltypes/config.go @@ -1,4 +1,4 @@ -package bertytypes +package protocoltypes // Config represents the configuration file defined in /config/config.yml type Config struct { diff --git a/go/pkg/bertytypes/contact.go b/go/pkg/protocoltypes/contact.go similarity index 98% rename from go/pkg/bertytypes/contact.go rename to go/pkg/protocoltypes/contact.go index 02db8d0738..648e362dec 100644 --- a/go/pkg/bertytypes/contact.go +++ b/go/pkg/protocoltypes/contact.go @@ -1,4 +1,4 @@ -package bertytypes +package protocoltypes import ( "fmt" diff --git a/go/pkg/bertytypes/doc.go b/go/pkg/protocoltypes/doc.go similarity index 55% rename from go/pkg/bertytypes/doc.go rename to go/pkg/protocoltypes/doc.go index a8a7603678..d22e3dae66 100644 --- a/go/pkg/bertytypes/doc.go +++ b/go/pkg/protocoltypes/doc.go @@ -1,5 +1,5 @@ -// Package bertytypes contains types and helpers for the Berty Protocol. +// Package protocoltypes contains types and helpers for the Berty Protocol. // This package is generated with Protobuf. // See https://github.com/berty/berty/tree/master/api for more information. -package bertytypes +package protocoltypes diff --git a/go/pkg/bertytypes/events_account.go b/go/pkg/protocoltypes/events_account.go similarity index 98% rename from go/pkg/bertytypes/events_account.go rename to go/pkg/protocoltypes/events_account.go index f85bd92d55..0bc753c7fc 100644 --- a/go/pkg/bertytypes/events_account.go +++ b/go/pkg/protocoltypes/events_account.go @@ -1,4 +1,4 @@ -package bertytypes +package protocoltypes func (m *AccountGroupJoined) SetDevicePK(pk []byte) { m.DevicePK = pk diff --git a/go/pkg/protocoltypes/example_test.go b/go/pkg/protocoltypes/example_test.go new file mode 100644 index 0000000000..2e1bc54bb5 --- /dev/null +++ b/go/pkg/protocoltypes/example_test.go @@ -0,0 +1 @@ +package protocoltypes_test diff --git a/go/pkg/bertytypes/group.go b/go/pkg/protocoltypes/group.go similarity index 98% rename from go/pkg/bertytypes/group.go rename to go/pkg/protocoltypes/group.go index 0c120d9090..a9fd85e7eb 100644 --- a/go/pkg/bertytypes/group.go +++ b/go/pkg/protocoltypes/group.go @@ -1,4 +1,4 @@ -package bertytypes +package protocoltypes import ( "encoding/hex" diff --git a/go/pkg/bertytypes/bertytypes.pb.go b/go/pkg/protocoltypes/protocoltypes.pb.go similarity index 79% rename from go/pkg/bertytypes/bertytypes.pb.go rename to go/pkg/protocoltypes/protocoltypes.pb.go index 78b95ca5c5..35e6ac334a 100644 --- a/go/pkg/bertytypes/bertytypes.pb.go +++ b/go/pkg/protocoltypes/protocoltypes.pb.go @@ -1,9 +1,10 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: bertytypes.proto +// source: protocoltypes.proto -package bertytypes +package protocoltypes import ( + context "context" fmt "fmt" io "io" math "math" @@ -11,6 +12,9 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -58,7 +62,7 @@ func (x GroupType) String() string { } func (GroupType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{0} + return fileDescriptor_8aa93e54ccb19003, []int{0} } type EventType int32 @@ -169,7 +173,7 @@ func (x EventType) String() string { } func (EventType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{1} + return fileDescriptor_8aa93e54ccb19003, []int{1} } type DebugInspectGroupLogType int32 @@ -197,7 +201,7 @@ func (x DebugInspectGroupLogType) String() string { } func (DebugInspectGroupLogType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{2} + return fileDescriptor_8aa93e54ccb19003, []int{2} } type ContactState int32 @@ -237,7 +241,7 @@ func (x ContactState) String() string { } func (ContactState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{3} + return fileDescriptor_8aa93e54ccb19003, []int{3} } type Direction int32 @@ -268,7 +272,7 @@ func (x Direction) String() string { } func (Direction) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{4} + return fileDescriptor_8aa93e54ccb19003, []int{4} } type InstanceGetConfiguration_SettingState int32 @@ -299,7 +303,7 @@ func (x InstanceGetConfiguration_SettingState) String() string { } func (InstanceGetConfiguration_SettingState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{36, 0} + return fileDescriptor_8aa93e54ccb19003, []int{36, 0} } type MonitorGroup_TypeEventMonitor int32 @@ -333,7 +337,7 @@ func (x MonitorGroup_TypeEventMonitor) String() string { } func (MonitorGroup_TypeEventMonitor) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 0} + return fileDescriptor_8aa93e54ccb19003, []int{62, 0} } type PeerList_Feature int32 @@ -370,7 +374,7 @@ func (x PeerList_Feature) String() string { } func (PeerList_Feature) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{76, 0} + return fileDescriptor_8aa93e54ccb19003, []int{76, 0} } // Account describes all the secrets that identifies an Account @@ -392,7 +396,7 @@ func (m *Account) Reset() { *m = Account{} } func (m *Account) String() string { return proto.CompactTextString(m) } func (*Account) ProtoMessage() {} func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{0} + return fileDescriptor_8aa93e54ccb19003, []int{0} } func (m *Account) XXX_Unmarshal(b []byte) error { @@ -463,7 +467,7 @@ type Group struct { // secret_sig is the signature of the secret used to ensure the validity of the group SecretSig []byte `protobuf:"bytes,3,opt,name=secret_sig,json=secretSig,proto3" json:"secret_sig,omitempty"` // group_type specifies the type of the group, used to determine how device secrets are generated - GroupType GroupType `protobuf:"varint,4,opt,name=group_type,json=groupType,proto3,enum=berty.types.v1.GroupType" json:"group_type,omitempty"` + GroupType GroupType `protobuf:"varint,4,opt,name=group_type,json=groupType,proto3,enum=berty.protocol.v1.GroupType" json:"group_type,omitempty"` // sign_pub is the signature public key used to verify entries, not required when secret and secret_sig are provided SignPub []byte `protobuf:"bytes,5,opt,name=sign_pub,json=signPub,proto3" json:"sign_pub,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -475,7 +479,7 @@ func (m *Group) Reset() { *m = Group{} } func (m *Group) String() string { return proto.CompactTextString(m) } func (*Group) ProtoMessage() {} func (*Group) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{1} + return fileDescriptor_8aa93e54ccb19003, []int{1} } func (m *Group) XXX_Unmarshal(b []byte) error { @@ -562,7 +566,7 @@ func (m *GroupHeadsExport) Reset() { *m = GroupHeadsExport{} } func (m *GroupHeadsExport) String() string { return proto.CompactTextString(m) } func (*GroupHeadsExport) ProtoMessage() {} func (*GroupHeadsExport) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{2} + return fileDescriptor_8aa93e54ccb19003, []int{2} } func (m *GroupHeadsExport) XXX_Unmarshal(b []byte) error { @@ -627,7 +631,7 @@ func (m *GroupHeadsExport) GetMessagesHeadsCIDs() [][]byte { // GroupMetadata is used in GroupEnvelope and only readable by invited group members type GroupMetadata struct { // event_type defines which event type is used - EventType EventType `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=berty.types.v1.EventType" json:"event_type,omitempty"` + EventType EventType `protobuf:"varint,1,opt,name=event_type,json=eventType,proto3,enum=berty.protocol.v1.EventType" json:"event_type,omitempty"` // the serialization depends on event_type, event is symmetrically encrypted Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // sig is the signature of the payload, it depends on the event_type for the used key @@ -643,7 +647,7 @@ func (m *GroupMetadata) Reset() { *m = GroupMetadata{} } func (m *GroupMetadata) String() string { return proto.CompactTextString(m) } func (*GroupMetadata) ProtoMessage() {} func (*GroupMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{3} + return fileDescriptor_8aa93e54ccb19003, []int{3} } func (m *GroupMetadata) XXX_Unmarshal(b []byte) error { @@ -722,7 +726,7 @@ func (m *GroupEnvelope) Reset() { *m = GroupEnvelope{} } func (m *GroupEnvelope) String() string { return proto.CompactTextString(m) } func (*GroupEnvelope) ProtoMessage() {} func (*GroupEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{4} + return fileDescriptor_8aa93e54ccb19003, []int{4} } func (m *GroupEnvelope) XXX_Unmarshal(b []byte) error { @@ -796,7 +800,7 @@ func (m *MessageHeaders) Reset() { *m = MessageHeaders{} } func (m *MessageHeaders) String() string { return proto.CompactTextString(m) } func (*MessageHeaders) ProtoMessage() {} func (*MessageHeaders) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{5} + return fileDescriptor_8aa93e54ccb19003, []int{5} } func (m *MessageHeaders) XXX_Unmarshal(b []byte) error { @@ -870,7 +874,7 @@ func (m *ProtocolMetadata) Reset() { *m = ProtocolMetadata{} } func (m *ProtocolMetadata) String() string { return proto.CompactTextString(m) } func (*ProtocolMetadata) ProtoMessage() {} func (*ProtocolMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{6} + return fileDescriptor_8aa93e54ccb19003, []int{6} } func (m *ProtocolMetadata) XXX_Unmarshal(b []byte) error { @@ -926,7 +930,7 @@ func (m *EncryptedMessage) Reset() { *m = EncryptedMessage{} } func (m *EncryptedMessage) String() string { return proto.CompactTextString(m) } func (*EncryptedMessage) ProtoMessage() {} func (*EncryptedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{7} + return fileDescriptor_8aa93e54ccb19003, []int{7} } func (m *EncryptedMessage) XXX_Unmarshal(b []byte) error { @@ -993,7 +997,7 @@ func (m *MessageEnvelope) Reset() { *m = MessageEnvelope{} } func (m *MessageEnvelope) String() string { return proto.CompactTextString(m) } func (*MessageEnvelope) ProtoMessage() {} func (*MessageEnvelope) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{8} + return fileDescriptor_8aa93e54ccb19003, []int{8} } func (m *MessageEnvelope) XXX_Unmarshal(b []byte) error { @@ -1074,7 +1078,7 @@ func (m *EventContext) Reset() { *m = EventContext{} } func (m *EventContext) String() string { return proto.CompactTextString(m) } func (*EventContext) ProtoMessage() {} func (*EventContext) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{9} + return fileDescriptor_8aa93e54ccb19003, []int{9} } func (m *EventContext) XXX_Unmarshal(b []byte) error { @@ -1151,7 +1155,7 @@ func (m *AppMetadata) Reset() { *m = AppMetadata{} } func (m *AppMetadata) String() string { return proto.CompactTextString(m) } func (*AppMetadata) ProtoMessage() {} func (*AppMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{10} + return fileDescriptor_8aa93e54ccb19003, []int{10} } func (m *AppMetadata) XXX_Unmarshal(b []byte) error { @@ -1214,7 +1218,7 @@ func (m *ContactAddAliasKey) Reset() { *m = ContactAddAliasKey{} } func (m *ContactAddAliasKey) String() string { return proto.CompactTextString(m) } func (*ContactAddAliasKey) ProtoMessage() {} func (*ContactAddAliasKey) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{11} + return fileDescriptor_8aa93e54ccb19003, []int{11} } func (m *ContactAddAliasKey) XXX_Unmarshal(b []byte) error { @@ -1280,7 +1284,7 @@ func (m *GroupAddMemberDevice) Reset() { *m = GroupAddMemberDevice{} } func (m *GroupAddMemberDevice) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberDevice) ProtoMessage() {} func (*GroupAddMemberDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{12} + return fileDescriptor_8aa93e54ccb19003, []int{12} } func (m *GroupAddMemberDevice) XXX_Unmarshal(b []byte) error { @@ -1350,7 +1354,7 @@ func (m *DeviceSecret) Reset() { *m = DeviceSecret{} } func (m *DeviceSecret) String() string { return proto.CompactTextString(m) } func (*DeviceSecret) ProtoMessage() {} func (*DeviceSecret) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{13} + return fileDescriptor_8aa93e54ccb19003, []int{13} } func (m *DeviceSecret) XXX_Unmarshal(b []byte) error { @@ -1415,7 +1419,7 @@ func (m *GroupAddDeviceSecret) Reset() { *m = GroupAddDeviceSecret{} } func (m *GroupAddDeviceSecret) String() string { return proto.CompactTextString(m) } func (*GroupAddDeviceSecret) ProtoMessage() {} func (*GroupAddDeviceSecret) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{14} + return fileDescriptor_8aa93e54ccb19003, []int{14} } func (m *GroupAddDeviceSecret) XXX_Unmarshal(b []byte) error { @@ -1489,7 +1493,7 @@ func (m *MultiMemberGroupAddAliasResolver) Reset() { *m = MultiMemberGro func (m *MultiMemberGroupAddAliasResolver) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupAddAliasResolver) ProtoMessage() {} func (*MultiMemberGroupAddAliasResolver) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{15} + return fileDescriptor_8aa93e54ccb19003, []int{15} } func (m *MultiMemberGroupAddAliasResolver) XXX_Unmarshal(b []byte) error { @@ -1559,7 +1563,7 @@ func (m *MultiMemberGrantAdminRole) Reset() { *m = MultiMemberGrantAdmin func (m *MultiMemberGrantAdminRole) String() string { return proto.CompactTextString(m) } func (*MultiMemberGrantAdminRole) ProtoMessage() {} func (*MultiMemberGrantAdminRole) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{16} + return fileDescriptor_8aa93e54ccb19003, []int{16} } func (m *MultiMemberGrantAdminRole) XXX_Unmarshal(b []byte) error { @@ -1620,7 +1624,7 @@ func (m *MultiMemberInitialMember) Reset() { *m = MultiMemberInitialMemb func (m *MultiMemberInitialMember) String() string { return proto.CompactTextString(m) } func (*MultiMemberInitialMember) ProtoMessage() {} func (*MultiMemberInitialMember) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{17} + return fileDescriptor_8aa93e54ccb19003, []int{17} } func (m *MultiMemberInitialMember) XXX_Unmarshal(b []byte) error { @@ -1676,7 +1680,7 @@ func (m *GroupAddAdditionalRendezvousSeed) Reset() { *m = GroupAddAdditi func (m *GroupAddAdditionalRendezvousSeed) String() string { return proto.CompactTextString(m) } func (*GroupAddAdditionalRendezvousSeed) ProtoMessage() {} func (*GroupAddAdditionalRendezvousSeed) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{18} + return fileDescriptor_8aa93e54ccb19003, []int{18} } func (m *GroupAddAdditionalRendezvousSeed) XXX_Unmarshal(b []byte) error { @@ -1739,7 +1743,7 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Reset() { *m = GroupRemove func (m *GroupRemoveAdditionalRendezvousSeed) String() string { return proto.CompactTextString(m) } func (*GroupRemoveAdditionalRendezvousSeed) ProtoMessage() {} func (*GroupRemoveAdditionalRendezvousSeed) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{19} + return fileDescriptor_8aa93e54ccb19003, []int{19} } func (m *GroupRemoveAdditionalRendezvousSeed) XXX_Unmarshal(b []byte) error { @@ -1802,7 +1806,7 @@ func (m *AccountGroupJoined) Reset() { *m = AccountGroupJoined{} } func (m *AccountGroupJoined) String() string { return proto.CompactTextString(m) } func (*AccountGroupJoined) ProtoMessage() {} func (*AccountGroupJoined) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{20} + return fileDescriptor_8aa93e54ccb19003, []int{20} } func (m *AccountGroupJoined) XXX_Unmarshal(b []byte) error { @@ -1865,7 +1869,7 @@ func (m *AccountGroupLeft) Reset() { *m = AccountGroupLeft{} } func (m *AccountGroupLeft) String() string { return proto.CompactTextString(m) } func (*AccountGroupLeft) ProtoMessage() {} func (*AccountGroupLeft) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{21} + return fileDescriptor_8aa93e54ccb19003, []int{21} } func (m *AccountGroupLeft) XXX_Unmarshal(b []byte) error { @@ -1926,7 +1930,7 @@ func (m *AccountContactRequestDisabled) Reset() { *m = AccountContactReq func (m *AccountContactRequestDisabled) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestDisabled) ProtoMessage() {} func (*AccountContactRequestDisabled) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{22} + return fileDescriptor_8aa93e54ccb19003, []int{22} } func (m *AccountContactRequestDisabled) XXX_Unmarshal(b []byte) error { @@ -1980,7 +1984,7 @@ func (m *AccountContactRequestEnabled) Reset() { *m = AccountContactRequ func (m *AccountContactRequestEnabled) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestEnabled) ProtoMessage() {} func (*AccountContactRequestEnabled) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{23} + return fileDescriptor_8aa93e54ccb19003, []int{23} } func (m *AccountContactRequestEnabled) XXX_Unmarshal(b []byte) error { @@ -2036,7 +2040,7 @@ func (m *AccountContactRequestReferenceReset) Reset() { *m = AccountCont func (m *AccountContactRequestReferenceReset) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestReferenceReset) ProtoMessage() {} func (*AccountContactRequestReferenceReset) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{24} + return fileDescriptor_8aa93e54ccb19003, []int{24} } func (m *AccountContactRequestReferenceReset) XXX_Unmarshal(b []byte) error { @@ -2106,7 +2110,7 @@ func (m *AccountContactRequestEnqueued) Reset() { *m = AccountContactReq func (m *AccountContactRequestEnqueued) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestEnqueued) ProtoMessage() {} func (*AccountContactRequestEnqueued) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{25} + return fileDescriptor_8aa93e54ccb19003, []int{25} } func (m *AccountContactRequestEnqueued) XXX_Unmarshal(b []byte) error { @@ -2183,7 +2187,7 @@ func (m *AccountContactRequestSent) Reset() { *m = AccountContactRequest func (m *AccountContactRequestSent) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestSent) ProtoMessage() {} func (*AccountContactRequestSent) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{26} + return fileDescriptor_8aa93e54ccb19003, []int{26} } func (m *AccountContactRequestSent) XXX_Unmarshal(b []byte) error { @@ -2252,7 +2256,7 @@ func (m *AccountContactRequestReceived) Reset() { *m = AccountContactReq func (m *AccountContactRequestReceived) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestReceived) ProtoMessage() {} func (*AccountContactRequestReceived) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{27} + return fileDescriptor_8aa93e54ccb19003, []int{27} } func (m *AccountContactRequestReceived) XXX_Unmarshal(b []byte) error { @@ -2329,7 +2333,7 @@ func (m *AccountContactRequestDiscarded) Reset() { *m = AccountContactRe func (m *AccountContactRequestDiscarded) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestDiscarded) ProtoMessage() {} func (*AccountContactRequestDiscarded) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{28} + return fileDescriptor_8aa93e54ccb19003, []int{28} } func (m *AccountContactRequestDiscarded) XXX_Unmarshal(b []byte) error { @@ -2396,7 +2400,7 @@ func (m *AccountContactRequestAccepted) Reset() { *m = AccountContactReq func (m *AccountContactRequestAccepted) String() string { return proto.CompactTextString(m) } func (*AccountContactRequestAccepted) ProtoMessage() {} func (*AccountContactRequestAccepted) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{29} + return fileDescriptor_8aa93e54ccb19003, []int{29} } func (m *AccountContactRequestAccepted) XXX_Unmarshal(b []byte) error { @@ -2466,7 +2470,7 @@ func (m *AccountContactBlocked) Reset() { *m = AccountContactBlocked{} } func (m *AccountContactBlocked) String() string { return proto.CompactTextString(m) } func (*AccountContactBlocked) ProtoMessage() {} func (*AccountContactBlocked) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{30} + return fileDescriptor_8aa93e54ccb19003, []int{30} } func (m *AccountContactBlocked) XXX_Unmarshal(b []byte) error { @@ -2529,7 +2533,7 @@ func (m *AccountContactUnblocked) Reset() { *m = AccountContactUnblocked func (m *AccountContactUnblocked) String() string { return proto.CompactTextString(m) } func (*AccountContactUnblocked) ProtoMessage() {} func (*AccountContactUnblocked) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{31} + return fileDescriptor_8aa93e54ccb19003, []int{31} } func (m *AccountContactUnblocked) XXX_Unmarshal(b []byte) error { @@ -2591,7 +2595,7 @@ func (m *AccountServiceTokenAdded) Reset() { *m = AccountServiceTokenAdd func (m *AccountServiceTokenAdded) String() string { return proto.CompactTextString(m) } func (*AccountServiceTokenAdded) ProtoMessage() {} func (*AccountServiceTokenAdded) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{32} + return fileDescriptor_8aa93e54ccb19003, []int{32} } func (m *AccountServiceTokenAdded) XXX_Unmarshal(b []byte) error { @@ -2653,7 +2657,7 @@ func (m *AccountServiceTokenRemoved) Reset() { *m = AccountServiceTokenR func (m *AccountServiceTokenRemoved) String() string { return proto.CompactTextString(m) } func (*AccountServiceTokenRemoved) ProtoMessage() {} func (*AccountServiceTokenRemoved) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{33} + return fileDescriptor_8aa93e54ccb19003, []int{33} } func (m *AccountServiceTokenRemoved) XXX_Unmarshal(b []byte) error { @@ -2717,7 +2721,7 @@ func (m *GroupReplicating) Reset() { *m = GroupReplicating{} } func (m *GroupReplicating) String() string { return proto.CompactTextString(m) } func (*GroupReplicating) ProtoMessage() {} func (*GroupReplicating) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{34} + return fileDescriptor_8aa93e54ccb19003, []int{34} } func (m *GroupReplicating) XXX_Unmarshal(b []byte) error { @@ -2782,7 +2786,7 @@ func (m *InstanceExportData) Reset() { *m = InstanceExportData{} } func (m *InstanceExportData) String() string { return proto.CompactTextString(m) } func (*InstanceExportData) ProtoMessage() {} func (*InstanceExportData) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{35} + return fileDescriptor_8aa93e54ccb19003, []int{35} } func (m *InstanceExportData) XXX_Unmarshal(b []byte) error { @@ -2826,7 +2830,7 @@ func (m *InstanceExportData_Request) Reset() { *m = InstanceExportData_R func (m *InstanceExportData_Request) String() string { return proto.CompactTextString(m) } func (*InstanceExportData_Request) ProtoMessage() {} func (*InstanceExportData_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{35, 0} + return fileDescriptor_8aa93e54ccb19003, []int{35, 0} } func (m *InstanceExportData_Request) XXX_Unmarshal(b []byte) error { @@ -2871,7 +2875,7 @@ func (m *InstanceExportData_Reply) Reset() { *m = InstanceExportData_Rep func (m *InstanceExportData_Reply) String() string { return proto.CompactTextString(m) } func (*InstanceExportData_Reply) ProtoMessage() {} func (*InstanceExportData_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{35, 1} + return fileDescriptor_8aa93e54ccb19003, []int{35, 1} } func (m *InstanceExportData_Reply) XXX_Unmarshal(b []byte) error { @@ -2922,7 +2926,7 @@ func (m *InstanceGetConfiguration) Reset() { *m = InstanceGetConfigurati func (m *InstanceGetConfiguration) String() string { return proto.CompactTextString(m) } func (*InstanceGetConfiguration) ProtoMessage() {} func (*InstanceGetConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{36} + return fileDescriptor_8aa93e54ccb19003, []int{36} } func (m *InstanceGetConfiguration) XXX_Unmarshal(b []byte) error { @@ -2966,7 +2970,7 @@ func (m *InstanceGetConfiguration_Request) Reset() { *m = InstanceGetCon func (m *InstanceGetConfiguration_Request) String() string { return proto.CompactTextString(m) } func (*InstanceGetConfiguration_Request) ProtoMessage() {} func (*InstanceGetConfiguration_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{36, 0} + return fileDescriptor_8aa93e54ccb19003, []int{36, 0} } func (m *InstanceGetConfiguration_Request) XXX_Unmarshal(b []byte) error { @@ -3009,10 +3013,10 @@ type InstanceGetConfiguration_Reply struct { AccountGroupPK []byte `protobuf:"bytes,3,opt,name=account_group_pk,json=accountGroupPk,proto3" json:"account_group_pk,omitempty"` PeerID string `protobuf:"bytes,4,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` Listeners []string `protobuf:"bytes,5,rep,name=listeners,proto3" json:"listeners,omitempty"` - BleEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,6,opt,name=ble_enabled,json=bleEnabled,proto3,enum=berty.types.v1.InstanceGetConfiguration_SettingState" json:"ble_enabled,omitempty"` - WifiP2PEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,7,opt,name=wifi_p2p_enabled,json=wifiP2pEnabled,proto3,enum=berty.types.v1.InstanceGetConfiguration_SettingState" json:"wifi_p2p_enabled,omitempty"` - MdnsEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,8,opt,name=mdns_enabled,json=mdnsEnabled,proto3,enum=berty.types.v1.InstanceGetConfiguration_SettingState" json:"mdns_enabled,omitempty"` - RelayEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,9,opt,name=relay_enabled,json=relayEnabled,proto3,enum=berty.types.v1.InstanceGetConfiguration_SettingState" json:"relay_enabled,omitempty"` + BleEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,6,opt,name=ble_enabled,json=bleEnabled,proto3,enum=berty.protocol.v1.InstanceGetConfiguration_SettingState" json:"ble_enabled,omitempty"` + WifiP2PEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,7,opt,name=wifi_p2p_enabled,json=wifiP2pEnabled,proto3,enum=berty.protocol.v1.InstanceGetConfiguration_SettingState" json:"wifi_p2p_enabled,omitempty"` + MdnsEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,8,opt,name=mdns_enabled,json=mdnsEnabled,proto3,enum=berty.protocol.v1.InstanceGetConfiguration_SettingState" json:"mdns_enabled,omitempty"` + RelayEnabled InstanceGetConfiguration_SettingState `protobuf:"varint,9,opt,name=relay_enabled,json=relayEnabled,proto3,enum=berty.protocol.v1.InstanceGetConfiguration_SettingState" json:"relay_enabled,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3022,7 +3026,7 @@ func (m *InstanceGetConfiguration_Reply) Reset() { *m = InstanceGetConfi func (m *InstanceGetConfiguration_Reply) String() string { return proto.CompactTextString(m) } func (*InstanceGetConfiguration_Reply) ProtoMessage() {} func (*InstanceGetConfiguration_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{36, 1} + return fileDescriptor_8aa93e54ccb19003, []int{36, 1} } func (m *InstanceGetConfiguration_Reply) XXX_Unmarshal(b []byte) error { @@ -3129,7 +3133,7 @@ func (m *ContactRequestReference) Reset() { *m = ContactRequestReference func (m *ContactRequestReference) String() string { return proto.CompactTextString(m) } func (*ContactRequestReference) ProtoMessage() {} func (*ContactRequestReference) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{37} + return fileDescriptor_8aa93e54ccb19003, []int{37} } func (m *ContactRequestReference) XXX_Unmarshal(b []byte) error { @@ -3173,7 +3177,7 @@ func (m *ContactRequestReference_Request) Reset() { *m = ContactRequestR func (m *ContactRequestReference_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequestReference_Request) ProtoMessage() {} func (*ContactRequestReference_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{37, 0} + return fileDescriptor_8aa93e54ccb19003, []int{37, 0} } func (m *ContactRequestReference_Request) XXX_Unmarshal(b []byte) error { @@ -3221,7 +3225,7 @@ func (m *ContactRequestReference_Reply) Reset() { *m = ContactRequestRef func (m *ContactRequestReference_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequestReference_Reply) ProtoMessage() {} func (*ContactRequestReference_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{37, 1} + return fileDescriptor_8aa93e54ccb19003, []int{37, 1} } func (m *ContactRequestReference_Reply) XXX_Unmarshal(b []byte) error { @@ -3279,7 +3283,7 @@ func (m *ContactRequestDisable) Reset() { *m = ContactRequestDisable{} } func (m *ContactRequestDisable) String() string { return proto.CompactTextString(m) } func (*ContactRequestDisable) ProtoMessage() {} func (*ContactRequestDisable) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{38} + return fileDescriptor_8aa93e54ccb19003, []int{38} } func (m *ContactRequestDisable) XXX_Unmarshal(b []byte) error { @@ -3323,7 +3327,7 @@ func (m *ContactRequestDisable_Request) Reset() { *m = ContactRequestDis func (m *ContactRequestDisable_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequestDisable_Request) ProtoMessage() {} func (*ContactRequestDisable_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{38, 0} + return fileDescriptor_8aa93e54ccb19003, []int{38, 0} } func (m *ContactRequestDisable_Request) XXX_Unmarshal(b []byte) error { @@ -3367,7 +3371,7 @@ func (m *ContactRequestDisable_Reply) Reset() { *m = ContactRequestDisab func (m *ContactRequestDisable_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequestDisable_Reply) ProtoMessage() {} func (*ContactRequestDisable_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{38, 1} + return fileDescriptor_8aa93e54ccb19003, []int{38, 1} } func (m *ContactRequestDisable_Reply) XXX_Unmarshal(b []byte) error { @@ -3411,7 +3415,7 @@ func (m *ContactRequestEnable) Reset() { *m = ContactRequestEnable{} } func (m *ContactRequestEnable) String() string { return proto.CompactTextString(m) } func (*ContactRequestEnable) ProtoMessage() {} func (*ContactRequestEnable) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{39} + return fileDescriptor_8aa93e54ccb19003, []int{39} } func (m *ContactRequestEnable) XXX_Unmarshal(b []byte) error { @@ -3455,7 +3459,7 @@ func (m *ContactRequestEnable_Request) Reset() { *m = ContactRequestEnab func (m *ContactRequestEnable_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequestEnable_Request) ProtoMessage() {} func (*ContactRequestEnable_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{39, 0} + return fileDescriptor_8aa93e54ccb19003, []int{39, 0} } func (m *ContactRequestEnable_Request) XXX_Unmarshal(b []byte) error { @@ -3501,7 +3505,7 @@ func (m *ContactRequestEnable_Reply) Reset() { *m = ContactRequestEnable func (m *ContactRequestEnable_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequestEnable_Reply) ProtoMessage() {} func (*ContactRequestEnable_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{39, 1} + return fileDescriptor_8aa93e54ccb19003, []int{39, 1} } func (m *ContactRequestEnable_Reply) XXX_Unmarshal(b []byte) error { @@ -3552,7 +3556,7 @@ func (m *ContactRequestResetReference) Reset() { *m = ContactRequestRese func (m *ContactRequestResetReference) String() string { return proto.CompactTextString(m) } func (*ContactRequestResetReference) ProtoMessage() {} func (*ContactRequestResetReference) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{40} + return fileDescriptor_8aa93e54ccb19003, []int{40} } func (m *ContactRequestResetReference) XXX_Unmarshal(b []byte) error { @@ -3596,7 +3600,7 @@ func (m *ContactRequestResetReference_Request) Reset() { *m = ContactReq func (m *ContactRequestResetReference_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequestResetReference_Request) ProtoMessage() {} func (*ContactRequestResetReference_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{40, 0} + return fileDescriptor_8aa93e54ccb19003, []int{40, 0} } func (m *ContactRequestResetReference_Request) XXX_Unmarshal(b []byte) error { @@ -3642,7 +3646,7 @@ func (m *ContactRequestResetReference_Reply) Reset() { *m = ContactReque func (m *ContactRequestResetReference_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequestResetReference_Reply) ProtoMessage() {} func (*ContactRequestResetReference_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{40, 1} + return fileDescriptor_8aa93e54ccb19003, []int{40, 1} } func (m *ContactRequestResetReference_Reply) XXX_Unmarshal(b []byte) error { @@ -3693,7 +3697,7 @@ func (m *ContactRequestSend) Reset() { *m = ContactRequestSend{} } func (m *ContactRequestSend) String() string { return proto.CompactTextString(m) } func (*ContactRequestSend) ProtoMessage() {} func (*ContactRequestSend) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{41} + return fileDescriptor_8aa93e54ccb19003, []int{41} } func (m *ContactRequestSend) XXX_Unmarshal(b []byte) error { @@ -3741,7 +3745,7 @@ func (m *ContactRequestSend_Request) Reset() { *m = ContactRequestSend_R func (m *ContactRequestSend_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequestSend_Request) ProtoMessage() {} func (*ContactRequestSend_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{41, 0} + return fileDescriptor_8aa93e54ccb19003, []int{41, 0} } func (m *ContactRequestSend_Request) XXX_Unmarshal(b []byte) error { @@ -3799,7 +3803,7 @@ func (m *ContactRequestSend_Reply) Reset() { *m = ContactRequestSend_Rep func (m *ContactRequestSend_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequestSend_Reply) ProtoMessage() {} func (*ContactRequestSend_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{41, 1} + return fileDescriptor_8aa93e54ccb19003, []int{41, 1} } func (m *ContactRequestSend_Reply) XXX_Unmarshal(b []byte) error { @@ -3843,7 +3847,7 @@ func (m *ContactRequestAccept) Reset() { *m = ContactRequestAccept{} } func (m *ContactRequestAccept) String() string { return proto.CompactTextString(m) } func (*ContactRequestAccept) ProtoMessage() {} func (*ContactRequestAccept) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{42} + return fileDescriptor_8aa93e54ccb19003, []int{42} } func (m *ContactRequestAccept) XXX_Unmarshal(b []byte) error { @@ -3889,7 +3893,7 @@ func (m *ContactRequestAccept_Request) Reset() { *m = ContactRequestAcce func (m *ContactRequestAccept_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequestAccept_Request) ProtoMessage() {} func (*ContactRequestAccept_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{42, 0} + return fileDescriptor_8aa93e54ccb19003, []int{42, 0} } func (m *ContactRequestAccept_Request) XXX_Unmarshal(b []byte) error { @@ -3940,7 +3944,7 @@ func (m *ContactRequestAccept_Reply) Reset() { *m = ContactRequestAccept func (m *ContactRequestAccept_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequestAccept_Reply) ProtoMessage() {} func (*ContactRequestAccept_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{42, 1} + return fileDescriptor_8aa93e54ccb19003, []int{42, 1} } func (m *ContactRequestAccept_Reply) XXX_Unmarshal(b []byte) error { @@ -3984,7 +3988,7 @@ func (m *ContactRequestDiscard) Reset() { *m = ContactRequestDiscard{} } func (m *ContactRequestDiscard) String() string { return proto.CompactTextString(m) } func (*ContactRequestDiscard) ProtoMessage() {} func (*ContactRequestDiscard) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{43} + return fileDescriptor_8aa93e54ccb19003, []int{43} } func (m *ContactRequestDiscard) XXX_Unmarshal(b []byte) error { @@ -4030,7 +4034,7 @@ func (m *ContactRequestDiscard_Request) Reset() { *m = ContactRequestDis func (m *ContactRequestDiscard_Request) String() string { return proto.CompactTextString(m) } func (*ContactRequestDiscard_Request) ProtoMessage() {} func (*ContactRequestDiscard_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{43, 0} + return fileDescriptor_8aa93e54ccb19003, []int{43, 0} } func (m *ContactRequestDiscard_Request) XXX_Unmarshal(b []byte) error { @@ -4081,7 +4085,7 @@ func (m *ContactRequestDiscard_Reply) Reset() { *m = ContactRequestDisca func (m *ContactRequestDiscard_Reply) String() string { return proto.CompactTextString(m) } func (*ContactRequestDiscard_Reply) ProtoMessage() {} func (*ContactRequestDiscard_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{43, 1} + return fileDescriptor_8aa93e54ccb19003, []int{43, 1} } func (m *ContactRequestDiscard_Reply) XXX_Unmarshal(b []byte) error { @@ -4125,7 +4129,7 @@ func (m *ContactBlock) Reset() { *m = ContactBlock{} } func (m *ContactBlock) String() string { return proto.CompactTextString(m) } func (*ContactBlock) ProtoMessage() {} func (*ContactBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{44} + return fileDescriptor_8aa93e54ccb19003, []int{44} } func (m *ContactBlock) XXX_Unmarshal(b []byte) error { @@ -4171,7 +4175,7 @@ func (m *ContactBlock_Request) Reset() { *m = ContactBlock_Request{} } func (m *ContactBlock_Request) String() string { return proto.CompactTextString(m) } func (*ContactBlock_Request) ProtoMessage() {} func (*ContactBlock_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{44, 0} + return fileDescriptor_8aa93e54ccb19003, []int{44, 0} } func (m *ContactBlock_Request) XXX_Unmarshal(b []byte) error { @@ -4222,7 +4226,7 @@ func (m *ContactBlock_Reply) Reset() { *m = ContactBlock_Reply{} } func (m *ContactBlock_Reply) String() string { return proto.CompactTextString(m) } func (*ContactBlock_Reply) ProtoMessage() {} func (*ContactBlock_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{44, 1} + return fileDescriptor_8aa93e54ccb19003, []int{44, 1} } func (m *ContactBlock_Reply) XXX_Unmarshal(b []byte) error { @@ -4266,7 +4270,7 @@ func (m *ContactUnblock) Reset() { *m = ContactUnblock{} } func (m *ContactUnblock) String() string { return proto.CompactTextString(m) } func (*ContactUnblock) ProtoMessage() {} func (*ContactUnblock) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{45} + return fileDescriptor_8aa93e54ccb19003, []int{45} } func (m *ContactUnblock) XXX_Unmarshal(b []byte) error { @@ -4312,7 +4316,7 @@ func (m *ContactUnblock_Request) Reset() { *m = ContactUnblock_Request{} func (m *ContactUnblock_Request) String() string { return proto.CompactTextString(m) } func (*ContactUnblock_Request) ProtoMessage() {} func (*ContactUnblock_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{45, 0} + return fileDescriptor_8aa93e54ccb19003, []int{45, 0} } func (m *ContactUnblock_Request) XXX_Unmarshal(b []byte) error { @@ -4363,7 +4367,7 @@ func (m *ContactUnblock_Reply) Reset() { *m = ContactUnblock_Reply{} } func (m *ContactUnblock_Reply) String() string { return proto.CompactTextString(m) } func (*ContactUnblock_Reply) ProtoMessage() {} func (*ContactUnblock_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{45, 1} + return fileDescriptor_8aa93e54ccb19003, []int{45, 1} } func (m *ContactUnblock_Reply) XXX_Unmarshal(b []byte) error { @@ -4407,7 +4411,7 @@ func (m *ContactAliasKeySend) Reset() { *m = ContactAliasKeySend{} } func (m *ContactAliasKeySend) String() string { return proto.CompactTextString(m) } func (*ContactAliasKeySend) ProtoMessage() {} func (*ContactAliasKeySend) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{46} + return fileDescriptor_8aa93e54ccb19003, []int{46} } func (m *ContactAliasKeySend) XXX_Unmarshal(b []byte) error { @@ -4453,7 +4457,7 @@ func (m *ContactAliasKeySend_Request) Reset() { *m = ContactAliasKeySend func (m *ContactAliasKeySend_Request) String() string { return proto.CompactTextString(m) } func (*ContactAliasKeySend_Request) ProtoMessage() {} func (*ContactAliasKeySend_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{46, 0} + return fileDescriptor_8aa93e54ccb19003, []int{46, 0} } func (m *ContactAliasKeySend_Request) XXX_Unmarshal(b []byte) error { @@ -4504,7 +4508,7 @@ func (m *ContactAliasKeySend_Reply) Reset() { *m = ContactAliasKeySend_R func (m *ContactAliasKeySend_Reply) String() string { return proto.CompactTextString(m) } func (*ContactAliasKeySend_Reply) ProtoMessage() {} func (*ContactAliasKeySend_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{46, 1} + return fileDescriptor_8aa93e54ccb19003, []int{46, 1} } func (m *ContactAliasKeySend_Reply) XXX_Unmarshal(b []byte) error { @@ -4548,7 +4552,7 @@ func (m *MultiMemberGroupCreate) Reset() { *m = MultiMemberGroupCreate{} func (m *MultiMemberGroupCreate) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupCreate) ProtoMessage() {} func (*MultiMemberGroupCreate) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{47} + return fileDescriptor_8aa93e54ccb19003, []int{47} } func (m *MultiMemberGroupCreate) XXX_Unmarshal(b []byte) error { @@ -4592,7 +4596,7 @@ func (m *MultiMemberGroupCreate_Request) Reset() { *m = MultiMemberGroup func (m *MultiMemberGroupCreate_Request) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupCreate_Request) ProtoMessage() {} func (*MultiMemberGroupCreate_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{47, 0} + return fileDescriptor_8aa93e54ccb19003, []int{47, 0} } func (m *MultiMemberGroupCreate_Request) XXX_Unmarshal(b []byte) error { @@ -4638,7 +4642,7 @@ func (m *MultiMemberGroupCreate_Reply) Reset() { *m = MultiMemberGroupCr func (m *MultiMemberGroupCreate_Reply) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupCreate_Reply) ProtoMessage() {} func (*MultiMemberGroupCreate_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{47, 1} + return fileDescriptor_8aa93e54ccb19003, []int{47, 1} } func (m *MultiMemberGroupCreate_Reply) XXX_Unmarshal(b []byte) error { @@ -4689,7 +4693,7 @@ func (m *MultiMemberGroupJoin) Reset() { *m = MultiMemberGroupJoin{} } func (m *MultiMemberGroupJoin) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupJoin) ProtoMessage() {} func (*MultiMemberGroupJoin) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{48} + return fileDescriptor_8aa93e54ccb19003, []int{48} } func (m *MultiMemberGroupJoin) XXX_Unmarshal(b []byte) error { @@ -4735,7 +4739,7 @@ func (m *MultiMemberGroupJoin_Request) Reset() { *m = MultiMemberGroupJo func (m *MultiMemberGroupJoin_Request) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupJoin_Request) ProtoMessage() {} func (*MultiMemberGroupJoin_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{48, 0} + return fileDescriptor_8aa93e54ccb19003, []int{48, 0} } func (m *MultiMemberGroupJoin_Request) XXX_Unmarshal(b []byte) error { @@ -4786,7 +4790,7 @@ func (m *MultiMemberGroupJoin_Reply) Reset() { *m = MultiMemberGroupJoin func (m *MultiMemberGroupJoin_Reply) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupJoin_Reply) ProtoMessage() {} func (*MultiMemberGroupJoin_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{48, 1} + return fileDescriptor_8aa93e54ccb19003, []int{48, 1} } func (m *MultiMemberGroupJoin_Reply) XXX_Unmarshal(b []byte) error { @@ -4830,7 +4834,7 @@ func (m *MultiMemberGroupLeave) Reset() { *m = MultiMemberGroupLeave{} } func (m *MultiMemberGroupLeave) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupLeave) ProtoMessage() {} func (*MultiMemberGroupLeave) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{49} + return fileDescriptor_8aa93e54ccb19003, []int{49} } func (m *MultiMemberGroupLeave) XXX_Unmarshal(b []byte) error { @@ -4875,7 +4879,7 @@ func (m *MultiMemberGroupLeave_Request) Reset() { *m = MultiMemberGroupL func (m *MultiMemberGroupLeave_Request) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupLeave_Request) ProtoMessage() {} func (*MultiMemberGroupLeave_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{49, 0} + return fileDescriptor_8aa93e54ccb19003, []int{49, 0} } func (m *MultiMemberGroupLeave_Request) XXX_Unmarshal(b []byte) error { @@ -4926,7 +4930,7 @@ func (m *MultiMemberGroupLeave_Reply) Reset() { *m = MultiMemberGroupLea func (m *MultiMemberGroupLeave_Reply) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupLeave_Reply) ProtoMessage() {} func (*MultiMemberGroupLeave_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{49, 1} + return fileDescriptor_8aa93e54ccb19003, []int{49, 1} } func (m *MultiMemberGroupLeave_Reply) XXX_Unmarshal(b []byte) error { @@ -4970,7 +4974,7 @@ func (m *MultiMemberGroupAliasResolverDisclose) Reset() { *m = MultiMemb func (m *MultiMemberGroupAliasResolverDisclose) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupAliasResolverDisclose) ProtoMessage() {} func (*MultiMemberGroupAliasResolverDisclose) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{50} + return fileDescriptor_8aa93e54ccb19003, []int{50} } func (m *MultiMemberGroupAliasResolverDisclose) XXX_Unmarshal(b []byte) error { @@ -5021,7 +5025,7 @@ func (m *MultiMemberGroupAliasResolverDisclose_Request) String() string { } func (*MultiMemberGroupAliasResolverDisclose_Request) ProtoMessage() {} func (*MultiMemberGroupAliasResolverDisclose_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{50, 0} + return fileDescriptor_8aa93e54ccb19003, []int{50, 0} } func (m *MultiMemberGroupAliasResolverDisclose_Request) XXX_Unmarshal(b []byte) error { @@ -5077,7 +5081,7 @@ func (m *MultiMemberGroupAliasResolverDisclose_Reply) String() string { } func (*MultiMemberGroupAliasResolverDisclose_Reply) ProtoMessage() {} func (*MultiMemberGroupAliasResolverDisclose_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{50, 1} + return fileDescriptor_8aa93e54ccb19003, []int{50, 1} } func (m *MultiMemberGroupAliasResolverDisclose_Reply) XXX_Unmarshal(b []byte) error { @@ -5121,7 +5125,7 @@ func (m *MultiMemberGroupAdminRoleGrant) Reset() { *m = MultiMemberGroup func (m *MultiMemberGroupAdminRoleGrant) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupAdminRoleGrant) ProtoMessage() {} func (*MultiMemberGroupAdminRoleGrant) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{51} + return fileDescriptor_8aa93e54ccb19003, []int{51} } func (m *MultiMemberGroupAdminRoleGrant) XXX_Unmarshal(b []byte) error { @@ -5171,7 +5175,7 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Reset() { func (m *MultiMemberGroupAdminRoleGrant_Request) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupAdminRoleGrant_Request) ProtoMessage() {} func (*MultiMemberGroupAdminRoleGrant_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{51, 0} + return fileDescriptor_8aa93e54ccb19003, []int{51, 0} } func (m *MultiMemberGroupAdminRoleGrant_Request) XXX_Unmarshal(b []byte) error { @@ -5229,7 +5233,7 @@ func (m *MultiMemberGroupAdminRoleGrant_Reply) Reset() { *m = MultiMembe func (m *MultiMemberGroupAdminRoleGrant_Reply) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupAdminRoleGrant_Reply) ProtoMessage() {} func (*MultiMemberGroupAdminRoleGrant_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{51, 1} + return fileDescriptor_8aa93e54ccb19003, []int{51, 1} } func (m *MultiMemberGroupAdminRoleGrant_Reply) XXX_Unmarshal(b []byte) error { @@ -5273,7 +5277,7 @@ func (m *MultiMemberGroupInvitationCreate) Reset() { *m = MultiMemberGro func (m *MultiMemberGroupInvitationCreate) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupInvitationCreate) ProtoMessage() {} func (*MultiMemberGroupInvitationCreate) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{52} + return fileDescriptor_8aa93e54ccb19003, []int{52} } func (m *MultiMemberGroupInvitationCreate) XXX_Unmarshal(b []byte) error { @@ -5321,7 +5325,7 @@ func (m *MultiMemberGroupInvitationCreate_Request) Reset() { func (m *MultiMemberGroupInvitationCreate_Request) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupInvitationCreate_Request) ProtoMessage() {} func (*MultiMemberGroupInvitationCreate_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{52, 0} + return fileDescriptor_8aa93e54ccb19003, []int{52, 0} } func (m *MultiMemberGroupInvitationCreate_Request) XXX_Unmarshal(b []byte) error { @@ -5376,7 +5380,7 @@ func (m *MultiMemberGroupInvitationCreate_Reply) Reset() { func (m *MultiMemberGroupInvitationCreate_Reply) String() string { return proto.CompactTextString(m) } func (*MultiMemberGroupInvitationCreate_Reply) ProtoMessage() {} func (*MultiMemberGroupInvitationCreate_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{52, 1} + return fileDescriptor_8aa93e54ccb19003, []int{52, 1} } func (m *MultiMemberGroupInvitationCreate_Reply) XXX_Unmarshal(b []byte) error { @@ -5427,7 +5431,7 @@ func (m *AppMetadataSend) Reset() { *m = AppMetadataSend{} } func (m *AppMetadataSend) String() string { return proto.CompactTextString(m) } func (*AppMetadataSend) ProtoMessage() {} func (*AppMetadataSend) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{53} + return fileDescriptor_8aa93e54ccb19003, []int{53} } func (m *AppMetadataSend) XXX_Unmarshal(b []byte) error { @@ -5477,7 +5481,7 @@ func (m *AppMetadataSend_Request) Reset() { *m = AppMetadataSend_Request func (m *AppMetadataSend_Request) String() string { return proto.CompactTextString(m) } func (*AppMetadataSend_Request) ProtoMessage() {} func (*AppMetadataSend_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{53, 0} + return fileDescriptor_8aa93e54ccb19003, []int{53, 0} } func (m *AppMetadataSend_Request) XXX_Unmarshal(b []byte) error { @@ -5542,7 +5546,7 @@ func (m *AppMetadataSend_Reply) Reset() { *m = AppMetadataSend_Reply{} } func (m *AppMetadataSend_Reply) String() string { return proto.CompactTextString(m) } func (*AppMetadataSend_Reply) ProtoMessage() {} func (*AppMetadataSend_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{53, 1} + return fileDescriptor_8aa93e54ccb19003, []int{53, 1} } func (m *AppMetadataSend_Reply) XXX_Unmarshal(b []byte) error { @@ -5586,7 +5590,7 @@ func (m *AppMessageSend) Reset() { *m = AppMessageSend{} } func (m *AppMessageSend) String() string { return proto.CompactTextString(m) } func (*AppMessageSend) ProtoMessage() {} func (*AppMessageSend) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{54} + return fileDescriptor_8aa93e54ccb19003, []int{54} } func (m *AppMessageSend) XXX_Unmarshal(b []byte) error { @@ -5636,7 +5640,7 @@ func (m *AppMessageSend_Request) Reset() { *m = AppMessageSend_Request{} func (m *AppMessageSend_Request) String() string { return proto.CompactTextString(m) } func (*AppMessageSend_Request) ProtoMessage() {} func (*AppMessageSend_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{54, 0} + return fileDescriptor_8aa93e54ccb19003, []int{54, 0} } func (m *AppMessageSend_Request) XXX_Unmarshal(b []byte) error { @@ -5701,7 +5705,7 @@ func (m *AppMessageSend_Reply) Reset() { *m = AppMessageSend_Reply{} } func (m *AppMessageSend_Reply) String() string { return proto.CompactTextString(m) } func (*AppMessageSend_Reply) ProtoMessage() {} func (*AppMessageSend_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{54, 1} + return fileDescriptor_8aa93e54ccb19003, []int{54, 1} } func (m *AppMessageSend_Reply) XXX_Unmarshal(b []byte) error { @@ -5751,7 +5755,7 @@ func (m *GroupMetadataEvent) Reset() { *m = GroupMetadataEvent{} } func (m *GroupMetadataEvent) String() string { return proto.CompactTextString(m) } func (*GroupMetadataEvent) ProtoMessage() {} func (*GroupMetadataEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{55} + return fileDescriptor_8aa93e54ccb19003, []int{55} } func (m *GroupMetadataEvent) XXX_Unmarshal(b []byte) error { @@ -5822,7 +5826,7 @@ func (m *GroupMessageEvent) Reset() { *m = GroupMessageEvent{} } func (m *GroupMessageEvent) String() string { return proto.CompactTextString(m) } func (*GroupMessageEvent) ProtoMessage() {} func (*GroupMessageEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{56} + return fileDescriptor_8aa93e54ccb19003, []int{56} } func (m *GroupMessageEvent) XXX_Unmarshal(b []byte) error { @@ -5887,7 +5891,7 @@ func (m *GroupMetadataList) Reset() { *m = GroupMetadataList{} } func (m *GroupMetadataList) String() string { return proto.CompactTextString(m) } func (*GroupMetadataList) ProtoMessage() {} func (*GroupMetadataList) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{57} + return fileDescriptor_8aa93e54ccb19003, []int{57} } func (m *GroupMetadataList) XXX_Unmarshal(b []byte) error { @@ -5948,7 +5952,7 @@ func (m *GroupMetadataList_Request) Reset() { *m = GroupMetadataList_Req func (m *GroupMetadataList_Request) String() string { return proto.CompactTextString(m) } func (*GroupMetadataList_Request) ProtoMessage() {} func (*GroupMetadataList_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{57, 0} + return fileDescriptor_8aa93e54ccb19003, []int{57, 0} } func (m *GroupMetadataList_Request) XXX_Unmarshal(b []byte) error { @@ -6034,7 +6038,7 @@ func (m *GroupMessageList) Reset() { *m = GroupMessageList{} } func (m *GroupMessageList) String() string { return proto.CompactTextString(m) } func (*GroupMessageList) ProtoMessage() {} func (*GroupMessageList) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{58} + return fileDescriptor_8aa93e54ccb19003, []int{58} } func (m *GroupMessageList) XXX_Unmarshal(b []byte) error { @@ -6095,7 +6099,7 @@ func (m *GroupMessageList_Request) Reset() { *m = GroupMessageList_Reque func (m *GroupMessageList_Request) String() string { return proto.CompactTextString(m) } func (*GroupMessageList_Request) ProtoMessage() {} func (*GroupMessageList_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{58, 0} + return fileDescriptor_8aa93e54ccb19003, []int{58, 0} } func (m *GroupMessageList_Request) XXX_Unmarshal(b []byte) error { @@ -6181,7 +6185,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{59} + return fileDescriptor_8aa93e54ccb19003, []int{59} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { @@ -6229,7 +6233,7 @@ func (m *GroupInfo_Request) Reset() { *m = GroupInfo_Request{} } func (m *GroupInfo_Request) String() string { return proto.CompactTextString(m) } func (*GroupInfo_Request) ProtoMessage() {} func (*GroupInfo_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{59, 0} + return fileDescriptor_8aa93e54ccb19003, []int{59, 0} } func (m *GroupInfo_Request) XXX_Unmarshal(b []byte) error { @@ -6293,7 +6297,7 @@ func (m *GroupInfo_Reply) Reset() { *m = GroupInfo_Reply{} } func (m *GroupInfo_Reply) String() string { return proto.CompactTextString(m) } func (*GroupInfo_Reply) ProtoMessage() {} func (*GroupInfo_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{59, 1} + return fileDescriptor_8aa93e54ccb19003, []int{59, 1} } func (m *GroupInfo_Reply) XXX_Unmarshal(b []byte) error { @@ -6358,7 +6362,7 @@ func (m *ActivateGroup) Reset() { *m = ActivateGroup{} } func (m *ActivateGroup) String() string { return proto.CompactTextString(m) } func (*ActivateGroup) ProtoMessage() {} func (*ActivateGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{60} + return fileDescriptor_8aa93e54ccb19003, []int{60} } func (m *ActivateGroup) XXX_Unmarshal(b []byte) error { @@ -6407,7 +6411,7 @@ func (m *ActivateGroup_Request) Reset() { *m = ActivateGroup_Request{} } func (m *ActivateGroup_Request) String() string { return proto.CompactTextString(m) } func (*ActivateGroup_Request) ProtoMessage() {} func (*ActivateGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{60, 0} + return fileDescriptor_8aa93e54ccb19003, []int{60, 0} } func (m *ActivateGroup_Request) XXX_Unmarshal(b []byte) error { @@ -6465,7 +6469,7 @@ func (m *ActivateGroup_Reply) Reset() { *m = ActivateGroup_Reply{} } func (m *ActivateGroup_Reply) String() string { return proto.CompactTextString(m) } func (*ActivateGroup_Reply) ProtoMessage() {} func (*ActivateGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{60, 1} + return fileDescriptor_8aa93e54ccb19003, []int{60, 1} } func (m *ActivateGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -6509,7 +6513,7 @@ func (m *DeactivateGroup) Reset() { *m = DeactivateGroup{} } func (m *DeactivateGroup) String() string { return proto.CompactTextString(m) } func (*DeactivateGroup) ProtoMessage() {} func (*DeactivateGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{61} + return fileDescriptor_8aa93e54ccb19003, []int{61} } func (m *DeactivateGroup) XXX_Unmarshal(b []byte) error { @@ -6555,7 +6559,7 @@ func (m *DeactivateGroup_Request) Reset() { *m = DeactivateGroup_Request func (m *DeactivateGroup_Request) String() string { return proto.CompactTextString(m) } func (*DeactivateGroup_Request) ProtoMessage() {} func (*DeactivateGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{61, 0} + return fileDescriptor_8aa93e54ccb19003, []int{61, 0} } func (m *DeactivateGroup_Request) XXX_Unmarshal(b []byte) error { @@ -6606,7 +6610,7 @@ func (m *DeactivateGroup_Reply) Reset() { *m = DeactivateGroup_Reply{} } func (m *DeactivateGroup_Reply) String() string { return proto.CompactTextString(m) } func (*DeactivateGroup_Reply) ProtoMessage() {} func (*DeactivateGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{61, 1} + return fileDescriptor_8aa93e54ccb19003, []int{61, 1} } func (m *DeactivateGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -6650,7 +6654,7 @@ func (m *MonitorGroup) Reset() { *m = MonitorGroup{} } func (m *MonitorGroup) String() string { return proto.CompactTextString(m) } func (*MonitorGroup) ProtoMessage() {} func (*MonitorGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62} + return fileDescriptor_8aa93e54ccb19003, []int{62} } func (m *MonitorGroup) XXX_Unmarshal(b []byte) error { @@ -6704,7 +6708,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Reset() { func (m *MonitorGroup_EventMonitorAdvertiseGroup) String() string { return proto.CompactTextString(m) } func (*MonitorGroup_EventMonitorAdvertiseGroup) ProtoMessage() {} func (*MonitorGroup_EventMonitorAdvertiseGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 0} + return fileDescriptor_8aa93e54ccb19003, []int{62, 0} } func (m *MonitorGroup_EventMonitorAdvertiseGroup) XXX_Unmarshal(b []byte) error { @@ -6784,7 +6788,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) Reset() { *m = MonitorGroup func (m *MonitorGroup_EventMonitorPeerFound) String() string { return proto.CompactTextString(m) } func (*MonitorGroup_EventMonitorPeerFound) ProtoMessage() {} func (*MonitorGroup_EventMonitorPeerFound) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 1} + return fileDescriptor_8aa93e54ccb19003, []int{62, 1} } func (m *MonitorGroup_EventMonitorPeerFound) XXX_Unmarshal(b []byte) error { @@ -6864,7 +6868,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Reset() { *m = MonitorGroup_ func (m *MonitorGroup_EventMonitorPeerJoin) String() string { return proto.CompactTextString(m) } func (*MonitorGroup_EventMonitorPeerJoin) ProtoMessage() {} func (*MonitorGroup_EventMonitorPeerJoin) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 2} + return fileDescriptor_8aa93e54ccb19003, []int{62, 2} } func (m *MonitorGroup_EventMonitorPeerJoin) XXX_Unmarshal(b []byte) error { @@ -6942,7 +6946,7 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Reset() { *m = MonitorGroup func (m *MonitorGroup_EventMonitorPeerLeave) String() string { return proto.CompactTextString(m) } func (*MonitorGroup_EventMonitorPeerLeave) ProtoMessage() {} func (*MonitorGroup_EventMonitorPeerLeave) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 3} + return fileDescriptor_8aa93e54ccb19003, []int{62, 3} } func (m *MonitorGroup_EventMonitorPeerLeave) XXX_Unmarshal(b []byte) error { @@ -6998,7 +7002,7 @@ func (m *MonitorGroup_EventMonitorPeerLeave) GetIsSelf() bool { } type MonitorGroup_EventMonitor struct { - Type MonitorGroup_TypeEventMonitor `protobuf:"varint,1,opt,name=type,proto3,enum=berty.types.v1.MonitorGroup_TypeEventMonitor" json:"type,omitempty"` + Type MonitorGroup_TypeEventMonitor `protobuf:"varint,1,opt,name=type,proto3,enum=berty.protocol.v1.MonitorGroup_TypeEventMonitor" json:"type,omitempty"` AdvertiseGroup *MonitorGroup_EventMonitorAdvertiseGroup `protobuf:"bytes,2,opt,name=advertise_group,json=advertiseGroup,proto3" json:"advertise_group,omitempty"` PeerFound *MonitorGroup_EventMonitorPeerFound `protobuf:"bytes,3,opt,name=peer_found,json=peerFound,proto3" json:"peer_found,omitempty"` PeerJoin *MonitorGroup_EventMonitorPeerJoin `protobuf:"bytes,4,opt,name=peer_join,json=peerJoin,proto3" json:"peer_join,omitempty"` @@ -7012,7 +7016,7 @@ func (m *MonitorGroup_EventMonitor) Reset() { *m = MonitorGroup_EventMon func (m *MonitorGroup_EventMonitor) String() string { return proto.CompactTextString(m) } func (*MonitorGroup_EventMonitor) ProtoMessage() {} func (*MonitorGroup_EventMonitor) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 4} + return fileDescriptor_8aa93e54ccb19003, []int{62, 4} } func (m *MonitorGroup_EventMonitor) XXX_Unmarshal(b []byte) error { @@ -7093,7 +7097,7 @@ func (m *MonitorGroup_Request) Reset() { *m = MonitorGroup_Request{} } func (m *MonitorGroup_Request) String() string { return proto.CompactTextString(m) } func (*MonitorGroup_Request) ProtoMessage() {} func (*MonitorGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 5} + return fileDescriptor_8aa93e54ccb19003, []int{62, 5} } func (m *MonitorGroup_Request) XXX_Unmarshal(b []byte) error { @@ -7148,7 +7152,7 @@ func (m *MonitorGroup_Reply) Reset() { *m = MonitorGroup_Reply{} } func (m *MonitorGroup_Reply) String() string { return proto.CompactTextString(m) } func (*MonitorGroup_Reply) ProtoMessage() {} func (*MonitorGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{62, 6} + return fileDescriptor_8aa93e54ccb19003, []int{62, 6} } func (m *MonitorGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -7206,7 +7210,7 @@ func (m *DebugListGroups) Reset() { *m = DebugListGroups{} } func (m *DebugListGroups) String() string { return proto.CompactTextString(m) } func (*DebugListGroups) ProtoMessage() {} func (*DebugListGroups) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{63} + return fileDescriptor_8aa93e54ccb19003, []int{63} } func (m *DebugListGroups) XXX_Unmarshal(b []byte) error { @@ -7250,7 +7254,7 @@ func (m *DebugListGroups_Request) Reset() { *m = DebugListGroups_Request func (m *DebugListGroups_Request) String() string { return proto.CompactTextString(m) } func (*DebugListGroups_Request) ProtoMessage() {} func (*DebugListGroups_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{63, 0} + return fileDescriptor_8aa93e54ccb19003, []int{63, 0} } func (m *DebugListGroups_Request) XXX_Unmarshal(b []byte) error { @@ -7288,7 +7292,7 @@ type DebugListGroups_Reply struct { // group_pk is the public key of the group GroupPK []byte `protobuf:"bytes,1,opt,name=group_pk,json=groupPk,proto3" json:"group_pk,omitempty"` // group_type is the type of the group - GroupType GroupType `protobuf:"varint,2,opt,name=group_type,json=groupType,proto3,enum=berty.types.v1.GroupType" json:"group_type,omitempty"` + GroupType GroupType `protobuf:"varint,2,opt,name=group_type,json=groupType,proto3,enum=berty.protocol.v1.GroupType" json:"group_type,omitempty"` // contact_pk is the contact public key if appropriate ContactPK []byte `protobuf:"bytes,3,opt,name=contact_pk,json=contactPk,proto3" json:"contact_pk,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -7300,7 +7304,7 @@ func (m *DebugListGroups_Reply) Reset() { *m = DebugListGroups_Reply{} } func (m *DebugListGroups_Reply) String() string { return proto.CompactTextString(m) } func (*DebugListGroups_Reply) ProtoMessage() {} func (*DebugListGroups_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{63, 1} + return fileDescriptor_8aa93e54ccb19003, []int{63, 1} } func (m *DebugListGroups_Reply) XXX_Unmarshal(b []byte) error { @@ -7365,7 +7369,7 @@ func (m *DebugInspectGroupStore) Reset() { *m = DebugInspectGroupStore{} func (m *DebugInspectGroupStore) String() string { return proto.CompactTextString(m) } func (*DebugInspectGroupStore) ProtoMessage() {} func (*DebugInspectGroupStore) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{64} + return fileDescriptor_8aa93e54ccb19003, []int{64} } func (m *DebugInspectGroupStore) XXX_Unmarshal(b []byte) error { @@ -7403,7 +7407,7 @@ type DebugInspectGroupStore_Request struct { // group_pk is the identifier of the group GroupPK []byte `protobuf:"bytes,1,opt,name=group_pk,json=groupPk,proto3" json:"group_pk,omitempty"` // log_type is the log to inspect - LogType DebugInspectGroupLogType `protobuf:"varint,2,opt,name=log_type,json=logType,proto3,enum=berty.types.v1.DebugInspectGroupLogType" json:"log_type,omitempty"` + LogType DebugInspectGroupLogType `protobuf:"varint,2,opt,name=log_type,json=logType,proto3,enum=berty.protocol.v1.DebugInspectGroupLogType" json:"log_type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -7413,7 +7417,7 @@ func (m *DebugInspectGroupStore_Request) Reset() { *m = DebugInspectGrou func (m *DebugInspectGroupStore_Request) String() string { return proto.CompactTextString(m) } func (*DebugInspectGroupStore_Request) ProtoMessage() {} func (*DebugInspectGroupStore_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{64, 0} + return fileDescriptor_8aa93e54ccb19003, []int{64, 0} } func (m *DebugInspectGroupStore_Request) XXX_Unmarshal(b []byte) error { @@ -7467,7 +7471,7 @@ type DebugInspectGroupStore_Reply struct { // parent_cids is the list of the parent entries ParentCIDs [][]byte `protobuf:"bytes,2,rep,name=parent_cids,json=parentCids,proto3" json:"parent_cids,omitempty"` // event_type metadata event type if subscribed to metadata events - MetadataEventType EventType `protobuf:"varint,3,opt,name=metadata_event_type,json=metadataEventType,proto3,enum=berty.types.v1.EventType" json:"metadata_event_type,omitempty"` + MetadataEventType EventType `protobuf:"varint,3,opt,name=metadata_event_type,json=metadataEventType,proto3,enum=berty.protocol.v1.EventType" json:"metadata_event_type,omitempty"` // device_pk is the public key of the device signing the entry DevicePK []byte `protobuf:"bytes,4,opt,name=device_pk,json=devicePk,proto3" json:"device_pk,omitempty"` // payload is the un encrypted entry payload if available @@ -7481,7 +7485,7 @@ func (m *DebugInspectGroupStore_Reply) Reset() { *m = DebugInspectGroupS func (m *DebugInspectGroupStore_Reply) String() string { return proto.CompactTextString(m) } func (*DebugInspectGroupStore_Reply) ProtoMessage() {} func (*DebugInspectGroupStore_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{64, 1} + return fileDescriptor_8aa93e54ccb19003, []int{64, 1} } func (m *DebugInspectGroupStore_Reply) XXX_Unmarshal(b []byte) error { @@ -7560,7 +7564,7 @@ func (m *DebugGroup) Reset() { *m = DebugGroup{} } func (m *DebugGroup) String() string { return proto.CompactTextString(m) } func (*DebugGroup) ProtoMessage() {} func (*DebugGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{65} + return fileDescriptor_8aa93e54ccb19003, []int{65} } func (m *DebugGroup) XXX_Unmarshal(b []byte) error { @@ -7606,7 +7610,7 @@ func (m *DebugGroup_Request) Reset() { *m = DebugGroup_Request{} } func (m *DebugGroup_Request) String() string { return proto.CompactTextString(m) } func (*DebugGroup_Request) ProtoMessage() {} func (*DebugGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{65, 0} + return fileDescriptor_8aa93e54ccb19003, []int{65, 0} } func (m *DebugGroup_Request) XXX_Unmarshal(b []byte) error { @@ -7659,7 +7663,7 @@ func (m *DebugGroup_Reply) Reset() { *m = DebugGroup_Reply{} } func (m *DebugGroup_Reply) String() string { return proto.CompactTextString(m) } func (*DebugGroup_Reply) ProtoMessage() {} func (*DebugGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{65, 1} + return fileDescriptor_8aa93e54ccb19003, []int{65, 1} } func (m *DebugGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -7716,7 +7720,7 @@ func (m *ShareableContact) Reset() { *m = ShareableContact{} } func (m *ShareableContact) String() string { return proto.CompactTextString(m) } func (*ShareableContact) ProtoMessage() {} func (*ShareableContact) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{66} + return fileDescriptor_8aa93e54ccb19003, []int{66} } func (m *ShareableContact) XXX_Unmarshal(b []byte) error { @@ -7783,7 +7787,7 @@ func (m *ServiceTokenSupportedService) Reset() { *m = ServiceTokenSuppor func (m *ServiceTokenSupportedService) String() string { return proto.CompactTextString(m) } func (*ServiceTokenSupportedService) ProtoMessage() {} func (*ServiceTokenSupportedService) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{67} + return fileDescriptor_8aa93e54ccb19003, []int{67} } func (m *ServiceTokenSupportedService) XXX_Unmarshal(b []byte) error { @@ -7845,7 +7849,7 @@ func (m *ServiceToken) Reset() { *m = ServiceToken{} } func (m *ServiceToken) String() string { return proto.CompactTextString(m) } func (*ServiceToken) ProtoMessage() {} func (*ServiceToken) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{68} + return fileDescriptor_8aa93e54ccb19003, []int{68} } func (m *ServiceToken) XXX_Unmarshal(b []byte) error { @@ -7917,7 +7921,7 @@ func (m *AuthServiceCompleteFlow) Reset() { *m = AuthServiceCompleteFlow func (m *AuthServiceCompleteFlow) String() string { return proto.CompactTextString(m) } func (*AuthServiceCompleteFlow) ProtoMessage() {} func (*AuthServiceCompleteFlow) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{69} + return fileDescriptor_8aa93e54ccb19003, []int{69} } func (m *AuthServiceCompleteFlow) XXX_Unmarshal(b []byte) error { @@ -7962,7 +7966,7 @@ func (m *AuthServiceCompleteFlow_Request) Reset() { *m = AuthServiceComp func (m *AuthServiceCompleteFlow_Request) String() string { return proto.CompactTextString(m) } func (*AuthServiceCompleteFlow_Request) ProtoMessage() {} func (*AuthServiceCompleteFlow_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{69, 0} + return fileDescriptor_8aa93e54ccb19003, []int{69, 0} } func (m *AuthServiceCompleteFlow_Request) XXX_Unmarshal(b []byte) error { @@ -8013,7 +8017,7 @@ func (m *AuthServiceCompleteFlow_Reply) Reset() { *m = AuthServiceComple func (m *AuthServiceCompleteFlow_Reply) String() string { return proto.CompactTextString(m) } func (*AuthServiceCompleteFlow_Reply) ProtoMessage() {} func (*AuthServiceCompleteFlow_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{69, 1} + return fileDescriptor_8aa93e54ccb19003, []int{69, 1} } func (m *AuthServiceCompleteFlow_Reply) XXX_Unmarshal(b []byte) error { @@ -8057,7 +8061,7 @@ func (m *AuthServiceInitFlow) Reset() { *m = AuthServiceInitFlow{} } func (m *AuthServiceInitFlow) String() string { return proto.CompactTextString(m) } func (*AuthServiceInitFlow) ProtoMessage() {} func (*AuthServiceInitFlow) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{70} + return fileDescriptor_8aa93e54ccb19003, []int{70} } func (m *AuthServiceInitFlow) XXX_Unmarshal(b []byte) error { @@ -8102,7 +8106,7 @@ func (m *AuthServiceInitFlow_Request) Reset() { *m = AuthServiceInitFlow func (m *AuthServiceInitFlow_Request) String() string { return proto.CompactTextString(m) } func (*AuthServiceInitFlow_Request) ProtoMessage() {} func (*AuthServiceInitFlow_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{70, 0} + return fileDescriptor_8aa93e54ccb19003, []int{70, 0} } func (m *AuthServiceInitFlow_Request) XXX_Unmarshal(b []byte) error { @@ -8155,7 +8159,7 @@ func (m *AuthServiceInitFlow_Reply) Reset() { *m = AuthServiceInitFlow_R func (m *AuthServiceInitFlow_Reply) String() string { return proto.CompactTextString(m) } func (*AuthServiceInitFlow_Reply) ProtoMessage() {} func (*AuthServiceInitFlow_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{70, 1} + return fileDescriptor_8aa93e54ccb19003, []int{70, 1} } func (m *AuthServiceInitFlow_Reply) XXX_Unmarshal(b []byte) error { @@ -8213,7 +8217,7 @@ func (m *ServicesTokenList) Reset() { *m = ServicesTokenList{} } func (m *ServicesTokenList) String() string { return proto.CompactTextString(m) } func (*ServicesTokenList) ProtoMessage() {} func (*ServicesTokenList) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{71} + return fileDescriptor_8aa93e54ccb19003, []int{71} } func (m *ServicesTokenList) XXX_Unmarshal(b []byte) error { @@ -8257,7 +8261,7 @@ func (m *ServicesTokenList_Request) Reset() { *m = ServicesTokenList_Req func (m *ServicesTokenList_Request) String() string { return proto.CompactTextString(m) } func (*ServicesTokenList_Request) ProtoMessage() {} func (*ServicesTokenList_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{71, 0} + return fileDescriptor_8aa93e54ccb19003, []int{71, 0} } func (m *ServicesTokenList_Request) XXX_Unmarshal(b []byte) error { @@ -8303,7 +8307,7 @@ func (m *ServicesTokenList_Reply) Reset() { *m = ServicesTokenList_Reply func (m *ServicesTokenList_Reply) String() string { return proto.CompactTextString(m) } func (*ServicesTokenList_Reply) ProtoMessage() {} func (*ServicesTokenList_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{71, 1} + return fileDescriptor_8aa93e54ccb19003, []int{71, 1} } func (m *ServicesTokenList_Reply) XXX_Unmarshal(b []byte) error { @@ -8364,7 +8368,7 @@ func (m *ServicesTokenCode) Reset() { *m = ServicesTokenCode{} } func (m *ServicesTokenCode) String() string { return proto.CompactTextString(m) } func (*ServicesTokenCode) ProtoMessage() {} func (*ServicesTokenCode) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{72} + return fileDescriptor_8aa93e54ccb19003, []int{72} } func (m *ServicesTokenCode) XXX_Unmarshal(b []byte) error { @@ -8429,7 +8433,7 @@ func (m *ReplicationServiceRegisterGroup) Reset() { *m = ReplicationServ func (m *ReplicationServiceRegisterGroup) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceRegisterGroup) ProtoMessage() {} func (*ReplicationServiceRegisterGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{73} + return fileDescriptor_8aa93e54ccb19003, []int{73} } func (m *ReplicationServiceRegisterGroup) XXX_Unmarshal(b []byte) error { @@ -8477,7 +8481,7 @@ func (m *ReplicationServiceRegisterGroup_Request) Reset() { func (m *ReplicationServiceRegisterGroup_Request) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceRegisterGroup_Request) ProtoMessage() {} func (*ReplicationServiceRegisterGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{73, 0} + return fileDescriptor_8aa93e54ccb19003, []int{73, 0} } func (m *ReplicationServiceRegisterGroup_Request) XXX_Unmarshal(b []byte) error { @@ -8535,7 +8539,7 @@ func (m *ReplicationServiceRegisterGroup_Reply) Reset() { *m = Replicati func (m *ReplicationServiceRegisterGroup_Reply) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceRegisterGroup_Reply) ProtoMessage() {} func (*ReplicationServiceRegisterGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{73, 1} + return fileDescriptor_8aa93e54ccb19003, []int{73, 1} } func (m *ReplicationServiceRegisterGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -8579,7 +8583,7 @@ func (m *ReplicationServiceReplicateGroup) Reset() { *m = ReplicationSer func (m *ReplicationServiceReplicateGroup) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceReplicateGroup) ProtoMessage() {} func (*ReplicationServiceReplicateGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{74} + return fileDescriptor_8aa93e54ccb19003, []int{74} } func (m *ReplicationServiceReplicateGroup) XXX_Unmarshal(b []byte) error { @@ -8626,7 +8630,7 @@ func (m *ReplicationServiceReplicateGroup_Request) Reset() { func (m *ReplicationServiceReplicateGroup_Request) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceReplicateGroup_Request) ProtoMessage() {} func (*ReplicationServiceReplicateGroup_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{74, 0} + return fileDescriptor_8aa93e54ccb19003, []int{74, 0} } func (m *ReplicationServiceReplicateGroup_Request) XXX_Unmarshal(b []byte) error { @@ -8680,7 +8684,7 @@ func (m *ReplicationServiceReplicateGroup_Reply) Reset() { func (m *ReplicationServiceReplicateGroup_Reply) String() string { return proto.CompactTextString(m) } func (*ReplicationServiceReplicateGroup_Reply) ProtoMessage() {} func (*ReplicationServiceReplicateGroup_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{74, 1} + return fileDescriptor_8aa93e54ccb19003, []int{74, 1} } func (m *ReplicationServiceReplicateGroup_Reply) XXX_Unmarshal(b []byte) error { @@ -8731,7 +8735,7 @@ func (m *SystemInfo) Reset() { *m = SystemInfo{} } func (m *SystemInfo) String() string { return proto.CompactTextString(m) } func (*SystemInfo) ProtoMessage() {} func (*SystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{75} + return fileDescriptor_8aa93e54ccb19003, []int{75} } func (m *SystemInfo) XXX_Unmarshal(b []byte) error { @@ -8775,7 +8779,7 @@ func (m *SystemInfo_Request) Reset() { *m = SystemInfo_Request{} } func (m *SystemInfo_Request) String() string { return proto.CompactTextString(m) } func (*SystemInfo_Request) ProtoMessage() {} func (*SystemInfo_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{75, 0} + return fileDescriptor_8aa93e54ccb19003, []int{75, 0} } func (m *SystemInfo_Request) XXX_Unmarshal(b []byte) error { @@ -8823,7 +8827,7 @@ func (m *SystemInfo_Reply) Reset() { *m = SystemInfo_Reply{} } func (m *SystemInfo_Reply) String() string { return proto.CompactTextString(m) } func (*SystemInfo_Reply) ProtoMessage() {} func (*SystemInfo_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{75, 1} + return fileDescriptor_8aa93e54ccb19003, []int{75, 1} } func (m *SystemInfo_Reply) XXX_Unmarshal(b []byte) error { @@ -8896,7 +8900,7 @@ func (m *SystemInfo_OrbitDB) Reset() { *m = SystemInfo_OrbitDB{} } func (m *SystemInfo_OrbitDB) String() string { return proto.CompactTextString(m) } func (*SystemInfo_OrbitDB) ProtoMessage() {} func (*SystemInfo_OrbitDB) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{75, 2} + return fileDescriptor_8aa93e54ccb19003, []int{75, 2} } func (m *SystemInfo_OrbitDB) XXX_Unmarshal(b []byte) error { @@ -8951,7 +8955,7 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Reset() { *m = SystemInfo func (m *SystemInfo_OrbitDB_ReplicationStatus) String() string { return proto.CompactTextString(m) } func (*SystemInfo_OrbitDB_ReplicationStatus) ProtoMessage() {} func (*SystemInfo_OrbitDB_ReplicationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{75, 2, 0} + return fileDescriptor_8aa93e54ccb19003, []int{75, 2, 0} } func (m *SystemInfo_OrbitDB_ReplicationStatus) XXX_Unmarshal(b []byte) error { @@ -9024,7 +9028,7 @@ func (m *SystemInfo_P2P) Reset() { *m = SystemInfo_P2P{} } func (m *SystemInfo_P2P) String() string { return proto.CompactTextString(m) } func (*SystemInfo_P2P) ProtoMessage() {} func (*SystemInfo_P2P) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{75, 3} + return fileDescriptor_8aa93e54ccb19003, []int{75, 3} } func (m *SystemInfo_P2P) XXX_Unmarshal(b []byte) error { @@ -9097,7 +9101,7 @@ func (m *SystemInfo_Process) Reset() { *m = SystemInfo_Process{} } func (m *SystemInfo_Process) String() string { return proto.CompactTextString(m) } func (*SystemInfo_Process) ProtoMessage() {} func (*SystemInfo_Process) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{75, 4} + return fileDescriptor_8aa93e54ccb19003, []int{75, 4} } func (m *SystemInfo_Process) XXX_Unmarshal(b []byte) error { @@ -9295,7 +9299,7 @@ func (m *PeerList) Reset() { *m = PeerList{} } func (m *PeerList) String() string { return proto.CompactTextString(m) } func (*PeerList) ProtoMessage() {} func (*PeerList) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{76} + return fileDescriptor_8aa93e54ccb19003, []int{76} } func (m *PeerList) XXX_Unmarshal(b []byte) error { @@ -9339,7 +9343,7 @@ func (m *PeerList_Request) Reset() { *m = PeerList_Request{} } func (m *PeerList_Request) String() string { return proto.CompactTextString(m) } func (*PeerList_Request) ProtoMessage() {} func (*PeerList_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{76, 0} + return fileDescriptor_8aa93e54ccb19003, []int{76, 0} } func (m *PeerList_Request) XXX_Unmarshal(b []byte) error { @@ -9384,7 +9388,7 @@ func (m *PeerList_Reply) Reset() { *m = PeerList_Reply{} } func (m *PeerList_Reply) String() string { return proto.CompactTextString(m) } func (*PeerList_Reply) ProtoMessage() {} func (*PeerList_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{76, 1} + return fileDescriptor_8aa93e54ccb19003, []int{76, 1} } func (m *PeerList_Reply) XXX_Unmarshal(b []byte) error { @@ -9433,13 +9437,13 @@ type PeerList_Peer struct { // errors is a list of errors related to the peer. Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` // Features is a list of available features. - Features []PeerList_Feature `protobuf:"varint,4,rep,packed,name=features,proto3,enum=berty.types.v1.PeerList_Feature" json:"features,omitempty"` + Features []PeerList_Feature `protobuf:"varint,4,rep,packed,name=features,proto3,enum=berty.protocol.v1.PeerList_Feature" json:"features,omitempty"` // MinLatency is the minimum latency across all the peer routes. MinLatency int64 `protobuf:"varint,5,opt,name=min_latency,json=minLatency,proto3" json:"min_latency,omitempty"` // IsActive is true if at least one of the route is active. IsActive bool `protobuf:"varint,6,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // Direction is the aggregate of all the routes's direction. - Direction Direction `protobuf:"varint,7,opt,name=direction,proto3,enum=berty.types.v1.Direction" json:"direction,omitempty"` + Direction Direction `protobuf:"varint,7,opt,name=direction,proto3,enum=berty.protocol.v1.Direction" json:"direction,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -9449,7 +9453,7 @@ func (m *PeerList_Peer) Reset() { *m = PeerList_Peer{} } func (m *PeerList_Peer) String() string { return proto.CompactTextString(m) } func (*PeerList_Peer) ProtoMessage() {} func (*PeerList_Peer) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{76, 2} + return fileDescriptor_8aa93e54ccb19003, []int{76, 2} } func (m *PeerList_Peer) XXX_Unmarshal(b []byte) error { @@ -9538,7 +9542,7 @@ type PeerList_Route struct { // Address is the multiaddress via which we are connected with the peer. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Direction is which way the connection was established. - Direction Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=berty.types.v1.Direction" json:"direction,omitempty"` + Direction Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=berty.protocol.v1.Direction" json:"direction,omitempty"` // Latency is the last known round trip time to the peer in ms. Latency int64 `protobuf:"varint,4,opt,name=latency,proto3" json:"latency,omitempty"` // Streams returns list of streams established with the peer. @@ -9552,7 +9556,7 @@ func (m *PeerList_Route) Reset() { *m = PeerList_Route{} } func (m *PeerList_Route) String() string { return proto.CompactTextString(m) } func (*PeerList_Route) ProtoMessage() {} func (*PeerList_Route) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{76, 3} + return fileDescriptor_8aa93e54ccb19003, []int{76, 3} } func (m *PeerList_Route) XXX_Unmarshal(b []byte) error { @@ -9633,7 +9637,7 @@ func (m *PeerList_Stream) Reset() { *m = PeerList_Stream{} } func (m *PeerList_Stream) String() string { return proto.CompactTextString(m) } func (*PeerList_Stream) ProtoMessage() {} func (*PeerList_Stream) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{76, 4} + return fileDescriptor_8aa93e54ccb19003, []int{76, 4} } func (m *PeerList_Stream) XXX_Unmarshal(b []byte) error { @@ -9684,7 +9688,7 @@ func (m *AttachmentPrepare) Reset() { *m = AttachmentPrepare{} } func (m *AttachmentPrepare) String() string { return proto.CompactTextString(m) } func (*AttachmentPrepare) ProtoMessage() {} func (*AttachmentPrepare) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{77} + return fileDescriptor_8aa93e54ccb19003, []int{77} } func (m *AttachmentPrepare) XXX_Unmarshal(b []byte) error { @@ -9732,7 +9736,7 @@ func (m *AttachmentPrepare_Request) Reset() { *m = AttachmentPrepare_Req func (m *AttachmentPrepare_Request) String() string { return proto.CompactTextString(m) } func (*AttachmentPrepare_Request) ProtoMessage() {} func (*AttachmentPrepare_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{77, 0} + return fileDescriptor_8aa93e54ccb19003, []int{77, 0} } func (m *AttachmentPrepare_Request) XXX_Unmarshal(b []byte) error { @@ -9792,7 +9796,7 @@ func (m *AttachmentPrepare_Reply) Reset() { *m = AttachmentPrepare_Reply func (m *AttachmentPrepare_Reply) String() string { return proto.CompactTextString(m) } func (*AttachmentPrepare_Reply) ProtoMessage() {} func (*AttachmentPrepare_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{77, 1} + return fileDescriptor_8aa93e54ccb19003, []int{77, 1} } func (m *AttachmentPrepare_Reply) XXX_Unmarshal(b []byte) error { @@ -9843,7 +9847,7 @@ func (m *AttachmentRetrieve) Reset() { *m = AttachmentRetrieve{} } func (m *AttachmentRetrieve) String() string { return proto.CompactTextString(m) } func (*AttachmentRetrieve) ProtoMessage() {} func (*AttachmentRetrieve) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{78} + return fileDescriptor_8aa93e54ccb19003, []int{78} } func (m *AttachmentRetrieve) XXX_Unmarshal(b []byte) error { @@ -9889,7 +9893,7 @@ func (m *AttachmentRetrieve_Request) Reset() { *m = AttachmentRetrieve_R func (m *AttachmentRetrieve_Request) String() string { return proto.CompactTextString(m) } func (*AttachmentRetrieve_Request) ProtoMessage() {} func (*AttachmentRetrieve_Request) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{78, 0} + return fileDescriptor_8aa93e54ccb19003, []int{78, 0} } func (m *AttachmentRetrieve_Request) XXX_Unmarshal(b []byte) error { @@ -9942,7 +9946,7 @@ func (m *AttachmentRetrieve_Reply) Reset() { *m = AttachmentRetrieve_Rep func (m *AttachmentRetrieve_Reply) String() string { return proto.CompactTextString(m) } func (*AttachmentRetrieve_Reply) ProtoMessage() {} func (*AttachmentRetrieve_Reply) Descriptor() ([]byte, []int) { - return fileDescriptor_66af3dd56d99377e, []int{78, 1} + return fileDescriptor_8aa93e54ccb19003, []int{78, 1} } func (m *AttachmentRetrieve_Reply) XXX_Unmarshal(b []byte) error { @@ -9984,481 +9988,2251 @@ func (m *AttachmentRetrieve_Reply) GetBlock() []byte { } func init() { - proto.RegisterEnum("berty.types.v1.GroupType", GroupType_name, GroupType_value) - proto.RegisterEnum("berty.types.v1.EventType", EventType_name, EventType_value) - proto.RegisterEnum("berty.types.v1.DebugInspectGroupLogType", DebugInspectGroupLogType_name, DebugInspectGroupLogType_value) - proto.RegisterEnum("berty.types.v1.ContactState", ContactState_name, ContactState_value) - proto.RegisterEnum("berty.types.v1.Direction", Direction_name, Direction_value) - proto.RegisterEnum("berty.types.v1.InstanceGetConfiguration_SettingState", InstanceGetConfiguration_SettingState_name, InstanceGetConfiguration_SettingState_value) - proto.RegisterEnum("berty.types.v1.MonitorGroup_TypeEventMonitor", MonitorGroup_TypeEventMonitor_name, MonitorGroup_TypeEventMonitor_value) - proto.RegisterEnum("berty.types.v1.PeerList_Feature", PeerList_Feature_name, PeerList_Feature_value) - proto.RegisterType((*Account)(nil), "berty.types.v1.Account") - proto.RegisterType((*Group)(nil), "berty.types.v1.Group") - proto.RegisterType((*GroupHeadsExport)(nil), "berty.types.v1.GroupHeadsExport") - proto.RegisterType((*GroupMetadata)(nil), "berty.types.v1.GroupMetadata") - proto.RegisterType((*GroupEnvelope)(nil), "berty.types.v1.GroupEnvelope") - proto.RegisterType((*MessageHeaders)(nil), "berty.types.v1.MessageHeaders") - proto.RegisterMapType((map[string]string)(nil), "berty.types.v1.MessageHeaders.MetadataEntry") - proto.RegisterType((*ProtocolMetadata)(nil), "berty.types.v1.ProtocolMetadata") - proto.RegisterType((*EncryptedMessage)(nil), "berty.types.v1.EncryptedMessage") - proto.RegisterType((*MessageEnvelope)(nil), "berty.types.v1.MessageEnvelope") - proto.RegisterType((*EventContext)(nil), "berty.types.v1.EventContext") - proto.RegisterType((*AppMetadata)(nil), "berty.types.v1.AppMetadata") - proto.RegisterType((*ContactAddAliasKey)(nil), "berty.types.v1.ContactAddAliasKey") - proto.RegisterType((*GroupAddMemberDevice)(nil), "berty.types.v1.GroupAddMemberDevice") - proto.RegisterType((*DeviceSecret)(nil), "berty.types.v1.DeviceSecret") - proto.RegisterType((*GroupAddDeviceSecret)(nil), "berty.types.v1.GroupAddDeviceSecret") - proto.RegisterType((*MultiMemberGroupAddAliasResolver)(nil), "berty.types.v1.MultiMemberGroupAddAliasResolver") - proto.RegisterType((*MultiMemberGrantAdminRole)(nil), "berty.types.v1.MultiMemberGrantAdminRole") - proto.RegisterType((*MultiMemberInitialMember)(nil), "berty.types.v1.MultiMemberInitialMember") - proto.RegisterType((*GroupAddAdditionalRendezvousSeed)(nil), "berty.types.v1.GroupAddAdditionalRendezvousSeed") - proto.RegisterType((*GroupRemoveAdditionalRendezvousSeed)(nil), "berty.types.v1.GroupRemoveAdditionalRendezvousSeed") - proto.RegisterType((*AccountGroupJoined)(nil), "berty.types.v1.AccountGroupJoined") - proto.RegisterType((*AccountGroupLeft)(nil), "berty.types.v1.AccountGroupLeft") - proto.RegisterType((*AccountContactRequestDisabled)(nil), "berty.types.v1.AccountContactRequestDisabled") - proto.RegisterType((*AccountContactRequestEnabled)(nil), "berty.types.v1.AccountContactRequestEnabled") - proto.RegisterType((*AccountContactRequestReferenceReset)(nil), "berty.types.v1.AccountContactRequestReferenceReset") - proto.RegisterType((*AccountContactRequestEnqueued)(nil), "berty.types.v1.AccountContactRequestEnqueued") - proto.RegisterType((*AccountContactRequestSent)(nil), "berty.types.v1.AccountContactRequestSent") - proto.RegisterType((*AccountContactRequestReceived)(nil), "berty.types.v1.AccountContactRequestReceived") - proto.RegisterType((*AccountContactRequestDiscarded)(nil), "berty.types.v1.AccountContactRequestDiscarded") - proto.RegisterType((*AccountContactRequestAccepted)(nil), "berty.types.v1.AccountContactRequestAccepted") - proto.RegisterType((*AccountContactBlocked)(nil), "berty.types.v1.AccountContactBlocked") - proto.RegisterType((*AccountContactUnblocked)(nil), "berty.types.v1.AccountContactUnblocked") - proto.RegisterType((*AccountServiceTokenAdded)(nil), "berty.types.v1.AccountServiceTokenAdded") - proto.RegisterType((*AccountServiceTokenRemoved)(nil), "berty.types.v1.AccountServiceTokenRemoved") - proto.RegisterType((*GroupReplicating)(nil), "berty.types.v1.GroupReplicating") - proto.RegisterType((*InstanceExportData)(nil), "berty.types.v1.InstanceExportData") - proto.RegisterType((*InstanceExportData_Request)(nil), "berty.types.v1.InstanceExportData.Request") - proto.RegisterType((*InstanceExportData_Reply)(nil), "berty.types.v1.InstanceExportData.Reply") - proto.RegisterType((*InstanceGetConfiguration)(nil), "berty.types.v1.InstanceGetConfiguration") - proto.RegisterType((*InstanceGetConfiguration_Request)(nil), "berty.types.v1.InstanceGetConfiguration.Request") - proto.RegisterType((*InstanceGetConfiguration_Reply)(nil), "berty.types.v1.InstanceGetConfiguration.Reply") - proto.RegisterType((*ContactRequestReference)(nil), "berty.types.v1.ContactRequestReference") - proto.RegisterType((*ContactRequestReference_Request)(nil), "berty.types.v1.ContactRequestReference.Request") - proto.RegisterType((*ContactRequestReference_Reply)(nil), "berty.types.v1.ContactRequestReference.Reply") - proto.RegisterType((*ContactRequestDisable)(nil), "berty.types.v1.ContactRequestDisable") - proto.RegisterType((*ContactRequestDisable_Request)(nil), "berty.types.v1.ContactRequestDisable.Request") - proto.RegisterType((*ContactRequestDisable_Reply)(nil), "berty.types.v1.ContactRequestDisable.Reply") - proto.RegisterType((*ContactRequestEnable)(nil), "berty.types.v1.ContactRequestEnable") - proto.RegisterType((*ContactRequestEnable_Request)(nil), "berty.types.v1.ContactRequestEnable.Request") - proto.RegisterType((*ContactRequestEnable_Reply)(nil), "berty.types.v1.ContactRequestEnable.Reply") - proto.RegisterType((*ContactRequestResetReference)(nil), "berty.types.v1.ContactRequestResetReference") - proto.RegisterType((*ContactRequestResetReference_Request)(nil), "berty.types.v1.ContactRequestResetReference.Request") - proto.RegisterType((*ContactRequestResetReference_Reply)(nil), "berty.types.v1.ContactRequestResetReference.Reply") - proto.RegisterType((*ContactRequestSend)(nil), "berty.types.v1.ContactRequestSend") - proto.RegisterType((*ContactRequestSend_Request)(nil), "berty.types.v1.ContactRequestSend.Request") - proto.RegisterType((*ContactRequestSend_Reply)(nil), "berty.types.v1.ContactRequestSend.Reply") - proto.RegisterType((*ContactRequestAccept)(nil), "berty.types.v1.ContactRequestAccept") - proto.RegisterType((*ContactRequestAccept_Request)(nil), "berty.types.v1.ContactRequestAccept.Request") - proto.RegisterType((*ContactRequestAccept_Reply)(nil), "berty.types.v1.ContactRequestAccept.Reply") - proto.RegisterType((*ContactRequestDiscard)(nil), "berty.types.v1.ContactRequestDiscard") - proto.RegisterType((*ContactRequestDiscard_Request)(nil), "berty.types.v1.ContactRequestDiscard.Request") - proto.RegisterType((*ContactRequestDiscard_Reply)(nil), "berty.types.v1.ContactRequestDiscard.Reply") - proto.RegisterType((*ContactBlock)(nil), "berty.types.v1.ContactBlock") - proto.RegisterType((*ContactBlock_Request)(nil), "berty.types.v1.ContactBlock.Request") - proto.RegisterType((*ContactBlock_Reply)(nil), "berty.types.v1.ContactBlock.Reply") - proto.RegisterType((*ContactUnblock)(nil), "berty.types.v1.ContactUnblock") - proto.RegisterType((*ContactUnblock_Request)(nil), "berty.types.v1.ContactUnblock.Request") - proto.RegisterType((*ContactUnblock_Reply)(nil), "berty.types.v1.ContactUnblock.Reply") - proto.RegisterType((*ContactAliasKeySend)(nil), "berty.types.v1.ContactAliasKeySend") - proto.RegisterType((*ContactAliasKeySend_Request)(nil), "berty.types.v1.ContactAliasKeySend.Request") - proto.RegisterType((*ContactAliasKeySend_Reply)(nil), "berty.types.v1.ContactAliasKeySend.Reply") - proto.RegisterType((*MultiMemberGroupCreate)(nil), "berty.types.v1.MultiMemberGroupCreate") - proto.RegisterType((*MultiMemberGroupCreate_Request)(nil), "berty.types.v1.MultiMemberGroupCreate.Request") - proto.RegisterType((*MultiMemberGroupCreate_Reply)(nil), "berty.types.v1.MultiMemberGroupCreate.Reply") - proto.RegisterType((*MultiMemberGroupJoin)(nil), "berty.types.v1.MultiMemberGroupJoin") - proto.RegisterType((*MultiMemberGroupJoin_Request)(nil), "berty.types.v1.MultiMemberGroupJoin.Request") - proto.RegisterType((*MultiMemberGroupJoin_Reply)(nil), "berty.types.v1.MultiMemberGroupJoin.Reply") - proto.RegisterType((*MultiMemberGroupLeave)(nil), "berty.types.v1.MultiMemberGroupLeave") - proto.RegisterType((*MultiMemberGroupLeave_Request)(nil), "berty.types.v1.MultiMemberGroupLeave.Request") - proto.RegisterType((*MultiMemberGroupLeave_Reply)(nil), "berty.types.v1.MultiMemberGroupLeave.Reply") - proto.RegisterType((*MultiMemberGroupAliasResolverDisclose)(nil), "berty.types.v1.MultiMemberGroupAliasResolverDisclose") - proto.RegisterType((*MultiMemberGroupAliasResolverDisclose_Request)(nil), "berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request") - proto.RegisterType((*MultiMemberGroupAliasResolverDisclose_Reply)(nil), "berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply") - proto.RegisterType((*MultiMemberGroupAdminRoleGrant)(nil), "berty.types.v1.MultiMemberGroupAdminRoleGrant") - proto.RegisterType((*MultiMemberGroupAdminRoleGrant_Request)(nil), "berty.types.v1.MultiMemberGroupAdminRoleGrant.Request") - proto.RegisterType((*MultiMemberGroupAdminRoleGrant_Reply)(nil), "berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply") - proto.RegisterType((*MultiMemberGroupInvitationCreate)(nil), "berty.types.v1.MultiMemberGroupInvitationCreate") - proto.RegisterType((*MultiMemberGroupInvitationCreate_Request)(nil), "berty.types.v1.MultiMemberGroupInvitationCreate.Request") - proto.RegisterType((*MultiMemberGroupInvitationCreate_Reply)(nil), "berty.types.v1.MultiMemberGroupInvitationCreate.Reply") - proto.RegisterType((*AppMetadataSend)(nil), "berty.types.v1.AppMetadataSend") - proto.RegisterType((*AppMetadataSend_Request)(nil), "berty.types.v1.AppMetadataSend.Request") - proto.RegisterType((*AppMetadataSend_Reply)(nil), "berty.types.v1.AppMetadataSend.Reply") - proto.RegisterType((*AppMessageSend)(nil), "berty.types.v1.AppMessageSend") - proto.RegisterType((*AppMessageSend_Request)(nil), "berty.types.v1.AppMessageSend.Request") - proto.RegisterType((*AppMessageSend_Reply)(nil), "berty.types.v1.AppMessageSend.Reply") - proto.RegisterType((*GroupMetadataEvent)(nil), "berty.types.v1.GroupMetadataEvent") - proto.RegisterType((*GroupMessageEvent)(nil), "berty.types.v1.GroupMessageEvent") - proto.RegisterType((*GroupMetadataList)(nil), "berty.types.v1.GroupMetadataList") - proto.RegisterType((*GroupMetadataList_Request)(nil), "berty.types.v1.GroupMetadataList.Request") - proto.RegisterType((*GroupMessageList)(nil), "berty.types.v1.GroupMessageList") - proto.RegisterType((*GroupMessageList_Request)(nil), "berty.types.v1.GroupMessageList.Request") - proto.RegisterType((*GroupInfo)(nil), "berty.types.v1.GroupInfo") - proto.RegisterType((*GroupInfo_Request)(nil), "berty.types.v1.GroupInfo.Request") - proto.RegisterType((*GroupInfo_Reply)(nil), "berty.types.v1.GroupInfo.Reply") - proto.RegisterType((*ActivateGroup)(nil), "berty.types.v1.ActivateGroup") - proto.RegisterType((*ActivateGroup_Request)(nil), "berty.types.v1.ActivateGroup.Request") - proto.RegisterType((*ActivateGroup_Reply)(nil), "berty.types.v1.ActivateGroup.Reply") - proto.RegisterType((*DeactivateGroup)(nil), "berty.types.v1.DeactivateGroup") - proto.RegisterType((*DeactivateGroup_Request)(nil), "berty.types.v1.DeactivateGroup.Request") - proto.RegisterType((*DeactivateGroup_Reply)(nil), "berty.types.v1.DeactivateGroup.Reply") - proto.RegisterType((*MonitorGroup)(nil), "berty.types.v1.MonitorGroup") - proto.RegisterType((*MonitorGroup_EventMonitorAdvertiseGroup)(nil), "berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup") - proto.RegisterType((*MonitorGroup_EventMonitorPeerFound)(nil), "berty.types.v1.MonitorGroup.EventMonitorPeerFound") - proto.RegisterType((*MonitorGroup_EventMonitorPeerJoin)(nil), "berty.types.v1.MonitorGroup.EventMonitorPeerJoin") - proto.RegisterType((*MonitorGroup_EventMonitorPeerLeave)(nil), "berty.types.v1.MonitorGroup.EventMonitorPeerLeave") - proto.RegisterType((*MonitorGroup_EventMonitor)(nil), "berty.types.v1.MonitorGroup.EventMonitor") - proto.RegisterType((*MonitorGroup_Request)(nil), "berty.types.v1.MonitorGroup.Request") - proto.RegisterType((*MonitorGroup_Reply)(nil), "berty.types.v1.MonitorGroup.Reply") - proto.RegisterType((*DebugListGroups)(nil), "berty.types.v1.DebugListGroups") - proto.RegisterType((*DebugListGroups_Request)(nil), "berty.types.v1.DebugListGroups.Request") - proto.RegisterType((*DebugListGroups_Reply)(nil), "berty.types.v1.DebugListGroups.Reply") - proto.RegisterType((*DebugInspectGroupStore)(nil), "berty.types.v1.DebugInspectGroupStore") - proto.RegisterType((*DebugInspectGroupStore_Request)(nil), "berty.types.v1.DebugInspectGroupStore.Request") - proto.RegisterType((*DebugInspectGroupStore_Reply)(nil), "berty.types.v1.DebugInspectGroupStore.Reply") - proto.RegisterType((*DebugGroup)(nil), "berty.types.v1.DebugGroup") - proto.RegisterType((*DebugGroup_Request)(nil), "berty.types.v1.DebugGroup.Request") - proto.RegisterType((*DebugGroup_Reply)(nil), "berty.types.v1.DebugGroup.Reply") - proto.RegisterType((*ShareableContact)(nil), "berty.types.v1.ShareableContact") - proto.RegisterType((*ServiceTokenSupportedService)(nil), "berty.types.v1.ServiceTokenSupportedService") - proto.RegisterType((*ServiceToken)(nil), "berty.types.v1.ServiceToken") - proto.RegisterType((*AuthServiceCompleteFlow)(nil), "berty.types.v1.AuthServiceCompleteFlow") - proto.RegisterType((*AuthServiceCompleteFlow_Request)(nil), "berty.types.v1.AuthServiceCompleteFlow.Request") - proto.RegisterType((*AuthServiceCompleteFlow_Reply)(nil), "berty.types.v1.AuthServiceCompleteFlow.Reply") - proto.RegisterType((*AuthServiceInitFlow)(nil), "berty.types.v1.AuthServiceInitFlow") - proto.RegisterType((*AuthServiceInitFlow_Request)(nil), "berty.types.v1.AuthServiceInitFlow.Request") - proto.RegisterType((*AuthServiceInitFlow_Reply)(nil), "berty.types.v1.AuthServiceInitFlow.Reply") - proto.RegisterType((*ServicesTokenList)(nil), "berty.types.v1.ServicesTokenList") - proto.RegisterType((*ServicesTokenList_Request)(nil), "berty.types.v1.ServicesTokenList.Request") - proto.RegisterType((*ServicesTokenList_Reply)(nil), "berty.types.v1.ServicesTokenList.Reply") - proto.RegisterType((*ServicesTokenCode)(nil), "berty.types.v1.ServicesTokenCode") - proto.RegisterType((*ReplicationServiceRegisterGroup)(nil), "berty.types.v1.ReplicationServiceRegisterGroup") - proto.RegisterType((*ReplicationServiceRegisterGroup_Request)(nil), "berty.types.v1.ReplicationServiceRegisterGroup.Request") - proto.RegisterType((*ReplicationServiceRegisterGroup_Reply)(nil), "berty.types.v1.ReplicationServiceRegisterGroup.Reply") - proto.RegisterType((*ReplicationServiceReplicateGroup)(nil), "berty.types.v1.ReplicationServiceReplicateGroup") - proto.RegisterType((*ReplicationServiceReplicateGroup_Request)(nil), "berty.types.v1.ReplicationServiceReplicateGroup.Request") - proto.RegisterType((*ReplicationServiceReplicateGroup_Reply)(nil), "berty.types.v1.ReplicationServiceReplicateGroup.Reply") - proto.RegisterType((*SystemInfo)(nil), "berty.types.v1.SystemInfo") - proto.RegisterType((*SystemInfo_Request)(nil), "berty.types.v1.SystemInfo.Request") - proto.RegisterType((*SystemInfo_Reply)(nil), "berty.types.v1.SystemInfo.Reply") - proto.RegisterType((*SystemInfo_OrbitDB)(nil), "berty.types.v1.SystemInfo.OrbitDB") - proto.RegisterType((*SystemInfo_OrbitDB_ReplicationStatus)(nil), "berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus") - proto.RegisterType((*SystemInfo_P2P)(nil), "berty.types.v1.SystemInfo.P2P") - proto.RegisterType((*SystemInfo_Process)(nil), "berty.types.v1.SystemInfo.Process") - proto.RegisterType((*PeerList)(nil), "berty.types.v1.PeerList") - proto.RegisterType((*PeerList_Request)(nil), "berty.types.v1.PeerList.Request") - proto.RegisterType((*PeerList_Reply)(nil), "berty.types.v1.PeerList.Reply") - proto.RegisterType((*PeerList_Peer)(nil), "berty.types.v1.PeerList.Peer") - proto.RegisterType((*PeerList_Route)(nil), "berty.types.v1.PeerList.Route") - proto.RegisterType((*PeerList_Stream)(nil), "berty.types.v1.PeerList.Stream") - proto.RegisterType((*AttachmentPrepare)(nil), "berty.types.v1.AttachmentPrepare") - proto.RegisterType((*AttachmentPrepare_Request)(nil), "berty.types.v1.AttachmentPrepare.Request") - proto.RegisterType((*AttachmentPrepare_Reply)(nil), "berty.types.v1.AttachmentPrepare.Reply") - proto.RegisterType((*AttachmentRetrieve)(nil), "berty.types.v1.AttachmentRetrieve") - proto.RegisterType((*AttachmentRetrieve_Request)(nil), "berty.types.v1.AttachmentRetrieve.Request") - proto.RegisterType((*AttachmentRetrieve_Reply)(nil), "berty.types.v1.AttachmentRetrieve.Reply") -} - -func init() { proto.RegisterFile("bertytypes.proto", fileDescriptor_66af3dd56d99377e) } - -var fileDescriptor_66af3dd56d99377e = []byte{ - // 4707 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x3b, 0x4b, 0x6c, 0x24, 0x49, - 0x56, 0x93, 0x55, 0xb6, 0xab, 0xea, 0x55, 0xb9, 0x9c, 0x8e, 0xee, 0x76, 0x57, 0x57, 0xb7, 0x5d, - 0x9e, 0x6c, 0x66, 0xb6, 0xa7, 0xa7, 0xc7, 0xbd, 0xe3, 0x19, 0xe6, 0xb7, 0xb3, 0x5a, 0xfc, 0x9b, - 0x5e, 0x6f, 0xb7, 0xa7, 0x6b, 0xb2, 0xda, 0x3b, 0xbb, 0x0b, 0x52, 0x6e, 0x3a, 0x33, 0x5c, 0xce, - 0xa9, 0xac, 0x8c, 0xdc, 0xfc, 0x54, 0xb7, 0x81, 0x05, 0x89, 0xdf, 0x8c, 0x18, 0x0e, 0xc0, 0xc2, - 0x85, 0x13, 0xe2, 0x33, 0x02, 0x24, 0x40, 0x70, 0xe3, 0xc8, 0x4f, 0x5a, 0x24, 0x0e, 0xc3, 0x09, - 0x09, 0x24, 0x6b, 0xd7, 0x1c, 0xd0, 0x5e, 0xb8, 0x81, 0xc4, 0x0d, 0xc5, 0x2f, 0x3f, 0xe5, 0x2a, - 0xb7, 0xcb, 0x9e, 0x11, 0x48, 0xdc, 0x32, 0x5e, 0xbc, 0x78, 0xef, 0xc5, 0x8b, 0x17, 0x2f, 0x5e, - 0xbc, 0x78, 0x09, 0xea, 0x1e, 0x0e, 0xa2, 0xc3, 0xe8, 0xd0, 0xc7, 0xe1, 0x8a, 0x1f, 0x90, 0x88, - 0xa0, 0x3a, 0x83, 0xac, 0x70, 0xd0, 0xe0, 0xe5, 0xe6, 0xe5, 0x2e, 0xe9, 0x12, 0xd6, 0x75, 0x97, - 0x7e, 0x71, 0x2c, 0xed, 0xfb, 0x0a, 0x94, 0xd6, 0x2c, 0x8b, 0xc4, 0x5e, 0x84, 0x5e, 0x84, 0xe9, - 0x6e, 0x40, 0x62, 0xbf, 0xa1, 0x2c, 0x2b, 0xb7, 0xaa, 0xab, 0x57, 0x56, 0xf2, 0x14, 0x56, 0xee, - 0xd1, 0x4e, 0x9d, 0xe3, 0xa0, 0x15, 0xb8, 0x64, 0xf2, 0x71, 0x86, 0x1f, 0x38, 0x03, 0x33, 0xc2, - 0x46, 0x0f, 0x1f, 0x36, 0x0a, 0xcb, 0xca, 0xad, 0x9a, 0x3e, 0x2f, 0xba, 0xda, 0xbc, 0xe7, 0x3e, - 0x3e, 0x44, 0xb7, 0x61, 0xde, 0x74, 0x1d, 0x33, 0xcc, 0x61, 0x17, 0x19, 0xf6, 0x1c, 0xeb, 0xc8, - 0xe0, 0xbe, 0x0a, 0x0b, 0x7e, 0xbc, 0xe7, 0x3a, 0x96, 0x11, 0x60, 0xcf, 0xc6, 0x3f, 0x3d, 0x20, - 0x71, 0x68, 0x84, 0x18, 0xdb, 0x8d, 0x29, 0x36, 0xe0, 0x32, 0xef, 0xd5, 0x93, 0xce, 0x0e, 0xc6, - 0xb6, 0xf6, 0x97, 0x0a, 0x4c, 0x33, 0x11, 0xd1, 0x22, 0x80, 0x18, 0x4f, 0x99, 0x28, 0x6c, 0x4c, - 0x85, 0x43, 0x28, 0xf9, 0x05, 0x98, 0x09, 0xb1, 0x15, 0xe0, 0x48, 0x48, 0x2b, 0x5a, 0x74, 0x18, - 0xff, 0x32, 0x42, 0xa7, 0x2b, 0x64, 0xab, 0x70, 0x48, 0xc7, 0xe9, 0xa2, 0x37, 0x00, 0xd8, 0xd4, - 0x0d, 0xaa, 0x10, 0x26, 0x49, 0x7d, 0xf5, 0xda, 0x48, 0x1d, 0x3d, 0x3a, 0xf4, 0xb1, 0x5e, 0xe9, - 0xca, 0x4f, 0x74, 0x0d, 0xca, 0xa1, 0xd3, 0xf5, 0x0c, 0x3f, 0xde, 0x6b, 0x4c, 0x33, 0xb2, 0x25, - 0xda, 0x6e, 0xc7, 0x7b, 0xda, 0xbf, 0x28, 0xa0, 0xb2, 0x31, 0x5f, 0xc5, 0xa6, 0x1d, 0x6e, 0x3d, - 0xf1, 0x49, 0x10, 0x3d, 0x4d, 0xfe, 0x2c, 0xb9, 0x42, 0x8e, 0x1c, 0xda, 0x82, 0x4b, 0x7d, 0x1c, - 0x99, 0xb6, 0x19, 0x99, 0xc6, 0x01, 0xa5, 0x68, 0x58, 0x8e, 0x1d, 0x36, 0x8a, 0xcb, 0xc5, 0x5b, - 0xb5, 0xf5, 0x2b, 0xc7, 0x47, 0xad, 0xf9, 0x1d, 0xd1, 0xcd, 0xf8, 0x6d, 0x6c, 0x6f, 0x86, 0xfa, - 0x7c, 0x3f, 0x07, 0x72, 0xec, 0x90, 0x93, 0x09, 0x43, 0xb3, 0x8b, 0xc3, 0x2c, 0x99, 0xa9, 0x2c, - 0x19, 0xde, 0x9d, 0x23, 0x93, 0x05, 0x39, 0x76, 0xa8, 0xfd, 0x9d, 0x02, 0xb3, 0x6c, 0x72, 0x92, - 0x29, 0xd5, 0x21, 0x1e, 0x60, 0x2f, 0xe2, 0x3a, 0x54, 0x46, 0xeb, 0x70, 0x8b, 0x62, 0x70, 0x1d, - 0x62, 0xf9, 0x89, 0x1a, 0x50, 0xf2, 0xcd, 0x43, 0x97, 0x98, 0xb6, 0x9c, 0xb3, 0x68, 0x22, 0x15, - 0x8a, 0xe9, 0x7a, 0xd1, 0x4f, 0xb4, 0x03, 0xf3, 0xcc, 0xba, 0x2d, 0xe2, 0x1a, 0x72, 0x72, 0x6c, - 0xc1, 0xaa, 0xab, 0xcb, 0xc3, 0xcc, 0xda, 0x02, 0x51, 0x8a, 0xa8, 0xab, 0xfe, 0x10, 0x44, 0xfb, - 0x2d, 0x39, 0x8d, 0x2d, 0x6f, 0x80, 0x5d, 0xe2, 0x63, 0x74, 0x19, 0xa6, 0x3d, 0xe2, 0x59, 0x58, - 0xac, 0x0d, 0x6f, 0x50, 0x28, 0x93, 0x57, 0x08, 0xc8, 0x1b, 0xe8, 0x7d, 0xb8, 0x86, 0x3d, 0x2b, - 0x38, 0xf4, 0x23, 0x6c, 0x1b, 0x66, 0x14, 0x99, 0xd6, 0x41, 0x9f, 0x6a, 0x20, 0xb3, 0x30, 0xd7, - 0x8f, 0x8f, 0x5a, 0x57, 0xb7, 0x24, 0xd2, 0x5a, 0x82, 0xc3, 0xf4, 0x7a, 0x15, 0x8f, 0xe8, 0xa0, - 0xda, 0xfd, 0x0f, 0x05, 0xea, 0x62, 0x19, 0xa8, 0xca, 0x71, 0x10, 0x52, 0x25, 0xb1, 0x7d, 0x87, - 0x03, 0x26, 0xd9, 0x94, 0x2e, 0x9b, 0xe8, 0x05, 0xa8, 0xd8, 0x78, 0xe0, 0x58, 0xd8, 0xf0, 0x7b, - 0x5c, 0xbe, 0xf5, 0xda, 0xf1, 0x51, 0xab, 0xbc, 0xc9, 0x80, 0xed, 0xfb, 0x7a, 0x99, 0x77, 0xb7, - 0x7b, 0x23, 0xf4, 0xf9, 0x55, 0x28, 0x67, 0xd4, 0x58, 0xbc, 0x55, 0x5d, 0xbd, 0x33, 0xac, 0xc6, - 0xbc, 0x20, 0x2b, 0x52, 0x77, 0x5b, 0x5e, 0x14, 0x1c, 0xea, 0xc9, 0xe8, 0xe6, 0x97, 0x60, 0x36, - 0xd7, 0x45, 0x99, 0x49, 0x1b, 0xaf, 0xe8, 0xf4, 0x93, 0x6a, 0x71, 0x60, 0xba, 0x31, 0x66, 0x52, - 0x56, 0x74, 0xde, 0x78, 0xab, 0xf0, 0x86, 0xa2, 0x6d, 0x80, 0x3a, 0xbc, 0x5a, 0xe8, 0x2e, 0x5c, - 0x4a, 0x75, 0x4a, 0x9d, 0x04, 0xdd, 0xad, 0x61, 0x43, 0xa1, 0x7a, 0xd5, 0x51, 0xa6, 0xab, 0xc3, - 0x7b, 0xb4, 0x9f, 0x07, 0x35, 0xd1, 0xb4, 0x10, 0x1a, 0xdd, 0x80, 0x8a, 0xef, 0x9a, 0x8e, 0x17, - 0xe1, 0x27, 0x51, 0xb2, 0xdd, 0x24, 0x60, 0xb4, 0x35, 0x15, 0xce, 0x6d, 0x4d, 0x7f, 0xab, 0xc0, - 0x9c, 0x60, 0x9c, 0xd8, 0xd3, 0x17, 0x60, 0x4e, 0xec, 0x1e, 0xb6, 0xdd, 0x70, 0x10, 0x0a, 0x31, - 0xea, 0xfd, 0x13, 0x0b, 0x2c, 0x20, 0x72, 0x17, 0x88, 0x66, 0x6a, 0x92, 0xc5, 0xac, 0x49, 0x9e, - 0x6a, 0x7c, 0x53, 0x17, 0x30, 0xbe, 0xbf, 0x52, 0xa0, 0xc6, 0xf6, 0xe9, 0x06, 0xe1, 0x5a, 0x5a, - 0x80, 0x82, 0x63, 0x73, 0xa9, 0xd7, 0x67, 0x8e, 0x8f, 0x5a, 0x85, 0xed, 0x4d, 0xbd, 0xe0, 0xd8, - 0xe8, 0x0e, 0x80, 0x6f, 0x06, 0x94, 0x27, 0x65, 0x59, 0x60, 0x2c, 0x67, 0x8f, 0x8f, 0x5a, 0x95, - 0x36, 0x83, 0x52, 0x26, 0x15, 0x8e, 0xb0, 0x6d, 0x87, 0xe8, 0x79, 0x28, 0x73, 0x1f, 0xeb, 0xf7, - 0xf8, 0x44, 0xd6, 0xab, 0xc7, 0x47, 0xad, 0x12, 0xdb, 0x7d, 0xed, 0xfb, 0x7a, 0x89, 0x75, 0xb6, - 0x7b, 0xe8, 0x4b, 0x30, 0x37, 0x7a, 0x36, 0xe8, 0xf8, 0xa8, 0x55, 0x1f, 0x9a, 0x44, 0xdd, 0xcc, - 0xcb, 0xae, 0x43, 0x75, 0xcd, 0x4f, 0x7d, 0x52, 0x6e, 0x6b, 0x28, 0xa7, 0x6e, 0x8d, 0xb1, 0xea, - 0xd7, 0xba, 0x80, 0xa8, 0x26, 0x4c, 0x2b, 0x5a, 0xb3, 0xed, 0x35, 0x7a, 0x9e, 0x51, 0x4f, 0x3d, - 0x01, 0xe9, 0xe7, 0xa1, 0x2c, 0xce, 0x47, 0xb9, 0x3f, 0xd9, 0xcc, 0x19, 0x29, 0x3a, 0x73, 0x7e, - 0x46, 0xf6, 0xb4, 0x8f, 0x15, 0xb8, 0xcc, 0xd4, 0xb1, 0x66, 0xdb, 0x3b, 0xb8, 0xbf, 0x87, 0x03, - 0x4e, 0x8c, 0xf2, 0xea, 0xb3, 0xf6, 0x10, 0x2f, 0x8e, 0x44, 0x79, 0xf1, 0xee, 0x76, 0x6f, 0x12, - 0x67, 0xb0, 0x08, 0x20, 0xa8, 0x66, 0xce, 0x44, 0x0e, 0xe9, 0x38, 0x5d, 0x6d, 0x0b, 0x6a, 0x7c, - 0x10, 0xdf, 0x5e, 0xe8, 0x3a, 0x54, 0xac, 0x03, 0xd3, 0xf1, 0x32, 0x07, 0x57, 0x99, 0x01, 0xa8, - 0x36, 0x32, 0xde, 0xa9, 0x90, 0xf3, 0x4e, 0xda, 0xf7, 0x32, 0x93, 0xca, 0xd1, 0x9b, 0x40, 0x81, - 0xaf, 0x41, 0xdd, 0xc6, 0x61, 0x64, 0xa4, 0x4a, 0xe0, 0x33, 0x53, 0x8f, 0x8f, 0x5a, 0xb5, 0x4d, - 0x1c, 0x46, 0x89, 0x22, 0x6a, 0x76, 0xda, 0xea, 0x65, 0x0f, 0x96, 0x62, 0xee, 0x60, 0xd1, 0x7e, - 0x5b, 0x81, 0xe5, 0x9d, 0xd8, 0x8d, 0x1c, 0x8e, 0x2b, 0x05, 0x64, 0x4b, 0xa2, 0xe3, 0x90, 0xb8, - 0x83, 0x61, 0xc7, 0x7a, 0xba, 0x84, 0xcf, 0x41, 0x9d, 0x2f, 0x71, 0x20, 0x06, 0x0b, 0x23, 0x9a, - 0x35, 0x73, 0x14, 0x5b, 0x50, 0x95, 0x91, 0x12, 0x21, 0xfb, 0x42, 0x28, 0x10, 0x31, 0x12, 0x21, - 0xfb, 0xda, 0x87, 0x0a, 0x5c, 0xcb, 0xc9, 0x65, 0x7a, 0xd1, 0x9a, 0xdd, 0x77, 0x3c, 0x9d, 0xb8, - 0x78, 0x12, 0x81, 0xbe, 0x02, 0xf3, 0x5d, 0x3a, 0x18, 0xe3, 0x13, 0x5a, 0xbb, 0x74, 0x7c, 0xd4, - 0x9a, 0xbb, 0xc7, 0x3b, 0x13, 0xc5, 0xcd, 0x75, 0x73, 0x80, 0x9e, 0xb6, 0x05, 0x8d, 0x8c, 0x20, - 0xdb, 0x9e, 0x13, 0x39, 0xa6, 0xcb, 0x1b, 0x13, 0xd8, 0xa3, 0x66, 0xc2, 0x72, 0xa2, 0x5c, 0xdb, - 0x76, 0x22, 0x87, 0x78, 0xa6, 0x9b, 0x8f, 0xee, 0x26, 0x99, 0x16, 0x82, 0x29, 0x16, 0x2c, 0x72, - 0xed, 0xb2, 0x6f, 0xcd, 0x86, 0x9b, 0x3c, 0x7c, 0xc5, 0x7d, 0x32, 0xc0, 0x9f, 0x17, 0x17, 0x17, - 0x90, 0x08, 0xa6, 0x19, 0xb3, 0xaf, 0x11, 0xc7, 0x9b, 0x8c, 0x68, 0x12, 0x82, 0x17, 0x9e, 0x1e, - 0x82, 0x6b, 0x18, 0xd4, 0x2c, 0xb7, 0x07, 0x78, 0x3f, 0x9a, 0xd0, 0xe3, 0x24, 0xbe, 0xb6, 0x30, - 0xde, 0xd7, 0x6a, 0x5f, 0x83, 0x45, 0xc1, 0x46, 0x78, 0x38, 0x1d, 0x7f, 0x27, 0xc6, 0x61, 0xb4, - 0xe9, 0x84, 0xe6, 0x9e, 0x3b, 0xd1, 0xfc, 0xb4, 0x6d, 0xb8, 0x31, 0x92, 0xd6, 0x96, 0x37, 0x31, - 0xa9, 0x5f, 0x51, 0xe0, 0xe6, 0x48, 0x5a, 0x3a, 0xde, 0xc7, 0x01, 0xf6, 0x2c, 0xac, 0xe3, 0x70, - 0x32, 0x17, 0x32, 0xfe, 0xde, 0x51, 0x38, 0xe5, 0xde, 0xf1, 0x4f, 0xca, 0x18, 0x05, 0x6d, 0x79, - 0xdf, 0x89, 0x71, 0x3c, 0x99, 0x01, 0x9c, 0x71, 0x51, 0xd0, 0x5b, 0xd4, 0x97, 0x32, 0x66, 0xcc, - 0x41, 0x8c, 0x08, 0x45, 0x3a, 0x07, 0x66, 0x80, 0xa9, 0x56, 0xa5, 0x50, 0x72, 0x00, 0x7a, 0x16, - 0x6a, 0xe4, 0xb1, 0x97, 0x8f, 0x8c, 0x6b, 0x7a, 0x95, 0x3c, 0xf6, 0x92, 0x20, 0x25, 0x82, 0x6b, - 0x23, 0xa7, 0xd4, 0xa1, 0x11, 0xed, 0x04, 0xd3, 0xb9, 0x03, 0x20, 0xb8, 0xa6, 0x13, 0x62, 0xa7, - 0xbf, 0x20, 0xdb, 0xbe, 0xaf, 0x57, 0x04, 0x42, 0xbb, 0xa7, 0xfd, 0xeb, 0x38, 0x4d, 0xea, 0xd8, - 0xc2, 0xce, 0x60, 0x32, 0x4d, 0x4e, 0xc4, 0x1a, 0xbd, 0x06, 0x57, 0x25, 0xf6, 0xf0, 0xda, 0x73, - 0x07, 0x7c, 0xc5, 0x92, 0x12, 0x0d, 0x39, 0x0c, 0x55, 0x8e, 0x1b, 0xd2, 0xe7, 0x9c, 0x80, 0x27, - 0x3a, 0x3d, 0x84, 0xa5, 0x71, 0xfb, 0xc8, 0x32, 0x03, 0xfb, 0x73, 0x9c, 0x9d, 0xf6, 0xbb, 0xe3, - 0x14, 0xbb, 0x66, 0x59, 0x98, 0x46, 0x77, 0x9f, 0x9f, 0x62, 0xcf, 0x18, 0xd1, 0x69, 0x3e, 0x5c, - 0xc9, 0x4b, 0xb8, 0xee, 0x12, 0xab, 0xf7, 0x79, 0x2a, 0x25, 0x80, 0xab, 0x79, 0x8e, 0xbb, 0xde, - 0xde, 0xe7, 0xcd, 0xf3, 0x23, 0x05, 0x1a, 0x82, 0x69, 0x07, 0x07, 0x94, 0xc4, 0x23, 0xd2, 0xc3, - 0xde, 0x9a, 0x3d, 0xe1, 0xf2, 0xaf, 0xc1, 0x6c, 0xc8, 0xc7, 0x1b, 0x11, 0x25, 0x20, 0xce, 0x8b, - 0x1b, 0x27, 0x9c, 0x40, 0x86, 0x89, 0x5e, 0x0b, 0x33, 0x2d, 0x8d, 0x40, 0x73, 0x84, 0x24, 0xfc, - 0x7c, 0x9c, 0xd4, 0x65, 0x31, 0x19, 0x0c, 0x87, 0xfb, 0xc9, 0x0a, 0x5f, 0x61, 0x46, 0x6e, 0x7b, - 0x53, 0x2f, 0xb1, 0xce, 0x6d, 0x96, 0x9f, 0x51, 0xc5, 0x19, 0xec, 0xbb, 0x8e, 0x65, 0x46, 0x8e, - 0xd7, 0x9d, 0x84, 0xcf, 0x26, 0x20, 0x33, 0x8e, 0x0e, 0xb0, 0x17, 0xb1, 0xc1, 0xc4, 0x33, 0xe2, - 0xc0, 0x15, 0x1c, 0x59, 0x4e, 0x62, 0x2d, 0xd7, 0xbb, 0xab, 0x3f, 0xd0, 0xe7, 0xf3, 0x03, 0x76, - 0x03, 0x17, 0xbd, 0x04, 0x28, 0x90, 0xfc, 0x89, 0x67, 0x50, 0x95, 0xe0, 0x80, 0x59, 0x66, 0x45, - 0x9f, 0xcf, 0xf4, 0x74, 0x58, 0x87, 0xb6, 0x03, 0x68, 0xdb, 0x0b, 0x23, 0xd3, 0xb3, 0x30, 0x4f, - 0xce, 0x6c, 0xd2, 0x6b, 0x6c, 0x05, 0x4a, 0x62, 0x03, 0x35, 0xef, 0xc0, 0x34, 0x9d, 0xcf, 0x21, - 0xba, 0x09, 0xb3, 0x98, 0x61, 0x60, 0xdb, 0x60, 0x6e, 0x80, 0x87, 0xbf, 0x35, 0x09, 0xa4, 0x03, - 0xb5, 0xbf, 0x9e, 0x86, 0x86, 0xa4, 0x77, 0x0f, 0x53, 0xc3, 0xdb, 0x77, 0xba, 0x71, 0xc0, 0x38, - 0x66, 0xa9, 0x7e, 0x3a, 0x25, 0xc9, 0xde, 0x01, 0x48, 0xf2, 0x6c, 0x52, 0x43, 0xcc, 0xbe, 0xc4, - 0xe2, 0x51, 0xfb, 0x92, 0xd9, 0xb6, 0x89, 0x22, 0xfb, 0xb7, 0x41, 0x95, 0x84, 0x87, 0x36, 0x28, - 0xbf, 0x43, 0x65, 0x22, 0x8b, 0xf6, 0x7d, 0xbd, 0x6e, 0x66, 0xdb, 0x3d, 0x74, 0x13, 0x4a, 0x3e, - 0xc6, 0x01, 0x5d, 0xf3, 0x29, 0xb6, 0x02, 0x70, 0x7c, 0xd4, 0x9a, 0x69, 0x63, 0x1c, 0x6c, 0x6f, - 0xea, 0x33, 0xb4, 0x6b, 0xdb, 0xa6, 0xf7, 0x6a, 0xd7, 0x09, 0x23, 0xec, 0xd1, 0x0b, 0xed, 0xf4, - 0x72, 0xf1, 0x56, 0x45, 0x4f, 0x01, 0xe8, 0xeb, 0x50, 0xdd, 0x73, 0xb1, 0x81, 0xf9, 0xd1, 0xdf, - 0x98, 0x61, 0xc9, 0xa0, 0x1f, 0x1f, 0xb6, 0xe0, 0x71, 0xda, 0x5a, 0xe9, 0xe0, 0x88, 0x5a, 0x50, - 0x27, 0x32, 0x23, 0xac, 0xc3, 0x9e, 0x8b, 0x65, 0x0c, 0x61, 0x80, 0xfa, 0xd8, 0xd9, 0x77, 0x0c, - 0x7f, 0xd5, 0x4f, 0x88, 0x97, 0x2e, 0x42, 0xbc, 0x4e, 0xc9, 0xb5, 0x57, 0x7d, 0xc9, 0xe0, 0x1b, - 0x50, 0xeb, 0xdb, 0x5e, 0x98, 0x10, 0x2f, 0x5f, 0x84, 0x78, 0x95, 0x92, 0x92, 0x94, 0xbf, 0x05, - 0xb3, 0x01, 0x76, 0xcd, 0xc3, 0x84, 0x74, 0xe5, 0x22, 0xa4, 0x6b, 0x8c, 0x96, 0xa0, 0xad, 0xdd, - 0x83, 0x5a, 0xb6, 0x17, 0x55, 0xa1, 0xb4, 0xeb, 0xf5, 0x3c, 0xf2, 0xd8, 0x53, 0x9f, 0xa1, 0x0d, - 0x81, 0xa7, 0x2a, 0xa8, 0x06, 0x65, 0x19, 0xdb, 0xa9, 0x05, 0x34, 0x07, 0xd5, 0x5d, 0xcf, 0x1c, - 0x98, 0x8e, 0x4b, 0x21, 0x6a, 0x51, 0xfb, 0x2e, 0x5c, 0x1d, 0x13, 0x70, 0x65, 0x2d, 0xf8, 0x7d, - 0x69, 0xc0, 0xe3, 0x83, 0x2a, 0x65, 0x7c, 0x50, 0x45, 0x6f, 0x65, 0x52, 0x07, 0xd4, 0x8c, 0xcb, - 0xba, 0x6c, 0x6a, 0x2f, 0xc2, 0x95, 0x91, 0x71, 0x68, 0x96, 0x79, 0x49, 0x30, 0xd7, 0xbe, 0x0d, - 0x97, 0x47, 0x05, 0x9a, 0x59, 0xdc, 0x2f, 0x5f, 0x48, 0x50, 0xed, 0x00, 0x6e, 0x0c, 0x6b, 0x23, - 0xc4, 0xa3, 0x55, 0x72, 0x41, 0x4e, 0x1f, 0x2a, 0x49, 0x8e, 0x21, 0x8d, 0xc6, 0xec, 0xe6, 0x41, - 0xc2, 0x20, 0x1b, 0x14, 0x2a, 0x17, 0x0d, 0x0a, 0x0b, 0x27, 0x82, 0xc2, 0x54, 0xab, 0xdf, 0x18, - 0xd6, 0x2a, 0x0f, 0x23, 0x9a, 0xaf, 0xa7, 0xa2, 0xe4, 0x8f, 0x45, 0xe5, 0xf4, 0x63, 0x31, 0xa5, - 0xfc, 0xcd, 0x11, 0x8b, 0x4b, 0x83, 0xa3, 0xcf, 0x80, 0x74, 0x1b, 0x6a, 0xd9, 0xc8, 0xe2, 0x33, - 0xa0, 0xa8, 0x43, 0x3d, 0x1f, 0x39, 0x7c, 0x06, 0x34, 0xdf, 0x83, 0x4b, 0x32, 0x8f, 0x24, 0x92, - 0x48, 0x6c, 0x91, 0x5f, 0x4e, 0x09, 0x67, 0x03, 0x2a, 0x65, 0x7c, 0x40, 0x95, 0x92, 0x7c, 0x04, - 0x0b, 0xc3, 0x59, 0x8c, 0x8d, 0x00, 0x9b, 0x51, 0xce, 0x36, 0xef, 0x4a, 0xdb, 0x3c, 0x23, 0x79, - 0xed, 0x7d, 0xb8, 0x3c, 0x4c, 0x95, 0x5e, 0x77, 0x9b, 0xaf, 0xa5, 0x92, 0x4e, 0xf2, 0x9e, 0x94, - 0x8a, 0xdb, 0x81, 0x2b, 0xc3, 0x84, 0x1f, 0x60, 0x73, 0x80, 0x2f, 0xa4, 0x03, 0x0b, 0x9e, 0x3b, - 0x91, 0xc9, 0xc9, 0x26, 0x5d, 0xa8, 0x99, 0xb9, 0x24, 0xbc, 0x18, 0x93, 0x0f, 0x15, 0x58, 0x3a, - 0x99, 0x2f, 0x12, 0x79, 0x19, 0x96, 0x4b, 0x69, 0xfe, 0xd4, 0xc4, 0xe4, 0xf3, 0x79, 0x94, 0xc2, - 0x69, 0x79, 0x94, 0x54, 0x92, 0x8f, 0x47, 0x64, 0xae, 0xb6, 0xbd, 0x81, 0x13, 0xb1, 0x53, 0x42, - 0xac, 0xfe, 0x39, 0xa6, 0xfa, 0xaa, 0xb4, 0x92, 0x49, 0x96, 0x56, 0xfb, 0x43, 0x05, 0xe6, 0x32, - 0x09, 0x57, 0x66, 0xd0, 0x1f, 0x29, 0x93, 0x6b, 0x62, 0xfc, 0x13, 0xd0, 0x88, 0x74, 0x70, 0xf1, - 0xac, 0xe9, 0xe0, 0x54, 0x6b, 0x7f, 0xa0, 0x40, 0x9d, 0xc9, 0xc9, 0x52, 0xba, 0xff, 0x67, 0xc5, - 0xfc, 0x23, 0x05, 0x50, 0xee, 0x55, 0x8d, 0xe5, 0xe1, 0xe9, 0x95, 0x80, 0x3f, 0xad, 0x59, 0x24, - 0x7d, 0xc8, 0x18, 0x71, 0x25, 0xc8, 0x66, 0xed, 0xf5, 0x1a, 0xce, 0xe6, 0xf0, 0xdf, 0xcc, 0xbc, - 0xf3, 0xf0, 0x0b, 0xc5, 0xe2, 0xc8, 0x85, 0x4d, 0x5e, 0x37, 0x12, 0xf4, 0xf4, 0xed, 0xab, 0x98, - 0x79, 0xfb, 0xd2, 0xfe, 0x44, 0x81, 0x79, 0x31, 0x82, 0x3f, 0x78, 0x7c, 0x56, 0x92, 0xbe, 0x01, - 0x25, 0xf9, 0x50, 0xc2, 0x05, 0x5d, 0x3a, 0xfd, 0x41, 0x4a, 0x97, 0xe8, 0xd9, 0x14, 0x7e, 0x31, - 0x9f, 0xc2, 0xff, 0xaf, 0x54, 0x58, 0x3e, 0xa9, 0x07, 0x4e, 0x18, 0x35, 0x7f, 0x70, 0x0e, 0x0b, - 0x78, 0x1e, 0xca, 0xa1, 0xe3, 0x59, 0x58, 0xde, 0x88, 0x04, 0x5e, 0x87, 0xc2, 0xe8, 0x8d, 0x88, - 0x75, 0x6e, 0xdb, 0xe8, 0x3a, 0x54, 0x38, 0x9e, 0x47, 0x1e, 0x33, 0x69, 0xca, 0x3a, 0x1f, 0xf8, - 0x2e, 0x79, 0x4c, 0x89, 0xc4, 0x5e, 0xe4, 0xb8, 0x32, 0xc4, 0x16, 0x44, 0x76, 0x29, 0x8c, 0x12, - 0x61, 0x9d, 0x9c, 0x08, 0xc7, 0xa3, 0x44, 0xa6, 0x39, 0x11, 0x06, 0xa0, 0x44, 0x6e, 0xd2, 0x80, - 0x72, 0x80, 0x83, 0x10, 0x1b, 0x24, 0xb0, 0x71, 0xc0, 0xa2, 0xec, 0x32, 0x8d, 0x0c, 0x19, 0xf0, - 0x21, 0x85, 0x69, 0xff, 0x29, 0x2f, 0x66, 0x42, 0x67, 0xff, 0x5f, 0xe6, 0xfd, 0xdf, 0x0a, 0x54, - 0x84, 0x6b, 0xdc, 0x27, 0x4d, 0x63, 0xf2, 0xf9, 0x4e, 0x74, 0xf7, 0x6f, 0xfe, 0xaa, 0x72, 0x1e, - 0xef, 0x39, 0x81, 0xff, 0xcf, 0xdf, 0xfe, 0x8a, 0xa7, 0x66, 0x4f, 0x3f, 0x80, 0xd9, 0x35, 0x2b, - 0x62, 0x15, 0x17, 0x8c, 0x5b, 0xb3, 0x3d, 0xf9, 0xf4, 0x17, 0x01, 0x5c, 0x62, 0x99, 0xae, 0x41, - 0x3c, 0xf7, 0x50, 0x84, 0xe9, 0x15, 0x06, 0x79, 0xe8, 0xb9, 0x87, 0xa9, 0xc3, 0xda, 0x81, 0xb9, - 0x4d, 0x6c, 0xe6, 0xb8, 0x5d, 0xe4, 0x98, 0xfd, 0x04, 0xa0, 0xb6, 0x43, 0x3c, 0x27, 0x22, 0xfc, - 0x60, 0x6b, 0xfe, 0xba, 0x02, 0x4d, 0xe6, 0x2b, 0x04, 0x74, 0xcd, 0x1e, 0xe0, 0x20, 0x72, 0x42, - 0xce, 0x2b, 0x7b, 0x55, 0x55, 0xc6, 0x5e, 0x55, 0x17, 0x60, 0xa6, 0x6f, 0xda, 0x76, 0xc0, 0x9f, - 0x28, 0x2b, 0xba, 0x68, 0xa1, 0x16, 0x54, 0xed, 0xc0, 0x19, 0xe0, 0xc0, 0xf0, 0xcc, 0x3e, 0x16, - 0x79, 0x02, 0xe0, 0xa0, 0x77, 0xcd, 0x3e, 0x7b, 0x77, 0x8d, 0x88, 0xef, 0x58, 0xfc, 0x1a, 0xac, - 0xf3, 0x46, 0xf3, 0x63, 0x05, 0xae, 0x64, 0x45, 0xa2, 0xdc, 0xde, 0x21, 0xb1, 0x67, 0xff, 0xaf, - 0x48, 0xf3, 0x0b, 0x0a, 0x5c, 0x1e, 0x96, 0x86, 0x06, 0x6b, 0x17, 0x13, 0x26, 0xe1, 0x55, 0xcc, - 0xf0, 0x42, 0x57, 0xa1, 0xe4, 0xd0, 0xcb, 0x8c, 0xbb, 0xcf, 0x64, 0x28, 0xeb, 0x33, 0x4e, 0xd8, - 0xc1, 0xee, 0x7e, 0xb3, 0x77, 0x52, 0x23, 0x2c, 0xae, 0x3b, 0x9b, 0x10, 0x13, 0x32, 0xfb, 0xe3, - 0xa2, 0x78, 0x9e, 0x16, 0xdc, 0xd0, 0x1a, 0x4c, 0x65, 0x4a, 0x4e, 0x5e, 0x3a, 0x71, 0x5a, 0x64, - 0xec, 0x69, 0xe5, 0xd1, 0xa1, 0x8f, 0xb3, 0x83, 0x75, 0x36, 0x14, 0x7d, 0x1b, 0xe6, 0x4c, 0x69, - 0x59, 0x46, 0xf6, 0x95, 0xe6, 0xf5, 0x53, 0xa9, 0x8d, 0xb7, 0x4c, 0xbd, 0x6e, 0xe6, 0x2d, 0xf5, - 0x3d, 0x00, 0xa6, 0x89, 0x7d, 0x6a, 0x29, 0x22, 0xaf, 0xbf, 0x7a, 0x66, 0xe2, 0x89, 0x8d, 0xe9, - 0x15, 0x3f, 0x31, 0xb7, 0x77, 0x81, 0x35, 0x8c, 0x0f, 0x88, 0xe3, 0x89, 0x12, 0x98, 0x97, 0x27, - 0xa2, 0x48, 0xed, 0x44, 0x2f, 0xfb, 0xd2, 0x62, 0xa4, 0x88, 0x2e, 0x5d, 0x3a, 0xe6, 0x76, 0x27, - 0x15, 0x91, 0x2d, 0x3a, 0x17, 0xf1, 0xdc, 0x71, 0xbd, 0x2f, 0x3d, 0xe9, 0x57, 0x64, 0xd8, 0xc1, - 0x3d, 0xe9, 0x0b, 0x67, 0x96, 0x44, 0x56, 0xe7, 0x9c, 0xf5, 0x11, 0xec, 0x2f, 0x14, 0x50, 0x87, - 0xed, 0x02, 0x2d, 0xc2, 0xb5, 0x61, 0xd8, 0xae, 0x67, 0xe3, 0x7d, 0xc7, 0xc3, 0xb6, 0xfa, 0x0c, - 0xd2, 0x60, 0x69, 0xb8, 0x3b, 0x6f, 0x00, 0xaa, 0x32, 0x8a, 0x44, 0xb2, 0x8e, 0x6a, 0x01, 0xdd, - 0x80, 0xc6, 0xa8, 0x6e, 0xba, 0x14, 0x6a, 0x71, 0xdc, 0x60, 0xa6, 0x56, 0x75, 0x4a, 0xfb, 0x7b, - 0x85, 0x3a, 0xde, 0xbd, 0xb8, 0x4b, 0x0f, 0x74, 0xc6, 0x30, 0xcc, 0x5e, 0xf9, 0x3e, 0x51, 0x26, - 0xbc, 0xf3, 0xa1, 0x7b, 0xb9, 0x0a, 0xb8, 0xc2, 0x53, 0x2a, 0xe0, 0xf8, 0x51, 0x38, 0xb2, 0x20, - 0x2e, 0x7f, 0x70, 0x16, 0x9f, 0x92, 0x34, 0xff, 0xa5, 0x22, 0x2c, 0xb0, 0x79, 0x6c, 0x7b, 0xa1, - 0x8f, 0x2d, 0x3e, 0x95, 0x4e, 0x44, 0x02, 0xdc, 0xfc, 0xc5, 0x73, 0x44, 0x29, 0x6d, 0x28, 0xbb, - 0xa4, 0x9b, 0x9d, 0xc3, 0xad, 0xe1, 0x39, 0x9c, 0xe0, 0xf6, 0x80, 0x74, 0xd9, 0x94, 0x18, 0x45, - 0xd1, 0xd0, 0x4b, 0x2e, 0xff, 0x68, 0xfe, 0x5b, 0xa2, 0xc9, 0x6b, 0x50, 0xb4, 0x92, 0x32, 0x98, - 0xd2, 0xf1, 0x51, 0xab, 0xb8, 0xb1, 0xbd, 0xa9, 0x53, 0x18, 0xba, 0x0b, 0x55, 0x51, 0x08, 0x63, - 0xa5, 0x95, 0x30, 0xf5, 0xe3, 0xa3, 0x16, 0xf0, 0x4a, 0x18, 0x16, 0xf4, 0x8b, 0x5a, 0x19, 0x56, - 0x84, 0xb7, 0x9d, 0xa9, 0xe5, 0xcb, 0x14, 0xcd, 0x15, 0x9f, 0x56, 0x34, 0x97, 0xd4, 0xf3, 0x25, - 0xa0, 0x7c, 0x60, 0x30, 0xf5, 0xb4, 0x12, 0x17, 0x79, 0x7b, 0x99, 0xc9, 0x97, 0x43, 0xf8, 0x00, - 0x4c, 0x2f, 0xe7, 0x3e, 0xc1, 0xb3, 0x39, 0x06, 0xe1, 0xf1, 0x79, 0xa5, 0x96, 0x78, 0x31, 0xe0, - 0x2e, 0x3f, 0xd4, 0x4b, 0xdc, 0xe7, 0x87, 0xda, 0xcf, 0x82, 0x3a, 0x9c, 0xb0, 0x42, 0x0b, 0x50, - 0x48, 0xd8, 0xb0, 0x3a, 0xa3, 0xf6, 0x7d, 0xbd, 0xe0, 0x9f, 0xf3, 0xed, 0x16, 0x35, 0x33, 0x37, - 0x1e, 0x7e, 0x1d, 0x48, 0xda, 0x9a, 0x0b, 0x37, 0xb2, 0x2f, 0x23, 0x9d, 0xd8, 0xe7, 0x89, 0x7c, - 0x01, 0x44, 0xcf, 0x42, 0x2d, 0x79, 0x83, 0x91, 0x47, 0x4b, 0x45, 0xaf, 0xca, 0x47, 0x16, 0xae, - 0x77, 0x55, 0xa2, 0x60, 0xcf, 0xf6, 0x89, 0x23, 0x8a, 0x03, 0x2b, 0xfa, 0x9c, 0x80, 0x6f, 0x09, - 0xb0, 0xf6, 0xef, 0x0a, 0xd4, 0xb2, 0xec, 0xf8, 0x89, 0xd7, 0xc3, 0x9e, 0xa0, 0xcb, 0x1b, 0x9f, - 0xd1, 0x23, 0xc8, 0x4f, 0x02, 0x0a, 0xe5, 0x74, 0x0c, 0x21, 0x09, 0xbf, 0x8b, 0x8e, 0x28, 0xed, - 0x3b, 0x4d, 0x09, 0xfa, 0x7c, 0x38, 0x04, 0x09, 0xd1, 0x12, 0x00, 0x7e, 0xe2, 0x3b, 0x3c, 0x23, - 0xcd, 0xac, 0xad, 0xa8, 0x67, 0x20, 0x9a, 0x09, 0x57, 0xa9, 0x90, 0x02, 0x7f, 0x83, 0xf4, 0x7d, - 0x17, 0x47, 0xf8, 0x1d, 0x97, 0x3c, 0x6e, 0x7e, 0x39, 0x35, 0xaa, 0x55, 0xa8, 0x59, 0xa6, 0xeb, - 0xee, 0x99, 0x56, 0x8f, 0x4d, 0x91, 0x87, 0x06, 0x73, 0xc7, 0x47, 0xad, 0xea, 0x86, 0x80, 0xd3, - 0xc9, 0x55, 0x25, 0xd2, 0x6e, 0xe0, 0xa6, 0x21, 0xe2, 0xef, 0x28, 0x70, 0x29, 0xc3, 0x63, 0xdb, - 0x73, 0x22, 0x46, 0x3f, 0x6f, 0xb4, 0x54, 0x2f, 0x19, 0xda, 0xbc, 0xde, 0x2a, 0x8e, 0x0e, 0x28, - 0xdd, 0x12, 0xed, 0xa4, 0x34, 0xdb, 0x99, 0xad, 0x9d, 0xe2, 0xb2, 0xad, 0x4d, 0xf1, 0x28, 0x8c, - 0xba, 0xb3, 0x10, 0x5b, 0x71, 0x80, 0x93, 0xc5, 0x28, 0x73, 0x77, 0xd6, 0x61, 0x50, 0x8a, 0x57, - 0xe1, 0x08, 0xbb, 0x81, 0xab, 0x7d, 0xa8, 0xc0, 0xbc, 0x54, 0x16, 0x53, 0x2a, 0xbb, 0x6f, 0x65, - 0x1c, 0x73, 0x37, 0xb3, 0x4f, 0x92, 0x97, 0x35, 0x65, 0xfc, 0xcb, 0x1a, 0x7a, 0x0d, 0x4a, 0x62, - 0x11, 0xcf, 0xf4, 0x0e, 0x28, 0x91, 0xb5, 0x9f, 0x1b, 0x12, 0x64, 0x83, 0xd8, 0x98, 0x6e, 0x89, - 0xc4, 0x22, 0xd8, 0xe6, 0xd4, 0x93, 0x36, 0x7a, 0x0e, 0xea, 0x16, 0xb1, 0xb1, 0x61, 0x1d, 0x98, - 0xae, 0x8b, 0xbd, 0xae, 0x2c, 0xd2, 0x9c, 0xa5, 0xd0, 0x0d, 0x09, 0xcc, 0xc9, 0x5d, 0x3c, 0xe5, - 0x45, 0xf0, 0x97, 0x15, 0x68, 0xe9, 0xf9, 0x27, 0x37, 0x6a, 0x53, 0xb8, 0xeb, 0x84, 0x91, 0xc8, - 0x5a, 0x35, 0xbf, 0x99, 0x5b, 0xb2, 0x33, 0xa9, 0xe3, 0x8c, 0x67, 0x7a, 0x6a, 0x2e, 0x3f, 0x03, - 0xcb, 0xa3, 0xc4, 0xe0, 0x10, 0x71, 0x63, 0x39, 0x6f, 0x5e, 0xb3, 0x25, 0x17, 0x73, 0x01, 0x0a, - 0x84, 0x3b, 0xae, 0x32, 0x77, 0x5c, 0x0f, 0xef, 0xeb, 0x05, 0xd2, 0xd3, 0x7e, 0x0f, 0x00, 0x3a, - 0x87, 0x61, 0x84, 0xfb, 0xec, 0x1a, 0x9a, 0xb1, 0x83, 0x1f, 0x26, 0xc7, 0xca, 0xdb, 0x50, 0xf2, - 0x03, 0x62, 0xe1, 0x30, 0x14, 0x3c, 0xb5, 0x13, 0x0b, 0x9c, 0x50, 0x58, 0x69, 0x73, 0x4c, 0x5d, - 0x0e, 0x41, 0x6f, 0x42, 0xd1, 0x5f, 0xf5, 0xc7, 0x25, 0x4a, 0xb2, 0x23, 0x57, 0xdb, 0xdc, 0xb2, - 0xdb, 0xab, 0x6d, 0x9d, 0x8e, 0x41, 0xdb, 0x50, 0x22, 0xc1, 0x9e, 0x13, 0xd9, 0x7b, 0x22, 0x1c, - 0x3d, 0x8d, 0xf1, 0x43, 0x8a, 0xb9, 0xb9, 0xce, 0xb5, 0x2d, 0x1a, 0xba, 0x1c, 0x4f, 0xfd, 0xd9, - 0x63, 0x33, 0xf0, 0x78, 0xa1, 0x66, 0x45, 0xe7, 0x8d, 0xe6, 0x8f, 0x14, 0x90, 0xa8, 0xc8, 0x48, - 0x5f, 0x24, 0x13, 0xa7, 0xcc, 0xa7, 0xfb, 0xea, 0xd3, 0xb9, 0xae, 0x64, 0x57, 0x30, 0x32, 0xa3, - 0x38, 0xd4, 0xe7, 0x04, 0xb5, 0xe4, 0x01, 0xe3, 0xbb, 0x30, 0x7f, 0x02, 0x8b, 0xda, 0xbb, 0x1f, - 0x90, 0x6e, 0x20, 0x95, 0x5b, 0xd4, 0x93, 0x36, 0x4b, 0x16, 0x99, 0x4f, 0x9c, 0x7e, 0xdc, 0x67, - 0xda, 0x2b, 0xea, 0xb2, 0x49, 0x47, 0xed, 0xc5, 0xfb, 0xfb, 0x38, 0x10, 0x05, 0x22, 0x45, 0x3d, - 0x69, 0xd3, 0x0b, 0x13, 0x2f, 0xfc, 0x11, 0xce, 0x4f, 0xb4, 0x9a, 0x2b, 0x40, 0x15, 0x8b, 0xbe, - 0x00, 0x73, 0x16, 0xf1, 0x3c, 0x6c, 0x51, 0xe7, 0x4b, 0x8f, 0x3a, 0xc9, 0xb7, 0x9e, 0x80, 0xe9, - 0x49, 0x18, 0x36, 0x3f, 0x9a, 0x81, 0x92, 0x58, 0x4c, 0x2a, 0xc9, 0x00, 0x07, 0x21, 0xf5, 0xa8, - 0xfc, 0x3c, 0x90, 0x4d, 0x7a, 0x07, 0x1a, 0x58, 0xa1, 0x11, 0xe0, 0x7d, 0xb1, 0x19, 0x67, 0x06, - 0x56, 0xa8, 0xe3, 0x7d, 0x7a, 0xe8, 0xc7, 0x7e, 0xe4, 0xf4, 0xb1, 0xd1, 0x0f, 0xb9, 0x8c, 0xfc, - 0xd0, 0xdf, 0x65, 0xc0, 0x9d, 0x8e, 0x5e, 0xe6, 0xdd, 0x3b, 0x21, 0x7a, 0x0b, 0xd4, 0x38, 0xc4, - 0x81, 0x61, 0xf9, 0xb1, 0x21, 0x47, 0x00, 0x1b, 0x31, 0x7f, 0x7c, 0xd4, 0x9a, 0xdd, 0x0d, 0x71, - 0xb0, 0xd1, 0xde, 0x7d, 0xc4, 0x87, 0xcd, 0x52, 0xd4, 0x0d, 0x3f, 0x7e, 0xc4, 0xc7, 0xfe, 0x04, - 0xa0, 0x90, 0xad, 0x46, 0x6e, 0x74, 0x95, 0x8d, 0x66, 0x55, 0x84, 0x7c, 0xad, 0xd2, 0xf1, 0x73, - 0x1c, 0x3d, 0xa5, 0xb0, 0x08, 0x10, 0x46, 0x66, 0xc0, 0x4b, 0x94, 0x1b, 0x35, 0xa6, 0x8b, 0x8a, - 0x80, 0xac, 0xb1, 0xbf, 0x21, 0x02, 0xd7, 0xe9, 0x3b, 0x91, 0x61, 0xc5, 0x41, 0x63, 0x96, 0x55, - 0x8e, 0x56, 0x38, 0x64, 0x23, 0x0e, 0xd0, 0x4d, 0x98, 0xf5, 0xe2, 0xbe, 0xd1, 0x25, 0x01, 0x89, - 0x23, 0xc7, 0xc3, 0x8d, 0x3a, 0x23, 0x50, 0xf3, 0xe2, 0xfe, 0x3d, 0x09, 0xa3, 0x4b, 0xe2, 0x91, - 0x7d, 0xc7, 0xc5, 0x8d, 0x39, 0xbe, 0x24, 0xbc, 0x85, 0x5e, 0x82, 0x4b, 0x11, 0x21, 0x46, 0xdf, - 0xf4, 0x0e, 0x0d, 0xe2, 0x63, 0xcf, 0xa0, 0xd0, 0xb0, 0xa1, 0xb2, 0xcb, 0xa4, 0x1a, 0x11, 0xb2, - 0x63, 0x7a, 0x87, 0x0f, 0x7d, 0xec, 0xbd, 0x43, 0xe1, 0xf4, 0xaa, 0x4a, 0x79, 0x59, 0x7e, 0xdc, - 0x98, 0x67, 0x13, 0x64, 0x57, 0xd5, 0x77, 0x63, 0x3a, 0x3b, 0x7d, 0xc6, 0x8b, 0xe9, 0xa4, 0xa8, - 0xbc, 0x5d, 0x62, 0xc8, 0xd5, 0x42, 0x6c, 0x4d, 0x2a, 0x5d, 0xf2, 0x75, 0xb1, 0x5e, 0x2f, 0x80, - 0x4a, 0x7c, 0x1c, 0xb0, 0xf2, 0x07, 0x83, 0xab, 0xa2, 0x71, 0x89, 0xc7, 0x04, 0x09, 0x9c, 0xab, - 0x0c, 0x5d, 0x87, 0xca, 0x01, 0x09, 0x23, 0x7e, 0xd9, 0xbf, 0xcc, 0x70, 0xca, 0x14, 0xc0, 0xae, - 0xfa, 0x08, 0xa6, 0xcc, 0xc0, 0x3a, 0x68, 0x5c, 0x61, 0x70, 0xf6, 0x9d, 0x51, 0x55, 0xdf, 0x7c, - 0xd2, 0x58, 0xc8, 0xaa, 0x6a, 0xc7, 0x7c, 0x42, 0x8f, 0x30, 0xdf, 0xb1, 0x1b, 0x57, 0x99, 0xe8, - 0x7c, 0xa3, 0xd3, 0xe8, 0xd4, 0x77, 0x6c, 0x74, 0x03, 0xa6, 0x7c, 0xda, 0xd7, 0x60, 0x7d, 0xe5, - 0xe3, 0xa3, 0xd6, 0x54, 0x9b, 0x76, 0x32, 0x28, 0xdf, 0x23, 0x0e, 0x09, 0x9c, 0xe8, 0xb0, 0x71, - 0x4d, 0xee, 0x11, 0xde, 0x66, 0xe7, 0xa2, 0x63, 0x37, 0x9a, 0x29, 0xd1, 0x5d, 0x4a, 0x34, 0x76, - 0x6c, 0xd4, 0x82, 0xea, 0x63, 0x12, 0xf4, 0xe8, 0x44, 0x6d, 0x27, 0x68, 0x5c, 0xe7, 0xe9, 0x0a, - 0x01, 0xda, 0x74, 0x02, 0xba, 0x15, 0x84, 0xed, 0x50, 0x9b, 0x62, 0xd3, 0xbc, 0xc1, 0x90, 0xea, - 0x1c, 0xbc, 0x2b, 0xa0, 0xda, 0xd1, 0x34, 0x94, 0xd9, 0xd5, 0x66, 0xe8, 0xa8, 0x7c, 0x5b, 0x7a, - 0xc8, 0x57, 0x60, 0x5a, 0x6e, 0xa5, 0xe2, 0xa8, 0xbc, 0xb5, 0x1c, 0xcc, 0x3e, 0x74, 0x8e, 0xdb, - 0xfc, 0xfd, 0x02, 0x4c, 0xd1, 0x76, 0xa6, 0x78, 0xbd, 0x92, 0x2b, 0x5e, 0x7f, 0x0d, 0x66, 0xa8, - 0x05, 0x61, 0x1e, 0xae, 0x8f, 0x70, 0x9e, 0x09, 0x59, 0x9d, 0xa2, 0xe9, 0x02, 0x9b, 0x9a, 0x1b, - 0x0e, 0x02, 0x12, 0xf0, 0x98, 0xaa, 0xa2, 0x8b, 0x16, 0x7a, 0x1b, 0xca, 0xfb, 0xd8, 0x8c, 0xe2, - 0x00, 0x73, 0x37, 0x58, 0x1f, 0xf1, 0x07, 0x81, 0xa4, 0xf8, 0x0e, 0x47, 0xd4, 0x93, 0x11, 0x54, - 0x9d, 0x7d, 0xc7, 0x33, 0x5c, 0x33, 0xc2, 0x9e, 0x75, 0xc8, 0x2e, 0xdf, 0x45, 0x1d, 0xfa, 0x8e, - 0xf7, 0x80, 0x43, 0xa8, 0xbd, 0x38, 0xa1, 0xc1, 0x32, 0x6d, 0x58, 0x64, 0x3c, 0xcb, 0x4e, 0xc8, - 0xf2, 0x7c, 0x18, 0xbd, 0x0e, 0x15, 0xdb, 0x09, 0xb0, 0xc5, 0xa2, 0xb2, 0xd2, 0xe8, 0x4b, 0xc4, - 0xa6, 0x44, 0xd0, 0x53, 0xdc, 0xe6, 0x3f, 0xd2, 0x63, 0x88, 0xce, 0x2b, 0x4f, 0x5f, 0x19, 0xa2, - 0xdf, 0x80, 0x92, 0x69, 0xdb, 0xcc, 0x8d, 0x72, 0x3f, 0x24, 0x9b, 0x79, 0xce, 0xc5, 0xb3, 0x73, - 0xa6, 0x24, 0xe5, 0x64, 0xb9, 0x27, 0x95, 0x4d, 0xf4, 0x26, 0x94, 0xc2, 0x28, 0xc0, 0x66, 0x9f, - 0xd7, 0x95, 0x54, 0x57, 0x5b, 0x63, 0xf5, 0xd8, 0x61, 0x78, 0xba, 0xc4, 0x6f, 0x2e, 0xc3, 0x0c, - 0x07, 0x8d, 0x5b, 0x75, 0x2d, 0x80, 0x92, 0x50, 0x3e, 0x42, 0x50, 0x17, 0x45, 0x12, 0x02, 0xa2, - 0x3e, 0x83, 0x54, 0xa8, 0xad, 0x53, 0x5e, 0x12, 0xa2, 0xa0, 0x3a, 0xc0, 0xfa, 0x83, 0x2d, 0xd9, - 0x2e, 0x50, 0x8c, 0x07, 0xc4, 0x32, 0x5d, 0x09, 0x29, 0x52, 0x8c, 0x47, 0x24, 0x90, 0xed, 0x29, - 0x34, 0x07, 0xd5, 0xf7, 0x62, 0xc7, 0x92, 0x80, 0x69, 0xed, 0x13, 0x05, 0xe6, 0xd3, 0x07, 0xa0, - 0x76, 0x80, 0xe9, 0x45, 0xb0, 0xf9, 0x6e, 0x1a, 0x74, 0x5c, 0x86, 0x69, 0xf6, 0xc6, 0x2c, 0x7f, - 0x39, 0x62, 0x0d, 0xf4, 0x12, 0x20, 0x9b, 0x97, 0x3f, 0x18, 0xe2, 0x4f, 0x0d, 0xaa, 0x63, 0x9e, - 0x8a, 0x9d, 0x17, 0x3d, 0x5b, 0x49, 0x47, 0x73, 0x4d, 0x6e, 0x97, 0x37, 0xa0, 0x9e, 0x7f, 0x89, - 0x12, 0x37, 0x2a, 0xe6, 0xee, 0x73, 0x0f, 0x51, 0xfa, 0x6c, 0xee, 0x1d, 0x4a, 0x7b, 0x02, 0x28, - 0xed, 0xd7, 0x71, 0x14, 0x38, 0x78, 0x80, 0x9b, 0x1b, 0xa9, 0xa0, 0xe7, 0x26, 0xdd, 0x5c, 0x94, - 0xd2, 0x25, 0x73, 0x2d, 0x64, 0xe6, 0x7a, 0xdb, 0x81, 0x34, 0x99, 0x80, 0x16, 0xc4, 0x1b, 0x18, - 0x6d, 0x64, 0x73, 0x2e, 0x97, 0xc5, 0x53, 0x06, 0x85, 0x8b, 0x12, 0x26, 0x55, 0xc9, 0x41, 0xc5, - 0x45, 0x52, 0x2d, 0xa0, 0x86, 0xf8, 0xe9, 0x80, 0x42, 0x33, 0xaf, 0xa5, 0x6a, 0xf1, 0xf6, 0x3f, - 0x97, 0xa0, 0x92, 0xde, 0x9e, 0x17, 0x00, 0x25, 0x8d, 0x2c, 0xaf, 0x9b, 0xd0, 0x4a, 0xe0, 0xe2, - 0xfd, 0x24, 0xfd, 0x1f, 0x83, 0x95, 0xf4, 0xa9, 0xca, 0x49, 0xa4, 0xec, 0xff, 0x0d, 0x1c, 0xa9, - 0x80, 0x5a, 0x70, 0x3d, 0x41, 0x3a, 0x59, 0x40, 0xae, 0x62, 0xb4, 0x08, 0xd7, 0x46, 0x22, 0x3c, - 0xc0, 0xfb, 0x91, 0xba, 0x8f, 0x6e, 0xc3, 0xf3, 0xc3, 0xdd, 0xa3, 0x6b, 0xb5, 0xd5, 0x2e, 0x7a, - 0x01, 0x9e, 0x3b, 0x1d, 0x57, 0x16, 0x02, 0x1d, 0xa0, 0x2f, 0xc2, 0x9d, 0xd3, 0x51, 0xf3, 0xa5, - 0xd6, 0xaa, 0x83, 0x56, 0x61, 0xe5, 0xf4, 0x11, 0x0f, 0xe3, 0xa8, 0x4b, 0x1c, 0xaf, 0x2b, 0x6b, - 0xa3, 0xd5, 0x0f, 0xd0, 0x0a, 0xdc, 0x3e, 0xdb, 0x98, 0x0e, 0xf6, 0x22, 0xb5, 0xf7, 0x74, 0x1e, - 0xdb, 0x9e, 0x45, 0xfa, 0x8e, 0xd7, 0x95, 0x55, 0xc3, 0xaa, 0x8b, 0x5e, 0x81, 0xbb, 0x67, 0x1b, - 0x93, 0x14, 0xe3, 0xaa, 0xfd, 0xb3, 0x33, 0x92, 0x55, 0xb4, 0xaa, 0x87, 0x34, 0x58, 0x1a, 0x33, - 0x46, 0xd4, 0xb3, 0xaa, 0x04, 0xfd, 0x18, 0x2c, 0x8f, 0xc1, 0x49, 0x2a, 0x50, 0x55, 0x1f, 0x69, - 0xb0, 0x98, 0x60, 0x0d, 0x95, 0x84, 0x70, 0xb3, 0xf9, 0x07, 0x05, 0x7d, 0x11, 0x5e, 0x4c, 0x70, - 0x4e, 0xad, 0x6f, 0xe0, 0x23, 0xfe, 0xb4, 0x80, 0x5e, 0xcd, 0x28, 0xe2, 0x64, 0x85, 0x40, 0xe6, - 0xff, 0x8d, 0x35, 0xcf, 0x23, 0xb1, 0x67, 0x61, 0x5b, 0xfd, 0xb3, 0x02, 0x5a, 0x81, 0x17, 0xc6, - 0xf3, 0xc9, 0x55, 0x38, 0x60, 0x5b, 0xfd, 0xf3, 0x02, 0x7a, 0x1e, 0x9e, 0x1d, 0x9e, 0xe1, 0x89, - 0x72, 0x57, 0xf5, 0x37, 0x8a, 0xe8, 0x16, 0xdc, 0x3c, 0x0d, 0x4f, 0x14, 0xa3, 0xaa, 0xbf, 0x59, - 0x44, 0x4b, 0x99, 0x0d, 0x30, 0x5c, 0x44, 0xaa, 0x7e, 0xaf, 0x98, 0xe3, 0x98, 0x7b, 0xc4, 0x6d, - 0xf3, 0xec, 0x15, 0xb3, 0x9d, 0x1f, 0x95, 0x6e, 0xff, 0x9a, 0x02, 0x8d, 0x71, 0xd9, 0x3d, 0xf4, - 0x1c, 0x3c, 0x3b, 0xae, 0x6f, 0x68, 0xdf, 0x8f, 0x43, 0x13, 0x2f, 0xa8, 0xaa, 0x42, 0x17, 0x79, - 0x3c, 0x12, 0x17, 0x4d, 0x2d, 0xdc, 0xfe, 0x1b, 0x25, 0xa9, 0x4a, 0xe2, 0x55, 0x79, 0xd7, 0x92, - 0x02, 0x28, 0xd6, 0xce, 0xb2, 0x1d, 0xea, 0x7a, 0x44, 0x84, 0x15, 0xaa, 0x0a, 0xf5, 0x64, 0xd9, - 0xae, 0xc4, 0xf0, 0x0b, 0xe8, 0x0a, 0xcc, 0x67, 0x7b, 0xb8, 0xe6, 0x8b, 0xe8, 0x6a, 0x52, 0x66, - 0x24, 0x06, 0x70, 0x45, 0x4f, 0x0d, 0x33, 0x49, 0xb7, 0xc3, 0xf4, 0xf0, 0x18, 0x69, 0xcf, 0x33, - 0xb7, 0xef, 0x41, 0x25, 0x39, 0xbe, 0xe9, 0x49, 0x27, 0x4e, 0xcc, 0x4d, 0x27, 0x50, 0x9f, 0xa1, - 0xed, 0x6d, 0x6f, 0x8f, 0xc4, 0x9e, 0x4d, 0xdb, 0x0a, 0x3d, 0xf9, 0x1e, 0xc6, 0x51, 0x02, 0x28, - 0xa0, 0x0a, 0x4c, 0xaf, 0x3b, 0xf4, 0xb3, 0xb8, 0xfe, 0xea, 0xa7, 0x3f, 0x5c, 0x7a, 0xe6, 0xfb, - 0xc7, 0x4b, 0xca, 0xa7, 0xc7, 0x4b, 0xca, 0x0f, 0x8e, 0x97, 0x94, 0x6f, 0x69, 0xe2, 0x54, 0xc7, - 0xd6, 0xc1, 0x5d, 0xf6, 0x79, 0xb7, 0x4b, 0xee, 0xfa, 0xbd, 0xee, 0xdd, 0xf4, 0x77, 0xf7, 0xbd, - 0x19, 0xf6, 0x8b, 0xe5, 0x2b, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x2f, 0x61, 0x81, 0x03, - 0x3f, 0x00, 0x00, + proto.RegisterEnum("berty.protocol.v1.GroupType", GroupType_name, GroupType_value) + proto.RegisterEnum("berty.protocol.v1.EventType", EventType_name, EventType_value) + proto.RegisterEnum("berty.protocol.v1.DebugInspectGroupLogType", DebugInspectGroupLogType_name, DebugInspectGroupLogType_value) + proto.RegisterEnum("berty.protocol.v1.ContactState", ContactState_name, ContactState_value) + proto.RegisterEnum("berty.protocol.v1.Direction", Direction_name, Direction_value) + proto.RegisterEnum("berty.protocol.v1.InstanceGetConfiguration_SettingState", InstanceGetConfiguration_SettingState_name, InstanceGetConfiguration_SettingState_value) + proto.RegisterEnum("berty.protocol.v1.MonitorGroup_TypeEventMonitor", MonitorGroup_TypeEventMonitor_name, MonitorGroup_TypeEventMonitor_value) + proto.RegisterEnum("berty.protocol.v1.PeerList_Feature", PeerList_Feature_name, PeerList_Feature_value) + proto.RegisterType((*Account)(nil), "berty.protocol.v1.Account") + proto.RegisterType((*Group)(nil), "berty.protocol.v1.Group") + proto.RegisterType((*GroupHeadsExport)(nil), "berty.protocol.v1.GroupHeadsExport") + proto.RegisterType((*GroupMetadata)(nil), "berty.protocol.v1.GroupMetadata") + proto.RegisterType((*GroupEnvelope)(nil), "berty.protocol.v1.GroupEnvelope") + proto.RegisterType((*MessageHeaders)(nil), "berty.protocol.v1.MessageHeaders") + proto.RegisterMapType((map[string]string)(nil), "berty.protocol.v1.MessageHeaders.MetadataEntry") + proto.RegisterType((*ProtocolMetadata)(nil), "berty.protocol.v1.ProtocolMetadata") + proto.RegisterType((*EncryptedMessage)(nil), "berty.protocol.v1.EncryptedMessage") + proto.RegisterType((*MessageEnvelope)(nil), "berty.protocol.v1.MessageEnvelope") + proto.RegisterType((*EventContext)(nil), "berty.protocol.v1.EventContext") + proto.RegisterType((*AppMetadata)(nil), "berty.protocol.v1.AppMetadata") + proto.RegisterType((*ContactAddAliasKey)(nil), "berty.protocol.v1.ContactAddAliasKey") + proto.RegisterType((*GroupAddMemberDevice)(nil), "berty.protocol.v1.GroupAddMemberDevice") + proto.RegisterType((*DeviceSecret)(nil), "berty.protocol.v1.DeviceSecret") + proto.RegisterType((*GroupAddDeviceSecret)(nil), "berty.protocol.v1.GroupAddDeviceSecret") + proto.RegisterType((*MultiMemberGroupAddAliasResolver)(nil), "berty.protocol.v1.MultiMemberGroupAddAliasResolver") + proto.RegisterType((*MultiMemberGrantAdminRole)(nil), "berty.protocol.v1.MultiMemberGrantAdminRole") + proto.RegisterType((*MultiMemberInitialMember)(nil), "berty.protocol.v1.MultiMemberInitialMember") + proto.RegisterType((*GroupAddAdditionalRendezvousSeed)(nil), "berty.protocol.v1.GroupAddAdditionalRendezvousSeed") + proto.RegisterType((*GroupRemoveAdditionalRendezvousSeed)(nil), "berty.protocol.v1.GroupRemoveAdditionalRendezvousSeed") + proto.RegisterType((*AccountGroupJoined)(nil), "berty.protocol.v1.AccountGroupJoined") + proto.RegisterType((*AccountGroupLeft)(nil), "berty.protocol.v1.AccountGroupLeft") + proto.RegisterType((*AccountContactRequestDisabled)(nil), "berty.protocol.v1.AccountContactRequestDisabled") + proto.RegisterType((*AccountContactRequestEnabled)(nil), "berty.protocol.v1.AccountContactRequestEnabled") + proto.RegisterType((*AccountContactRequestReferenceReset)(nil), "berty.protocol.v1.AccountContactRequestReferenceReset") + proto.RegisterType((*AccountContactRequestEnqueued)(nil), "berty.protocol.v1.AccountContactRequestEnqueued") + proto.RegisterType((*AccountContactRequestSent)(nil), "berty.protocol.v1.AccountContactRequestSent") + proto.RegisterType((*AccountContactRequestReceived)(nil), "berty.protocol.v1.AccountContactRequestReceived") + proto.RegisterType((*AccountContactRequestDiscarded)(nil), "berty.protocol.v1.AccountContactRequestDiscarded") + proto.RegisterType((*AccountContactRequestAccepted)(nil), "berty.protocol.v1.AccountContactRequestAccepted") + proto.RegisterType((*AccountContactBlocked)(nil), "berty.protocol.v1.AccountContactBlocked") + proto.RegisterType((*AccountContactUnblocked)(nil), "berty.protocol.v1.AccountContactUnblocked") + proto.RegisterType((*AccountServiceTokenAdded)(nil), "berty.protocol.v1.AccountServiceTokenAdded") + proto.RegisterType((*AccountServiceTokenRemoved)(nil), "berty.protocol.v1.AccountServiceTokenRemoved") + proto.RegisterType((*GroupReplicating)(nil), "berty.protocol.v1.GroupReplicating") + proto.RegisterType((*InstanceExportData)(nil), "berty.protocol.v1.InstanceExportData") + proto.RegisterType((*InstanceExportData_Request)(nil), "berty.protocol.v1.InstanceExportData.Request") + proto.RegisterType((*InstanceExportData_Reply)(nil), "berty.protocol.v1.InstanceExportData.Reply") + proto.RegisterType((*InstanceGetConfiguration)(nil), "berty.protocol.v1.InstanceGetConfiguration") + proto.RegisterType((*InstanceGetConfiguration_Request)(nil), "berty.protocol.v1.InstanceGetConfiguration.Request") + proto.RegisterType((*InstanceGetConfiguration_Reply)(nil), "berty.protocol.v1.InstanceGetConfiguration.Reply") + proto.RegisterType((*ContactRequestReference)(nil), "berty.protocol.v1.ContactRequestReference") + proto.RegisterType((*ContactRequestReference_Request)(nil), "berty.protocol.v1.ContactRequestReference.Request") + proto.RegisterType((*ContactRequestReference_Reply)(nil), "berty.protocol.v1.ContactRequestReference.Reply") + proto.RegisterType((*ContactRequestDisable)(nil), "berty.protocol.v1.ContactRequestDisable") + proto.RegisterType((*ContactRequestDisable_Request)(nil), "berty.protocol.v1.ContactRequestDisable.Request") + proto.RegisterType((*ContactRequestDisable_Reply)(nil), "berty.protocol.v1.ContactRequestDisable.Reply") + proto.RegisterType((*ContactRequestEnable)(nil), "berty.protocol.v1.ContactRequestEnable") + proto.RegisterType((*ContactRequestEnable_Request)(nil), "berty.protocol.v1.ContactRequestEnable.Request") + proto.RegisterType((*ContactRequestEnable_Reply)(nil), "berty.protocol.v1.ContactRequestEnable.Reply") + proto.RegisterType((*ContactRequestResetReference)(nil), "berty.protocol.v1.ContactRequestResetReference") + proto.RegisterType((*ContactRequestResetReference_Request)(nil), "berty.protocol.v1.ContactRequestResetReference.Request") + proto.RegisterType((*ContactRequestResetReference_Reply)(nil), "berty.protocol.v1.ContactRequestResetReference.Reply") + proto.RegisterType((*ContactRequestSend)(nil), "berty.protocol.v1.ContactRequestSend") + proto.RegisterType((*ContactRequestSend_Request)(nil), "berty.protocol.v1.ContactRequestSend.Request") + proto.RegisterType((*ContactRequestSend_Reply)(nil), "berty.protocol.v1.ContactRequestSend.Reply") + proto.RegisterType((*ContactRequestAccept)(nil), "berty.protocol.v1.ContactRequestAccept") + proto.RegisterType((*ContactRequestAccept_Request)(nil), "berty.protocol.v1.ContactRequestAccept.Request") + proto.RegisterType((*ContactRequestAccept_Reply)(nil), "berty.protocol.v1.ContactRequestAccept.Reply") + proto.RegisterType((*ContactRequestDiscard)(nil), "berty.protocol.v1.ContactRequestDiscard") + proto.RegisterType((*ContactRequestDiscard_Request)(nil), "berty.protocol.v1.ContactRequestDiscard.Request") + proto.RegisterType((*ContactRequestDiscard_Reply)(nil), "berty.protocol.v1.ContactRequestDiscard.Reply") + proto.RegisterType((*ContactBlock)(nil), "berty.protocol.v1.ContactBlock") + proto.RegisterType((*ContactBlock_Request)(nil), "berty.protocol.v1.ContactBlock.Request") + proto.RegisterType((*ContactBlock_Reply)(nil), "berty.protocol.v1.ContactBlock.Reply") + proto.RegisterType((*ContactUnblock)(nil), "berty.protocol.v1.ContactUnblock") + proto.RegisterType((*ContactUnblock_Request)(nil), "berty.protocol.v1.ContactUnblock.Request") + proto.RegisterType((*ContactUnblock_Reply)(nil), "berty.protocol.v1.ContactUnblock.Reply") + proto.RegisterType((*ContactAliasKeySend)(nil), "berty.protocol.v1.ContactAliasKeySend") + proto.RegisterType((*ContactAliasKeySend_Request)(nil), "berty.protocol.v1.ContactAliasKeySend.Request") + proto.RegisterType((*ContactAliasKeySend_Reply)(nil), "berty.protocol.v1.ContactAliasKeySend.Reply") + proto.RegisterType((*MultiMemberGroupCreate)(nil), "berty.protocol.v1.MultiMemberGroupCreate") + proto.RegisterType((*MultiMemberGroupCreate_Request)(nil), "berty.protocol.v1.MultiMemberGroupCreate.Request") + proto.RegisterType((*MultiMemberGroupCreate_Reply)(nil), "berty.protocol.v1.MultiMemberGroupCreate.Reply") + proto.RegisterType((*MultiMemberGroupJoin)(nil), "berty.protocol.v1.MultiMemberGroupJoin") + proto.RegisterType((*MultiMemberGroupJoin_Request)(nil), "berty.protocol.v1.MultiMemberGroupJoin.Request") + proto.RegisterType((*MultiMemberGroupJoin_Reply)(nil), "berty.protocol.v1.MultiMemberGroupJoin.Reply") + proto.RegisterType((*MultiMemberGroupLeave)(nil), "berty.protocol.v1.MultiMemberGroupLeave") + proto.RegisterType((*MultiMemberGroupLeave_Request)(nil), "berty.protocol.v1.MultiMemberGroupLeave.Request") + proto.RegisterType((*MultiMemberGroupLeave_Reply)(nil), "berty.protocol.v1.MultiMemberGroupLeave.Reply") + proto.RegisterType((*MultiMemberGroupAliasResolverDisclose)(nil), "berty.protocol.v1.MultiMemberGroupAliasResolverDisclose") + proto.RegisterType((*MultiMemberGroupAliasResolverDisclose_Request)(nil), "berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request") + proto.RegisterType((*MultiMemberGroupAliasResolverDisclose_Reply)(nil), "berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply") + proto.RegisterType((*MultiMemberGroupAdminRoleGrant)(nil), "berty.protocol.v1.MultiMemberGroupAdminRoleGrant") + proto.RegisterType((*MultiMemberGroupAdminRoleGrant_Request)(nil), "berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request") + proto.RegisterType((*MultiMemberGroupAdminRoleGrant_Reply)(nil), "berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply") + proto.RegisterType((*MultiMemberGroupInvitationCreate)(nil), "berty.protocol.v1.MultiMemberGroupInvitationCreate") + proto.RegisterType((*MultiMemberGroupInvitationCreate_Request)(nil), "berty.protocol.v1.MultiMemberGroupInvitationCreate.Request") + proto.RegisterType((*MultiMemberGroupInvitationCreate_Reply)(nil), "berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply") + proto.RegisterType((*AppMetadataSend)(nil), "berty.protocol.v1.AppMetadataSend") + proto.RegisterType((*AppMetadataSend_Request)(nil), "berty.protocol.v1.AppMetadataSend.Request") + proto.RegisterType((*AppMetadataSend_Reply)(nil), "berty.protocol.v1.AppMetadataSend.Reply") + proto.RegisterType((*AppMessageSend)(nil), "berty.protocol.v1.AppMessageSend") + proto.RegisterType((*AppMessageSend_Request)(nil), "berty.protocol.v1.AppMessageSend.Request") + proto.RegisterType((*AppMessageSend_Reply)(nil), "berty.protocol.v1.AppMessageSend.Reply") + proto.RegisterType((*GroupMetadataEvent)(nil), "berty.protocol.v1.GroupMetadataEvent") + proto.RegisterType((*GroupMessageEvent)(nil), "berty.protocol.v1.GroupMessageEvent") + proto.RegisterType((*GroupMetadataList)(nil), "berty.protocol.v1.GroupMetadataList") + proto.RegisterType((*GroupMetadataList_Request)(nil), "berty.protocol.v1.GroupMetadataList.Request") + proto.RegisterType((*GroupMessageList)(nil), "berty.protocol.v1.GroupMessageList") + proto.RegisterType((*GroupMessageList_Request)(nil), "berty.protocol.v1.GroupMessageList.Request") + proto.RegisterType((*GroupInfo)(nil), "berty.protocol.v1.GroupInfo") + proto.RegisterType((*GroupInfo_Request)(nil), "berty.protocol.v1.GroupInfo.Request") + proto.RegisterType((*GroupInfo_Reply)(nil), "berty.protocol.v1.GroupInfo.Reply") + proto.RegisterType((*ActivateGroup)(nil), "berty.protocol.v1.ActivateGroup") + proto.RegisterType((*ActivateGroup_Request)(nil), "berty.protocol.v1.ActivateGroup.Request") + proto.RegisterType((*ActivateGroup_Reply)(nil), "berty.protocol.v1.ActivateGroup.Reply") + proto.RegisterType((*DeactivateGroup)(nil), "berty.protocol.v1.DeactivateGroup") + proto.RegisterType((*DeactivateGroup_Request)(nil), "berty.protocol.v1.DeactivateGroup.Request") + proto.RegisterType((*DeactivateGroup_Reply)(nil), "berty.protocol.v1.DeactivateGroup.Reply") + proto.RegisterType((*MonitorGroup)(nil), "berty.protocol.v1.MonitorGroup") + proto.RegisterType((*MonitorGroup_EventMonitorAdvertiseGroup)(nil), "berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup") + proto.RegisterType((*MonitorGroup_EventMonitorPeerFound)(nil), "berty.protocol.v1.MonitorGroup.EventMonitorPeerFound") + proto.RegisterType((*MonitorGroup_EventMonitorPeerJoin)(nil), "berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin") + proto.RegisterType((*MonitorGroup_EventMonitorPeerLeave)(nil), "berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave") + proto.RegisterType((*MonitorGroup_EventMonitor)(nil), "berty.protocol.v1.MonitorGroup.EventMonitor") + proto.RegisterType((*MonitorGroup_Request)(nil), "berty.protocol.v1.MonitorGroup.Request") + proto.RegisterType((*MonitorGroup_Reply)(nil), "berty.protocol.v1.MonitorGroup.Reply") + proto.RegisterType((*DebugListGroups)(nil), "berty.protocol.v1.DebugListGroups") + proto.RegisterType((*DebugListGroups_Request)(nil), "berty.protocol.v1.DebugListGroups.Request") + proto.RegisterType((*DebugListGroups_Reply)(nil), "berty.protocol.v1.DebugListGroups.Reply") + proto.RegisterType((*DebugInspectGroupStore)(nil), "berty.protocol.v1.DebugInspectGroupStore") + proto.RegisterType((*DebugInspectGroupStore_Request)(nil), "berty.protocol.v1.DebugInspectGroupStore.Request") + proto.RegisterType((*DebugInspectGroupStore_Reply)(nil), "berty.protocol.v1.DebugInspectGroupStore.Reply") + proto.RegisterType((*DebugGroup)(nil), "berty.protocol.v1.DebugGroup") + proto.RegisterType((*DebugGroup_Request)(nil), "berty.protocol.v1.DebugGroup.Request") + proto.RegisterType((*DebugGroup_Reply)(nil), "berty.protocol.v1.DebugGroup.Reply") + proto.RegisterType((*ShareableContact)(nil), "berty.protocol.v1.ShareableContact") + proto.RegisterType((*ServiceTokenSupportedService)(nil), "berty.protocol.v1.ServiceTokenSupportedService") + proto.RegisterType((*ServiceToken)(nil), "berty.protocol.v1.ServiceToken") + proto.RegisterType((*AuthServiceCompleteFlow)(nil), "berty.protocol.v1.AuthServiceCompleteFlow") + proto.RegisterType((*AuthServiceCompleteFlow_Request)(nil), "berty.protocol.v1.AuthServiceCompleteFlow.Request") + proto.RegisterType((*AuthServiceCompleteFlow_Reply)(nil), "berty.protocol.v1.AuthServiceCompleteFlow.Reply") + proto.RegisterType((*AuthServiceInitFlow)(nil), "berty.protocol.v1.AuthServiceInitFlow") + proto.RegisterType((*AuthServiceInitFlow_Request)(nil), "berty.protocol.v1.AuthServiceInitFlow.Request") + proto.RegisterType((*AuthServiceInitFlow_Reply)(nil), "berty.protocol.v1.AuthServiceInitFlow.Reply") + proto.RegisterType((*ServicesTokenList)(nil), "berty.protocol.v1.ServicesTokenList") + proto.RegisterType((*ServicesTokenList_Request)(nil), "berty.protocol.v1.ServicesTokenList.Request") + proto.RegisterType((*ServicesTokenList_Reply)(nil), "berty.protocol.v1.ServicesTokenList.Reply") + proto.RegisterType((*ServicesTokenCode)(nil), "berty.protocol.v1.ServicesTokenCode") + proto.RegisterType((*ReplicationServiceRegisterGroup)(nil), "berty.protocol.v1.ReplicationServiceRegisterGroup") + proto.RegisterType((*ReplicationServiceRegisterGroup_Request)(nil), "berty.protocol.v1.ReplicationServiceRegisterGroup.Request") + proto.RegisterType((*ReplicationServiceRegisterGroup_Reply)(nil), "berty.protocol.v1.ReplicationServiceRegisterGroup.Reply") + proto.RegisterType((*ReplicationServiceReplicateGroup)(nil), "berty.protocol.v1.ReplicationServiceReplicateGroup") + proto.RegisterType((*ReplicationServiceReplicateGroup_Request)(nil), "berty.protocol.v1.ReplicationServiceReplicateGroup.Request") + proto.RegisterType((*ReplicationServiceReplicateGroup_Reply)(nil), "berty.protocol.v1.ReplicationServiceReplicateGroup.Reply") + proto.RegisterType((*SystemInfo)(nil), "berty.protocol.v1.SystemInfo") + proto.RegisterType((*SystemInfo_Request)(nil), "berty.protocol.v1.SystemInfo.Request") + proto.RegisterType((*SystemInfo_Reply)(nil), "berty.protocol.v1.SystemInfo.Reply") + proto.RegisterType((*SystemInfo_OrbitDB)(nil), "berty.protocol.v1.SystemInfo.OrbitDB") + proto.RegisterType((*SystemInfo_OrbitDB_ReplicationStatus)(nil), "berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus") + proto.RegisterType((*SystemInfo_P2P)(nil), "berty.protocol.v1.SystemInfo.P2P") + proto.RegisterType((*SystemInfo_Process)(nil), "berty.protocol.v1.SystemInfo.Process") + proto.RegisterType((*PeerList)(nil), "berty.protocol.v1.PeerList") + proto.RegisterType((*PeerList_Request)(nil), "berty.protocol.v1.PeerList.Request") + proto.RegisterType((*PeerList_Reply)(nil), "berty.protocol.v1.PeerList.Reply") + proto.RegisterType((*PeerList_Peer)(nil), "berty.protocol.v1.PeerList.Peer") + proto.RegisterType((*PeerList_Route)(nil), "berty.protocol.v1.PeerList.Route") + proto.RegisterType((*PeerList_Stream)(nil), "berty.protocol.v1.PeerList.Stream") + proto.RegisterType((*AttachmentPrepare)(nil), "berty.protocol.v1.AttachmentPrepare") + proto.RegisterType((*AttachmentPrepare_Request)(nil), "berty.protocol.v1.AttachmentPrepare.Request") + proto.RegisterType((*AttachmentPrepare_Reply)(nil), "berty.protocol.v1.AttachmentPrepare.Reply") + proto.RegisterType((*AttachmentRetrieve)(nil), "berty.protocol.v1.AttachmentRetrieve") + proto.RegisterType((*AttachmentRetrieve_Request)(nil), "berty.protocol.v1.AttachmentRetrieve.Request") + proto.RegisterType((*AttachmentRetrieve_Reply)(nil), "berty.protocol.v1.AttachmentRetrieve.Reply") +} + +func init() { proto.RegisterFile("protocoltypes.proto", fileDescriptor_8aa93e54ccb19003) } + +var fileDescriptor_8aa93e54ccb19003 = []byte{ + // 5338 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x3c, 0x5b, 0x6c, 0x24, 0xd9, + 0x55, 0x5b, 0xdd, 0xb6, 0xbb, 0xfb, 0xb8, 0x6d, 0x97, 0xef, 0xcc, 0x78, 0x7a, 0x7a, 0x1e, 0x3d, + 0x5b, 0x93, 0x99, 0x9d, 0x9d, 0x9d, 0xb5, 0x67, 0xbd, 0x9b, 0x9d, 0x7d, 0xb2, 0xf1, 0x6b, 0x07, + 0xef, 0x78, 0x76, 0x7a, 0xcb, 0x63, 0xb2, 0x1b, 0x20, 0x9d, 0x72, 0xd5, 0x75, 0xbb, 0xb6, 0xab, + 0xab, 0x2a, 0x55, 0xd5, 0x9e, 0x69, 0x94, 0x2c, 0xd2, 0x4a, 0x24, 0xd1, 0x2e, 0x44, 0x40, 0x82, + 0x90, 0xf2, 0xc5, 0x07, 0x20, 0x45, 0x82, 0xe5, 0x21, 0x21, 0x85, 0x5f, 0xf8, 0x09, 0x20, 0xa4, + 0x08, 0x21, 0x21, 0x01, 0xb2, 0x82, 0x3f, 0x90, 0x88, 0xf8, 0x80, 0x0f, 0xf8, 0xe2, 0x03, 0xdd, + 0x57, 0x3d, 0xba, 0xab, 0xfa, 0x61, 0xcf, 0x08, 0xa4, 0xfc, 0xf5, 0x3d, 0xf7, 0xbc, 0xee, 0xb9, + 0xa7, 0xce, 0x3d, 0xf7, 0xdc, 0x63, 0xc3, 0x29, 0xd7, 0x73, 0x02, 0x47, 0x77, 0xac, 0xa0, 0xeb, + 0x62, 0x7f, 0x91, 0x8e, 0xd0, 0xfc, 0x2e, 0xf6, 0x82, 0xee, 0xa2, 0x98, 0x5a, 0x3c, 0x78, 0xa1, + 0x7a, 0xba, 0xe9, 0x34, 0x1d, 0x0a, 0x58, 0x22, 0xbf, 0xd8, 0x9c, 0xf2, 0x37, 0x12, 0x14, 0x56, + 0x74, 0xdd, 0xe9, 0xd8, 0x01, 0x5a, 0x84, 0xc9, 0xa6, 0xe7, 0x74, 0xdc, 0x8a, 0x74, 0x59, 0xba, + 0x3e, 0xbd, 0x5c, 0x59, 0xec, 0x63, 0xb2, 0x78, 0x87, 0xcc, 0xab, 0x0c, 0x0d, 0x2d, 0xc2, 0x29, + 0x8d, 0x91, 0x36, 0x5c, 0xcf, 0x3c, 0xd0, 0x02, 0xdc, 0x68, 0xe1, 0x6e, 0x25, 0x77, 0x59, 0xba, + 0x5e, 0x56, 0xe7, 0xf9, 0x54, 0x9d, 0xcd, 0xdc, 0xc5, 0x5d, 0x74, 0x03, 0xe6, 0x35, 0xcb, 0xd4, + 0xfc, 0x04, 0x76, 0x9e, 0x62, 0xcf, 0xd1, 0x89, 0x18, 0xee, 0x4b, 0xb0, 0xe0, 0x76, 0x76, 0x2d, + 0x53, 0x6f, 0x78, 0xd8, 0x36, 0xf0, 0x2f, 0x1d, 0x38, 0x1d, 0xbf, 0xe1, 0x63, 0x6c, 0x54, 0x26, + 0x28, 0xc1, 0x69, 0x36, 0xab, 0x86, 0x93, 0xdb, 0x18, 0x1b, 0xca, 0x9f, 0x49, 0x30, 0x49, 0x55, + 0x44, 0x17, 0x01, 0x38, 0x3d, 0x11, 0x22, 0x51, 0x9a, 0x12, 0x83, 0x10, 0xf6, 0x0b, 0x30, 0xe5, + 0x63, 0xdd, 0xc3, 0x01, 0xd7, 0x96, 0x8f, 0x08, 0x19, 0xfb, 0xd5, 0xf0, 0xcd, 0x26, 0xd7, 0xad, + 0xc4, 0x20, 0xdb, 0x66, 0x13, 0xbd, 0x0e, 0x40, 0x97, 0xde, 0x20, 0xb6, 0xa6, 0x9a, 0xcc, 0x2e, + 0x5f, 0xc8, 0x32, 0xd3, 0x83, 0xae, 0x8b, 0xd5, 0x52, 0x53, 0xfc, 0x44, 0xe7, 0xa0, 0xe8, 0x9b, + 0x4d, 0xbb, 0xe1, 0x76, 0x76, 0x2b, 0x93, 0x94, 0x73, 0x81, 0x8c, 0xeb, 0x9d, 0x5d, 0xe5, 0x1f, + 0x25, 0x90, 0x29, 0xcd, 0xcf, 0x62, 0xcd, 0xf0, 0x37, 0x1e, 0xb9, 0x8e, 0x17, 0x0c, 0x5b, 0x42, + 0x9c, 0x5d, 0x2e, 0xc1, 0x0e, 0x6d, 0xc0, 0xa9, 0x36, 0x0e, 0x34, 0x43, 0x0b, 0xb4, 0xc6, 0x3e, + 0xe1, 0xd8, 0xd0, 0x4d, 0xc3, 0xaf, 0xe4, 0x2f, 0xe7, 0xaf, 0x97, 0x57, 0xcf, 0x1c, 0x1d, 0xd6, + 0xe6, 0xef, 0xf1, 0x69, 0x2a, 0x6f, 0x6d, 0x73, 0xdd, 0x57, 0xe7, 0xdb, 0x09, 0x90, 0x69, 0xf8, + 0x8c, 0x8d, 0xef, 0x6b, 0x4d, 0xec, 0xc7, 0xd9, 0x4c, 0xc4, 0xd9, 0xb0, 0xe9, 0x04, 0x9b, 0x38, + 0xc8, 0x34, 0x7c, 0xe5, 0xaf, 0x25, 0x98, 0xa1, 0x8b, 0x13, 0x42, 0x89, 0x19, 0xf1, 0x01, 0xb6, + 0x03, 0x66, 0x46, 0x29, 0xd3, 0x8c, 0x1b, 0x04, 0x89, 0x99, 0x11, 0x8b, 0x9f, 0xa8, 0x02, 0x05, + 0x57, 0xeb, 0x5a, 0x8e, 0x66, 0x88, 0x65, 0xf3, 0x21, 0x92, 0x21, 0x1f, 0xed, 0x1a, 0xf9, 0x89, + 0xea, 0x30, 0x2f, 0xf8, 0x35, 0xc4, 0xfa, 0xe8, 0xb6, 0x4d, 0x2f, 0x5f, 0x49, 0x91, 0x57, 0xe7, + 0xbf, 0x85, 0xa2, 0xaa, 0xec, 0xf6, 0x40, 0x94, 0xef, 0x8a, 0xc5, 0x6c, 0xd8, 0x07, 0xd8, 0x72, + 0x5c, 0x8c, 0x4e, 0xc3, 0xa4, 0xed, 0xd8, 0x3a, 0xe6, 0x3b, 0xc4, 0x06, 0x04, 0x4a, 0x55, 0xe6, + 0x3a, 0xb2, 0x01, 0xfa, 0x22, 0x9c, 0xc3, 0xb6, 0xee, 0x75, 0xdd, 0x00, 0x1b, 0x0d, 0x2d, 0x08, + 0x34, 0x7d, 0xbf, 0x4d, 0xec, 0x10, 0xdb, 0x9e, 0xf3, 0x47, 0x87, 0xb5, 0xb3, 0x1b, 0x02, 0x69, + 0x25, 0xc4, 0xa1, 0xd6, 0x3d, 0x8b, 0x53, 0x26, 0x88, 0x8d, 0xff, 0x53, 0x82, 0x59, 0xbe, 0x19, + 0xc4, 0xf0, 0xd8, 0xf3, 0x89, 0x9d, 0xe8, 0x07, 0x88, 0x3d, 0xaa, 0xd9, 0x84, 0x2a, 0x86, 0xe8, + 0x59, 0x28, 0x19, 0xf8, 0xc0, 0xd4, 0x71, 0xc3, 0x6d, 0x31, 0xfd, 0x56, 0xcb, 0x47, 0x87, 0xb5, + 0xe2, 0x3a, 0x05, 0xd6, 0xef, 0xaa, 0x45, 0x36, 0x5d, 0x6f, 0xa5, 0x98, 0xf4, 0x2e, 0x14, 0x63, + 0x96, 0xcc, 0x5f, 0x9f, 0x5e, 0x5e, 0x4a, 0xb1, 0x64, 0x52, 0x97, 0x45, 0x61, 0xbe, 0x0d, 0x3b, + 0xf0, 0xba, 0x6a, 0xc8, 0xa0, 0xfa, 0x3a, 0xcc, 0x24, 0xa6, 0x88, 0x3c, 0xe1, 0xec, 0x25, 0x95, + 0xfc, 0x24, 0x86, 0x3c, 0xd0, 0xac, 0x0e, 0xa6, 0x8a, 0x96, 0x54, 0x36, 0x78, 0x2d, 0xf7, 0x8a, + 0xa4, 0xac, 0x81, 0xdc, 0xbb, 0x61, 0x68, 0x09, 0x4e, 0x45, 0x66, 0x25, 0x01, 0x83, 0x7c, 0xb9, + 0x7e, 0x45, 0x22, 0xa6, 0x55, 0x51, 0x6c, 0x6a, 0x9b, 0xcd, 0x28, 0x1f, 0x4b, 0x20, 0x87, 0xd6, + 0xe6, 0x5a, 0xa3, 0x0b, 0x50, 0x72, 0x2d, 0xcd, 0xb4, 0x03, 0xfc, 0x28, 0x08, 0x3f, 0x3c, 0x01, + 0x48, 0x77, 0xaa, 0xdc, 0x49, 0x9c, 0xea, 0x2f, 0x25, 0x98, 0xe3, 0xb2, 0x43, 0xb7, 0x7a, 0x06, + 0xe6, 0xf8, 0xa7, 0x44, 0xbf, 0x3d, 0xec, 0xf9, 0x5c, 0x93, 0xd9, 0x76, 0xdf, 0x3e, 0x73, 0x88, + 0xf8, 0x1e, 0xf8, 0x30, 0xf2, 0xcc, 0x7c, 0xdc, 0x33, 0x07, 0xfa, 0xe0, 0xc4, 0x09, 0x7c, 0xf0, + 0xcf, 0x25, 0x28, 0xd3, 0x2f, 0x76, 0xcd, 0x61, 0x86, 0x5a, 0x80, 0x9c, 0x69, 0x30, 0xad, 0x57, + 0xa7, 0x8e, 0x0e, 0x6b, 0xb9, 0xcd, 0x75, 0x35, 0x67, 0x1a, 0xe8, 0x26, 0x80, 0xab, 0x79, 0x44, + 0x26, 0x11, 0x99, 0xa3, 0x22, 0x67, 0x8e, 0x0e, 0x6b, 0xa5, 0x3a, 0x85, 0x12, 0x21, 0x25, 0x86, + 0xb0, 0x69, 0xf8, 0xe8, 0x1a, 0x14, 0x59, 0xcc, 0x75, 0x5b, 0x6c, 0x21, 0xab, 0xd3, 0x47, 0x87, + 0xb5, 0x02, 0xfd, 0x08, 0xeb, 0x77, 0xd5, 0x02, 0x9d, 0xac, 0xb7, 0xd0, 0xeb, 0x30, 0x97, 0xbe, + 0x1a, 0x74, 0x74, 0x58, 0x9b, 0xed, 0x59, 0xc4, 0xac, 0x96, 0xd4, 0x5d, 0x85, 0xe9, 0x15, 0x37, + 0x0a, 0x50, 0x89, 0x2f, 0x44, 0x1a, 0xf8, 0x85, 0x64, 0x9a, 0x5f, 0x69, 0x02, 0x22, 0x96, 0xd0, + 0xf4, 0x60, 0xc5, 0x30, 0x56, 0xc8, 0xf9, 0x46, 0xc2, 0xf6, 0x18, 0xac, 0xaf, 0x41, 0x91, 0x9f, + 0x97, 0xe2, 0x33, 0xa5, 0x2b, 0xa7, 0xac, 0xc8, 0xca, 0xd9, 0x99, 0xd9, 0x52, 0x3e, 0x95, 0xe0, + 0x34, 0x35, 0xc7, 0x8a, 0x61, 0xdc, 0xc3, 0xed, 0x5d, 0xec, 0x31, 0x66, 0x44, 0x56, 0x9b, 0x8e, + 0x7b, 0x64, 0x31, 0x24, 0x22, 0x8b, 0x4d, 0xd7, 0x5b, 0xe3, 0xc4, 0x84, 0x8b, 0x00, 0x9c, 0x6b, + 0xec, 0x8c, 0x64, 0x90, 0x6d, 0xb3, 0xa9, 0x6c, 0x40, 0x99, 0x11, 0xb1, 0x4f, 0x0c, 0x9d, 0x87, + 0x92, 0xbe, 0xaf, 0x99, 0x76, 0xec, 0x14, 0x2b, 0x52, 0x00, 0xb1, 0x46, 0x2c, 0x48, 0xe5, 0x12, + 0x41, 0x4a, 0xf9, 0x4e, 0x6c, 0x51, 0x09, 0x7e, 0x63, 0x18, 0xf0, 0x65, 0x98, 0x35, 0xb0, 0x1f, + 0x34, 0x22, 0x23, 0xb0, 0x95, 0xc9, 0x47, 0x87, 0xb5, 0xf2, 0x3a, 0xf6, 0x83, 0xd0, 0x10, 0x65, + 0x23, 0x1a, 0xb5, 0xe2, 0x47, 0x4c, 0x3e, 0x71, 0xc4, 0x28, 0xbf, 0x25, 0xc1, 0xe5, 0x7b, 0x1d, + 0x2b, 0x30, 0x19, 0xae, 0x50, 0x90, 0x6e, 0x89, 0x8a, 0x7d, 0xc7, 0x3a, 0xe8, 0x8d, 0xaf, 0x83, + 0x35, 0xbc, 0x0a, 0xb3, 0x6c, 0x8b, 0x3d, 0x4e, 0xcc, 0x9d, 0x68, 0x46, 0x4b, 0x70, 0xac, 0xc1, + 0xb4, 0xc8, 0x9c, 0x1c, 0x67, 0x8f, 0x2b, 0x05, 0x3c, 0x67, 0x72, 0x9c, 0x3d, 0xe5, 0x9b, 0x12, + 0x9c, 0x4b, 0xe8, 0xa5, 0xd9, 0xc1, 0x8a, 0xd1, 0x36, 0x6d, 0xd5, 0xb1, 0xf0, 0x38, 0x0a, 0xbd, + 0x05, 0xf3, 0x4d, 0x42, 0x8c, 0x71, 0x9f, 0xd5, 0x4e, 0x1d, 0x1d, 0xd6, 0xe6, 0xee, 0xb0, 0xc9, + 0xd0, 0x70, 0x73, 0xcd, 0x04, 0xa0, 0xa5, 0x6c, 0x40, 0x25, 0xa6, 0xc8, 0xa6, 0x6d, 0x06, 0xa6, + 0x66, 0xb1, 0xc1, 0x18, 0xfe, 0xa8, 0x68, 0x70, 0x39, 0x34, 0xae, 0x61, 0x98, 0x81, 0xe9, 0xd8, + 0x9a, 0x95, 0xcc, 0xf6, 0xc6, 0x59, 0x16, 0x82, 0x09, 0x9a, 0x3c, 0x32, 0xeb, 0xd2, 0xdf, 0x8a, + 0x01, 0x57, 0x58, 0x3a, 0x8b, 0xdb, 0xce, 0x01, 0x7e, 0x52, 0x52, 0x1c, 0x40, 0x3c, 0xbf, 0xa6, + 0xc2, 0xde, 0x71, 0x4c, 0x7b, 0x3c, 0xa6, 0x61, 0x56, 0x9e, 0x1b, 0x29, 0x2b, 0x57, 0x30, 0xc8, + 0x71, 0x81, 0x5b, 0x78, 0x2f, 0x18, 0x33, 0xe8, 0x84, 0xe1, 0x36, 0x97, 0x1d, 0x6e, 0x95, 0x77, + 0xe0, 0x22, 0x17, 0xc3, 0x83, 0x9c, 0x8a, 0xbf, 0xda, 0xc1, 0x7e, 0xb0, 0x6e, 0xfa, 0xda, 0xae, + 0x35, 0xd6, 0x12, 0x95, 0x4d, 0xb8, 0x90, 0xca, 0x6b, 0xc3, 0x1e, 0x9b, 0xd5, 0x37, 0x24, 0xb8, + 0x92, 0xca, 0x4b, 0xc5, 0x7b, 0xd8, 0xc3, 0xb6, 0x8e, 0x55, 0xec, 0x8f, 0x17, 0x45, 0xb2, 0xaf, + 0x22, 0xb9, 0x01, 0x57, 0x91, 0xbf, 0x97, 0x32, 0x0c, 0xb4, 0x61, 0x7f, 0xb5, 0x83, 0x3b, 0xe3, + 0xf9, 0xc0, 0x88, 0x9b, 0x82, 0xde, 0x24, 0xe1, 0x94, 0x0a, 0xa3, 0x31, 0x22, 0x3d, 0x21, 0xd9, + 0xde, 0xd7, 0x3c, 0x4c, 0x0c, 0x2b, 0xf4, 0x12, 0x34, 0xe8, 0x69, 0x28, 0x3b, 0x0f, 0xed, 0x64, + 0xa6, 0x5c, 0x56, 0xa7, 0x9d, 0x87, 0x76, 0x98, 0xaa, 0x04, 0x70, 0x2e, 0x75, 0x55, 0xdb, 0x24, + 0xbd, 0x1d, 0x63, 0x45, 0x37, 0x01, 0xb8, 0xd4, 0x68, 0x4d, 0x34, 0x07, 0xe0, 0x6c, 0xeb, 0x77, + 0xd5, 0x12, 0x47, 0xa8, 0xb7, 0x94, 0x7f, 0xca, 0x32, 0xa6, 0x8a, 0x75, 0x6c, 0x1e, 0x8c, 0x67, + 0xcc, 0xb1, 0x44, 0xa3, 0x97, 0xe1, 0xac, 0xc0, 0xee, 0xdd, 0x7e, 0x16, 0x86, 0xcf, 0xe8, 0x42, + 0xa3, 0x9e, 0xb0, 0x21, 0x0b, 0xba, 0x1e, 0x7b, 0xce, 0x71, 0x78, 0x68, 0xd3, 0x2e, 0x5c, 0xca, + 0xfa, 0x94, 0x74, 0xcd, 0x33, 0x9e, 0xe0, 0xea, 0x94, 0xdf, 0xc9, 0x32, 0xec, 0x8a, 0xae, 0x63, + 0x92, 0xe3, 0x3d, 0x39, 0xc3, 0x8e, 0x98, 0xd7, 0x29, 0x2e, 0x9c, 0x49, 0x6a, 0xb8, 0x6a, 0x39, + 0x7a, 0xeb, 0x49, 0x1a, 0xc5, 0x83, 0xb3, 0x49, 0x89, 0x3b, 0xf6, 0xee, 0x93, 0x96, 0xf9, 0xa9, + 0x04, 0x15, 0x2e, 0x74, 0x1b, 0x7b, 0x84, 0xc5, 0x03, 0xa7, 0x85, 0xed, 0x15, 0x63, 0xcc, 0xed, + 0x5f, 0x87, 0x19, 0x9f, 0xd1, 0x37, 0x02, 0xc2, 0x80, 0x9f, 0x1a, 0xb5, 0xb4, 0x38, 0x10, 0x93, + 0xa3, 0x96, 0xfd, 0xd8, 0x48, 0x71, 0xa0, 0x9a, 0xa2, 0x0c, 0x3b, 0x28, 0xc7, 0x0d, 0x5c, 0x54, + 0x8d, 0x86, 0xc9, 0xa2, 0x65, 0x89, 0x6d, 0x32, 0x65, 0xb7, 0xb9, 0xae, 0x16, 0xe8, 0xe4, 0xa6, + 0xa1, 0xfc, 0xa9, 0x28, 0x80, 0xa8, 0xd8, 0xb5, 0x4c, 0x5d, 0x0b, 0x4c, 0xbb, 0x39, 0xde, 0xb2, + 0x91, 0xd6, 0x09, 0xf6, 0xb1, 0x1d, 0x50, 0x62, 0xc7, 0x6e, 0x74, 0x3c, 0x8b, 0x4b, 0xa4, 0x95, + 0x8a, 0x95, 0xc4, 0xec, 0x8e, 0xba, 0xa5, 0xce, 0x27, 0x09, 0x76, 0x3c, 0x0b, 0x3d, 0x0f, 0xc8, + 0x13, 0xf2, 0x1d, 0xbb, 0x41, 0x4c, 0x82, 0x3d, 0xea, 0x9c, 0x25, 0x75, 0x3e, 0x36, 0xb3, 0x4d, + 0x27, 0x94, 0x7b, 0x80, 0x36, 0x6d, 0x3f, 0xd0, 0x6c, 0x1d, 0xb3, 0x92, 0xcd, 0x3a, 0xb9, 0xd3, + 0x96, 0xa0, 0xc0, 0xbf, 0xa1, 0xea, 0x4d, 0x98, 0x24, 0xeb, 0xe9, 0xa2, 0x2b, 0x30, 0x83, 0x29, + 0x06, 0x36, 0x1a, 0x34, 0x12, 0xb0, 0x3c, 0xb8, 0x2c, 0x80, 0x84, 0x50, 0xf9, 0xdb, 0x49, 0xa8, + 0x08, 0x7e, 0x77, 0x30, 0xf1, 0xbd, 0x3d, 0xb3, 0xd9, 0xf1, 0xa8, 0xc4, 0x38, 0xd7, 0x7f, 0x9e, + 0x10, 0x6c, 0x6f, 0x02, 0x84, 0x05, 0x38, 0x61, 0x21, 0xea, 0x62, 0x7c, 0xf3, 0x88, 0x8b, 0x89, + 0x32, 0xdc, 0x58, 0x29, 0xfe, 0x1b, 0x20, 0x0b, 0xc6, 0x3d, 0xdf, 0x28, 0xbb, 0x4c, 0xc5, 0xf2, + 0x8b, 0xfa, 0x5d, 0x75, 0x56, 0x8b, 0x8f, 0x5b, 0xe8, 0x0a, 0x14, 0x5c, 0x8c, 0x3d, 0xb2, 0xe7, + 0x13, 0x74, 0x07, 0xe0, 0xe8, 0xb0, 0x36, 0x55, 0xc7, 0xd8, 0xdb, 0x5c, 0x57, 0xa7, 0xc8, 0xd4, + 0xa6, 0x41, 0xee, 0xd8, 0x96, 0xe9, 0x07, 0xd8, 0x26, 0x37, 0xdb, 0xc9, 0xcb, 0xf9, 0xeb, 0x25, + 0x35, 0x02, 0xa0, 0x0f, 0x60, 0x7a, 0xd7, 0xc2, 0x0d, 0xcc, 0x12, 0x80, 0xca, 0x14, 0x2d, 0x11, + 0xbd, 0x92, 0xe2, 0xc4, 0x59, 0x06, 0x5b, 0xdc, 0xc6, 0x01, 0x71, 0xa2, 0xed, 0x40, 0x0b, 0xb0, + 0x0a, 0xbb, 0x16, 0x16, 0xc9, 0xc4, 0x2e, 0xc8, 0x0f, 0xcd, 0x3d, 0xb3, 0xe1, 0x2e, 0xbb, 0x21, + 0xff, 0xc2, 0x09, 0xf9, 0xcf, 0x12, 0x8e, 0xf5, 0x65, 0x57, 0xc8, 0xf8, 0x79, 0x28, 0xb7, 0x0d, + 0xdb, 0x0f, 0xf9, 0x17, 0x4f, 0xc8, 0x7f, 0x9a, 0x70, 0x13, 0xcc, 0x7f, 0x11, 0x66, 0x3c, 0x6c, + 0x69, 0xdd, 0x90, 0x7b, 0xe9, 0x84, 0xdc, 0xcb, 0x94, 0x1d, 0x67, 0xaf, 0xdc, 0x81, 0x72, 0x7c, + 0x16, 0x4d, 0x43, 0x61, 0xc7, 0x6e, 0xd9, 0xce, 0x43, 0x5b, 0x7e, 0x8a, 0x0c, 0x38, 0x9e, 0x2c, + 0xa1, 0x32, 0x14, 0x45, 0xb6, 0x27, 0xe7, 0xd0, 0x1c, 0x4c, 0xef, 0xd8, 0xda, 0x81, 0x66, 0x5a, + 0x04, 0x22, 0xe7, 0x95, 0xaf, 0xc3, 0xd9, 0x8c, 0x14, 0x2c, 0xee, 0xcd, 0x5f, 0x14, 0xce, 0x9c, + 0x9d, 0x66, 0x49, 0xd9, 0x69, 0x16, 0xb9, 0xaa, 0x09, 0x33, 0x10, 0x97, 0x2e, 0xaa, 0x62, 0xa8, + 0x3c, 0x07, 0x67, 0x52, 0x33, 0xd3, 0xb8, 0xf0, 0x02, 0x17, 0xae, 0x7c, 0x05, 0x4e, 0xa7, 0xa5, + 0x9e, 0x71, 0xdc, 0x37, 0x4f, 0xa4, 0xa8, 0xb2, 0x0f, 0x17, 0x7a, 0xad, 0xe1, 0xe3, 0x74, 0x93, + 0x9c, 0x50, 0xd2, 0x27, 0x52, 0x58, 0x78, 0x88, 0x92, 0x33, 0xa3, 0xda, 0x0a, 0x05, 0xc4, 0xd3, + 0x44, 0xe9, 0x31, 0xa4, 0x89, 0xb9, 0xbe, 0x34, 0x31, 0x32, 0xec, 0xfb, 0xbd, 0x86, 0x65, 0x89, + 0x45, 0xf5, 0x76, 0xa4, 0x4d, 0xf2, 0xa0, 0x94, 0x06, 0x1f, 0x94, 0x11, 0xe7, 0x0f, 0x52, 0xf6, + 0x97, 0xa4, 0x4b, 0x8f, 0x81, 0x75, 0x1d, 0xca, 0xf1, 0x5c, 0xe3, 0x31, 0x70, 0x54, 0x61, 0x36, + 0x99, 0x4b, 0x3c, 0x06, 0x9e, 0xef, 0xc1, 0x29, 0x51, 0x5f, 0xe2, 0xc5, 0x25, 0xba, 0xcf, 0x2f, + 0x44, 0x8c, 0xe3, 0x29, 0x96, 0x94, 0x9d, 0x62, 0x45, 0x2c, 0x1f, 0xc0, 0x42, 0x6f, 0x75, 0x63, + 0xcd, 0xc3, 0x5a, 0x90, 0x70, 0xcf, 0x25, 0xe1, 0x9e, 0x23, 0xb2, 0x57, 0xbe, 0x04, 0xa7, 0x7b, + 0xb9, 0x92, 0x6b, 0x70, 0xf5, 0xd5, 0x48, 0xd3, 0x31, 0x9f, 0x9e, 0x22, 0x8d, 0xb7, 0xe1, 0x4c, + 0x2f, 0xef, 0x2d, 0xac, 0x1d, 0xe0, 0x13, 0x99, 0x41, 0x87, 0xab, 0x7d, 0x45, 0x9e, 0x78, 0x3d, + 0x86, 0x78, 0x9a, 0xe5, 0xf8, 0x27, 0x13, 0xf2, 0x4d, 0x09, 0x2e, 0xf5, 0x97, 0x92, 0x78, 0xc9, + 0x86, 0x96, 0x59, 0xaa, 0xbf, 0x30, 0x36, 0xfb, 0x64, 0x89, 0x25, 0x37, 0xa8, 0xc4, 0x12, 0x69, + 0xf2, 0xed, 0x94, 0xa2, 0xd6, 0xa6, 0x7d, 0x60, 0x06, 0xf4, 0xac, 0xe0, 0x0e, 0x70, 0x8c, 0xa5, + 0xde, 0x16, 0x8e, 0x32, 0xe6, 0xee, 0x2a, 0xbf, 0x27, 0xc1, 0x5c, 0xac, 0x1c, 0x4b, 0xdd, 0xfa, + 0x5b, 0xd2, 0xf8, 0xc6, 0xc8, 0x7e, 0x2a, 0x4a, 0x29, 0x16, 0xe7, 0x47, 0x2d, 0x16, 0x47, 0x86, + 0xfb, 0x5d, 0x09, 0x66, 0xa9, 0x9e, 0xb4, 0xe0, 0xfb, 0xff, 0x56, 0xcd, 0xcf, 0x24, 0x40, 0x89, + 0x07, 0x38, 0x5a, 0xa5, 0x27, 0x57, 0x05, 0xf6, 0x0a, 0xa7, 0x3b, 0xd1, 0x4b, 0x47, 0xfa, 0x55, + 0x21, 0x5e, 0xd6, 0x57, 0xcb, 0x38, 0x5e, 0xe4, 0x7f, 0x23, 0xf6, 0x1e, 0xc4, 0xee, 0x1a, 0x97, + 0xb3, 0xb6, 0x37, 0x7c, 0x01, 0x09, 0x29, 0xa2, 0x67, 0xb2, 0x7c, 0xec, 0x99, 0x4c, 0xf9, 0x63, + 0x09, 0xe6, 0x39, 0x05, 0x7b, 0x14, 0x79, 0x8c, 0xfa, 0xbe, 0x0e, 0x05, 0xf1, 0x9e, 0xc2, 0xd4, + 0x7d, 0x7a, 0xe8, 0xf3, 0x95, 0x2a, 0x28, 0xe2, 0xc5, 0xfe, 0x7c, 0xb2, 0xd8, 0xff, 0xdf, 0x91, + 0xca, 0x6c, 0x69, 0x5b, 0xa6, 0x1f, 0x54, 0x7f, 0x7c, 0x0c, 0x6f, 0xb8, 0x06, 0x45, 0xdf, 0xb4, + 0x75, 0x2c, 0xae, 0x4c, 0x1c, 0x6f, 0x9b, 0xc0, 0xc8, 0x95, 0x89, 0x4e, 0x6e, 0x1a, 0xe8, 0x3c, + 0x94, 0x18, 0x9e, 0xed, 0x3c, 0xa4, 0xda, 0x14, 0x55, 0x46, 0xf8, 0xae, 0xf3, 0x90, 0x30, 0xe9, + 0xd8, 0x81, 0x69, 0x89, 0x1c, 0x9c, 0x33, 0xd9, 0x21, 0x30, 0xc2, 0x84, 0x4e, 0x32, 0x26, 0x0c, + 0x8f, 0x30, 0x99, 0x64, 0x4c, 0x28, 0x80, 0x30, 0xb9, 0x42, 0x12, 0xcd, 0x03, 0xec, 0xf9, 0xb8, + 0xe1, 0x78, 0x06, 0xf6, 0x68, 0x1a, 0x5e, 0x24, 0xe9, 0x22, 0x05, 0xde, 0x27, 0x30, 0xe5, 0xbf, + 0xc4, 0xcd, 0x8d, 0xdb, 0xec, 0xa7, 0x65, 0xdd, 0xff, 0x23, 0x41, 0x89, 0x47, 0xca, 0x3d, 0xa7, + 0xda, 0x18, 0x7f, 0xbd, 0x63, 0xd5, 0x07, 0xaa, 0xbf, 0x26, 0x1d, 0x33, 0x98, 0x8e, 0x71, 0x22, + 0x24, 0x6f, 0x88, 0xf9, 0x81, 0x75, 0xd6, 0x0f, 0x61, 0x66, 0x45, 0x0f, 0x68, 0xbb, 0x06, 0x95, + 0x56, 0xad, 0x8f, 0x6f, 0x81, 0x8b, 0x00, 0x96, 0xa3, 0x6b, 0x56, 0xc3, 0xb1, 0xad, 0x2e, 0x4f, + 0xdf, 0x4b, 0x14, 0x72, 0xdf, 0xb6, 0xba, 0x51, 0xfc, 0xba, 0x07, 0x73, 0xeb, 0x58, 0x4b, 0x48, + 0x3b, 0xc9, 0xc1, 0xfb, 0x03, 0x80, 0xf2, 0x3d, 0xc7, 0x36, 0x03, 0x87, 0x1d, 0x75, 0xd5, 0x5f, + 0x97, 0xa0, 0x4a, 0x23, 0x06, 0x87, 0xae, 0x18, 0x07, 0xd8, 0x0b, 0x4c, 0x9f, 0xc9, 0x8a, 0x5f, + 0x67, 0xa5, 0xcc, 0xeb, 0xec, 0x02, 0x4c, 0xb5, 0x35, 0xc3, 0xf0, 0xd8, 0x7b, 0x66, 0x49, 0xe5, + 0x23, 0x54, 0x83, 0x69, 0xc3, 0x33, 0x0f, 0xb0, 0xd7, 0xb0, 0xb5, 0x36, 0xe6, 0xb5, 0x04, 0x60, + 0xa0, 0x77, 0xb5, 0x36, 0x7d, 0xa4, 0x0d, 0x1c, 0xd7, 0xd4, 0xd9, 0x55, 0x59, 0x65, 0x83, 0xea, + 0xa7, 0x12, 0x9c, 0x89, 0xab, 0x44, 0xa4, 0xbd, 0xed, 0x74, 0x6c, 0xe3, 0xff, 0x44, 0x9b, 0x8f, + 0x25, 0x38, 0xdd, 0xab, 0x0d, 0xc9, 0xe0, 0x4e, 0xa6, 0x4c, 0x28, 0x2b, 0x1f, 0x93, 0x85, 0xce, + 0x42, 0xc1, 0x24, 0x97, 0x1c, 0x6b, 0x8f, 0xea, 0x50, 0x54, 0xa7, 0x4c, 0x7f, 0x1b, 0x5b, 0x7b, + 0xd5, 0x56, 0xbf, 0x45, 0x68, 0xa6, 0x37, 0x9a, 0x12, 0x63, 0x0a, 0xfb, 0x41, 0x9e, 0xbf, 0x65, + 0x73, 0x69, 0x68, 0x1d, 0x26, 0x62, 0xcd, 0x2a, 0xb7, 0xd2, 0xce, 0x8c, 0x98, 0x4b, 0x2d, 0x3e, + 0xe8, 0xba, 0x38, 0x4e, 0xaf, 0x52, 0x6a, 0xa4, 0xc3, 0x9c, 0x26, 0x9c, 0xab, 0x11, 0x7f, 0xd5, + 0x79, 0x6d, 0x18, 0xc3, 0x6c, 0xff, 0x54, 0x67, 0xb5, 0xa4, 0xbf, 0x3e, 0x00, 0xa0, 0xf6, 0xd8, + 0x23, 0xfe, 0xc2, 0xdf, 0x01, 0x3e, 0x3f, 0x0e, 0xff, 0xd0, 0xd9, 0xd4, 0x92, 0x1b, 0xfa, 0xdd, + 0x7b, 0x40, 0x07, 0x8d, 0x0f, 0x1d, 0xd3, 0xe6, 0x2d, 0x34, 0x2f, 0x8d, 0xcb, 0x94, 0xf8, 0x8c, + 0x5a, 0x74, 0x85, 0xf7, 0x08, 0x45, 0x2d, 0xb2, 0x8d, 0x34, 0x0a, 0x1f, 0x43, 0x51, 0xea, 0x03, + 0x4c, 0xd1, 0x63, 0x27, 0xfe, 0xbe, 0x88, 0xad, 0xab, 0x22, 0x1d, 0x61, 0xb1, 0xf5, 0xe6, 0x38, + 0xca, 0x88, 0x1e, 0x9f, 0x51, 0x1f, 0xd0, 0xfe, 0x44, 0x02, 0xb9, 0xd7, 0x4d, 0xd0, 0x45, 0x38, + 0xd7, 0x0b, 0xdb, 0xb1, 0x0d, 0xbc, 0x67, 0xda, 0xd8, 0x90, 0x9f, 0x42, 0x0a, 0x5c, 0xea, 0x9d, + 0x4e, 0x3a, 0x83, 0x2c, 0xa5, 0xb1, 0x08, 0x37, 0x54, 0xce, 0xa1, 0x0b, 0x50, 0x49, 0x9b, 0x26, + 0x1b, 0x22, 0xe7, 0xb3, 0x88, 0xa9, 0x65, 0xe5, 0x09, 0xe5, 0x87, 0x12, 0x09, 0xc5, 0xbb, 0x9d, + 0x26, 0x39, 0xe5, 0xa9, 0x40, 0x3f, 0x7e, 0x33, 0xfc, 0xbe, 0x34, 0xe6, 0xd5, 0x10, 0xbd, 0x93, + 0x68, 0xa8, 0xcb, 0x0d, 0x6f, 0xa8, 0x63, 0x47, 0x64, 0x6a, 0x7f, 0x5d, 0xf2, 0x40, 0xcd, 0x0f, + 0x29, 0xb8, 0x7f, 0x92, 0x87, 0x05, 0xba, 0x94, 0x4d, 0xdb, 0x77, 0xb1, 0xce, 0x56, 0xb3, 0x1d, + 0x38, 0x1e, 0xae, 0x7e, 0xe3, 0x18, 0xd9, 0xcb, 0x36, 0x14, 0x2d, 0xa7, 0x19, 0x5f, 0xc6, 0x73, + 0x29, 0xcb, 0xe8, 0x13, 0xb8, 0xe5, 0x34, 0xe9, 0xaa, 0x28, 0x53, 0x3e, 0x50, 0x0b, 0x16, 0xfb, + 0x51, 0xfd, 0xd7, 0xd0, 0x9e, 0xe7, 0x20, 0xaf, 0x87, 0xbd, 0x34, 0x85, 0xa3, 0xc3, 0x5a, 0x7e, + 0x6d, 0x73, 0x5d, 0x25, 0x30, 0xb4, 0x04, 0xd3, 0xbc, 0x9b, 0x46, 0x8f, 0xda, 0x69, 0x66, 0x8f, + 0x0e, 0x6b, 0xc0, 0xda, 0x69, 0xe8, 0xdd, 0x80, 0x37, 0xdc, 0xd0, 0xb6, 0xbe, 0xad, 0x58, 0x77, + 0x60, 0xac, 0x0d, 0x2f, 0x3f, 0x42, 0x1b, 0x5e, 0xd8, 0x24, 0x18, 0x82, 0x92, 0x39, 0xc3, 0xc4, + 0xb0, 0x56, 0x19, 0x71, 0xcf, 0x99, 0x4a, 0xb6, 0x55, 0xb8, 0x00, 0xd4, 0x34, 0xc7, 0x3e, 0xdc, + 0xe3, 0x35, 0x09, 0x7e, 0x18, 0xb0, 0xae, 0x2f, 0xfe, 0xe0, 0xc0, 0x4e, 0x03, 0x5f, 0x2d, 0xb0, + 0xe3, 0xc0, 0x57, 0xbe, 0x06, 0x72, 0x6f, 0x81, 0x0b, 0x2d, 0x40, 0x2e, 0x14, 0x43, 0xfb, 0x95, + 0xea, 0x77, 0xd5, 0x9c, 0x7b, 0xcc, 0x07, 0x60, 0x54, 0x8d, 0x5d, 0x8c, 0xd8, 0x65, 0x21, 0x1c, + 0x2b, 0x16, 0x5c, 0x88, 0x3f, 0xac, 0x6c, 0x77, 0x5c, 0xf6, 0x0e, 0xc0, 0x81, 0xe8, 0x69, 0x28, + 0x87, 0xaf, 0x38, 0xe2, 0xd4, 0x29, 0xa9, 0xd3, 0xe2, 0x8d, 0x86, 0xd9, 0x5d, 0x16, 0x28, 0xd8, + 0x36, 0x5c, 0xc7, 0xe4, 0xbd, 0x86, 0x25, 0x75, 0x8e, 0xc3, 0x37, 0x38, 0x58, 0xf9, 0x89, 0x04, + 0xe5, 0xb8, 0x38, 0x76, 0x18, 0xb6, 0xb0, 0xcd, 0xf9, 0xb2, 0xc1, 0x63, 0x7a, 0x43, 0xf9, 0x32, + 0x20, 0x5f, 0x2c, 0xa7, 0xc1, 0x35, 0x61, 0xb7, 0xd6, 0xf4, 0x4e, 0xc1, 0x41, 0x76, 0x50, 0xe7, + 0xfd, 0x1e, 0x88, 0x8f, 0x2e, 0x01, 0xe0, 0x47, 0xae, 0xc9, 0xea, 0xd8, 0xd4, 0xe1, 0xf2, 0x6a, + 0x0c, 0xa2, 0x68, 0x70, 0x96, 0xe8, 0xc9, 0xf1, 0xd7, 0x9c, 0xb6, 0x6b, 0xe1, 0x00, 0xbf, 0x6d, + 0x39, 0x0f, 0xab, 0x6f, 0x46, 0x7e, 0xb5, 0x0c, 0x65, 0x5d, 0xb3, 0xac, 0x5d, 0x4d, 0x6f, 0xd1, + 0x55, 0xb2, 0xc4, 0x61, 0xee, 0xe8, 0xb0, 0x36, 0xbd, 0xc6, 0xe1, 0x64, 0x7d, 0xd3, 0x02, 0x69, + 0xc7, 0xb3, 0xa2, 0x04, 0xf2, 0x7b, 0x12, 0x9c, 0x8a, 0xc9, 0xd8, 0xb4, 0xcd, 0x80, 0xf2, 0x4f, + 0xfa, 0x2d, 0x31, 0x4d, 0x8c, 0x37, 0x6b, 0xdd, 0xea, 0x04, 0xfb, 0x84, 0x6f, 0x81, 0x4c, 0x12, + 0x9e, 0xf5, 0xd8, 0x07, 0x1e, 0xe1, 0xd2, 0x0f, 0x9c, 0xe0, 0x11, 0x18, 0x89, 0x6b, 0x3e, 0xd6, + 0x3b, 0x1e, 0x0e, 0xf7, 0xa3, 0xc8, 0xe2, 0xda, 0x36, 0x85, 0x12, 0xbc, 0x12, 0x43, 0xd8, 0xf1, + 0x2c, 0xe5, 0x13, 0x09, 0xe6, 0x85, 0xb1, 0xa8, 0x51, 0xe9, 0x85, 0x2c, 0x16, 0xa4, 0x3f, 0x8c, + 0x7d, 0x2a, 0xe1, 0xdb, 0x9c, 0x94, 0xfd, 0x36, 0x87, 0x5e, 0x85, 0x02, 0xdf, 0xc7, 0x51, 0x1f, + 0x13, 0x05, 0xbe, 0xf2, 0x51, 0x8f, 0x2e, 0x6b, 0x8e, 0x81, 0xc9, 0x87, 0x11, 0xfa, 0x05, 0xfd, + 0x44, 0xd5, 0x70, 0x8c, 0xae, 0xc2, 0xac, 0xee, 0x18, 0xb8, 0xa1, 0xef, 0x6b, 0x96, 0x85, 0xed, + 0xa6, 0x68, 0xfb, 0x9c, 0x21, 0xd0, 0x35, 0x01, 0x4c, 0xa8, 0x9e, 0x1f, 0xf0, 0xac, 0xf8, 0x2b, + 0x12, 0xd4, 0xd4, 0xe4, 0xbb, 0x1d, 0x71, 0x2b, 0xdc, 0x34, 0xfd, 0x80, 0x17, 0xba, 0xaa, 0x1f, + 0x24, 0x76, 0x6d, 0x24, 0x8b, 0x8c, 0x78, 0xc4, 0x47, 0x1e, 0xf3, 0x11, 0x5c, 0x4e, 0x53, 0x83, + 0x41, 0xf8, 0x95, 0xe6, 0x04, 0xd5, 0xd0, 0x9a, 0xd8, 0xd2, 0x05, 0xc8, 0x39, 0x2c, 0x82, 0x15, + 0x59, 0x04, 0xbb, 0x7f, 0x57, 0xcd, 0x39, 0x2d, 0xe5, 0x33, 0x00, 0xd8, 0xee, 0xfa, 0x01, 0x6e, + 0xd3, 0xdb, 0x6a, 0xcc, 0x1b, 0x7e, 0x12, 0x1e, 0x31, 0x6f, 0x41, 0xc1, 0xf5, 0x1c, 0x1d, 0xfb, + 0x3e, 0x17, 0x7b, 0x35, 0x6d, 0x9b, 0x43, 0x26, 0x8b, 0x75, 0x86, 0xac, 0x0a, 0x2a, 0xf4, 0x06, + 0xe4, 0xdd, 0x65, 0x77, 0x40, 0x55, 0x25, 0x4e, 0xbc, 0x5c, 0x67, 0x5e, 0x5e, 0x5f, 0xae, 0xab, + 0x84, 0x0c, 0x6d, 0x41, 0xc1, 0xf1, 0x76, 0xcd, 0xc0, 0xd8, 0xe5, 0x29, 0xeb, 0x10, 0xf1, 0xf7, + 0x09, 0xf2, 0xfa, 0x2a, 0xb3, 0x3c, 0x1f, 0xa8, 0x82, 0x05, 0x89, 0x70, 0x0f, 0x35, 0xcf, 0x66, + 0x2d, 0xa0, 0x25, 0x95, 0x0d, 0xaa, 0xff, 0x2e, 0x81, 0x40, 0x45, 0xbb, 0xd1, 0x13, 0x67, 0x18, + 0xa6, 0xd9, 0xba, 0x6f, 0x8f, 0x24, 0x78, 0x31, 0xbe, 0xa1, 0x81, 0x16, 0x74, 0x7c, 0x75, 0x8e, + 0x33, 0x0c, 0x5f, 0x41, 0xbe, 0x0e, 0xf3, 0x7d, 0x58, 0xc4, 0xfd, 0x5d, 0xcf, 0x69, 0x7a, 0xc2, + 0xd0, 0x79, 0x35, 0x1c, 0xd3, 0xfa, 0x92, 0xf6, 0xc8, 0x6c, 0x77, 0xda, 0xd4, 0x8c, 0x79, 0x55, + 0x0c, 0x09, 0xd5, 0x6e, 0x67, 0x6f, 0x0f, 0x7b, 0xbc, 0xef, 0x24, 0xaf, 0x86, 0x63, 0x72, 0xc1, + 0x62, 0x2d, 0x45, 0x3c, 0x1c, 0xf2, 0x51, 0x75, 0x11, 0x88, 0x79, 0xd1, 0x33, 0x30, 0xa7, 0x3b, + 0xb6, 0x8d, 0x75, 0x12, 0x91, 0xc9, 0xf9, 0x27, 0xe4, 0xce, 0x86, 0x60, 0x72, 0x3c, 0xfa, 0xd5, + 0x6f, 0x4d, 0x41, 0x81, 0xef, 0x2a, 0xd1, 0xe4, 0x00, 0x7b, 0x3e, 0x89, 0xb1, 0xec, 0x90, 0x10, + 0x43, 0x72, 0x67, 0x3a, 0xd0, 0xfd, 0x86, 0x87, 0xf7, 0xf8, 0xb7, 0x39, 0x75, 0xa0, 0xfb, 0x2a, + 0xde, 0x23, 0x99, 0x40, 0xc7, 0x0d, 0xcc, 0x36, 0x6e, 0xb4, 0x7d, 0xa6, 0x23, 0xcb, 0x04, 0x76, + 0x28, 0xf0, 0xde, 0xb6, 0x5a, 0x64, 0xd3, 0xf7, 0x7c, 0xf4, 0x1a, 0xc8, 0x1d, 0x1f, 0x7b, 0x0d, + 0xdd, 0xed, 0x34, 0x04, 0x05, 0x50, 0x8a, 0xf9, 0xa3, 0xc3, 0xda, 0xcc, 0x8e, 0x8f, 0xbd, 0xb5, + 0xfa, 0xce, 0x03, 0x46, 0x36, 0x43, 0x50, 0xd7, 0xdc, 0xce, 0x03, 0x46, 0xfb, 0x05, 0x40, 0x3e, + 0xdd, 0x8d, 0x04, 0xf5, 0x34, 0xa5, 0xa6, 0x2d, 0x8a, 0x6c, 0xaf, 0x22, 0xfa, 0x39, 0x86, 0x1e, + 0x71, 0xb8, 0x08, 0xe0, 0x07, 0x9a, 0xc7, 0xfa, 0x9f, 0x2b, 0x65, 0x6a, 0x8b, 0x12, 0x87, 0xac, + 0xd0, 0xbf, 0xbb, 0xf0, 0x2c, 0xb3, 0x6d, 0x06, 0x0d, 0xbd, 0xe3, 0x55, 0x66, 0x68, 0x5b, 0x6a, + 0x89, 0x41, 0xd6, 0x3a, 0x1e, 0xba, 0x02, 0x33, 0x76, 0xa7, 0xdd, 0x68, 0x3a, 0x9e, 0xd3, 0x09, + 0x4c, 0x1b, 0x57, 0x66, 0x29, 0x83, 0xb2, 0xdd, 0x69, 0xdf, 0x11, 0x30, 0xb2, 0x25, 0xb6, 0xb3, + 0x67, 0x5a, 0xb8, 0x32, 0xc7, 0xb6, 0x84, 0x8d, 0xd0, 0xf3, 0x70, 0x2a, 0x70, 0x9c, 0x46, 0x5b, + 0xb3, 0xbb, 0x0d, 0xc7, 0xc5, 0x76, 0x83, 0x40, 0xfd, 0x8a, 0x4c, 0x2f, 0x9f, 0x72, 0xe0, 0x38, + 0xf7, 0x34, 0xbb, 0x7b, 0xdf, 0xc5, 0xf6, 0xdb, 0x04, 0x4e, 0xae, 0xb6, 0x44, 0x96, 0xee, 0x76, + 0x2a, 0xf3, 0x74, 0x81, 0xf4, 0x6a, 0xfb, 0x6e, 0x87, 0xac, 0x4e, 0x9d, 0xb2, 0x3b, 0x64, 0x51, + 0x44, 0xdf, 0xa6, 0xd3, 0x10, 0xbb, 0x85, 0xe8, 0x9e, 0x94, 0x9a, 0xce, 0xcf, 0xf1, 0xfd, 0x7a, + 0x16, 0x64, 0xc7, 0xc5, 0x1e, 0x6d, 0xa9, 0x68, 0x30, 0x53, 0x54, 0x4e, 0xb1, 0x44, 0x21, 0x84, + 0x33, 0x93, 0xa1, 0xf3, 0x50, 0xda, 0x77, 0xfc, 0x80, 0x15, 0x07, 0x4e, 0x53, 0x9c, 0x22, 0x01, + 0xd0, 0xd2, 0x00, 0x82, 0x09, 0xcd, 0xd3, 0xf7, 0x2b, 0x67, 0x28, 0x9c, 0xfe, 0x8e, 0x99, 0xaa, + 0xad, 0x3d, 0xaa, 0x2c, 0xc4, 0x4d, 0x75, 0x4f, 0x7b, 0x44, 0x0e, 0x35, 0xd7, 0x34, 0x2a, 0x67, + 0xa9, 0xea, 0xec, 0x73, 0x27, 0x59, 0xab, 0x6b, 0x1a, 0xe8, 0x02, 0x4c, 0xb8, 0x64, 0xae, 0x42, + 0xe7, 0x8a, 0x47, 0x87, 0xb5, 0x89, 0x3a, 0x99, 0xa4, 0x50, 0xf6, 0x8d, 0x98, 0x8e, 0x67, 0x06, + 0xdd, 0xca, 0x39, 0xf1, 0x8d, 0xb0, 0x31, 0x3d, 0x29, 0x4d, 0xa3, 0x52, 0x8d, 0x98, 0xee, 0x10, + 0xa6, 0x1d, 0xd3, 0x40, 0x35, 0x98, 0x7e, 0xe8, 0x78, 0x2d, 0xb2, 0x50, 0xc3, 0xf4, 0x2a, 0xe7, + 0x59, 0x79, 0x83, 0x83, 0xd6, 0x4d, 0x8f, 0x7c, 0x0a, 0xdc, 0x77, 0x88, 0x4f, 0xd1, 0x65, 0x5e, + 0xa0, 0x48, 0xb3, 0x0c, 0xbc, 0xc3, 0xa1, 0xca, 0x7f, 0x4c, 0x42, 0x91, 0x5e, 0x7c, 0x7a, 0x0e, + 0xcf, 0xb7, 0x44, 0xb4, 0x7c, 0x19, 0x26, 0xc5, 0xa7, 0x94, 0xcf, 0xa8, 0x79, 0x0b, 0x7a, 0xfa, + 0x43, 0x65, 0xe8, 0xd5, 0x3f, 0xc8, 0xc1, 0x04, 0x19, 0xc7, 0x9a, 0xe3, 0x4b, 0x89, 0xe6, 0xf8, + 0x57, 0x61, 0x8a, 0x38, 0x11, 0x66, 0x99, 0x7c, 0x7a, 0x20, 0x0d, 0x39, 0xab, 0x04, 0x53, 0xe5, + 0x04, 0xc4, 0xe9, 0xb0, 0xe7, 0x39, 0x1e, 0x4b, 0xb7, 0x4a, 0x2a, 0x1f, 0xa1, 0xb7, 0xa0, 0xb8, + 0x87, 0xb5, 0xa0, 0xe3, 0x61, 0x16, 0x0f, 0x67, 0xd3, 0xff, 0x4e, 0x41, 0x30, 0x7d, 0x9b, 0xe1, + 0xaa, 0x21, 0x11, 0xb1, 0x6b, 0xdb, 0xb4, 0x1b, 0x96, 0x16, 0x60, 0x5b, 0xef, 0xd2, 0x9b, 0x7a, + 0x5e, 0x85, 0xb6, 0x69, 0x6f, 0x31, 0x08, 0x71, 0x1c, 0xd3, 0x6f, 0xd0, 0x12, 0x1d, 0xe6, 0xd5, + 0xd2, 0xa2, 0xe9, 0xd3, 0x02, 0x21, 0x46, 0xaf, 0x41, 0xc9, 0x30, 0x3d, 0xac, 0xd3, 0x84, 0xad, + 0x90, 0x79, 0xcb, 0x58, 0x17, 0x38, 0x6a, 0x84, 0x5e, 0xfd, 0x3b, 0x72, 0x3c, 0x91, 0xd5, 0x25, + 0x45, 0x48, 0x3d, 0x22, 0x2a, 0x50, 0xd0, 0x0c, 0x83, 0x86, 0x54, 0x16, 0x93, 0xc4, 0x30, 0x29, + 0x3c, 0x3f, 0x96, 0x70, 0xc2, 0x55, 0x2c, 0x99, 0x05, 0x56, 0x31, 0x44, 0x6f, 0x40, 0xc1, 0x0f, + 0x3c, 0xac, 0xb5, 0x59, 0xeb, 0xca, 0xf4, 0xb2, 0x32, 0xc8, 0xa0, 0xdb, 0x14, 0x55, 0x15, 0x24, + 0xd5, 0xcb, 0x30, 0xc5, 0x40, 0x59, 0x4e, 0xa0, 0x78, 0x50, 0xe0, 0xbb, 0x80, 0x10, 0xcc, 0xf2, + 0xf6, 0x0b, 0x0e, 0x91, 0x9f, 0x42, 0x32, 0x94, 0x57, 0x89, 0x38, 0x01, 0x91, 0xd0, 0x2c, 0xc0, + 0xea, 0xd6, 0x86, 0x18, 0xe7, 0x08, 0xc6, 0x96, 0xa3, 0x6b, 0x96, 0x80, 0xe4, 0x09, 0xc6, 0x03, + 0xc7, 0x13, 0xe3, 0x09, 0x34, 0x07, 0xd3, 0xef, 0x75, 0x4c, 0x5d, 0x00, 0x26, 0x95, 0xdf, 0x97, + 0x60, 0x3e, 0x7a, 0x51, 0xaa, 0x7b, 0x98, 0x5c, 0x19, 0xab, 0xef, 0x46, 0x59, 0xc9, 0x69, 0x98, + 0xa4, 0x4f, 0xd7, 0xe2, 0x0f, 0x9d, 0xe8, 0x00, 0x3d, 0x0f, 0xc8, 0x60, 0x8d, 0x15, 0x0d, 0xfe, + 0x87, 0x21, 0xc4, 0xd2, 0xac, 0x98, 0x3b, 0xcf, 0x67, 0x36, 0xc2, 0x89, 0xea, 0x8a, 0xf8, 0x80, + 0x5e, 0x81, 0xd9, 0xe4, 0xd3, 0x16, 0xbf, 0x78, 0xd1, 0x03, 0x20, 0xf1, 0xb2, 0xa5, 0xce, 0x24, + 0x1e, 0xb6, 0x94, 0x47, 0x80, 0xa2, 0x79, 0x15, 0x07, 0x9e, 0x89, 0x0f, 0x70, 0x75, 0x2d, 0x52, + 0xf4, 0xd8, 0xac, 0xab, 0x17, 0x85, 0x76, 0xe1, 0x5a, 0x73, 0xb1, 0xb5, 0xde, 0x30, 0x21, 0xaa, + 0x3c, 0xa0, 0x05, 0xfe, 0xa8, 0x46, 0x06, 0xf1, 0x1a, 0xcd, 0x69, 0xfe, 0x1e, 0x42, 0xe0, 0xbc, + 0x51, 0x4a, 0x96, 0x12, 0x50, 0x7e, 0xdf, 0x94, 0x73, 0xa8, 0xc2, 0xff, 0xc6, 0x81, 0x40, 0x63, + 0x2f, 0xb0, 0x72, 0xfe, 0xc6, 0x3f, 0x14, 0xa0, 0x14, 0x5d, 0xb2, 0x17, 0x00, 0x85, 0x83, 0xb8, + 0xac, 0x2b, 0x50, 0x0b, 0xe1, 0xfc, 0x11, 0x26, 0xfa, 0xf3, 0x0f, 0xda, 0x3b, 0x28, 0x4b, 0xfd, + 0x48, 0xf1, 0x3f, 0xa7, 0x60, 0x48, 0x39, 0x54, 0x83, 0xf3, 0x21, 0x52, 0x7f, 0xbf, 0xba, 0x8c, + 0xd1, 0x45, 0x38, 0x97, 0x8a, 0xb0, 0x85, 0xf7, 0x02, 0x79, 0x0f, 0xdd, 0x80, 0x6b, 0xbd, 0xd3, + 0xe9, 0x7d, 0xe1, 0x72, 0x13, 0x3d, 0x0b, 0x57, 0x07, 0xe3, 0x8a, 0x16, 0xa3, 0x7d, 0x74, 0x0b, + 0x6e, 0x0e, 0x46, 0x4d, 0xb6, 0x75, 0xcb, 0x26, 0x5a, 0x86, 0xc5, 0xc1, 0x14, 0xf7, 0x3b, 0x41, + 0xd3, 0x31, 0xed, 0xa6, 0xe8, 0xc3, 0x96, 0x3f, 0x44, 0x8b, 0x70, 0x63, 0x34, 0x9a, 0x6d, 0x6c, + 0x07, 0x72, 0x6b, 0xb8, 0x8c, 0x4d, 0x5b, 0x77, 0xda, 0xa6, 0xdd, 0x14, 0xed, 0xc9, 0xb2, 0x85, + 0x5e, 0x84, 0xa5, 0xd1, 0x68, 0xc2, 0xae, 0x5f, 0xb9, 0x3d, 0xba, 0x20, 0xd1, 0xae, 0x2b, 0xdb, + 0x48, 0x81, 0x4b, 0x19, 0x34, 0xbc, 0x71, 0x56, 0x76, 0xd0, 0xe7, 0xe0, 0x72, 0x06, 0x4e, 0xd8, + 0xea, 0x2a, 0xbb, 0x48, 0x81, 0x8b, 0x21, 0x56, 0x4f, 0xa7, 0x09, 0x73, 0x9b, 0xbf, 0x92, 0xd0, + 0x2d, 0x78, 0x2e, 0xc4, 0x19, 0xd8, 0x33, 0xc1, 0x28, 0xfe, 0x30, 0x87, 0x5e, 0x8a, 0x19, 0xa2, + 0xbf, 0xeb, 0x20, 0xf6, 0xe7, 0x22, 0x2b, 0xb6, 0xed, 0x74, 0x6c, 0x1d, 0x1b, 0xf2, 0x67, 0x39, + 0xb4, 0x08, 0xcf, 0x66, 0xcb, 0x49, 0x74, 0x4d, 0x60, 0x43, 0xfe, 0xa3, 0x1c, 0xba, 0x06, 0x4f, + 0xf7, 0xae, 0xb0, 0xaf, 0xaf, 0x56, 0xfe, 0x8d, 0x3c, 0xba, 0x0e, 0x57, 0x06, 0xe1, 0xf1, 0x96, + 0x57, 0xf9, 0x37, 0xf3, 0xe8, 0x52, 0xec, 0x03, 0xe8, 0x6d, 0x55, 0x95, 0xbf, 0x93, 0x4f, 0x48, + 0x4c, 0xbc, 0x04, 0xd7, 0x59, 0x91, 0x8b, 0xfa, 0xce, 0xbf, 0x15, 0x6e, 0xfc, 0xaa, 0x04, 0x95, + 0xac, 0x3a, 0x20, 0xba, 0x0a, 0x4f, 0x67, 0xcd, 0xf5, 0x7c, 0xf7, 0x59, 0x68, 0xfc, 0x19, 0x56, + 0x96, 0xc8, 0x26, 0x67, 0x23, 0x31, 0xd5, 0xe4, 0xdc, 0x8d, 0xbf, 0x90, 0xc2, 0x66, 0x27, 0xd6, + 0xef, 0x77, 0x2e, 0xec, 0xab, 0xa2, 0xe3, 0xb8, 0xd8, 0x9e, 0xa9, 0x07, 0x0e, 0xf7, 0x42, 0x59, + 0x22, 0x91, 0x2c, 0x3e, 0x15, 0x3a, 0x7e, 0x0e, 0x9d, 0x81, 0xf9, 0xf8, 0x0c, 0xb3, 0x7c, 0x1e, + 0x9d, 0x0d, 0xbb, 0x97, 0x38, 0x01, 0x33, 0xf4, 0x44, 0xaf, 0x90, 0xe8, 0x73, 0x98, 0xec, 0xa5, + 0x11, 0xfe, 0x3c, 0x75, 0xe3, 0x0e, 0x94, 0xc2, 0x13, 0x9c, 0x9c, 0x74, 0xfc, 0xc4, 0x5c, 0x37, + 0x3d, 0xf9, 0x29, 0x32, 0xde, 0xb4, 0x77, 0x9d, 0x8e, 0x6d, 0x90, 0xb1, 0x44, 0x4e, 0xbe, 0xfb, + 0x9d, 0x20, 0x04, 0xe4, 0x50, 0x09, 0x26, 0x57, 0x4d, 0xf2, 0x33, 0xbf, 0xfc, 0xb1, 0x02, 0x73, + 0xe2, 0x0f, 0x36, 0x45, 0x31, 0xce, 0x4b, 0x6b, 0xf3, 0x45, 0xcf, 0x0f, 0x68, 0xb7, 0x8c, 0xd0, + 0x16, 0x45, 0xe2, 0xf8, 0xdc, 0xa8, 0xe8, 0xae, 0xd5, 0xbd, 0x25, 0xa1, 0x8f, 0xa5, 0xec, 0x5e, + 0x60, 0xf4, 0xe2, 0x38, 0x9d, 0x9e, 0x42, 0x81, 0x17, 0xc6, 0x23, 0x22, 0x87, 0xe0, 0x2f, 0x67, + 0x36, 0x70, 0xa2, 0xe5, 0x14, 0x6e, 0x19, 0xb8, 0xa1, 0x06, 0xb7, 0xc6, 0xa2, 0x21, 0x0a, 0x74, + 0x33, 0x5a, 0x38, 0xd1, 0x70, 0x56, 0x1c, 0x33, 0x14, 0xbe, 0x38, 0x06, 0x05, 0x11, 0x7d, 0x90, + 0xde, 0x10, 0x8a, 0x96, 0x86, 0xf2, 0x61, 0x88, 0xa1, 0xe0, 0xe7, 0x47, 0x27, 0x20, 0x72, 0xbf, + 0x2d, 0x0d, 0xee, 0x13, 0x45, 0xb7, 0x47, 0xb0, 0x62, 0x9c, 0x20, 0x54, 0xe4, 0xf3, 0xe3, 0x13, + 0x12, 0x85, 0xdc, 0xb4, 0x66, 0x52, 0x34, 0x7c, 0x55, 0x04, 0x6d, 0xa0, 0xf7, 0xa7, 0xa2, 0xa7, + 0x9a, 0x9e, 0x1d, 0x6e, 0x23, 0x98, 0x9e, 0x21, 0x8e, 0x61, 0xfa, 0x90, 0x20, 0xcb, 0xdb, 0x48, + 0xe8, 0x19, 0xcd, 0xdb, 0x08, 0xe6, 0x78, 0xde, 0xc6, 0x29, 0x88, 0xe8, 0x2f, 0x27, 0x1b, 0x4e, + 0xd1, 0x33, 0xd9, 0xf4, 0x14, 0x21, 0x14, 0x74, 0x75, 0x38, 0x22, 0xe1, 0x6f, 0xf4, 0xb6, 0x9f, + 0xa2, 0x67, 0xb3, 0x09, 0x39, 0x4a, 0x28, 0xe3, 0x99, 0x51, 0x50, 0x89, 0x14, 0x3f, 0xb5, 0x21, + 0x15, 0x0d, 0x30, 0x46, 0x1c, 0x2f, 0x94, 0x77, 0x73, 0x64, 0x7c, 0x22, 0xf4, 0x6b, 0x59, 0x2d, + 0xab, 0x28, 0x2d, 0xe2, 0xa5, 0xa3, 0x86, 0xa2, 0x97, 0xc6, 0x21, 0xe1, 0xbe, 0x9a, 0xd6, 0xda, + 0x8a, 0x46, 0x61, 0x44, 0x10, 0x07, 0xfa, 0x6a, 0x06, 0x01, 0xf7, 0xd5, 0xd4, 0xb6, 0xd7, 0x54, + 0x5f, 0x4d, 0xc5, 0x1c, 0xe8, 0xab, 0x59, 0x14, 0x44, 0xf4, 0xf7, 0xa5, 0x11, 0xbb, 0x63, 0xd1, + 0x17, 0x46, 0xe0, 0x9c, 0x4a, 0x19, 0xea, 0xf6, 0x33, 0x27, 0xe0, 0x40, 0x74, 0xfd, 0xee, 0xd0, + 0x1e, 0x5b, 0xf4, 0xea, 0x28, 0x22, 0x12, 0x24, 0xa1, 0x76, 0xb7, 0x8f, 0x43, 0x4a, 0xd4, 0xfa, + 0xde, 0x08, 0x0d, 0xb7, 0xe8, 0xf5, 0x11, 0xb8, 0xf7, 0x12, 0x85, 0xaa, 0xbd, 0x7a, 0x3c, 0x62, + 0xa2, 0x5c, 0xb3, 0xaf, 0xf7, 0x16, 0xdd, 0x48, 0xe1, 0xd6, 0x83, 0x13, 0x4a, 0xbe, 0x3e, 0x12, + 0x2e, 0x0f, 0x4a, 0xc9, 0xe6, 0xd9, 0xd4, 0xa0, 0x94, 0x44, 0x19, 0x18, 0x94, 0xfa, 0x50, 0x89, + 0x94, 0x0f, 0x53, 0xfa, 0x32, 0xd1, 0xcd, 0x61, 0x2d, 0xaa, 0xac, 0xba, 0x36, 0x20, 0xc8, 0xf6, + 0xf7, 0xd3, 0xde, 0x92, 0x50, 0xb3, 0xbf, 0x15, 0x12, 0x3d, 0x97, 0x4d, 0x1c, 0x22, 0x85, 0x92, + 0x3e, 0x37, 0x04, 0x59, 0x08, 0xda, 0x89, 0xf5, 0x1e, 0xa2, 0x4c, 0x22, 0xfa, 0x5c, 0x21, 0x58, + 0x2b, 0x43, 0xb0, 0x88, 0xad, 0xb4, 0x9e, 0xa6, 0x3e, 0x94, 0xba, 0x99, 0x71, 0x8c, 0x90, 0xfd, + 0xb5, 0x11, 0x30, 0xb9, 0x77, 0xf5, 0xf4, 0xf2, 0xa5, 0x7a, 0x57, 0x0f, 0xce, 0x40, 0xef, 0xea, + 0xc7, 0x25, 0x82, 0xbe, 0x92, 0x6c, 0xf2, 0x4b, 0x3d, 0x52, 0x13, 0xbd, 0x3c, 0x83, 0x76, 0xbb, + 0x07, 0x91, 0xe5, 0xe8, 0x66, 0x5f, 0x2f, 0x4c, 0xc6, 0x52, 0x12, 0x38, 0x43, 0x96, 0xd2, 0x8b, + 0xcb, 0x44, 0x7d, 0x94, 0xd5, 0xab, 0x92, 0x7a, 0xc8, 0xa5, 0xa3, 0x0e, 0x3c, 0xe4, 0x32, 0x49, + 0x98, 0xfc, 0xf7, 0xe3, 0xfd, 0x19, 0xe8, 0x6a, 0x16, 0x83, 0xa4, 0x21, 0xaf, 0x0c, 0x43, 0x23, + 0xdb, 0xf4, 0x7e, 0xfc, 0x61, 0x12, 0x0d, 0x79, 0xf3, 0x1b, 0xc4, 0x39, 0x81, 0xc6, 0xb3, 0x91, + 0x94, 0x47, 0xfa, 0xd4, 0x6c, 0x24, 0x05, 0x6f, 0x60, 0x36, 0x92, 0x8e, 0xcf, 0xaf, 0x4c, 0x19, + 0xdd, 0x07, 0xa9, 0x57, 0xa6, 0x0c, 0xdc, 0x81, 0x57, 0xa6, 0x6c, 0x1a, 0xa2, 0x80, 0x93, 0xf2, + 0xfa, 0x9f, 0x1a, 0xee, 0xfa, 0xb0, 0x42, 0xa1, 0x37, 0x46, 0xc4, 0x66, 0xae, 0xf1, 0xdb, 0xc3, + 0x9f, 0xd8, 0x51, 0x5a, 0x77, 0xe3, 0x10, 0x9a, 0x50, 0x9b, 0x57, 0x8e, 0x45, 0x4b, 0x4c, 0xa1, + 0x46, 0x4f, 0x38, 0x68, 0xe0, 0x83, 0x87, 0x10, 0x35, 0xf8, 0xa9, 0x45, 0x98, 0xb7, 0xaf, 0x46, + 0x9e, 0x6a, 0xde, 0x3e, 0xac, 0x81, 0xe6, 0x4d, 0xc3, 0x76, 0xad, 0xee, 0x75, 0x09, 0x79, 0x69, + 0xc5, 0xee, 0xd4, 0xeb, 0x57, 0x3f, 0xda, 0xc0, 0xeb, 0x57, 0x2a, 0x3a, 0xdd, 0xd2, 0xd5, 0xdb, + 0x3f, 0xfa, 0x97, 0x4b, 0x4f, 0xfd, 0xf0, 0xe8, 0x92, 0xf4, 0xa3, 0xa3, 0x4b, 0xd2, 0x8f, 0x8f, + 0x2e, 0x49, 0x5f, 0xba, 0xca, 0xe8, 0x03, 0xac, 0xef, 0x2f, 0xd1, 0x9f, 0x4b, 0x4d, 0x67, 0xc9, + 0x6d, 0x35, 0x97, 0x12, 0xff, 0x7b, 0x70, 0x77, 0x8a, 0x0e, 0x5f, 0xfc, 0xdf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x21, 0x65, 0xc4, 0x0f, 0x93, 0x50, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ context.Context + _ grpc.ClientConn +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ProtocolServiceClient is the client API for ProtocolService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ProtocolServiceClient interface { + // InstanceExportData exports instance data + InstanceExportData(ctx context.Context, in *InstanceExportData_Request, opts ...grpc.CallOption) (ProtocolService_InstanceExportDataClient, error) + // InstanceGetConfiguration gets current configuration of this protocol instance + InstanceGetConfiguration(ctx context.Context, in *InstanceGetConfiguration_Request, opts ...grpc.CallOption) (*InstanceGetConfiguration_Reply, error) + // ContactRequestReference retrieves the information required to create a reference (ie. included in a shareable link) to the current account + ContactRequestReference(ctx context.Context, in *ContactRequestReference_Request, opts ...grpc.CallOption) (*ContactRequestReference_Reply, error) + // ContactRequestDisable disables incoming contact requests + ContactRequestDisable(ctx context.Context, in *ContactRequestDisable_Request, opts ...grpc.CallOption) (*ContactRequestDisable_Reply, error) + // ContactRequestEnable enables incoming contact requests + ContactRequestEnable(ctx context.Context, in *ContactRequestEnable_Request, opts ...grpc.CallOption) (*ContactRequestEnable_Reply, error) + // ContactRequestResetReference changes the contact request reference + ContactRequestResetReference(ctx context.Context, in *ContactRequestResetReference_Request, opts ...grpc.CallOption) (*ContactRequestResetReference_Reply, error) + // ContactRequestSend attempt to send a contact request + ContactRequestSend(ctx context.Context, in *ContactRequestSend_Request, opts ...grpc.CallOption) (*ContactRequestSend_Reply, error) + // ContactRequestAccept accepts a contact request + ContactRequestAccept(ctx context.Context, in *ContactRequestAccept_Request, opts ...grpc.CallOption) (*ContactRequestAccept_Reply, error) + // ContactRequestDiscard ignores a contact request, without informing the other user + ContactRequestDiscard(ctx context.Context, in *ContactRequestDiscard_Request, opts ...grpc.CallOption) (*ContactRequestDiscard_Reply, error) + // ContactBlock blocks a contact from sending requests + ContactBlock(ctx context.Context, in *ContactBlock_Request, opts ...grpc.CallOption) (*ContactBlock_Reply, error) + // ContactUnblock unblocks a contact from sending requests + ContactUnblock(ctx context.Context, in *ContactUnblock_Request, opts ...grpc.CallOption) (*ContactUnblock_Reply, error) + // ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group + ContactAliasKeySend(ctx context.Context, in *ContactAliasKeySend_Request, opts ...grpc.CallOption) (*ContactAliasKeySend_Reply, error) + // MultiMemberGroupCreate creates a new multi-member group + MultiMemberGroupCreate(ctx context.Context, in *MultiMemberGroupCreate_Request, opts ...grpc.CallOption) (*MultiMemberGroupCreate_Reply, error) + // MultiMemberGroupJoin joins a multi-member group + MultiMemberGroupJoin(ctx context.Context, in *MultiMemberGroupJoin_Request, opts ...grpc.CallOption) (*MultiMemberGroupJoin_Reply, error) + // MultiMemberGroupLeave leaves a multi-member group + MultiMemberGroupLeave(ctx context.Context, in *MultiMemberGroupLeave_Request, opts ...grpc.CallOption) (*MultiMemberGroupLeave_Reply, error) + // MultiMemberGroupAliasResolverDisclose discloses your alias resolver key + MultiMemberGroupAliasResolverDisclose(ctx context.Context, in *MultiMemberGroupAliasResolverDisclose_Request, opts ...grpc.CallOption) (*MultiMemberGroupAliasResolverDisclose_Reply, error) + // MultiMemberGroupAdminRoleGrant grants an admin role to a group member + MultiMemberGroupAdminRoleGrant(ctx context.Context, in *MultiMemberGroupAdminRoleGrant_Request, opts ...grpc.CallOption) (*MultiMemberGroupAdminRoleGrant_Reply, error) + // MultiMemberGroupInvitationCreate creates an invitation to a multi-member group + MultiMemberGroupInvitationCreate(ctx context.Context, in *MultiMemberGroupInvitationCreate_Request, opts ...grpc.CallOption) (*MultiMemberGroupInvitationCreate_Reply, error) + // AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members + AppMetadataSend(ctx context.Context, in *AppMetadataSend_Request, opts ...grpc.CallOption) (*AppMetadataSend_Reply, error) + // AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members + AppMessageSend(ctx context.Context, in *AppMessageSend_Request, opts ...grpc.CallOption) (*AppMessageSend_Reply, error) + // GroupMetadataList replays previous and subscribes to new metadata events from the group + GroupMetadataList(ctx context.Context, in *GroupMetadataList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMetadataListClient, error) + // GroupMessageList replays previous and subscribes to new message events from the group + GroupMessageList(ctx context.Context, in *GroupMessageList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMessageListClient, error) + // GroupInfo retrieves information about a group + GroupInfo(ctx context.Context, in *GroupInfo_Request, opts ...grpc.CallOption) (*GroupInfo_Reply, error) + // ActivateGroup explicitly opens a group + ActivateGroup(ctx context.Context, in *ActivateGroup_Request, opts ...grpc.CallOption) (*ActivateGroup_Reply, error) + // DeactivateGroup closes a group + DeactivateGroup(ctx context.Context, in *DeactivateGroup_Request, opts ...grpc.CallOption) (*DeactivateGroup_Reply, error) + // Monitor Group events + MonitorGroup(ctx context.Context, in *MonitorGroup_Request, opts ...grpc.CallOption) (ProtocolService_MonitorGroupClient, error) + DebugListGroups(ctx context.Context, in *DebugListGroups_Request, opts ...grpc.CallOption) (ProtocolService_DebugListGroupsClient, error) + DebugInspectGroupStore(ctx context.Context, in *DebugInspectGroupStore_Request, opts ...grpc.CallOption) (ProtocolService_DebugInspectGroupStoreClient, error) + DebugGroup(ctx context.Context, in *DebugGroup_Request, opts ...grpc.CallOption) (*DebugGroup_Reply, error) + SystemInfo(ctx context.Context, in *SystemInfo_Request, opts ...grpc.CallOption) (*SystemInfo_Reply, error) + // AuthServiceInitFlow Initialize an authentication flow + AuthServiceInitFlow(ctx context.Context, in *AuthServiceInitFlow_Request, opts ...grpc.CallOption) (*AuthServiceInitFlow_Reply, error) + // AuthServiceCompleteFlow Completes an authentication flow + AuthServiceCompleteFlow(ctx context.Context, in *AuthServiceCompleteFlow_Request, opts ...grpc.CallOption) (*AuthServiceCompleteFlow_Reply, error) + // ServicesTokenList Retrieves the list of services tokens + ServicesTokenList(ctx context.Context, in *ServicesTokenList_Request, opts ...grpc.CallOption) (ProtocolService_ServicesTokenListClient, error) + // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents + ReplicationServiceRegisterGroup(ctx context.Context, in *ReplicationServiceRegisterGroup_Request, opts ...grpc.CallOption) (*ReplicationServiceRegisterGroup_Reply, error) + // PeerList returns a list of P2P peers + PeerList(ctx context.Context, in *PeerList_Request, opts ...grpc.CallOption) (*PeerList_Reply, error) + // AttachmentPrepare ... + AttachmentPrepare(ctx context.Context, opts ...grpc.CallOption) (ProtocolService_AttachmentPrepareClient, error) + // AttachmentRetrieve returns an attachment data + AttachmentRetrieve(ctx context.Context, in *AttachmentRetrieve_Request, opts ...grpc.CallOption) (ProtocolService_AttachmentRetrieveClient, error) +} + +type protocolServiceClient struct { + cc *grpc.ClientConn +} + +func NewProtocolServiceClient(cc *grpc.ClientConn) ProtocolServiceClient { + return &protocolServiceClient{cc} +} + +func (c *protocolServiceClient) InstanceExportData(ctx context.Context, in *InstanceExportData_Request, opts ...grpc.CallOption) (ProtocolService_InstanceExportDataClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[0], "/berty.protocol.v1.ProtocolService/InstanceExportData", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceInstanceExportDataClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_InstanceExportDataClient interface { + Recv() (*InstanceExportData_Reply, error) + grpc.ClientStream +} + +type protocolServiceInstanceExportDataClient struct { + grpc.ClientStream +} + +func (x *protocolServiceInstanceExportDataClient) Recv() (*InstanceExportData_Reply, error) { + m := new(InstanceExportData_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) InstanceGetConfiguration(ctx context.Context, in *InstanceGetConfiguration_Request, opts ...grpc.CallOption) (*InstanceGetConfiguration_Reply, error) { + out := new(InstanceGetConfiguration_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/InstanceGetConfiguration", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactRequestReference(ctx context.Context, in *ContactRequestReference_Request, opts ...grpc.CallOption) (*ContactRequestReference_Reply, error) { + out := new(ContactRequestReference_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestReference", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactRequestDisable(ctx context.Context, in *ContactRequestDisable_Request, opts ...grpc.CallOption) (*ContactRequestDisable_Reply, error) { + out := new(ContactRequestDisable_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestDisable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactRequestEnable(ctx context.Context, in *ContactRequestEnable_Request, opts ...grpc.CallOption) (*ContactRequestEnable_Reply, error) { + out := new(ContactRequestEnable_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestEnable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactRequestResetReference(ctx context.Context, in *ContactRequestResetReference_Request, opts ...grpc.CallOption) (*ContactRequestResetReference_Reply, error) { + out := new(ContactRequestResetReference_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestResetReference", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactRequestSend(ctx context.Context, in *ContactRequestSend_Request, opts ...grpc.CallOption) (*ContactRequestSend_Reply, error) { + out := new(ContactRequestSend_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestSend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactRequestAccept(ctx context.Context, in *ContactRequestAccept_Request, opts ...grpc.CallOption) (*ContactRequestAccept_Reply, error) { + out := new(ContactRequestAccept_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestAccept", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactRequestDiscard(ctx context.Context, in *ContactRequestDiscard_Request, opts ...grpc.CallOption) (*ContactRequestDiscard_Reply, error) { + out := new(ContactRequestDiscard_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactRequestDiscard", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactBlock(ctx context.Context, in *ContactBlock_Request, opts ...grpc.CallOption) (*ContactBlock_Reply, error) { + out := new(ContactBlock_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactUnblock(ctx context.Context, in *ContactUnblock_Request, opts ...grpc.CallOption) (*ContactUnblock_Reply, error) { + out := new(ContactUnblock_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactUnblock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ContactAliasKeySend(ctx context.Context, in *ContactAliasKeySend_Request, opts ...grpc.CallOption) (*ContactAliasKeySend_Reply, error) { + out := new(ContactAliasKeySend_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ContactAliasKeySend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) MultiMemberGroupCreate(ctx context.Context, in *MultiMemberGroupCreate_Request, opts ...grpc.CallOption) (*MultiMemberGroupCreate_Reply, error) { + out := new(MultiMemberGroupCreate_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) MultiMemberGroupJoin(ctx context.Context, in *MultiMemberGroupJoin_Request, opts ...grpc.CallOption) (*MultiMemberGroupJoin_Reply, error) { + out := new(MultiMemberGroupJoin_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupJoin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) MultiMemberGroupLeave(ctx context.Context, in *MultiMemberGroupLeave_Request, opts ...grpc.CallOption) (*MultiMemberGroupLeave_Reply, error) { + out := new(MultiMemberGroupLeave_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupLeave", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) MultiMemberGroupAliasResolverDisclose(ctx context.Context, in *MultiMemberGroupAliasResolverDisclose_Request, opts ...grpc.CallOption) (*MultiMemberGroupAliasResolverDisclose_Reply, error) { + out := new(MultiMemberGroupAliasResolverDisclose_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupAliasResolverDisclose", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) MultiMemberGroupAdminRoleGrant(ctx context.Context, in *MultiMemberGroupAdminRoleGrant_Request, opts ...grpc.CallOption) (*MultiMemberGroupAdminRoleGrant_Reply, error) { + out := new(MultiMemberGroupAdminRoleGrant_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupAdminRoleGrant", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) MultiMemberGroupInvitationCreate(ctx context.Context, in *MultiMemberGroupInvitationCreate_Request, opts ...grpc.CallOption) (*MultiMemberGroupInvitationCreate_Reply, error) { + out := new(MultiMemberGroupInvitationCreate_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/MultiMemberGroupInvitationCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) AppMetadataSend(ctx context.Context, in *AppMetadataSend_Request, opts ...grpc.CallOption) (*AppMetadataSend_Reply, error) { + out := new(AppMetadataSend_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AppMetadataSend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) AppMessageSend(ctx context.Context, in *AppMessageSend_Request, opts ...grpc.CallOption) (*AppMessageSend_Reply, error) { + out := new(AppMessageSend_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AppMessageSend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) GroupMetadataList(ctx context.Context, in *GroupMetadataList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMetadataListClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[1], "/berty.protocol.v1.ProtocolService/GroupMetadataList", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceGroupMetadataListClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_GroupMetadataListClient interface { + Recv() (*GroupMetadataEvent, error) + grpc.ClientStream +} + +type protocolServiceGroupMetadataListClient struct { + grpc.ClientStream +} + +func (x *protocolServiceGroupMetadataListClient) Recv() (*GroupMetadataEvent, error) { + m := new(GroupMetadataEvent) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) GroupMessageList(ctx context.Context, in *GroupMessageList_Request, opts ...grpc.CallOption) (ProtocolService_GroupMessageListClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[2], "/berty.protocol.v1.ProtocolService/GroupMessageList", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceGroupMessageListClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_GroupMessageListClient interface { + Recv() (*GroupMessageEvent, error) + grpc.ClientStream +} + +type protocolServiceGroupMessageListClient struct { + grpc.ClientStream +} + +func (x *protocolServiceGroupMessageListClient) Recv() (*GroupMessageEvent, error) { + m := new(GroupMessageEvent) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) GroupInfo(ctx context.Context, in *GroupInfo_Request, opts ...grpc.CallOption) (*GroupInfo_Reply, error) { + out := new(GroupInfo_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/GroupInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ActivateGroup(ctx context.Context, in *ActivateGroup_Request, opts ...grpc.CallOption) (*ActivateGroup_Reply, error) { + out := new(ActivateGroup_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ActivateGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) DeactivateGroup(ctx context.Context, in *DeactivateGroup_Request, opts ...grpc.CallOption) (*DeactivateGroup_Reply, error) { + out := new(DeactivateGroup_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/DeactivateGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) MonitorGroup(ctx context.Context, in *MonitorGroup_Request, opts ...grpc.CallOption) (ProtocolService_MonitorGroupClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[3], "/berty.protocol.v1.ProtocolService/MonitorGroup", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceMonitorGroupClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_MonitorGroupClient interface { + Recv() (*MonitorGroup_Reply, error) + grpc.ClientStream +} + +type protocolServiceMonitorGroupClient struct { + grpc.ClientStream +} + +func (x *protocolServiceMonitorGroupClient) Recv() (*MonitorGroup_Reply, error) { + m := new(MonitorGroup_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) DebugListGroups(ctx context.Context, in *DebugListGroups_Request, opts ...grpc.CallOption) (ProtocolService_DebugListGroupsClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[4], "/berty.protocol.v1.ProtocolService/DebugListGroups", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceDebugListGroupsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_DebugListGroupsClient interface { + Recv() (*DebugListGroups_Reply, error) + grpc.ClientStream +} + +type protocolServiceDebugListGroupsClient struct { + grpc.ClientStream +} + +func (x *protocolServiceDebugListGroupsClient) Recv() (*DebugListGroups_Reply, error) { + m := new(DebugListGroups_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) DebugInspectGroupStore(ctx context.Context, in *DebugInspectGroupStore_Request, opts ...grpc.CallOption) (ProtocolService_DebugInspectGroupStoreClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[5], "/berty.protocol.v1.ProtocolService/DebugInspectGroupStore", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceDebugInspectGroupStoreClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_DebugInspectGroupStoreClient interface { + Recv() (*DebugInspectGroupStore_Reply, error) + grpc.ClientStream +} + +type protocolServiceDebugInspectGroupStoreClient struct { + grpc.ClientStream +} + +func (x *protocolServiceDebugInspectGroupStoreClient) Recv() (*DebugInspectGroupStore_Reply, error) { + m := new(DebugInspectGroupStore_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) DebugGroup(ctx context.Context, in *DebugGroup_Request, opts ...grpc.CallOption) (*DebugGroup_Reply, error) { + out := new(DebugGroup_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/DebugGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) SystemInfo(ctx context.Context, in *SystemInfo_Request, opts ...grpc.CallOption) (*SystemInfo_Reply, error) { + out := new(SystemInfo_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/SystemInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) AuthServiceInitFlow(ctx context.Context, in *AuthServiceInitFlow_Request, opts ...grpc.CallOption) (*AuthServiceInitFlow_Reply, error) { + out := new(AuthServiceInitFlow_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AuthServiceInitFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) AuthServiceCompleteFlow(ctx context.Context, in *AuthServiceCompleteFlow_Request, opts ...grpc.CallOption) (*AuthServiceCompleteFlow_Reply, error) { + out := new(AuthServiceCompleteFlow_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/AuthServiceCompleteFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) ServicesTokenList(ctx context.Context, in *ServicesTokenList_Request, opts ...grpc.CallOption) (ProtocolService_ServicesTokenListClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[6], "/berty.protocol.v1.ProtocolService/ServicesTokenList", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceServicesTokenListClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_ServicesTokenListClient interface { + Recv() (*ServicesTokenList_Reply, error) + grpc.ClientStream +} + +type protocolServiceServicesTokenListClient struct { + grpc.ClientStream +} + +func (x *protocolServiceServicesTokenListClient) Recv() (*ServicesTokenList_Reply, error) { + m := new(ServicesTokenList_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) ReplicationServiceRegisterGroup(ctx context.Context, in *ReplicationServiceRegisterGroup_Request, opts ...grpc.CallOption) (*ReplicationServiceRegisterGroup_Reply, error) { + out := new(ReplicationServiceRegisterGroup_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/ReplicationServiceRegisterGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) PeerList(ctx context.Context, in *PeerList_Request, opts ...grpc.CallOption) (*PeerList_Reply, error) { + out := new(PeerList_Reply) + err := c.cc.Invoke(ctx, "/berty.protocol.v1.ProtocolService/PeerList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *protocolServiceClient) AttachmentPrepare(ctx context.Context, opts ...grpc.CallOption) (ProtocolService_AttachmentPrepareClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[7], "/berty.protocol.v1.ProtocolService/AttachmentPrepare", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceAttachmentPrepareClient{stream} + return x, nil +} + +type ProtocolService_AttachmentPrepareClient interface { + Send(*AttachmentPrepare_Request) error + CloseAndRecv() (*AttachmentPrepare_Reply, error) + grpc.ClientStream +} + +type protocolServiceAttachmentPrepareClient struct { + grpc.ClientStream +} + +func (x *protocolServiceAttachmentPrepareClient) Send(m *AttachmentPrepare_Request) error { + return x.ClientStream.SendMsg(m) +} + +func (x *protocolServiceAttachmentPrepareClient) CloseAndRecv() (*AttachmentPrepare_Reply, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(AttachmentPrepare_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *protocolServiceClient) AttachmentRetrieve(ctx context.Context, in *AttachmentRetrieve_Request, opts ...grpc.CallOption) (ProtocolService_AttachmentRetrieveClient, error) { + stream, err := c.cc.NewStream(ctx, &_ProtocolService_serviceDesc.Streams[8], "/berty.protocol.v1.ProtocolService/AttachmentRetrieve", opts...) + if err != nil { + return nil, err + } + x := &protocolServiceAttachmentRetrieveClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ProtocolService_AttachmentRetrieveClient interface { + Recv() (*AttachmentRetrieve_Reply, error) + grpc.ClientStream +} + +type protocolServiceAttachmentRetrieveClient struct { + grpc.ClientStream +} + +func (x *protocolServiceAttachmentRetrieveClient) Recv() (*AttachmentRetrieve_Reply, error) { + m := new(AttachmentRetrieve_Reply) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// ProtocolServiceServer is the server API for ProtocolService service. +type ProtocolServiceServer interface { + // InstanceExportData exports instance data + InstanceExportData(*InstanceExportData_Request, ProtocolService_InstanceExportDataServer) error + // InstanceGetConfiguration gets current configuration of this protocol instance + InstanceGetConfiguration(context.Context, *InstanceGetConfiguration_Request) (*InstanceGetConfiguration_Reply, error) + // ContactRequestReference retrieves the information required to create a reference (ie. included in a shareable link) to the current account + ContactRequestReference(context.Context, *ContactRequestReference_Request) (*ContactRequestReference_Reply, error) + // ContactRequestDisable disables incoming contact requests + ContactRequestDisable(context.Context, *ContactRequestDisable_Request) (*ContactRequestDisable_Reply, error) + // ContactRequestEnable enables incoming contact requests + ContactRequestEnable(context.Context, *ContactRequestEnable_Request) (*ContactRequestEnable_Reply, error) + // ContactRequestResetReference changes the contact request reference + ContactRequestResetReference(context.Context, *ContactRequestResetReference_Request) (*ContactRequestResetReference_Reply, error) + // ContactRequestSend attempt to send a contact request + ContactRequestSend(context.Context, *ContactRequestSend_Request) (*ContactRequestSend_Reply, error) + // ContactRequestAccept accepts a contact request + ContactRequestAccept(context.Context, *ContactRequestAccept_Request) (*ContactRequestAccept_Reply, error) + // ContactRequestDiscard ignores a contact request, without informing the other user + ContactRequestDiscard(context.Context, *ContactRequestDiscard_Request) (*ContactRequestDiscard_Reply, error) + // ContactBlock blocks a contact from sending requests + ContactBlock(context.Context, *ContactBlock_Request) (*ContactBlock_Reply, error) + // ContactUnblock unblocks a contact from sending requests + ContactUnblock(context.Context, *ContactUnblock_Request) (*ContactUnblock_Reply, error) + // ContactAliasKeySend send an alias key to a contact, the contact will be able to assert that your account is being present on a multi-member group + ContactAliasKeySend(context.Context, *ContactAliasKeySend_Request) (*ContactAliasKeySend_Reply, error) + // MultiMemberGroupCreate creates a new multi-member group + MultiMemberGroupCreate(context.Context, *MultiMemberGroupCreate_Request) (*MultiMemberGroupCreate_Reply, error) + // MultiMemberGroupJoin joins a multi-member group + MultiMemberGroupJoin(context.Context, *MultiMemberGroupJoin_Request) (*MultiMemberGroupJoin_Reply, error) + // MultiMemberGroupLeave leaves a multi-member group + MultiMemberGroupLeave(context.Context, *MultiMemberGroupLeave_Request) (*MultiMemberGroupLeave_Reply, error) + // MultiMemberGroupAliasResolverDisclose discloses your alias resolver key + MultiMemberGroupAliasResolverDisclose(context.Context, *MultiMemberGroupAliasResolverDisclose_Request) (*MultiMemberGroupAliasResolverDisclose_Reply, error) + // MultiMemberGroupAdminRoleGrant grants an admin role to a group member + MultiMemberGroupAdminRoleGrant(context.Context, *MultiMemberGroupAdminRoleGrant_Request) (*MultiMemberGroupAdminRoleGrant_Reply, error) + // MultiMemberGroupInvitationCreate creates an invitation to a multi-member group + MultiMemberGroupInvitationCreate(context.Context, *MultiMemberGroupInvitationCreate_Request) (*MultiMemberGroupInvitationCreate_Reply, error) + // AppMetadataSend adds an app event to the metadata store, the message is encrypted using a symmetric key and readable by future group members + AppMetadataSend(context.Context, *AppMetadataSend_Request) (*AppMetadataSend_Reply, error) + // AppMessageSend adds an app event to the message store, the message is encrypted using a derived key and readable by current group members + AppMessageSend(context.Context, *AppMessageSend_Request) (*AppMessageSend_Reply, error) + // GroupMetadataList replays previous and subscribes to new metadata events from the group + GroupMetadataList(*GroupMetadataList_Request, ProtocolService_GroupMetadataListServer) error + // GroupMessageList replays previous and subscribes to new message events from the group + GroupMessageList(*GroupMessageList_Request, ProtocolService_GroupMessageListServer) error + // GroupInfo retrieves information about a group + GroupInfo(context.Context, *GroupInfo_Request) (*GroupInfo_Reply, error) + // ActivateGroup explicitly opens a group + ActivateGroup(context.Context, *ActivateGroup_Request) (*ActivateGroup_Reply, error) + // DeactivateGroup closes a group + DeactivateGroup(context.Context, *DeactivateGroup_Request) (*DeactivateGroup_Reply, error) + // Monitor Group events + MonitorGroup(*MonitorGroup_Request, ProtocolService_MonitorGroupServer) error + DebugListGroups(*DebugListGroups_Request, ProtocolService_DebugListGroupsServer) error + DebugInspectGroupStore(*DebugInspectGroupStore_Request, ProtocolService_DebugInspectGroupStoreServer) error + DebugGroup(context.Context, *DebugGroup_Request) (*DebugGroup_Reply, error) + SystemInfo(context.Context, *SystemInfo_Request) (*SystemInfo_Reply, error) + // AuthServiceInitFlow Initialize an authentication flow + AuthServiceInitFlow(context.Context, *AuthServiceInitFlow_Request) (*AuthServiceInitFlow_Reply, error) + // AuthServiceCompleteFlow Completes an authentication flow + AuthServiceCompleteFlow(context.Context, *AuthServiceCompleteFlow_Request) (*AuthServiceCompleteFlow_Reply, error) + // ServicesTokenList Retrieves the list of services tokens + ServicesTokenList(*ServicesTokenList_Request, ProtocolService_ServicesTokenListServer) error + // ReplicationServiceRegisterGroup Asks a replication service to distribute a group contents + ReplicationServiceRegisterGroup(context.Context, *ReplicationServiceRegisterGroup_Request) (*ReplicationServiceRegisterGroup_Reply, error) + // PeerList returns a list of P2P peers + PeerList(context.Context, *PeerList_Request) (*PeerList_Reply, error) + // AttachmentPrepare ... + AttachmentPrepare(ProtocolService_AttachmentPrepareServer) error + // AttachmentRetrieve returns an attachment data + AttachmentRetrieve(*AttachmentRetrieve_Request, ProtocolService_AttachmentRetrieveServer) error +} + +// UnimplementedProtocolServiceServer can be embedded to have forward compatible implementations. +type UnimplementedProtocolServiceServer struct { +} + +func (*UnimplementedProtocolServiceServer) InstanceExportData(req *InstanceExportData_Request, srv ProtocolService_InstanceExportDataServer) error { + return status.Errorf(codes.Unimplemented, "method InstanceExportData not implemented") +} + +func (*UnimplementedProtocolServiceServer) InstanceGetConfiguration(ctx context.Context, req *InstanceGetConfiguration_Request) (*InstanceGetConfiguration_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method InstanceGetConfiguration not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactRequestReference(ctx context.Context, req *ContactRequestReference_Request) (*ContactRequestReference_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactRequestReference not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactRequestDisable(ctx context.Context, req *ContactRequestDisable_Request) (*ContactRequestDisable_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactRequestDisable not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactRequestEnable(ctx context.Context, req *ContactRequestEnable_Request) (*ContactRequestEnable_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactRequestEnable not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactRequestResetReference(ctx context.Context, req *ContactRequestResetReference_Request) (*ContactRequestResetReference_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactRequestResetReference not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactRequestSend(ctx context.Context, req *ContactRequestSend_Request) (*ContactRequestSend_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactRequestSend not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactRequestAccept(ctx context.Context, req *ContactRequestAccept_Request) (*ContactRequestAccept_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactRequestAccept not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactRequestDiscard(ctx context.Context, req *ContactRequestDiscard_Request) (*ContactRequestDiscard_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactRequestDiscard not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactBlock(ctx context.Context, req *ContactBlock_Request) (*ContactBlock_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactBlock not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactUnblock(ctx context.Context, req *ContactUnblock_Request) (*ContactUnblock_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactUnblock not implemented") +} + +func (*UnimplementedProtocolServiceServer) ContactAliasKeySend(ctx context.Context, req *ContactAliasKeySend_Request) (*ContactAliasKeySend_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContactAliasKeySend not implemented") +} + +func (*UnimplementedProtocolServiceServer) MultiMemberGroupCreate(ctx context.Context, req *MultiMemberGroupCreate_Request) (*MultiMemberGroupCreate_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupCreate not implemented") +} + +func (*UnimplementedProtocolServiceServer) MultiMemberGroupJoin(ctx context.Context, req *MultiMemberGroupJoin_Request) (*MultiMemberGroupJoin_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupJoin not implemented") +} + +func (*UnimplementedProtocolServiceServer) MultiMemberGroupLeave(ctx context.Context, req *MultiMemberGroupLeave_Request) (*MultiMemberGroupLeave_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupLeave not implemented") +} + +func (*UnimplementedProtocolServiceServer) MultiMemberGroupAliasResolverDisclose(ctx context.Context, req *MultiMemberGroupAliasResolverDisclose_Request) (*MultiMemberGroupAliasResolverDisclose_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupAliasResolverDisclose not implemented") +} + +func (*UnimplementedProtocolServiceServer) MultiMemberGroupAdminRoleGrant(ctx context.Context, req *MultiMemberGroupAdminRoleGrant_Request) (*MultiMemberGroupAdminRoleGrant_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupAdminRoleGrant not implemented") +} + +func (*UnimplementedProtocolServiceServer) MultiMemberGroupInvitationCreate(ctx context.Context, req *MultiMemberGroupInvitationCreate_Request) (*MultiMemberGroupInvitationCreate_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method MultiMemberGroupInvitationCreate not implemented") +} + +func (*UnimplementedProtocolServiceServer) AppMetadataSend(ctx context.Context, req *AppMetadataSend_Request) (*AppMetadataSend_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppMetadataSend not implemented") +} + +func (*UnimplementedProtocolServiceServer) AppMessageSend(ctx context.Context, req *AppMessageSend_Request) (*AppMessageSend_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppMessageSend not implemented") +} + +func (*UnimplementedProtocolServiceServer) GroupMetadataList(req *GroupMetadataList_Request, srv ProtocolService_GroupMetadataListServer) error { + return status.Errorf(codes.Unimplemented, "method GroupMetadataList not implemented") +} + +func (*UnimplementedProtocolServiceServer) GroupMessageList(req *GroupMessageList_Request, srv ProtocolService_GroupMessageListServer) error { + return status.Errorf(codes.Unimplemented, "method GroupMessageList not implemented") +} + +func (*UnimplementedProtocolServiceServer) GroupInfo(ctx context.Context, req *GroupInfo_Request) (*GroupInfo_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupInfo not implemented") +} + +func (*UnimplementedProtocolServiceServer) ActivateGroup(ctx context.Context, req *ActivateGroup_Request) (*ActivateGroup_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActivateGroup not implemented") +} + +func (*UnimplementedProtocolServiceServer) DeactivateGroup(ctx context.Context, req *DeactivateGroup_Request) (*DeactivateGroup_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeactivateGroup not implemented") +} + +func (*UnimplementedProtocolServiceServer) MonitorGroup(req *MonitorGroup_Request, srv ProtocolService_MonitorGroupServer) error { + return status.Errorf(codes.Unimplemented, "method MonitorGroup not implemented") +} + +func (*UnimplementedProtocolServiceServer) DebugListGroups(req *DebugListGroups_Request, srv ProtocolService_DebugListGroupsServer) error { + return status.Errorf(codes.Unimplemented, "method DebugListGroups not implemented") +} + +func (*UnimplementedProtocolServiceServer) DebugInspectGroupStore(req *DebugInspectGroupStore_Request, srv ProtocolService_DebugInspectGroupStoreServer) error { + return status.Errorf(codes.Unimplemented, "method DebugInspectGroupStore not implemented") +} + +func (*UnimplementedProtocolServiceServer) DebugGroup(ctx context.Context, req *DebugGroup_Request) (*DebugGroup_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method DebugGroup not implemented") +} + +func (*UnimplementedProtocolServiceServer) SystemInfo(ctx context.Context, req *SystemInfo_Request) (*SystemInfo_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SystemInfo not implemented") +} + +func (*UnimplementedProtocolServiceServer) AuthServiceInitFlow(ctx context.Context, req *AuthServiceInitFlow_Request) (*AuthServiceInitFlow_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthServiceInitFlow not implemented") +} + +func (*UnimplementedProtocolServiceServer) AuthServiceCompleteFlow(ctx context.Context, req *AuthServiceCompleteFlow_Request) (*AuthServiceCompleteFlow_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthServiceCompleteFlow not implemented") +} + +func (*UnimplementedProtocolServiceServer) ServicesTokenList(req *ServicesTokenList_Request, srv ProtocolService_ServicesTokenListServer) error { + return status.Errorf(codes.Unimplemented, "method ServicesTokenList not implemented") +} + +func (*UnimplementedProtocolServiceServer) ReplicationServiceRegisterGroup(ctx context.Context, req *ReplicationServiceRegisterGroup_Request) (*ReplicationServiceRegisterGroup_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplicationServiceRegisterGroup not implemented") +} + +func (*UnimplementedProtocolServiceServer) PeerList(ctx context.Context, req *PeerList_Request) (*PeerList_Reply, error) { + return nil, status.Errorf(codes.Unimplemented, "method PeerList not implemented") +} + +func (*UnimplementedProtocolServiceServer) AttachmentPrepare(srv ProtocolService_AttachmentPrepareServer) error { + return status.Errorf(codes.Unimplemented, "method AttachmentPrepare not implemented") +} + +func (*UnimplementedProtocolServiceServer) AttachmentRetrieve(req *AttachmentRetrieve_Request, srv ProtocolService_AttachmentRetrieveServer) error { + return status.Errorf(codes.Unimplemented, "method AttachmentRetrieve not implemented") +} + +func RegisterProtocolServiceServer(s *grpc.Server, srv ProtocolServiceServer) { + s.RegisterService(&_ProtocolService_serviceDesc, srv) +} + +func _ProtocolService_InstanceExportData_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(InstanceExportData_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).InstanceExportData(m, &protocolServiceInstanceExportDataServer{stream}) +} + +type ProtocolService_InstanceExportDataServer interface { + Send(*InstanceExportData_Reply) error + grpc.ServerStream +} + +type protocolServiceInstanceExportDataServer struct { + grpc.ServerStream +} + +func (x *protocolServiceInstanceExportDataServer) Send(m *InstanceExportData_Reply) error { + return x.ServerStream.SendMsg(m) +} + +func _ProtocolService_InstanceGetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InstanceGetConfiguration_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).InstanceGetConfiguration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/InstanceGetConfiguration", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).InstanceGetConfiguration(ctx, req.(*InstanceGetConfiguration_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactRequestReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactRequestReference_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactRequestReference(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestReference", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactRequestReference(ctx, req.(*ContactRequestReference_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactRequestDisable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactRequestDisable_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactRequestDisable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestDisable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactRequestDisable(ctx, req.(*ContactRequestDisable_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactRequestEnable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactRequestEnable_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactRequestEnable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestEnable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactRequestEnable(ctx, req.(*ContactRequestEnable_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactRequestResetReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactRequestResetReference_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactRequestResetReference(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestResetReference", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactRequestResetReference(ctx, req.(*ContactRequestResetReference_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactRequestSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactRequestSend_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactRequestSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestSend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactRequestSend(ctx, req.(*ContactRequestSend_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactRequestAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactRequestAccept_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactRequestAccept(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestAccept", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactRequestAccept(ctx, req.(*ContactRequestAccept_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactRequestDiscard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactRequestDiscard_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactRequestDiscard(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactRequestDiscard", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactRequestDiscard(ctx, req.(*ContactRequestDiscard_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactBlock_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactBlock(ctx, req.(*ContactBlock_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactUnblock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactUnblock_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactUnblock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactUnblock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactUnblock(ctx, req.(*ContactUnblock_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ContactAliasKeySend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContactAliasKeySend_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ContactAliasKeySend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ContactAliasKeySend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ContactAliasKeySend(ctx, req.(*ContactAliasKeySend_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_MultiMemberGroupCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MultiMemberGroupCreate_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).MultiMemberGroupCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).MultiMemberGroupCreate(ctx, req.(*MultiMemberGroupCreate_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_MultiMemberGroupJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MultiMemberGroupJoin_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).MultiMemberGroupJoin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupJoin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).MultiMemberGroupJoin(ctx, req.(*MultiMemberGroupJoin_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_MultiMemberGroupLeave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MultiMemberGroupLeave_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).MultiMemberGroupLeave(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupLeave", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).MultiMemberGroupLeave(ctx, req.(*MultiMemberGroupLeave_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_MultiMemberGroupAliasResolverDisclose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MultiMemberGroupAliasResolverDisclose_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).MultiMemberGroupAliasResolverDisclose(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupAliasResolverDisclose", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).MultiMemberGroupAliasResolverDisclose(ctx, req.(*MultiMemberGroupAliasResolverDisclose_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_MultiMemberGroupAdminRoleGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MultiMemberGroupAdminRoleGrant_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).MultiMemberGroupAdminRoleGrant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupAdminRoleGrant", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).MultiMemberGroupAdminRoleGrant(ctx, req.(*MultiMemberGroupAdminRoleGrant_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_MultiMemberGroupInvitationCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MultiMemberGroupInvitationCreate_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).MultiMemberGroupInvitationCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/MultiMemberGroupInvitationCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).MultiMemberGroupInvitationCreate(ctx, req.(*MultiMemberGroupInvitationCreate_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_AppMetadataSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppMetadataSend_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).AppMetadataSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/AppMetadataSend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).AppMetadataSend(ctx, req.(*AppMetadataSend_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_AppMessageSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppMessageSend_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).AppMessageSend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/AppMessageSend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).AppMessageSend(ctx, req.(*AppMessageSend_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_GroupMetadataList_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GroupMetadataList_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).GroupMetadataList(m, &protocolServiceGroupMetadataListServer{stream}) +} + +type ProtocolService_GroupMetadataListServer interface { + Send(*GroupMetadataEvent) error + grpc.ServerStream +} + +type protocolServiceGroupMetadataListServer struct { + grpc.ServerStream +} + +func (x *protocolServiceGroupMetadataListServer) Send(m *GroupMetadataEvent) error { + return x.ServerStream.SendMsg(m) +} + +func _ProtocolService_GroupMessageList_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GroupMessageList_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).GroupMessageList(m, &protocolServiceGroupMessageListServer{stream}) +} + +type ProtocolService_GroupMessageListServer interface { + Send(*GroupMessageEvent) error + grpc.ServerStream +} + +type protocolServiceGroupMessageListServer struct { + grpc.ServerStream +} + +func (x *protocolServiceGroupMessageListServer) Send(m *GroupMessageEvent) error { + return x.ServerStream.SendMsg(m) +} + +func _ProtocolService_GroupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupInfo_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).GroupInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/GroupInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).GroupInfo(ctx, req.(*GroupInfo_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ActivateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ActivateGroup_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ActivateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ActivateGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ActivateGroup(ctx, req.(*ActivateGroup_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_DeactivateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeactivateGroup_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).DeactivateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/DeactivateGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).DeactivateGroup(ctx, req.(*DeactivateGroup_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_MonitorGroup_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(MonitorGroup_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).MonitorGroup(m, &protocolServiceMonitorGroupServer{stream}) +} + +type ProtocolService_MonitorGroupServer interface { + Send(*MonitorGroup_Reply) error + grpc.ServerStream +} + +type protocolServiceMonitorGroupServer struct { + grpc.ServerStream +} + +func (x *protocolServiceMonitorGroupServer) Send(m *MonitorGroup_Reply) error { + return x.ServerStream.SendMsg(m) +} + +func _ProtocolService_DebugListGroups_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(DebugListGroups_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).DebugListGroups(m, &protocolServiceDebugListGroupsServer{stream}) +} + +type ProtocolService_DebugListGroupsServer interface { + Send(*DebugListGroups_Reply) error + grpc.ServerStream +} + +type protocolServiceDebugListGroupsServer struct { + grpc.ServerStream +} + +func (x *protocolServiceDebugListGroupsServer) Send(m *DebugListGroups_Reply) error { + return x.ServerStream.SendMsg(m) +} + +func _ProtocolService_DebugInspectGroupStore_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(DebugInspectGroupStore_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).DebugInspectGroupStore(m, &protocolServiceDebugInspectGroupStoreServer{stream}) +} + +type ProtocolService_DebugInspectGroupStoreServer interface { + Send(*DebugInspectGroupStore_Reply) error + grpc.ServerStream +} + +type protocolServiceDebugInspectGroupStoreServer struct { + grpc.ServerStream +} + +func (x *protocolServiceDebugInspectGroupStoreServer) Send(m *DebugInspectGroupStore_Reply) error { + return x.ServerStream.SendMsg(m) +} + +func _ProtocolService_DebugGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DebugGroup_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).DebugGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/DebugGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).DebugGroup(ctx, req.(*DebugGroup_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_SystemInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SystemInfo_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).SystemInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/SystemInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).SystemInfo(ctx, req.(*SystemInfo_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_AuthServiceInitFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AuthServiceInitFlow_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).AuthServiceInitFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/AuthServiceInitFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).AuthServiceInitFlow(ctx, req.(*AuthServiceInitFlow_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_AuthServiceCompleteFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AuthServiceCompleteFlow_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).AuthServiceCompleteFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/AuthServiceCompleteFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).AuthServiceCompleteFlow(ctx, req.(*AuthServiceCompleteFlow_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_ServicesTokenList_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ServicesTokenList_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).ServicesTokenList(m, &protocolServiceServicesTokenListServer{stream}) +} + +type ProtocolService_ServicesTokenListServer interface { + Send(*ServicesTokenList_Reply) error + grpc.ServerStream +} + +type protocolServiceServicesTokenListServer struct { + grpc.ServerStream +} + +func (x *protocolServiceServicesTokenListServer) Send(m *ServicesTokenList_Reply) error { + return x.ServerStream.SendMsg(m) +} + +func _ProtocolService_ReplicationServiceRegisterGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplicationServiceRegisterGroup_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).ReplicationServiceRegisterGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/ReplicationServiceRegisterGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).ReplicationServiceRegisterGroup(ctx, req.(*ReplicationServiceRegisterGroup_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_PeerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PeerList_Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProtocolServiceServer).PeerList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/berty.protocol.v1.ProtocolService/PeerList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProtocolServiceServer).PeerList(ctx, req.(*PeerList_Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProtocolService_AttachmentPrepare_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ProtocolServiceServer).AttachmentPrepare(&protocolServiceAttachmentPrepareServer{stream}) +} + +type ProtocolService_AttachmentPrepareServer interface { + SendAndClose(*AttachmentPrepare_Reply) error + Recv() (*AttachmentPrepare_Request, error) + grpc.ServerStream +} + +type protocolServiceAttachmentPrepareServer struct { + grpc.ServerStream +} + +func (x *protocolServiceAttachmentPrepareServer) SendAndClose(m *AttachmentPrepare_Reply) error { + return x.ServerStream.SendMsg(m) +} + +func (x *protocolServiceAttachmentPrepareServer) Recv() (*AttachmentPrepare_Request, error) { + m := new(AttachmentPrepare_Request) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _ProtocolService_AttachmentRetrieve_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(AttachmentRetrieve_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProtocolServiceServer).AttachmentRetrieve(m, &protocolServiceAttachmentRetrieveServer{stream}) +} + +type ProtocolService_AttachmentRetrieveServer interface { + Send(*AttachmentRetrieve_Reply) error + grpc.ServerStream +} + +type protocolServiceAttachmentRetrieveServer struct { + grpc.ServerStream +} + +func (x *protocolServiceAttachmentRetrieveServer) Send(m *AttachmentRetrieve_Reply) error { + return x.ServerStream.SendMsg(m) +} + +var _ProtocolService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "berty.protocol.v1.ProtocolService", + HandlerType: (*ProtocolServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InstanceGetConfiguration", + Handler: _ProtocolService_InstanceGetConfiguration_Handler, + }, + { + MethodName: "ContactRequestReference", + Handler: _ProtocolService_ContactRequestReference_Handler, + }, + { + MethodName: "ContactRequestDisable", + Handler: _ProtocolService_ContactRequestDisable_Handler, + }, + { + MethodName: "ContactRequestEnable", + Handler: _ProtocolService_ContactRequestEnable_Handler, + }, + { + MethodName: "ContactRequestResetReference", + Handler: _ProtocolService_ContactRequestResetReference_Handler, + }, + { + MethodName: "ContactRequestSend", + Handler: _ProtocolService_ContactRequestSend_Handler, + }, + { + MethodName: "ContactRequestAccept", + Handler: _ProtocolService_ContactRequestAccept_Handler, + }, + { + MethodName: "ContactRequestDiscard", + Handler: _ProtocolService_ContactRequestDiscard_Handler, + }, + { + MethodName: "ContactBlock", + Handler: _ProtocolService_ContactBlock_Handler, + }, + { + MethodName: "ContactUnblock", + Handler: _ProtocolService_ContactUnblock_Handler, + }, + { + MethodName: "ContactAliasKeySend", + Handler: _ProtocolService_ContactAliasKeySend_Handler, + }, + { + MethodName: "MultiMemberGroupCreate", + Handler: _ProtocolService_MultiMemberGroupCreate_Handler, + }, + { + MethodName: "MultiMemberGroupJoin", + Handler: _ProtocolService_MultiMemberGroupJoin_Handler, + }, + { + MethodName: "MultiMemberGroupLeave", + Handler: _ProtocolService_MultiMemberGroupLeave_Handler, + }, + { + MethodName: "MultiMemberGroupAliasResolverDisclose", + Handler: _ProtocolService_MultiMemberGroupAliasResolverDisclose_Handler, + }, + { + MethodName: "MultiMemberGroupAdminRoleGrant", + Handler: _ProtocolService_MultiMemberGroupAdminRoleGrant_Handler, + }, + { + MethodName: "MultiMemberGroupInvitationCreate", + Handler: _ProtocolService_MultiMemberGroupInvitationCreate_Handler, + }, + { + MethodName: "AppMetadataSend", + Handler: _ProtocolService_AppMetadataSend_Handler, + }, + { + MethodName: "AppMessageSend", + Handler: _ProtocolService_AppMessageSend_Handler, + }, + { + MethodName: "GroupInfo", + Handler: _ProtocolService_GroupInfo_Handler, + }, + { + MethodName: "ActivateGroup", + Handler: _ProtocolService_ActivateGroup_Handler, + }, + { + MethodName: "DeactivateGroup", + Handler: _ProtocolService_DeactivateGroup_Handler, + }, + { + MethodName: "DebugGroup", + Handler: _ProtocolService_DebugGroup_Handler, + }, + { + MethodName: "SystemInfo", + Handler: _ProtocolService_SystemInfo_Handler, + }, + { + MethodName: "AuthServiceInitFlow", + Handler: _ProtocolService_AuthServiceInitFlow_Handler, + }, + { + MethodName: "AuthServiceCompleteFlow", + Handler: _ProtocolService_AuthServiceCompleteFlow_Handler, + }, + { + MethodName: "ReplicationServiceRegisterGroup", + Handler: _ProtocolService_ReplicationServiceRegisterGroup_Handler, + }, + { + MethodName: "PeerList", + Handler: _ProtocolService_PeerList_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "InstanceExportData", + Handler: _ProtocolService_InstanceExportData_Handler, + ServerStreams: true, + }, + { + StreamName: "GroupMetadataList", + Handler: _ProtocolService_GroupMetadataList_Handler, + ServerStreams: true, + }, + { + StreamName: "GroupMessageList", + Handler: _ProtocolService_GroupMessageList_Handler, + ServerStreams: true, + }, + { + StreamName: "MonitorGroup", + Handler: _ProtocolService_MonitorGroup_Handler, + ServerStreams: true, + }, + { + StreamName: "DebugListGroups", + Handler: _ProtocolService_DebugListGroups_Handler, + ServerStreams: true, + }, + { + StreamName: "DebugInspectGroupStore", + Handler: _ProtocolService_DebugInspectGroupStore_Handler, + ServerStreams: true, + }, + { + StreamName: "ServicesTokenList", + Handler: _ProtocolService_ServicesTokenList_Handler, + ServerStreams: true, + }, + { + StreamName: "AttachmentPrepare", + Handler: _ProtocolService_AttachmentPrepare_Handler, + ClientStreams: true, + }, + { + StreamName: "AttachmentRetrieve", + Handler: _ProtocolService_AttachmentRetrieve_Handler, + ServerStreams: true, + }, + }, + Metadata: "protocoltypes.proto", } func (m *Account) Marshal() (dAtA []byte, err error) { @@ -10488,21 +12262,21 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.PublicRendezvousSeed) > 0 { i -= len(m.PublicRendezvousSeed) copy(dAtA[i:], m.PublicRendezvousSeed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) i-- dAtA[i] = 0x22 } if len(m.AliasPrivateKey) > 0 { i -= len(m.AliasPrivateKey) copy(dAtA[i:], m.AliasPrivateKey) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AliasPrivateKey))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AliasPrivateKey))) i-- dAtA[i] = 0x1a } if len(m.AccountPrivateKey) > 0 { i -= len(m.AccountPrivateKey) copy(dAtA[i:], m.AccountPrivateKey) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AccountPrivateKey))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AccountPrivateKey))) i-- dAtA[i] = 0x12 } @@ -10513,7 +12287,7 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -10548,33 +12322,33 @@ func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.SignPub) > 0 { i -= len(m.SignPub) copy(dAtA[i:], m.SignPub) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.SignPub))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.SignPub))) i-- dAtA[i] = 0x2a } if m.GroupType != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.GroupType)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.GroupType)) i-- dAtA[i] = 0x20 } if len(m.SecretSig) > 0 { i -= len(m.SecretSig) copy(dAtA[i:], m.SecretSig) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.SecretSig))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.SecretSig))) i-- dAtA[i] = 0x1a } if len(m.Secret) > 0 { i -= len(m.Secret) copy(dAtA[i:], m.Secret) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Secret))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Secret))) i-- dAtA[i] = 0x12 } if len(m.PublicKey) > 0 { i -= len(m.PublicKey) copy(dAtA[i:], m.PublicKey) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicKey))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicKey))) i-- dAtA[i] = 0xa } @@ -10609,7 +12383,7 @@ func (m *GroupHeadsExport) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.MessagesHeadsCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.MessagesHeadsCIDs[iNdEx]) copy(dAtA[i:], m.MessagesHeadsCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MessagesHeadsCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MessagesHeadsCIDs[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -10618,7 +12392,7 @@ func (m *GroupHeadsExport) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.MetadataHeadsCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.MetadataHeadsCIDs[iNdEx]) copy(dAtA[i:], m.MetadataHeadsCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MetadataHeadsCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MetadataHeadsCIDs[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -10626,14 +12400,14 @@ func (m *GroupHeadsExport) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.SignPub) > 0 { i -= len(m.SignPub) copy(dAtA[i:], m.SignPub) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.SignPub))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.SignPub))) i-- dAtA[i] = 0x12 } if len(m.PublicKey) > 0 { i -= len(m.PublicKey) copy(dAtA[i:], m.PublicKey) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicKey))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicKey))) i-- dAtA[i] = 0xa } @@ -10671,7 +12445,7 @@ func (m *GroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 @@ -10679,19 +12453,19 @@ func (m *GroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Sig) > 0 { i -= len(m.Sig) copy(dAtA[i:], m.Sig) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Sig))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Sig))) i-- dAtA[i] = 0x1a } if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Payload))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x12 } if m.EventType != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.EventType)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.EventType)) i-- dAtA[i] = 0x8 } @@ -10726,7 +12500,7 @@ func (m *GroupEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.EncryptedAttachmentCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.EncryptedAttachmentCIDs[iNdEx]) copy(dAtA[i:], m.EncryptedAttachmentCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.EncryptedAttachmentCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.EncryptedAttachmentCIDs[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -10734,14 +12508,14 @@ func (m *GroupEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Event) > 0 { i -= len(m.Event) copy(dAtA[i:], m.Event) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Event))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Event))) i-- dAtA[i] = 0x12 } if len(m.Nonce) > 0 { i -= len(m.Nonce) copy(dAtA[i:], m.Nonce) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Nonce))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Nonce))) i-- dAtA[i] = 0xa } @@ -10778,15 +12552,15 @@ func (m *MessageHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) { baseI := i i -= len(v) copy(dAtA[i:], v) - i = encodeVarintBertytypes(dAtA, i, uint64(len(v))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarintBertytypes(dAtA, i, uint64(len(k))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarintBertytypes(dAtA, i, uint64(baseI-i)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 } @@ -10794,19 +12568,19 @@ func (m *MessageHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Sig) > 0 { i -= len(m.Sig) copy(dAtA[i:], m.Sig) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Sig))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Sig))) i-- dAtA[i] = 0x1a } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0x12 } if m.Counter != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Counter)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Counter)) i-- dAtA[i] = 0x8 } @@ -10841,7 +12615,7 @@ func (m *ProtocolMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.AttachmentsSecrets) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.AttachmentsSecrets[iNdEx]) copy(dAtA[i:], m.AttachmentsSecrets[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AttachmentsSecrets[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AttachmentsSecrets[iNdEx]))) i-- dAtA[i] = 0xa } @@ -10880,7 +12654,7 @@ func (m *EncryptedMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -10888,7 +12662,7 @@ func (m *EncryptedMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Plaintext) > 0 { i -= len(m.Plaintext) copy(dAtA[i:], m.Plaintext) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Plaintext))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Plaintext))) i-- dAtA[i] = 0xa } @@ -10923,7 +12697,7 @@ func (m *MessageEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.EncryptedAttachmentCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.EncryptedAttachmentCIDs[iNdEx]) copy(dAtA[i:], m.EncryptedAttachmentCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.EncryptedAttachmentCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.EncryptedAttachmentCIDs[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -10931,21 +12705,21 @@ func (m *MessageEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Nonce) > 0 { i -= len(m.Nonce) copy(dAtA[i:], m.Nonce) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Nonce))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Nonce))) i-- dAtA[i] = 0x1a } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Message))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x12 } if len(m.MessageHeaders) > 0 { i -= len(m.MessageHeaders) copy(dAtA[i:], m.MessageHeaders) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MessageHeaders))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MessageHeaders))) i-- dAtA[i] = 0xa } @@ -10980,7 +12754,7 @@ func (m *EventContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.AttachmentCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.AttachmentCIDs[iNdEx]) copy(dAtA[i:], m.AttachmentCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AttachmentCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AttachmentCIDs[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -10988,7 +12762,7 @@ func (m *EventContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0x1a } @@ -10996,7 +12770,7 @@ func (m *EventContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.ParentIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ParentIDs[iNdEx]) copy(dAtA[i:], m.ParentIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ParentIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ParentIDs[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -11004,7 +12778,7 @@ func (m *EventContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ID) > 0 { i -= len(m.ID) copy(dAtA[i:], m.ID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ID))) i-- dAtA[i] = 0xa } @@ -11038,14 +12812,14 @@ func (m *AppMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Message))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11079,14 +12853,14 @@ func (m *ContactAddAliasKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.AliasPK) > 0 { i -= len(m.AliasPK) copy(dAtA[i:], m.AliasPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AliasPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AliasPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11120,21 +12894,21 @@ func (m *GroupAddMemberDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.MemberSig) > 0 { i -= len(m.MemberSig) copy(dAtA[i:], m.MemberSig) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MemberSig))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MemberSig))) i-- dAtA[i] = 0x1a } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0x12 } if len(m.MemberPK) > 0 { i -= len(m.MemberPK) copy(dAtA[i:], m.MemberPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MemberPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MemberPK))) i-- dAtA[i] = 0xa } @@ -11166,14 +12940,14 @@ func (m *DeviceSecret) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.Counter != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Counter)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Counter)) i-- dAtA[i] = 0x10 } if len(m.ChainKey) > 0 { i -= len(m.ChainKey) copy(dAtA[i:], m.ChainKey) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ChainKey))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ChainKey))) i-- dAtA[i] = 0xa } @@ -11207,21 +12981,21 @@ func (m *GroupAddDeviceSecret) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Payload))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x1a } if len(m.DestMemberPK) > 0 { i -= len(m.DestMemberPK) copy(dAtA[i:], m.DestMemberPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DestMemberPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DestMemberPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11255,21 +13029,21 @@ func (m *MultiMemberGroupAddAliasResolver) MarshalToSizedBuffer(dAtA []byte) (in if len(m.AliasProof) > 0 { i -= len(m.AliasProof) copy(dAtA[i:], m.AliasProof) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AliasProof))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AliasProof))) i-- dAtA[i] = 0x1a } if len(m.AliasResolver) > 0 { i -= len(m.AliasResolver) copy(dAtA[i:], m.AliasResolver) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AliasResolver))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AliasResolver))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11303,14 +13077,14 @@ func (m *MultiMemberGrantAdminRole) MarshalToSizedBuffer(dAtA []byte) (int, erro if len(m.GranteeMemberPK) > 0 { i -= len(m.GranteeMemberPK) copy(dAtA[i:], m.GranteeMemberPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GranteeMemberPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GranteeMemberPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11344,7 +13118,7 @@ func (m *MultiMemberInitialMember) MarshalToSizedBuffer(dAtA []byte) (int, error if len(m.MemberPK) > 0 { i -= len(m.MemberPK) copy(dAtA[i:], m.MemberPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MemberPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MemberPK))) i-- dAtA[i] = 0xa } @@ -11378,14 +13152,14 @@ func (m *GroupAddAdditionalRendezvousSeed) MarshalToSizedBuffer(dAtA []byte) (in if len(m.Seed) > 0 { i -= len(m.Seed) copy(dAtA[i:], m.Seed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Seed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Seed))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11419,14 +13193,14 @@ func (m *GroupRemoveAdditionalRendezvousSeed) MarshalToSizedBuffer(dAtA []byte) if len(m.Seed) > 0 { i -= len(m.Seed) copy(dAtA[i:], m.Seed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Seed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Seed))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11464,7 +13238,7 @@ func (m *AccountGroupJoined) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -11472,7 +13246,7 @@ func (m *AccountGroupJoined) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11506,14 +13280,14 @@ func (m *AccountGroupLeft) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11547,7 +13321,7 @@ func (m *AccountContactRequestDisabled) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11581,7 +13355,7 @@ func (m *AccountContactRequestEnabled) MarshalToSizedBuffer(dAtA []byte) (int, e if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11615,14 +13389,14 @@ func (m *AccountContactRequestReferenceReset) MarshalToSizedBuffer(dAtA []byte) if len(m.PublicRendezvousSeed) > 0 { i -= len(m.PublicRendezvousSeed) copy(dAtA[i:], m.PublicRendezvousSeed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11656,7 +13430,7 @@ func (m *AccountContactRequestEnqueued) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.OwnMetadata) > 0 { i -= len(m.OwnMetadata) copy(dAtA[i:], m.OwnMetadata) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.OwnMetadata))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.OwnMetadata))) i-- dAtA[i] = 0x22 } @@ -11667,7 +13441,7 @@ func (m *AccountContactRequestEnqueued) MarshalToSizedBuffer(dAtA []byte) (int, return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -11675,14 +13449,14 @@ func (m *AccountContactRequestEnqueued) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11716,14 +13490,14 @@ func (m *AccountContactRequestSent) MarshalToSizedBuffer(dAtA []byte) (int, erro if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11757,28 +13531,28 @@ func (m *AccountContactRequestReceived) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.ContactMetadata) > 0 { i -= len(m.ContactMetadata) copy(dAtA[i:], m.ContactMetadata) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactMetadata))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactMetadata))) i-- dAtA[i] = 0x22 } if len(m.ContactRendezvousSeed) > 0 { i -= len(m.ContactRendezvousSeed) copy(dAtA[i:], m.ContactRendezvousSeed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactRendezvousSeed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactRendezvousSeed))) i-- dAtA[i] = 0x1a } if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11812,14 +13586,14 @@ func (m *AccountContactRequestDiscarded) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11853,21 +13627,21 @@ func (m *AccountContactRequestAccepted) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0x1a } if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11901,14 +13675,14 @@ func (m *AccountContactBlocked) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11942,14 +13716,14 @@ func (m *AccountContactUnblocked) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -11987,7 +13761,7 @@ func (m *AccountServiceTokenAdded) MarshalToSizedBuffer(dAtA []byte) (int, error return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -11995,7 +13769,7 @@ func (m *AccountServiceTokenAdded) MarshalToSizedBuffer(dAtA []byte) (int, error if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -12029,14 +13803,14 @@ func (m *AccountServiceTokenRemoved) MarshalToSizedBuffer(dAtA []byte) (int, err if len(m.TokenID) > 0 { i -= len(m.TokenID) copy(dAtA[i:], m.TokenID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.TokenID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.TokenID))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -12070,21 +13844,21 @@ func (m *GroupReplicating) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ReplicationServer) > 0 { i -= len(m.ReplicationServer) copy(dAtA[i:], m.ReplicationServer) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ReplicationServer))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ReplicationServer))) i-- dAtA[i] = 0x1a } if len(m.AuthenticationURL) > 0 { i -= len(m.AuthenticationURL) copy(dAtA[i:], m.AuthenticationURL) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AuthenticationURL))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AuthenticationURL))) i-- dAtA[i] = 0x12 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0xa } @@ -12172,7 +13946,7 @@ func (m *InstanceExportData_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error if len(m.ExportedData) > 0 { i -= len(m.ExportedData) copy(dAtA[i:], m.ExportedData) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ExportedData))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ExportedData))) i-- dAtA[i] = 0xa } @@ -12258,22 +14032,22 @@ func (m *InstanceGetConfiguration_Reply) MarshalToSizedBuffer(dAtA []byte) (int, copy(dAtA[i:], m.XXX_unrecognized) } if m.RelayEnabled != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.RelayEnabled)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.RelayEnabled)) i-- dAtA[i] = 0x48 } if m.MdnsEnabled != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.MdnsEnabled)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.MdnsEnabled)) i-- dAtA[i] = 0x40 } if m.WifiP2PEnabled != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.WifiP2PEnabled)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.WifiP2PEnabled)) i-- dAtA[i] = 0x38 } if m.BleEnabled != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.BleEnabled)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.BleEnabled)) i-- dAtA[i] = 0x30 } @@ -12281,7 +14055,7 @@ func (m *InstanceGetConfiguration_Reply) MarshalToSizedBuffer(dAtA []byte) (int, for iNdEx := len(m.Listeners) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Listeners[iNdEx]) copy(dAtA[i:], m.Listeners[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Listeners[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Listeners[iNdEx]))) i-- dAtA[i] = 0x2a } @@ -12289,28 +14063,28 @@ func (m *InstanceGetConfiguration_Reply) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.PeerID) > 0 { i -= len(m.PeerID) copy(dAtA[i:], m.PeerID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PeerID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PeerID))) i-- dAtA[i] = 0x22 } if len(m.AccountGroupPK) > 0 { i -= len(m.AccountGroupPK) copy(dAtA[i:], m.AccountGroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AccountGroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AccountGroupPK))) i-- dAtA[i] = 0x1a } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0x12 } if len(m.AccountPK) > 0 { i -= len(m.AccountPK) copy(dAtA[i:], m.AccountPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AccountPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AccountPK))) i-- dAtA[i] = 0xa } @@ -12408,7 +14182,7 @@ func (m *ContactRequestReference_Reply) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.PublicRendezvousSeed) > 0 { i -= len(m.PublicRendezvousSeed) copy(dAtA[i:], m.PublicRendezvousSeed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) i-- dAtA[i] = 0xa } @@ -12577,7 +14351,7 @@ func (m *ContactRequestEnable_Reply) MarshalToSizedBuffer(dAtA []byte) (int, err if len(m.PublicRendezvousSeed) > 0 { i -= len(m.PublicRendezvousSeed) copy(dAtA[i:], m.PublicRendezvousSeed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) i-- dAtA[i] = 0xa } @@ -12665,7 +14439,7 @@ func (m *ContactRequestResetReference_Reply) MarshalToSizedBuffer(dAtA []byte) ( if len(m.PublicRendezvousSeed) > 0 { i -= len(m.PublicRendezvousSeed) copy(dAtA[i:], m.PublicRendezvousSeed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) i-- dAtA[i] = 0xa } @@ -12726,7 +14500,7 @@ func (m *ContactRequestSend_Request) MarshalToSizedBuffer(dAtA []byte) (int, err if len(m.OwnMetadata) > 0 { i -= len(m.OwnMetadata) copy(dAtA[i:], m.OwnMetadata) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.OwnMetadata))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.OwnMetadata))) i-- dAtA[i] = 0x12 } @@ -12737,7 +14511,7 @@ func (m *ContactRequestSend_Request) MarshalToSizedBuffer(dAtA []byte) (int, err return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -12826,7 +14600,7 @@ func (m *ContactRequestAccept_Request) MarshalToSizedBuffer(dAtA []byte) (int, e if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0xa } @@ -12914,7 +14688,7 @@ func (m *ContactRequestDiscard_Request) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0xa } @@ -13002,7 +14776,7 @@ func (m *ContactBlock_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0xa } @@ -13090,7 +14864,7 @@ func (m *ContactUnblock_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0xa } @@ -13178,7 +14952,7 @@ func (m *ContactAliasKeySend_Request) MarshalToSizedBuffer(dAtA []byte) (int, er if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13293,7 +15067,7 @@ func (m *MultiMemberGroupCreate_Reply) MarshalToSizedBuffer(dAtA []byte) (int, e if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13358,7 +15132,7 @@ func (m *MultiMemberGroupJoin_Request) MarshalToSizedBuffer(dAtA []byte) (int, e return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -13447,7 +15221,7 @@ func (m *MultiMemberGroupLeave_Request) MarshalToSizedBuffer(dAtA []byte) (int, if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13535,7 +15309,7 @@ func (m *MultiMemberGroupAliasResolverDisclose_Request) MarshalToSizedBuffer(dAt if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13623,14 +15397,14 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) MarshalToSizedBuffer(dAtA []byt if len(m.MemberPK) > 0 { i -= len(m.MemberPK) copy(dAtA[i:], m.MemberPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MemberPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MemberPK))) i-- dAtA[i] = 0x12 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13718,7 +15492,7 @@ func (m *MultiMemberGroupInvitationCreate_Request) MarshalToSizedBuffer(dAtA []b if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13756,7 +15530,7 @@ func (m *MultiMemberGroupInvitationCreate_Reply) MarshalToSizedBuffer(dAtA []byt return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -13819,7 +15593,7 @@ func (m *AppMetadataSend_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) for iNdEx := len(m.AttachmentCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.AttachmentCIDs[iNdEx]) copy(dAtA[i:], m.AttachmentCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AttachmentCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AttachmentCIDs[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -13827,14 +15601,14 @@ func (m *AppMetadataSend_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Payload))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x12 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13923,7 +15697,7 @@ func (m *AppMessageSend_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) for iNdEx := len(m.AttachmentCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.AttachmentCIDs[iNdEx]) copy(dAtA[i:], m.AttachmentCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AttachmentCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AttachmentCIDs[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -13931,14 +15705,14 @@ func (m *AppMessageSend_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Payload))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x12 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -13999,7 +15773,7 @@ func (m *GroupMetadataEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Event) > 0 { i -= len(m.Event) copy(dAtA[i:], m.Event) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Event))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Event))) i-- dAtA[i] = 0x1a } @@ -14010,7 +15784,7 @@ func (m *GroupMetadataEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -14022,7 +15796,7 @@ func (m *GroupMetadataEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -14057,7 +15831,7 @@ func (m *GroupMessageEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Message))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x1a } @@ -14068,7 +15842,7 @@ func (m *GroupMessageEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -14080,7 +15854,7 @@ func (m *GroupMessageEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -14162,7 +15936,7 @@ func (m *GroupMetadataList_Request) MarshalToSizedBuffer(dAtA []byte) (int, erro if len(m.UntilID) > 0 { i -= len(m.UntilID) copy(dAtA[i:], m.UntilID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.UntilID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.UntilID))) i-- dAtA[i] = 0x22 } @@ -14179,14 +15953,14 @@ func (m *GroupMetadataList_Request) MarshalToSizedBuffer(dAtA []byte) (int, erro if len(m.SinceID) > 0 { i -= len(m.SinceID) copy(dAtA[i:], m.SinceID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.SinceID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.SinceID))) i-- dAtA[i] = 0x12 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -14267,7 +16041,7 @@ func (m *GroupMessageList_Request) MarshalToSizedBuffer(dAtA []byte) (int, error if len(m.UntilID) > 0 { i -= len(m.UntilID) copy(dAtA[i:], m.UntilID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.UntilID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.UntilID))) i-- dAtA[i] = 0x22 } @@ -14284,14 +16058,14 @@ func (m *GroupMessageList_Request) MarshalToSizedBuffer(dAtA []byte) (int, error if len(m.SinceID) > 0 { i -= len(m.SinceID) copy(dAtA[i:], m.SinceID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.SinceID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.SinceID))) i-- dAtA[i] = 0x12 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -14352,14 +16126,14 @@ func (m *GroupInfo_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x12 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -14393,14 +16167,14 @@ func (m *GroupInfo_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0x1a } if len(m.MemberPK) > 0 { i -= len(m.MemberPK) copy(dAtA[i:], m.MemberPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.MemberPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.MemberPK))) i-- dAtA[i] = 0x12 } @@ -14411,7 +16185,7 @@ func (m *GroupInfo_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -14483,7 +16257,7 @@ func (m *ActivateGroup_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -14571,7 +16345,7 @@ func (m *DeactivateGroup_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -14659,14 +16433,14 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) MarshalToSizedBuffer(dAtA []by if len(m.Topic) > 0 { i -= len(m.Topic) copy(dAtA[i:], m.Topic) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Topic))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Topic))) i-- dAtA[i] = 0x22 } if len(m.DriverName) > 0 { i -= len(m.DriverName) copy(dAtA[i:], m.DriverName) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DriverName))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DriverName))) i-- dAtA[i] = 0x1a } @@ -14674,7 +16448,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) MarshalToSizedBuffer(dAtA []by for iNdEx := len(m.Maddrs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Maddrs[iNdEx]) copy(dAtA[i:], m.Maddrs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Maddrs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Maddrs[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -14682,7 +16456,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) MarshalToSizedBuffer(dAtA []by if len(m.PeerID) > 0 { i -= len(m.PeerID) copy(dAtA[i:], m.PeerID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PeerID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PeerID))) i-- dAtA[i] = 0xa } @@ -14716,14 +16490,14 @@ func (m *MonitorGroup_EventMonitorPeerFound) MarshalToSizedBuffer(dAtA []byte) ( if len(m.Topic) > 0 { i -= len(m.Topic) copy(dAtA[i:], m.Topic) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Topic))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Topic))) i-- dAtA[i] = 0x22 } if len(m.DriverName) > 0 { i -= len(m.DriverName) copy(dAtA[i:], m.DriverName) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DriverName))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DriverName))) i-- dAtA[i] = 0x1a } @@ -14731,7 +16505,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) MarshalToSizedBuffer(dAtA []byte) ( for iNdEx := len(m.Maddrs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Maddrs[iNdEx]) copy(dAtA[i:], m.Maddrs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Maddrs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Maddrs[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -14739,7 +16513,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) MarshalToSizedBuffer(dAtA []byte) ( if len(m.PeerID) > 0 { i -= len(m.PeerID) copy(dAtA[i:], m.PeerID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PeerID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PeerID))) i-- dAtA[i] = 0xa } @@ -14783,7 +16557,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) MarshalToSizedBuffer(dAtA []byte) (i if len(m.Topic) > 0 { i -= len(m.Topic) copy(dAtA[i:], m.Topic) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Topic))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Topic))) i-- dAtA[i] = 0x1a } @@ -14791,7 +16565,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) MarshalToSizedBuffer(dAtA []byte) (i for iNdEx := len(m.Maddrs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Maddrs[iNdEx]) copy(dAtA[i:], m.Maddrs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Maddrs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Maddrs[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -14799,7 +16573,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) MarshalToSizedBuffer(dAtA []byte) (i if len(m.PeerID) > 0 { i -= len(m.PeerID) copy(dAtA[i:], m.PeerID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PeerID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PeerID))) i-- dAtA[i] = 0xa } @@ -14843,14 +16617,14 @@ func (m *MonitorGroup_EventMonitorPeerLeave) MarshalToSizedBuffer(dAtA []byte) ( if len(m.Topic) > 0 { i -= len(m.Topic) copy(dAtA[i:], m.Topic) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Topic))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Topic))) i-- dAtA[i] = 0x1a } if len(m.PeerID) > 0 { i -= len(m.PeerID) copy(dAtA[i:], m.PeerID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PeerID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PeerID))) i-- dAtA[i] = 0xa } @@ -14888,7 +16662,7 @@ func (m *MonitorGroup_EventMonitor) MarshalToSizedBuffer(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a @@ -14900,7 +16674,7 @@ func (m *MonitorGroup_EventMonitor) MarshalToSizedBuffer(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 @@ -14912,7 +16686,7 @@ func (m *MonitorGroup_EventMonitor) MarshalToSizedBuffer(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -14924,13 +16698,13 @@ func (m *MonitorGroup_EventMonitor) MarshalToSizedBuffer(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.Type != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Type)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x8 } @@ -14964,7 +16738,7 @@ func (m *MonitorGroup_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -14998,7 +16772,7 @@ func (m *MonitorGroup_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0x12 } @@ -15009,7 +16783,7 @@ func (m *MonitorGroup_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -15098,19 +16872,19 @@ func (m *DebugListGroups_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ContactPK) > 0 { i -= len(m.ContactPK) copy(dAtA[i:], m.ContactPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ContactPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ContactPK))) i-- dAtA[i] = 0x1a } if m.GroupType != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.GroupType)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.GroupType)) i-- dAtA[i] = 0x10 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -15169,14 +16943,14 @@ func (m *DebugInspectGroupStore_Request) MarshalToSizedBuffer(dAtA []byte) (int, copy(dAtA[i:], m.XXX_unrecognized) } if m.LogType != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.LogType)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.LogType)) i-- dAtA[i] = 0x10 } if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -15210,19 +16984,19 @@ func (m *DebugInspectGroupStore_Reply) MarshalToSizedBuffer(dAtA []byte) (int, e if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Payload))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Payload))) i-- dAtA[i] = 0x32 } if len(m.DevicePK) > 0 { i -= len(m.DevicePK) copy(dAtA[i:], m.DevicePK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.DevicePK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.DevicePK))) i-- dAtA[i] = 0x22 } if m.MetadataEventType != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.MetadataEventType)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.MetadataEventType)) i-- dAtA[i] = 0x18 } @@ -15230,7 +17004,7 @@ func (m *DebugInspectGroupStore_Reply) MarshalToSizedBuffer(dAtA []byte) (int, e for iNdEx := len(m.ParentCIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ParentCIDs[iNdEx]) copy(dAtA[i:], m.ParentCIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ParentCIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ParentCIDs[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -15238,7 +17012,7 @@ func (m *DebugInspectGroupStore_Reply) MarshalToSizedBuffer(dAtA []byte) (int, e if len(m.CID) > 0 { i -= len(m.CID) copy(dAtA[i:], m.CID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.CID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.CID))) i-- dAtA[i] = 0xa } @@ -15299,7 +17073,7 @@ func (m *DebugGroup_Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0xa } @@ -15334,7 +17108,7 @@ func (m *DebugGroup_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.PeerIDs) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.PeerIDs[iNdEx]) copy(dAtA[i:], m.PeerIDs[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PeerIDs[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PeerIDs[iNdEx]))) i-- dAtA[i] = 0xa } @@ -15369,21 +17143,21 @@ func (m *ShareableContact) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Metadata) > 0 { i -= len(m.Metadata) copy(dAtA[i:], m.Metadata) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Metadata))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Metadata))) i-- dAtA[i] = 0x1a } if len(m.PublicRendezvousSeed) > 0 { i -= len(m.PublicRendezvousSeed) copy(dAtA[i:], m.PublicRendezvousSeed) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PublicRendezvousSeed))) i-- dAtA[i] = 0x12 } if len(m.PK) > 0 { i -= len(m.PK) copy(dAtA[i:], m.PK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.PK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.PK))) i-- dAtA[i] = 0xa } @@ -15417,14 +17191,14 @@ func (m *ServiceTokenSupportedService) MarshalToSizedBuffer(dAtA []byte) (int, e if len(m.ServiceEndpoint) > 0 { i -= len(m.ServiceEndpoint) copy(dAtA[i:], m.ServiceEndpoint) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ServiceEndpoint))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ServiceEndpoint))) i-- dAtA[i] = 0x12 } if len(m.ServiceType) > 0 { i -= len(m.ServiceType) copy(dAtA[i:], m.ServiceType) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ServiceType))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ServiceType))) i-- dAtA[i] = 0xa } @@ -15456,7 +17230,7 @@ func (m *ServiceToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.Expiration != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Expiration)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Expiration)) i-- dAtA[i] = 0x20 } @@ -15468,7 +17242,7 @@ func (m *ServiceToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -15477,14 +17251,14 @@ func (m *ServiceToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.AuthenticationURL) > 0 { i -= len(m.AuthenticationURL) copy(dAtA[i:], m.AuthenticationURL) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AuthenticationURL))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AuthenticationURL))) i-- dAtA[i] = 0x12 } if len(m.Token) > 0 { i -= len(m.Token) copy(dAtA[i:], m.Token) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Token))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Token))) i-- dAtA[i] = 0xa } @@ -15545,7 +17319,7 @@ func (m *AuthServiceCompleteFlow_Request) MarshalToSizedBuffer(dAtA []byte) (int if len(m.CallbackURL) > 0 { i -= len(m.CallbackURL) copy(dAtA[i:], m.CallbackURL) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.CallbackURL))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.CallbackURL))) i-- dAtA[i] = 0xa } @@ -15633,7 +17407,7 @@ func (m *AuthServiceInitFlow_Request) MarshalToSizedBuffer(dAtA []byte) (int, er if len(m.AuthURL) > 0 { i -= len(m.AuthURL) copy(dAtA[i:], m.AuthURL) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AuthURL))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AuthURL))) i-- dAtA[i] = 0xa } @@ -15677,7 +17451,7 @@ func (m *AuthServiceInitFlow_Reply) MarshalToSizedBuffer(dAtA []byte) (int, erro if len(m.URL) > 0 { i -= len(m.URL) copy(dAtA[i:], m.URL) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.URL))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.URL))) i-- dAtA[i] = 0xa } @@ -15769,7 +17543,7 @@ func (m *ServicesTokenList_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -15777,7 +17551,7 @@ func (m *ServicesTokenList_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.TokenID) > 0 { i -= len(m.TokenID) copy(dAtA[i:], m.TokenID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.TokenID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.TokenID))) i-- dAtA[i] = 0xa } @@ -15811,14 +17585,14 @@ func (m *ServicesTokenCode) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.TokenID) > 0 { i -= len(m.TokenID) copy(dAtA[i:], m.TokenID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.TokenID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.TokenID))) i-- dAtA[i] = 0x1a } if len(m.CodeChallenge) > 0 { i -= len(m.CodeChallenge) copy(dAtA[i:], m.CodeChallenge) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.CodeChallenge))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.CodeChallenge))) i-- dAtA[i] = 0x12 } @@ -15826,7 +17600,7 @@ func (m *ServicesTokenCode) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Services[iNdEx]) copy(dAtA[i:], m.Services[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Services[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Services[iNdEx]))) i-- dAtA[i] = 0xa } @@ -15888,14 +17662,14 @@ func (m *ReplicationServiceRegisterGroup_Request) MarshalToSizedBuffer(dAtA []by if len(m.GroupPK) > 0 { i -= len(m.GroupPK) copy(dAtA[i:], m.GroupPK) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GroupPK))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GroupPK))) i-- dAtA[i] = 0x12 } if len(m.TokenID) > 0 { i -= len(m.TokenID) copy(dAtA[i:], m.TokenID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.TokenID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.TokenID))) i-- dAtA[i] = 0xa } @@ -15987,7 +17761,7 @@ func (m *ReplicationServiceReplicateGroup_Request) MarshalToSizedBuffer(dAtA []b return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -16114,7 +17888,7 @@ func (m *SystemInfo_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.Warns) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Warns[iNdEx]) copy(dAtA[i:], m.Warns[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Warns[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Warns[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -16126,7 +17900,7 @@ func (m *SystemInfo_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -16138,7 +17912,7 @@ func (m *SystemInfo_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -16150,7 +17924,7 @@ func (m *SystemInfo_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -16189,7 +17963,7 @@ func (m *SystemInfo_OrbitDB) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -16222,22 +17996,22 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) MarshalToSizedBuffer(dAtA []byte) copy(dAtA[i:], m.XXX_unrecognized) } if m.Queued != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Queued)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Queued)) i-- dAtA[i] = 0x20 } if m.Buffered != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Buffered)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Buffered)) i-- dAtA[i] = 0x18 } if m.Maximum != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Maximum)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Maximum)) i-- dAtA[i] = 0x10 } if m.Progress != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Progress)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Progress)) i-- dAtA[i] = 0x8 } @@ -16269,7 +18043,7 @@ func (m *SystemInfo_P2P) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.ConnectedPeers != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.ConnectedPeers)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.ConnectedPeers)) i-- dAtA[i] = 0x8 } @@ -16303,7 +18077,7 @@ func (m *SystemInfo_Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.SystemUsername) > 0 { i -= len(m.SystemUsername) copy(dAtA[i:], m.SystemUsername) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.SystemUsername))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.SystemUsername))) i-- dAtA[i] = 0x1 i-- @@ -16312,42 +18086,42 @@ func (m *SystemInfo_Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.WorkingDir) > 0 { i -= len(m.WorkingDir) copy(dAtA[i:], m.WorkingDir) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.WorkingDir))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.WorkingDir))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xda } if m.UID != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.UID)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.UID)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xd0 } if m.Priority != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Priority)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Priority)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc8 } if m.PPID != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.PPID)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.PPID)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc0 } if m.PID != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.PID)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.PID)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb8 } if m.RlimitMax != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.RlimitMax)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.RlimitMax)) i-- dAtA[i] = 0x1 i-- @@ -16356,7 +18130,7 @@ func (m *SystemInfo_Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Arch) > 0 { i -= len(m.Arch) copy(dAtA[i:], m.Arch) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Arch))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Arch))) i-- dAtA[i] = 0x1 i-- @@ -16365,7 +18139,7 @@ func (m *SystemInfo_Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.HostName) > 0 { i -= len(m.HostName) copy(dAtA[i:], m.HostName) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.HostName))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.HostName))) i-- dAtA[i] = 0x1 i-- @@ -16374,7 +18148,7 @@ func (m *SystemInfo_Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.OperatingSystem) > 0 { i -= len(m.OperatingSystem) copy(dAtA[i:], m.OperatingSystem) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.OperatingSystem))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.OperatingSystem))) i-- dAtA[i] = 0x1 i-- @@ -16383,14 +18157,14 @@ func (m *SystemInfo_Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.GoVersion) > 0 { i -= len(m.GoVersion) copy(dAtA[i:], m.GoVersion) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.GoVersion))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.GoVersion))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x92 } if m.NumCPU != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.NumCPU)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.NumCPU)) i-- dAtA[i] = 0x1 i-- @@ -16409,51 +18183,51 @@ func (m *SystemInfo_Process) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x80 } if m.Nofile != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Nofile)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Nofile)) i-- dAtA[i] = 0x78 } if m.NumGoroutine != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.NumGoroutine)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.NumGoroutine)) i-- dAtA[i] = 0x70 } if m.RlimitCur != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.RlimitCur)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.RlimitCur)) i-- dAtA[i] = 0x68 } if m.StartedAt != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.StartedAt)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.StartedAt)) i-- dAtA[i] = 0x60 } if m.SystemCPUTimeMS != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.SystemCPUTimeMS)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.SystemCPUTimeMS)) i-- dAtA[i] = 0x58 } if m.UserCPUTimeMS != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.UserCPUTimeMS)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.UserCPUTimeMS)) i-- dAtA[i] = 0x50 } if m.UptimeMS != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.UptimeMS)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.UptimeMS)) i-- dAtA[i] = 0x18 } if len(m.VcsRef) > 0 { i -= len(m.VcsRef) copy(dAtA[i:], m.VcsRef) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.VcsRef))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.VcsRef))) i-- dAtA[i] = 0x12 } if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Version))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0xa } @@ -16546,7 +18320,7 @@ func (m *PeerList_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -16580,7 +18354,7 @@ func (m *PeerList_Peer) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.XXX_unrecognized) } if m.Direction != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Direction)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Direction)) i-- dAtA[i] = 0x38 } @@ -16595,7 +18369,7 @@ func (m *PeerList_Peer) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x30 } if m.MinLatency != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.MinLatency)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.MinLatency)) i-- dAtA[i] = 0x28 } @@ -16613,7 +18387,7 @@ func (m *PeerList_Peer) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i -= j26 copy(dAtA[i:], dAtA27[:j26]) - i = encodeVarintBertytypes(dAtA, i, uint64(j26)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(j26)) i-- dAtA[i] = 0x22 } @@ -16621,7 +18395,7 @@ func (m *PeerList_Peer) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Errors[iNdEx]) copy(dAtA[i:], m.Errors[iNdEx]) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Errors[iNdEx]))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Errors[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -16634,7 +18408,7 @@ func (m *PeerList_Peer) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -16643,7 +18417,7 @@ func (m *PeerList_Peer) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ID) > 0 { i -= len(m.ID) copy(dAtA[i:], m.ID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ID))) i-- dAtA[i] = 0xa } @@ -16682,26 +18456,26 @@ func (m *PeerList_Route) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintBertytypes(dAtA, i, uint64(size)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } } if m.Latency != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Latency)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Latency)) i-- dAtA[i] = 0x20 } if m.Direction != 0 { - i = encodeVarintBertytypes(dAtA, i, uint64(m.Direction)) + i = encodeVarintProtocoltypes(dAtA, i, uint64(m.Direction)) i-- dAtA[i] = 0x18 } if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Address))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0x12 } @@ -16745,7 +18519,7 @@ func (m *PeerList_Stream) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ID) > 0 { i -= len(m.ID) copy(dAtA[i:], m.ID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.ID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.ID))) i-- dAtA[i] = 0xa } @@ -16816,7 +18590,7 @@ func (m *AttachmentPrepare_Request) MarshalToSizedBuffer(dAtA []byte) (int, erro if len(m.Block) > 0 { i -= len(m.Block) copy(dAtA[i:], m.Block) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Block))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Block))) i-- dAtA[i] = 0xa } @@ -16850,7 +18624,7 @@ func (m *AttachmentPrepare_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error) if len(m.AttachmentCID) > 0 { i -= len(m.AttachmentCID) copy(dAtA[i:], m.AttachmentCID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AttachmentCID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AttachmentCID))) i-- dAtA[i] = 0xa } @@ -16911,7 +18685,7 @@ func (m *AttachmentRetrieve_Request) MarshalToSizedBuffer(dAtA []byte) (int, err if len(m.AttachmentCID) > 0 { i -= len(m.AttachmentCID) copy(dAtA[i:], m.AttachmentCID) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.AttachmentCID))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.AttachmentCID))) i-- dAtA[i] = 0xa } @@ -16945,15 +18719,15 @@ func (m *AttachmentRetrieve_Reply) MarshalToSizedBuffer(dAtA []byte) (int, error if len(m.Block) > 0 { i -= len(m.Block) copy(dAtA[i:], m.Block) - i = encodeVarintBertytypes(dAtA, i, uint64(len(m.Block))) + i = encodeVarintProtocoltypes(dAtA, i, uint64(len(m.Block))) i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } -func encodeVarintBertytypes(dAtA []byte, offset int, v uint64) int { - offset -= sovBertytypes(v) +func encodeVarintProtocoltypes(dAtA []byte, offset int, v uint64) int { + offset -= sovProtocoltypes(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -16972,19 +18746,19 @@ func (m *Account) Size() (n int) { _ = l if m.Group != nil { l = m.Group.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AccountPrivateKey) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AliasPrivateKey) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.PublicRendezvousSeed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17000,22 +18774,22 @@ func (m *Group) Size() (n int) { _ = l l = len(m.PublicKey) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Secret) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.SecretSig) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.GroupType != 0 { - n += 1 + sovBertytypes(uint64(m.GroupType)) + n += 1 + sovProtocoltypes(uint64(m.GroupType)) } l = len(m.SignPub) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17031,22 +18805,22 @@ func (m *GroupHeadsExport) Size() (n int) { _ = l l = len(m.PublicKey) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.SignPub) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.MetadataHeadsCIDs) > 0 { for _, b := range m.MetadataHeadsCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if len(m.MessagesHeadsCIDs) > 0 { for _, b := range m.MessagesHeadsCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -17062,19 +18836,19 @@ func (m *GroupMetadata) Size() (n int) { var l int _ = l if m.EventType != 0 { - n += 1 + sovBertytypes(uint64(m.EventType)) + n += 1 + sovProtocoltypes(uint64(m.EventType)) } l = len(m.Payload) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Sig) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.ProtocolMetadata != nil { l = m.ProtocolMetadata.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17090,16 +18864,16 @@ func (m *GroupEnvelope) Size() (n int) { _ = l l = len(m.Nonce) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Event) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.EncryptedAttachmentCIDs) > 0 { for _, b := range m.EncryptedAttachmentCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -17115,22 +18889,22 @@ func (m *MessageHeaders) Size() (n int) { var l int _ = l if m.Counter != 0 { - n += 1 + sovBertytypes(uint64(m.Counter)) + n += 1 + sovProtocoltypes(uint64(m.Counter)) } l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Sig) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.Metadata) > 0 { for k, v := range m.Metadata { _ = k _ = v - mapEntrySize := 1 + len(k) + sovBertytypes(uint64(len(k))) + 1 + len(v) + sovBertytypes(uint64(len(v))) - n += mapEntrySize + 1 + sovBertytypes(uint64(mapEntrySize)) + mapEntrySize := 1 + len(k) + sovProtocoltypes(uint64(len(k))) + 1 + len(v) + sovProtocoltypes(uint64(len(v))) + n += mapEntrySize + 1 + sovProtocoltypes(uint64(mapEntrySize)) } } if m.XXX_unrecognized != nil { @@ -17148,7 +18922,7 @@ func (m *ProtocolMetadata) Size() (n int) { if len(m.AttachmentsSecrets) > 0 { for _, b := range m.AttachmentsSecrets { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -17165,11 +18939,11 @@ func (m *EncryptedMessage) Size() (n int) { _ = l l = len(m.Plaintext) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.ProtocolMetadata != nil { l = m.ProtocolMetadata.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17185,20 +18959,20 @@ func (m *MessageEnvelope) Size() (n int) { _ = l l = len(m.MessageHeaders) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Message) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Nonce) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.EncryptedAttachmentCIDs) > 0 { for _, b := range m.EncryptedAttachmentCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -17215,22 +18989,22 @@ func (m *EventContext) Size() (n int) { _ = l l = len(m.ID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.ParentIDs) > 0 { for _, b := range m.ParentIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.AttachmentCIDs) > 0 { for _, b := range m.AttachmentCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -17247,11 +19021,11 @@ func (m *AppMetadata) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Message) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17267,11 +19041,11 @@ func (m *ContactAddAliasKey) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AliasPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17287,15 +19061,15 @@ func (m *GroupAddMemberDevice) Size() (n int) { _ = l l = len(m.MemberPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.MemberSig) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17311,10 +19085,10 @@ func (m *DeviceSecret) Size() (n int) { _ = l l = len(m.ChainKey) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Counter != 0 { - n += 1 + sovBertytypes(uint64(m.Counter)) + n += 1 + sovProtocoltypes(uint64(m.Counter)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17330,15 +19104,15 @@ func (m *GroupAddDeviceSecret) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.DestMemberPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Payload) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17354,15 +19128,15 @@ func (m *MultiMemberGroupAddAliasResolver) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AliasResolver) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AliasProof) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17378,11 +19152,11 @@ func (m *MultiMemberGrantAdminRole) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.GranteeMemberPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17398,7 +19172,7 @@ func (m *MultiMemberInitialMember) Size() (n int) { _ = l l = len(m.MemberPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17414,11 +19188,11 @@ func (m *GroupAddAdditionalRendezvousSeed) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Seed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17434,11 +19208,11 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Seed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17454,11 +19228,11 @@ func (m *AccountGroupJoined) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Group != nil { l = m.Group.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17474,11 +19248,11 @@ func (m *AccountGroupLeft) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17494,7 +19268,7 @@ func (m *AccountContactRequestDisabled) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17510,7 +19284,7 @@ func (m *AccountContactRequestEnabled) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17526,11 +19300,11 @@ func (m *AccountContactRequestReferenceReset) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.PublicRendezvousSeed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17546,19 +19320,19 @@ func (m *AccountContactRequestEnqueued) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Contact != nil { l = m.Contact.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.OwnMetadata) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17574,11 +19348,11 @@ func (m *AccountContactRequestSent) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17594,19 +19368,19 @@ func (m *AccountContactRequestReceived) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactRendezvousSeed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactMetadata) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17622,11 +19396,11 @@ func (m *AccountContactRequestDiscarded) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17642,15 +19416,15 @@ func (m *AccountContactRequestAccepted) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17666,11 +19440,11 @@ func (m *AccountContactBlocked) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17686,11 +19460,11 @@ func (m *AccountContactUnblocked) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17706,11 +19480,11 @@ func (m *AccountServiceTokenAdded) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.ServiceToken != nil { l = m.ServiceToken.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17726,11 +19500,11 @@ func (m *AccountServiceTokenRemoved) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.TokenID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17746,15 +19520,15 @@ func (m *GroupReplicating) Size() (n int) { _ = l l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AuthenticationURL) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ReplicationServer) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17794,7 +19568,7 @@ func (m *InstanceExportData_Reply) Size() (n int) { _ = l l = len(m.ExportedData) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17834,37 +19608,37 @@ func (m *InstanceGetConfiguration_Reply) Size() (n int) { _ = l l = len(m.AccountPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AccountGroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.PeerID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.Listeners) > 0 { for _, s := range m.Listeners { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.BleEnabled != 0 { - n += 1 + sovBertytypes(uint64(m.BleEnabled)) + n += 1 + sovProtocoltypes(uint64(m.BleEnabled)) } if m.WifiP2PEnabled != 0 { - n += 1 + sovBertytypes(uint64(m.WifiP2PEnabled)) + n += 1 + sovProtocoltypes(uint64(m.WifiP2PEnabled)) } if m.MdnsEnabled != 0 { - n += 1 + sovBertytypes(uint64(m.MdnsEnabled)) + n += 1 + sovProtocoltypes(uint64(m.MdnsEnabled)) } if m.RelayEnabled != 0 { - n += 1 + sovBertytypes(uint64(m.RelayEnabled)) + n += 1 + sovProtocoltypes(uint64(m.RelayEnabled)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -17904,7 +19678,7 @@ func (m *ContactRequestReference_Reply) Size() (n int) { _ = l l = len(m.PublicRendezvousSeed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Enabled { n += 2 @@ -17983,7 +19757,7 @@ func (m *ContactRequestEnable_Reply) Size() (n int) { _ = l l = len(m.PublicRendezvousSeed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18023,7 +19797,7 @@ func (m *ContactRequestResetReference_Reply) Size() (n int) { _ = l l = len(m.PublicRendezvousSeed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18051,11 +19825,11 @@ func (m *ContactRequestSend_Request) Size() (n int) { _ = l if m.Contact != nil { l = m.Contact.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.OwnMetadata) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18095,7 +19869,7 @@ func (m *ContactRequestAccept_Request) Size() (n int) { _ = l l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18135,7 +19909,7 @@ func (m *ContactRequestDiscard_Request) Size() (n int) { _ = l l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18175,7 +19949,7 @@ func (m *ContactBlock_Request) Size() (n int) { _ = l l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18215,7 +19989,7 @@ func (m *ContactUnblock_Request) Size() (n int) { _ = l l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18255,7 +20029,7 @@ func (m *ContactAliasKeySend_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18307,7 +20081,7 @@ func (m *MultiMemberGroupCreate_Reply) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18335,7 +20109,7 @@ func (m *MultiMemberGroupJoin_Request) Size() (n int) { _ = l if m.Group != nil { l = m.Group.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18375,7 +20149,7 @@ func (m *MultiMemberGroupLeave_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18415,7 +20189,7 @@ func (m *MultiMemberGroupAliasResolverDisclose_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18455,11 +20229,11 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.MemberPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18499,7 +20273,7 @@ func (m *MultiMemberGroupInvitationCreate_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18515,7 +20289,7 @@ func (m *MultiMemberGroupInvitationCreate_Reply) Size() (n int) { _ = l if m.Group != nil { l = m.Group.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18543,16 +20317,16 @@ func (m *AppMetadataSend_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Payload) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.AttachmentCIDs) > 0 { for _, b := range m.AttachmentCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -18593,16 +20367,16 @@ func (m *AppMessageSend_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Payload) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.AttachmentCIDs) > 0 { for _, b := range m.AttachmentCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -18631,15 +20405,15 @@ func (m *GroupMetadataEvent) Size() (n int) { _ = l if m.EventContext != nil { l = m.EventContext.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Metadata != nil { l = m.Metadata.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Event) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18655,15 +20429,15 @@ func (m *GroupMessageEvent) Size() (n int) { _ = l if m.EventContext != nil { l = m.EventContext.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Headers != nil { l = m.Headers.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Message) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18691,18 +20465,18 @@ func (m *GroupMetadataList_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.SinceID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.SinceNow { n += 2 } l = len(m.UntilID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.UntilNow { n += 2 @@ -18736,18 +20510,18 @@ func (m *GroupMessageList_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.SinceID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.SinceNow { n += 2 } l = len(m.UntilID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.UntilNow { n += 2 @@ -18781,11 +20555,11 @@ func (m *GroupInfo_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18801,15 +20575,15 @@ func (m *GroupInfo_Reply) Size() (n int) { _ = l if m.Group != nil { l = m.Group.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.MemberPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18837,7 +20611,7 @@ func (m *ActivateGroup_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.LocalOnly { n += 2 @@ -18880,7 +20654,7 @@ func (m *DeactivateGroup_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18920,21 +20694,21 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Size() (n int) { _ = l l = len(m.PeerID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.Maddrs) > 0 { for _, s := range m.Maddrs { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } l = len(m.DriverName) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Topic) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18950,21 +20724,21 @@ func (m *MonitorGroup_EventMonitorPeerFound) Size() (n int) { _ = l l = len(m.PeerID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.Maddrs) > 0 { for _, s := range m.Maddrs { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } l = len(m.DriverName) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Topic) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -18980,17 +20754,17 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Size() (n int) { _ = l l = len(m.PeerID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.Maddrs) > 0 { for _, s := range m.Maddrs { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } l = len(m.Topic) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.IsSelf { n += 2 @@ -19009,11 +20783,11 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Size() (n int) { _ = l l = len(m.PeerID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Topic) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.IsSelf { n += 2 @@ -19031,23 +20805,23 @@ func (m *MonitorGroup_EventMonitor) Size() (n int) { var l int _ = l if m.Type != 0 { - n += 1 + sovBertytypes(uint64(m.Type)) + n += 1 + sovProtocoltypes(uint64(m.Type)) } if m.AdvertiseGroup != nil { l = m.AdvertiseGroup.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.PeerFound != nil { l = m.PeerFound.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.PeerJoin != nil { l = m.PeerJoin.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.PeerLeave != nil { l = m.PeerLeave.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19063,7 +20837,7 @@ func (m *MonitorGroup_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19079,11 +20853,11 @@ func (m *MonitorGroup_Reply) Size() (n int) { _ = l if m.Event != nil { l = m.Event.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19123,14 +20897,14 @@ func (m *DebugListGroups_Reply) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.GroupType != 0 { - n += 1 + sovBertytypes(uint64(m.GroupType)) + n += 1 + sovProtocoltypes(uint64(m.GroupType)) } l = len(m.ContactPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19158,10 +20932,10 @@ func (m *DebugInspectGroupStore_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.LogType != 0 { - n += 1 + sovBertytypes(uint64(m.LogType)) + n += 1 + sovProtocoltypes(uint64(m.LogType)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19177,24 +20951,24 @@ func (m *DebugInspectGroupStore_Reply) Size() (n int) { _ = l l = len(m.CID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.ParentCIDs) > 0 { for _, b := range m.ParentCIDs { l = len(b) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.MetadataEventType != 0 { - n += 1 + sovBertytypes(uint64(m.MetadataEventType)) + n += 1 + sovProtocoltypes(uint64(m.MetadataEventType)) } l = len(m.DevicePK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Payload) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19222,7 +20996,7 @@ func (m *DebugGroup_Request) Size() (n int) { _ = l l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19239,7 +21013,7 @@ func (m *DebugGroup_Reply) Size() (n int) { if len(m.PeerIDs) > 0 { for _, s := range m.PeerIDs { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -19256,15 +21030,15 @@ func (m *ShareableContact) Size() (n int) { _ = l l = len(m.PK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.PublicRendezvousSeed) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.Metadata) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19280,11 +21054,11 @@ func (m *ServiceTokenSupportedService) Size() (n int) { _ = l l = len(m.ServiceType) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.ServiceEndpoint) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19300,20 +21074,20 @@ func (m *ServiceToken) Size() (n int) { _ = l l = len(m.Token) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.AuthenticationURL) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.SupportedServices) > 0 { for _, e := range m.SupportedServices { l = e.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.Expiration != 0 { - n += 1 + sovBertytypes(uint64(m.Expiration)) + n += 1 + sovProtocoltypes(uint64(m.Expiration)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19341,7 +21115,7 @@ func (m *AuthServiceCompleteFlow_Request) Size() (n int) { _ = l l = len(m.CallbackURL) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19381,7 +21155,7 @@ func (m *AuthServiceInitFlow_Request) Size() (n int) { _ = l l = len(m.AuthURL) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19397,7 +21171,7 @@ func (m *AuthServiceInitFlow_Reply) Size() (n int) { _ = l l = len(m.URL) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.SecureURL { n += 2 @@ -19440,11 +21214,11 @@ func (m *ServicesTokenList_Reply) Size() (n int) { _ = l l = len(m.TokenID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Service != nil { l = m.Service.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19461,16 +21235,16 @@ func (m *ServicesTokenCode) Size() (n int) { if len(m.Services) > 0 { for _, s := range m.Services { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } l = len(m.CodeChallenge) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.TokenID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19498,11 +21272,11 @@ func (m *ReplicationServiceRegisterGroup_Request) Size() (n int) { _ = l l = len(m.TokenID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.GroupPK) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19542,7 +21316,7 @@ func (m *ReplicationServiceReplicateGroup_Request) Size() (n int) { _ = l if m.Group != nil { l = m.Group.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19597,20 +21371,20 @@ func (m *SystemInfo_Reply) Size() (n int) { _ = l if m.Process != nil { l = m.Process.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.P2P != nil { l = m.P2P.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.OrbitDB != nil { l = m.OrbitDB.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.Warns) > 0 { for _, s := range m.Warns { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -19627,7 +21401,7 @@ func (m *SystemInfo_OrbitDB) Size() (n int) { _ = l if m.AccountMetadata != nil { l = m.AccountMetadata.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19642,16 +21416,16 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Size() (n int) { var l int _ = l if m.Progress != 0 { - n += 1 + sovBertytypes(uint64(m.Progress)) + n += 1 + sovProtocoltypes(uint64(m.Progress)) } if m.Maximum != 0 { - n += 1 + sovBertytypes(uint64(m.Maximum)) + n += 1 + sovProtocoltypes(uint64(m.Maximum)) } if m.Buffered != 0 { - n += 1 + sovBertytypes(uint64(m.Buffered)) + n += 1 + sovProtocoltypes(uint64(m.Buffered)) } if m.Queued != 0 { - n += 1 + sovBertytypes(uint64(m.Queued)) + n += 1 + sovProtocoltypes(uint64(m.Queued)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19666,7 +21440,7 @@ func (m *SystemInfo_P2P) Size() (n int) { var l int _ = l if m.ConnectedPeers != 0 { - n += 1 + sovBertytypes(uint64(m.ConnectedPeers)) + n += 1 + sovProtocoltypes(uint64(m.ConnectedPeers)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19682,77 +21456,77 @@ func (m *SystemInfo_Process) Size() (n int) { _ = l l = len(m.Version) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } l = len(m.VcsRef) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.UptimeMS != 0 { - n += 1 + sovBertytypes(uint64(m.UptimeMS)) + n += 1 + sovProtocoltypes(uint64(m.UptimeMS)) } if m.UserCPUTimeMS != 0 { - n += 1 + sovBertytypes(uint64(m.UserCPUTimeMS)) + n += 1 + sovProtocoltypes(uint64(m.UserCPUTimeMS)) } if m.SystemCPUTimeMS != 0 { - n += 1 + sovBertytypes(uint64(m.SystemCPUTimeMS)) + n += 1 + sovProtocoltypes(uint64(m.SystemCPUTimeMS)) } if m.StartedAt != 0 { - n += 1 + sovBertytypes(uint64(m.StartedAt)) + n += 1 + sovProtocoltypes(uint64(m.StartedAt)) } if m.RlimitCur != 0 { - n += 1 + sovBertytypes(uint64(m.RlimitCur)) + n += 1 + sovProtocoltypes(uint64(m.RlimitCur)) } if m.NumGoroutine != 0 { - n += 1 + sovBertytypes(uint64(m.NumGoroutine)) + n += 1 + sovProtocoltypes(uint64(m.NumGoroutine)) } if m.Nofile != 0 { - n += 1 + sovBertytypes(uint64(m.Nofile)) + n += 1 + sovProtocoltypes(uint64(m.Nofile)) } if m.TooManyOpenFiles { n += 3 } if m.NumCPU != 0 { - n += 2 + sovBertytypes(uint64(m.NumCPU)) + n += 2 + sovProtocoltypes(uint64(m.NumCPU)) } l = len(m.GoVersion) if l > 0 { - n += 2 + l + sovBertytypes(uint64(l)) + n += 2 + l + sovProtocoltypes(uint64(l)) } l = len(m.OperatingSystem) if l > 0 { - n += 2 + l + sovBertytypes(uint64(l)) + n += 2 + l + sovProtocoltypes(uint64(l)) } l = len(m.HostName) if l > 0 { - n += 2 + l + sovBertytypes(uint64(l)) + n += 2 + l + sovProtocoltypes(uint64(l)) } l = len(m.Arch) if l > 0 { - n += 2 + l + sovBertytypes(uint64(l)) + n += 2 + l + sovProtocoltypes(uint64(l)) } if m.RlimitMax != 0 { - n += 2 + sovBertytypes(uint64(m.RlimitMax)) + n += 2 + sovProtocoltypes(uint64(m.RlimitMax)) } if m.PID != 0 { - n += 2 + sovBertytypes(uint64(m.PID)) + n += 2 + sovProtocoltypes(uint64(m.PID)) } if m.PPID != 0 { - n += 2 + sovBertytypes(uint64(m.PPID)) + n += 2 + sovProtocoltypes(uint64(m.PPID)) } if m.Priority != 0 { - n += 2 + sovBertytypes(uint64(m.Priority)) + n += 2 + sovProtocoltypes(uint64(m.Priority)) } if m.UID != 0 { - n += 2 + sovBertytypes(uint64(m.UID)) + n += 2 + sovProtocoltypes(uint64(m.UID)) } l = len(m.WorkingDir) if l > 0 { - n += 2 + l + sovBertytypes(uint64(l)) + n += 2 + l + sovProtocoltypes(uint64(l)) } l = len(m.SystemUsername) if l > 0 { - n += 2 + l + sovBertytypes(uint64(l)) + n += 2 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19793,7 +21567,7 @@ func (m *PeerList_Reply) Size() (n int) { if len(m.Peers) > 0 { for _, e := range m.Peers { l = e.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -19810,35 +21584,35 @@ func (m *PeerList_Peer) Size() (n int) { _ = l l = len(m.ID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if len(m.Routes) > 0 { for _, e := range m.Routes { l = e.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if len(m.Errors) > 0 { for _, s := range m.Errors { l = len(s) - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if len(m.Features) > 0 { l = 0 for _, e := range m.Features { - l += sovBertytypes(uint64(e)) + l += sovProtocoltypes(uint64(e)) } - n += 1 + sovBertytypes(uint64(l)) + l + n += 1 + sovProtocoltypes(uint64(l)) + l } if m.MinLatency != 0 { - n += 1 + sovBertytypes(uint64(m.MinLatency)) + n += 1 + sovProtocoltypes(uint64(m.MinLatency)) } if m.IsActive { n += 2 } if m.Direction != 0 { - n += 1 + sovBertytypes(uint64(m.Direction)) + n += 1 + sovProtocoltypes(uint64(m.Direction)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19857,18 +21631,18 @@ func (m *PeerList_Route) Size() (n int) { } l = len(m.Address) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.Direction != 0 { - n += 1 + sovBertytypes(uint64(m.Direction)) + n += 1 + sovProtocoltypes(uint64(m.Direction)) } if m.Latency != 0 { - n += 1 + sovBertytypes(uint64(m.Latency)) + n += 1 + sovProtocoltypes(uint64(m.Latency)) } if len(m.Streams) > 0 { for _, e := range m.Streams { l = e.Size() - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } } if m.XXX_unrecognized != nil { @@ -19885,7 +21659,7 @@ func (m *PeerList_Stream) Size() (n int) { _ = l l = len(m.ID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19913,7 +21687,7 @@ func (m *AttachmentPrepare_Request) Size() (n int) { _ = l l = len(m.Block) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.DisableEncryption { n += 2 @@ -19932,7 +21706,7 @@ func (m *AttachmentPrepare_Reply) Size() (n int) { _ = l l = len(m.AttachmentCID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19960,7 +21734,7 @@ func (m *AttachmentRetrieve_Request) Size() (n int) { _ = l l = len(m.AttachmentCID) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19976,7 +21750,7 @@ func (m *AttachmentRetrieve_Reply) Size() (n int) { _ = l l = len(m.Block) if l > 0 { - n += 1 + l + sovBertytypes(uint64(l)) + n += 1 + l + sovProtocoltypes(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -19984,12 +21758,12 @@ func (m *AttachmentRetrieve_Reply) Size() (n int) { return n } -func sovBertytypes(x uint64) (n int) { +func sovProtocoltypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozBertytypes(x uint64) (n int) { - return sovBertytypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozProtocoltypes(x uint64) (n int) { + return sovProtocoltypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Account) Unmarshal(dAtA []byte) error { @@ -20000,7 +21774,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20028,7 +21802,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20041,11 +21815,11 @@ func (m *Account) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20064,7 +21838,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20077,11 +21851,11 @@ func (m *Account) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20098,7 +21872,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20111,11 +21885,11 @@ func (m *Account) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20132,7 +21906,7 @@ func (m *Account) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20145,11 +21919,11 @@ func (m *Account) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20161,15 +21935,15 @@ func (m *Account) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -20193,7 +21967,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20221,7 +21995,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20234,11 +22008,11 @@ func (m *Group) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20255,7 +22029,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20268,11 +22042,11 @@ func (m *Group) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20289,7 +22063,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20302,11 +22076,11 @@ func (m *Group) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20323,7 +22097,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { m.GroupType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20342,7 +22116,7 @@ func (m *Group) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20355,11 +22129,11 @@ func (m *Group) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20371,15 +22145,15 @@ func (m *Group) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -20403,7 +22177,7 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20431,7 +22205,7 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20444,11 +22218,11 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20465,7 +22239,7 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20478,11 +22252,11 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20499,7 +22273,7 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20512,11 +22286,11 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20531,7 +22305,7 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20544,11 +22318,11 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20558,15 +22332,15 @@ func (m *GroupHeadsExport) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -20590,7 +22364,7 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20618,7 +22392,7 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { m.EventType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20637,7 +22411,7 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20650,11 +22424,11 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20671,7 +22445,7 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20684,11 +22458,11 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20705,7 +22479,7 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20718,11 +22492,11 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20736,15 +22510,15 @@ func (m *GroupMetadata) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -20768,7 +22542,7 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20796,7 +22570,7 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20809,11 +22583,11 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20830,7 +22604,7 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20843,11 +22617,11 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20864,7 +22638,7 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20877,11 +22651,11 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -20891,15 +22665,15 @@ func (m *GroupEnvelope) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -20923,7 +22697,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20951,7 +22725,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { m.Counter = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20970,7 +22744,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -20983,11 +22757,11 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21004,7 +22778,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21017,11 +22791,11 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21038,7 +22812,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21051,11 +22825,11 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21070,7 +22844,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21087,7 +22861,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21101,11 +22875,11 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -21116,7 +22890,7 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21130,11 +22904,11 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF @@ -21143,12 +22917,12 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -21160,15 +22934,15 @@ func (m *MessageHeaders) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -21192,7 +22966,7 @@ func (m *ProtocolMetadata) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21220,7 +22994,7 @@ func (m *ProtocolMetadata) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21233,11 +23007,11 @@ func (m *ProtocolMetadata) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21247,15 +23021,15 @@ func (m *ProtocolMetadata) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -21279,7 +23053,7 @@ func (m *EncryptedMessage) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21307,7 +23081,7 @@ func (m *EncryptedMessage) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21320,11 +23094,11 @@ func (m *EncryptedMessage) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21341,7 +23115,7 @@ func (m *EncryptedMessage) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21354,11 +23128,11 @@ func (m *EncryptedMessage) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21372,15 +23146,15 @@ func (m *EncryptedMessage) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -21404,7 +23178,7 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21432,7 +23206,7 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21445,11 +23219,11 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21466,7 +23240,7 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21479,11 +23253,11 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21500,7 +23274,7 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21513,11 +23287,11 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21534,7 +23308,7 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21547,11 +23321,11 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21561,15 +23335,15 @@ func (m *MessageEnvelope) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -21593,7 +23367,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21621,7 +23395,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21634,11 +23408,11 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21655,7 +23429,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21668,11 +23442,11 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21687,7 +23461,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21700,11 +23474,11 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21721,7 +23495,7 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21734,11 +23508,11 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21748,15 +23522,15 @@ func (m *EventContext) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -21780,7 +23554,7 @@ func (m *AppMetadata) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21808,7 +23582,7 @@ func (m *AppMetadata) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21821,11 +23595,11 @@ func (m *AppMetadata) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21842,7 +23616,7 @@ func (m *AppMetadata) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21855,11 +23629,11 @@ func (m *AppMetadata) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21871,15 +23645,15 @@ func (m *AppMetadata) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -21903,7 +23677,7 @@ func (m *ContactAddAliasKey) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21931,7 +23705,7 @@ func (m *ContactAddAliasKey) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21944,11 +23718,11 @@ func (m *ContactAddAliasKey) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21965,7 +23739,7 @@ func (m *ContactAddAliasKey) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -21978,11 +23752,11 @@ func (m *ContactAddAliasKey) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -21994,15 +23768,15 @@ func (m *ContactAddAliasKey) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22026,7 +23800,7 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22054,7 +23828,7 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22067,11 +23841,11 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22088,7 +23862,7 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22101,11 +23875,11 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22122,7 +23896,7 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22135,11 +23909,11 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22151,15 +23925,15 @@ func (m *GroupAddMemberDevice) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22183,7 +23957,7 @@ func (m *DeviceSecret) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22211,7 +23985,7 @@ func (m *DeviceSecret) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22224,11 +23998,11 @@ func (m *DeviceSecret) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22245,7 +24019,7 @@ func (m *DeviceSecret) Unmarshal(dAtA []byte) error { m.Counter = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22259,15 +24033,15 @@ func (m *DeviceSecret) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22291,7 +24065,7 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22319,7 +24093,7 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22332,11 +24106,11 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22353,7 +24127,7 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22366,11 +24140,11 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22387,7 +24161,7 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22400,11 +24174,11 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22416,15 +24190,15 @@ func (m *GroupAddDeviceSecret) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22448,7 +24222,7 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22476,7 +24250,7 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22489,11 +24263,11 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22510,7 +24284,7 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22523,11 +24297,11 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22544,7 +24318,7 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22557,11 +24331,11 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22573,15 +24347,15 @@ func (m *MultiMemberGroupAddAliasResolver) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22605,7 +24379,7 @@ func (m *MultiMemberGrantAdminRole) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22633,7 +24407,7 @@ func (m *MultiMemberGrantAdminRole) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22646,11 +24420,11 @@ func (m *MultiMemberGrantAdminRole) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22667,7 +24441,7 @@ func (m *MultiMemberGrantAdminRole) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22680,11 +24454,11 @@ func (m *MultiMemberGrantAdminRole) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22696,15 +24470,15 @@ func (m *MultiMemberGrantAdminRole) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22728,7 +24502,7 @@ func (m *MultiMemberInitialMember) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22756,7 +24530,7 @@ func (m *MultiMemberInitialMember) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22769,11 +24543,11 @@ func (m *MultiMemberInitialMember) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22785,15 +24559,15 @@ func (m *MultiMemberInitialMember) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22817,7 +24591,7 @@ func (m *GroupAddAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22845,7 +24619,7 @@ func (m *GroupAddAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22858,11 +24632,11 @@ func (m *GroupAddAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22879,7 +24653,7 @@ func (m *GroupAddAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22892,11 +24666,11 @@ func (m *GroupAddAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -22908,15 +24682,15 @@ func (m *GroupAddAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -22940,7 +24714,7 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22968,7 +24742,7 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -22981,11 +24755,11 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23002,7 +24776,7 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23015,11 +24789,11 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23031,15 +24805,15 @@ func (m *GroupRemoveAdditionalRendezvousSeed) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23063,7 +24837,7 @@ func (m *AccountGroupJoined) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23091,7 +24865,7 @@ func (m *AccountGroupJoined) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23104,11 +24878,11 @@ func (m *AccountGroupJoined) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23125,7 +24899,7 @@ func (m *AccountGroupJoined) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23138,11 +24912,11 @@ func (m *AccountGroupJoined) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23156,15 +24930,15 @@ func (m *AccountGroupJoined) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23188,7 +24962,7 @@ func (m *AccountGroupLeft) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23216,7 +24990,7 @@ func (m *AccountGroupLeft) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23229,11 +25003,11 @@ func (m *AccountGroupLeft) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23250,7 +25024,7 @@ func (m *AccountGroupLeft) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23263,11 +25037,11 @@ func (m *AccountGroupLeft) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23279,15 +25053,15 @@ func (m *AccountGroupLeft) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23311,7 +25085,7 @@ func (m *AccountContactRequestDisabled) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23339,7 +25113,7 @@ func (m *AccountContactRequestDisabled) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23352,11 +25126,11 @@ func (m *AccountContactRequestDisabled) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23368,15 +25142,15 @@ func (m *AccountContactRequestDisabled) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23400,7 +25174,7 @@ func (m *AccountContactRequestEnabled) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23428,7 +25202,7 @@ func (m *AccountContactRequestEnabled) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23441,11 +25215,11 @@ func (m *AccountContactRequestEnabled) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23457,15 +25231,15 @@ func (m *AccountContactRequestEnabled) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23489,7 +25263,7 @@ func (m *AccountContactRequestReferenceReset) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23517,7 +25291,7 @@ func (m *AccountContactRequestReferenceReset) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23530,11 +25304,11 @@ func (m *AccountContactRequestReferenceReset) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23551,7 +25325,7 @@ func (m *AccountContactRequestReferenceReset) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23564,11 +25338,11 @@ func (m *AccountContactRequestReferenceReset) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23580,15 +25354,15 @@ func (m *AccountContactRequestReferenceReset) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23612,7 +25386,7 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23640,7 +25414,7 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23653,11 +25427,11 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23674,7 +25448,7 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23687,11 +25461,11 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23708,7 +25482,7 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23721,11 +25495,11 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23744,7 +25518,7 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23757,11 +25531,11 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23773,15 +25547,15 @@ func (m *AccountContactRequestEnqueued) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23805,7 +25579,7 @@ func (m *AccountContactRequestSent) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23833,7 +25607,7 @@ func (m *AccountContactRequestSent) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23846,11 +25620,11 @@ func (m *AccountContactRequestSent) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23867,7 +25641,7 @@ func (m *AccountContactRequestSent) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23880,11 +25654,11 @@ func (m *AccountContactRequestSent) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23896,15 +25670,15 @@ func (m *AccountContactRequestSent) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -23928,7 +25702,7 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23956,7 +25730,7 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -23969,11 +25743,11 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -23990,7 +25764,7 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24003,11 +25777,11 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24024,7 +25798,7 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24037,11 +25811,11 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24058,7 +25832,7 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24071,11 +25845,11 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24087,15 +25861,15 @@ func (m *AccountContactRequestReceived) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -24119,7 +25893,7 @@ func (m *AccountContactRequestDiscarded) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24147,7 +25921,7 @@ func (m *AccountContactRequestDiscarded) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24160,11 +25934,11 @@ func (m *AccountContactRequestDiscarded) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24181,7 +25955,7 @@ func (m *AccountContactRequestDiscarded) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24194,11 +25968,11 @@ func (m *AccountContactRequestDiscarded) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24210,15 +25984,15 @@ func (m *AccountContactRequestDiscarded) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -24242,7 +26016,7 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24270,7 +26044,7 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24283,11 +26057,11 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24304,7 +26078,7 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24317,11 +26091,11 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24338,7 +26112,7 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24351,11 +26125,11 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24367,15 +26141,15 @@ func (m *AccountContactRequestAccepted) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -24399,7 +26173,7 @@ func (m *AccountContactBlocked) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24427,7 +26201,7 @@ func (m *AccountContactBlocked) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24440,11 +26214,11 @@ func (m *AccountContactBlocked) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24461,7 +26235,7 @@ func (m *AccountContactBlocked) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24474,11 +26248,11 @@ func (m *AccountContactBlocked) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24490,15 +26264,15 @@ func (m *AccountContactBlocked) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -24522,7 +26296,7 @@ func (m *AccountContactUnblocked) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24550,7 +26324,7 @@ func (m *AccountContactUnblocked) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24563,11 +26337,11 @@ func (m *AccountContactUnblocked) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24584,7 +26358,7 @@ func (m *AccountContactUnblocked) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24597,11 +26371,11 @@ func (m *AccountContactUnblocked) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24613,15 +26387,15 @@ func (m *AccountContactUnblocked) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -24645,7 +26419,7 @@ func (m *AccountServiceTokenAdded) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24673,7 +26447,7 @@ func (m *AccountServiceTokenAdded) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24686,11 +26460,11 @@ func (m *AccountServiceTokenAdded) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24707,7 +26481,7 @@ func (m *AccountServiceTokenAdded) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24720,11 +26494,11 @@ func (m *AccountServiceTokenAdded) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24738,15 +26512,15 @@ func (m *AccountServiceTokenAdded) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -24770,7 +26544,7 @@ func (m *AccountServiceTokenRemoved) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24798,7 +26572,7 @@ func (m *AccountServiceTokenRemoved) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24811,11 +26585,11 @@ func (m *AccountServiceTokenRemoved) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24832,7 +26606,7 @@ func (m *AccountServiceTokenRemoved) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24846,11 +26620,11 @@ func (m *AccountServiceTokenRemoved) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24859,15 +26633,15 @@ func (m *AccountServiceTokenRemoved) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -24891,7 +26665,7 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24919,7 +26693,7 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24932,11 +26706,11 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24953,7 +26727,7 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24967,11 +26741,11 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -24985,7 +26759,7 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -24999,11 +26773,11 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25012,15 +26786,15 @@ func (m *GroupReplicating) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25044,7 +26818,7 @@ func (m *InstanceExportData) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25067,15 +26841,15 @@ func (m *InstanceExportData) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25099,7 +26873,7 @@ func (m *InstanceExportData_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25122,15 +26896,15 @@ func (m *InstanceExportData_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25154,7 +26928,7 @@ func (m *InstanceExportData_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25182,7 +26956,7 @@ func (m *InstanceExportData_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25195,11 +26969,11 @@ func (m *InstanceExportData_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25211,15 +26985,15 @@ func (m *InstanceExportData_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25243,7 +27017,7 @@ func (m *InstanceGetConfiguration) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25266,15 +27040,15 @@ func (m *InstanceGetConfiguration) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25298,7 +27072,7 @@ func (m *InstanceGetConfiguration_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25321,15 +27095,15 @@ func (m *InstanceGetConfiguration_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25353,7 +27127,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25381,7 +27155,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25394,11 +27168,11 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25415,7 +27189,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25428,11 +27202,11 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25449,7 +27223,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25462,11 +27236,11 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25483,7 +27257,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25497,11 +27271,11 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25515,7 +27289,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25529,11 +27303,11 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25547,7 +27321,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { m.BleEnabled = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25566,7 +27340,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { m.WifiP2PEnabled = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25585,7 +27359,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { m.MdnsEnabled = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25604,7 +27378,7 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { m.RelayEnabled = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25618,15 +27392,15 @@ func (m *InstanceGetConfiguration_Reply) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25650,7 +27424,7 @@ func (m *ContactRequestReference) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25673,15 +27447,15 @@ func (m *ContactRequestReference) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25705,7 +27479,7 @@ func (m *ContactRequestReference_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25728,15 +27502,15 @@ func (m *ContactRequestReference_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25760,7 +27534,7 @@ func (m *ContactRequestReference_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25788,7 +27562,7 @@ func (m *ContactRequestReference_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25801,11 +27575,11 @@ func (m *ContactRequestReference_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -25822,7 +27596,7 @@ func (m *ContactRequestReference_Reply) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25837,15 +27611,15 @@ func (m *ContactRequestReference_Reply) Unmarshal(dAtA []byte) error { m.Enabled = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25869,7 +27643,7 @@ func (m *ContactRequestDisable) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25892,15 +27666,15 @@ func (m *ContactRequestDisable) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25924,7 +27698,7 @@ func (m *ContactRequestDisable_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -25947,15 +27721,15 @@ func (m *ContactRequestDisable_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -25979,7 +27753,7 @@ func (m *ContactRequestDisable_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26002,15 +27776,15 @@ func (m *ContactRequestDisable_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26034,7 +27808,7 @@ func (m *ContactRequestEnable) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26057,15 +27831,15 @@ func (m *ContactRequestEnable) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26089,7 +27863,7 @@ func (m *ContactRequestEnable_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26112,15 +27886,15 @@ func (m *ContactRequestEnable_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26144,7 +27918,7 @@ func (m *ContactRequestEnable_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26172,7 +27946,7 @@ func (m *ContactRequestEnable_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26185,11 +27959,11 @@ func (m *ContactRequestEnable_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -26201,15 +27975,15 @@ func (m *ContactRequestEnable_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26233,7 +28007,7 @@ func (m *ContactRequestResetReference) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26256,15 +28030,15 @@ func (m *ContactRequestResetReference) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26288,7 +28062,7 @@ func (m *ContactRequestResetReference_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26311,15 +28085,15 @@ func (m *ContactRequestResetReference_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26343,7 +28117,7 @@ func (m *ContactRequestResetReference_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26371,7 +28145,7 @@ func (m *ContactRequestResetReference_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26384,11 +28158,11 @@ func (m *ContactRequestResetReference_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -26400,15 +28174,15 @@ func (m *ContactRequestResetReference_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26432,7 +28206,7 @@ func (m *ContactRequestSend) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26455,15 +28229,15 @@ func (m *ContactRequestSend) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26487,7 +28261,7 @@ func (m *ContactRequestSend_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26515,7 +28289,7 @@ func (m *ContactRequestSend_Request) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26528,11 +28302,11 @@ func (m *ContactRequestSend_Request) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -26551,7 +28325,7 @@ func (m *ContactRequestSend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26564,11 +28338,11 @@ func (m *ContactRequestSend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -26580,15 +28354,15 @@ func (m *ContactRequestSend_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26612,7 +28386,7 @@ func (m *ContactRequestSend_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26635,15 +28409,15 @@ func (m *ContactRequestSend_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26667,7 +28441,7 @@ func (m *ContactRequestAccept) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26690,15 +28464,15 @@ func (m *ContactRequestAccept) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26722,7 +28496,7 @@ func (m *ContactRequestAccept_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26750,7 +28524,7 @@ func (m *ContactRequestAccept_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26763,11 +28537,11 @@ func (m *ContactRequestAccept_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -26779,15 +28553,15 @@ func (m *ContactRequestAccept_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26811,7 +28585,7 @@ func (m *ContactRequestAccept_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26834,15 +28608,15 @@ func (m *ContactRequestAccept_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26866,7 +28640,7 @@ func (m *ContactRequestDiscard) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26889,15 +28663,15 @@ func (m *ContactRequestDiscard) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -26921,7 +28695,7 @@ func (m *ContactRequestDiscard_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26949,7 +28723,7 @@ func (m *ContactRequestDiscard_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -26962,11 +28736,11 @@ func (m *ContactRequestDiscard_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -26978,15 +28752,15 @@ func (m *ContactRequestDiscard_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27010,7 +28784,7 @@ func (m *ContactRequestDiscard_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27033,15 +28807,15 @@ func (m *ContactRequestDiscard_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27065,7 +28839,7 @@ func (m *ContactBlock) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27088,15 +28862,15 @@ func (m *ContactBlock) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27120,7 +28894,7 @@ func (m *ContactBlock_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27148,7 +28922,7 @@ func (m *ContactBlock_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27161,11 +28935,11 @@ func (m *ContactBlock_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -27177,15 +28951,15 @@ func (m *ContactBlock_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27209,7 +28983,7 @@ func (m *ContactBlock_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27232,15 +29006,15 @@ func (m *ContactBlock_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27264,7 +29038,7 @@ func (m *ContactUnblock) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27287,15 +29061,15 @@ func (m *ContactUnblock) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27319,7 +29093,7 @@ func (m *ContactUnblock_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27347,7 +29121,7 @@ func (m *ContactUnblock_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27360,11 +29134,11 @@ func (m *ContactUnblock_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -27376,15 +29150,15 @@ func (m *ContactUnblock_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27408,7 +29182,7 @@ func (m *ContactUnblock_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27431,15 +29205,15 @@ func (m *ContactUnblock_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27463,7 +29237,7 @@ func (m *ContactAliasKeySend) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27486,15 +29260,15 @@ func (m *ContactAliasKeySend) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27518,7 +29292,7 @@ func (m *ContactAliasKeySend_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27546,7 +29320,7 @@ func (m *ContactAliasKeySend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27559,11 +29333,11 @@ func (m *ContactAliasKeySend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -27575,15 +29349,15 @@ func (m *ContactAliasKeySend_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27607,7 +29381,7 @@ func (m *ContactAliasKeySend_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27630,15 +29404,15 @@ func (m *ContactAliasKeySend_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27662,7 +29436,7 @@ func (m *MultiMemberGroupCreate) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27685,15 +29459,15 @@ func (m *MultiMemberGroupCreate) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27717,7 +29491,7 @@ func (m *MultiMemberGroupCreate_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27740,15 +29514,15 @@ func (m *MultiMemberGroupCreate_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27772,7 +29546,7 @@ func (m *MultiMemberGroupCreate_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27800,7 +29574,7 @@ func (m *MultiMemberGroupCreate_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27813,11 +29587,11 @@ func (m *MultiMemberGroupCreate_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -27829,15 +29603,15 @@ func (m *MultiMemberGroupCreate_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27861,7 +29635,7 @@ func (m *MultiMemberGroupJoin) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27884,15 +29658,15 @@ func (m *MultiMemberGroupJoin) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -27916,7 +29690,7 @@ func (m *MultiMemberGroupJoin_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27944,7 +29718,7 @@ func (m *MultiMemberGroupJoin_Request) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -27957,11 +29731,11 @@ func (m *MultiMemberGroupJoin_Request) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -27975,15 +29749,15 @@ func (m *MultiMemberGroupJoin_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28007,7 +29781,7 @@ func (m *MultiMemberGroupJoin_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28030,15 +29804,15 @@ func (m *MultiMemberGroupJoin_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28062,7 +29836,7 @@ func (m *MultiMemberGroupLeave) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28085,15 +29859,15 @@ func (m *MultiMemberGroupLeave) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28117,7 +29891,7 @@ func (m *MultiMemberGroupLeave_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28145,7 +29919,7 @@ func (m *MultiMemberGroupLeave_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28158,11 +29932,11 @@ func (m *MultiMemberGroupLeave_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -28174,15 +29948,15 @@ func (m *MultiMemberGroupLeave_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28206,7 +29980,7 @@ func (m *MultiMemberGroupLeave_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28229,15 +30003,15 @@ func (m *MultiMemberGroupLeave_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28261,7 +30035,7 @@ func (m *MultiMemberGroupAliasResolverDisclose) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28284,15 +30058,15 @@ func (m *MultiMemberGroupAliasResolverDisclose) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28316,7 +30090,7 @@ func (m *MultiMemberGroupAliasResolverDisclose_Request) Unmarshal(dAtA []byte) e var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28344,7 +30118,7 @@ func (m *MultiMemberGroupAliasResolverDisclose_Request) Unmarshal(dAtA []byte) e var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28357,11 +30131,11 @@ func (m *MultiMemberGroupAliasResolverDisclose_Request) Unmarshal(dAtA []byte) e } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -28373,15 +30147,15 @@ func (m *MultiMemberGroupAliasResolverDisclose_Request) Unmarshal(dAtA []byte) e iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28405,7 +30179,7 @@ func (m *MultiMemberGroupAliasResolverDisclose_Reply) Unmarshal(dAtA []byte) err var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28428,15 +30202,15 @@ func (m *MultiMemberGroupAliasResolverDisclose_Reply) Unmarshal(dAtA []byte) err switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28460,7 +30234,7 @@ func (m *MultiMemberGroupAdminRoleGrant) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28483,15 +30257,15 @@ func (m *MultiMemberGroupAdminRoleGrant) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28515,7 +30289,7 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28543,7 +30317,7 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28556,11 +30330,11 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -28577,7 +30351,7 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28590,11 +30364,11 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -28606,15 +30380,15 @@ func (m *MultiMemberGroupAdminRoleGrant_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28638,7 +30412,7 @@ func (m *MultiMemberGroupAdminRoleGrant_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28661,15 +30435,15 @@ func (m *MultiMemberGroupAdminRoleGrant_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28693,7 +30467,7 @@ func (m *MultiMemberGroupInvitationCreate) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28716,15 +30490,15 @@ func (m *MultiMemberGroupInvitationCreate) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28748,7 +30522,7 @@ func (m *MultiMemberGroupInvitationCreate_Request) Unmarshal(dAtA []byte) error var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28776,7 +30550,7 @@ func (m *MultiMemberGroupInvitationCreate_Request) Unmarshal(dAtA []byte) error var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28789,11 +30563,11 @@ func (m *MultiMemberGroupInvitationCreate_Request) Unmarshal(dAtA []byte) error } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -28805,15 +30579,15 @@ func (m *MultiMemberGroupInvitationCreate_Request) Unmarshal(dAtA []byte) error iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28837,7 +30611,7 @@ func (m *MultiMemberGroupInvitationCreate_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28865,7 +30639,7 @@ func (m *MultiMemberGroupInvitationCreate_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28878,11 +30652,11 @@ func (m *MultiMemberGroupInvitationCreate_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -28896,15 +30670,15 @@ func (m *MultiMemberGroupInvitationCreate_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28928,7 +30702,7 @@ func (m *AppMetadataSend) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -28951,15 +30725,15 @@ func (m *AppMetadataSend) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -28983,7 +30757,7 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29011,7 +30785,7 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29024,11 +30798,11 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29045,7 +30819,7 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29058,11 +30832,11 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29079,7 +30853,7 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29092,11 +30866,11 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29106,15 +30880,15 @@ func (m *AppMetadataSend_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29138,7 +30912,7 @@ func (m *AppMetadataSend_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29161,15 +30935,15 @@ func (m *AppMetadataSend_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29193,7 +30967,7 @@ func (m *AppMessageSend) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29216,15 +30990,15 @@ func (m *AppMessageSend) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29248,7 +31022,7 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29276,7 +31050,7 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29289,11 +31063,11 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29310,7 +31084,7 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29323,11 +31097,11 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29344,7 +31118,7 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29357,11 +31131,11 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29371,15 +31145,15 @@ func (m *AppMessageSend_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29403,7 +31177,7 @@ func (m *AppMessageSend_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29426,15 +31200,15 @@ func (m *AppMessageSend_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29458,7 +31232,7 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29486,7 +31260,7 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29499,11 +31273,11 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29522,7 +31296,7 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29535,11 +31309,11 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29558,7 +31332,7 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29571,11 +31345,11 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29587,15 +31361,15 @@ func (m *GroupMetadataEvent) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29619,7 +31393,7 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29647,7 +31421,7 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29660,11 +31434,11 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29683,7 +31457,7 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29696,11 +31470,11 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29719,7 +31493,7 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29732,11 +31506,11 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29748,15 +31522,15 @@ func (m *GroupMessageEvent) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29780,7 +31554,7 @@ func (m *GroupMetadataList) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29803,15 +31577,15 @@ func (m *GroupMetadataList) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -29835,7 +31609,7 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29863,7 +31637,7 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29876,11 +31650,11 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29897,7 +31671,7 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29910,11 +31684,11 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29931,7 +31705,7 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29951,7 +31725,7 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -29964,11 +31738,11 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -29985,7 +31759,7 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30005,7 +31779,7 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30020,15 +31794,15 @@ func (m *GroupMetadataList_Request) Unmarshal(dAtA []byte) error { m.ReverseOrder = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30052,7 +31826,7 @@ func (m *GroupMessageList) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30075,15 +31849,15 @@ func (m *GroupMessageList) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30107,7 +31881,7 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30135,7 +31909,7 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30148,11 +31922,11 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30169,7 +31943,7 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30182,11 +31956,11 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30203,7 +31977,7 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30223,7 +31997,7 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30236,11 +32010,11 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30257,7 +32031,7 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30277,7 +32051,7 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30292,15 +32066,15 @@ func (m *GroupMessageList_Request) Unmarshal(dAtA []byte) error { m.ReverseOrder = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30324,7 +32098,7 @@ func (m *GroupInfo) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30347,15 +32121,15 @@ func (m *GroupInfo) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30379,7 +32153,7 @@ func (m *GroupInfo_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30407,7 +32181,7 @@ func (m *GroupInfo_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30420,11 +32194,11 @@ func (m *GroupInfo_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30441,7 +32215,7 @@ func (m *GroupInfo_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30454,11 +32228,11 @@ func (m *GroupInfo_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30470,15 +32244,15 @@ func (m *GroupInfo_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30502,7 +32276,7 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30530,7 +32304,7 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30543,11 +32317,11 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30566,7 +32340,7 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30579,11 +32353,11 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30600,7 +32374,7 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30613,11 +32387,11 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30629,15 +32403,15 @@ func (m *GroupInfo_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30661,7 +32435,7 @@ func (m *ActivateGroup) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30684,15 +32458,15 @@ func (m *ActivateGroup) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30716,7 +32490,7 @@ func (m *ActivateGroup_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30744,7 +32518,7 @@ func (m *ActivateGroup_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30757,11 +32531,11 @@ func (m *ActivateGroup_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30778,7 +32552,7 @@ func (m *ActivateGroup_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30793,15 +32567,15 @@ func (m *ActivateGroup_Request) Unmarshal(dAtA []byte) error { m.LocalOnly = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30825,7 +32599,7 @@ func (m *ActivateGroup_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30848,15 +32622,15 @@ func (m *ActivateGroup_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30880,7 +32654,7 @@ func (m *DeactivateGroup) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30903,15 +32677,15 @@ func (m *DeactivateGroup) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -30935,7 +32709,7 @@ func (m *DeactivateGroup_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30963,7 +32737,7 @@ func (m *DeactivateGroup_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -30976,11 +32750,11 @@ func (m *DeactivateGroup_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -30992,15 +32766,15 @@ func (m *DeactivateGroup_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -31024,7 +32798,7 @@ func (m *DeactivateGroup_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31047,15 +32821,15 @@ func (m *DeactivateGroup_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -31079,7 +32853,7 @@ func (m *MonitorGroup) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31102,15 +32876,15 @@ func (m *MonitorGroup) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -31134,7 +32908,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31162,7 +32936,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31176,11 +32950,11 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31194,7 +32968,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31208,11 +32982,11 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31226,7 +33000,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31240,11 +33014,11 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31258,7 +33032,7 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31272,11 +33046,11 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31285,15 +33059,15 @@ func (m *MonitorGroup_EventMonitorAdvertiseGroup) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -31317,7 +33091,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31345,7 +33119,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31359,11 +33133,11 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31377,7 +33151,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31391,11 +33165,11 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31409,7 +33183,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31423,11 +33197,11 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31441,7 +33215,7 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31455,11 +33229,11 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31468,15 +33242,15 @@ func (m *MonitorGroup_EventMonitorPeerFound) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -31500,7 +33274,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31528,7 +33302,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31542,11 +33316,11 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31560,7 +33334,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31574,11 +33348,11 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31592,7 +33366,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31606,11 +33380,11 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31624,7 +33398,7 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31639,15 +33413,15 @@ func (m *MonitorGroup_EventMonitorPeerJoin) Unmarshal(dAtA []byte) error { m.IsSelf = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -31671,7 +33445,7 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31699,7 +33473,7 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31713,11 +33487,11 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31731,7 +33505,7 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31745,11 +33519,11 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31763,7 +33537,7 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31778,15 +33552,15 @@ func (m *MonitorGroup_EventMonitorPeerLeave) Unmarshal(dAtA []byte) error { m.IsSelf = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -31810,7 +33584,7 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31838,7 +33612,7 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31857,7 +33631,7 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31870,11 +33644,11 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31893,7 +33667,7 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31906,11 +33680,11 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31929,7 +33703,7 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31942,11 +33716,11 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31965,7 +33739,7 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -31978,11 +33752,11 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -31996,15 +33770,15 @@ func (m *MonitorGroup_EventMonitor) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32028,7 +33802,7 @@ func (m *MonitorGroup_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32056,7 +33830,7 @@ func (m *MonitorGroup_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32069,11 +33843,11 @@ func (m *MonitorGroup_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32085,15 +33859,15 @@ func (m *MonitorGroup_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32117,7 +33891,7 @@ func (m *MonitorGroup_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32145,7 +33919,7 @@ func (m *MonitorGroup_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32158,11 +33932,11 @@ func (m *MonitorGroup_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32181,7 +33955,7 @@ func (m *MonitorGroup_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32194,11 +33968,11 @@ func (m *MonitorGroup_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32210,15 +33984,15 @@ func (m *MonitorGroup_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32242,7 +34016,7 @@ func (m *DebugListGroups) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32265,15 +34039,15 @@ func (m *DebugListGroups) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32297,7 +34071,7 @@ func (m *DebugListGroups_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32320,15 +34094,15 @@ func (m *DebugListGroups_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32352,7 +34126,7 @@ func (m *DebugListGroups_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32380,7 +34154,7 @@ func (m *DebugListGroups_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32393,11 +34167,11 @@ func (m *DebugListGroups_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32414,7 +34188,7 @@ func (m *DebugListGroups_Reply) Unmarshal(dAtA []byte) error { m.GroupType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32433,7 +34207,7 @@ func (m *DebugListGroups_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32446,11 +34220,11 @@ func (m *DebugListGroups_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32462,15 +34236,15 @@ func (m *DebugListGroups_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32494,7 +34268,7 @@ func (m *DebugInspectGroupStore) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32517,15 +34291,15 @@ func (m *DebugInspectGroupStore) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32549,7 +34323,7 @@ func (m *DebugInspectGroupStore_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32577,7 +34351,7 @@ func (m *DebugInspectGroupStore_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32590,11 +34364,11 @@ func (m *DebugInspectGroupStore_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32611,7 +34385,7 @@ func (m *DebugInspectGroupStore_Request) Unmarshal(dAtA []byte) error { m.LogType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32625,15 +34399,15 @@ func (m *DebugInspectGroupStore_Request) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32657,7 +34431,7 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32685,7 +34459,7 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32698,11 +34472,11 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32719,7 +34493,7 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32732,11 +34506,11 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32751,7 +34525,7 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { m.MetadataEventType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32770,7 +34544,7 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32783,11 +34557,11 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32804,7 +34578,7 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32817,11 +34591,11 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32833,15 +34607,15 @@ func (m *DebugInspectGroupStore_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32865,7 +34639,7 @@ func (m *DebugGroup) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32888,15 +34662,15 @@ func (m *DebugGroup) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -32920,7 +34694,7 @@ func (m *DebugGroup_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32948,7 +34722,7 @@ func (m *DebugGroup_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -32961,11 +34735,11 @@ func (m *DebugGroup_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -32977,15 +34751,15 @@ func (m *DebugGroup_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33009,7 +34783,7 @@ func (m *DebugGroup_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33037,7 +34811,7 @@ func (m *DebugGroup_Reply) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33051,11 +34825,11 @@ func (m *DebugGroup_Reply) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33064,15 +34838,15 @@ func (m *DebugGroup_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33096,7 +34870,7 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33124,7 +34898,7 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33137,11 +34911,11 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33158,7 +34932,7 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33171,11 +34945,11 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33192,7 +34966,7 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33205,11 +34979,11 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33221,15 +34995,15 @@ func (m *ShareableContact) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33253,7 +35027,7 @@ func (m *ServiceTokenSupportedService) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33281,7 +35055,7 @@ func (m *ServiceTokenSupportedService) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33295,11 +35069,11 @@ func (m *ServiceTokenSupportedService) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33313,7 +35087,7 @@ func (m *ServiceTokenSupportedService) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33327,11 +35101,11 @@ func (m *ServiceTokenSupportedService) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33340,15 +35114,15 @@ func (m *ServiceTokenSupportedService) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33372,7 +35146,7 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33400,7 +35174,7 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33414,11 +35188,11 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33432,7 +35206,7 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33446,11 +35220,11 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33464,7 +35238,7 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33477,11 +35251,11 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33498,7 +35272,7 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { m.Expiration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33512,15 +35286,15 @@ func (m *ServiceToken) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33544,7 +35318,7 @@ func (m *AuthServiceCompleteFlow) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33567,15 +35341,15 @@ func (m *AuthServiceCompleteFlow) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33599,7 +35373,7 @@ func (m *AuthServiceCompleteFlow_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33627,7 +35401,7 @@ func (m *AuthServiceCompleteFlow_Request) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33641,11 +35415,11 @@ func (m *AuthServiceCompleteFlow_Request) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33654,15 +35428,15 @@ func (m *AuthServiceCompleteFlow_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33686,7 +35460,7 @@ func (m *AuthServiceCompleteFlow_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33709,15 +35483,15 @@ func (m *AuthServiceCompleteFlow_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33741,7 +35515,7 @@ func (m *AuthServiceInitFlow) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33764,15 +35538,15 @@ func (m *AuthServiceInitFlow) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33796,7 +35570,7 @@ func (m *AuthServiceInitFlow_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33824,7 +35598,7 @@ func (m *AuthServiceInitFlow_Request) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33838,11 +35612,11 @@ func (m *AuthServiceInitFlow_Request) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33851,15 +35625,15 @@ func (m *AuthServiceInitFlow_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33883,7 +35657,7 @@ func (m *AuthServiceInitFlow_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33911,7 +35685,7 @@ func (m *AuthServiceInitFlow_Reply) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33925,11 +35699,11 @@ func (m *AuthServiceInitFlow_Reply) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -33943,7 +35717,7 @@ func (m *AuthServiceInitFlow_Reply) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -33958,15 +35732,15 @@ func (m *AuthServiceInitFlow_Reply) Unmarshal(dAtA []byte) error { m.SecureURL = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -33990,7 +35764,7 @@ func (m *ServicesTokenList) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34013,15 +35787,15 @@ func (m *ServicesTokenList) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34045,7 +35819,7 @@ func (m *ServicesTokenList_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34068,15 +35842,15 @@ func (m *ServicesTokenList_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34100,7 +35874,7 @@ func (m *ServicesTokenList_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34128,7 +35902,7 @@ func (m *ServicesTokenList_Reply) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34142,11 +35916,11 @@ func (m *ServicesTokenList_Reply) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34160,7 +35934,7 @@ func (m *ServicesTokenList_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34173,11 +35947,11 @@ func (m *ServicesTokenList_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34191,15 +35965,15 @@ func (m *ServicesTokenList_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34223,7 +35997,7 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34251,7 +36025,7 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34265,11 +36039,11 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34283,7 +36057,7 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34297,11 +36071,11 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34315,7 +36089,7 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34329,11 +36103,11 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34342,15 +36116,15 @@ func (m *ServicesTokenCode) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34374,7 +36148,7 @@ func (m *ReplicationServiceRegisterGroup) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34397,15 +36171,15 @@ func (m *ReplicationServiceRegisterGroup) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34429,7 +36203,7 @@ func (m *ReplicationServiceRegisterGroup_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34457,7 +36231,7 @@ func (m *ReplicationServiceRegisterGroup_Request) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34471,11 +36245,11 @@ func (m *ReplicationServiceRegisterGroup_Request) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34489,7 +36263,7 @@ func (m *ReplicationServiceRegisterGroup_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34502,11 +36276,11 @@ func (m *ReplicationServiceRegisterGroup_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34518,15 +36292,15 @@ func (m *ReplicationServiceRegisterGroup_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34550,7 +36324,7 @@ func (m *ReplicationServiceRegisterGroup_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34573,15 +36347,15 @@ func (m *ReplicationServiceRegisterGroup_Reply) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34605,7 +36379,7 @@ func (m *ReplicationServiceReplicateGroup) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34628,15 +36402,15 @@ func (m *ReplicationServiceReplicateGroup) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34660,7 +36434,7 @@ func (m *ReplicationServiceReplicateGroup_Request) Unmarshal(dAtA []byte) error var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34688,7 +36462,7 @@ func (m *ReplicationServiceReplicateGroup_Request) Unmarshal(dAtA []byte) error var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34701,11 +36475,11 @@ func (m *ReplicationServiceReplicateGroup_Request) Unmarshal(dAtA []byte) error } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -34719,15 +36493,15 @@ func (m *ReplicationServiceReplicateGroup_Request) Unmarshal(dAtA []byte) error iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34751,7 +36525,7 @@ func (m *ReplicationServiceReplicateGroup_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34779,7 +36553,7 @@ func (m *ReplicationServiceReplicateGroup_Reply) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34794,15 +36568,15 @@ func (m *ReplicationServiceReplicateGroup_Reply) Unmarshal(dAtA []byte) error { m.OK = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34826,7 +36600,7 @@ func (m *SystemInfo) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34849,15 +36623,15 @@ func (m *SystemInfo) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34881,7 +36655,7 @@ func (m *SystemInfo_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34904,15 +36678,15 @@ func (m *SystemInfo_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -34936,7 +36710,7 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34964,7 +36738,7 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -34977,11 +36751,11 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35000,7 +36774,7 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35013,11 +36787,11 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35036,7 +36810,7 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35049,11 +36823,11 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35072,7 +36846,7 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35086,11 +36860,11 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35099,15 +36873,15 @@ func (m *SystemInfo_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -35131,7 +36905,7 @@ func (m *SystemInfo_OrbitDB) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35159,7 +36933,7 @@ func (m *SystemInfo_OrbitDB) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35172,11 +36946,11 @@ func (m *SystemInfo_OrbitDB) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35190,15 +36964,15 @@ func (m *SystemInfo_OrbitDB) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -35222,7 +36996,7 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35250,7 +37024,7 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Unmarshal(dAtA []byte) error { m.Progress = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35269,7 +37043,7 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Unmarshal(dAtA []byte) error { m.Maximum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35288,7 +37062,7 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Unmarshal(dAtA []byte) error { m.Buffered = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35307,7 +37081,7 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Unmarshal(dAtA []byte) error { m.Queued = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35321,15 +37095,15 @@ func (m *SystemInfo_OrbitDB_ReplicationStatus) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -35353,7 +37127,7 @@ func (m *SystemInfo_P2P) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35381,7 +37155,7 @@ func (m *SystemInfo_P2P) Unmarshal(dAtA []byte) error { m.ConnectedPeers = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35395,15 +37169,15 @@ func (m *SystemInfo_P2P) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -35427,7 +37201,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35455,7 +37229,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35469,11 +37243,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35487,7 +37261,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35501,11 +37275,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35519,7 +37293,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.UptimeMS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35538,7 +37312,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.UserCPUTimeMS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35557,7 +37331,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.SystemCPUTimeMS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35576,7 +37350,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.StartedAt = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35595,7 +37369,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.RlimitCur = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35614,7 +37388,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.NumGoroutine = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35633,7 +37407,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.Nofile = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35652,7 +37426,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35672,7 +37446,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.NumCPU = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35691,7 +37465,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35705,11 +37479,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35723,7 +37497,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35737,11 +37511,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35755,7 +37529,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35769,11 +37543,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35787,7 +37561,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35801,11 +37575,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35819,7 +37593,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.RlimitMax = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35838,7 +37612,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.PID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35857,7 +37631,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.PPID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35876,7 +37650,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.Priority = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35895,7 +37669,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { m.UID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35914,7 +37688,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35928,11 +37702,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35946,7 +37720,7 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -35960,11 +37734,11 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -35973,15 +37747,15 @@ func (m *SystemInfo_Process) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36005,7 +37779,7 @@ func (m *PeerList) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36028,15 +37802,15 @@ func (m *PeerList) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36060,7 +37834,7 @@ func (m *PeerList_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36083,15 +37857,15 @@ func (m *PeerList_Request) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36115,7 +37889,7 @@ func (m *PeerList_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36143,7 +37917,7 @@ func (m *PeerList_Reply) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36156,11 +37930,11 @@ func (m *PeerList_Reply) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36172,15 +37946,15 @@ func (m *PeerList_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36204,7 +37978,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36232,7 +38006,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36246,11 +38020,11 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36264,7 +38038,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36277,11 +38051,11 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36298,7 +38072,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36312,11 +38086,11 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36328,7 +38102,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var v PeerList_Feature for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36345,7 +38119,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36358,11 +38132,11 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36375,7 +38149,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var v PeerList_Feature for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36399,7 +38173,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { m.MinLatency = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36418,7 +38192,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36438,7 +38212,7 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { m.Direction = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36452,15 +38226,15 @@ func (m *PeerList_Peer) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36484,7 +38258,7 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36512,7 +38286,7 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36532,7 +38306,7 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36546,11 +38320,11 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36564,7 +38338,7 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { m.Direction = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36583,7 +38357,7 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { m.Latency = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36602,7 +38376,7 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36615,11 +38389,11 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36631,15 +38405,15 @@ func (m *PeerList_Route) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36663,7 +38437,7 @@ func (m *PeerList_Stream) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36691,7 +38465,7 @@ func (m *PeerList_Stream) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36705,11 +38479,11 @@ func (m *PeerList_Stream) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36718,15 +38492,15 @@ func (m *PeerList_Stream) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36750,7 +38524,7 @@ func (m *AttachmentPrepare) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36773,15 +38547,15 @@ func (m *AttachmentPrepare) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36805,7 +38579,7 @@ func (m *AttachmentPrepare_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36833,7 +38607,7 @@ func (m *AttachmentPrepare_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36846,11 +38620,11 @@ func (m *AttachmentPrepare_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36867,7 +38641,7 @@ func (m *AttachmentPrepare_Request) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36882,15 +38656,15 @@ func (m *AttachmentPrepare_Request) Unmarshal(dAtA []byte) error { m.DisableEncryption = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -36914,7 +38688,7 @@ func (m *AttachmentPrepare_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36942,7 +38716,7 @@ func (m *AttachmentPrepare_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -36955,11 +38729,11 @@ func (m *AttachmentPrepare_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -36971,15 +38745,15 @@ func (m *AttachmentPrepare_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -37003,7 +38777,7 @@ func (m *AttachmentRetrieve) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -37026,15 +38800,15 @@ func (m *AttachmentRetrieve) Unmarshal(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -37058,7 +38832,7 @@ func (m *AttachmentRetrieve_Request) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -37086,7 +38860,7 @@ func (m *AttachmentRetrieve_Request) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -37099,11 +38873,11 @@ func (m *AttachmentRetrieve_Request) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -37115,15 +38889,15 @@ func (m *AttachmentRetrieve_Request) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -37147,7 +38921,7 @@ func (m *AttachmentRetrieve_Reply) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -37175,7 +38949,7 @@ func (m *AttachmentRetrieve_Reply) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowBertytypes + return ErrIntOverflowProtocoltypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -37188,11 +38962,11 @@ func (m *AttachmentRetrieve_Reply) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -37204,15 +38978,15 @@ func (m *AttachmentRetrieve_Reply) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipBertytypes(dAtA[iNdEx:]) + skippy, err := skipProtocoltypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBertytypes + return ErrInvalidLengthProtocoltypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -37228,7 +39002,7 @@ func (m *AttachmentRetrieve_Reply) Unmarshal(dAtA []byte) error { return nil } -func skipBertytypes(dAtA []byte) (n int, err error) { +func skipProtocoltypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -37236,7 +39010,7 @@ func skipBertytypes(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowBertytypes + return 0, ErrIntOverflowProtocoltypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -37253,7 +39027,7 @@ func skipBertytypes(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowBertytypes + return 0, ErrIntOverflowProtocoltypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -37269,7 +39043,7 @@ func skipBertytypes(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowBertytypes + return 0, ErrIntOverflowProtocoltypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -37282,14 +39056,14 @@ func skipBertytypes(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthBertytypes + return 0, ErrInvalidLengthProtocoltypes } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupBertytypes + return 0, ErrUnexpectedEndOfGroupProtocoltypes } depth-- case 5: @@ -37298,7 +39072,7 @@ func skipBertytypes(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthBertytypes + return 0, ErrInvalidLengthProtocoltypes } if depth == 0 { return iNdEx, nil @@ -37308,7 +39082,7 @@ func skipBertytypes(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthBertytypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBertytypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupBertytypes = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthProtocoltypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProtocoltypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProtocoltypes = fmt.Errorf("proto: unexpected end of group") ) diff --git a/go/pkg/bertyprotocol/bertyprotocol.pb.gw.go b/go/pkg/protocoltypes/protocoltypes.pb.gw.go similarity index 97% rename from go/pkg/bertyprotocol/bertyprotocol.pb.gw.go rename to go/pkg/protocoltypes/protocoltypes.pb.gw.go index 859074089d..23e72eb6d5 100644 --- a/go/pkg/bertyprotocol/bertyprotocol.pb.gw.go +++ b/go/pkg/protocoltypes/protocoltypes.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: bertyprotocol.proto +// source: protocoltypes.proto /* -Package bertyprotocol is a reverse proxy. +Package protocoltypes is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package bertyprotocol +package protocoltypes import ( "context" @@ -22,8 +22,6 @@ import ( "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - - "berty.tech/berty/v2/go/pkg/bertytypes" ) // Suppress "imported and not used" errors @@ -38,7 +36,7 @@ var ( ) func request_ProtocolService_InstanceExportData_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_InstanceExportDataClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.InstanceExportData_Request + var protoReq InstanceExportData_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -62,7 +60,7 @@ func request_ProtocolService_InstanceExportData_0(ctx context.Context, marshaler } func request_ProtocolService_InstanceGetConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.InstanceGetConfiguration_Request + var protoReq InstanceGetConfiguration_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -78,7 +76,7 @@ func request_ProtocolService_InstanceGetConfiguration_0(ctx context.Context, mar } func local_request_ProtocolService_InstanceGetConfiguration_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.InstanceGetConfiguration_Request + var protoReq InstanceGetConfiguration_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -94,7 +92,7 @@ func local_request_ProtocolService_InstanceGetConfiguration_0(ctx context.Contex } func request_ProtocolService_ContactRequestReference_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestReference_Request + var protoReq ContactRequestReference_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -110,7 +108,7 @@ func request_ProtocolService_ContactRequestReference_0(ctx context.Context, mars } func local_request_ProtocolService_ContactRequestReference_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestReference_Request + var protoReq ContactRequestReference_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -126,7 +124,7 @@ func local_request_ProtocolService_ContactRequestReference_0(ctx context.Context } func request_ProtocolService_ContactRequestDisable_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestDisable_Request + var protoReq ContactRequestDisable_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -142,7 +140,7 @@ func request_ProtocolService_ContactRequestDisable_0(ctx context.Context, marsha } func local_request_ProtocolService_ContactRequestDisable_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestDisable_Request + var protoReq ContactRequestDisable_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -158,7 +156,7 @@ func local_request_ProtocolService_ContactRequestDisable_0(ctx context.Context, } func request_ProtocolService_ContactRequestEnable_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestEnable_Request + var protoReq ContactRequestEnable_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -174,7 +172,7 @@ func request_ProtocolService_ContactRequestEnable_0(ctx context.Context, marshal } func local_request_ProtocolService_ContactRequestEnable_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestEnable_Request + var protoReq ContactRequestEnable_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -190,7 +188,7 @@ func local_request_ProtocolService_ContactRequestEnable_0(ctx context.Context, m } func request_ProtocolService_ContactRequestResetReference_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestResetReference_Request + var protoReq ContactRequestResetReference_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -206,7 +204,7 @@ func request_ProtocolService_ContactRequestResetReference_0(ctx context.Context, } func local_request_ProtocolService_ContactRequestResetReference_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestResetReference_Request + var protoReq ContactRequestResetReference_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -222,7 +220,7 @@ func local_request_ProtocolService_ContactRequestResetReference_0(ctx context.Co } func request_ProtocolService_ContactRequestSend_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestSend_Request + var protoReq ContactRequestSend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -238,7 +236,7 @@ func request_ProtocolService_ContactRequestSend_0(ctx context.Context, marshaler } func local_request_ProtocolService_ContactRequestSend_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestSend_Request + var protoReq ContactRequestSend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -254,7 +252,7 @@ func local_request_ProtocolService_ContactRequestSend_0(ctx context.Context, mar } func request_ProtocolService_ContactRequestAccept_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestAccept_Request + var protoReq ContactRequestAccept_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -270,7 +268,7 @@ func request_ProtocolService_ContactRequestAccept_0(ctx context.Context, marshal } func local_request_ProtocolService_ContactRequestAccept_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestAccept_Request + var protoReq ContactRequestAccept_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -286,7 +284,7 @@ func local_request_ProtocolService_ContactRequestAccept_0(ctx context.Context, m } func request_ProtocolService_ContactRequestDiscard_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestDiscard_Request + var protoReq ContactRequestDiscard_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -302,7 +300,7 @@ func request_ProtocolService_ContactRequestDiscard_0(ctx context.Context, marsha } func local_request_ProtocolService_ContactRequestDiscard_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactRequestDiscard_Request + var protoReq ContactRequestDiscard_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -318,7 +316,7 @@ func local_request_ProtocolService_ContactRequestDiscard_0(ctx context.Context, } func request_ProtocolService_ContactBlock_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactBlock_Request + var protoReq ContactBlock_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -334,7 +332,7 @@ func request_ProtocolService_ContactBlock_0(ctx context.Context, marshaler runti } func local_request_ProtocolService_ContactBlock_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactBlock_Request + var protoReq ContactBlock_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -350,7 +348,7 @@ func local_request_ProtocolService_ContactBlock_0(ctx context.Context, marshaler } func request_ProtocolService_ContactUnblock_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactUnblock_Request + var protoReq ContactUnblock_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -366,7 +364,7 @@ func request_ProtocolService_ContactUnblock_0(ctx context.Context, marshaler run } func local_request_ProtocolService_ContactUnblock_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactUnblock_Request + var protoReq ContactUnblock_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -382,7 +380,7 @@ func local_request_ProtocolService_ContactUnblock_0(ctx context.Context, marshal } func request_ProtocolService_ContactAliasKeySend_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactAliasKeySend_Request + var protoReq ContactAliasKeySend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -398,7 +396,7 @@ func request_ProtocolService_ContactAliasKeySend_0(ctx context.Context, marshale } func local_request_ProtocolService_ContactAliasKeySend_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ContactAliasKeySend_Request + var protoReq ContactAliasKeySend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -414,7 +412,7 @@ func local_request_ProtocolService_ContactAliasKeySend_0(ctx context.Context, ma } func request_ProtocolService_MultiMemberGroupCreate_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupCreate_Request + var protoReq MultiMemberGroupCreate_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -430,7 +428,7 @@ func request_ProtocolService_MultiMemberGroupCreate_0(ctx context.Context, marsh } func local_request_ProtocolService_MultiMemberGroupCreate_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupCreate_Request + var protoReq MultiMemberGroupCreate_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -446,7 +444,7 @@ func local_request_ProtocolService_MultiMemberGroupCreate_0(ctx context.Context, } func request_ProtocolService_MultiMemberGroupJoin_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupJoin_Request + var protoReq MultiMemberGroupJoin_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -462,7 +460,7 @@ func request_ProtocolService_MultiMemberGroupJoin_0(ctx context.Context, marshal } func local_request_ProtocolService_MultiMemberGroupJoin_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupJoin_Request + var protoReq MultiMemberGroupJoin_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -478,7 +476,7 @@ func local_request_ProtocolService_MultiMemberGroupJoin_0(ctx context.Context, m } func request_ProtocolService_MultiMemberGroupLeave_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupLeave_Request + var protoReq MultiMemberGroupLeave_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -494,7 +492,7 @@ func request_ProtocolService_MultiMemberGroupLeave_0(ctx context.Context, marsha } func local_request_ProtocolService_MultiMemberGroupLeave_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupLeave_Request + var protoReq MultiMemberGroupLeave_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -510,7 +508,7 @@ func local_request_ProtocolService_MultiMemberGroupLeave_0(ctx context.Context, } func request_ProtocolService_MultiMemberGroupAliasResolverDisclose_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupAliasResolverDisclose_Request + var protoReq MultiMemberGroupAliasResolverDisclose_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -526,7 +524,7 @@ func request_ProtocolService_MultiMemberGroupAliasResolverDisclose_0(ctx context } func local_request_ProtocolService_MultiMemberGroupAliasResolverDisclose_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupAliasResolverDisclose_Request + var protoReq MultiMemberGroupAliasResolverDisclose_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -542,7 +540,7 @@ func local_request_ProtocolService_MultiMemberGroupAliasResolverDisclose_0(ctx c } func request_ProtocolService_MultiMemberGroupAdminRoleGrant_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupAdminRoleGrant_Request + var protoReq MultiMemberGroupAdminRoleGrant_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -558,7 +556,7 @@ func request_ProtocolService_MultiMemberGroupAdminRoleGrant_0(ctx context.Contex } func local_request_ProtocolService_MultiMemberGroupAdminRoleGrant_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupAdminRoleGrant_Request + var protoReq MultiMemberGroupAdminRoleGrant_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -574,7 +572,7 @@ func local_request_ProtocolService_MultiMemberGroupAdminRoleGrant_0(ctx context. } func request_ProtocolService_MultiMemberGroupInvitationCreate_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupInvitationCreate_Request + var protoReq MultiMemberGroupInvitationCreate_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -590,7 +588,7 @@ func request_ProtocolService_MultiMemberGroupInvitationCreate_0(ctx context.Cont } func local_request_ProtocolService_MultiMemberGroupInvitationCreate_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.MultiMemberGroupInvitationCreate_Request + var protoReq MultiMemberGroupInvitationCreate_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -606,7 +604,7 @@ func local_request_ProtocolService_MultiMemberGroupInvitationCreate_0(ctx contex } func request_ProtocolService_AppMetadataSend_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AppMetadataSend_Request + var protoReq AppMetadataSend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -622,7 +620,7 @@ func request_ProtocolService_AppMetadataSend_0(ctx context.Context, marshaler ru } func local_request_ProtocolService_AppMetadataSend_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AppMetadataSend_Request + var protoReq AppMetadataSend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -638,7 +636,7 @@ func local_request_ProtocolService_AppMetadataSend_0(ctx context.Context, marsha } func request_ProtocolService_AppMessageSend_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AppMessageSend_Request + var protoReq AppMessageSend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -654,7 +652,7 @@ func request_ProtocolService_AppMessageSend_0(ctx context.Context, marshaler run } func local_request_ProtocolService_AppMessageSend_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AppMessageSend_Request + var protoReq AppMessageSend_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -670,7 +668,7 @@ func local_request_ProtocolService_AppMessageSend_0(ctx context.Context, marshal } func request_ProtocolService_GroupMetadataList_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_GroupMetadataListClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.GroupMetadataList_Request + var protoReq GroupMetadataList_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -694,7 +692,7 @@ func request_ProtocolService_GroupMetadataList_0(ctx context.Context, marshaler } func request_ProtocolService_GroupMessageList_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_GroupMessageListClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.GroupMessageList_Request + var protoReq GroupMessageList_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -718,7 +716,7 @@ func request_ProtocolService_GroupMessageList_0(ctx context.Context, marshaler r } func request_ProtocolService_GroupInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.GroupInfo_Request + var protoReq GroupInfo_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -734,7 +732,7 @@ func request_ProtocolService_GroupInfo_0(ctx context.Context, marshaler runtime. } func local_request_ProtocolService_GroupInfo_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.GroupInfo_Request + var protoReq GroupInfo_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -750,7 +748,7 @@ func local_request_ProtocolService_GroupInfo_0(ctx context.Context, marshaler ru } func request_ProtocolService_ActivateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ActivateGroup_Request + var protoReq ActivateGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -766,7 +764,7 @@ func request_ProtocolService_ActivateGroup_0(ctx context.Context, marshaler runt } func local_request_ProtocolService_ActivateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ActivateGroup_Request + var protoReq ActivateGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -782,7 +780,7 @@ func local_request_ProtocolService_ActivateGroup_0(ctx context.Context, marshale } func request_ProtocolService_DeactivateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.DeactivateGroup_Request + var protoReq DeactivateGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -798,7 +796,7 @@ func request_ProtocolService_DeactivateGroup_0(ctx context.Context, marshaler ru } func local_request_ProtocolService_DeactivateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.DeactivateGroup_Request + var protoReq DeactivateGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -814,7 +812,7 @@ func local_request_ProtocolService_DeactivateGroup_0(ctx context.Context, marsha } func request_ProtocolService_MonitorGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_MonitorGroupClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.MonitorGroup_Request + var protoReq MonitorGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -838,7 +836,7 @@ func request_ProtocolService_MonitorGroup_0(ctx context.Context, marshaler runti } func request_ProtocolService_DebugListGroups_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_DebugListGroupsClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.DebugListGroups_Request + var protoReq DebugListGroups_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -862,7 +860,7 @@ func request_ProtocolService_DebugListGroups_0(ctx context.Context, marshaler ru } func request_ProtocolService_DebugInspectGroupStore_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_DebugInspectGroupStoreClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.DebugInspectGroupStore_Request + var protoReq DebugInspectGroupStore_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -886,7 +884,7 @@ func request_ProtocolService_DebugInspectGroupStore_0(ctx context.Context, marsh } func request_ProtocolService_DebugGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.DebugGroup_Request + var protoReq DebugGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -902,7 +900,7 @@ func request_ProtocolService_DebugGroup_0(ctx context.Context, marshaler runtime } func local_request_ProtocolService_DebugGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.DebugGroup_Request + var protoReq DebugGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -918,7 +916,7 @@ func local_request_ProtocolService_DebugGroup_0(ctx context.Context, marshaler r } func request_ProtocolService_SystemInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.SystemInfo_Request + var protoReq SystemInfo_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -934,7 +932,7 @@ func request_ProtocolService_SystemInfo_0(ctx context.Context, marshaler runtime } func local_request_ProtocolService_SystemInfo_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.SystemInfo_Request + var protoReq SystemInfo_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -950,7 +948,7 @@ func local_request_ProtocolService_SystemInfo_0(ctx context.Context, marshaler r } func request_ProtocolService_AuthServiceInitFlow_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AuthServiceInitFlow_Request + var protoReq AuthServiceInitFlow_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -966,7 +964,7 @@ func request_ProtocolService_AuthServiceInitFlow_0(ctx context.Context, marshale } func local_request_ProtocolService_AuthServiceInitFlow_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AuthServiceInitFlow_Request + var protoReq AuthServiceInitFlow_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -982,7 +980,7 @@ func local_request_ProtocolService_AuthServiceInitFlow_0(ctx context.Context, ma } func request_ProtocolService_AuthServiceCompleteFlow_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AuthServiceCompleteFlow_Request + var protoReq AuthServiceCompleteFlow_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -998,7 +996,7 @@ func request_ProtocolService_AuthServiceCompleteFlow_0(ctx context.Context, mars } func local_request_ProtocolService_AuthServiceCompleteFlow_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.AuthServiceCompleteFlow_Request + var protoReq AuthServiceCompleteFlow_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1014,7 +1012,7 @@ func local_request_ProtocolService_AuthServiceCompleteFlow_0(ctx context.Context } func request_ProtocolService_ServicesTokenList_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_ServicesTokenListClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.ServicesTokenList_Request + var protoReq ServicesTokenList_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1038,7 +1036,7 @@ func request_ProtocolService_ServicesTokenList_0(ctx context.Context, marshaler } func request_ProtocolService_ReplicationServiceRegisterGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ReplicationServiceRegisterGroup_Request + var protoReq ReplicationServiceRegisterGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1054,7 +1052,7 @@ func request_ProtocolService_ReplicationServiceRegisterGroup_0(ctx context.Conte } func local_request_ProtocolService_ReplicationServiceRegisterGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.ReplicationServiceRegisterGroup_Request + var protoReq ReplicationServiceRegisterGroup_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1070,7 +1068,7 @@ func local_request_ProtocolService_ReplicationServiceRegisterGroup_0(ctx context } func request_ProtocolService_PeerList_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.PeerList_Request + var protoReq PeerList_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1086,7 +1084,7 @@ func request_ProtocolService_PeerList_0(ctx context.Context, marshaler runtime.M } func local_request_ProtocolService_PeerList_0(ctx context.Context, marshaler runtime.Marshaler, server ProtocolServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq bertytypes.PeerList_Request + var protoReq PeerList_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1110,7 +1108,7 @@ func request_ProtocolService_AttachmentPrepare_0(ctx context.Context, marshaler } dec := marshaler.NewDecoder(req.Body) for { - var protoReq bertytypes.AttachmentPrepare_Request + var protoReq AttachmentPrepare_Request err = dec.Decode(&protoReq) if err == io.EOF { break @@ -1145,7 +1143,7 @@ func request_ProtocolService_AttachmentPrepare_0(ctx context.Context, marshaler } func request_ProtocolService_AttachmentRetrieve_0(ctx context.Context, marshaler runtime.Marshaler, client ProtocolServiceClient, req *http.Request, pathParams map[string]string) (ProtocolService_AttachmentRetrieveClient, runtime.ServerMetadata, error) { - var protoReq bertytypes.AttachmentRetrieve_Request + var protoReq AttachmentRetrieve_Request var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) diff --git a/js/.eslintrc.js b/js/.eslintrc.js index ea2cacc8f7..780cf955d7 100644 --- a/js/.eslintrc.js +++ b/js/.eslintrc.js @@ -5,7 +5,6 @@ module.exports = { plugins: ['@typescript-eslint'], rules: { semi: [2, 'never'], - 'no-unused-vars': 2, 'react-native/no-inline-styles': 0, 'jsx-quotes': [2, 'prefer-single'], 'no-shadow': 0, diff --git a/js/Makefile b/js/Makefile index 128501d1a5..8aacbf5c69 100644 --- a/js/Makefile +++ b/js/Makefile @@ -25,6 +25,8 @@ xcodegen_ver = $(shell cat ios/XcodeGen.version) required_java_ver = 18 minimum_ios_ver = 12.0 minimum_android_ver = 21 +go_libtor_ver = $(shell go list -mod=readonly -modfile=$(PWD)/../go.mod -f '{{.Version}}' -m berty.tech/go-libtor) +go_libtor_libs_ver = $(shell cat ios/tor-deps/version 2> /dev/null) ## if (PWD != Makefile directory) then exit @@ -107,6 +109,7 @@ endif rm -rf ios/build rm -rf ios/Pods rm -rf ios/Frameworks/Bertybridge.framework + rm -rf ios/tor-deps rm -rf ios/vendor rm -rf ios/Berty.xcodeproj rm -rf ios/Berty.xcworkspace @@ -118,6 +121,9 @@ endif @echo " rm -rf $(HOME)/.gradle/caches" @echo " rm -rf $(HOME)/Library/Developer/Xcode/DerivedData" @echo " rm -rf $(HOME)/Library/Caches/CocoaPods" + @echo " sudo rm -rf $(PWD)/ios/.gomobile-cache" + @echo " sudo rm -rf $(PWD)/android/.gomobile-cache" + .PHONY: gen.clean gen.clean: @@ -286,13 +292,13 @@ packages/api/root.pb.js: $(wildcard ../api/*) node_modules -t json-module \ -w es6 \ -o $@ \ - ../api/bertyaccount.proto ../api/bertyprotocol.proto ../api/bertymessenger.proto + ../api/bertyaccount.proto ../api/protocoltypes.proto ../api/messengertypes.proto packages/api/root.pb.d.ts: $(wildcard ../api/*) node_modules $(call check-program, npx) npx pbjs $(pbjs_common_flags) \ -t static-module \ - ../api/bertyaccount.proto ../api/bertyprotocol.proto ../api/bertymessenger.proto \ + ../api/bertyaccount.proto ../api/protocoltypes.proto ../api/messengertypes.proto \ | npx pbts --no-comments -o $@ - sed -E -i.bak 's/^.*constructor.*$$//g' $@ # json-module codegen doesn't support new rm -f $@.bak @@ -302,7 +308,12 @@ packages/grpc-bridge/welsh-clients.gen.ts: packages/grpc-bridge/gen-clients.js p npx babel-node packages/grpc-bridge/gen-clients.js > $@ npx eslint --no-ignore --fix $@ -_gen.pbjs: packages/api/root.pb.js packages/api/root.pb.d.ts packages/grpc-bridge/welsh-clients.gen.ts +packages/store/types.gen.ts: packages/store/gen-type-utils.js packages/api/root.pb.js node_modules + $(call check-program, npx) + npx babel-node packages/store/gen-type-utils.js > $@ + npx eslint --no-ignore --fix $@ + +_gen.pbjs: packages/api/root.pb.js packages/api/root.pb.d.ts packages/grpc-bridge/welsh-clients.gen.ts packages/store/types.gen.ts .PHONY: _gen.pbjs ##### other generation @@ -312,7 +323,7 @@ _gen.config: ##### gen.sum -gensum_src := Makefile ../api/bertyprotocol.proto ../api/bertymessenger.proto ../api/bertytypes.proto +gensum_src := Makefile ../api/protocoltypes.proto ../api/messengertypes.proto gen.sum: $(gensum_src) $(call check-program, shasum) @shasum $(gensum_src) | sort > gen.sum.tmp @@ -333,16 +344,44 @@ _write_gen_sum: ios/Frameworks/Bertybridge.framework: $(bridge_src) cd .. && go mod download cd .. && go run golang.org/x/mobile/cmd/gomobile init - mkdir -p "ios/Frameworks" - cd .. && GO111MODULE=on go run golang.org/x/mobile/cmd/gomobile bind \ - -o js/$@ \ - -v $(ext_ldflags) \ - -target ios \ - -iosversion $(minimum_ios_ver) \ - ./go/framework/bertybridge + # Download required go-libtor deps if needed + if [ "$(go_libtor_ver)" != "$(go_libtor_libs_ver)" ]; then \ + set -o pipefail; \ + mkdir -p ios/tor-deps $(TMP)/tor-deps/ios && \ + libs=$$(wget -O - "https://github.com/berty/go-libtor/releases/tag/$(go_libtor_ver)" 2> /dev/null \ + | grep -o 'ios-.*-universal\.tar\.gz' \ + | uniq) && \ + for lib in $$libs; do \ + wget "https://github.com/berty/go-libtor/releases/download/$(go_libtor_ver)/$$lib" -O "$(TMP)/tor-deps/ios/$$lib" && \ + tar xvf "$(TMP)/tor-deps/ios/$$lib" -C ios/tor-deps || exit 1; \ + done && \ + echo $(go_libtor_ver) > ios/tor-deps/version; \ + fi + mkdir -p ios/Frameworks + # TODO: uncomment this when Tor transport will be fixed + # cd .. && \ + # GO111MODULE=on \ + # LIBRARY_PATH="$(PWD)/ios/tor-deps/lib" \ + # CPATH="$(PWD)/ios/tor-deps/include" \ + # go run golang.org/x/mobile/cmd/gomobile bind \ + # -o js/$@ \ + # -v $(ext_ldflags) \ + # -cache "$(PWD)/ios/.gomobile-cache" \ + # -target ios \ + # -tags embedTor \ + # -iosversion $(minimum_ios_ver) \ + # ./go/framework/bertybridge + cd .. && \ + GO111MODULE=on go run golang.org/x/mobile/cmd/gomobile bind \ + -o js/$@ \ + -v $(ext_ldflags) \ + -cache "$(PWD)/ios/.gomobile-cache" \ + -target ios \ + -iosversion $(minimum_ios_ver) \ + ./go/framework/bertybridge touch $@ -ios/Berty.xcworkspace: $(pkg_desc) ios/Berty.xcodeproj ios/Podfile ios/vendor/bundle package.json +ios/Berty.xcworkspace: ios/Berty.xcodeproj ios/Podfile ios/vendor/bundle package.json ios/OpenSSL-Universal-Override.podspec $(call check-program, bundle) cd ios && bundle exec pod install touch $@ @@ -380,10 +419,11 @@ ios/vendor/bundle: ios/Gemfile android/libs/gobridge.aar: $(bridge_src) cd .. && go mod download cd .. && go run golang.org/x/mobile/cmd/gomobile init - mkdir -p "android/libs" + mkdir -p android/libs cd .. && GO111MODULE=on go run golang.org/x/mobile/cmd/gomobile bind \ -o js/$@ \ -v $(ext_ldflags) \ + -cache "$(PWD)/android/.gomobile-cache" \ -target android \ -androidapi $(minimum_android_ver) \ ./go/framework/bertybridge diff --git a/js/__mocks__/@react-native-community/async-storage.js b/js/__mocks__/@react-native-community/async-storage.js new file mode 100644 index 0000000000..1069f4b714 --- /dev/null +++ b/js/__mocks__/@react-native-community/async-storage.js @@ -0,0 +1,118 @@ +/** + * @format + */ + +const asMock = { + __INTERNAL_MOCK_STORAGE__: {}, + + setItem: jest.fn(async (key, value, callback) => { + const setResult = await asMock.multiSet([[key, value]], undefined) + + callback && callback(setResult) + return setResult + }), + + getItem: jest.fn(async (key, callback) => { + const getResult = await asMock.multiGet([key], undefined) + + const result = getResult[0] ? getResult[0][1] : null + + callback && callback(null, result) + return result + }), + + removeItem: jest.fn((key, callback) => asMock.multiRemove([key], callback)), + mergeItem: jest.fn((key, value, callback) => asMock.multiMerge([[key, value]], callback)), + + clear: jest.fn(_clear), + getAllKeys: jest.fn(_getAllKeys), + flushGetRequests: jest.fn(), + + multiGet: jest.fn(_multiGet), + multiSet: jest.fn(_multiSet), + multiRemove: jest.fn(_multiRemove), + multiMerge: jest.fn(_multiMerge), + useAsyncStorage: jest.fn((key) => { + return { + getItem: (...args) => asMock.getItem(key, ...args), + setItem: (...args) => asMock.setItem(key, ...args), + mergeItem: (...args) => asMock.mergeItem(key, ...args), + removeItem: (...args) => asMock.removeItem(key, ...args), + } + }), +} + +async function _multiSet(keyValuePairs, callback) { + keyValuePairs.forEach((keyValue) => { + const key = keyValue[0] + + asMock.__INTERNAL_MOCK_STORAGE__[key] = keyValue[1] + }) + callback && callback(null) + return null +} + +async function _multiGet(keys, callback) { + const values = keys.map((key) => [key, asMock.__INTERNAL_MOCK_STORAGE__[key] || null]) + callback && callback(null, values) + + return values +} + +async function _multiRemove(keys, callback) { + keys.forEach((key) => { + if (asMock.__INTERNAL_MOCK_STORAGE__[key]) { + delete asMock.__INTERNAL_MOCK_STORAGE__[key] + } + }) + + callback && callback(null) + return null +} + +async function _clear(callback) { + asMock.__INTERNAL_MOCK_STORAGE__ = {} + + callback && callback(null) + + return null +} + +async function _getAllKeys() { + return Object.keys(asMock.__INTERNAL_MOCK_STORAGE__) +} + +async function _multiMerge(keyValuePairs, callback) { + keyValuePairs.forEach((keyValue) => { + const key = keyValue[0] + const value = JSON.parse(keyValue[1]) + + const oldValue = JSON.parse(asMock.__INTERNAL_MOCK_STORAGE__[key]) + + asMock.__INTERNAL_MOCK_STORAGE__[key] = JSON.stringify(_deepMergeInto(oldValue, value)) + }) + + callback && callback(null) + return null +} + +const _isObject = (obj) => typeof obj === 'object' && !Array.isArray(obj) +const _deepMergeInto = (oldObject, newObject) => { + const newKeys = Object.keys(newObject) + const mergedObject = oldObject + + newKeys.forEach((key) => { + const oldValue = mergedObject[key] + const newValue = newObject[key] + + if (_isObject(oldValue) && _isObject(newValue)) { + mergedObject[key] = _deepMergeInto(oldValue, newValue) + } else { + mergedObject[key] = newValue + } + }) + + return mergedObject +} + +module.exports = asMock diff --git a/js/__mocks__/@react-native-community/audio-toolkit.js b/js/__mocks__/@react-native-community/audio-toolkit.js new file mode 100644 index 0000000000..480fa07fcb --- /dev/null +++ b/js/__mocks__/@react-native-community/audio-toolkit.js @@ -0,0 +1,17 @@ +export class Player { + prepare(cb) { + if (cb) { + cb() + } + } + play(cb) { + if (cb) { + cb() + } + } + seek(_, cb) { + if (cb) { + cb() + } + } +} diff --git a/js/__mocks__/@shakebugs/react-native-shake.js b/js/__mocks__/@shakebugs/react-native-shake.js new file mode 100644 index 0000000000..7448433635 --- /dev/null +++ b/js/__mocks__/@shakebugs/react-native-shake.js @@ -0,0 +1,3 @@ +export default { + start: jest.fn(() => {}), +} diff --git a/js/__mocks__/react-native-fs.js b/js/__mocks__/react-native-fs.js new file mode 100644 index 0000000000..3e65e0194f --- /dev/null +++ b/js/__mocks__/react-native-fs.js @@ -0,0 +1,43 @@ +export default { + mkdir: jest.fn(), + moveFile: jest.fn(), + copyFile: jest.fn(), + pathForBundle: jest.fn(), + pathForGroup: jest.fn(), + getFSInfo: jest.fn(), + getAllExternalFilesDirs: jest.fn(), + unlink: jest.fn(), + exists: jest.fn(), + stopDownload: jest.fn(), + resumeDownload: jest.fn(), + isResumable: jest.fn(), + stopUpload: jest.fn(), + completeHandlerIOS: jest.fn(), + readDir: jest.fn(), + readDirAssets: jest.fn(), + existsAssets: jest.fn(), + readdir: jest.fn(), + setReadable: jest.fn(), + stat: jest.fn(), + readFile: jest.fn(), + read: jest.fn(), + readFileAssets: jest.fn(), + hash: jest.fn(), + copyFileAssets: jest.fn(), + copyFileAssetsIOS: jest.fn(), + copyAssetsVideoIOS: jest.fn(), + writeFile: jest.fn(), + appendFile: jest.fn(), + write: jest.fn(), + downloadFile: jest.fn(), + uploadFiles: jest.fn(), + touch: jest.fn(), + MainBundlePath: jest.fn(), + CachesDirectoryPath: jest.fn(), + DocumentDirectoryPath: jest.fn(), + ExternalDirectoryPath: jest.fn(), + ExternalStorageDirectoryPath: jest.fn(), + TemporaryDirectoryPath: jest.fn(), + LibraryDirectoryPath: jest.fn(), + PicturesDirectoryPath: jest.fn(), +} diff --git a/js/__mocks__/react-native-gesture-handler.js b/js/__mocks__/react-native-gesture-handler.js new file mode 100644 index 0000000000..5e09755c2b --- /dev/null +++ b/js/__mocks__/react-native-gesture-handler.js @@ -0,0 +1,23 @@ +import { View, ScrollView } from 'react-native' + +export default { + ScrollView, + PanGestureHandler: View, + attachGestureHandler: () => {}, + createGestureHandler: () => {}, + dropGestureHandler: () => {}, + updateGestureHandler: () => {}, + Direction: { + RIGHT: 1, + LEFT: 2, + UP: 4, + DOWN: 8, + }, + State: { + BEGAN: 'BEGAN', + FAILED: 'FAILED', + ACTIVE: 'ACTIVE', + END: 'END', + UNDETERMINED: 'UNDETERMINED', + }, +} diff --git a/js/__mocks__/react-native-permissions.js b/js/__mocks__/react-native-permissions.js new file mode 100644 index 0000000000..aee9c6bf02 --- /dev/null +++ b/js/__mocks__/react-native-permissions.js @@ -0,0 +1,78 @@ +export const RESULTS = Object.freeze({ + UNAVAILABLE: 'unavailable', + BLOCKED: 'blocked', + DENIED: 'denied', + GRANTED: 'granted', + LIMITED: 'limited', +}) + +export const PERMISSIONS = Object.freeze({ + ANDROID: {}, + IOS: {}, + WINDOWS: {}, +}) + +export const openLimitedPhotoLibraryPicker = jest.fn(async () => {}) +export const openSettings = jest.fn(async () => {}) +export const check = jest.fn(async (permission) => RESULTS.GRANTED) +export const request = jest.fn(async (permission) => RESULTS.GRANTED) +export const checkLocationAccuracy = jest.fn(async () => 'full') +export const requestLocationAccuracy = jest.fn(async (options) => 'full') + +const notificationOptions = ['alert', 'badge', 'sound', 'carPlay', 'criticalAlert', 'provisional'] + +const notificationSettings = { + alert: true, + badge: true, + sound: true, + carPlay: true, + criticalAlert: true, + provisional: true, + lockScreen: true, + notificationCenter: true, +} + +export const checkNotifications = jest.fn(async () => ({ + status: RESULTS.GRANTED, + settings: notificationSettings, +})) + +export const requestNotifications = jest.fn(async (options) => ({ + status: RESULTS.GRANTED, + settings: options + .filter((option) => notificationOptions.includes(option)) + .reduce((acc, option) => ({ ...acc, [option]: true }), { + lockScreen: true, + notificationCenter: true, + }), +})) + +export const checkMultiple = jest.fn(async (permissions) => + permissions.reduce((acc, permission) => ({ + ...acc, + [permission]: RESULTS.GRANTED, + })), +) + +export const requestMultiple = jest.fn(async (permissions) => + permissions.reduce((acc, permission) => ({ + ...acc, + [permission]: RESULTS.GRANTED, + })), +) + +export default { + PERMISSIONS, + RESULTS, + + check, + checkLocationAccuracy, + checkMultiple, + checkNotifications, + openLimitedPhotoLibraryPicker, + openSettings, + request, + requestLocationAccuracy, + requestMultiple, + requestNotifications, +} diff --git a/js/__mocks__/react-native-reanimated.js b/js/__mocks__/react-native-reanimated.js new file mode 100644 index 0000000000..42b19edcda --- /dev/null +++ b/js/__mocks__/react-native-reanimated.js @@ -0,0 +1,230 @@ +/** + * Mock implementation for test runners. + * + * Example: + * + * ```js + * jest.mock('react-native-reanimated', () => require('react-native-reanimated/mock')); + * ``` + */ + +const React = require('react') +const { View, Text, Image, Animated, Platform, processColor } = require('react-native') + +function NOOP() {} + +function simulateCallbackFactory(...params) { + return (callback) => { + callback && + setTimeout(() => { + callback(...params) + }, 0) + } +} + +class Code extends React.Component { + render() { + return null + } +} + +const getValue = (node) => { + if (typeof node === 'number') { + return node + } + return (node && node[' __value']) || 0 +} + +class AnimatedValue { + constructor(val) { + this[' __value'] = val + } + + setValue(val) { + this[' __value'] = val + } + + interpolate() { + return this + } +} + +function createMockComponent(name) { + return class extends React.Component { + static displayName = name + + render() { + return this.props.children + } + } +} + +function createTransitioningComponent(Component) { + return class extends React.Component { + static displayName = `Transitioning.${Component.displayName || Component.name || 'Component'}` + + setNativeProps() {} + + animateNextTransition() {} + + render() { + return + } + } +} + +const Reanimated = { + SpringUtils: { + makeDefaultConfig: NOOP, + makeConfigFromBouncinessAndSpeed: NOOP, + makeConfigFromOrigamiTensionAndFriction: NOOP, + }, + + View, + Text, + Image, + ScrollView: Animated.ScrollView, + Code, + + Clock: NOOP, + Node: NOOP, + Value: AnimatedValue, + + EasingNode: { + linear: NOOP, + ease: NOOP, + quad: NOOP, + cubic: NOOP, + poly: () => NOOP, + sin: NOOP, + circle: NOOP, + exp: NOOP, + elastic: () => NOOP, + back: () => NOOP, + bounce: () => NOOP, + bezier: () => NOOP, + in: () => NOOP, + out: () => NOOP, + inOut: () => NOOP, + }, + + Extrapolate: { + EXTEND: 'extend', + CLAMP: 'clamp', + IDENTITY: 'identity', + }, + + processColor, + + add: (...vals) => new AnimatedValue(vals.map((v) => getValue(v)).reduce((acc, v) => acc + v)), + sub: (...vals) => new AnimatedValue(vals.map((v) => getValue(v)).reduce((acc, v) => acc - v)), + divide: (...vals) => new AnimatedValue(vals.map((v) => getValue(v)).reduce((acc, v) => acc / v)), + multiply: (...vals) => + new AnimatedValue(vals.map((v) => getValue(v)).reduce((acc, v) => acc * v)), + pow: (...vals) => new AnimatedValue(vals.map((v) => getValue(v)).reduce((acc, v) => acc ** v)), + modulo: (a, b) => new AnimatedValue(getValue(a) % getValue(b)), + sqrt: (a) => new AnimatedValue(Math.sqrt(getValue(a))), + log: (a) => new AnimatedValue(Math.log(getValue(a))), + sin: (a) => new AnimatedValue(Math.sin(getValue(a))), + cos: (a) => new AnimatedValue(Math.cos(getValue(a))), + tan: (a) => new AnimatedValue(Math.tan(getValue(a))), + acos: (a) => new AnimatedValue(Math.acos(getValue(a))), + asin: (a) => new AnimatedValue(Math.asin(getValue(a))), + atan: (a) => new AnimatedValue(Math.atan(getValue(a))), + exp: (a) => new AnimatedValue(Math.exp(getValue(a))), + round: (a) => new AnimatedValue(Math.round(getValue(a))), + floor: (a) => new AnimatedValue(Math.floor(getValue(a))), + ceil: (a) => new AnimatedValue(Math.ceil(getValue(a))), + lessThan: (a, b) => new AnimatedValue(getValue(a) < getValue(b)), + eq: (a, b) => new AnimatedValue(getValue(a) === getValue(b)), + greaterThan: (a, b) => new AnimatedValue(getValue(a) > getValue(b)), + lessOrEq: (a, b) => new AnimatedValue(getValue(a) <= getValue(b)), + greaterOrEq: (a, b) => new AnimatedValue(getValue(a) >= getValue(b)), + neq: (a, b) => new AnimatedValue(getValue(a) !== getValue(b)), + and: (a, b) => new AnimatedValue(getValue(a) && getValue(b)), + or: (a, b) => new AnimatedValue(getValue(a) || getValue(b)), + defined: (a) => new AnimatedValue(getValue(a) !== null && getValue(a) !== undefined), + not: (a) => new AnimatedValue(!getValue(a)), + set: (a, b) => { + a.setValue(getValue(b)) + return a + }, + concat: (a, b) => `${a}${b}`, + cond: (a, b, c) => { + if (getValue(a)) { + return b + } else { + return c + } + }, + block: (a) => a[a.length - 1], + call: () => {}, // fix for @react-navigation/stack + debug: NOOP, + onChange: NOOP, + startClock: NOOP, + stopClock: NOOP, + clockRunning: NOOP, + event: NOOP, + abs: (a) => Math.abs(getValue(a)), + acc: NOOP, + color: (r, g, b, a = 1) => { + const color = + 16777216 * Math.round(getValue(a) * 255) + + 65536 * getValue(r) + + 256 * getValue(g) + + getValue(b) + if (Platform.OS === 'android') { + // on Android color is represented as signed 32 bit int + if (color < (1 << 31) >>> 0) { + return new AnimatedValue(color) + } + return new AnimatedValue(color - 2 ** 32) + } + return new AnimatedValue(color) + }, + diff: NOOP, + diffClamp: NOOP, + interpolateNode: NOOP, + max: (a, b) => Math.max(getValue(a), getValue(b)), + min: (a, b) => Math.min(getValue(a), getValue(b)), + + decay: () => ({ + start: simulateCallbackFactory({ finished: true }), + stop: simulateCallbackFactory({ finished: true }), + }), + timing: () => ({ + start: simulateCallbackFactory({ finished: true }), + stop: simulateCallbackFactory({ finished: true }), + }), + spring: () => ({ + start: simulateCallbackFactory({ finished: true }), + stop: simulateCallbackFactory({ finished: true }), + }), + + proc: (cb) => cb, + + useCode: NOOP, + createAnimatedComponent: (Component) => Component, +} + +module.exports = { + __esModule: true, + + ...Reanimated, + + default: Reanimated, + + Transitioning: { + View: createTransitioningComponent(View), + }, + + Transition: { + Sequence: createMockComponent('Transition.Sequence'), + Together: createMockComponent('Transition.Together'), + In: createMockComponent('Transition.In'), + Out: createMockComponent('Transition.Out'), + Change: createMockComponent('Transition.Change'), + }, + + createTransitioningComponent, +} diff --git a/js/__mocks__/react-native-screens.js b/js/__mocks__/react-native-screens.js new file mode 100644 index 0000000000..4715ed922c --- /dev/null +++ b/js/__mocks__/react-native-screens.js @@ -0,0 +1,14 @@ +const View = require('react-native').View + +export const enableScreens = jest.fn() +export const ScreenContainer = View +export const Screen = View +export const NativeScreen = View +export const NativeScreenContainer = View +export const ScreenStack = View +export const ScreenStackHeaderConfig = View +export const ScreenStackHeaderSubview = View +export const ScreenStackHeaderRightView = View +export const ScreenStackHeaderLeftView = View +export const ScreenStackHeaderTitleView = View +export const ScreenStackHeaderCenterView = View diff --git a/js/__mocks__/react-native-share.js b/js/__mocks__/react-native-share.js new file mode 100644 index 0000000000..bbabe6d0d1 --- /dev/null +++ b/js/__mocks__/react-native-share.js @@ -0,0 +1 @@ +export default jest.fn() diff --git a/js/__mocks__/rn-fetch-blob.js b/js/__mocks__/rn-fetch-blob.js new file mode 100644 index 0000000000..a8846c80c9 --- /dev/null +++ b/js/__mocks__/rn-fetch-blob.js @@ -0,0 +1,19 @@ +export default { + DocumentDir: jest.fn(), + fetch: jest.fn(), + base64: jest.fn(), + android: jest.fn(), + ios: jest.fn(), + config: jest.fn(), + session: jest.fn(), + fs: { + dirs: { + MainBundleDir: jest.fn(), + CacheDir: jest.fn(), + DocumentDir: jest.fn(), + }, + }, + wrap: jest.fn(), + polyfill: jest.fn(), + JSONStream: jest.fn(), +} diff --git a/js/android/.gitignore b/js/android/.gitignore new file mode 100644 index 0000000000..698351ea10 --- /dev/null +++ b/js/android/.gitignore @@ -0,0 +1 @@ +.gomobile-cache diff --git a/js/android/app/src/main/AndroidManifest.xml b/js/android/app/src/main/AndroidManifest.xml index 6afced8acd..9fb14996eb 100644 --- a/js/android/app/src/main/AndroidManifest.xml +++ b/js/android/app/src/main/AndroidManifest.xml @@ -57,4 +57,4 @@ android:value="${SHAKE_API_SECRET}" /> - + \ No newline at end of file diff --git a/js/android/build.gradle b/js/android/build.gradle index 7f212190de..76217a0034 100644 --- a/js/android/build.gradle +++ b/js/android/build.gradle @@ -39,6 +39,23 @@ allprojects { } } + +// Upgrading compile SdkVersion and buildToolsVersion of subProjects +// Currently react-native-audiowaveform has below commented values +// compileSdkVersion 23 +// buildToolsVersion "23.0.1" + subprojects { + afterEvaluate { + project -> + if (project.hasProperty("android")) { + android { + compileSdkVersion = 29 + buildToolsVersion = "29.0.2" + } + } + } + } + task importEnvFile { def envFile = file("${rootDir.getPath()}/../.env") diff --git a/js/assetsTransformer.js b/js/assetsTransformer.js new file mode 100644 index 0000000000..65b0571e54 --- /dev/null +++ b/js/assetsTransformer.js @@ -0,0 +1,9 @@ +const path = require('path') + +module.exports = { + process(src, filename) { + return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';' + }, +} + +// see https://github.com/react-navigation/react-navigation/issues/8669 and https://github.com/facebook/jest/issues/2663#issuecomment-317109798 diff --git a/js/gen.sum b/js/gen.sum index cfb7b75fc2..f7dd38ca8b 100644 --- a/js/gen.sum +++ b/js/gen.sum @@ -1,4 +1,3 @@ -15bab772b80f15b5af4f7049de1e70e13f7b8b00 ../api/bertytypes.proto -35ebc74ab251dbb359ba0d04a3dafbcb99b10f67 ../api/bertyprotocol.proto -43349ede963d22483ee5d85bbb9ef1574881705f Makefile -b42d7028a61f2047e8dec016510707cc1b6f8a59 ../api/bertymessenger.proto +19efd0680cb3e7e33dbe397591f73f47f015db6d Makefile +7a9d57c3d1581693f3fc0040375d9ad1344629b8 ../api/messengertypes.proto +82be117c46950434fc992ba05d184101ab7029ca ../api/protocoltypes.proto diff --git a/js/global.d.ts b/js/global.d.ts index 0d0dd0c94d..e7100de96b 100644 --- a/js/global.d.ts +++ b/js/global.d.ts @@ -7,6 +7,7 @@ declare module '*.svg' { declare module 'react-native-in-app-notification' declare module 'react-native-jdenticon' +declare module 'react-native-audiowaveform' declare module 'google-palette' { const content: (type: string, count: number) => string[] diff --git a/js/ios/.gitignore b/js/ios/.gitignore index 9124a91f75..c4be3e77bf 100644 --- a/js/ios/.gitignore +++ b/js/ios/.gitignore @@ -4,3 +4,5 @@ Pods Info.plist Frameworks main.jsbundle +tor-deps +.gomobile-cache diff --git a/js/ios/OpenSSL-Universal-Override.podspec b/js/ios/OpenSSL-Universal-Override.podspec new file mode 100644 index 0000000000..5d2e59960f --- /dev/null +++ b/js/ios/OpenSSL-Universal-Override.podspec @@ -0,0 +1,39 @@ +Pod::Spec.new do |s| + s.name = "OpenSSL-Universal" + s.version = "1.0.2.20" + s.summary = "OpenSSL for iOS" + s.description = "OpenSSL is an SSL/TLS and Crypto toolkit. Supports iOS 64 bits archs including Simulator (arm64,armv64e,x86_64)." + s.homepage = "https://github.com/krzyzanowskim/OpenSSL" + s.license = { :type => 'OpenSSL (OpenSSL/SSLeay)' } + s.source = { :git => "https://github.com/krzyzanowskim/OpenSSL.git", :tag => "1.0.220" } + + s.authors = {'Mark J. Cox' => 'mark@openssl.org', + 'Ralf S. Engelschall' => 'rse@openssl.org', + 'Dr. Stephen Henson' => 'steve@openssl.org', + 'Ben Laurie' => 'ben@openssl.org', + 'Lutz Jänicke' => 'jaenicke@openssl.org', + 'Nils Larsch' => 'nils@openssl.org', + 'Richard Levitte' => 'nils@openssl.org', + 'Bodo Möller' => 'bodo@openssl.org', + 'Ulf Möller' => 'ulf@openssl.org', + 'Andy Polyakov' => 'appro@openssl.org', + 'Geoff Thorpe' => 'geoff@openssl.org', + 'Holger Reif' => 'holger@openssl.org', + 'Paul C. Sutton' => 'geoff@openssl.org', + 'Eric A. Young' => 'eay@cryptsoft.com', + 'Tim Hudson' => 'tjh@cryptsoft.com', + 'Justin Plouffe' => 'plouffe.justin@gmail.com'} + + s.requires_arc = false + s.default_subspec = 'Static' + s.ios.deployment_target = '12.0' + + s.subspec 'Static' do |sp| + sp.ios.deployment_target = '12.0' + sp.ios.source_files = 'tor-deps/include/openssl/**/*.h' + sp.ios.public_header_files = 'tor-deps/include/openssl/**/*.h' + sp.ios.header_dir = 'openssl' + sp.ios.preserve_paths = 'tor-deps/lib/libcrypto.a', 'ios/lib/libssl.a' + sp.ios.vendored_libraries = 'tor-deps/lib/libcrypto.a', 'ios/lib/libssl.a' + end +end diff --git a/js/ios/Podfile b/js/ios/Podfile index 4c9f5f86cb..d28d189424 100644 --- a/js/ios/Podfile +++ b/js/ios/Podfile @@ -8,14 +8,22 @@ target 'Berty' do use_react_native!(:path => config["reactNativePath"]) + # override OpenSSL-Universal with own openssl static lib + pod 'OpenSSL-Universal', :path => "./OpenSSL-Universal-Override.podspec" + # required custom import of permission handler - pod 'Permission-Camera', :path => "../node_modules/react-native-permissions/ios/Camera.podspec" + permissions_path = '../node_modules/react-native-permissions/ios' + pod 'Permission-Camera', :path => "#{permissions_path}/Camera" + pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary" + pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone" + # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable these next few lines. use_flipper! + post_install do |installer| flipper_post_install(installer) diff --git a/js/ios/Podfile.lock b/js/ios/Podfile.lock index 530fe0b165..2cd5223b19 100644 --- a/js/ios/Podfile.lock +++ b/js/ios/Podfile.lock @@ -5,14 +5,14 @@ PODS: - CocoaAsyncSocket (7.6.4) - CocoaLibEvent (1.0.0) - DoubleConversion (1.1.6) - - FBLazyVector (0.63.3) - - FBReactNativeSpec (0.63.3): + - FBLazyVector (0.63.4) + - FBReactNativeSpec (0.63.4): - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.3) - - RCTTypeSafety (= 0.63.3) - - React-Core (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) + - RCTRequired (= 0.63.4) + - RCTTypeSafety (= 0.63.4) + - React-Core (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) - Firebase/CoreOnly (7.1.0): - FirebaseCore (= 7.1.0) - Firebase/Crashlytics (7.1.0): @@ -113,178 +113,184 @@ PODS: - nanopb/encode (= 2.30906.0) - nanopb/decode (2.30906.0) - nanopb/encode (2.30906.0) + - OGReactNativeWaveform (2.0.5): + - React - OpenSSL-Universal (1.0.2.20): - OpenSSL-Universal/Static (= 1.0.2.20) - OpenSSL-Universal/Static (1.0.2.20) - - Permission-Camera (2.2.2): + - Permission-Camera (3.0.0): + - RNPermissions + - Permission-Microphone (3.0.0): + - RNPermissions + - Permission-PhotoLibrary (3.0.0): - RNPermissions - PromisesObjC (1.2.11) - - RCTRequired (0.63.3) - - RCTTypeSafety (0.63.3): - - FBLazyVector (= 0.63.3) + - RCTRequired (0.63.4) + - RCTTypeSafety (0.63.4): + - FBLazyVector (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTRequired (= 0.63.3) - - React-Core (= 0.63.3) - - React (0.63.3): - - React-Core (= 0.63.3) - - React-Core/DevSupport (= 0.63.3) - - React-Core/RCTWebSocket (= 0.63.3) - - React-RCTActionSheet (= 0.63.3) - - React-RCTAnimation (= 0.63.3) - - React-RCTBlob (= 0.63.3) - - React-RCTImage (= 0.63.3) - - React-RCTLinking (= 0.63.3) - - React-RCTNetwork (= 0.63.3) - - React-RCTSettings (= 0.63.3) - - React-RCTText (= 0.63.3) - - React-RCTVibration (= 0.63.3) - - React-callinvoker (0.63.3) - - React-Core (0.63.3): + - RCTRequired (= 0.63.4) + - React-Core (= 0.63.4) + - React (0.63.4): + - React-Core (= 0.63.4) + - React-Core/DevSupport (= 0.63.4) + - React-Core/RCTWebSocket (= 0.63.4) + - React-RCTActionSheet (= 0.63.4) + - React-RCTAnimation (= 0.63.4) + - React-RCTBlob (= 0.63.4) + - React-RCTImage (= 0.63.4) + - React-RCTLinking (= 0.63.4) + - React-RCTNetwork (= 0.63.4) + - React-RCTSettings (= 0.63.4) + - React-RCTText (= 0.63.4) + - React-RCTVibration (= 0.63.4) + - React-callinvoker (0.63.4) + - React-Core (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-Core/Default (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/CoreModulesHeaders (0.63.3): + - React-Core/CoreModulesHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/Default (0.63.3): + - React-Core/Default (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/DevSupport (0.63.3): + - React-Core/DevSupport (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.3) - - React-Core/RCTWebSocket (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) - - React-jsinspector (= 0.63.3) + - React-Core/Default (= 0.63.4) + - React-Core/RCTWebSocket (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) + - React-jsinspector (= 0.63.4) - Yoga - - React-Core/RCTActionSheetHeaders (0.63.3): + - React-Core/RCTActionSheetHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTAnimationHeaders (0.63.3): + - React-Core/RCTAnimationHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTBlobHeaders (0.63.3): + - React-Core/RCTBlobHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTImageHeaders (0.63.3): + - React-Core/RCTImageHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTLinkingHeaders (0.63.3): + - React-Core/RCTLinkingHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTNetworkHeaders (0.63.3): + - React-Core/RCTNetworkHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTSettingsHeaders (0.63.3): + - React-Core/RCTSettingsHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTTextHeaders (0.63.3): + - React-Core/RCTTextHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTVibrationHeaders (0.63.3): + - React-Core/RCTVibrationHeaders (0.63.4): - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-Core/RCTWebSocket (0.63.3): + - React-Core/RCTWebSocket (0.63.4): - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsiexecutor (= 0.63.3) + - React-Core/Default (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsiexecutor (= 0.63.4) - Yoga - - React-CoreModules (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - React-CoreModules (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/CoreModulesHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - React-RCTImage (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-cxxreact (0.63.3): + - RCTTypeSafety (= 0.63.4) + - React-Core/CoreModulesHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - React-RCTImage (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-cxxreact (0.63.4): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.3) - - React-jsinspector (= 0.63.3) - - React-jsi (0.63.3): + - React-callinvoker (= 0.63.4) + - React-jsinspector (= 0.63.4) + - React-jsi (0.63.4): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsi/Default (= 0.63.3) - - React-jsi/Default (0.63.3): + - React-jsi/Default (= 0.63.4) + - React-jsi/Default (0.63.4): - boost-for-react-native (= 1.63.0) - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-jsiexecutor (0.63.3): + - React-jsiexecutor (0.63.4): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) - - React-jsinspector (0.63.3) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) + - React-jsinspector (0.63.4) - react-native-blur (0.8.0): - React - react-native-camera (3.40.0): @@ -295,6 +301,8 @@ PODS: - React-Core - react-native-camera/RN (3.40.0): - React-Core + - react-native-cameraroll (4.0.1): + - React - react-native-document-picker (4.1.0): - React-Core - react-native-safe-area-context (3.1.9): @@ -302,68 +310,68 @@ PODS: - react-native-shake (10.0.4): - React - Shake (~> 10.0.0) - - react-native-webview (10.10.2): + - react-native-webview (11.0.0): - React-Core - - React-RCTActionSheet (0.63.3): - - React-Core/RCTActionSheetHeaders (= 0.63.3) - - React-RCTAnimation (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - React-RCTActionSheet (0.63.4): + - React-Core/RCTActionSheetHeaders (= 0.63.4) + - React-RCTAnimation (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTAnimationHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTBlob (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTAnimationHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTBlob (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - React-Core/RCTBlobHeaders (= 0.63.3) - - React-Core/RCTWebSocket (= 0.63.3) - - React-jsi (= 0.63.3) - - React-RCTNetwork (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTImage (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - React-Core/RCTBlobHeaders (= 0.63.4) + - React-Core/RCTWebSocket (= 0.63.4) + - React-jsi (= 0.63.4) + - React-RCTNetwork (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTImage (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTImageHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - React-RCTNetwork (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTLinking (0.63.3): - - FBReactNativeSpec (= 0.63.3) - - React-Core/RCTLinkingHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTNetwork (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTImageHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - React-RCTNetwork (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTLinking (0.63.4): + - FBReactNativeSpec (= 0.63.4) + - React-Core/RCTLinkingHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTNetwork (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTNetworkHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTSettings (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTNetworkHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTSettings (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - RCTTypeSafety (= 0.63.3) - - React-Core/RCTSettingsHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - React-RCTText (0.63.3): - - React-Core/RCTTextHeaders (= 0.63.3) - - React-RCTVibration (0.63.3): - - FBReactNativeSpec (= 0.63.3) + - RCTTypeSafety (= 0.63.4) + - React-Core/RCTSettingsHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - React-RCTText (0.63.4): + - React-Core/RCTTextHeaders (= 0.63.4) + - React-RCTVibration (0.63.4): + - FBReactNativeSpec (= 0.63.4) - Folly (= 2020.01.13.00) - - React-Core/RCTVibrationHeaders (= 0.63.3) - - React-jsi (= 0.63.3) - - ReactCommon/turbomodule/core (= 0.63.3) - - ReactCommon/turbomodule/core (0.63.3): + - React-Core/RCTVibrationHeaders (= 0.63.4) + - React-jsi (= 0.63.4) + - ReactCommon/turbomodule/core (= 0.63.4) + - ReactCommon/turbomodule/core (0.63.4): - DoubleConversion - Folly (= 2020.01.13.00) - glog - - React-callinvoker (= 0.63.3) - - React-Core (= 0.63.3) - - React-cxxreact (= 0.63.3) - - React-jsi (= 0.63.3) + - React-callinvoker (= 0.63.4) + - React-Core (= 0.63.4) + - React-cxxreact (= 0.63.4) + - React-jsi (= 0.63.4) - ReactNativeAudioToolkit (2.0.3): - React - rn-fetch-blob (0.12.0): @@ -372,17 +380,17 @@ PODS: - React-Core - RNCMaskedView (0.1.10): - React - - RNFBApp (10.0.0): + - RNFBApp (10.1.0): - Firebase/CoreOnly (~> 7.1.0) - React-Core - - RNFBCrashlytics (10.0.0): + - RNFBCrashlytics (10.1.1): - Firebase/Crashlytics (~> 7.1.0) - React-Core - RNFBApp - RNFS (2.16.6): - React - - RNGestureHandler (1.8.0): - - React + - RNGestureHandler (1.9.0): + - React-Core - RNImageCropPicker (0.35.1): - React-Core - React-RCTImage @@ -394,7 +402,7 @@ PODS: - TOCropViewController - RNInAppBrowser (3.5.1): - React-Core - - RNPermissions (2.2.2): + - RNPermissions (3.0.0): - React-Core - RNReanimated (1.13.2): - React-Core @@ -440,7 +448,11 @@ DEPENDENCIES: - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - Interactable (from `../node_modules/react-native-interactable`) - lottie-react-native (from `../node_modules/lottie-react-native`) - - Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera.podspec`) + - OGReactNativeWaveform (from `../node_modules/react-native-audiowaveform`) + - OpenSSL-Universal (from `./OpenSSL-Universal-Override.podspec`) + - Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera`) + - Permission-Microphone (from `../node_modules/react-native-permissions/ios/Microphone`) + - Permission-PhotoLibrary (from `../node_modules/react-native-permissions/ios/PhotoLibrary`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - React (from `../node_modules/react-native/`) @@ -455,6 +467,7 @@ DEPENDENCIES: - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - "react-native-blur (from `../node_modules/@react-native-community/blur`)" - react-native-camera (from `../node_modules/react-native-camera`) + - "react-native-cameraroll (from `../node_modules/@react-native-community/cameraroll`)" - react-native-document-picker (from `../node_modules/react-native-document-picker`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - "react-native-shake (from `../node_modules/@shakebugs/react-native-shake`)" @@ -508,7 +521,6 @@ SPEC REPOS: - GoogleUtilities - lottie-ios - nanopb - - OpenSSL-Universal - PromisesObjC - Shake - TOCropViewController @@ -531,8 +543,16 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-interactable" lottie-react-native: :path: "../node_modules/lottie-react-native" + OGReactNativeWaveform: + :path: "../node_modules/react-native-audiowaveform" + OpenSSL-Universal: + :path: "./OpenSSL-Universal-Override.podspec" Permission-Camera: - :path: "../node_modules/react-native-permissions/ios/Camera.podspec" + :path: "../node_modules/react-native-permissions/ios/Camera" + Permission-Microphone: + :path: "../node_modules/react-native-permissions/ios/Microphone" + Permission-PhotoLibrary: + :path: "../node_modules/react-native-permissions/ios/PhotoLibrary" RCTRequired: :path: "../node_modules/react-native/Libraries/RCTRequired" RCTTypeSafety: @@ -557,6 +577,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-community/blur" react-native-camera: :path: "../node_modules/react-native-camera" + react-native-cameraroll: + :path: "../node_modules/@react-native-community/cameraroll" react-native-document-picker: :path: "../node_modules/react-native-document-picker" react-native-safe-area-context: @@ -626,8 +648,8 @@ SPEC CHECKSUMS: CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: cde416483dac037923206447da6e1454df403714 - FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d - FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f + FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e + FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e Firebase: 78e8dd2e39d653de6270432ad84fe8b59f7bf4e8 FirebaseCore: 20046127eef0fcb8fa25df7fc12f7b97d4e48611 FirebaseCoreDiagnostics: 872cdb9b749b23346dddd5c1014d1babd2257de3 @@ -648,46 +670,50 @@ SPEC CHECKSUMS: lottie-ios: 3a3758ef5a008e762faec9c9d50a39842f26d124 lottie-react-native: 1fb4ce21d6ad37dab8343eaff8719df76035bd93 nanopb: 1bf24dd71191072e120b83dd02d08f3da0d65e53 - OpenSSL-Universal: ff34003318d5e1163e9529b08470708e389ffcdd - Permission-Camera: 5d2aaf95592660b6dcb5e8d1d90ed5d0156cad02 + OGReactNativeWaveform: f789fabadbf3904c7cba84d183405395861b8fed + OpenSSL-Universal: 853119ea7eda1a9a6b1971ce0a9aa8a93ecdbc71 + Permission-Camera: 119b01de97a5b3edb637999e38476b68143b9d17 + Permission-Microphone: e426a115ddf9591e8c30c55ea2b28572d4cbd07e + Permission-PhotoLibrary: cb9cdc1e3744e26ab404297a8e289d50c8ee27e8 PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f - RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047 - RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab - React: f36e90f3ceb976546e97df3403e37d226f79d0e3 - React-callinvoker: 18874f621eb96625df7a24a7dc8d6e07391affcd - React-Core: ac3d816b8e3493970153f4aaf0cff18af0bb95e6 - React-CoreModules: 4016d3a4e518bcfc4f5a51252b5a05692ca6f0e1 - React-cxxreact: ffc9129013b87cb36cf3f30a86695a3c397b0f99 - React-jsi: df07aa95b39c5be3e41199921509bfa929ed2b9d - React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451 - React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2 + RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e + RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b + React: b0a957a2c44da4113b0c4c9853d8387f8e64e615 + React-callinvoker: c3f44dd3cb195b6aa46621fff95ded79d59043fe + React-Core: d3b2a1ac9a2c13c3bcde712d9281fc1c8a5b315b + React-CoreModules: 0581ff36cb797da0943d424f69e7098e43e9be60 + React-cxxreact: c1480d4fda5720086c90df537ee7d285d4c57ac3 + React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31 + React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949 + React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c react-native-camera: 35854c4f764a4a6cf61c1c3525888b92f0fe4b31 + react-native-cameraroll: 60ba0068826eab1c8d43146191bafd4363ea58a7 react-native-document-picker: d870e0a41510b241d5b764e7a2b5ccf129af7967 react-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94 react-native-shake: 168b18d4656c9c90a787ecf41822f88be7b532ec - react-native-webview: 0aa2cde4ee7e3e1c5fffdf64dbce9c709aa18155 - React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa - React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2 - React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40 - React-RCTImage: d1756599ebd4dc2cb19d1682fe67c6b976658387 - React-RCTLinking: 9af0a51c6d6a4dd1674daadafffc6d03033a6d18 - React-RCTNetwork: 332c83929cc5eae0b3bbca4add1d668e1fc18bda - React-RCTSettings: d6953772cfd55f2c68ad72b7ef29efc7ec49f773 - React-RCTText: 65a6de06a7389098ce24340d1d3556015c38f746 - React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454 - ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3 + react-native-webview: 6b7950628616679d81bdd75747e50cf6de9b5a5f + React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336 + React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b + React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0 + React-RCTImage: c1b1f2d3f43a4a528c8946d6092384b5c880d2f0 + React-RCTLinking: 35ae4ab9dc0410d1fcbdce4d7623194a27214fb2 + React-RCTNetwork: 29ec2696f8d8cfff7331fac83d3e893c95ef43ae + React-RCTSettings: 60f0691bba2074ef394f95d4c2265ec284e0a46a + React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c + React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d + ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06 rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398 RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f - RNFBApp: dd793eec42bce8d09391bd95e42f2ed7511e7fef - RNFBCrashlytics: 2ff8548152020b4eeba1963f60bb5e35c3dcfc44 + RNFBApp: 2b4e07dfca4cf780b9e2d61bcc21e34d890cd654 + RNFBCrashlytics: 9f200124ba783adc1576e9833e9f27ae633f67fe RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df - RNGestureHandler: 7a5833d0f788dbd107fbb913e09aa0c1ff333c39 + RNGestureHandler: 9b7e605a741412e20e13c512738a31bd1611759b RNImageCropPicker: 16951bc02411f50c4d197488ed6406a23dc3b5f1 RNInAppBrowser: 48b95ba7a4eaff5cc223bca338d3e319561dbd1b - RNPermissions: 5df468064df661a4c8c017e2791ce90d7695eea5 + RNPermissions: 99dd8d4a30ff13509b949ca63cd1f69edc461775 RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad RNScreens: 2ad555d4d9fa10b91bb765ca07fe9b29d59573f0 RNShare: 106a76243ac90f43ddb9028dcb78ade406b8adff @@ -695,9 +721,9 @@ SPEC CHECKSUMS: RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 Shake: 5dbd59e3e3363cea29bef608cc14aa13b09f96fc TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe - Yoga: 7d13633d129fd179e01b8953d38d47be90db185a + Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: b8c53ce6d78625731c7197544089c7f2a5cf9933 +PODFILE CHECKSUM: 5abebcaa789f2ba8767f2b20f737ff4028997b2e -COCOAPODS: 1.9.3 +COCOAPODS: 1.9.1 diff --git a/js/ios/berty.yaml b/js/ios/berty.yaml index 0ebd40bb07..8c4b9807a9 100644 --- a/js/ios/berty.yaml +++ b/js/ios/berty.yaml @@ -153,6 +153,18 @@ targets: link: true - framework: ./Frameworks/Bertybridge.framework embed: false + - framework: ./tor-deps/lib/libz.a + embed: false + link: true + - framework: ./tor-deps/lib/libssl.a + embed: false + link: true + - framework: ./tor-deps/lib/libevent.a + embed: false + link: true + - framework: ./tor-deps/lib/libcrypto.a + embed: false + link: true preBuildScripts: - name: Copy GoogleService diff --git a/js/ios/info.yaml b/js/ios/info.yaml index 78c71416f7..421a9fc0a2 100644 --- a/js/ios/info.yaml +++ b/js/ios/info.yaml @@ -3,6 +3,7 @@ targets: info: path: Berty/Info.plist properties: + ITSAppUsesNonExemptEncryption: false BGTaskSchedulerPermittedIdentifiers: - tech.berty.ios.task.gobridge-process - tech.berty.ios.task.gobridge-refresh @@ -25,7 +26,7 @@ targets: NSBluetoothAlwaysUsageDescription: Used for Bluetooth communications NSBluetoothPeripheralUsageDescription: Used for Bluetooth communications NSBonjourServices: - - _berty-mc._tcp + - _berty-mc._tcp NSCameraUsageDescription: Used to scan QRCodes NSLocalNetworkUsageDescription: Used for proximity communications NSLocationWhenInUseUsageDescription: "" @@ -72,4 +73,4 @@ targets: - UIInterfaceOrientationLandscapeRight - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationPortraitUpsideDown - UIViewControllerBasedStatusBarAppearance: false + UIViewControllerBasedStatusBarAppearance: false \ No newline at end of file diff --git a/js/metro.config.js b/js/metro.config.js index ae891bdc47..1868f2caff 100644 --- a/js/metro.config.js +++ b/js/metro.config.js @@ -7,6 +7,7 @@ const defaultAssetExts = require('metro-config/src/defaults/defaults').assetExts const defaultSourceExts = require('metro-config/src/defaults/defaults').sourceExts +const exclusionList = require('metro-config/src/defaults/exclusionList') module.exports = { transformer: { @@ -22,5 +23,6 @@ module.exports = { extraNodeModules: require('node-libs-react-native'), assetExts: defaultAssetExts.filter((ext) => ext !== 'svg'), sourceExts: [...defaultSourceExts, 'svg'], + blacklistRE: exclusionList([/\.gomobile-cache\/.*/]), }, } diff --git a/js/package.json b/js/package.json index 76b267836b..2a678b09bd 100644 --- a/js/package.json +++ b/js/package.json @@ -1,111 +1,118 @@ { - "name": "@berty-tech/js", - "version": "0.0.1", - "private": true, - "scripts": { - "android": "react-native run-android", - "ios": "react-native run-ios", - "start": "react-native start", - "test": "jest", - "lint": "eslint . --ext .js,.jsx,.ts,.tsx" - }, - "dependencies": { - "@eva-design/eva": "^2.0.0", - "@improbable-eng/grpc-web": "^0.13.0", - "@react-native-community/async-storage": "^1.12.1", - "@react-native-community/audio-toolkit": "^2.0.3", - "@react-native-community/blur": "^3.6.0", - "@react-native-community/hooks": "^2.6.0", - "@react-native-community/masked-view": "^0.1.10", - "@react-native-firebase/app": "^10.0.0", - "@react-native-firebase/crashlytics": "^10.0.0", - "@react-navigation/material-top-tabs": "^5.3.9", - "@react-navigation/native": "^5.8.9", - "@react-navigation/stack": "^5.12.6", - "@shakebugs/react-native-shake": "^10.0.4", - "@ui-kitten/components": "^5.0.0", - "@ui-kitten/eva-icons": "^5.0.0", - "buffer": "^6.0.3", - "case": "^1.6.3", - "faker": "^5.1.0", - "google-palette": "^1.1.0", - "google-protobuf": "^3.14.0", - "i18next": "^19.8.4", - "lottie-react-native": "^3.5.0", - "mem": "^8.0.0", - "moment": "^2.29.1", - "node-libs-react-native": "^1.2.0", - "prop-types": "^15.7.2", - "protobufjs": "^6.10.2", - "react": "16.13.1", - "react-i18next": "^11.7.3", - "react-native": "0.63.3", - "react-native-camera": ">=1.0.2", - "react-native-document-picker": "^4.1.0", - "react-native-dropdown-picker": "^3.7.1", - "react-native-elements": "^2.3.2", - "react-native-fs": "^2.16.6", - "react-native-gesture-handler": "^1.8.0", - "react-native-hyperlink": "^0.0.19", - "react-native-image-crop-picker": "^0.35.1", - "react-native-in-app-notification": "^3.1.0", - "react-native-inappbrowser-reborn": "^3.5.1", - "react-native-interactable": "^2.0.1", - "react-native-jdenticon": "^0.0.3", - "react-native-linear-gradient": "^2.5.6", - "react-native-permissions": "^2.2.2", - "react-native-qrcode-scanner": "^1.4.1", - "react-native-qrcode-svg": "git+https://github.com/sakul-budhathoki/react-native-qrcode-svg.git#feature/circle-lines-qr-code", - "react-native-reanimated": "^1.13.2", - "react-native-safe-area-context": "^3.1.9", - "react-native-screens": "^2.15.0", - "react-native-share": "^4.1.0", - "react-native-svg": "^12.1.0", - "react-native-tab-view": ">= 2.0.0", - "react-native-vector-icons": "^7.1.0", - "react-native-webview": "^10.10.2", - "rn-fetch-blob": "^0.12.0", - "sha3": "^2.1.3" - }, - "devDependencies": { - "@babel/core": "^7.12.7", - "@babel/node": "^7.12.6", - "@babel/runtime": "^7.12.5", - "@react-native-community/eslint-config": "^2.0.0", - "@types/base64-js": "^1.3.0", - "@types/color": "^3.0.1", - "@types/jest": "^26.0.15", - "@types/lodash": "^4.14.165", - "@types/react-native": "^0.63.35", - "@types/react-native-share": "^3.3.0", - "@types/react-test-renderer": "^16.9.4", - "@typescript-eslint/eslint-plugin": "^4.8.1", - "@typescript-eslint/parser": "^4.8.1", - "babel-jest": "^26.6.3", - "babel-plugin-inline-react-svg": "^1.1.2", - "babel-plugin-module-resolver": "^4.0.0", - "eslint": "^7.14.0", - "jest": "^26.6.3", - "metro-config": "^0.64.0", - "metro-react-native-babel-preset": "^0.64.0", - "react-dev-utils": "^11.0.1", - "react-native-svg-transformer": "^0.14.3", - "react-test-renderer": "16.13.1", - "typescript": "^4.1.2" - }, - "jest": { - "preset": "react-native", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ], - "testPathIgnorePatterns": [ - "/node_modules/", - "/packages/web-dev-app/" - ] - } + "name": "@berty-tech/js", + "version": "0.0.1", + "private": true, + "scripts": { + "android": "react-native run-android", + "ios": "react-native run-ios", + "start": "react-native start", + "test": "jest", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx" + }, + "dependencies": { + "@eva-design/eva": "^2.0.0", + "@improbable-eng/grpc-web": "^0.13.0", + "@react-native-community/async-storage": "^1.12.1", + "@react-native-community/audio-toolkit": "git+https://github.com/react-native-audio-toolkit/react-native-audio-toolkit.git#6a258f1e6a81381a50c018d343764ad29b3d8f27", + "@react-native-community/blur": "^3.6.0", + "@react-native-community/cameraroll": "^4.0.1", + "@react-native-community/hooks": "^2.6.0", + "@react-native-community/masked-view": "^0.1.10", + "@react-native-firebase/app": "^10.0.1", + "@react-native-firebase/crashlytics": "^10.0.1", + "@react-navigation/material-top-tabs": "^5.3.9", + "@react-navigation/native": "^5.8.9", + "@react-navigation/stack": "^5.12.6", + "@shakebugs/react-native-shake": "^10.0.4", + "@ui-kitten/components": "^5.0.0", + "@ui-kitten/eva-icons": "^5.0.0", + "buffer": "^6.0.3", + "case": "^1.6.3", + "faker": "^5.1.0", + "google-palette": "^1.1.0", + "google-protobuf": "^3.14.0", + "i18next": "^19.8.4", + "lottie-react-native": "^3.5.0", + "mem": "^8.0.0", + "moment": "^2.29.1", + "node-libs-react-native": "^1.2.1", + "prop-types": "^15.7.2", + "protobufjs": "^6.10.2", + "react": "16.13.1", + "react-native-audiowaveform": "^2.0.5", + "react-i18next": "^11.7.4", + "react-native": "0.63.4", + "react-native-camera": ">=1.0.2", + "react-native-document-picker": "^4.1.0", + "react-native-dropdown-picker": "^3.7.1", + "react-native-elements": "^2.3.2", + "react-native-fs": "^2.16.6", + "react-native-gesture-handler": "^1.8.0", + "react-native-hyperlink": "^0.0.19", + "react-native-image-crop-picker": "^0.35.1", + "react-native-in-app-notification": "^3.1.0", + "react-native-inappbrowser-reborn": "^3.5.1", + "react-native-interactable": "^2.0.1", + "react-native-jdenticon": "^0.0.3", + "react-native-linear-gradient": "^2.5.6", + "react-native-permissions": "^3.0.0", + "react-native-qrcode-scanner": "^1.4.1", + "react-native-qrcode-svg": "git+https://github.com/sakul-budhathoki/react-native-qrcode-svg.git#feature/circle-lines-qr-code", + "react-native-reanimated": "^1.13.2", + "react-native-safe-area-context": "^3.1.9", + "react-native-screens": "^2.15.0", + "react-native-share": "^4.1.0", + "react-native-svg": "^12.1.0", + "react-native-tab-view": ">= 2.0.0", + "react-native-vector-icons": "^7.1.0", + "react-native-webview": "^11.0.0", + "rn-fetch-blob": "^0.12.0", + "sha3": "^2.1.3" + }, + "devDependencies": { + "@babel/core": "^7.12.9", + "@babel/node": "^7.12.6", + "@babel/runtime": "^7.12.5", + "@react-native-community/eslint-config": "^2.0.0", + "@types/base64-js": "^1.3.0", + "@types/color": "^3.0.1", + "@types/jest": "^26.0.16", + "@types/lodash": "^4.14.165", + "@types/react-native": "^0.63.35", + "@types/react-native-share": "^3.3.0", + "@types/react-test-renderer": "^16.9.4", + "@typescript-eslint/eslint-plugin": "4.9.0", + "@typescript-eslint/parser": "4.9.0", + "babel-jest": "^26.6.3", + "babel-plugin-inline-react-svg": "^1.1.2", + "babel-plugin-module-resolver": "^4.0.0", + "eslint": "^7.14.0", + "jest": "^26.6.3", + "metro-config": "^0.64.0", + "metro-react-native-babel-preset": "^0.64.0", + "react-dev-utils": "^11.0.1", + "react-native-svg-transformer": "^0.14.3", + "react-test-renderer": "16.13.1", + "typescript": "^4.1.2" + }, + "jest": { + "preset": "react-native", + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "jsx", + "json", + "node" + ], + "testPathIgnorePatterns": [ + "/node_modules/", + "/packages/web-dev-app/", + "/android/.gomobile-cache/" + ], + "moduleNameMapper": { + "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/assetsTransformer.js", + "\\.(css|less)$": "/assetsTransformer.js" + } + } } diff --git a/js/packages/api/index.d.ts b/js/packages/api/index.d.ts index 85ac50e784..126ff9d695 100644 --- a/js/packages/api/index.d.ts +++ b/js/packages/api/index.d.ts @@ -5,7 +5,6 @@ import pb from './root.pb' import account = pb.berty.account.v1 import messenger = pb.berty.messenger.v1 import protocol = pb.berty.protocol.v1 -import types = pb.berty.types.v1 import errcode = pb.berty.errcode -export { account, messenger, protocol, types, errcode } +export { account, messenger, protocol, errcode } diff --git a/js/packages/api/index.js b/js/packages/api/index.js index 4d49446283..5910cda8c6 100644 --- a/js/packages/api/index.js +++ b/js/packages/api/index.js @@ -4,6 +4,5 @@ export default { account: pb.lookup('berty.account.v1'), messenger: pb.lookup('.berty.messenger.v1'), protocol: pb.lookup('.berty.protocol.v1'), - types: pb.lookup('.berty.types.v1'), errcode: pb.lookup('.berty.errcode'), } diff --git a/js/packages/api/root.pb.d.ts b/js/packages/api/root.pb.d.ts index 4f0bb8e80d..99a3595d6e 100644 --- a/js/packages/api/root.pb.d.ts +++ b/js/packages/api/root.pb.d.ts @@ -969,6 +969,12 @@ export namespace berty { ErrDeserialization = 104, ErrStreamRead = 105, ErrStreamWrite = 106, + ErrStreamTransform = 110, + ErrStreamSendAndClose = 111, + ErrStreamHeaderWrite = 112, + ErrStreamHeaderRead = 115, + ErrStreamSink = 113, + ErrStreamCloseAndRecv = 114, ErrMissingMapKey = 107, ErrDBWrite = 108, ErrDBRead = 109, @@ -1025,6 +1031,7 @@ export namespace berty { ErrBridgeInterrupted = 1600, ErrBridgeNotRunning = 1601, ErrMessengerInvalidDeepLink = 2000, + ErrMessengerDeepLinkRequiresPassphrase = 2001, ErrDBEntryAlreadyExists = 2100, ErrDBAddConversation = 2101, ErrDBAddContactRequestOutgoingSent = 2102, @@ -1035,8 +1042,8 @@ export namespace berty { ErrDBMultipleRecords = 2107, ErrReplayProcessGroupMetadata = 2200, ErrReplayProcessGroupMessage = 2201, - ErrPrepareAttachment = 2300, - ErrRetrieveAttachment = 2301, + ErrAttachmentPrepare = 2300, + ErrAttachmentRetrieve = 2301, ErrProtocolSend = 2302, ErrCLINoTermcaps = 3001, ErrServicesAuth = 4000, @@ -1097,164 +1104,158 @@ export namespace berty { class ProtocolService extends $protobuf.rpc.Service { public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ProtocolService; - public instanceExportData(request: berty.types.v1.InstanceExportData.IRequest, callback: berty.protocol.v1.ProtocolService.InstanceExportDataCallback): void; - public instanceExportData(request: berty.types.v1.InstanceExportData.IRequest): Promise; - public instanceGetConfiguration(request: berty.types.v1.InstanceGetConfiguration.IRequest, callback: berty.protocol.v1.ProtocolService.InstanceGetConfigurationCallback): void; - public instanceGetConfiguration(request: berty.types.v1.InstanceGetConfiguration.IRequest): Promise; - public contactRequestReference(request: berty.types.v1.ContactRequestReference.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestReferenceCallback): void; - public contactRequestReference(request: berty.types.v1.ContactRequestReference.IRequest): Promise; - public contactRequestDisable(request: berty.types.v1.ContactRequestDisable.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestDisableCallback): void; - public contactRequestDisable(request: berty.types.v1.ContactRequestDisable.IRequest): Promise; - public contactRequestEnable(request: berty.types.v1.ContactRequestEnable.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestEnableCallback): void; - public contactRequestEnable(request: berty.types.v1.ContactRequestEnable.IRequest): Promise; - public contactRequestResetReference(request: berty.types.v1.ContactRequestResetReference.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestResetReferenceCallback): void; - public contactRequestResetReference(request: berty.types.v1.ContactRequestResetReference.IRequest): Promise; - public contactRequestSend(request: berty.types.v1.ContactRequestSend.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestSendCallback): void; - public contactRequestSend(request: berty.types.v1.ContactRequestSend.IRequest): Promise; - public contactRequestAccept(request: berty.types.v1.ContactRequestAccept.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestAcceptCallback): void; - public contactRequestAccept(request: berty.types.v1.ContactRequestAccept.IRequest): Promise; - public contactRequestDiscard(request: berty.types.v1.ContactRequestDiscard.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestDiscardCallback): void; - public contactRequestDiscard(request: berty.types.v1.ContactRequestDiscard.IRequest): Promise; - public contactBlock(request: berty.types.v1.ContactBlock.IRequest, callback: berty.protocol.v1.ProtocolService.ContactBlockCallback): void; - public contactBlock(request: berty.types.v1.ContactBlock.IRequest): Promise; - public contactUnblock(request: berty.types.v1.ContactUnblock.IRequest, callback: berty.protocol.v1.ProtocolService.ContactUnblockCallback): void; - public contactUnblock(request: berty.types.v1.ContactUnblock.IRequest): Promise; - public contactAliasKeySend(request: berty.types.v1.ContactAliasKeySend.IRequest, callback: berty.protocol.v1.ProtocolService.ContactAliasKeySendCallback): void; - public contactAliasKeySend(request: berty.types.v1.ContactAliasKeySend.IRequest): Promise; - public multiMemberGroupCreate(request: berty.types.v1.MultiMemberGroupCreate.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupCreateCallback): void; - public multiMemberGroupCreate(request: berty.types.v1.MultiMemberGroupCreate.IRequest): Promise; - public multiMemberGroupJoin(request: berty.types.v1.MultiMemberGroupJoin.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupJoinCallback): void; - public multiMemberGroupJoin(request: berty.types.v1.MultiMemberGroupJoin.IRequest): Promise; - public multiMemberGroupLeave(request: berty.types.v1.MultiMemberGroupLeave.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupLeaveCallback): void; - public multiMemberGroupLeave(request: berty.types.v1.MultiMemberGroupLeave.IRequest): Promise; - public multiMemberGroupAliasResolverDisclose(request: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupAliasResolverDiscloseCallback): void; - public multiMemberGroupAliasResolverDisclose(request: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IRequest): Promise; - public multiMemberGroupAdminRoleGrant(request: berty.types.v1.MultiMemberGroupAdminRoleGrant.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupAdminRoleGrantCallback): void; - public multiMemberGroupAdminRoleGrant(request: berty.types.v1.MultiMemberGroupAdminRoleGrant.IRequest): Promise; - public multiMemberGroupInvitationCreate(request: berty.types.v1.MultiMemberGroupInvitationCreate.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupInvitationCreateCallback): void; - public multiMemberGroupInvitationCreate(request: berty.types.v1.MultiMemberGroupInvitationCreate.IRequest): Promise; - public appMetadataSend(request: berty.types.v1.AppMetadataSend.IRequest, callback: berty.protocol.v1.ProtocolService.AppMetadataSendCallback): void; - public appMetadataSend(request: berty.types.v1.AppMetadataSend.IRequest): Promise; - public appMessageSend(request: berty.types.v1.AppMessageSend.IRequest, callback: berty.protocol.v1.ProtocolService.AppMessageSendCallback): void; - public appMessageSend(request: berty.types.v1.AppMessageSend.IRequest): Promise; - public groupMetadataList(request: berty.types.v1.GroupMetadataList.IRequest, callback: berty.protocol.v1.ProtocolService.GroupMetadataListCallback): void; - public groupMetadataList(request: berty.types.v1.GroupMetadataList.IRequest): Promise; - public groupMessageList(request: berty.types.v1.GroupMessageList.IRequest, callback: berty.protocol.v1.ProtocolService.GroupMessageListCallback): void; - public groupMessageList(request: berty.types.v1.GroupMessageList.IRequest): Promise; - public groupInfo(request: berty.types.v1.GroupInfo.IRequest, callback: berty.protocol.v1.ProtocolService.GroupInfoCallback): void; - public groupInfo(request: berty.types.v1.GroupInfo.IRequest): Promise; - public activateGroup(request: berty.types.v1.ActivateGroup.IRequest, callback: berty.protocol.v1.ProtocolService.ActivateGroupCallback): void; - public activateGroup(request: berty.types.v1.ActivateGroup.IRequest): Promise; - public deactivateGroup(request: berty.types.v1.DeactivateGroup.IRequest, callback: berty.protocol.v1.ProtocolService.DeactivateGroupCallback): void; - public deactivateGroup(request: berty.types.v1.DeactivateGroup.IRequest): Promise; - public monitorGroup(request: berty.types.v1.MonitorGroup.IRequest, callback: berty.protocol.v1.ProtocolService.MonitorGroupCallback): void; - public monitorGroup(request: berty.types.v1.MonitorGroup.IRequest): Promise; - public debugListGroups(request: berty.types.v1.DebugListGroups.IRequest, callback: berty.protocol.v1.ProtocolService.DebugListGroupsCallback): void; - public debugListGroups(request: berty.types.v1.DebugListGroups.IRequest): Promise; - public debugInspectGroupStore(request: berty.types.v1.DebugInspectGroupStore.IRequest, callback: berty.protocol.v1.ProtocolService.DebugInspectGroupStoreCallback): void; - public debugInspectGroupStore(request: berty.types.v1.DebugInspectGroupStore.IRequest): Promise; - public debugGroup(request: berty.types.v1.DebugGroup.IRequest, callback: berty.protocol.v1.ProtocolService.DebugGroupCallback): void; - public debugGroup(request: berty.types.v1.DebugGroup.IRequest): Promise; - public systemInfo(request: berty.types.v1.SystemInfo.IRequest, callback: berty.protocol.v1.ProtocolService.SystemInfoCallback): void; - public systemInfo(request: berty.types.v1.SystemInfo.IRequest): Promise; - public authServiceInitFlow(request: berty.types.v1.AuthServiceInitFlow.IRequest, callback: berty.protocol.v1.ProtocolService.AuthServiceInitFlowCallback): void; - public authServiceInitFlow(request: berty.types.v1.AuthServiceInitFlow.IRequest): Promise; - public authServiceCompleteFlow(request: berty.types.v1.AuthServiceCompleteFlow.IRequest, callback: berty.protocol.v1.ProtocolService.AuthServiceCompleteFlowCallback): void; - public authServiceCompleteFlow(request: berty.types.v1.AuthServiceCompleteFlow.IRequest): Promise; - public servicesTokenList(request: berty.types.v1.ServicesTokenList.IRequest, callback: berty.protocol.v1.ProtocolService.ServicesTokenListCallback): void; - public servicesTokenList(request: berty.types.v1.ServicesTokenList.IRequest): Promise; - public replicationServiceRegisterGroup(request: berty.types.v1.ReplicationServiceRegisterGroup.IRequest, callback: berty.protocol.v1.ProtocolService.ReplicationServiceRegisterGroupCallback): void; - public replicationServiceRegisterGroup(request: berty.types.v1.ReplicationServiceRegisterGroup.IRequest): Promise; - public peerList(request: berty.types.v1.PeerList.IRequest, callback: berty.protocol.v1.ProtocolService.PeerListCallback): void; - public peerList(request: berty.types.v1.PeerList.IRequest): Promise; - public attachmentPrepare(request: berty.types.v1.AttachmentPrepare.IRequest, callback: berty.protocol.v1.ProtocolService.AttachmentPrepareCallback): void; - public attachmentPrepare(request: berty.types.v1.AttachmentPrepare.IRequest): Promise; - public attachmentRetrieve(request: berty.types.v1.AttachmentRetrieve.IRequest, callback: berty.protocol.v1.ProtocolService.AttachmentRetrieveCallback): void; - public attachmentRetrieve(request: berty.types.v1.AttachmentRetrieve.IRequest): Promise; + public instanceExportData(request: berty.protocol.v1.InstanceExportData.IRequest, callback: berty.protocol.v1.ProtocolService.InstanceExportDataCallback): void; + public instanceExportData(request: berty.protocol.v1.InstanceExportData.IRequest): Promise; + public instanceGetConfiguration(request: berty.protocol.v1.InstanceGetConfiguration.IRequest, callback: berty.protocol.v1.ProtocolService.InstanceGetConfigurationCallback): void; + public instanceGetConfiguration(request: berty.protocol.v1.InstanceGetConfiguration.IRequest): Promise; + public contactRequestReference(request: berty.protocol.v1.ContactRequestReference.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestReferenceCallback): void; + public contactRequestReference(request: berty.protocol.v1.ContactRequestReference.IRequest): Promise; + public contactRequestDisable(request: berty.protocol.v1.ContactRequestDisable.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestDisableCallback): void; + public contactRequestDisable(request: berty.protocol.v1.ContactRequestDisable.IRequest): Promise; + public contactRequestEnable(request: berty.protocol.v1.ContactRequestEnable.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestEnableCallback): void; + public contactRequestEnable(request: berty.protocol.v1.ContactRequestEnable.IRequest): Promise; + public contactRequestResetReference(request: berty.protocol.v1.ContactRequestResetReference.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestResetReferenceCallback): void; + public contactRequestResetReference(request: berty.protocol.v1.ContactRequestResetReference.IRequest): Promise; + public contactRequestSend(request: berty.protocol.v1.ContactRequestSend.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestSendCallback): void; + public contactRequestSend(request: berty.protocol.v1.ContactRequestSend.IRequest): Promise; + public contactRequestAccept(request: berty.protocol.v1.ContactRequestAccept.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestAcceptCallback): void; + public contactRequestAccept(request: berty.protocol.v1.ContactRequestAccept.IRequest): Promise; + public contactRequestDiscard(request: berty.protocol.v1.ContactRequestDiscard.IRequest, callback: berty.protocol.v1.ProtocolService.ContactRequestDiscardCallback): void; + public contactRequestDiscard(request: berty.protocol.v1.ContactRequestDiscard.IRequest): Promise; + public contactBlock(request: berty.protocol.v1.ContactBlock.IRequest, callback: berty.protocol.v1.ProtocolService.ContactBlockCallback): void; + public contactBlock(request: berty.protocol.v1.ContactBlock.IRequest): Promise; + public contactUnblock(request: berty.protocol.v1.ContactUnblock.IRequest, callback: berty.protocol.v1.ProtocolService.ContactUnblockCallback): void; + public contactUnblock(request: berty.protocol.v1.ContactUnblock.IRequest): Promise; + public contactAliasKeySend(request: berty.protocol.v1.ContactAliasKeySend.IRequest, callback: berty.protocol.v1.ProtocolService.ContactAliasKeySendCallback): void; + public contactAliasKeySend(request: berty.protocol.v1.ContactAliasKeySend.IRequest): Promise; + public multiMemberGroupCreate(request: berty.protocol.v1.MultiMemberGroupCreate.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupCreateCallback): void; + public multiMemberGroupCreate(request: berty.protocol.v1.MultiMemberGroupCreate.IRequest): Promise; + public multiMemberGroupJoin(request: berty.protocol.v1.MultiMemberGroupJoin.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupJoinCallback): void; + public multiMemberGroupJoin(request: berty.protocol.v1.MultiMemberGroupJoin.IRequest): Promise; + public multiMemberGroupLeave(request: berty.protocol.v1.MultiMemberGroupLeave.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupLeaveCallback): void; + public multiMemberGroupLeave(request: berty.protocol.v1.MultiMemberGroupLeave.IRequest): Promise; + public multiMemberGroupAliasResolverDisclose(request: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupAliasResolverDiscloseCallback): void; + public multiMemberGroupAliasResolverDisclose(request: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IRequest): Promise; + public multiMemberGroupAdminRoleGrant(request: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupAdminRoleGrantCallback): void; + public multiMemberGroupAdminRoleGrant(request: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IRequest): Promise; + public multiMemberGroupInvitationCreate(request: berty.protocol.v1.MultiMemberGroupInvitationCreate.IRequest, callback: berty.protocol.v1.ProtocolService.MultiMemberGroupInvitationCreateCallback): void; + public multiMemberGroupInvitationCreate(request: berty.protocol.v1.MultiMemberGroupInvitationCreate.IRequest): Promise; + public appMetadataSend(request: berty.protocol.v1.AppMetadataSend.IRequest, callback: berty.protocol.v1.ProtocolService.AppMetadataSendCallback): void; + public appMetadataSend(request: berty.protocol.v1.AppMetadataSend.IRequest): Promise; + public appMessageSend(request: berty.protocol.v1.AppMessageSend.IRequest, callback: berty.protocol.v1.ProtocolService.AppMessageSendCallback): void; + public appMessageSend(request: berty.protocol.v1.AppMessageSend.IRequest): Promise; + public groupMetadataList(request: berty.protocol.v1.GroupMetadataList.IRequest, callback: berty.protocol.v1.ProtocolService.GroupMetadataListCallback): void; + public groupMetadataList(request: berty.protocol.v1.GroupMetadataList.IRequest): Promise; + public groupMessageList(request: berty.protocol.v1.GroupMessageList.IRequest, callback: berty.protocol.v1.ProtocolService.GroupMessageListCallback): void; + public groupMessageList(request: berty.protocol.v1.GroupMessageList.IRequest): Promise; + public groupInfo(request: berty.protocol.v1.GroupInfo.IRequest, callback: berty.protocol.v1.ProtocolService.GroupInfoCallback): void; + public groupInfo(request: berty.protocol.v1.GroupInfo.IRequest): Promise; + public activateGroup(request: berty.protocol.v1.ActivateGroup.IRequest, callback: berty.protocol.v1.ProtocolService.ActivateGroupCallback): void; + public activateGroup(request: berty.protocol.v1.ActivateGroup.IRequest): Promise; + public deactivateGroup(request: berty.protocol.v1.DeactivateGroup.IRequest, callback: berty.protocol.v1.ProtocolService.DeactivateGroupCallback): void; + public deactivateGroup(request: berty.protocol.v1.DeactivateGroup.IRequest): Promise; + public monitorGroup(request: berty.protocol.v1.MonitorGroup.IRequest, callback: berty.protocol.v1.ProtocolService.MonitorGroupCallback): void; + public monitorGroup(request: berty.protocol.v1.MonitorGroup.IRequest): Promise; + public debugListGroups(request: berty.protocol.v1.DebugListGroups.IRequest, callback: berty.protocol.v1.ProtocolService.DebugListGroupsCallback): void; + public debugListGroups(request: berty.protocol.v1.DebugListGroups.IRequest): Promise; + public debugInspectGroupStore(request: berty.protocol.v1.DebugInspectGroupStore.IRequest, callback: berty.protocol.v1.ProtocolService.DebugInspectGroupStoreCallback): void; + public debugInspectGroupStore(request: berty.protocol.v1.DebugInspectGroupStore.IRequest): Promise; + public debugGroup(request: berty.protocol.v1.DebugGroup.IRequest, callback: berty.protocol.v1.ProtocolService.DebugGroupCallback): void; + public debugGroup(request: berty.protocol.v1.DebugGroup.IRequest): Promise; + public systemInfo(request: berty.protocol.v1.SystemInfo.IRequest, callback: berty.protocol.v1.ProtocolService.SystemInfoCallback): void; + public systemInfo(request: berty.protocol.v1.SystemInfo.IRequest): Promise; + public authServiceInitFlow(request: berty.protocol.v1.AuthServiceInitFlow.IRequest, callback: berty.protocol.v1.ProtocolService.AuthServiceInitFlowCallback): void; + public authServiceInitFlow(request: berty.protocol.v1.AuthServiceInitFlow.IRequest): Promise; + public authServiceCompleteFlow(request: berty.protocol.v1.AuthServiceCompleteFlow.IRequest, callback: berty.protocol.v1.ProtocolService.AuthServiceCompleteFlowCallback): void; + public authServiceCompleteFlow(request: berty.protocol.v1.AuthServiceCompleteFlow.IRequest): Promise; + public servicesTokenList(request: berty.protocol.v1.ServicesTokenList.IRequest, callback: berty.protocol.v1.ProtocolService.ServicesTokenListCallback): void; + public servicesTokenList(request: berty.protocol.v1.ServicesTokenList.IRequest): Promise; + public replicationServiceRegisterGroup(request: berty.protocol.v1.ReplicationServiceRegisterGroup.IRequest, callback: berty.protocol.v1.ProtocolService.ReplicationServiceRegisterGroupCallback): void; + public replicationServiceRegisterGroup(request: berty.protocol.v1.ReplicationServiceRegisterGroup.IRequest): Promise; + public peerList(request: berty.protocol.v1.PeerList.IRequest, callback: berty.protocol.v1.ProtocolService.PeerListCallback): void; + public peerList(request: berty.protocol.v1.PeerList.IRequest): Promise; + public attachmentPrepare(request: berty.protocol.v1.AttachmentPrepare.IRequest, callback: berty.protocol.v1.ProtocolService.AttachmentPrepareCallback): void; + public attachmentPrepare(request: berty.protocol.v1.AttachmentPrepare.IRequest): Promise; + public attachmentRetrieve(request: berty.protocol.v1.AttachmentRetrieve.IRequest, callback: berty.protocol.v1.ProtocolService.AttachmentRetrieveCallback): void; + public attachmentRetrieve(request: berty.protocol.v1.AttachmentRetrieve.IRequest): Promise; } namespace ProtocolService { - type InstanceExportDataCallback = (error: (Error|null), response?: berty.types.v1.InstanceExportData.Reply) => void; + type InstanceExportDataCallback = (error: (Error|null), response?: berty.protocol.v1.InstanceExportData.Reply) => void; - type InstanceGetConfigurationCallback = (error: (Error|null), response?: berty.types.v1.InstanceGetConfiguration.Reply) => void; + type InstanceGetConfigurationCallback = (error: (Error|null), response?: berty.protocol.v1.InstanceGetConfiguration.Reply) => void; - type ContactRequestReferenceCallback = (error: (Error|null), response?: berty.types.v1.ContactRequestReference.Reply) => void; + type ContactRequestReferenceCallback = (error: (Error|null), response?: berty.protocol.v1.ContactRequestReference.Reply) => void; - type ContactRequestDisableCallback = (error: (Error|null), response?: berty.types.v1.ContactRequestDisable.Reply) => void; + type ContactRequestDisableCallback = (error: (Error|null), response?: berty.protocol.v1.ContactRequestDisable.Reply) => void; - type ContactRequestEnableCallback = (error: (Error|null), response?: berty.types.v1.ContactRequestEnable.Reply) => void; + type ContactRequestEnableCallback = (error: (Error|null), response?: berty.protocol.v1.ContactRequestEnable.Reply) => void; - type ContactRequestResetReferenceCallback = (error: (Error|null), response?: berty.types.v1.ContactRequestResetReference.Reply) => void; + type ContactRequestResetReferenceCallback = (error: (Error|null), response?: berty.protocol.v1.ContactRequestResetReference.Reply) => void; - type ContactRequestSendCallback = (error: (Error|null), response?: berty.types.v1.ContactRequestSend.Reply) => void; + type ContactRequestSendCallback = (error: (Error|null), response?: berty.protocol.v1.ContactRequestSend.Reply) => void; - type ContactRequestAcceptCallback = (error: (Error|null), response?: berty.types.v1.ContactRequestAccept.Reply) => void; + type ContactRequestAcceptCallback = (error: (Error|null), response?: berty.protocol.v1.ContactRequestAccept.Reply) => void; - type ContactRequestDiscardCallback = (error: (Error|null), response?: berty.types.v1.ContactRequestDiscard.Reply) => void; + type ContactRequestDiscardCallback = (error: (Error|null), response?: berty.protocol.v1.ContactRequestDiscard.Reply) => void; - type ContactBlockCallback = (error: (Error|null), response?: berty.types.v1.ContactBlock.Reply) => void; + type ContactBlockCallback = (error: (Error|null), response?: berty.protocol.v1.ContactBlock.Reply) => void; - type ContactUnblockCallback = (error: (Error|null), response?: berty.types.v1.ContactUnblock.Reply) => void; + type ContactUnblockCallback = (error: (Error|null), response?: berty.protocol.v1.ContactUnblock.Reply) => void; - type ContactAliasKeySendCallback = (error: (Error|null), response?: berty.types.v1.ContactAliasKeySend.Reply) => void; + type ContactAliasKeySendCallback = (error: (Error|null), response?: berty.protocol.v1.ContactAliasKeySend.Reply) => void; - type MultiMemberGroupCreateCallback = (error: (Error|null), response?: berty.types.v1.MultiMemberGroupCreate.Reply) => void; + type MultiMemberGroupCreateCallback = (error: (Error|null), response?: berty.protocol.v1.MultiMemberGroupCreate.Reply) => void; - type MultiMemberGroupJoinCallback = (error: (Error|null), response?: berty.types.v1.MultiMemberGroupJoin.Reply) => void; + type MultiMemberGroupJoinCallback = (error: (Error|null), response?: berty.protocol.v1.MultiMemberGroupJoin.Reply) => void; - type MultiMemberGroupLeaveCallback = (error: (Error|null), response?: berty.types.v1.MultiMemberGroupLeave.Reply) => void; + type MultiMemberGroupLeaveCallback = (error: (Error|null), response?: berty.protocol.v1.MultiMemberGroupLeave.Reply) => void; - type MultiMemberGroupAliasResolverDiscloseCallback = (error: (Error|null), response?: berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply) => void; + type MultiMemberGroupAliasResolverDiscloseCallback = (error: (Error|null), response?: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply) => void; - type MultiMemberGroupAdminRoleGrantCallback = (error: (Error|null), response?: berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply) => void; + type MultiMemberGroupAdminRoleGrantCallback = (error: (Error|null), response?: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply) => void; - type MultiMemberGroupInvitationCreateCallback = (error: (Error|null), response?: berty.types.v1.MultiMemberGroupInvitationCreate.Reply) => void; + type MultiMemberGroupInvitationCreateCallback = (error: (Error|null), response?: berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply) => void; - type AppMetadataSendCallback = (error: (Error|null), response?: berty.types.v1.AppMetadataSend.Reply) => void; + type AppMetadataSendCallback = (error: (Error|null), response?: berty.protocol.v1.AppMetadataSend.Reply) => void; - type AppMessageSendCallback = (error: (Error|null), response?: berty.types.v1.AppMessageSend.Reply) => void; + type AppMessageSendCallback = (error: (Error|null), response?: berty.protocol.v1.AppMessageSend.Reply) => void; - type GroupMetadataListCallback = (error: (Error|null), response?: berty.types.v1.GroupMetadataEvent) => void; + type GroupMetadataListCallback = (error: (Error|null), response?: berty.protocol.v1.GroupMetadataEvent) => void; - type GroupMessageListCallback = (error: (Error|null), response?: berty.types.v1.GroupMessageEvent) => void; + type GroupMessageListCallback = (error: (Error|null), response?: berty.protocol.v1.GroupMessageEvent) => void; - type GroupInfoCallback = (error: (Error|null), response?: berty.types.v1.GroupInfo.Reply) => void; + type GroupInfoCallback = (error: (Error|null), response?: berty.protocol.v1.GroupInfo.Reply) => void; - type ActivateGroupCallback = (error: (Error|null), response?: berty.types.v1.ActivateGroup.Reply) => void; + type ActivateGroupCallback = (error: (Error|null), response?: berty.protocol.v1.ActivateGroup.Reply) => void; - type DeactivateGroupCallback = (error: (Error|null), response?: berty.types.v1.DeactivateGroup.Reply) => void; + type DeactivateGroupCallback = (error: (Error|null), response?: berty.protocol.v1.DeactivateGroup.Reply) => void; - type MonitorGroupCallback = (error: (Error|null), response?: berty.types.v1.MonitorGroup.Reply) => void; + type MonitorGroupCallback = (error: (Error|null), response?: berty.protocol.v1.MonitorGroup.Reply) => void; - type DebugListGroupsCallback = (error: (Error|null), response?: berty.types.v1.DebugListGroups.Reply) => void; + type DebugListGroupsCallback = (error: (Error|null), response?: berty.protocol.v1.DebugListGroups.Reply) => void; - type DebugInspectGroupStoreCallback = (error: (Error|null), response?: berty.types.v1.DebugInspectGroupStore.Reply) => void; + type DebugInspectGroupStoreCallback = (error: (Error|null), response?: berty.protocol.v1.DebugInspectGroupStore.Reply) => void; - type DebugGroupCallback = (error: (Error|null), response?: berty.types.v1.DebugGroup.Reply) => void; + type DebugGroupCallback = (error: (Error|null), response?: berty.protocol.v1.DebugGroup.Reply) => void; - type SystemInfoCallback = (error: (Error|null), response?: berty.types.v1.SystemInfo.Reply) => void; + type SystemInfoCallback = (error: (Error|null), response?: berty.protocol.v1.SystemInfo.Reply) => void; - type AuthServiceInitFlowCallback = (error: (Error|null), response?: berty.types.v1.AuthServiceInitFlow.Reply) => void; + type AuthServiceInitFlowCallback = (error: (Error|null), response?: berty.protocol.v1.AuthServiceInitFlow.Reply) => void; - type AuthServiceCompleteFlowCallback = (error: (Error|null), response?: berty.types.v1.AuthServiceCompleteFlow.Reply) => void; + type AuthServiceCompleteFlowCallback = (error: (Error|null), response?: berty.protocol.v1.AuthServiceCompleteFlow.Reply) => void; - type ServicesTokenListCallback = (error: (Error|null), response?: berty.types.v1.ServicesTokenList.Reply) => void; + type ServicesTokenListCallback = (error: (Error|null), response?: berty.protocol.v1.ServicesTokenList.Reply) => void; - type ReplicationServiceRegisterGroupCallback = (error: (Error|null), response?: berty.types.v1.ReplicationServiceRegisterGroup.Reply) => void; + type ReplicationServiceRegisterGroupCallback = (error: (Error|null), response?: berty.protocol.v1.ReplicationServiceRegisterGroup.Reply) => void; - type PeerListCallback = (error: (Error|null), response?: berty.types.v1.PeerList.Reply) => void; + type PeerListCallback = (error: (Error|null), response?: berty.protocol.v1.PeerList.Reply) => void; - type AttachmentPrepareCallback = (error: (Error|null), response?: berty.types.v1.AttachmentPrepare.Reply) => void; + type AttachmentPrepareCallback = (error: (Error|null), response?: berty.protocol.v1.AttachmentPrepare.Reply) => void; - type AttachmentRetrieveCallback = (error: (Error|null), response?: berty.types.v1.AttachmentRetrieve.Reply) => void; + type AttachmentRetrieveCallback = (error: (Error|null), response?: berty.protocol.v1.AttachmentRetrieve.Reply) => void; } - } - } - - namespace types { - - namespace v1 { enum GroupType { GroupTypeUndefined = 0, @@ -1290,7 +1291,7 @@ export namespace berty { } interface IAccount { - group?: (berty.types.v1.IGroup|null); + group?: (berty.protocol.v1.IGroup|null); accountPrivateKey?: (Uint8Array|null); aliasPrivateKey?: (Uint8Array|null); publicRendezvousSeed?: (Uint8Array|null); @@ -1298,18 +1299,18 @@ export namespace berty { class Account implements IAccount { - public group?: (berty.types.v1.IGroup|null); + public group?: (berty.protocol.v1.IGroup|null); public accountPrivateKey: Uint8Array; public aliasPrivateKey: Uint8Array; public publicRendezvousSeed: Uint8Array; - public static create(properties?: berty.types.v1.IAccount): berty.types.v1.Account; - public static encode(message: berty.types.v1.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.Account; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.Account; + public static create(properties?: berty.protocol.v1.IAccount): berty.protocol.v1.Account; + public static encode(message: berty.protocol.v1.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.Account; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.Account; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.Account; - public static toObject(message: berty.types.v1.Account, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.Account; + public static toObject(message: berty.protocol.v1.Account, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1317,7 +1318,7 @@ export namespace berty { publicKey?: (Uint8Array|null); secret?: (Uint8Array|null); secretSig?: (Uint8Array|null); - groupType?: (berty.types.v1.GroupType|null); + groupType?: (berty.protocol.v1.GroupType|null); signPub?: (Uint8Array|null); } @@ -1326,16 +1327,16 @@ export namespace berty { public publicKey: Uint8Array; public secret: Uint8Array; public secretSig: Uint8Array; - public groupType: berty.types.v1.GroupType; + public groupType: berty.protocol.v1.GroupType; public signPub: Uint8Array; - public static create(properties?: berty.types.v1.IGroup): berty.types.v1.Group; - public static encode(message: berty.types.v1.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.Group; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.Group; + public static create(properties?: berty.protocol.v1.IGroup): berty.protocol.v1.Group; + public static encode(message: berty.protocol.v1.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.Group; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.Group; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.Group; - public static toObject(message: berty.types.v1.Group, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.Group; + public static toObject(message: berty.protocol.v1.Group, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1352,38 +1353,38 @@ export namespace berty { public signPub: Uint8Array; public metadataHeadsCids: Uint8Array[]; public messagesHeadsCids: Uint8Array[]; - public static create(properties?: berty.types.v1.IGroupHeadsExport): berty.types.v1.GroupHeadsExport; - public static encode(message: berty.types.v1.IGroupHeadsExport, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupHeadsExport, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupHeadsExport; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupHeadsExport; + public static create(properties?: berty.protocol.v1.IGroupHeadsExport): berty.protocol.v1.GroupHeadsExport; + public static encode(message: berty.protocol.v1.IGroupHeadsExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupHeadsExport, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupHeadsExport; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupHeadsExport; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupHeadsExport; - public static toObject(message: berty.types.v1.GroupHeadsExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupHeadsExport; + public static toObject(message: berty.protocol.v1.GroupHeadsExport, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IGroupMetadata { - eventType?: (berty.types.v1.EventType|null); + eventType?: (berty.protocol.v1.EventType|null); payload?: (Uint8Array|null); sig?: (Uint8Array|null); - protocolMetadata?: (berty.types.v1.IProtocolMetadata|null); + protocolMetadata?: (berty.protocol.v1.IProtocolMetadata|null); } class GroupMetadata implements IGroupMetadata { - public eventType: berty.types.v1.EventType; + public eventType: berty.protocol.v1.EventType; public payload: Uint8Array; public sig: Uint8Array; - public protocolMetadata?: (berty.types.v1.IProtocolMetadata|null); - public static create(properties?: berty.types.v1.IGroupMetadata): berty.types.v1.GroupMetadata; - public static encode(message: berty.types.v1.IGroupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupMetadata; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupMetadata; + public protocolMetadata?: (berty.protocol.v1.IProtocolMetadata|null); + public static create(properties?: berty.protocol.v1.IGroupMetadata): berty.protocol.v1.GroupMetadata; + public static encode(message: berty.protocol.v1.IGroupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupMetadata; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupMetadata; - public static toObject(message: berty.types.v1.GroupMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupMetadata; + public static toObject(message: berty.protocol.v1.GroupMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1398,14 +1399,14 @@ export namespace berty { public nonce: Uint8Array; public event: Uint8Array; public encryptedAttachmentCids: Uint8Array[]; - public static create(properties?: berty.types.v1.IGroupEnvelope): berty.types.v1.GroupEnvelope; - public static encode(message: berty.types.v1.IGroupEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupEnvelope; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupEnvelope; + public static create(properties?: berty.protocol.v1.IGroupEnvelope): berty.protocol.v1.GroupEnvelope; + public static encode(message: berty.protocol.v1.IGroupEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupEnvelope; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupEnvelope; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupEnvelope; - public static toObject(message: berty.types.v1.GroupEnvelope, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupEnvelope; + public static toObject(message: berty.protocol.v1.GroupEnvelope, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1422,14 +1423,14 @@ export namespace berty { public devicePk: Uint8Array; public sig: Uint8Array; public metadata: { [k: string]: string }; - public static create(properties?: berty.types.v1.IMessageHeaders): berty.types.v1.MessageHeaders; - public static encode(message: berty.types.v1.IMessageHeaders, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMessageHeaders, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MessageHeaders; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MessageHeaders; + public static create(properties?: berty.protocol.v1.IMessageHeaders): berty.protocol.v1.MessageHeaders; + public static encode(message: berty.protocol.v1.IMessageHeaders, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMessageHeaders, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MessageHeaders; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MessageHeaders; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MessageHeaders; - public static toObject(message: berty.types.v1.MessageHeaders, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MessageHeaders; + public static toObject(message: berty.protocol.v1.MessageHeaders, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1440,34 +1441,34 @@ export namespace berty { class ProtocolMetadata implements IProtocolMetadata { public attachmentsSecrets: Uint8Array[]; - public static create(properties?: berty.types.v1.IProtocolMetadata): berty.types.v1.ProtocolMetadata; - public static encode(message: berty.types.v1.IProtocolMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IProtocolMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ProtocolMetadata; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ProtocolMetadata; + public static create(properties?: berty.protocol.v1.IProtocolMetadata): berty.protocol.v1.ProtocolMetadata; + public static encode(message: berty.protocol.v1.IProtocolMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IProtocolMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ProtocolMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ProtocolMetadata; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ProtocolMetadata; - public static toObject(message: berty.types.v1.ProtocolMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ProtocolMetadata; + public static toObject(message: berty.protocol.v1.ProtocolMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IEncryptedMessage { plaintext?: (Uint8Array|null); - protocolMetadata?: (berty.types.v1.IProtocolMetadata|null); + protocolMetadata?: (berty.protocol.v1.IProtocolMetadata|null); } class EncryptedMessage implements IEncryptedMessage { public plaintext: Uint8Array; - public protocolMetadata?: (berty.types.v1.IProtocolMetadata|null); - public static create(properties?: berty.types.v1.IEncryptedMessage): berty.types.v1.EncryptedMessage; - public static encode(message: berty.types.v1.IEncryptedMessage, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IEncryptedMessage, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.EncryptedMessage; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.EncryptedMessage; + public protocolMetadata?: (berty.protocol.v1.IProtocolMetadata|null); + public static create(properties?: berty.protocol.v1.IEncryptedMessage): berty.protocol.v1.EncryptedMessage; + public static encode(message: berty.protocol.v1.IEncryptedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IEncryptedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.EncryptedMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.EncryptedMessage; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.EncryptedMessage; - public static toObject(message: berty.types.v1.EncryptedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.EncryptedMessage; + public static toObject(message: berty.protocol.v1.EncryptedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1484,14 +1485,14 @@ export namespace berty { public message: Uint8Array; public nonce: Uint8Array; public encryptedAttachmentCids: Uint8Array[]; - public static create(properties?: berty.types.v1.IMessageEnvelope): berty.types.v1.MessageEnvelope; - public static encode(message: berty.types.v1.IMessageEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMessageEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MessageEnvelope; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MessageEnvelope; + public static create(properties?: berty.protocol.v1.IMessageEnvelope): berty.protocol.v1.MessageEnvelope; + public static encode(message: berty.protocol.v1.IMessageEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMessageEnvelope, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MessageEnvelope; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MessageEnvelope; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MessageEnvelope; - public static toObject(message: berty.types.v1.MessageEnvelope, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MessageEnvelope; + public static toObject(message: berty.protocol.v1.MessageEnvelope, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1508,14 +1509,14 @@ export namespace berty { public parentIds: Uint8Array[]; public groupPk: Uint8Array; public attachmentCids: Uint8Array[]; - public static create(properties?: berty.types.v1.IEventContext): berty.types.v1.EventContext; - public static encode(message: berty.types.v1.IEventContext, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IEventContext, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.EventContext; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.EventContext; + public static create(properties?: berty.protocol.v1.IEventContext): berty.protocol.v1.EventContext; + public static encode(message: berty.protocol.v1.IEventContext, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IEventContext, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.EventContext; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.EventContext; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.EventContext; - public static toObject(message: berty.types.v1.EventContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.EventContext; + public static toObject(message: berty.protocol.v1.EventContext, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1528,14 +1529,14 @@ export namespace berty { public devicePk: Uint8Array; public message: Uint8Array; - public static create(properties?: berty.types.v1.IAppMetadata): berty.types.v1.AppMetadata; - public static encode(message: berty.types.v1.IAppMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAppMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AppMetadata; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AppMetadata; + public static create(properties?: berty.protocol.v1.IAppMetadata): berty.protocol.v1.AppMetadata; + public static encode(message: berty.protocol.v1.IAppMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAppMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AppMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AppMetadata; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AppMetadata; - public static toObject(message: berty.types.v1.AppMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AppMetadata; + public static toObject(message: berty.protocol.v1.AppMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1548,14 +1549,14 @@ export namespace berty { public devicePk: Uint8Array; public aliasPk: Uint8Array; - public static create(properties?: berty.types.v1.IContactAddAliasKey): berty.types.v1.ContactAddAliasKey; - public static encode(message: berty.types.v1.IContactAddAliasKey, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactAddAliasKey, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactAddAliasKey; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactAddAliasKey; + public static create(properties?: berty.protocol.v1.IContactAddAliasKey): berty.protocol.v1.ContactAddAliasKey; + public static encode(message: berty.protocol.v1.IContactAddAliasKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactAddAliasKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactAddAliasKey; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactAddAliasKey; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactAddAliasKey; - public static toObject(message: berty.types.v1.ContactAddAliasKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactAddAliasKey; + public static toObject(message: berty.protocol.v1.ContactAddAliasKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1570,14 +1571,14 @@ export namespace berty { public memberPk: Uint8Array; public devicePk: Uint8Array; public memberSig: Uint8Array; - public static create(properties?: berty.types.v1.IGroupAddMemberDevice): berty.types.v1.GroupAddMemberDevice; - public static encode(message: berty.types.v1.IGroupAddMemberDevice, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupAddMemberDevice, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupAddMemberDevice; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupAddMemberDevice; + public static create(properties?: berty.protocol.v1.IGroupAddMemberDevice): berty.protocol.v1.GroupAddMemberDevice; + public static encode(message: berty.protocol.v1.IGroupAddMemberDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupAddMemberDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupAddMemberDevice; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupAddMemberDevice; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupAddMemberDevice; - public static toObject(message: berty.types.v1.GroupAddMemberDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupAddMemberDevice; + public static toObject(message: berty.protocol.v1.GroupAddMemberDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1590,14 +1591,14 @@ export namespace berty { public chainKey: Uint8Array; public counter: Long; - public static create(properties?: berty.types.v1.IDeviceSecret): berty.types.v1.DeviceSecret; - public static encode(message: berty.types.v1.IDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DeviceSecret; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DeviceSecret; + public static create(properties?: berty.protocol.v1.IDeviceSecret): berty.protocol.v1.DeviceSecret; + public static encode(message: berty.protocol.v1.IDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DeviceSecret; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DeviceSecret; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DeviceSecret; - public static toObject(message: berty.types.v1.DeviceSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DeviceSecret; + public static toObject(message: berty.protocol.v1.DeviceSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1612,14 +1613,14 @@ export namespace berty { public devicePk: Uint8Array; public destMemberPk: Uint8Array; public payload: Uint8Array; - public static create(properties?: berty.types.v1.IGroupAddDeviceSecret): berty.types.v1.GroupAddDeviceSecret; - public static encode(message: berty.types.v1.IGroupAddDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupAddDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupAddDeviceSecret; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupAddDeviceSecret; + public static create(properties?: berty.protocol.v1.IGroupAddDeviceSecret): berty.protocol.v1.GroupAddDeviceSecret; + public static encode(message: berty.protocol.v1.IGroupAddDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupAddDeviceSecret, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupAddDeviceSecret; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupAddDeviceSecret; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupAddDeviceSecret; - public static toObject(message: berty.types.v1.GroupAddDeviceSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupAddDeviceSecret; + public static toObject(message: berty.protocol.v1.GroupAddDeviceSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1634,14 +1635,14 @@ export namespace berty { public devicePk: Uint8Array; public aliasResolver: Uint8Array; public aliasProof: Uint8Array; - public static create(properties?: berty.types.v1.IMultiMemberGroupAddAliasResolver): berty.types.v1.MultiMemberGroupAddAliasResolver; - public static encode(message: berty.types.v1.IMultiMemberGroupAddAliasResolver, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGroupAddAliasResolver, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupAddAliasResolver; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupAddAliasResolver; + public static create(properties?: berty.protocol.v1.IMultiMemberGroupAddAliasResolver): berty.protocol.v1.MultiMemberGroupAddAliasResolver; + public static encode(message: berty.protocol.v1.IMultiMemberGroupAddAliasResolver, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGroupAddAliasResolver, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupAddAliasResolver; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupAddAliasResolver; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupAddAliasResolver; - public static toObject(message: berty.types.v1.MultiMemberGroupAddAliasResolver, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupAddAliasResolver; + public static toObject(message: berty.protocol.v1.MultiMemberGroupAddAliasResolver, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1654,14 +1655,14 @@ export namespace berty { public devicePk: Uint8Array; public granteeMemberPk: Uint8Array; - public static create(properties?: berty.types.v1.IMultiMemberGrantAdminRole): berty.types.v1.MultiMemberGrantAdminRole; - public static encode(message: berty.types.v1.IMultiMemberGrantAdminRole, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGrantAdminRole, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGrantAdminRole; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGrantAdminRole; + public static create(properties?: berty.protocol.v1.IMultiMemberGrantAdminRole): berty.protocol.v1.MultiMemberGrantAdminRole; + public static encode(message: berty.protocol.v1.IMultiMemberGrantAdminRole, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGrantAdminRole, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGrantAdminRole; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGrantAdminRole; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGrantAdminRole; - public static toObject(message: berty.types.v1.MultiMemberGrantAdminRole, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGrantAdminRole; + public static toObject(message: berty.protocol.v1.MultiMemberGrantAdminRole, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1672,14 +1673,14 @@ export namespace berty { class MultiMemberInitialMember implements IMultiMemberInitialMember { public memberPk: Uint8Array; - public static create(properties?: berty.types.v1.IMultiMemberInitialMember): berty.types.v1.MultiMemberInitialMember; - public static encode(message: berty.types.v1.IMultiMemberInitialMember, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberInitialMember, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberInitialMember; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberInitialMember; + public static create(properties?: berty.protocol.v1.IMultiMemberInitialMember): berty.protocol.v1.MultiMemberInitialMember; + public static encode(message: berty.protocol.v1.IMultiMemberInitialMember, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberInitialMember, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberInitialMember; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberInitialMember; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberInitialMember; - public static toObject(message: berty.types.v1.MultiMemberInitialMember, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberInitialMember; + public static toObject(message: berty.protocol.v1.MultiMemberInitialMember, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1692,14 +1693,14 @@ export namespace berty { public devicePk: Uint8Array; public seed: Uint8Array; - public static create(properties?: berty.types.v1.IGroupAddAdditionalRendezvousSeed): berty.types.v1.GroupAddAdditionalRendezvousSeed; - public static encode(message: berty.types.v1.IGroupAddAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupAddAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupAddAdditionalRendezvousSeed; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupAddAdditionalRendezvousSeed; + public static create(properties?: berty.protocol.v1.IGroupAddAdditionalRendezvousSeed): berty.protocol.v1.GroupAddAdditionalRendezvousSeed; + public static encode(message: berty.protocol.v1.IGroupAddAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupAddAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupAddAdditionalRendezvousSeed; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupAddAdditionalRendezvousSeed; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupAddAdditionalRendezvousSeed; - public static toObject(message: berty.types.v1.GroupAddAdditionalRendezvousSeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupAddAdditionalRendezvousSeed; + public static toObject(message: berty.protocol.v1.GroupAddAdditionalRendezvousSeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1712,34 +1713,34 @@ export namespace berty { public devicePk: Uint8Array; public seed: Uint8Array; - public static create(properties?: berty.types.v1.IGroupRemoveAdditionalRendezvousSeed): berty.types.v1.GroupRemoveAdditionalRendezvousSeed; - public static encode(message: berty.types.v1.IGroupRemoveAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupRemoveAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupRemoveAdditionalRendezvousSeed; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupRemoveAdditionalRendezvousSeed; + public static create(properties?: berty.protocol.v1.IGroupRemoveAdditionalRendezvousSeed): berty.protocol.v1.GroupRemoveAdditionalRendezvousSeed; + public static encode(message: berty.protocol.v1.IGroupRemoveAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupRemoveAdditionalRendezvousSeed, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupRemoveAdditionalRendezvousSeed; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupRemoveAdditionalRendezvousSeed; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupRemoveAdditionalRendezvousSeed; - public static toObject(message: berty.types.v1.GroupRemoveAdditionalRendezvousSeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupRemoveAdditionalRendezvousSeed; + public static toObject(message: berty.protocol.v1.GroupRemoveAdditionalRendezvousSeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IAccountGroupJoined { devicePk?: (Uint8Array|null); - group?: (berty.types.v1.IGroup|null); + group?: (berty.protocol.v1.IGroup|null); } class AccountGroupJoined implements IAccountGroupJoined { public devicePk: Uint8Array; - public group?: (berty.types.v1.IGroup|null); - public static create(properties?: berty.types.v1.IAccountGroupJoined): berty.types.v1.AccountGroupJoined; - public static encode(message: berty.types.v1.IAccountGroupJoined, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountGroupJoined, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountGroupJoined; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountGroupJoined; + public group?: (berty.protocol.v1.IGroup|null); + public static create(properties?: berty.protocol.v1.IAccountGroupJoined): berty.protocol.v1.AccountGroupJoined; + public static encode(message: berty.protocol.v1.IAccountGroupJoined, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountGroupJoined, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountGroupJoined; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountGroupJoined; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountGroupJoined; - public static toObject(message: berty.types.v1.AccountGroupJoined, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountGroupJoined; + public static toObject(message: berty.protocol.v1.AccountGroupJoined, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1752,14 +1753,14 @@ export namespace berty { public devicePk: Uint8Array; public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountGroupLeft): berty.types.v1.AccountGroupLeft; - public static encode(message: berty.types.v1.IAccountGroupLeft, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountGroupLeft, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountGroupLeft; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountGroupLeft; + public static create(properties?: berty.protocol.v1.IAccountGroupLeft): berty.protocol.v1.AccountGroupLeft; + public static encode(message: berty.protocol.v1.IAccountGroupLeft, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountGroupLeft, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountGroupLeft; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountGroupLeft; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountGroupLeft; - public static toObject(message: berty.types.v1.AccountGroupLeft, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountGroupLeft; + public static toObject(message: berty.protocol.v1.AccountGroupLeft, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1770,14 +1771,14 @@ export namespace berty { class AccountContactRequestDisabled implements IAccountContactRequestDisabled { public devicePk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestDisabled): berty.types.v1.AccountContactRequestDisabled; - public static encode(message: berty.types.v1.IAccountContactRequestDisabled, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestDisabled, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestDisabled; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestDisabled; + public static create(properties?: berty.protocol.v1.IAccountContactRequestDisabled): berty.protocol.v1.AccountContactRequestDisabled; + public static encode(message: berty.protocol.v1.IAccountContactRequestDisabled, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestDisabled, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestDisabled; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestDisabled; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestDisabled; - public static toObject(message: berty.types.v1.AccountContactRequestDisabled, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestDisabled; + public static toObject(message: berty.protocol.v1.AccountContactRequestDisabled, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1788,14 +1789,14 @@ export namespace berty { class AccountContactRequestEnabled implements IAccountContactRequestEnabled { public devicePk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestEnabled): berty.types.v1.AccountContactRequestEnabled; - public static encode(message: berty.types.v1.IAccountContactRequestEnabled, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestEnabled, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestEnabled; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestEnabled; + public static create(properties?: berty.protocol.v1.IAccountContactRequestEnabled): berty.protocol.v1.AccountContactRequestEnabled; + public static encode(message: berty.protocol.v1.IAccountContactRequestEnabled, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestEnabled, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestEnabled; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestEnabled; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestEnabled; - public static toObject(message: berty.types.v1.AccountContactRequestEnabled, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestEnabled; + public static toObject(message: berty.protocol.v1.AccountContactRequestEnabled, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1808,21 +1809,21 @@ export namespace berty { public devicePk: Uint8Array; public publicRendezvousSeed: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestReferenceReset): berty.types.v1.AccountContactRequestReferenceReset; - public static encode(message: berty.types.v1.IAccountContactRequestReferenceReset, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestReferenceReset, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestReferenceReset; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestReferenceReset; + public static create(properties?: berty.protocol.v1.IAccountContactRequestReferenceReset): berty.protocol.v1.AccountContactRequestReferenceReset; + public static encode(message: berty.protocol.v1.IAccountContactRequestReferenceReset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestReferenceReset, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestReferenceReset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestReferenceReset; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestReferenceReset; - public static toObject(message: berty.types.v1.AccountContactRequestReferenceReset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestReferenceReset; + public static toObject(message: berty.protocol.v1.AccountContactRequestReferenceReset, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IAccountContactRequestEnqueued { devicePk?: (Uint8Array|null); groupPk?: (Uint8Array|null); - contact?: (berty.types.v1.IShareableContact|null); + contact?: (berty.protocol.v1.IShareableContact|null); ownMetadata?: (Uint8Array|null); } @@ -1830,16 +1831,16 @@ export namespace berty { public devicePk: Uint8Array; public groupPk: Uint8Array; - public contact?: (berty.types.v1.IShareableContact|null); + public contact?: (berty.protocol.v1.IShareableContact|null); public ownMetadata: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestEnqueued): berty.types.v1.AccountContactRequestEnqueued; - public static encode(message: berty.types.v1.IAccountContactRequestEnqueued, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestEnqueued, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestEnqueued; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestEnqueued; + public static create(properties?: berty.protocol.v1.IAccountContactRequestEnqueued): berty.protocol.v1.AccountContactRequestEnqueued; + public static encode(message: berty.protocol.v1.IAccountContactRequestEnqueued, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestEnqueued, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestEnqueued; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestEnqueued; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestEnqueued; - public static toObject(message: berty.types.v1.AccountContactRequestEnqueued, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestEnqueued; + public static toObject(message: berty.protocol.v1.AccountContactRequestEnqueued, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1852,14 +1853,14 @@ export namespace berty { public devicePk: Uint8Array; public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestSent): berty.types.v1.AccountContactRequestSent; - public static encode(message: berty.types.v1.IAccountContactRequestSent, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestSent, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestSent; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestSent; + public static create(properties?: berty.protocol.v1.IAccountContactRequestSent): berty.protocol.v1.AccountContactRequestSent; + public static encode(message: berty.protocol.v1.IAccountContactRequestSent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestSent, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestSent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestSent; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestSent; - public static toObject(message: berty.types.v1.AccountContactRequestSent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestSent; + public static toObject(message: berty.protocol.v1.AccountContactRequestSent, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1876,14 +1877,14 @@ export namespace berty { public contactPk: Uint8Array; public contactRendezvousSeed: Uint8Array; public contactMetadata: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestReceived): berty.types.v1.AccountContactRequestReceived; - public static encode(message: berty.types.v1.IAccountContactRequestReceived, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestReceived, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestReceived; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestReceived; + public static create(properties?: berty.protocol.v1.IAccountContactRequestReceived): berty.protocol.v1.AccountContactRequestReceived; + public static encode(message: berty.protocol.v1.IAccountContactRequestReceived, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestReceived, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestReceived; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestReceived; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestReceived; - public static toObject(message: berty.types.v1.AccountContactRequestReceived, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestReceived; + public static toObject(message: berty.protocol.v1.AccountContactRequestReceived, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1896,14 +1897,14 @@ export namespace berty { public devicePk: Uint8Array; public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestDiscarded): berty.types.v1.AccountContactRequestDiscarded; - public static encode(message: berty.types.v1.IAccountContactRequestDiscarded, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestDiscarded, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestDiscarded; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestDiscarded; + public static create(properties?: berty.protocol.v1.IAccountContactRequestDiscarded): berty.protocol.v1.AccountContactRequestDiscarded; + public static encode(message: berty.protocol.v1.IAccountContactRequestDiscarded, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestDiscarded, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestDiscarded; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestDiscarded; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestDiscarded; - public static toObject(message: berty.types.v1.AccountContactRequestDiscarded, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestDiscarded; + public static toObject(message: berty.protocol.v1.AccountContactRequestDiscarded, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1918,14 +1919,14 @@ export namespace berty { public devicePk: Uint8Array; public contactPk: Uint8Array; public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactRequestAccepted): berty.types.v1.AccountContactRequestAccepted; - public static encode(message: berty.types.v1.IAccountContactRequestAccepted, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactRequestAccepted, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactRequestAccepted; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactRequestAccepted; + public static create(properties?: berty.protocol.v1.IAccountContactRequestAccepted): berty.protocol.v1.AccountContactRequestAccepted; + public static encode(message: berty.protocol.v1.IAccountContactRequestAccepted, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactRequestAccepted, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactRequestAccepted; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactRequestAccepted; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactRequestAccepted; - public static toObject(message: berty.types.v1.AccountContactRequestAccepted, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactRequestAccepted; + public static toObject(message: berty.protocol.v1.AccountContactRequestAccepted, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1938,14 +1939,14 @@ export namespace berty { public devicePk: Uint8Array; public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactBlocked): berty.types.v1.AccountContactBlocked; - public static encode(message: berty.types.v1.IAccountContactBlocked, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactBlocked, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactBlocked; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactBlocked; + public static create(properties?: berty.protocol.v1.IAccountContactBlocked): berty.protocol.v1.AccountContactBlocked; + public static encode(message: berty.protocol.v1.IAccountContactBlocked, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactBlocked, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactBlocked; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactBlocked; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactBlocked; - public static toObject(message: berty.types.v1.AccountContactBlocked, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactBlocked; + public static toObject(message: berty.protocol.v1.AccountContactBlocked, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1958,34 +1959,34 @@ export namespace berty { public devicePk: Uint8Array; public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.IAccountContactUnblocked): berty.types.v1.AccountContactUnblocked; - public static encode(message: berty.types.v1.IAccountContactUnblocked, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountContactUnblocked, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountContactUnblocked; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountContactUnblocked; + public static create(properties?: berty.protocol.v1.IAccountContactUnblocked): berty.protocol.v1.AccountContactUnblocked; + public static encode(message: berty.protocol.v1.IAccountContactUnblocked, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountContactUnblocked, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountContactUnblocked; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountContactUnblocked; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountContactUnblocked; - public static toObject(message: berty.types.v1.AccountContactUnblocked, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountContactUnblocked; + public static toObject(message: berty.protocol.v1.AccountContactUnblocked, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IAccountServiceTokenAdded { devicePk?: (Uint8Array|null); - serviceToken?: (berty.types.v1.IServiceToken|null); + serviceToken?: (berty.protocol.v1.IServiceToken|null); } class AccountServiceTokenAdded implements IAccountServiceTokenAdded { public devicePk: Uint8Array; - public serviceToken?: (berty.types.v1.IServiceToken|null); - public static create(properties?: berty.types.v1.IAccountServiceTokenAdded): berty.types.v1.AccountServiceTokenAdded; - public static encode(message: berty.types.v1.IAccountServiceTokenAdded, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountServiceTokenAdded, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountServiceTokenAdded; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountServiceTokenAdded; + public serviceToken?: (berty.protocol.v1.IServiceToken|null); + public static create(properties?: berty.protocol.v1.IAccountServiceTokenAdded): berty.protocol.v1.AccountServiceTokenAdded; + public static encode(message: berty.protocol.v1.IAccountServiceTokenAdded, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountServiceTokenAdded, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountServiceTokenAdded; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountServiceTokenAdded; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountServiceTokenAdded; - public static toObject(message: berty.types.v1.AccountServiceTokenAdded, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountServiceTokenAdded; + public static toObject(message: berty.protocol.v1.AccountServiceTokenAdded, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -1998,14 +1999,14 @@ export namespace berty { public devicePk: Uint8Array; public tokenId: string; - public static create(properties?: berty.types.v1.IAccountServiceTokenRemoved): berty.types.v1.AccountServiceTokenRemoved; - public static encode(message: berty.types.v1.IAccountServiceTokenRemoved, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAccountServiceTokenRemoved, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AccountServiceTokenRemoved; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AccountServiceTokenRemoved; + public static create(properties?: berty.protocol.v1.IAccountServiceTokenRemoved): berty.protocol.v1.AccountServiceTokenRemoved; + public static encode(message: berty.protocol.v1.IAccountServiceTokenRemoved, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAccountServiceTokenRemoved, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AccountServiceTokenRemoved; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AccountServiceTokenRemoved; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AccountServiceTokenRemoved; - public static toObject(message: berty.types.v1.AccountServiceTokenRemoved, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AccountServiceTokenRemoved; + public static toObject(message: berty.protocol.v1.AccountServiceTokenRemoved, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2020,14 +2021,14 @@ export namespace berty { public devicePk: Uint8Array; public authenticationUrl: string; public replicationServer: string; - public static create(properties?: berty.types.v1.IGroupReplicating): berty.types.v1.GroupReplicating; - public static encode(message: berty.types.v1.IGroupReplicating, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupReplicating, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupReplicating; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupReplicating; + public static create(properties?: berty.protocol.v1.IGroupReplicating): berty.protocol.v1.GroupReplicating; + public static encode(message: berty.protocol.v1.IGroupReplicating, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupReplicating, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupReplicating; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupReplicating; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupReplicating; - public static toObject(message: berty.types.v1.GroupReplicating, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupReplicating; + public static toObject(message: berty.protocol.v1.GroupReplicating, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2036,14 +2037,14 @@ export namespace berty { class InstanceExportData implements IInstanceExportData { - public static create(properties?: berty.types.v1.IInstanceExportData): berty.types.v1.InstanceExportData; - public static encode(message: berty.types.v1.IInstanceExportData, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IInstanceExportData, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.InstanceExportData; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.InstanceExportData; + public static create(properties?: berty.protocol.v1.IInstanceExportData): berty.protocol.v1.InstanceExportData; + public static encode(message: berty.protocol.v1.IInstanceExportData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IInstanceExportData, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.InstanceExportData; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.InstanceExportData; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.InstanceExportData; - public static toObject(message: berty.types.v1.InstanceExportData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.InstanceExportData; + public static toObject(message: berty.protocol.v1.InstanceExportData, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2054,14 +2055,14 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.InstanceExportData.IRequest): berty.types.v1.InstanceExportData.Request; - public static encode(message: berty.types.v1.InstanceExportData.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.InstanceExportData.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.InstanceExportData.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.InstanceExportData.Request; + public static create(properties?: berty.protocol.v1.InstanceExportData.IRequest): berty.protocol.v1.InstanceExportData.Request; + public static encode(message: berty.protocol.v1.InstanceExportData.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.InstanceExportData.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.InstanceExportData.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.InstanceExportData.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.InstanceExportData.Request; - public static toObject(message: berty.types.v1.InstanceExportData.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.InstanceExportData.Request; + public static toObject(message: berty.protocol.v1.InstanceExportData.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2072,14 +2073,14 @@ export namespace berty { class Reply implements IReply { public exportedData: Uint8Array; - public static create(properties?: berty.types.v1.InstanceExportData.IReply): berty.types.v1.InstanceExportData.Reply; - public static encode(message: berty.types.v1.InstanceExportData.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.InstanceExportData.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.InstanceExportData.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.InstanceExportData.Reply; + public static create(properties?: berty.protocol.v1.InstanceExportData.IReply): berty.protocol.v1.InstanceExportData.Reply; + public static encode(message: berty.protocol.v1.InstanceExportData.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.InstanceExportData.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.InstanceExportData.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.InstanceExportData.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.InstanceExportData.Reply; - public static toObject(message: berty.types.v1.InstanceExportData.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.InstanceExportData.Reply; + public static toObject(message: berty.protocol.v1.InstanceExportData.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2089,14 +2090,14 @@ export namespace berty { class InstanceGetConfiguration implements IInstanceGetConfiguration { - public static create(properties?: berty.types.v1.IInstanceGetConfiguration): berty.types.v1.InstanceGetConfiguration; - public static encode(message: berty.types.v1.IInstanceGetConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IInstanceGetConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.InstanceGetConfiguration; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.InstanceGetConfiguration; + public static create(properties?: berty.protocol.v1.IInstanceGetConfiguration): berty.protocol.v1.InstanceGetConfiguration; + public static encode(message: berty.protocol.v1.IInstanceGetConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IInstanceGetConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.InstanceGetConfiguration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.InstanceGetConfiguration; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.InstanceGetConfiguration; - public static toObject(message: berty.types.v1.InstanceGetConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.InstanceGetConfiguration; + public static toObject(message: berty.protocol.v1.InstanceGetConfiguration, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2114,14 +2115,14 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.InstanceGetConfiguration.IRequest): berty.types.v1.InstanceGetConfiguration.Request; - public static encode(message: berty.types.v1.InstanceGetConfiguration.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.InstanceGetConfiguration.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.InstanceGetConfiguration.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.InstanceGetConfiguration.Request; + public static create(properties?: berty.protocol.v1.InstanceGetConfiguration.IRequest): berty.protocol.v1.InstanceGetConfiguration.Request; + public static encode(message: berty.protocol.v1.InstanceGetConfiguration.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.InstanceGetConfiguration.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.InstanceGetConfiguration.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.InstanceGetConfiguration.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.InstanceGetConfiguration.Request; - public static toObject(message: berty.types.v1.InstanceGetConfiguration.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.InstanceGetConfiguration.Request; + public static toObject(message: berty.protocol.v1.InstanceGetConfiguration.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2131,10 +2132,10 @@ export namespace berty { accountGroupPk?: (Uint8Array|null); peerId?: (string|null); listeners?: (string[]|null); - bleEnabled?: (berty.types.v1.InstanceGetConfiguration.SettingState|null); - wifiP2pEnabled?: (berty.types.v1.InstanceGetConfiguration.SettingState|null); - mdnsEnabled?: (berty.types.v1.InstanceGetConfiguration.SettingState|null); - relayEnabled?: (berty.types.v1.InstanceGetConfiguration.SettingState|null); + bleEnabled?: (berty.protocol.v1.InstanceGetConfiguration.SettingState|null); + wifiP2pEnabled?: (berty.protocol.v1.InstanceGetConfiguration.SettingState|null); + mdnsEnabled?: (berty.protocol.v1.InstanceGetConfiguration.SettingState|null); + relayEnabled?: (berty.protocol.v1.InstanceGetConfiguration.SettingState|null); } class Reply implements IReply { @@ -2144,18 +2145,18 @@ export namespace berty { public accountGroupPk: Uint8Array; public peerId: string; public listeners: string[]; - public bleEnabled: berty.types.v1.InstanceGetConfiguration.SettingState; - public wifiP2pEnabled: berty.types.v1.InstanceGetConfiguration.SettingState; - public mdnsEnabled: berty.types.v1.InstanceGetConfiguration.SettingState; - public relayEnabled: berty.types.v1.InstanceGetConfiguration.SettingState; - public static create(properties?: berty.types.v1.InstanceGetConfiguration.IReply): berty.types.v1.InstanceGetConfiguration.Reply; - public static encode(message: berty.types.v1.InstanceGetConfiguration.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.InstanceGetConfiguration.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.InstanceGetConfiguration.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.InstanceGetConfiguration.Reply; + public bleEnabled: berty.protocol.v1.InstanceGetConfiguration.SettingState; + public wifiP2pEnabled: berty.protocol.v1.InstanceGetConfiguration.SettingState; + public mdnsEnabled: berty.protocol.v1.InstanceGetConfiguration.SettingState; + public relayEnabled: berty.protocol.v1.InstanceGetConfiguration.SettingState; + public static create(properties?: berty.protocol.v1.InstanceGetConfiguration.IReply): berty.protocol.v1.InstanceGetConfiguration.Reply; + public static encode(message: berty.protocol.v1.InstanceGetConfiguration.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.InstanceGetConfiguration.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.InstanceGetConfiguration.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.InstanceGetConfiguration.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.InstanceGetConfiguration.Reply; - public static toObject(message: berty.types.v1.InstanceGetConfiguration.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.InstanceGetConfiguration.Reply; + public static toObject(message: berty.protocol.v1.InstanceGetConfiguration.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2165,14 +2166,14 @@ export namespace berty { class ContactRequestReference implements IContactRequestReference { - public static create(properties?: berty.types.v1.IContactRequestReference): berty.types.v1.ContactRequestReference; - public static encode(message: berty.types.v1.IContactRequestReference, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactRequestReference, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestReference; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestReference; + public static create(properties?: berty.protocol.v1.IContactRequestReference): berty.protocol.v1.ContactRequestReference; + public static encode(message: berty.protocol.v1.IContactRequestReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactRequestReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestReference; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestReference; - public static toObject(message: berty.types.v1.ContactRequestReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestReference; + public static toObject(message: berty.protocol.v1.ContactRequestReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2183,14 +2184,14 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.ContactRequestReference.IRequest): berty.types.v1.ContactRequestReference.Request; - public static encode(message: berty.types.v1.ContactRequestReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestReference.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestReference.Request; + public static create(properties?: berty.protocol.v1.ContactRequestReference.IRequest): berty.protocol.v1.ContactRequestReference.Request; + public static encode(message: berty.protocol.v1.ContactRequestReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestReference.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestReference.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestReference.Request; - public static toObject(message: berty.types.v1.ContactRequestReference.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestReference.Request; + public static toObject(message: berty.protocol.v1.ContactRequestReference.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2203,14 +2204,14 @@ export namespace berty { public publicRendezvousSeed: Uint8Array; public enabled: boolean; - public static create(properties?: berty.types.v1.ContactRequestReference.IReply): berty.types.v1.ContactRequestReference.Reply; - public static encode(message: berty.types.v1.ContactRequestReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestReference.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestReference.Reply; + public static create(properties?: berty.protocol.v1.ContactRequestReference.IReply): berty.protocol.v1.ContactRequestReference.Reply; + public static encode(message: berty.protocol.v1.ContactRequestReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestReference.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestReference.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestReference.Reply; - public static toObject(message: berty.types.v1.ContactRequestReference.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestReference.Reply; + public static toObject(message: berty.protocol.v1.ContactRequestReference.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2220,14 +2221,14 @@ export namespace berty { class ContactRequestDisable implements IContactRequestDisable { - public static create(properties?: berty.types.v1.IContactRequestDisable): berty.types.v1.ContactRequestDisable; - public static encode(message: berty.types.v1.IContactRequestDisable, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactRequestDisable, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestDisable; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestDisable; + public static create(properties?: berty.protocol.v1.IContactRequestDisable): berty.protocol.v1.ContactRequestDisable; + public static encode(message: berty.protocol.v1.IContactRequestDisable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactRequestDisable, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestDisable; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestDisable; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestDisable; - public static toObject(message: berty.types.v1.ContactRequestDisable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestDisable; + public static toObject(message: berty.protocol.v1.ContactRequestDisable, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2238,14 +2239,14 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.ContactRequestDisable.IRequest): berty.types.v1.ContactRequestDisable.Request; - public static encode(message: berty.types.v1.ContactRequestDisable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestDisable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestDisable.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestDisable.Request; + public static create(properties?: berty.protocol.v1.ContactRequestDisable.IRequest): berty.protocol.v1.ContactRequestDisable.Request; + public static encode(message: berty.protocol.v1.ContactRequestDisable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestDisable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestDisable.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestDisable.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestDisable.Request; - public static toObject(message: berty.types.v1.ContactRequestDisable.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestDisable.Request; + public static toObject(message: berty.protocol.v1.ContactRequestDisable.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2254,14 +2255,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ContactRequestDisable.IReply): berty.types.v1.ContactRequestDisable.Reply; - public static encode(message: berty.types.v1.ContactRequestDisable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestDisable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestDisable.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestDisable.Reply; + public static create(properties?: berty.protocol.v1.ContactRequestDisable.IReply): berty.protocol.v1.ContactRequestDisable.Reply; + public static encode(message: berty.protocol.v1.ContactRequestDisable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestDisable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestDisable.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestDisable.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestDisable.Reply; - public static toObject(message: berty.types.v1.ContactRequestDisable.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestDisable.Reply; + public static toObject(message: berty.protocol.v1.ContactRequestDisable.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2271,14 +2272,14 @@ export namespace berty { class ContactRequestEnable implements IContactRequestEnable { - public static create(properties?: berty.types.v1.IContactRequestEnable): berty.types.v1.ContactRequestEnable; - public static encode(message: berty.types.v1.IContactRequestEnable, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactRequestEnable, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestEnable; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestEnable; + public static create(properties?: berty.protocol.v1.IContactRequestEnable): berty.protocol.v1.ContactRequestEnable; + public static encode(message: berty.protocol.v1.IContactRequestEnable, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactRequestEnable, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestEnable; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestEnable; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestEnable; - public static toObject(message: berty.types.v1.ContactRequestEnable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestEnable; + public static toObject(message: berty.protocol.v1.ContactRequestEnable, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2289,14 +2290,14 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.ContactRequestEnable.IRequest): berty.types.v1.ContactRequestEnable.Request; - public static encode(message: berty.types.v1.ContactRequestEnable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestEnable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestEnable.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestEnable.Request; + public static create(properties?: berty.protocol.v1.ContactRequestEnable.IRequest): berty.protocol.v1.ContactRequestEnable.Request; + public static encode(message: berty.protocol.v1.ContactRequestEnable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestEnable.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestEnable.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestEnable.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestEnable.Request; - public static toObject(message: berty.types.v1.ContactRequestEnable.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestEnable.Request; + public static toObject(message: berty.protocol.v1.ContactRequestEnable.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2307,14 +2308,14 @@ export namespace berty { class Reply implements IReply { public publicRendezvousSeed: Uint8Array; - public static create(properties?: berty.types.v1.ContactRequestEnable.IReply): berty.types.v1.ContactRequestEnable.Reply; - public static encode(message: berty.types.v1.ContactRequestEnable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestEnable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestEnable.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestEnable.Reply; + public static create(properties?: berty.protocol.v1.ContactRequestEnable.IReply): berty.protocol.v1.ContactRequestEnable.Reply; + public static encode(message: berty.protocol.v1.ContactRequestEnable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestEnable.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestEnable.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestEnable.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestEnable.Reply; - public static toObject(message: berty.types.v1.ContactRequestEnable.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestEnable.Reply; + public static toObject(message: berty.protocol.v1.ContactRequestEnable.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2324,14 +2325,14 @@ export namespace berty { class ContactRequestResetReference implements IContactRequestResetReference { - public static create(properties?: berty.types.v1.IContactRequestResetReference): berty.types.v1.ContactRequestResetReference; - public static encode(message: berty.types.v1.IContactRequestResetReference, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactRequestResetReference, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestResetReference; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestResetReference; + public static create(properties?: berty.protocol.v1.IContactRequestResetReference): berty.protocol.v1.ContactRequestResetReference; + public static encode(message: berty.protocol.v1.IContactRequestResetReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactRequestResetReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestResetReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestResetReference; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestResetReference; - public static toObject(message: berty.types.v1.ContactRequestResetReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestResetReference; + public static toObject(message: berty.protocol.v1.ContactRequestResetReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2342,14 +2343,14 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.ContactRequestResetReference.IRequest): berty.types.v1.ContactRequestResetReference.Request; - public static encode(message: berty.types.v1.ContactRequestResetReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestResetReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestResetReference.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestResetReference.Request; + public static create(properties?: berty.protocol.v1.ContactRequestResetReference.IRequest): berty.protocol.v1.ContactRequestResetReference.Request; + public static encode(message: berty.protocol.v1.ContactRequestResetReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestResetReference.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestResetReference.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestResetReference.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestResetReference.Request; - public static toObject(message: berty.types.v1.ContactRequestResetReference.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestResetReference.Request; + public static toObject(message: berty.protocol.v1.ContactRequestResetReference.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2360,14 +2361,14 @@ export namespace berty { class Reply implements IReply { public publicRendezvousSeed: Uint8Array; - public static create(properties?: berty.types.v1.ContactRequestResetReference.IReply): berty.types.v1.ContactRequestResetReference.Reply; - public static encode(message: berty.types.v1.ContactRequestResetReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestResetReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestResetReference.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestResetReference.Reply; + public static create(properties?: berty.protocol.v1.ContactRequestResetReference.IReply): berty.protocol.v1.ContactRequestResetReference.Reply; + public static encode(message: berty.protocol.v1.ContactRequestResetReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestResetReference.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestResetReference.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestResetReference.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestResetReference.Reply; - public static toObject(message: berty.types.v1.ContactRequestResetReference.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestResetReference.Reply; + public static toObject(message: berty.protocol.v1.ContactRequestResetReference.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2377,36 +2378,36 @@ export namespace berty { class ContactRequestSend implements IContactRequestSend { - public static create(properties?: berty.types.v1.IContactRequestSend): berty.types.v1.ContactRequestSend; - public static encode(message: berty.types.v1.IContactRequestSend, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactRequestSend, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestSend; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestSend; + public static create(properties?: berty.protocol.v1.IContactRequestSend): berty.protocol.v1.ContactRequestSend; + public static encode(message: berty.protocol.v1.IContactRequestSend, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactRequestSend, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestSend; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestSend; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestSend; - public static toObject(message: berty.types.v1.ContactRequestSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestSend; + public static toObject(message: berty.protocol.v1.ContactRequestSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } namespace ContactRequestSend { interface IRequest { - contact?: (berty.types.v1.IShareableContact|null); + contact?: (berty.protocol.v1.IShareableContact|null); ownMetadata?: (Uint8Array|null); } class Request implements IRequest { - public contact?: (berty.types.v1.IShareableContact|null); + public contact?: (berty.protocol.v1.IShareableContact|null); public ownMetadata: Uint8Array; - public static create(properties?: berty.types.v1.ContactRequestSend.IRequest): berty.types.v1.ContactRequestSend.Request; - public static encode(message: berty.types.v1.ContactRequestSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestSend.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestSend.Request; + public static create(properties?: berty.protocol.v1.ContactRequestSend.IRequest): berty.protocol.v1.ContactRequestSend.Request; + public static encode(message: berty.protocol.v1.ContactRequestSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestSend.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestSend.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestSend.Request; - public static toObject(message: berty.types.v1.ContactRequestSend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestSend.Request; + public static toObject(message: berty.protocol.v1.ContactRequestSend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2415,14 +2416,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ContactRequestSend.IReply): berty.types.v1.ContactRequestSend.Reply; - public static encode(message: berty.types.v1.ContactRequestSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestSend.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestSend.Reply; + public static create(properties?: berty.protocol.v1.ContactRequestSend.IReply): berty.protocol.v1.ContactRequestSend.Reply; + public static encode(message: berty.protocol.v1.ContactRequestSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestSend.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestSend.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestSend.Reply; - public static toObject(message: berty.types.v1.ContactRequestSend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestSend.Reply; + public static toObject(message: berty.protocol.v1.ContactRequestSend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2432,14 +2433,14 @@ export namespace berty { class ContactRequestAccept implements IContactRequestAccept { - public static create(properties?: berty.types.v1.IContactRequestAccept): berty.types.v1.ContactRequestAccept; - public static encode(message: berty.types.v1.IContactRequestAccept, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactRequestAccept, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestAccept; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestAccept; + public static create(properties?: berty.protocol.v1.IContactRequestAccept): berty.protocol.v1.ContactRequestAccept; + public static encode(message: berty.protocol.v1.IContactRequestAccept, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactRequestAccept, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestAccept; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestAccept; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestAccept; - public static toObject(message: berty.types.v1.ContactRequestAccept, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestAccept; + public static toObject(message: berty.protocol.v1.ContactRequestAccept, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2452,14 +2453,14 @@ export namespace berty { class Request implements IRequest { public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.ContactRequestAccept.IRequest): berty.types.v1.ContactRequestAccept.Request; - public static encode(message: berty.types.v1.ContactRequestAccept.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestAccept.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestAccept.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestAccept.Request; + public static create(properties?: berty.protocol.v1.ContactRequestAccept.IRequest): berty.protocol.v1.ContactRequestAccept.Request; + public static encode(message: berty.protocol.v1.ContactRequestAccept.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestAccept.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestAccept.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestAccept.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestAccept.Request; - public static toObject(message: berty.types.v1.ContactRequestAccept.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestAccept.Request; + public static toObject(message: berty.protocol.v1.ContactRequestAccept.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2468,14 +2469,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ContactRequestAccept.IReply): berty.types.v1.ContactRequestAccept.Reply; - public static encode(message: berty.types.v1.ContactRequestAccept.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestAccept.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestAccept.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestAccept.Reply; + public static create(properties?: berty.protocol.v1.ContactRequestAccept.IReply): berty.protocol.v1.ContactRequestAccept.Reply; + public static encode(message: berty.protocol.v1.ContactRequestAccept.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestAccept.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestAccept.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestAccept.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestAccept.Reply; - public static toObject(message: berty.types.v1.ContactRequestAccept.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestAccept.Reply; + public static toObject(message: berty.protocol.v1.ContactRequestAccept.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2485,14 +2486,14 @@ export namespace berty { class ContactRequestDiscard implements IContactRequestDiscard { - public static create(properties?: berty.types.v1.IContactRequestDiscard): berty.types.v1.ContactRequestDiscard; - public static encode(message: berty.types.v1.IContactRequestDiscard, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactRequestDiscard, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestDiscard; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestDiscard; + public static create(properties?: berty.protocol.v1.IContactRequestDiscard): berty.protocol.v1.ContactRequestDiscard; + public static encode(message: berty.protocol.v1.IContactRequestDiscard, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactRequestDiscard, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestDiscard; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestDiscard; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestDiscard; - public static toObject(message: berty.types.v1.ContactRequestDiscard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestDiscard; + public static toObject(message: berty.protocol.v1.ContactRequestDiscard, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2505,14 +2506,14 @@ export namespace berty { class Request implements IRequest { public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.ContactRequestDiscard.IRequest): berty.types.v1.ContactRequestDiscard.Request; - public static encode(message: berty.types.v1.ContactRequestDiscard.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestDiscard.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestDiscard.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestDiscard.Request; + public static create(properties?: berty.protocol.v1.ContactRequestDiscard.IRequest): berty.protocol.v1.ContactRequestDiscard.Request; + public static encode(message: berty.protocol.v1.ContactRequestDiscard.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestDiscard.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestDiscard.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestDiscard.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestDiscard.Request; - public static toObject(message: berty.types.v1.ContactRequestDiscard.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestDiscard.Request; + public static toObject(message: berty.protocol.v1.ContactRequestDiscard.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2521,14 +2522,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ContactRequestDiscard.IReply): berty.types.v1.ContactRequestDiscard.Reply; - public static encode(message: berty.types.v1.ContactRequestDiscard.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactRequestDiscard.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactRequestDiscard.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactRequestDiscard.Reply; + public static create(properties?: berty.protocol.v1.ContactRequestDiscard.IReply): berty.protocol.v1.ContactRequestDiscard.Reply; + public static encode(message: berty.protocol.v1.ContactRequestDiscard.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactRequestDiscard.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactRequestDiscard.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactRequestDiscard.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactRequestDiscard.Reply; - public static toObject(message: berty.types.v1.ContactRequestDiscard.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactRequestDiscard.Reply; + public static toObject(message: berty.protocol.v1.ContactRequestDiscard.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2538,14 +2539,14 @@ export namespace berty { class ContactBlock implements IContactBlock { - public static create(properties?: berty.types.v1.IContactBlock): berty.types.v1.ContactBlock; - public static encode(message: berty.types.v1.IContactBlock, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactBlock, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactBlock; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactBlock; + public static create(properties?: berty.protocol.v1.IContactBlock): berty.protocol.v1.ContactBlock; + public static encode(message: berty.protocol.v1.IContactBlock, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactBlock, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactBlock; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactBlock; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactBlock; - public static toObject(message: berty.types.v1.ContactBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactBlock; + public static toObject(message: berty.protocol.v1.ContactBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2558,14 +2559,14 @@ export namespace berty { class Request implements IRequest { public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.ContactBlock.IRequest): berty.types.v1.ContactBlock.Request; - public static encode(message: berty.types.v1.ContactBlock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactBlock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactBlock.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactBlock.Request; + public static create(properties?: berty.protocol.v1.ContactBlock.IRequest): berty.protocol.v1.ContactBlock.Request; + public static encode(message: berty.protocol.v1.ContactBlock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactBlock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactBlock.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactBlock.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactBlock.Request; - public static toObject(message: berty.types.v1.ContactBlock.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactBlock.Request; + public static toObject(message: berty.protocol.v1.ContactBlock.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2574,14 +2575,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ContactBlock.IReply): berty.types.v1.ContactBlock.Reply; - public static encode(message: berty.types.v1.ContactBlock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactBlock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactBlock.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactBlock.Reply; + public static create(properties?: berty.protocol.v1.ContactBlock.IReply): berty.protocol.v1.ContactBlock.Reply; + public static encode(message: berty.protocol.v1.ContactBlock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactBlock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactBlock.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactBlock.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactBlock.Reply; - public static toObject(message: berty.types.v1.ContactBlock.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactBlock.Reply; + public static toObject(message: berty.protocol.v1.ContactBlock.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2591,14 +2592,14 @@ export namespace berty { class ContactUnblock implements IContactUnblock { - public static create(properties?: berty.types.v1.IContactUnblock): berty.types.v1.ContactUnblock; - public static encode(message: berty.types.v1.IContactUnblock, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactUnblock, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactUnblock; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactUnblock; + public static create(properties?: berty.protocol.v1.IContactUnblock): berty.protocol.v1.ContactUnblock; + public static encode(message: berty.protocol.v1.IContactUnblock, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactUnblock, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactUnblock; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactUnblock; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactUnblock; - public static toObject(message: berty.types.v1.ContactUnblock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactUnblock; + public static toObject(message: berty.protocol.v1.ContactUnblock, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2611,14 +2612,14 @@ export namespace berty { class Request implements IRequest { public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.ContactUnblock.IRequest): berty.types.v1.ContactUnblock.Request; - public static encode(message: berty.types.v1.ContactUnblock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactUnblock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactUnblock.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactUnblock.Request; + public static create(properties?: berty.protocol.v1.ContactUnblock.IRequest): berty.protocol.v1.ContactUnblock.Request; + public static encode(message: berty.protocol.v1.ContactUnblock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactUnblock.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactUnblock.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactUnblock.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactUnblock.Request; - public static toObject(message: berty.types.v1.ContactUnblock.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactUnblock.Request; + public static toObject(message: berty.protocol.v1.ContactUnblock.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2627,14 +2628,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ContactUnblock.IReply): berty.types.v1.ContactUnblock.Reply; - public static encode(message: berty.types.v1.ContactUnblock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactUnblock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactUnblock.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactUnblock.Reply; + public static create(properties?: berty.protocol.v1.ContactUnblock.IReply): berty.protocol.v1.ContactUnblock.Reply; + public static encode(message: berty.protocol.v1.ContactUnblock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactUnblock.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactUnblock.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactUnblock.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactUnblock.Reply; - public static toObject(message: berty.types.v1.ContactUnblock.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactUnblock.Reply; + public static toObject(message: berty.protocol.v1.ContactUnblock.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2644,14 +2645,14 @@ export namespace berty { class ContactAliasKeySend implements IContactAliasKeySend { - public static create(properties?: berty.types.v1.IContactAliasKeySend): berty.types.v1.ContactAliasKeySend; - public static encode(message: berty.types.v1.IContactAliasKeySend, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IContactAliasKeySend, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactAliasKeySend; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactAliasKeySend; + public static create(properties?: berty.protocol.v1.IContactAliasKeySend): berty.protocol.v1.ContactAliasKeySend; + public static encode(message: berty.protocol.v1.IContactAliasKeySend, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IContactAliasKeySend, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactAliasKeySend; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactAliasKeySend; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactAliasKeySend; - public static toObject(message: berty.types.v1.ContactAliasKeySend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactAliasKeySend; + public static toObject(message: berty.protocol.v1.ContactAliasKeySend, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2664,14 +2665,14 @@ export namespace berty { class Request implements IRequest { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.ContactAliasKeySend.IRequest): berty.types.v1.ContactAliasKeySend.Request; - public static encode(message: berty.types.v1.ContactAliasKeySend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactAliasKeySend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactAliasKeySend.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactAliasKeySend.Request; + public static create(properties?: berty.protocol.v1.ContactAliasKeySend.IRequest): berty.protocol.v1.ContactAliasKeySend.Request; + public static encode(message: berty.protocol.v1.ContactAliasKeySend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactAliasKeySend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactAliasKeySend.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactAliasKeySend.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactAliasKeySend.Request; - public static toObject(message: berty.types.v1.ContactAliasKeySend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactAliasKeySend.Request; + public static toObject(message: berty.protocol.v1.ContactAliasKeySend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2680,14 +2681,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ContactAliasKeySend.IReply): berty.types.v1.ContactAliasKeySend.Reply; - public static encode(message: berty.types.v1.ContactAliasKeySend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ContactAliasKeySend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ContactAliasKeySend.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ContactAliasKeySend.Reply; + public static create(properties?: berty.protocol.v1.ContactAliasKeySend.IReply): berty.protocol.v1.ContactAliasKeySend.Reply; + public static encode(message: berty.protocol.v1.ContactAliasKeySend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ContactAliasKeySend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ContactAliasKeySend.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ContactAliasKeySend.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ContactAliasKeySend.Reply; - public static toObject(message: berty.types.v1.ContactAliasKeySend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ContactAliasKeySend.Reply; + public static toObject(message: berty.protocol.v1.ContactAliasKeySend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2697,14 +2698,14 @@ export namespace berty { class MultiMemberGroupCreate implements IMultiMemberGroupCreate { - public static create(properties?: berty.types.v1.IMultiMemberGroupCreate): berty.types.v1.MultiMemberGroupCreate; - public static encode(message: berty.types.v1.IMultiMemberGroupCreate, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGroupCreate, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupCreate; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupCreate; + public static create(properties?: berty.protocol.v1.IMultiMemberGroupCreate): berty.protocol.v1.MultiMemberGroupCreate; + public static encode(message: berty.protocol.v1.IMultiMemberGroupCreate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGroupCreate, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupCreate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupCreate; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupCreate; - public static toObject(message: berty.types.v1.MultiMemberGroupCreate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupCreate; + public static toObject(message: berty.protocol.v1.MultiMemberGroupCreate, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2715,14 +2716,14 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.MultiMemberGroupCreate.IRequest): berty.types.v1.MultiMemberGroupCreate.Request; - public static encode(message: berty.types.v1.MultiMemberGroupCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupCreate.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupCreate.Request; + public static create(properties?: berty.protocol.v1.MultiMemberGroupCreate.IRequest): berty.protocol.v1.MultiMemberGroupCreate.Request; + public static encode(message: berty.protocol.v1.MultiMemberGroupCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupCreate.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupCreate.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupCreate.Request; - public static toObject(message: berty.types.v1.MultiMemberGroupCreate.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupCreate.Request; + public static toObject(message: berty.protocol.v1.MultiMemberGroupCreate.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2733,14 +2734,14 @@ export namespace berty { class Reply implements IReply { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.MultiMemberGroupCreate.IReply): berty.types.v1.MultiMemberGroupCreate.Reply; - public static encode(message: berty.types.v1.MultiMemberGroupCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupCreate.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupCreate.Reply; + public static create(properties?: berty.protocol.v1.MultiMemberGroupCreate.IReply): berty.protocol.v1.MultiMemberGroupCreate.Reply; + public static encode(message: berty.protocol.v1.MultiMemberGroupCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupCreate.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupCreate.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupCreate.Reply; - public static toObject(message: berty.types.v1.MultiMemberGroupCreate.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupCreate.Reply; + public static toObject(message: berty.protocol.v1.MultiMemberGroupCreate.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2750,34 +2751,34 @@ export namespace berty { class MultiMemberGroupJoin implements IMultiMemberGroupJoin { - public static create(properties?: berty.types.v1.IMultiMemberGroupJoin): berty.types.v1.MultiMemberGroupJoin; - public static encode(message: berty.types.v1.IMultiMemberGroupJoin, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGroupJoin, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupJoin; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupJoin; + public static create(properties?: berty.protocol.v1.IMultiMemberGroupJoin): berty.protocol.v1.MultiMemberGroupJoin; + public static encode(message: berty.protocol.v1.IMultiMemberGroupJoin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGroupJoin, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupJoin; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupJoin; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupJoin; - public static toObject(message: berty.types.v1.MultiMemberGroupJoin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupJoin; + public static toObject(message: berty.protocol.v1.MultiMemberGroupJoin, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } namespace MultiMemberGroupJoin { interface IRequest { - group?: (berty.types.v1.IGroup|null); + group?: (berty.protocol.v1.IGroup|null); } class Request implements IRequest { - public group?: (berty.types.v1.IGroup|null); - public static create(properties?: berty.types.v1.MultiMemberGroupJoin.IRequest): berty.types.v1.MultiMemberGroupJoin.Request; - public static encode(message: berty.types.v1.MultiMemberGroupJoin.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupJoin.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupJoin.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupJoin.Request; + public group?: (berty.protocol.v1.IGroup|null); + public static create(properties?: berty.protocol.v1.MultiMemberGroupJoin.IRequest): berty.protocol.v1.MultiMemberGroupJoin.Request; + public static encode(message: berty.protocol.v1.MultiMemberGroupJoin.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupJoin.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupJoin.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupJoin.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupJoin.Request; - public static toObject(message: berty.types.v1.MultiMemberGroupJoin.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupJoin.Request; + public static toObject(message: berty.protocol.v1.MultiMemberGroupJoin.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2786,14 +2787,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.MultiMemberGroupJoin.IReply): berty.types.v1.MultiMemberGroupJoin.Reply; - public static encode(message: berty.types.v1.MultiMemberGroupJoin.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupJoin.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupJoin.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupJoin.Reply; + public static create(properties?: berty.protocol.v1.MultiMemberGroupJoin.IReply): berty.protocol.v1.MultiMemberGroupJoin.Reply; + public static encode(message: berty.protocol.v1.MultiMemberGroupJoin.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupJoin.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupJoin.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupJoin.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupJoin.Reply; - public static toObject(message: berty.types.v1.MultiMemberGroupJoin.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupJoin.Reply; + public static toObject(message: berty.protocol.v1.MultiMemberGroupJoin.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2803,14 +2804,14 @@ export namespace berty { class MultiMemberGroupLeave implements IMultiMemberGroupLeave { - public static create(properties?: berty.types.v1.IMultiMemberGroupLeave): berty.types.v1.MultiMemberGroupLeave; - public static encode(message: berty.types.v1.IMultiMemberGroupLeave, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGroupLeave, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupLeave; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupLeave; + public static create(properties?: berty.protocol.v1.IMultiMemberGroupLeave): berty.protocol.v1.MultiMemberGroupLeave; + public static encode(message: berty.protocol.v1.IMultiMemberGroupLeave, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGroupLeave, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupLeave; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupLeave; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupLeave; - public static toObject(message: berty.types.v1.MultiMemberGroupLeave, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupLeave; + public static toObject(message: berty.protocol.v1.MultiMemberGroupLeave, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2823,14 +2824,14 @@ export namespace berty { class Request implements IRequest { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.MultiMemberGroupLeave.IRequest): berty.types.v1.MultiMemberGroupLeave.Request; - public static encode(message: berty.types.v1.MultiMemberGroupLeave.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupLeave.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupLeave.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupLeave.Request; + public static create(properties?: berty.protocol.v1.MultiMemberGroupLeave.IRequest): berty.protocol.v1.MultiMemberGroupLeave.Request; + public static encode(message: berty.protocol.v1.MultiMemberGroupLeave.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupLeave.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupLeave.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupLeave.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupLeave.Request; - public static toObject(message: berty.types.v1.MultiMemberGroupLeave.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupLeave.Request; + public static toObject(message: berty.protocol.v1.MultiMemberGroupLeave.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2839,14 +2840,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.MultiMemberGroupLeave.IReply): berty.types.v1.MultiMemberGroupLeave.Reply; - public static encode(message: berty.types.v1.MultiMemberGroupLeave.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupLeave.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupLeave.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupLeave.Reply; + public static create(properties?: berty.protocol.v1.MultiMemberGroupLeave.IReply): berty.protocol.v1.MultiMemberGroupLeave.Reply; + public static encode(message: berty.protocol.v1.MultiMemberGroupLeave.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupLeave.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupLeave.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupLeave.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupLeave.Reply; - public static toObject(message: berty.types.v1.MultiMemberGroupLeave.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupLeave.Reply; + public static toObject(message: berty.protocol.v1.MultiMemberGroupLeave.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2856,14 +2857,14 @@ export namespace berty { class MultiMemberGroupAliasResolverDisclose implements IMultiMemberGroupAliasResolverDisclose { - public static create(properties?: berty.types.v1.IMultiMemberGroupAliasResolverDisclose): berty.types.v1.MultiMemberGroupAliasResolverDisclose; - public static encode(message: berty.types.v1.IMultiMemberGroupAliasResolverDisclose, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGroupAliasResolverDisclose, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupAliasResolverDisclose; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupAliasResolverDisclose; + public static create(properties?: berty.protocol.v1.IMultiMemberGroupAliasResolverDisclose): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose; + public static encode(message: berty.protocol.v1.IMultiMemberGroupAliasResolverDisclose, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGroupAliasResolverDisclose, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupAliasResolverDisclose; - public static toObject(message: berty.types.v1.MultiMemberGroupAliasResolverDisclose, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose; + public static toObject(message: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2876,14 +2877,14 @@ export namespace berty { class Request implements IRequest { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IRequest): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request; - public static encode(message: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request; + public static create(properties?: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IRequest): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request; + public static encode(message: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request; - public static toObject(message: berty.types.v1.MultiMemberGroupAliasResolverDisclose.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request; + public static toObject(message: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2892,14 +2893,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IReply): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply; - public static encode(message: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupAliasResolverDisclose.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply; + public static create(properties?: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IReply): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply; + public static encode(message: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply; - public static toObject(message: berty.types.v1.MultiMemberGroupAliasResolverDisclose.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply; + public static toObject(message: berty.protocol.v1.MultiMemberGroupAliasResolverDisclose.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2909,14 +2910,14 @@ export namespace berty { class MultiMemberGroupAdminRoleGrant implements IMultiMemberGroupAdminRoleGrant { - public static create(properties?: berty.types.v1.IMultiMemberGroupAdminRoleGrant): berty.types.v1.MultiMemberGroupAdminRoleGrant; - public static encode(message: berty.types.v1.IMultiMemberGroupAdminRoleGrant, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGroupAdminRoleGrant, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupAdminRoleGrant; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupAdminRoleGrant; + public static create(properties?: berty.protocol.v1.IMultiMemberGroupAdminRoleGrant): berty.protocol.v1.MultiMemberGroupAdminRoleGrant; + public static encode(message: berty.protocol.v1.IMultiMemberGroupAdminRoleGrant, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGroupAdminRoleGrant, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupAdminRoleGrant; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupAdminRoleGrant; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupAdminRoleGrant; - public static toObject(message: berty.types.v1.MultiMemberGroupAdminRoleGrant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupAdminRoleGrant; + public static toObject(message: berty.protocol.v1.MultiMemberGroupAdminRoleGrant, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2931,14 +2932,14 @@ export namespace berty { public groupPk: Uint8Array; public memberPk: Uint8Array; - public static create(properties?: berty.types.v1.MultiMemberGroupAdminRoleGrant.IRequest): berty.types.v1.MultiMemberGroupAdminRoleGrant.Request; - public static encode(message: berty.types.v1.MultiMemberGroupAdminRoleGrant.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupAdminRoleGrant.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupAdminRoleGrant.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupAdminRoleGrant.Request; + public static create(properties?: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IRequest): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request; + public static encode(message: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupAdminRoleGrant.Request; - public static toObject(message: berty.types.v1.MultiMemberGroupAdminRoleGrant.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request; + public static toObject(message: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2947,14 +2948,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.MultiMemberGroupAdminRoleGrant.IReply): berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply; - public static encode(message: berty.types.v1.MultiMemberGroupAdminRoleGrant.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupAdminRoleGrant.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply; + public static create(properties?: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IReply): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply; + public static encode(message: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply; - public static toObject(message: berty.types.v1.MultiMemberGroupAdminRoleGrant.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply; + public static toObject(message: berty.protocol.v1.MultiMemberGroupAdminRoleGrant.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -2964,14 +2965,14 @@ export namespace berty { class MultiMemberGroupInvitationCreate implements IMultiMemberGroupInvitationCreate { - public static create(properties?: berty.types.v1.IMultiMemberGroupInvitationCreate): berty.types.v1.MultiMemberGroupInvitationCreate; - public static encode(message: berty.types.v1.IMultiMemberGroupInvitationCreate, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMultiMemberGroupInvitationCreate, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupInvitationCreate; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupInvitationCreate; + public static create(properties?: berty.protocol.v1.IMultiMemberGroupInvitationCreate): berty.protocol.v1.MultiMemberGroupInvitationCreate; + public static encode(message: berty.protocol.v1.IMultiMemberGroupInvitationCreate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMultiMemberGroupInvitationCreate, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupInvitationCreate; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupInvitationCreate; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupInvitationCreate; - public static toObject(message: berty.types.v1.MultiMemberGroupInvitationCreate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupInvitationCreate; + public static toObject(message: berty.protocol.v1.MultiMemberGroupInvitationCreate, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -2984,32 +2985,32 @@ export namespace berty { class Request implements IRequest { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.MultiMemberGroupInvitationCreate.IRequest): berty.types.v1.MultiMemberGroupInvitationCreate.Request; - public static encode(message: berty.types.v1.MultiMemberGroupInvitationCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupInvitationCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupInvitationCreate.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupInvitationCreate.Request; + public static create(properties?: berty.protocol.v1.MultiMemberGroupInvitationCreate.IRequest): berty.protocol.v1.MultiMemberGroupInvitationCreate.Request; + public static encode(message: berty.protocol.v1.MultiMemberGroupInvitationCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupInvitationCreate.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupInvitationCreate.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupInvitationCreate.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupInvitationCreate.Request; - public static toObject(message: berty.types.v1.MultiMemberGroupInvitationCreate.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupInvitationCreate.Request; + public static toObject(message: berty.protocol.v1.MultiMemberGroupInvitationCreate.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { - group?: (berty.types.v1.IGroup|null); + group?: (berty.protocol.v1.IGroup|null); } class Reply implements IReply { - public group?: (berty.types.v1.IGroup|null); - public static create(properties?: berty.types.v1.MultiMemberGroupInvitationCreate.IReply): berty.types.v1.MultiMemberGroupInvitationCreate.Reply; - public static encode(message: berty.types.v1.MultiMemberGroupInvitationCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MultiMemberGroupInvitationCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MultiMemberGroupInvitationCreate.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MultiMemberGroupInvitationCreate.Reply; + public group?: (berty.protocol.v1.IGroup|null); + public static create(properties?: berty.protocol.v1.MultiMemberGroupInvitationCreate.IReply): berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply; + public static encode(message: berty.protocol.v1.MultiMemberGroupInvitationCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MultiMemberGroupInvitationCreate.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MultiMemberGroupInvitationCreate.Reply; - public static toObject(message: berty.types.v1.MultiMemberGroupInvitationCreate.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply; + public static toObject(message: berty.protocol.v1.MultiMemberGroupInvitationCreate.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3019,14 +3020,14 @@ export namespace berty { class AppMetadataSend implements IAppMetadataSend { - public static create(properties?: berty.types.v1.IAppMetadataSend): berty.types.v1.AppMetadataSend; - public static encode(message: berty.types.v1.IAppMetadataSend, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAppMetadataSend, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AppMetadataSend; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AppMetadataSend; + public static create(properties?: berty.protocol.v1.IAppMetadataSend): berty.protocol.v1.AppMetadataSend; + public static encode(message: berty.protocol.v1.IAppMetadataSend, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAppMetadataSend, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AppMetadataSend; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AppMetadataSend; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AppMetadataSend; - public static toObject(message: berty.types.v1.AppMetadataSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AppMetadataSend; + public static toObject(message: berty.protocol.v1.AppMetadataSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3043,14 +3044,14 @@ export namespace berty { public groupPk: Uint8Array; public payload: Uint8Array; public attachmentCids: Uint8Array[]; - public static create(properties?: berty.types.v1.AppMetadataSend.IRequest): berty.types.v1.AppMetadataSend.Request; - public static encode(message: berty.types.v1.AppMetadataSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AppMetadataSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AppMetadataSend.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AppMetadataSend.Request; + public static create(properties?: berty.protocol.v1.AppMetadataSend.IRequest): berty.protocol.v1.AppMetadataSend.Request; + public static encode(message: berty.protocol.v1.AppMetadataSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AppMetadataSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AppMetadataSend.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AppMetadataSend.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AppMetadataSend.Request; - public static toObject(message: berty.types.v1.AppMetadataSend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AppMetadataSend.Request; + public static toObject(message: berty.protocol.v1.AppMetadataSend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3059,14 +3060,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.AppMetadataSend.IReply): berty.types.v1.AppMetadataSend.Reply; - public static encode(message: berty.types.v1.AppMetadataSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AppMetadataSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AppMetadataSend.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AppMetadataSend.Reply; + public static create(properties?: berty.protocol.v1.AppMetadataSend.IReply): berty.protocol.v1.AppMetadataSend.Reply; + public static encode(message: berty.protocol.v1.AppMetadataSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AppMetadataSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AppMetadataSend.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AppMetadataSend.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AppMetadataSend.Reply; - public static toObject(message: berty.types.v1.AppMetadataSend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AppMetadataSend.Reply; + public static toObject(message: berty.protocol.v1.AppMetadataSend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3076,14 +3077,14 @@ export namespace berty { class AppMessageSend implements IAppMessageSend { - public static create(properties?: berty.types.v1.IAppMessageSend): berty.types.v1.AppMessageSend; - public static encode(message: berty.types.v1.IAppMessageSend, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAppMessageSend, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AppMessageSend; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AppMessageSend; + public static create(properties?: berty.protocol.v1.IAppMessageSend): berty.protocol.v1.AppMessageSend; + public static encode(message: berty.protocol.v1.IAppMessageSend, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAppMessageSend, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AppMessageSend; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AppMessageSend; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AppMessageSend; - public static toObject(message: berty.types.v1.AppMessageSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AppMessageSend; + public static toObject(message: berty.protocol.v1.AppMessageSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3100,14 +3101,14 @@ export namespace berty { public groupPk: Uint8Array; public payload: Uint8Array; public attachmentCids: Uint8Array[]; - public static create(properties?: berty.types.v1.AppMessageSend.IRequest): berty.types.v1.AppMessageSend.Request; - public static encode(message: berty.types.v1.AppMessageSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AppMessageSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AppMessageSend.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AppMessageSend.Request; + public static create(properties?: berty.protocol.v1.AppMessageSend.IRequest): berty.protocol.v1.AppMessageSend.Request; + public static encode(message: berty.protocol.v1.AppMessageSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AppMessageSend.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AppMessageSend.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AppMessageSend.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AppMessageSend.Request; - public static toObject(message: berty.types.v1.AppMessageSend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AppMessageSend.Request; + public static toObject(message: berty.protocol.v1.AppMessageSend.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3116,59 +3117,59 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.AppMessageSend.IReply): berty.types.v1.AppMessageSend.Reply; - public static encode(message: berty.types.v1.AppMessageSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AppMessageSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AppMessageSend.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AppMessageSend.Reply; + public static create(properties?: berty.protocol.v1.AppMessageSend.IReply): berty.protocol.v1.AppMessageSend.Reply; + public static encode(message: berty.protocol.v1.AppMessageSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AppMessageSend.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AppMessageSend.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AppMessageSend.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AppMessageSend.Reply; - public static toObject(message: berty.types.v1.AppMessageSend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AppMessageSend.Reply; + public static toObject(message: berty.protocol.v1.AppMessageSend.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } interface IGroupMetadataEvent { - eventContext?: (berty.types.v1.IEventContext|null); - metadata?: (berty.types.v1.IGroupMetadata|null); + eventContext?: (berty.protocol.v1.IEventContext|null); + metadata?: (berty.protocol.v1.IGroupMetadata|null); event?: (Uint8Array|null); } class GroupMetadataEvent implements IGroupMetadataEvent { - public eventContext?: (berty.types.v1.IEventContext|null); - public metadata?: (berty.types.v1.IGroupMetadata|null); + public eventContext?: (berty.protocol.v1.IEventContext|null); + public metadata?: (berty.protocol.v1.IGroupMetadata|null); public event: Uint8Array; - public static create(properties?: berty.types.v1.IGroupMetadataEvent): berty.types.v1.GroupMetadataEvent; - public static encode(message: berty.types.v1.IGroupMetadataEvent, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupMetadataEvent, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupMetadataEvent; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupMetadataEvent; + public static create(properties?: berty.protocol.v1.IGroupMetadataEvent): berty.protocol.v1.GroupMetadataEvent; + public static encode(message: berty.protocol.v1.IGroupMetadataEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupMetadataEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupMetadataEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupMetadataEvent; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupMetadataEvent; - public static toObject(message: berty.types.v1.GroupMetadataEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupMetadataEvent; + public static toObject(message: berty.protocol.v1.GroupMetadataEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IGroupMessageEvent { - eventContext?: (berty.types.v1.IEventContext|null); - headers?: (berty.types.v1.IMessageHeaders|null); + eventContext?: (berty.protocol.v1.IEventContext|null); + headers?: (berty.protocol.v1.IMessageHeaders|null); message?: (Uint8Array|null); } class GroupMessageEvent implements IGroupMessageEvent { - public eventContext?: (berty.types.v1.IEventContext|null); - public headers?: (berty.types.v1.IMessageHeaders|null); + public eventContext?: (berty.protocol.v1.IEventContext|null); + public headers?: (berty.protocol.v1.IMessageHeaders|null); public message: Uint8Array; - public static create(properties?: berty.types.v1.IGroupMessageEvent): berty.types.v1.GroupMessageEvent; - public static encode(message: berty.types.v1.IGroupMessageEvent, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupMessageEvent, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupMessageEvent; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupMessageEvent; + public static create(properties?: berty.protocol.v1.IGroupMessageEvent): berty.protocol.v1.GroupMessageEvent; + public static encode(message: berty.protocol.v1.IGroupMessageEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupMessageEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupMessageEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupMessageEvent; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupMessageEvent; - public static toObject(message: berty.types.v1.GroupMessageEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupMessageEvent; + public static toObject(message: berty.protocol.v1.GroupMessageEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3177,14 +3178,14 @@ export namespace berty { class GroupMetadataList implements IGroupMetadataList { - public static create(properties?: berty.types.v1.IGroupMetadataList): berty.types.v1.GroupMetadataList; - public static encode(message: berty.types.v1.IGroupMetadataList, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupMetadataList, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupMetadataList; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupMetadataList; + public static create(properties?: berty.protocol.v1.IGroupMetadataList): berty.protocol.v1.GroupMetadataList; + public static encode(message: berty.protocol.v1.IGroupMetadataList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupMetadataList, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupMetadataList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupMetadataList; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupMetadataList; - public static toObject(message: berty.types.v1.GroupMetadataList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupMetadataList; + public static toObject(message: berty.protocol.v1.GroupMetadataList, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3207,14 +3208,14 @@ export namespace berty { public untilId: Uint8Array; public untilNow: boolean; public reverseOrder: boolean; - public static create(properties?: berty.types.v1.GroupMetadataList.IRequest): berty.types.v1.GroupMetadataList.Request; - public static encode(message: berty.types.v1.GroupMetadataList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.GroupMetadataList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupMetadataList.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupMetadataList.Request; + public static create(properties?: berty.protocol.v1.GroupMetadataList.IRequest): berty.protocol.v1.GroupMetadataList.Request; + public static encode(message: berty.protocol.v1.GroupMetadataList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.GroupMetadataList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupMetadataList.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupMetadataList.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupMetadataList.Request; - public static toObject(message: berty.types.v1.GroupMetadataList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupMetadataList.Request; + public static toObject(message: berty.protocol.v1.GroupMetadataList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3224,14 +3225,14 @@ export namespace berty { class GroupMessageList implements IGroupMessageList { - public static create(properties?: berty.types.v1.IGroupMessageList): berty.types.v1.GroupMessageList; - public static encode(message: berty.types.v1.IGroupMessageList, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupMessageList, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupMessageList; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupMessageList; + public static create(properties?: berty.protocol.v1.IGroupMessageList): berty.protocol.v1.GroupMessageList; + public static encode(message: berty.protocol.v1.IGroupMessageList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupMessageList, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupMessageList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupMessageList; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupMessageList; - public static toObject(message: berty.types.v1.GroupMessageList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupMessageList; + public static toObject(message: berty.protocol.v1.GroupMessageList, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3254,14 +3255,14 @@ export namespace berty { public untilId: Uint8Array; public untilNow: boolean; public reverseOrder: boolean; - public static create(properties?: berty.types.v1.GroupMessageList.IRequest): berty.types.v1.GroupMessageList.Request; - public static encode(message: berty.types.v1.GroupMessageList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.GroupMessageList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupMessageList.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupMessageList.Request; + public static create(properties?: berty.protocol.v1.GroupMessageList.IRequest): berty.protocol.v1.GroupMessageList.Request; + public static encode(message: berty.protocol.v1.GroupMessageList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.GroupMessageList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupMessageList.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupMessageList.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupMessageList.Request; - public static toObject(message: berty.types.v1.GroupMessageList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupMessageList.Request; + public static toObject(message: berty.protocol.v1.GroupMessageList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3271,14 +3272,14 @@ export namespace berty { class GroupInfo implements IGroupInfo { - public static create(properties?: berty.types.v1.IGroupInfo): berty.types.v1.GroupInfo; - public static encode(message: berty.types.v1.IGroupInfo, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IGroupInfo, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupInfo; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupInfo; + public static create(properties?: berty.protocol.v1.IGroupInfo): berty.protocol.v1.GroupInfo; + public static encode(message: berty.protocol.v1.IGroupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IGroupInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupInfo; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupInfo; - public static toObject(message: berty.types.v1.GroupInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupInfo; + public static toObject(message: berty.protocol.v1.GroupInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3293,36 +3294,36 @@ export namespace berty { public groupPk: Uint8Array; public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.GroupInfo.IRequest): berty.types.v1.GroupInfo.Request; - public static encode(message: berty.types.v1.GroupInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.GroupInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupInfo.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupInfo.Request; + public static create(properties?: berty.protocol.v1.GroupInfo.IRequest): berty.protocol.v1.GroupInfo.Request; + public static encode(message: berty.protocol.v1.GroupInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.GroupInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupInfo.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupInfo.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupInfo.Request; - public static toObject(message: berty.types.v1.GroupInfo.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupInfo.Request; + public static toObject(message: berty.protocol.v1.GroupInfo.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { - group?: (berty.types.v1.IGroup|null); + group?: (berty.protocol.v1.IGroup|null); memberPk?: (Uint8Array|null); devicePk?: (Uint8Array|null); } class Reply implements IReply { - public group?: (berty.types.v1.IGroup|null); + public group?: (berty.protocol.v1.IGroup|null); public memberPk: Uint8Array; public devicePk: Uint8Array; - public static create(properties?: berty.types.v1.GroupInfo.IReply): berty.types.v1.GroupInfo.Reply; - public static encode(message: berty.types.v1.GroupInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.GroupInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.GroupInfo.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.GroupInfo.Reply; + public static create(properties?: berty.protocol.v1.GroupInfo.IReply): berty.protocol.v1.GroupInfo.Reply; + public static encode(message: berty.protocol.v1.GroupInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.GroupInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.GroupInfo.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.GroupInfo.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.GroupInfo.Reply; - public static toObject(message: berty.types.v1.GroupInfo.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.GroupInfo.Reply; + public static toObject(message: berty.protocol.v1.GroupInfo.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3332,14 +3333,14 @@ export namespace berty { class ActivateGroup implements IActivateGroup { - public static create(properties?: berty.types.v1.IActivateGroup): berty.types.v1.ActivateGroup; - public static encode(message: berty.types.v1.IActivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IActivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ActivateGroup; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ActivateGroup; + public static create(properties?: berty.protocol.v1.IActivateGroup): berty.protocol.v1.ActivateGroup; + public static encode(message: berty.protocol.v1.IActivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IActivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ActivateGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ActivateGroup; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ActivateGroup; - public static toObject(message: berty.types.v1.ActivateGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ActivateGroup; + public static toObject(message: berty.protocol.v1.ActivateGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3354,14 +3355,14 @@ export namespace berty { public groupPk: Uint8Array; public localOnly: boolean; - public static create(properties?: berty.types.v1.ActivateGroup.IRequest): berty.types.v1.ActivateGroup.Request; - public static encode(message: berty.types.v1.ActivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ActivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ActivateGroup.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ActivateGroup.Request; + public static create(properties?: berty.protocol.v1.ActivateGroup.IRequest): berty.protocol.v1.ActivateGroup.Request; + public static encode(message: berty.protocol.v1.ActivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ActivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ActivateGroup.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ActivateGroup.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ActivateGroup.Request; - public static toObject(message: berty.types.v1.ActivateGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ActivateGroup.Request; + public static toObject(message: berty.protocol.v1.ActivateGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3370,14 +3371,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ActivateGroup.IReply): berty.types.v1.ActivateGroup.Reply; - public static encode(message: berty.types.v1.ActivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ActivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ActivateGroup.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ActivateGroup.Reply; + public static create(properties?: berty.protocol.v1.ActivateGroup.IReply): berty.protocol.v1.ActivateGroup.Reply; + public static encode(message: berty.protocol.v1.ActivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ActivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ActivateGroup.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ActivateGroup.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ActivateGroup.Reply; - public static toObject(message: berty.types.v1.ActivateGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ActivateGroup.Reply; + public static toObject(message: berty.protocol.v1.ActivateGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3387,14 +3388,14 @@ export namespace berty { class DeactivateGroup implements IDeactivateGroup { - public static create(properties?: berty.types.v1.IDeactivateGroup): berty.types.v1.DeactivateGroup; - public static encode(message: berty.types.v1.IDeactivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IDeactivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DeactivateGroup; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DeactivateGroup; + public static create(properties?: berty.protocol.v1.IDeactivateGroup): berty.protocol.v1.DeactivateGroup; + public static encode(message: berty.protocol.v1.IDeactivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IDeactivateGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DeactivateGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DeactivateGroup; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DeactivateGroup; - public static toObject(message: berty.types.v1.DeactivateGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DeactivateGroup; + public static toObject(message: berty.protocol.v1.DeactivateGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3407,14 +3408,14 @@ export namespace berty { class Request implements IRequest { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.DeactivateGroup.IRequest): berty.types.v1.DeactivateGroup.Request; - public static encode(message: berty.types.v1.DeactivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DeactivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DeactivateGroup.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DeactivateGroup.Request; + public static create(properties?: berty.protocol.v1.DeactivateGroup.IRequest): berty.protocol.v1.DeactivateGroup.Request; + public static encode(message: berty.protocol.v1.DeactivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DeactivateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DeactivateGroup.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DeactivateGroup.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DeactivateGroup.Request; - public static toObject(message: berty.types.v1.DeactivateGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DeactivateGroup.Request; + public static toObject(message: berty.protocol.v1.DeactivateGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3423,14 +3424,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.DeactivateGroup.IReply): berty.types.v1.DeactivateGroup.Reply; - public static encode(message: berty.types.v1.DeactivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DeactivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DeactivateGroup.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DeactivateGroup.Reply; + public static create(properties?: berty.protocol.v1.DeactivateGroup.IReply): berty.protocol.v1.DeactivateGroup.Reply; + public static encode(message: berty.protocol.v1.DeactivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DeactivateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DeactivateGroup.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DeactivateGroup.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DeactivateGroup.Reply; - public static toObject(message: berty.types.v1.DeactivateGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DeactivateGroup.Reply; + public static toObject(message: berty.protocol.v1.DeactivateGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3440,14 +3441,14 @@ export namespace berty { class MonitorGroup implements IMonitorGroup { - public static create(properties?: berty.types.v1.IMonitorGroup): berty.types.v1.MonitorGroup; - public static encode(message: berty.types.v1.IMonitorGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IMonitorGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup; + public static create(properties?: berty.protocol.v1.IMonitorGroup): berty.protocol.v1.MonitorGroup; + public static encode(message: berty.protocol.v1.IMonitorGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IMonitorGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup; - public static toObject(message: berty.types.v1.MonitorGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup; + public static toObject(message: berty.protocol.v1.MonitorGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3474,14 +3475,14 @@ export namespace berty { public maddrs: string[]; public driverName: string; public topic: string; - public static create(properties?: berty.types.v1.MonitorGroup.IEventMonitorAdvertiseGroup): berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup; - public static encode(message: berty.types.v1.MonitorGroup.IEventMonitorAdvertiseGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MonitorGroup.IEventMonitorAdvertiseGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup; + public static create(properties?: berty.protocol.v1.MonitorGroup.IEventMonitorAdvertiseGroup): berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup; + public static encode(message: berty.protocol.v1.MonitorGroup.IEventMonitorAdvertiseGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MonitorGroup.IEventMonitorAdvertiseGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup; - public static toObject(message: berty.types.v1.MonitorGroup.EventMonitorAdvertiseGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup; + public static toObject(message: berty.protocol.v1.MonitorGroup.EventMonitorAdvertiseGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3498,14 +3499,14 @@ export namespace berty { public maddrs: string[]; public driverName: string; public topic: string; - public static create(properties?: berty.types.v1.MonitorGroup.IEventMonitorPeerFound): berty.types.v1.MonitorGroup.EventMonitorPeerFound; - public static encode(message: berty.types.v1.MonitorGroup.IEventMonitorPeerFound, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MonitorGroup.IEventMonitorPeerFound, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup.EventMonitorPeerFound; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup.EventMonitorPeerFound; + public static create(properties?: berty.protocol.v1.MonitorGroup.IEventMonitorPeerFound): berty.protocol.v1.MonitorGroup.EventMonitorPeerFound; + public static encode(message: berty.protocol.v1.MonitorGroup.IEventMonitorPeerFound, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MonitorGroup.IEventMonitorPeerFound, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup.EventMonitorPeerFound; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup.EventMonitorPeerFound; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup.EventMonitorPeerFound; - public static toObject(message: berty.types.v1.MonitorGroup.EventMonitorPeerFound, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup.EventMonitorPeerFound; + public static toObject(message: berty.protocol.v1.MonitorGroup.EventMonitorPeerFound, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3522,14 +3523,14 @@ export namespace berty { public maddrs: string[]; public topic: string; public isSelf: boolean; - public static create(properties?: berty.types.v1.MonitorGroup.IEventMonitorPeerJoin): berty.types.v1.MonitorGroup.EventMonitorPeerJoin; - public static encode(message: berty.types.v1.MonitorGroup.IEventMonitorPeerJoin, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MonitorGroup.IEventMonitorPeerJoin, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup.EventMonitorPeerJoin; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup.EventMonitorPeerJoin; + public static create(properties?: berty.protocol.v1.MonitorGroup.IEventMonitorPeerJoin): berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin; + public static encode(message: berty.protocol.v1.MonitorGroup.IEventMonitorPeerJoin, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MonitorGroup.IEventMonitorPeerJoin, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup.EventMonitorPeerJoin; - public static toObject(message: berty.types.v1.MonitorGroup.EventMonitorPeerJoin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin; + public static toObject(message: berty.protocol.v1.MonitorGroup.EventMonitorPeerJoin, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3544,40 +3545,40 @@ export namespace berty { public peerId: string; public topic: string; public isSelf: boolean; - public static create(properties?: berty.types.v1.MonitorGroup.IEventMonitorPeerLeave): berty.types.v1.MonitorGroup.EventMonitorPeerLeave; - public static encode(message: berty.types.v1.MonitorGroup.IEventMonitorPeerLeave, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MonitorGroup.IEventMonitorPeerLeave, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup.EventMonitorPeerLeave; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup.EventMonitorPeerLeave; + public static create(properties?: berty.protocol.v1.MonitorGroup.IEventMonitorPeerLeave): berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave; + public static encode(message: berty.protocol.v1.MonitorGroup.IEventMonitorPeerLeave, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MonitorGroup.IEventMonitorPeerLeave, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup.EventMonitorPeerLeave; - public static toObject(message: berty.types.v1.MonitorGroup.EventMonitorPeerLeave, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave; + public static toObject(message: berty.protocol.v1.MonitorGroup.EventMonitorPeerLeave, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IEventMonitor { - type?: (berty.types.v1.MonitorGroup.TypeEventMonitor|null); - advertiseGroup?: (berty.types.v1.MonitorGroup.IEventMonitorAdvertiseGroup|null); - peerFound?: (berty.types.v1.MonitorGroup.IEventMonitorPeerFound|null); - peerJoin?: (berty.types.v1.MonitorGroup.IEventMonitorPeerJoin|null); - peerLeave?: (berty.types.v1.MonitorGroup.IEventMonitorPeerLeave|null); + type?: (berty.protocol.v1.MonitorGroup.TypeEventMonitor|null); + advertiseGroup?: (berty.protocol.v1.MonitorGroup.IEventMonitorAdvertiseGroup|null); + peerFound?: (berty.protocol.v1.MonitorGroup.IEventMonitorPeerFound|null); + peerJoin?: (berty.protocol.v1.MonitorGroup.IEventMonitorPeerJoin|null); + peerLeave?: (berty.protocol.v1.MonitorGroup.IEventMonitorPeerLeave|null); } class EventMonitor implements IEventMonitor { - public type: berty.types.v1.MonitorGroup.TypeEventMonitor; - public advertiseGroup?: (berty.types.v1.MonitorGroup.IEventMonitorAdvertiseGroup|null); - public peerFound?: (berty.types.v1.MonitorGroup.IEventMonitorPeerFound|null); - public peerJoin?: (berty.types.v1.MonitorGroup.IEventMonitorPeerJoin|null); - public peerLeave?: (berty.types.v1.MonitorGroup.IEventMonitorPeerLeave|null); - public static create(properties?: berty.types.v1.MonitorGroup.IEventMonitor): berty.types.v1.MonitorGroup.EventMonitor; - public static encode(message: berty.types.v1.MonitorGroup.IEventMonitor, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MonitorGroup.IEventMonitor, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup.EventMonitor; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup.EventMonitor; + public type: berty.protocol.v1.MonitorGroup.TypeEventMonitor; + public advertiseGroup?: (berty.protocol.v1.MonitorGroup.IEventMonitorAdvertiseGroup|null); + public peerFound?: (berty.protocol.v1.MonitorGroup.IEventMonitorPeerFound|null); + public peerJoin?: (berty.protocol.v1.MonitorGroup.IEventMonitorPeerJoin|null); + public peerLeave?: (berty.protocol.v1.MonitorGroup.IEventMonitorPeerLeave|null); + public static create(properties?: berty.protocol.v1.MonitorGroup.IEventMonitor): berty.protocol.v1.MonitorGroup.EventMonitor; + public static encode(message: berty.protocol.v1.MonitorGroup.IEventMonitor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MonitorGroup.IEventMonitor, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup.EventMonitor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup.EventMonitor; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup.EventMonitor; - public static toObject(message: berty.types.v1.MonitorGroup.EventMonitor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup.EventMonitor; + public static toObject(message: berty.protocol.v1.MonitorGroup.EventMonitor, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3588,34 +3589,34 @@ export namespace berty { class Request implements IRequest { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.MonitorGroup.IRequest): berty.types.v1.MonitorGroup.Request; - public static encode(message: berty.types.v1.MonitorGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MonitorGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup.Request; + public static create(properties?: berty.protocol.v1.MonitorGroup.IRequest): berty.protocol.v1.MonitorGroup.Request; + public static encode(message: berty.protocol.v1.MonitorGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MonitorGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup.Request; - public static toObject(message: berty.types.v1.MonitorGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup.Request; + public static toObject(message: berty.protocol.v1.MonitorGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { - event?: (berty.types.v1.MonitorGroup.IEventMonitor|null); + event?: (berty.protocol.v1.MonitorGroup.IEventMonitor|null); groupPk?: (Uint8Array|null); } class Reply implements IReply { - public event?: (berty.types.v1.MonitorGroup.IEventMonitor|null); + public event?: (berty.protocol.v1.MonitorGroup.IEventMonitor|null); public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.MonitorGroup.IReply): berty.types.v1.MonitorGroup.Reply; - public static encode(message: berty.types.v1.MonitorGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.MonitorGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.MonitorGroup.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.MonitorGroup.Reply; + public static create(properties?: berty.protocol.v1.MonitorGroup.IReply): berty.protocol.v1.MonitorGroup.Reply; + public static encode(message: berty.protocol.v1.MonitorGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.MonitorGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.MonitorGroup.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.MonitorGroup.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.MonitorGroup.Reply; - public static toObject(message: berty.types.v1.MonitorGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.MonitorGroup.Reply; + public static toObject(message: berty.protocol.v1.MonitorGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3625,14 +3626,14 @@ export namespace berty { class DebugListGroups implements IDebugListGroups { - public static create(properties?: berty.types.v1.IDebugListGroups): berty.types.v1.DebugListGroups; - public static encode(message: berty.types.v1.IDebugListGroups, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IDebugListGroups, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugListGroups; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugListGroups; + public static create(properties?: berty.protocol.v1.IDebugListGroups): berty.protocol.v1.DebugListGroups; + public static encode(message: berty.protocol.v1.IDebugListGroups, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IDebugListGroups, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugListGroups; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugListGroups; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugListGroups; - public static toObject(message: berty.types.v1.DebugListGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugListGroups; + public static toObject(message: berty.protocol.v1.DebugListGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3643,36 +3644,36 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.DebugListGroups.IRequest): berty.types.v1.DebugListGroups.Request; - public static encode(message: berty.types.v1.DebugListGroups.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DebugListGroups.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugListGroups.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugListGroups.Request; + public static create(properties?: berty.protocol.v1.DebugListGroups.IRequest): berty.protocol.v1.DebugListGroups.Request; + public static encode(message: berty.protocol.v1.DebugListGroups.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DebugListGroups.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugListGroups.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugListGroups.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugListGroups.Request; - public static toObject(message: berty.types.v1.DebugListGroups.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugListGroups.Request; + public static toObject(message: berty.protocol.v1.DebugListGroups.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { groupPk?: (Uint8Array|null); - groupType?: (berty.types.v1.GroupType|null); + groupType?: (berty.protocol.v1.GroupType|null); contactPk?: (Uint8Array|null); } class Reply implements IReply { public groupPk: Uint8Array; - public groupType: berty.types.v1.GroupType; + public groupType: berty.protocol.v1.GroupType; public contactPk: Uint8Array; - public static create(properties?: berty.types.v1.DebugListGroups.IReply): berty.types.v1.DebugListGroups.Reply; - public static encode(message: berty.types.v1.DebugListGroups.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DebugListGroups.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugListGroups.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugListGroups.Reply; + public static create(properties?: berty.protocol.v1.DebugListGroups.IReply): berty.protocol.v1.DebugListGroups.Reply; + public static encode(message: berty.protocol.v1.DebugListGroups.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DebugListGroups.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugListGroups.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugListGroups.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugListGroups.Reply; - public static toObject(message: berty.types.v1.DebugListGroups.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugListGroups.Reply; + public static toObject(message: berty.protocol.v1.DebugListGroups.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3682,14 +3683,14 @@ export namespace berty { class DebugInspectGroupStore implements IDebugInspectGroupStore { - public static create(properties?: berty.types.v1.IDebugInspectGroupStore): berty.types.v1.DebugInspectGroupStore; - public static encode(message: berty.types.v1.IDebugInspectGroupStore, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IDebugInspectGroupStore, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugInspectGroupStore; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugInspectGroupStore; + public static create(properties?: berty.protocol.v1.IDebugInspectGroupStore): berty.protocol.v1.DebugInspectGroupStore; + public static encode(message: berty.protocol.v1.IDebugInspectGroupStore, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IDebugInspectGroupStore, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugInspectGroupStore; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugInspectGroupStore; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugInspectGroupStore; - public static toObject(message: berty.types.v1.DebugInspectGroupStore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugInspectGroupStore; + public static toObject(message: berty.protocol.v1.DebugInspectGroupStore, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3697,28 +3698,28 @@ export namespace berty { interface IRequest { groupPk?: (Uint8Array|null); - logType?: (berty.types.v1.DebugInspectGroupLogType|null); + logType?: (berty.protocol.v1.DebugInspectGroupLogType|null); } class Request implements IRequest { public groupPk: Uint8Array; - public logType: berty.types.v1.DebugInspectGroupLogType; - public static create(properties?: berty.types.v1.DebugInspectGroupStore.IRequest): berty.types.v1.DebugInspectGroupStore.Request; - public static encode(message: berty.types.v1.DebugInspectGroupStore.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DebugInspectGroupStore.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugInspectGroupStore.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugInspectGroupStore.Request; + public logType: berty.protocol.v1.DebugInspectGroupLogType; + public static create(properties?: berty.protocol.v1.DebugInspectGroupStore.IRequest): berty.protocol.v1.DebugInspectGroupStore.Request; + public static encode(message: berty.protocol.v1.DebugInspectGroupStore.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DebugInspectGroupStore.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugInspectGroupStore.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugInspectGroupStore.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugInspectGroupStore.Request; - public static toObject(message: berty.types.v1.DebugInspectGroupStore.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugInspectGroupStore.Request; + public static toObject(message: berty.protocol.v1.DebugInspectGroupStore.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { cid?: (Uint8Array|null); parentCids?: (Uint8Array[]|null); - metadataEventType?: (berty.types.v1.EventType|null); + metadataEventType?: (berty.protocol.v1.EventType|null); devicePk?: (Uint8Array|null); payload?: (Uint8Array|null); } @@ -3727,17 +3728,17 @@ export namespace berty { public cid: Uint8Array; public parentCids: Uint8Array[]; - public metadataEventType: berty.types.v1.EventType; + public metadataEventType: berty.protocol.v1.EventType; public devicePk: Uint8Array; public payload: Uint8Array; - public static create(properties?: berty.types.v1.DebugInspectGroupStore.IReply): berty.types.v1.DebugInspectGroupStore.Reply; - public static encode(message: berty.types.v1.DebugInspectGroupStore.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DebugInspectGroupStore.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugInspectGroupStore.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugInspectGroupStore.Reply; + public static create(properties?: berty.protocol.v1.DebugInspectGroupStore.IReply): berty.protocol.v1.DebugInspectGroupStore.Reply; + public static encode(message: berty.protocol.v1.DebugInspectGroupStore.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DebugInspectGroupStore.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugInspectGroupStore.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugInspectGroupStore.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugInspectGroupStore.Reply; - public static toObject(message: berty.types.v1.DebugInspectGroupStore.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugInspectGroupStore.Reply; + public static toObject(message: berty.protocol.v1.DebugInspectGroupStore.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3747,14 +3748,14 @@ export namespace berty { class DebugGroup implements IDebugGroup { - public static create(properties?: berty.types.v1.IDebugGroup): berty.types.v1.DebugGroup; - public static encode(message: berty.types.v1.IDebugGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IDebugGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugGroup; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugGroup; + public static create(properties?: berty.protocol.v1.IDebugGroup): berty.protocol.v1.DebugGroup; + public static encode(message: berty.protocol.v1.IDebugGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IDebugGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugGroup; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugGroup; - public static toObject(message: berty.types.v1.DebugGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugGroup; + public static toObject(message: berty.protocol.v1.DebugGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3767,14 +3768,14 @@ export namespace berty { class Request implements IRequest { public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.DebugGroup.IRequest): berty.types.v1.DebugGroup.Request; - public static encode(message: berty.types.v1.DebugGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DebugGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugGroup.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugGroup.Request; + public static create(properties?: berty.protocol.v1.DebugGroup.IRequest): berty.protocol.v1.DebugGroup.Request; + public static encode(message: berty.protocol.v1.DebugGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DebugGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugGroup.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugGroup.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugGroup.Request; - public static toObject(message: berty.types.v1.DebugGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugGroup.Request; + public static toObject(message: berty.protocol.v1.DebugGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3785,14 +3786,14 @@ export namespace berty { class Reply implements IReply { public peerIds: string[]; - public static create(properties?: berty.types.v1.DebugGroup.IReply): berty.types.v1.DebugGroup.Reply; - public static encode(message: berty.types.v1.DebugGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.DebugGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.DebugGroup.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.DebugGroup.Reply; + public static create(properties?: berty.protocol.v1.DebugGroup.IReply): berty.protocol.v1.DebugGroup.Reply; + public static encode(message: berty.protocol.v1.DebugGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.DebugGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.DebugGroup.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.DebugGroup.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.DebugGroup.Reply; - public static toObject(message: berty.types.v1.DebugGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.DebugGroup.Reply; + public static toObject(message: berty.protocol.v1.DebugGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3824,14 +3825,14 @@ export namespace berty { public pk: Uint8Array; public publicRendezvousSeed: Uint8Array; public metadata: Uint8Array; - public static create(properties?: berty.types.v1.IShareableContact): berty.types.v1.ShareableContact; - public static encode(message: berty.types.v1.IShareableContact, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IShareableContact, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ShareableContact; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ShareableContact; + public static create(properties?: berty.protocol.v1.IShareableContact): berty.protocol.v1.ShareableContact; + public static encode(message: berty.protocol.v1.IShareableContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IShareableContact, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ShareableContact; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ShareableContact; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ShareableContact; - public static toObject(message: berty.types.v1.ShareableContact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ShareableContact; + public static toObject(message: berty.protocol.v1.ShareableContact, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3844,21 +3845,21 @@ export namespace berty { public serviceType: string; public serviceEndpoint: string; - public static create(properties?: berty.types.v1.IServiceTokenSupportedService): berty.types.v1.ServiceTokenSupportedService; - public static encode(message: berty.types.v1.IServiceTokenSupportedService, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IServiceTokenSupportedService, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ServiceTokenSupportedService; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ServiceTokenSupportedService; + public static create(properties?: berty.protocol.v1.IServiceTokenSupportedService): berty.protocol.v1.ServiceTokenSupportedService; + public static encode(message: berty.protocol.v1.IServiceTokenSupportedService, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IServiceTokenSupportedService, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ServiceTokenSupportedService; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ServiceTokenSupportedService; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ServiceTokenSupportedService; - public static toObject(message: berty.types.v1.ServiceTokenSupportedService, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ServiceTokenSupportedService; + public static toObject(message: berty.protocol.v1.ServiceTokenSupportedService, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IServiceToken { token?: (string|null); authenticationUrl?: (string|null); - supportedServices?: (berty.types.v1.IServiceTokenSupportedService[]|null); + supportedServices?: (berty.protocol.v1.IServiceTokenSupportedService[]|null); expiration?: (Long|null); } @@ -3866,16 +3867,16 @@ export namespace berty { public token: string; public authenticationUrl: string; - public supportedServices: berty.types.v1.IServiceTokenSupportedService[]; + public supportedServices: berty.protocol.v1.IServiceTokenSupportedService[]; public expiration: Long; - public static create(properties?: berty.types.v1.IServiceToken): berty.types.v1.ServiceToken; - public static encode(message: berty.types.v1.IServiceToken, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IServiceToken, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ServiceToken; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ServiceToken; + public static create(properties?: berty.protocol.v1.IServiceToken): berty.protocol.v1.ServiceToken; + public static encode(message: berty.protocol.v1.IServiceToken, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IServiceToken, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ServiceToken; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ServiceToken; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ServiceToken; - public static toObject(message: berty.types.v1.ServiceToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ServiceToken; + public static toObject(message: berty.protocol.v1.ServiceToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3884,14 +3885,14 @@ export namespace berty { class AuthServiceCompleteFlow implements IAuthServiceCompleteFlow { - public static create(properties?: berty.types.v1.IAuthServiceCompleteFlow): berty.types.v1.AuthServiceCompleteFlow; - public static encode(message: berty.types.v1.IAuthServiceCompleteFlow, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAuthServiceCompleteFlow, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AuthServiceCompleteFlow; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AuthServiceCompleteFlow; + public static create(properties?: berty.protocol.v1.IAuthServiceCompleteFlow): berty.protocol.v1.AuthServiceCompleteFlow; + public static encode(message: berty.protocol.v1.IAuthServiceCompleteFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAuthServiceCompleteFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AuthServiceCompleteFlow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AuthServiceCompleteFlow; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AuthServiceCompleteFlow; - public static toObject(message: berty.types.v1.AuthServiceCompleteFlow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AuthServiceCompleteFlow; + public static toObject(message: berty.protocol.v1.AuthServiceCompleteFlow, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3904,14 +3905,14 @@ export namespace berty { class Request implements IRequest { public callbackUrl: string; - public static create(properties?: berty.types.v1.AuthServiceCompleteFlow.IRequest): berty.types.v1.AuthServiceCompleteFlow.Request; - public static encode(message: berty.types.v1.AuthServiceCompleteFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AuthServiceCompleteFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AuthServiceCompleteFlow.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AuthServiceCompleteFlow.Request; + public static create(properties?: berty.protocol.v1.AuthServiceCompleteFlow.IRequest): berty.protocol.v1.AuthServiceCompleteFlow.Request; + public static encode(message: berty.protocol.v1.AuthServiceCompleteFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AuthServiceCompleteFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AuthServiceCompleteFlow.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AuthServiceCompleteFlow.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AuthServiceCompleteFlow.Request; - public static toObject(message: berty.types.v1.AuthServiceCompleteFlow.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AuthServiceCompleteFlow.Request; + public static toObject(message: berty.protocol.v1.AuthServiceCompleteFlow.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3920,14 +3921,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.AuthServiceCompleteFlow.IReply): berty.types.v1.AuthServiceCompleteFlow.Reply; - public static encode(message: berty.types.v1.AuthServiceCompleteFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AuthServiceCompleteFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AuthServiceCompleteFlow.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AuthServiceCompleteFlow.Reply; + public static create(properties?: berty.protocol.v1.AuthServiceCompleteFlow.IReply): berty.protocol.v1.AuthServiceCompleteFlow.Reply; + public static encode(message: berty.protocol.v1.AuthServiceCompleteFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AuthServiceCompleteFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AuthServiceCompleteFlow.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AuthServiceCompleteFlow.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AuthServiceCompleteFlow.Reply; - public static toObject(message: berty.types.v1.AuthServiceCompleteFlow.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AuthServiceCompleteFlow.Reply; + public static toObject(message: berty.protocol.v1.AuthServiceCompleteFlow.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3937,14 +3938,14 @@ export namespace berty { class AuthServiceInitFlow implements IAuthServiceInitFlow { - public static create(properties?: berty.types.v1.IAuthServiceInitFlow): berty.types.v1.AuthServiceInitFlow; - public static encode(message: berty.types.v1.IAuthServiceInitFlow, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAuthServiceInitFlow, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AuthServiceInitFlow; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AuthServiceInitFlow; + public static create(properties?: berty.protocol.v1.IAuthServiceInitFlow): berty.protocol.v1.AuthServiceInitFlow; + public static encode(message: berty.protocol.v1.IAuthServiceInitFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAuthServiceInitFlow, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AuthServiceInitFlow; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AuthServiceInitFlow; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AuthServiceInitFlow; - public static toObject(message: berty.types.v1.AuthServiceInitFlow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AuthServiceInitFlow; + public static toObject(message: berty.protocol.v1.AuthServiceInitFlow, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3957,14 +3958,14 @@ export namespace berty { class Request implements IRequest { public authUrl: string; - public static create(properties?: berty.types.v1.AuthServiceInitFlow.IRequest): berty.types.v1.AuthServiceInitFlow.Request; - public static encode(message: berty.types.v1.AuthServiceInitFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AuthServiceInitFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AuthServiceInitFlow.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AuthServiceInitFlow.Request; + public static create(properties?: berty.protocol.v1.AuthServiceInitFlow.IRequest): berty.protocol.v1.AuthServiceInitFlow.Request; + public static encode(message: berty.protocol.v1.AuthServiceInitFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AuthServiceInitFlow.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AuthServiceInitFlow.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AuthServiceInitFlow.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AuthServiceInitFlow.Request; - public static toObject(message: berty.types.v1.AuthServiceInitFlow.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AuthServiceInitFlow.Request; + public static toObject(message: berty.protocol.v1.AuthServiceInitFlow.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -3977,14 +3978,14 @@ export namespace berty { public url: string; public secureUrl: boolean; - public static create(properties?: berty.types.v1.AuthServiceInitFlow.IReply): berty.types.v1.AuthServiceInitFlow.Reply; - public static encode(message: berty.types.v1.AuthServiceInitFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AuthServiceInitFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AuthServiceInitFlow.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AuthServiceInitFlow.Reply; + public static create(properties?: berty.protocol.v1.AuthServiceInitFlow.IReply): berty.protocol.v1.AuthServiceInitFlow.Reply; + public static encode(message: berty.protocol.v1.AuthServiceInitFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AuthServiceInitFlow.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AuthServiceInitFlow.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AuthServiceInitFlow.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AuthServiceInitFlow.Reply; - public static toObject(message: berty.types.v1.AuthServiceInitFlow.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AuthServiceInitFlow.Reply; + public static toObject(message: berty.protocol.v1.AuthServiceInitFlow.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -3994,14 +3995,14 @@ export namespace berty { class ServicesTokenList implements IServicesTokenList { - public static create(properties?: berty.types.v1.IServicesTokenList): berty.types.v1.ServicesTokenList; - public static encode(message: berty.types.v1.IServicesTokenList, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IServicesTokenList, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ServicesTokenList; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ServicesTokenList; + public static create(properties?: berty.protocol.v1.IServicesTokenList): berty.protocol.v1.ServicesTokenList; + public static encode(message: berty.protocol.v1.IServicesTokenList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IServicesTokenList, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ServicesTokenList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ServicesTokenList; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ServicesTokenList; - public static toObject(message: berty.types.v1.ServicesTokenList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ServicesTokenList; + public static toObject(message: berty.protocol.v1.ServicesTokenList, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4012,34 +4013,34 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.ServicesTokenList.IRequest): berty.types.v1.ServicesTokenList.Request; - public static encode(message: berty.types.v1.ServicesTokenList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ServicesTokenList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ServicesTokenList.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ServicesTokenList.Request; + public static create(properties?: berty.protocol.v1.ServicesTokenList.IRequest): berty.protocol.v1.ServicesTokenList.Request; + public static encode(message: berty.protocol.v1.ServicesTokenList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ServicesTokenList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ServicesTokenList.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ServicesTokenList.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ServicesTokenList.Request; - public static toObject(message: berty.types.v1.ServicesTokenList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ServicesTokenList.Request; + public static toObject(message: berty.protocol.v1.ServicesTokenList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { tokenId?: (string|null); - service?: (berty.types.v1.IServiceToken|null); + service?: (berty.protocol.v1.IServiceToken|null); } class Reply implements IReply { public tokenId: string; - public service?: (berty.types.v1.IServiceToken|null); - public static create(properties?: berty.types.v1.ServicesTokenList.IReply): berty.types.v1.ServicesTokenList.Reply; - public static encode(message: berty.types.v1.ServicesTokenList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ServicesTokenList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ServicesTokenList.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ServicesTokenList.Reply; + public service?: (berty.protocol.v1.IServiceToken|null); + public static create(properties?: berty.protocol.v1.ServicesTokenList.IReply): berty.protocol.v1.ServicesTokenList.Reply; + public static encode(message: berty.protocol.v1.ServicesTokenList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ServicesTokenList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ServicesTokenList.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ServicesTokenList.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ServicesTokenList.Reply; - public static toObject(message: berty.types.v1.ServicesTokenList.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ServicesTokenList.Reply; + public static toObject(message: berty.protocol.v1.ServicesTokenList.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -4055,14 +4056,14 @@ export namespace berty { public services: string[]; public codeChallenge: string; public tokenId: string; - public static create(properties?: berty.types.v1.IServicesTokenCode): berty.types.v1.ServicesTokenCode; - public static encode(message: berty.types.v1.IServicesTokenCode, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IServicesTokenCode, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ServicesTokenCode; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ServicesTokenCode; + public static create(properties?: berty.protocol.v1.IServicesTokenCode): berty.protocol.v1.ServicesTokenCode; + public static encode(message: berty.protocol.v1.IServicesTokenCode, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IServicesTokenCode, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ServicesTokenCode; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ServicesTokenCode; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ServicesTokenCode; - public static toObject(message: berty.types.v1.ServicesTokenCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ServicesTokenCode; + public static toObject(message: berty.protocol.v1.ServicesTokenCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4071,14 +4072,14 @@ export namespace berty { class ReplicationServiceRegisterGroup implements IReplicationServiceRegisterGroup { - public static create(properties?: berty.types.v1.IReplicationServiceRegisterGroup): berty.types.v1.ReplicationServiceRegisterGroup; - public static encode(message: berty.types.v1.IReplicationServiceRegisterGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IReplicationServiceRegisterGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ReplicationServiceRegisterGroup; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ReplicationServiceRegisterGroup; + public static create(properties?: berty.protocol.v1.IReplicationServiceRegisterGroup): berty.protocol.v1.ReplicationServiceRegisterGroup; + public static encode(message: berty.protocol.v1.IReplicationServiceRegisterGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IReplicationServiceRegisterGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ReplicationServiceRegisterGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ReplicationServiceRegisterGroup; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ReplicationServiceRegisterGroup; - public static toObject(message: berty.types.v1.ReplicationServiceRegisterGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ReplicationServiceRegisterGroup; + public static toObject(message: berty.protocol.v1.ReplicationServiceRegisterGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4093,14 +4094,14 @@ export namespace berty { public tokenId: string; public groupPk: Uint8Array; - public static create(properties?: berty.types.v1.ReplicationServiceRegisterGroup.IRequest): berty.types.v1.ReplicationServiceRegisterGroup.Request; - public static encode(message: berty.types.v1.ReplicationServiceRegisterGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ReplicationServiceRegisterGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ReplicationServiceRegisterGroup.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ReplicationServiceRegisterGroup.Request; + public static create(properties?: berty.protocol.v1.ReplicationServiceRegisterGroup.IRequest): berty.protocol.v1.ReplicationServiceRegisterGroup.Request; + public static encode(message: berty.protocol.v1.ReplicationServiceRegisterGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ReplicationServiceRegisterGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ReplicationServiceRegisterGroup.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ReplicationServiceRegisterGroup.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ReplicationServiceRegisterGroup.Request; - public static toObject(message: berty.types.v1.ReplicationServiceRegisterGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ReplicationServiceRegisterGroup.Request; + public static toObject(message: berty.protocol.v1.ReplicationServiceRegisterGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4109,14 +4110,14 @@ export namespace berty { class Reply implements IReply { - public static create(properties?: berty.types.v1.ReplicationServiceRegisterGroup.IReply): berty.types.v1.ReplicationServiceRegisterGroup.Reply; - public static encode(message: berty.types.v1.ReplicationServiceRegisterGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ReplicationServiceRegisterGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ReplicationServiceRegisterGroup.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ReplicationServiceRegisterGroup.Reply; + public static create(properties?: berty.protocol.v1.ReplicationServiceRegisterGroup.IReply): berty.protocol.v1.ReplicationServiceRegisterGroup.Reply; + public static encode(message: berty.protocol.v1.ReplicationServiceRegisterGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ReplicationServiceRegisterGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ReplicationServiceRegisterGroup.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ReplicationServiceRegisterGroup.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ReplicationServiceRegisterGroup.Reply; - public static toObject(message: berty.types.v1.ReplicationServiceRegisterGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ReplicationServiceRegisterGroup.Reply; + public static toObject(message: berty.protocol.v1.ReplicationServiceRegisterGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -4126,34 +4127,34 @@ export namespace berty { class ReplicationServiceReplicateGroup implements IReplicationServiceReplicateGroup { - public static create(properties?: berty.types.v1.IReplicationServiceReplicateGroup): berty.types.v1.ReplicationServiceReplicateGroup; - public static encode(message: berty.types.v1.IReplicationServiceReplicateGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IReplicationServiceReplicateGroup, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ReplicationServiceReplicateGroup; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ReplicationServiceReplicateGroup; + public static create(properties?: berty.protocol.v1.IReplicationServiceReplicateGroup): berty.protocol.v1.ReplicationServiceReplicateGroup; + public static encode(message: berty.protocol.v1.IReplicationServiceReplicateGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IReplicationServiceReplicateGroup, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ReplicationServiceReplicateGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ReplicationServiceReplicateGroup; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ReplicationServiceReplicateGroup; - public static toObject(message: berty.types.v1.ReplicationServiceReplicateGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ReplicationServiceReplicateGroup; + public static toObject(message: berty.protocol.v1.ReplicationServiceReplicateGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } namespace ReplicationServiceReplicateGroup { interface IRequest { - group?: (berty.types.v1.IGroup|null); + group?: (berty.protocol.v1.IGroup|null); } class Request implements IRequest { - public group?: (berty.types.v1.IGroup|null); - public static create(properties?: berty.types.v1.ReplicationServiceReplicateGroup.IRequest): berty.types.v1.ReplicationServiceReplicateGroup.Request; - public static encode(message: berty.types.v1.ReplicationServiceReplicateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ReplicationServiceReplicateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ReplicationServiceReplicateGroup.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ReplicationServiceReplicateGroup.Request; + public group?: (berty.protocol.v1.IGroup|null); + public static create(properties?: berty.protocol.v1.ReplicationServiceReplicateGroup.IRequest): berty.protocol.v1.ReplicationServiceReplicateGroup.Request; + public static encode(message: berty.protocol.v1.ReplicationServiceReplicateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ReplicationServiceReplicateGroup.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ReplicationServiceReplicateGroup.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ReplicationServiceReplicateGroup.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ReplicationServiceReplicateGroup.Request; - public static toObject(message: berty.types.v1.ReplicationServiceReplicateGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ReplicationServiceReplicateGroup.Request; + public static toObject(message: berty.protocol.v1.ReplicationServiceReplicateGroup.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4164,14 +4165,14 @@ export namespace berty { class Reply implements IReply { public ok: boolean; - public static create(properties?: berty.types.v1.ReplicationServiceReplicateGroup.IReply): berty.types.v1.ReplicationServiceReplicateGroup.Reply; - public static encode(message: berty.types.v1.ReplicationServiceReplicateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ReplicationServiceReplicateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.ReplicationServiceReplicateGroup.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.ReplicationServiceReplicateGroup.Reply; + public static create(properties?: berty.protocol.v1.ReplicationServiceReplicateGroup.IReply): berty.protocol.v1.ReplicationServiceReplicateGroup.Reply; + public static encode(message: berty.protocol.v1.ReplicationServiceReplicateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ReplicationServiceReplicateGroup.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.ReplicationServiceReplicateGroup.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.ReplicationServiceReplicateGroup.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.ReplicationServiceReplicateGroup.Reply; - public static toObject(message: berty.types.v1.ReplicationServiceReplicateGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.ReplicationServiceReplicateGroup.Reply; + public static toObject(message: berty.protocol.v1.ReplicationServiceReplicateGroup.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -4181,14 +4182,14 @@ export namespace berty { class SystemInfo implements ISystemInfo { - public static create(properties?: berty.types.v1.ISystemInfo): berty.types.v1.SystemInfo; - public static encode(message: berty.types.v1.ISystemInfo, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.ISystemInfo, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.SystemInfo; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.SystemInfo; + public static create(properties?: berty.protocol.v1.ISystemInfo): berty.protocol.v1.SystemInfo; + public static encode(message: berty.protocol.v1.ISystemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.ISystemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.SystemInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.SystemInfo; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.SystemInfo; - public static toObject(message: berty.types.v1.SystemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.SystemInfo; + public static toObject(message: berty.protocol.v1.SystemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4199,56 +4200,56 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.SystemInfo.IRequest): berty.types.v1.SystemInfo.Request; - public static encode(message: berty.types.v1.SystemInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.SystemInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.SystemInfo.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.SystemInfo.Request; + public static create(properties?: berty.protocol.v1.SystemInfo.IRequest): berty.protocol.v1.SystemInfo.Request; + public static encode(message: berty.protocol.v1.SystemInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.SystemInfo.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.SystemInfo.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.SystemInfo.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.SystemInfo.Request; - public static toObject(message: berty.types.v1.SystemInfo.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.SystemInfo.Request; + public static toObject(message: berty.protocol.v1.SystemInfo.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { - process?: (berty.types.v1.SystemInfo.IProcess|null); - p2p?: (berty.types.v1.SystemInfo.IP2P|null); - orbitdb?: (berty.types.v1.SystemInfo.IOrbitDB|null); + process?: (berty.protocol.v1.SystemInfo.IProcess|null); + p2p?: (berty.protocol.v1.SystemInfo.IP2P|null); + orbitdb?: (berty.protocol.v1.SystemInfo.IOrbitDB|null); warns?: (string[]|null); } class Reply implements IReply { - public process?: (berty.types.v1.SystemInfo.IProcess|null); - public p2p?: (berty.types.v1.SystemInfo.IP2P|null); - public orbitdb?: (berty.types.v1.SystemInfo.IOrbitDB|null); + public process?: (berty.protocol.v1.SystemInfo.IProcess|null); + public p2p?: (berty.protocol.v1.SystemInfo.IP2P|null); + public orbitdb?: (berty.protocol.v1.SystemInfo.IOrbitDB|null); public warns: string[]; - public static create(properties?: berty.types.v1.SystemInfo.IReply): berty.types.v1.SystemInfo.Reply; - public static encode(message: berty.types.v1.SystemInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.SystemInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.SystemInfo.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.SystemInfo.Reply; + public static create(properties?: berty.protocol.v1.SystemInfo.IReply): berty.protocol.v1.SystemInfo.Reply; + public static encode(message: berty.protocol.v1.SystemInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.SystemInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.SystemInfo.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.SystemInfo.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.SystemInfo.Reply; - public static toObject(message: berty.types.v1.SystemInfo.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.SystemInfo.Reply; + public static toObject(message: berty.protocol.v1.SystemInfo.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IOrbitDB { - accountMetadata?: (berty.types.v1.SystemInfo.OrbitDB.IReplicationStatus|null); + accountMetadata?: (berty.protocol.v1.SystemInfo.OrbitDB.IReplicationStatus|null); } class OrbitDB implements IOrbitDB { - public accountMetadata?: (berty.types.v1.SystemInfo.OrbitDB.IReplicationStatus|null); - public static create(properties?: berty.types.v1.SystemInfo.IOrbitDB): berty.types.v1.SystemInfo.OrbitDB; - public static encode(message: berty.types.v1.SystemInfo.IOrbitDB, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.SystemInfo.IOrbitDB, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.SystemInfo.OrbitDB; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.SystemInfo.OrbitDB; + public accountMetadata?: (berty.protocol.v1.SystemInfo.OrbitDB.IReplicationStatus|null); + public static create(properties?: berty.protocol.v1.SystemInfo.IOrbitDB): berty.protocol.v1.SystemInfo.OrbitDB; + public static encode(message: berty.protocol.v1.SystemInfo.IOrbitDB, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.SystemInfo.IOrbitDB, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.SystemInfo.OrbitDB; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.SystemInfo.OrbitDB; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.SystemInfo.OrbitDB; - public static toObject(message: berty.types.v1.SystemInfo.OrbitDB, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.SystemInfo.OrbitDB; + public static toObject(message: berty.protocol.v1.SystemInfo.OrbitDB, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4267,14 +4268,14 @@ export namespace berty { public maximum: Long; public buffered: Long; public queued: Long; - public static create(properties?: berty.types.v1.SystemInfo.OrbitDB.IReplicationStatus): berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus; - public static encode(message: berty.types.v1.SystemInfo.OrbitDB.IReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.SystemInfo.OrbitDB.IReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus; + public static create(properties?: berty.protocol.v1.SystemInfo.OrbitDB.IReplicationStatus): berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus; + public static encode(message: berty.protocol.v1.SystemInfo.OrbitDB.IReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.SystemInfo.OrbitDB.IReplicationStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus; - public static toObject(message: berty.types.v1.SystemInfo.OrbitDB.ReplicationStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus; + public static toObject(message: berty.protocol.v1.SystemInfo.OrbitDB.ReplicationStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -4286,14 +4287,14 @@ export namespace berty { class P2P implements IP2P { public connectedPeers: Long; - public static create(properties?: berty.types.v1.SystemInfo.IP2P): berty.types.v1.SystemInfo.P2P; - public static encode(message: berty.types.v1.SystemInfo.IP2P, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.SystemInfo.IP2P, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.SystemInfo.P2P; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.SystemInfo.P2P; + public static create(properties?: berty.protocol.v1.SystemInfo.IP2P): berty.protocol.v1.SystemInfo.P2P; + public static encode(message: berty.protocol.v1.SystemInfo.IP2P, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.SystemInfo.IP2P, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.SystemInfo.P2P; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.SystemInfo.P2P; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.SystemInfo.P2P; - public static toObject(message: berty.types.v1.SystemInfo.P2P, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.SystemInfo.P2P; + public static toObject(message: berty.protocol.v1.SystemInfo.P2P, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4346,14 +4347,14 @@ export namespace berty { public uid: Long; public workingDir: string; public systemUsername: string; - public static create(properties?: berty.types.v1.SystemInfo.IProcess): berty.types.v1.SystemInfo.Process; - public static encode(message: berty.types.v1.SystemInfo.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.SystemInfo.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.SystemInfo.Process; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.SystemInfo.Process; + public static create(properties?: berty.protocol.v1.SystemInfo.IProcess): berty.protocol.v1.SystemInfo.Process; + public static encode(message: berty.protocol.v1.SystemInfo.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.SystemInfo.IProcess, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.SystemInfo.Process; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.SystemInfo.Process; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.SystemInfo.Process; - public static toObject(message: berty.types.v1.SystemInfo.Process, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.SystemInfo.Process; + public static toObject(message: berty.protocol.v1.SystemInfo.Process, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -4363,14 +4364,14 @@ export namespace berty { class PeerList implements IPeerList { - public static create(properties?: berty.types.v1.IPeerList): berty.types.v1.PeerList; - public static encode(message: berty.types.v1.IPeerList, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IPeerList, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.PeerList; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.PeerList; + public static create(properties?: berty.protocol.v1.IPeerList): berty.protocol.v1.PeerList; + public static encode(message: berty.protocol.v1.IPeerList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IPeerList, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.PeerList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.PeerList; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.PeerList; - public static toObject(message: berty.types.v1.PeerList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.PeerList; + public static toObject(message: berty.protocol.v1.PeerList, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4381,88 +4382,88 @@ export namespace berty { class Request implements IRequest { - public static create(properties?: berty.types.v1.PeerList.IRequest): berty.types.v1.PeerList.Request; - public static encode(message: berty.types.v1.PeerList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.PeerList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.PeerList.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.PeerList.Request; + public static create(properties?: berty.protocol.v1.PeerList.IRequest): berty.protocol.v1.PeerList.Request; + public static encode(message: berty.protocol.v1.PeerList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.PeerList.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.PeerList.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.PeerList.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.PeerList.Request; - public static toObject(message: berty.types.v1.PeerList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.PeerList.Request; + public static toObject(message: berty.protocol.v1.PeerList.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IReply { - peers?: (berty.types.v1.PeerList.IPeer[]|null); + peers?: (berty.protocol.v1.PeerList.IPeer[]|null); } class Reply implements IReply { - public peers: berty.types.v1.PeerList.IPeer[]; - public static create(properties?: berty.types.v1.PeerList.IReply): berty.types.v1.PeerList.Reply; - public static encode(message: berty.types.v1.PeerList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.PeerList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.PeerList.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.PeerList.Reply; + public peers: berty.protocol.v1.PeerList.IPeer[]; + public static create(properties?: berty.protocol.v1.PeerList.IReply): berty.protocol.v1.PeerList.Reply; + public static encode(message: berty.protocol.v1.PeerList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.PeerList.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.PeerList.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.PeerList.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.PeerList.Reply; - public static toObject(message: berty.types.v1.PeerList.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.PeerList.Reply; + public static toObject(message: berty.protocol.v1.PeerList.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IPeer { id?: (string|null); - routes?: (berty.types.v1.PeerList.IRoute[]|null); + routes?: (berty.protocol.v1.PeerList.IRoute[]|null); errors?: (string[]|null); - features?: (berty.types.v1.PeerList.Feature[]|null); + features?: (berty.protocol.v1.PeerList.Feature[]|null); minLatency?: (Long|null); isActive?: (boolean|null); - direction?: (berty.types.v1.Direction|null); + direction?: (berty.protocol.v1.Direction|null); } class Peer implements IPeer { public id: string; - public routes: berty.types.v1.PeerList.IRoute[]; + public routes: berty.protocol.v1.PeerList.IRoute[]; public errors: string[]; - public features: berty.types.v1.PeerList.Feature[]; + public features: berty.protocol.v1.PeerList.Feature[]; public minLatency: Long; public isActive: boolean; - public direction: berty.types.v1.Direction; - public static create(properties?: berty.types.v1.PeerList.IPeer): berty.types.v1.PeerList.Peer; - public static encode(message: berty.types.v1.PeerList.IPeer, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.PeerList.IPeer, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.PeerList.Peer; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.PeerList.Peer; + public direction: berty.protocol.v1.Direction; + public static create(properties?: berty.protocol.v1.PeerList.IPeer): berty.protocol.v1.PeerList.Peer; + public static encode(message: berty.protocol.v1.PeerList.IPeer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.PeerList.IPeer, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.PeerList.Peer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.PeerList.Peer; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.PeerList.Peer; - public static toObject(message: berty.types.v1.PeerList.Peer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.PeerList.Peer; + public static toObject(message: berty.protocol.v1.PeerList.Peer, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } interface IRoute { isActive?: (boolean|null); address?: (string|null); - direction?: (berty.types.v1.Direction|null); + direction?: (berty.protocol.v1.Direction|null); latency?: (Long|null); - streams?: (berty.types.v1.PeerList.IStream[]|null); + streams?: (berty.protocol.v1.PeerList.IStream[]|null); } class Route implements IRoute { public isActive: boolean; public address: string; - public direction: berty.types.v1.Direction; + public direction: berty.protocol.v1.Direction; public latency: Long; - public streams: berty.types.v1.PeerList.IStream[]; - public static create(properties?: berty.types.v1.PeerList.IRoute): berty.types.v1.PeerList.Route; - public static encode(message: berty.types.v1.PeerList.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.PeerList.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.PeerList.Route; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.PeerList.Route; + public streams: berty.protocol.v1.PeerList.IStream[]; + public static create(properties?: berty.protocol.v1.PeerList.IRoute): berty.protocol.v1.PeerList.Route; + public static encode(message: berty.protocol.v1.PeerList.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.PeerList.IRoute, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.PeerList.Route; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.PeerList.Route; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.PeerList.Route; - public static toObject(message: berty.types.v1.PeerList.Route, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.PeerList.Route; + public static toObject(message: berty.protocol.v1.PeerList.Route, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4473,14 +4474,14 @@ export namespace berty { class Stream implements IStream { public id: string; - public static create(properties?: berty.types.v1.PeerList.IStream): berty.types.v1.PeerList.Stream; - public static encode(message: berty.types.v1.PeerList.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.PeerList.IStream, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.PeerList.Stream; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.PeerList.Stream; + public static create(properties?: berty.protocol.v1.PeerList.IStream): berty.protocol.v1.PeerList.Stream; + public static encode(message: berty.protocol.v1.PeerList.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.PeerList.IStream, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.PeerList.Stream; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.PeerList.Stream; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.PeerList.Stream; - public static toObject(message: berty.types.v1.PeerList.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.PeerList.Stream; + public static toObject(message: berty.protocol.v1.PeerList.Stream, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4506,14 +4507,14 @@ export namespace berty { class AttachmentPrepare implements IAttachmentPrepare { - public static create(properties?: berty.types.v1.IAttachmentPrepare): berty.types.v1.AttachmentPrepare; - public static encode(message: berty.types.v1.IAttachmentPrepare, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAttachmentPrepare, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AttachmentPrepare; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AttachmentPrepare; + public static create(properties?: berty.protocol.v1.IAttachmentPrepare): berty.protocol.v1.AttachmentPrepare; + public static encode(message: berty.protocol.v1.IAttachmentPrepare, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAttachmentPrepare, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AttachmentPrepare; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AttachmentPrepare; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AttachmentPrepare; - public static toObject(message: berty.types.v1.AttachmentPrepare, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AttachmentPrepare; + public static toObject(message: berty.protocol.v1.AttachmentPrepare, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4528,14 +4529,14 @@ export namespace berty { public block: Uint8Array; public disableEncryption: boolean; - public static create(properties?: berty.types.v1.AttachmentPrepare.IRequest): berty.types.v1.AttachmentPrepare.Request; - public static encode(message: berty.types.v1.AttachmentPrepare.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AttachmentPrepare.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AttachmentPrepare.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AttachmentPrepare.Request; + public static create(properties?: berty.protocol.v1.AttachmentPrepare.IRequest): berty.protocol.v1.AttachmentPrepare.Request; + public static encode(message: berty.protocol.v1.AttachmentPrepare.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AttachmentPrepare.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AttachmentPrepare.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AttachmentPrepare.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AttachmentPrepare.Request; - public static toObject(message: berty.types.v1.AttachmentPrepare.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AttachmentPrepare.Request; + public static toObject(message: berty.protocol.v1.AttachmentPrepare.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4546,14 +4547,14 @@ export namespace berty { class Reply implements IReply { public attachmentCid: Uint8Array; - public static create(properties?: berty.types.v1.AttachmentPrepare.IReply): berty.types.v1.AttachmentPrepare.Reply; - public static encode(message: berty.types.v1.AttachmentPrepare.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AttachmentPrepare.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AttachmentPrepare.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AttachmentPrepare.Reply; + public static create(properties?: berty.protocol.v1.AttachmentPrepare.IReply): berty.protocol.v1.AttachmentPrepare.Reply; + public static encode(message: berty.protocol.v1.AttachmentPrepare.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AttachmentPrepare.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AttachmentPrepare.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AttachmentPrepare.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AttachmentPrepare.Reply; - public static toObject(message: berty.types.v1.AttachmentPrepare.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AttachmentPrepare.Reply; + public static toObject(message: berty.protocol.v1.AttachmentPrepare.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -4563,14 +4564,14 @@ export namespace berty { class AttachmentRetrieve implements IAttachmentRetrieve { - public static create(properties?: berty.types.v1.IAttachmentRetrieve): berty.types.v1.AttachmentRetrieve; - public static encode(message: berty.types.v1.IAttachmentRetrieve, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.IAttachmentRetrieve, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AttachmentRetrieve; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AttachmentRetrieve; + public static create(properties?: berty.protocol.v1.IAttachmentRetrieve): berty.protocol.v1.AttachmentRetrieve; + public static encode(message: berty.protocol.v1.IAttachmentRetrieve, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.IAttachmentRetrieve, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AttachmentRetrieve; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AttachmentRetrieve; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AttachmentRetrieve; - public static toObject(message: berty.types.v1.AttachmentRetrieve, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AttachmentRetrieve; + public static toObject(message: berty.protocol.v1.AttachmentRetrieve, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4583,14 +4584,14 @@ export namespace berty { class Request implements IRequest { public attachmentCid: Uint8Array; - public static create(properties?: berty.types.v1.AttachmentRetrieve.IRequest): berty.types.v1.AttachmentRetrieve.Request; - public static encode(message: berty.types.v1.AttachmentRetrieve.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AttachmentRetrieve.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AttachmentRetrieve.Request; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AttachmentRetrieve.Request; + public static create(properties?: berty.protocol.v1.AttachmentRetrieve.IRequest): berty.protocol.v1.AttachmentRetrieve.Request; + public static encode(message: berty.protocol.v1.AttachmentRetrieve.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AttachmentRetrieve.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AttachmentRetrieve.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AttachmentRetrieve.Request; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AttachmentRetrieve.Request; - public static toObject(message: berty.types.v1.AttachmentRetrieve.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AttachmentRetrieve.Request; + public static toObject(message: berty.protocol.v1.AttachmentRetrieve.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } @@ -4601,14 +4602,14 @@ export namespace berty { class Reply implements IReply { public block: Uint8Array; - public static create(properties?: berty.types.v1.AttachmentRetrieve.IReply): berty.types.v1.AttachmentRetrieve.Reply; - public static encode(message: berty.types.v1.AttachmentRetrieve.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static encodeDelimited(message: berty.types.v1.AttachmentRetrieve.IReply, writer?: $protobuf.Writer): $protobuf.Writer; - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.types.v1.AttachmentRetrieve.Reply; - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.types.v1.AttachmentRetrieve.Reply; + public static create(properties?: berty.protocol.v1.AttachmentRetrieve.IReply): berty.protocol.v1.AttachmentRetrieve.Reply; + public static encode(message: berty.protocol.v1.AttachmentRetrieve.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.protocol.v1.AttachmentRetrieve.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.protocol.v1.AttachmentRetrieve.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.protocol.v1.AttachmentRetrieve.Reply; public static verify(message: { [k: string]: any }): (string|null); - public static fromObject(object: { [k: string]: any }): berty.types.v1.AttachmentRetrieve.Reply; - public static toObject(message: berty.types.v1.AttachmentRetrieve.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static fromObject(object: { [k: string]: any }): berty.protocol.v1.AttachmentRetrieve.Reply; + public static toObject(message: berty.protocol.v1.AttachmentRetrieve.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } } @@ -4664,8 +4665,8 @@ export namespace berty { public conversationOpen(request: berty.messenger.v1.ConversationOpen.IRequest): Promise; public conversationClose(request: berty.messenger.v1.ConversationClose.IRequest, callback: berty.messenger.v1.MessengerService.ConversationCloseCallback): void; public conversationClose(request: berty.messenger.v1.ConversationClose.IRequest): Promise; - public servicesTokenList(request: berty.types.v1.ServicesTokenList.IRequest, callback: berty.messenger.v1.MessengerService.ServicesTokenListCallback): void; - public servicesTokenList(request: berty.types.v1.ServicesTokenList.IRequest): Promise; + public servicesTokenList(request: berty.protocol.v1.ServicesTokenList.IRequest, callback: berty.messenger.v1.MessengerService.ServicesTokenListCallback): void; + public servicesTokenList(request: berty.protocol.v1.ServicesTokenList.IRequest): Promise; public replicationServiceRegisterGroup(request: berty.messenger.v1.ReplicationServiceRegisterGroup.IRequest, callback: berty.messenger.v1.MessengerService.ReplicationServiceRegisterGroupCallback): void; public replicationServiceRegisterGroup(request: berty.messenger.v1.ReplicationServiceRegisterGroup.IRequest): Promise; public replicationSetAutoEnable(request: berty.messenger.v1.ReplicationSetAutoEnable.IRequest, callback: berty.messenger.v1.MessengerService.ReplicationSetAutoEnableCallback): void; @@ -4676,6 +4677,10 @@ export namespace berty { public getUsername(request: berty.messenger.v1.GetUsername.IRequest): Promise; public instanceExportData(request: berty.messenger.v1.InstanceExportData.IRequest, callback: berty.messenger.v1.MessengerService.InstanceExportDataCallback): void; public instanceExportData(request: berty.messenger.v1.InstanceExportData.IRequest): Promise; + public mediaPrepare(request: berty.messenger.v1.MediaPrepare.IRequest, callback: berty.messenger.v1.MessengerService.MediaPrepareCallback): void; + public mediaPrepare(request: berty.messenger.v1.MediaPrepare.IRequest): Promise; + public mediaRetrieve(request: berty.messenger.v1.MediaRetrieve.IRequest, callback: berty.messenger.v1.MessengerService.MediaRetrieveCallback): void; + public mediaRetrieve(request: berty.messenger.v1.MediaRetrieve.IRequest): Promise; } namespace MessengerService { @@ -4722,7 +4727,7 @@ export namespace berty { type ConversationCloseCallback = (error: (Error|null), response?: berty.messenger.v1.ConversationClose.Reply) => void; - type ServicesTokenListCallback = (error: (Error|null), response?: berty.types.v1.ServicesTokenList.Reply) => void; + type ServicesTokenListCallback = (error: (Error|null), response?: berty.protocol.v1.ServicesTokenList.Reply) => void; type ReplicationServiceRegisterGroupCallback = (error: (Error|null), response?: berty.messenger.v1.ReplicationServiceRegisterGroup.Reply) => void; @@ -4733,6 +4738,10 @@ export namespace berty { type GetUsernameCallback = (error: (Error|null), response?: berty.messenger.v1.GetUsername.Reply) => void; type InstanceExportDataCallback = (error: (Error|null), response?: berty.messenger.v1.InstanceExportData.Reply) => void; + + type MediaPrepareCallback = (error: (Error|null), response?: berty.messenger.v1.MediaPrepare.Reply) => void; + + type MediaRetrieveCallback = (error: (Error|null), response?: berty.messenger.v1.MediaRetrieve.Reply) => void; } interface IConversationOpen { @@ -5095,11 +5104,13 @@ export namespace berty { interface IRequest { link?: (string|null); + passphrase?: (Uint8Array|null); } class Request implements IRequest { public link: string; + public passphrase: Uint8Array; public static create(properties?: berty.messenger.v1.ParseDeepLink.IRequest): berty.messenger.v1.ParseDeepLink.Request; public static encode(message: berty.messenger.v1.ParseDeepLink.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.ParseDeepLink.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5134,6 +5145,7 @@ export namespace berty { kind?: (berty.messenger.v1.BertyLink.Kind|null); bertyId?: (berty.messenger.v1.IBertyID|null); bertyGroup?: (berty.messenger.v1.IBertyGroup|null); + encrypted?: (berty.messenger.v1.BertyLink.IEncrypted|null); } class BertyLink implements IBertyLink { @@ -5141,6 +5153,7 @@ export namespace berty { public kind: berty.messenger.v1.BertyLink.Kind; public bertyId?: (berty.messenger.v1.IBertyID|null); public bertyGroup?: (berty.messenger.v1.IBertyGroup|null); + public encrypted?: (berty.messenger.v1.BertyLink.IEncrypted|null); public static create(properties?: berty.messenger.v1.IBertyLink): berty.messenger.v1.BertyLink; public static encode(message: berty.messenger.v1.IBertyLink, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.IBertyLink, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5154,10 +5167,51 @@ export namespace berty { namespace BertyLink { + interface IEncrypted { + kind?: (berty.messenger.v1.BertyLink.Kind|null); + nonce?: (Uint8Array|null); + displayName?: (string|null); + contactPublicRendezvousSeed?: (Uint8Array|null); + contactAccountPk?: (Uint8Array|null); + contactDisplayName?: (Uint8Array|null); + groupPublicKey?: (Uint8Array|null); + groupSecret?: (Uint8Array|null); + groupSecretSig?: (Uint8Array|null); + groupType?: (berty.protocol.v1.GroupType|null); + groupSignPub?: (Uint8Array|null); + groupDisplayName?: (Uint8Array|null); + } + + class Encrypted implements IEncrypted { + + public kind: berty.messenger.v1.BertyLink.Kind; + public nonce: Uint8Array; + public displayName: string; + public contactPublicRendezvousSeed: Uint8Array; + public contactAccountPk: Uint8Array; + public contactDisplayName: Uint8Array; + public groupPublicKey: Uint8Array; + public groupSecret: Uint8Array; + public groupSecretSig: Uint8Array; + public groupType: berty.protocol.v1.GroupType; + public groupSignPub: Uint8Array; + public groupDisplayName: Uint8Array; + public static create(properties?: berty.messenger.v1.BertyLink.IEncrypted): berty.messenger.v1.BertyLink.Encrypted; + public static encode(message: berty.messenger.v1.BertyLink.IEncrypted, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.BertyLink.IEncrypted, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.BertyLink.Encrypted; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.BertyLink.Encrypted; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.BertyLink.Encrypted; + public static toObject(message: berty.messenger.v1.BertyLink.Encrypted, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + enum Kind { UnknownKind = 0, ContactInviteV1Kind = 1, - GroupV1Kind = 2 + GroupV1Kind = 2, + EncryptedV1Kind = 3 } } @@ -5406,13 +5460,13 @@ export namespace berty { } interface IBertyGroup { - group?: (berty.types.v1.IGroup|null); + group?: (berty.protocol.v1.IGroup|null); displayName?: (string|null); } class BertyGroup implements IBertyGroup { - public group?: (berty.types.v1.IGroup|null); + public group?: (berty.protocol.v1.IGroup|null); public displayName: string; public static create(properties?: berty.messenger.v1.IBertyGroup): berty.messenger.v1.BertyGroup; public static encode(message: berty.messenger.v1.IBertyGroup, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5429,6 +5483,7 @@ export namespace berty { type?: (berty.messenger.v1.AppMessage.Type|null); payload?: (Uint8Array|null); sentDate?: (Long|null); + medias?: (berty.messenger.v1.IMedia[]|null); } class AppMessage implements IAppMessage { @@ -5436,6 +5491,7 @@ export namespace berty { public type: berty.messenger.v1.AppMessage.Type; public payload: Uint8Array; public sentDate: Long; + public medias: berty.messenger.v1.IMedia[]; public static create(properties?: berty.messenger.v1.IAppMessage): berty.messenger.v1.AppMessage; public static encode(message: berty.messenger.v1.IAppMessage, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.IAppMessage, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5458,7 +5514,7 @@ export namespace berty { TypeSetUserInfo = 5, TypeAcknowledge = 6, TypeReplyOptions = 7, - TypeMonitorMetadata = 8 + TypeMonitorMetadata = 100 } interface IUserMessage { @@ -5594,12 +5650,12 @@ export namespace berty { } interface IMonitorMetadata { - event?: (berty.types.v1.MonitorGroup.IEventMonitor|null); + event?: (berty.protocol.v1.MonitorGroup.IEventMonitor|null); } class MonitorMetadata implements IMonitorMetadata { - public event?: (berty.types.v1.MonitorGroup.IEventMonitor|null); + public event?: (berty.protocol.v1.MonitorGroup.IEventMonitor|null); public static create(properties?: berty.messenger.v1.AppMessage.IMonitorMetadata): berty.messenger.v1.AppMessage.MonitorMetadata; public static encode(message: berty.messenger.v1.AppMessage.IMonitorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.AppMessage.IMonitorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5667,13 +5723,13 @@ export namespace berty { } interface IReply { - protocol?: (berty.types.v1.SystemInfo.IReply|null); + protocol?: (berty.protocol.v1.SystemInfo.IReply|null); messenger?: (berty.messenger.v1.SystemInfo.IMessenger|null); } class Reply implements IReply { - public protocol?: (berty.types.v1.SystemInfo.IReply|null); + public protocol?: (berty.protocol.v1.SystemInfo.IReply|null); public messenger?: (berty.messenger.v1.SystemInfo.IMessenger|null); public static create(properties?: berty.messenger.v1.SystemInfo.IReply): berty.messenger.v1.SystemInfo.Reply; public static encode(message: berty.messenger.v1.SystemInfo.IReply, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5687,7 +5743,7 @@ export namespace berty { } interface IMessenger { - process?: (berty.types.v1.SystemInfo.IProcess|null); + process?: (berty.protocol.v1.SystemInfo.IProcess|null); warns?: (string[]|null); protocolInSameProcess?: (boolean|null); db?: (berty.messenger.v1.SystemInfo.IDB|null); @@ -5695,7 +5751,7 @@ export namespace berty { class Messenger implements IMessenger { - public process?: (berty.types.v1.SystemInfo.IProcess|null); + public process?: (berty.protocol.v1.SystemInfo.IProcess|null); public warns: string[]; public protocolInSameProcess: boolean; public db?: (berty.messenger.v1.SystemInfo.IDB|null); @@ -5763,11 +5819,13 @@ export namespace berty { interface IRequest { link?: (string|null); + passphrase?: (Uint8Array|null); } class Request implements IRequest { public link: string; + public passphrase: Uint8Array; public static create(properties?: berty.messenger.v1.ConversationJoin.IRequest): berty.messenger.v1.ConversationJoin.Request; public static encode(message: berty.messenger.v1.ConversationJoin.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.ConversationJoin.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5863,6 +5921,7 @@ export namespace berty { sentDate?: (Long|null); acknowledged?: (boolean|null); targetCid?: (string|null); + medias?: (berty.messenger.v1.IMedia[]|null); } class Interaction implements IInteraction { @@ -5879,6 +5938,7 @@ export namespace berty { public sentDate: Long; public acknowledged: boolean; public targetCid: string; + public medias: berty.messenger.v1.IMedia[]; public static create(properties?: berty.messenger.v1.IInteraction): berty.messenger.v1.Interaction; public static encode(message: berty.messenger.v1.IInteraction, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.IInteraction, writer?: $protobuf.Writer): $protobuf.Writer; @@ -5890,6 +5950,49 @@ export namespace berty { public toJSON(): { [k: string]: any }; } + interface IMedia { + cid?: (string|null); + mimeType?: (string|null); + filename?: (string|null); + displayName?: (string|null); + interactionCid?: (string|null); + state?: (berty.messenger.v1.Media.State|null); + uri?:(string|null); + } + + class Media implements IMedia { + + public cid: string; + public mimeType: string; + public filename: string; + public displayName: string; + public interactionCid: string; + public state: berty.messenger.v1.Media.State; + public static create(properties?: berty.messenger.v1.IMedia): berty.messenger.v1.Media; + public static encode(message: berty.messenger.v1.IMedia, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.IMedia, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.Media; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.Media; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.Media; + public static toObject(message: berty.messenger.v1.Media, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + + namespace Media { + + enum State { + StateUnknown = 0, + StateNeverDownloaded = 1, + StatePartiallyDownloaded = 2, + StateDownloaded = 3, + StateInCache = 4, + StateInvalidCrypto = 5, + StatePrepared = 100, + StateAttached = 101 + } + } + interface IContact { publicKey?: (string|null); conversationPublicKey?: (string|null); @@ -6126,7 +6229,8 @@ export namespace berty { TypeAccountUpdated = 7, TypeMemberUpdated = 8, TypeDeviceUpdated = 9, - TypeNotified = 10 + TypeNotified = 10, + TypeMediaUpdated = 11 } interface IConversationUpdated { @@ -6289,6 +6393,24 @@ export namespace berty { public toJSON(): { [k: string]: any }; } + interface IMediaUpdated { + media?: (berty.messenger.v1.IMedia|null); + } + + class MediaUpdated implements IMediaUpdated { + + public media?: (berty.messenger.v1.IMedia|null); + public static create(properties?: berty.messenger.v1.StreamEvent.IMediaUpdated): berty.messenger.v1.StreamEvent.MediaUpdated; + public static encode(message: berty.messenger.v1.StreamEvent.IMediaUpdated, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.StreamEvent.IMediaUpdated, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.StreamEvent.MediaUpdated; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.StreamEvent.MediaUpdated; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.StreamEvent.MediaUpdated; + public static toObject(message: berty.messenger.v1.StreamEvent.MediaUpdated, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + interface INotified { type?: (berty.messenger.v1.StreamEvent.Notified.Type|null); title?: (string|null); @@ -6698,11 +6820,13 @@ export namespace berty { interface IRequest { link?: (string|null); + passphrase?: (Uint8Array|null); } class Request implements IRequest { public link: string; + public passphrase: Uint8Array; public static create(properties?: berty.messenger.v1.ContactRequest.IRequest): berty.messenger.v1.ContactRequest.Request; public static encode(message: berty.messenger.v1.ContactRequest.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.ContactRequest.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; @@ -6806,6 +6930,7 @@ export namespace berty { type?: (berty.messenger.v1.AppMessage.Type|null); payload?: (Uint8Array|null); conversationPublicKey?: (string|null); + mediaCids?: (string[]|null); } class Request implements IRequest { @@ -6813,6 +6938,7 @@ export namespace berty { public type: berty.messenger.v1.AppMessage.Type; public payload: Uint8Array; public conversationPublicKey: string; + public mediaCids: string[]; public static create(properties?: berty.messenger.v1.Interact.IRequest): berty.messenger.v1.Interact.Request; public static encode(message: berty.messenger.v1.Interact.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: berty.messenger.v1.Interact.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; @@ -7161,6 +7287,122 @@ export namespace berty { public static toObject(message: berty.messenger.v1.LocalConversationState, options?: $protobuf.IConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; } + + interface IMediaPrepare { + } + + class MediaPrepare implements IMediaPrepare { + + public static create(properties?: berty.messenger.v1.IMediaPrepare): berty.messenger.v1.MediaPrepare; + public static encode(message: berty.messenger.v1.IMediaPrepare, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.IMediaPrepare, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.MediaPrepare; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.MediaPrepare; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.MediaPrepare; + public static toObject(message: berty.messenger.v1.MediaPrepare, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + + namespace MediaPrepare { + + interface IRequest { + block?: (Uint8Array|null); + info?: (berty.messenger.v1.IMedia|null); + uri?: (string|null); + } + + class Request implements IRequest { + + public block: Uint8Array; + public info?: (berty.messenger.v1.IMedia|null); + public uri: string; + public static create(properties?: berty.messenger.v1.MediaPrepare.IRequest): berty.messenger.v1.MediaPrepare.Request; + public static encode(message: berty.messenger.v1.MediaPrepare.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.MediaPrepare.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.MediaPrepare.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.MediaPrepare.Request; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.MediaPrepare.Request; + public static toObject(message: berty.messenger.v1.MediaPrepare.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + + interface IReply { + cid?: (string|null); + } + + class Reply implements IReply { + + public cid: string; + public static create(properties?: berty.messenger.v1.MediaPrepare.IReply): berty.messenger.v1.MediaPrepare.Reply; + public static encode(message: berty.messenger.v1.MediaPrepare.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.MediaPrepare.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.MediaPrepare.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.MediaPrepare.Reply; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.MediaPrepare.Reply; + public static toObject(message: berty.messenger.v1.MediaPrepare.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + } + + interface IMediaRetrieve { + } + + class MediaRetrieve implements IMediaRetrieve { + + public static create(properties?: berty.messenger.v1.IMediaRetrieve): berty.messenger.v1.MediaRetrieve; + public static encode(message: berty.messenger.v1.IMediaRetrieve, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.IMediaRetrieve, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.MediaRetrieve; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.MediaRetrieve; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.MediaRetrieve; + public static toObject(message: berty.messenger.v1.MediaRetrieve, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + + namespace MediaRetrieve { + + interface IRequest { + cid?: (string|null); + } + + class Request implements IRequest { + + public cid: string; + public static create(properties?: berty.messenger.v1.MediaRetrieve.IRequest): berty.messenger.v1.MediaRetrieve.Request; + public static encode(message: berty.messenger.v1.MediaRetrieve.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.MediaRetrieve.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.MediaRetrieve.Request; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.MediaRetrieve.Request; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.MediaRetrieve.Request; + public static toObject(message: berty.messenger.v1.MediaRetrieve.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + + interface IReply { + block?: (Uint8Array|null); + info?: (berty.messenger.v1.IMedia|null); + } + + class Reply implements IReply { + + public block: Uint8Array; + public info?: (berty.messenger.v1.IMedia|null); + public static create(properties?: berty.messenger.v1.MediaRetrieve.IReply): berty.messenger.v1.MediaRetrieve.Reply; + public static encode(message: berty.messenger.v1.MediaRetrieve.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: berty.messenger.v1.MediaRetrieve.IReply, writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): berty.messenger.v1.MediaRetrieve.Reply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): berty.messenger.v1.MediaRetrieve.Reply; + public static verify(message: { [k: string]: any }): (string|null); + public static fromObject(object: { [k: string]: any }): berty.messenger.v1.MediaRetrieve.Reply; + public static toObject(message: berty.messenger.v1.MediaRetrieve.Reply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + } + } } } } diff --git a/js/packages/api/root.pb.js b/js/packages/api/root.pb.js index 6b78f980cc..b4d5e60182 100644 --- a/js/packages/api/root.pb.js +++ b/js/packages/api/root.pb.js @@ -570,6 +570,12 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ ErrDeserialization: 104, ErrStreamRead: 105, ErrStreamWrite: 106, + ErrStreamTransform: 110, + ErrStreamSendAndClose: 111, + ErrStreamHeaderWrite: 112, + ErrStreamHeaderRead: 115, + ErrStreamSink: 113, + ErrStreamCloseAndRecv: 114, ErrMissingMapKey: 107, ErrDBWrite: 108, ErrDBRead: 109, @@ -626,6 +632,7 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ ErrBridgeInterrupted: 1600, ErrBridgeNotRunning: 1601, ErrMessengerInvalidDeepLink: 2000, + ErrMessengerDeepLinkRequiresPassphrase: 2001, ErrDBEntryAlreadyExists: 2100, ErrDBAddConversation: 2101, ErrDBAddContactRequestOutgoingSent: 2102, @@ -636,8 +643,8 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ ErrDBMultipleRecords: 2107, ErrReplayProcessGroupMetadata: 2200, ErrReplayProcessGroupMessage: 2201, - ErrPrepareAttachment: 2300, - ErrRetrieveAttachment: 2301, + ErrAttachmentPrepare: 2300, + ErrAttachmentRetrieve: 2301, ErrProtocolSend: 2302, ErrCLINoTermcaps: 3001, ErrServicesAuth: 4000, @@ -687,185 +694,174 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ nested: { v1: { options: { - go_package: "berty.tech/berty/go/pkg/bertyprotocol" + go_package: "berty.tech/berty/go/pkg/protocoltypes", + "(gogoproto.goproto_enum_prefix_all)": false, + "(gogoproto.marshaler_all)": true, + "(gogoproto.unmarshaler_all)": true, + "(gogoproto.sizer_all)": true }, nested: { ProtocolService: { methods: { InstanceExportData: { - requestType: "types.v1.InstanceExportData.Request", - responseType: "types.v1.InstanceExportData.Reply", + requestType: "InstanceExportData.Request", + responseType: "InstanceExportData.Reply", responseStream: true }, InstanceGetConfiguration: { - requestType: "types.v1.InstanceGetConfiguration.Request", - responseType: "types.v1.InstanceGetConfiguration.Reply" + requestType: "InstanceGetConfiguration.Request", + responseType: "InstanceGetConfiguration.Reply" }, ContactRequestReference: { - requestType: "types.v1.ContactRequestReference.Request", - responseType: "types.v1.ContactRequestReference.Reply" + requestType: "ContactRequestReference.Request", + responseType: "ContactRequestReference.Reply" }, ContactRequestDisable: { - requestType: "types.v1.ContactRequestDisable.Request", - responseType: "types.v1.ContactRequestDisable.Reply" + requestType: "ContactRequestDisable.Request", + responseType: "ContactRequestDisable.Reply" }, ContactRequestEnable: { - requestType: "types.v1.ContactRequestEnable.Request", - responseType: "types.v1.ContactRequestEnable.Reply" + requestType: "ContactRequestEnable.Request", + responseType: "ContactRequestEnable.Reply" }, ContactRequestResetReference: { - requestType: "types.v1.ContactRequestResetReference.Request", - responseType: "types.v1.ContactRequestResetReference.Reply" + requestType: "ContactRequestResetReference.Request", + responseType: "ContactRequestResetReference.Reply" }, ContactRequestSend: { - requestType: "types.v1.ContactRequestSend.Request", - responseType: "types.v1.ContactRequestSend.Reply" + requestType: "ContactRequestSend.Request", + responseType: "ContactRequestSend.Reply" }, ContactRequestAccept: { - requestType: "types.v1.ContactRequestAccept.Request", - responseType: "types.v1.ContactRequestAccept.Reply" + requestType: "ContactRequestAccept.Request", + responseType: "ContactRequestAccept.Reply" }, ContactRequestDiscard: { - requestType: "types.v1.ContactRequestDiscard.Request", - responseType: "types.v1.ContactRequestDiscard.Reply" + requestType: "ContactRequestDiscard.Request", + responseType: "ContactRequestDiscard.Reply" }, ContactBlock: { - requestType: "types.v1.ContactBlock.Request", - responseType: "types.v1.ContactBlock.Reply" + requestType: "ContactBlock.Request", + responseType: "ContactBlock.Reply" }, ContactUnblock: { - requestType: "types.v1.ContactUnblock.Request", - responseType: "types.v1.ContactUnblock.Reply" + requestType: "ContactUnblock.Request", + responseType: "ContactUnblock.Reply" }, ContactAliasKeySend: { - requestType: "types.v1.ContactAliasKeySend.Request", - responseType: "types.v1.ContactAliasKeySend.Reply" + requestType: "ContactAliasKeySend.Request", + responseType: "ContactAliasKeySend.Reply" }, MultiMemberGroupCreate: { - requestType: "types.v1.MultiMemberGroupCreate.Request", - responseType: "types.v1.MultiMemberGroupCreate.Reply" + requestType: "MultiMemberGroupCreate.Request", + responseType: "MultiMemberGroupCreate.Reply" }, MultiMemberGroupJoin: { - requestType: "types.v1.MultiMemberGroupJoin.Request", - responseType: "types.v1.MultiMemberGroupJoin.Reply" + requestType: "MultiMemberGroupJoin.Request", + responseType: "MultiMemberGroupJoin.Reply" }, MultiMemberGroupLeave: { - requestType: "types.v1.MultiMemberGroupLeave.Request", - responseType: "types.v1.MultiMemberGroupLeave.Reply" + requestType: "MultiMemberGroupLeave.Request", + responseType: "MultiMemberGroupLeave.Reply" }, MultiMemberGroupAliasResolverDisclose: { - requestType: "types.v1.MultiMemberGroupAliasResolverDisclose.Request", - responseType: "types.v1.MultiMemberGroupAliasResolverDisclose.Reply" + requestType: "MultiMemberGroupAliasResolverDisclose.Request", + responseType: "MultiMemberGroupAliasResolverDisclose.Reply" }, MultiMemberGroupAdminRoleGrant: { - requestType: "types.v1.MultiMemberGroupAdminRoleGrant.Request", - responseType: "types.v1.MultiMemberGroupAdminRoleGrant.Reply" + requestType: "MultiMemberGroupAdminRoleGrant.Request", + responseType: "MultiMemberGroupAdminRoleGrant.Reply" }, MultiMemberGroupInvitationCreate: { - requestType: "types.v1.MultiMemberGroupInvitationCreate.Request", - responseType: "types.v1.MultiMemberGroupInvitationCreate.Reply" + requestType: "MultiMemberGroupInvitationCreate.Request", + responseType: "MultiMemberGroupInvitationCreate.Reply" }, AppMetadataSend: { - requestType: "types.v1.AppMetadataSend.Request", - responseType: "types.v1.AppMetadataSend.Reply" + requestType: "AppMetadataSend.Request", + responseType: "AppMetadataSend.Reply" }, AppMessageSend: { - requestType: "types.v1.AppMessageSend.Request", - responseType: "types.v1.AppMessageSend.Reply" + requestType: "AppMessageSend.Request", + responseType: "AppMessageSend.Reply" }, GroupMetadataList: { - requestType: "types.v1.GroupMetadataList.Request", - responseType: "types.v1.GroupMetadataEvent", + requestType: "GroupMetadataList.Request", + responseType: "GroupMetadataEvent", responseStream: true }, GroupMessageList: { - requestType: "types.v1.GroupMessageList.Request", - responseType: "types.v1.GroupMessageEvent", + requestType: "GroupMessageList.Request", + responseType: "GroupMessageEvent", responseStream: true }, GroupInfo: { - requestType: "types.v1.GroupInfo.Request", - responseType: "types.v1.GroupInfo.Reply" + requestType: "GroupInfo.Request", + responseType: "GroupInfo.Reply" }, ActivateGroup: { - requestType: "types.v1.ActivateGroup.Request", - responseType: "types.v1.ActivateGroup.Reply" + requestType: "ActivateGroup.Request", + responseType: "ActivateGroup.Reply" }, DeactivateGroup: { - requestType: "types.v1.DeactivateGroup.Request", - responseType: "types.v1.DeactivateGroup.Reply" + requestType: "DeactivateGroup.Request", + responseType: "DeactivateGroup.Reply" }, MonitorGroup: { - requestType: "types.v1.MonitorGroup.Request", - responseType: "types.v1.MonitorGroup.Reply", + requestType: "MonitorGroup.Request", + responseType: "MonitorGroup.Reply", responseStream: true }, DebugListGroups: { - requestType: "types.v1.DebugListGroups.Request", - responseType: "types.v1.DebugListGroups.Reply", + requestType: "DebugListGroups.Request", + responseType: "DebugListGroups.Reply", responseStream: true }, DebugInspectGroupStore: { - requestType: "types.v1.DebugInspectGroupStore.Request", - responseType: "types.v1.DebugInspectGroupStore.Reply", + requestType: "DebugInspectGroupStore.Request", + responseType: "DebugInspectGroupStore.Reply", responseStream: true }, DebugGroup: { - requestType: "types.v1.DebugGroup.Request", - responseType: "types.v1.DebugGroup.Reply" + requestType: "DebugGroup.Request", + responseType: "DebugGroup.Reply" }, SystemInfo: { - requestType: "types.v1.SystemInfo.Request", - responseType: "types.v1.SystemInfo.Reply" + requestType: "SystemInfo.Request", + responseType: "SystemInfo.Reply" }, AuthServiceInitFlow: { - requestType: "types.v1.AuthServiceInitFlow.Request", - responseType: "types.v1.AuthServiceInitFlow.Reply" + requestType: "AuthServiceInitFlow.Request", + responseType: "AuthServiceInitFlow.Reply" }, AuthServiceCompleteFlow: { - requestType: "types.v1.AuthServiceCompleteFlow.Request", - responseType: "types.v1.AuthServiceCompleteFlow.Reply" + requestType: "AuthServiceCompleteFlow.Request", + responseType: "AuthServiceCompleteFlow.Reply" }, ServicesTokenList: { - requestType: "types.v1.ServicesTokenList.Request", - responseType: "types.v1.ServicesTokenList.Reply", + requestType: "ServicesTokenList.Request", + responseType: "ServicesTokenList.Reply", responseStream: true }, ReplicationServiceRegisterGroup: { - requestType: "types.v1.ReplicationServiceRegisterGroup.Request", - responseType: "types.v1.ReplicationServiceRegisterGroup.Reply" + requestType: "ReplicationServiceRegisterGroup.Request", + responseType: "ReplicationServiceRegisterGroup.Reply" }, PeerList: { - requestType: "types.v1.PeerList.Request", - responseType: "types.v1.PeerList.Reply" + requestType: "PeerList.Request", + responseType: "PeerList.Reply" }, AttachmentPrepare: { - requestType: "types.v1.AttachmentPrepare.Request", + requestType: "AttachmentPrepare.Request", requestStream: true, - responseType: "types.v1.AttachmentPrepare.Reply" + responseType: "AttachmentPrepare.Reply" }, AttachmentRetrieve: { - requestType: "types.v1.AttachmentRetrieve.Request", - responseType: "types.v1.AttachmentRetrieve.Reply", + requestType: "AttachmentRetrieve.Request", + responseType: "AttachmentRetrieve.Reply", responseStream: true } } - } - } - } - } - }, - types: { - nested: { - v1: { - options: { - go_package: "berty.tech/berty/go/pkg/bertytypes", - "(gogoproto.goproto_enum_prefix_all)": false, - "(gogoproto.marshaler_all)": true, - "(gogoproto.unmarshaler_all)": true, - "(gogoproto.sizer_all)": true - }, - nested: { + }, GroupType: { values: { GroupTypeUndefined: 0, @@ -3055,7 +3051,7 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ nested: { v1: { options: { - go_package: "berty.tech/berty/go/pkg/bertymessenger", + go_package: "berty.tech/berty/go/pkg/messengertypes", "(gogoproto.goproto_unkeyed_all)": false, "(gogoproto.goproto_unrecognized_all)": false, "(gogoproto.goproto_sizecache_all)": false @@ -3151,8 +3147,8 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ responseType: "ConversationClose.Reply" }, ServicesTokenList: { - requestType: "types.v1.ServicesTokenList.Request", - responseType: "types.v1.ServicesTokenList.Reply", + requestType: "protocol.v1.ServicesTokenList.Request", + responseType: "protocol.v1.ServicesTokenList.Reply", responseStream: true }, ReplicationServiceRegisterGroup: { @@ -3175,6 +3171,16 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ requestType: "InstanceExportData.Request", responseType: "InstanceExportData.Reply", responseStream: true + }, + MediaPrepare: { + requestType: "MediaPrepare.Request", + requestStream: true, + responseType: "MediaPrepare.Reply" + }, + MediaRetrieve: { + requestType: "MediaRetrieve.Request", + responseType: "MediaRetrieve.Reply", + responseStream: true } } }, @@ -3350,6 +3356,10 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ link: { type: "string", id: 1 + }, + passphrase: { + type: "bytes", + id: 2 } } }, @@ -3378,18 +3388,75 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ }, bertyGroup: { type: "BertyGroup", - id: 3, - options: { - "(gogoproto.customname)": "BertyGroup" - } + id: 3 + }, + encrypted: { + type: "Encrypted", + id: 4 } }, nested: { + Encrypted: { + fields: { + kind: { + type: "Kind", + id: 1 + }, + nonce: { + type: "bytes", + id: 2 + }, + displayName: { + type: "string", + id: 3 + }, + contactPublicRendezvousSeed: { + type: "bytes", + id: 10 + }, + contactAccountPk: { + type: "bytes", + id: 11, + options: { + "(gogoproto.customname)": "ContactAccountPK" + } + }, + contactDisplayName: { + type: "bytes", + id: 12 + }, + groupPublicKey: { + type: "bytes", + id: 20 + }, + groupSecret: { + type: "bytes", + id: 21 + }, + groupSecretSig: { + type: "bytes", + id: 22 + }, + groupType: { + type: "berty.protocol.v1.GroupType", + id: 23 + }, + groupSignPub: { + type: "bytes", + id: 24 + }, + groupDisplayName: { + type: "bytes", + id: 25 + } + } + }, Kind: { values: { UnknownKind: 0, ContactInviteV1Kind: 1, - GroupV1Kind: 2 + GroupV1Kind: 2, + EncryptedV1Kind: 3 } } } @@ -3515,7 +3582,7 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ BertyGroup: { fields: { group: { - type: "berty.types.v1.Group", + type: "berty.protocol.v1.Group", id: 1 }, displayName: { @@ -3540,6 +3607,11 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ options: { "(gogoproto.jsontag)": "sentDate" } + }, + medias: { + rule: "repeated", + type: "Media", + id: 4 } }, nested: { @@ -3553,7 +3625,7 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ TypeSetUserInfo: 5, TypeAcknowledge: 6, TypeReplyOptions: 7, - TypeMonitorMetadata: 8 + TypeMonitorMetadata: 100 } }, UserMessage: { @@ -3631,7 +3703,7 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ MonitorMetadata: { fields: { event: { - type: "berty.types.v1.MonitorGroup.EventMonitor", + type: "berty.protocol.v1.MonitorGroup.EventMonitor", id: 1 } } @@ -3659,7 +3731,7 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ Reply: { fields: { protocol: { - type: "berty.types.v1.SystemInfo.Reply", + type: "berty.protocol.v1.SystemInfo.Reply", id: 1 }, messenger: { @@ -3671,7 +3743,7 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ Messenger: { fields: { process: { - type: "berty.types.v1.SystemInfo.Process", + type: "berty.protocol.v1.SystemInfo.Process", id: 1 }, warns: { @@ -3738,6 +3810,10 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ link: { type: "string", id: 1 + }, + passphrase: { + type: "bytes", + id: 2 } } }, @@ -3889,6 +3965,61 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ "(gogoproto.moretags)": "gorm:index;column:target_cid", "(gogoproto.customname)": "TargetCID" } + }, + medias: { + rule: "repeated", + type: "Media", + id: 15 + } + } + }, + Media: { + fields: { + cid: { + type: "string", + id: 1, + options: { + "(gogoproto.moretags)": "gorm:primaryKey;column:cid", + "(gogoproto.customname)": "CID" + } + }, + mimeType: { + type: "string", + id: 2 + }, + filename: { + type: "string", + id: 3 + }, + displayName: { + type: "string", + id: 4 + }, + interactionCid: { + type: "string", + id: 100, + options: { + "(gogoproto.moretags)": "gorm:index;column:interaction_cid", + "(gogoproto.customname)": "InteractionCID" + } + }, + state: { + type: "State", + id: 103 + } + }, + nested: { + State: { + values: { + StateUnknown: 0, + StateNeverDownloaded: 1, + StatePartiallyDownloaded: 2, + StateDownloaded: 3, + StateInCache: 4, + StateInvalidCrypto: 5, + StatePrepared: 100, + StateAttached: 101 + } } } }, @@ -4187,7 +4318,8 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ TypeAccountUpdated: 7, TypeMemberUpdated: 8, TypeDeviceUpdated: 9, - TypeNotified: 10 + TypeNotified: 10, + TypeMediaUpdated: 11 } }, ConversationUpdated: { @@ -4260,6 +4392,14 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ ListEnded: { fields: {} }, + MediaUpdated: { + fields: { + media: { + type: "Media", + id: 1 + } + } + }, Notified: { fields: { type: { @@ -4452,6 +4592,10 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ link: { type: "string", id: 1 + }, + passphrase: { + type: "bytes", + id: 2 } } }, @@ -4492,6 +4636,11 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ conversationPublicKey: { type: "string", id: 3 + }, + mediaCids: { + rule: "repeated", + type: "string", + id: 4 } } }, @@ -4640,6 +4789,60 @@ const $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $ id: 4 } } + }, + MediaPrepare: { + fields: {}, + nested: { + Request: { + fields: { + block: { + type: "bytes", + id: 1 + }, + info: { + type: "Media", + id: 2 + }, + uri: { + type: "string", + id: 3 + } + } + }, + Reply: { + fields: { + cid: { + type: "string", + id: 1 + } + } + } + } + }, + MediaRetrieve: { + fields: {}, + nested: { + Request: { + fields: { + cid: { + type: "string", + id: 1 + } + } + }, + Reply: { + fields: { + block: { + type: "bytes", + id: 1 + }, + info: { + type: "Media", + id: 2 + } + } + } + } } } } diff --git a/js/packages/berty-i18n/index.ts b/js/packages/berty-i18n/index.ts index 547caac303..8b577be94d 100644 --- a/js/packages/berty-i18n/index.ts +++ b/js/packages/berty-i18n/index.ts @@ -3,8 +3,8 @@ import { initReactI18next } from 'react-i18next' import { languages } from './locale/languages' i18next.use(initReactI18next).init({ - fallbackLng: 'en', - lng: 'en', + fallbackLng: 'enUS', + lng: 'enUS', resources: languages, debug: true, }) diff --git a/js/packages/berty-i18n/locale/el/messages.json b/js/packages/berty-i18n/locale/af-ZA/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/el/messages.json rename to js/packages/berty-i18n/locale/af-ZA/messages.json index 25fb4fb3f8..68964413f2 100644 --- a/js/packages/berty-i18n/locale/el/messages.json +++ b/js/packages/berty-i18n/locale/af-ZA/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/ar/messages.json b/js/packages/berty-i18n/locale/ar-SA/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/ar/messages.json rename to js/packages/berty-i18n/locale/ar-SA/messages.json index 25fb4fb3f8..68964413f2 100644 --- a/js/packages/berty-i18n/locale/ar/messages.json +++ b/js/packages/berty-i18n/locale/ar-SA/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/bg/messages.json b/js/packages/berty-i18n/locale/bg-BG/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/bg/messages.json rename to js/packages/berty-i18n/locale/bg-BG/messages.json index c62c119af7..1e6dfcec4c 100644 --- a/js/packages/berty-i18n/locale/bg/messages.json +++ b/js/packages/berty-i18n/locale/bg-BG/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/ca/messages.json b/js/packages/berty-i18n/locale/ca-ES/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/ca/messages.json rename to js/packages/berty-i18n/locale/ca-ES/messages.json index 25fb4fb3f8..68964413f2 100644 --- a/js/packages/berty-i18n/locale/ca/messages.json +++ b/js/packages/berty-i18n/locale/ca-ES/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/cs/messages.json b/js/packages/berty-i18n/locale/cs-CZ/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/cs/messages.json rename to js/packages/berty-i18n/locale/cs-CZ/messages.json index caadbe81ff..349528ce19 100644 --- a/js/packages/berty-i18n/locale/cs/messages.json +++ b/js/packages/berty-i18n/locale/cs-CZ/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/da/messages.json b/js/packages/berty-i18n/locale/da-DK/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/da/messages.json rename to js/packages/berty-i18n/locale/da-DK/messages.json index caadbe81ff..349528ce19 100644 --- a/js/packages/berty-i18n/locale/da/messages.json +++ b/js/packages/berty-i18n/locale/da-DK/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/de/messages.json b/js/packages/berty-i18n/locale/de-DE/messages.json similarity index 97% rename from js/packages/berty-i18n/locale/de/messages.json rename to js/packages/berty-i18n/locale/de-DE/messages.json index c54bb29ad1..c91bf39cd2 100644 --- a/js/packages/berty-i18n/locale/de/messages.json +++ b/js/packages/berty-i18n/locale/de-DE/messages.json @@ -81,9 +81,6 @@ "accept": "Akzeptieren", "card-title": "Kontaktanfrage!" }, - "messages": { - "title": "Nachrichten" - }, "input-placeholder": "", "no-contacts": "Sie haben noch keine Kontakte oder Chats", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "Entwicklerwerkzeuge", "header-left-button": "Geräteinformationen", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "fakultativ", + "tor-required-option": "erforderlich", + "tor-disabled-option": "deaktiviert", "header-middle-button": "Fake-Daten generieren", "header-right-button": "Daemon neu starten", "system-info-button": "System-Info", @@ -400,6 +402,11 @@ "no-registered-button": "Kein Replikationsdienst registriert", "connect-button": "Zu von Berty betriebenen Diensten verbinden", "manage-add-button": "Dienste verwalten oder hinzufügen" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/af/messages.json b/js/packages/berty-i18n/locale/el-GR/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/af/messages.json rename to js/packages/berty-i18n/locale/el-GR/messages.json index 25fb4fb3f8..68964413f2 100644 --- a/js/packages/berty-i18n/locale/af/messages.json +++ b/js/packages/berty-i18n/locale/el-GR/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/en-US/messages.json b/js/packages/berty-i18n/locale/en-US/messages.json new file mode 100644 index 0000000000..82eb1413d9 --- /dev/null +++ b/js/packages/berty-i18n/locale/en-US/messages.json @@ -0,0 +1,425 @@ +{ + "time": { + "fuzzy-time": "hh:mm", + "fuzzy-month-day": "dd/MM", + "fuzzy-year-month": "MM/YY", + "datetime": "MMM Do YYYY hh:mm", + "started-ago": "Started {{date}} ago" + }, + "onboarding": { + "getstarted": { + "desc": "The secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network", + "open-registered-account": "Open a registered account", + "import-button": "Import data from an existing account", + "account-selector-create-button": "Create a new account", + "more-options": "More options", + "button": "GET STARTED" + }, + "select-mode": { + "performance": { + "title": "Performance", + "desc": "Easy to use - All the features", + "push-notif": "Receive push notifications", + "offline-message": "Offline messaging", + "add-contact": "Add contacts easily", + "fast-message": "Fastest message delivery" + }, + "high-level": { + "title": "Highest level of privacy", + "desc": "For advanced users - Less metadatas", + "disable-push-notif": "Push notifications disabled", + "disable-local-peer-discovery": "Local peer discovery disabled", + "disable-contact-request": "Contact requests disabled" + } + }, + "create-account": { + "title": "Create your account", + "desc": "A name is the only information required", + "required": "Required", + "placeholder": "Name", + "button": "CREATE MY ACCOUNT" + }, + "services-auth": { + "header": "Authenticate to services", + "title": "Services", + "recommended": "Recommended", + "desc": "This will automatically replicate your conversations on a server", + "button": "Use Berty operated services", + "skip": "SKIP AND DO THIS LATER" + }, + "generate-key": { + "title": "Starting the Berty node…", + "desc": "This might take a few seconds" + }, + "notifications": { + "header": "Don't miss any new message or contact request", + "recommended": "Recommended", + "title": "Notifications", + "desc": "You need to authorize push notifications from Berty on your phone", + "button": "AUTHORIZE NOTIFICATIONS", + "skip": "SKIP AND DO THIS LATER" + }, + "bluetooth": { + "header": "Communicate without an internet connection (wifi or data) by connecting your phone directly with peers nearby", + "optional": "Optional", + "title": "Bluetooth", + "desc": "To use this feature you need to authorize the use of Bluetooth on your phone", + "button": "AUTHORIZE BLUETOOTH", + "skip": "SKIP AND DO THIS LATER" + }, + "setup-finished": { + "title": "Setup finished!", + "desc": "You can now use the app, start adding contacts and talk freely and privately with them", + "button": "START USING BERTY" + } + }, + "main": { + "home": { + "requests": { + "title": "Requests", + "received-at": "Received", + "accept": "Accept", + "card-title": "Contact request!" + }, + "input-placeholder": "Search keyword", + "no-contacts": "You don't have any contacts or chat yet", + "search": { + "no-results": "No results found" + } + }, + "home-modal": { + "top-button": "Create new group", + "bottom-button": "Scan contact or group" + } + }, + "settings": { + "home": { + "header-left-button": "Help", + "header-center-button": "Devtools", + "header-right-button": "Settings", + "network-button": "Network List", + "switch-accounts": "Use another account" + }, + "network-map": { + "title": "Network List", + "online-peers": "Online Peers" + }, + "mode": { + "title": "Settings", + "desc": "Customize everything to get the app that fits your needs", + "notifications-button": { + "title": "Notifications", + "tag-enabled": "Enabled", + "tag-disabled": "Disabled" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "Enabled", + "tag-disabled": "Disabled" + }, + "app-mode-button": { + "title": "App mode", + "performance-tag": "Performance", + "privacy-tag": "Privacy", + "description-tag": "Easy to use - All the features", + "first-bullet-point": "Receive push notifications", + "second-bullet-point": "Receive contact requests", + "third-bullet-point": "Local peer discovery (BLE & Multicast DNS)" + }, + "dark-mode-button": "Dark mode", + "receive-contact-requests-button": "Receive contact requests", + "external-services-button": "External services", + "auto-replicate-button": "Auto replicate", + "multicast-dns-button": { + "title": "Multicast DNS", + "desc": "Local Peer discovery" + }, + "blocked-contacts-button": { + "title": "Blocked contacts", + "tag": "blocked" + }, + "delete-account-button": "Delete my account", + "backup-account-button": "Backup my account" + }, + "edit-profile": { + "title": "Edit my profile", + "qr-will-update": "Your Berty ID (QR code) will be updated", + "ocr-wont-update": "Your pending contact requests won’t be updated", + "save": "Save changes", + "cancel": "Cancel", + "name-input-placeholder": "Name...", + "name-input-label": "Name" + }, + "notifications": { + "title": "Notifications", + "enabled-desc": "You have activated notifications!", + "disabled-desc": "You have not activated notifications for this app", + "activate-button": "Activate notifications", + "contact-request-button": { + "title": "Contact request", + "desc": "Receive a notification everytime someone sends you a contact request" + }, + "messages-notifications-button": { + "title": "Messages notifications", + "display-button": "Display notifications", + "preview-button": "Messages preview", + "sound-button": "Sound", + "exceptions-button": { + "title": "Exceptions", + "preview-value": "Add", + "tag": "{{count}} exception", + "tag_plural": "{{count}} exceptions" + } + }, + "group-notifications-button": { + "title": "Groups notifications", + "display-button": "Display notifications", + "preview-button": "Messages preview", + "sound-button": "Sound", + "exceptions-button": { + "title": "Exceptions", + "preview-value": "Add", + "tag": "{{count}} exception", + "tag_plural": "{{count}} exceptions" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "Bluetooth allows you top use the Berty app when you don't have a network connection (wifi or data) by connecting your phone directly with peers nearby", + "activate-button": "Activate bluetooth" + }, + "mc": { + "activate-button": "Activate Multipeer Connectivity" + }, + "services-auth": { + "title": "External services", + "operated-services-button": "Use Berty operated services", + "register-service-button": { + "title": "Register a custom service provider", + "input-placeholder": "Service URL", + "action": "Add" + }, + "registered-services-button": { + "title": "Currently registered services", + "sample-no-services": "No services registered", + "sample-unknown-service": "Unknown service" + } + }, + "delete-account": { + "title": "Delete account!", + "first-desc": "Are you sure you want to delete your account?", + "desc": "Please type delete to confirm", + "cancel-button": "CANCEL", + "delete-button": "DELETE" + }, + "help": { + "title": "Help", + "security-privacy-button": { + "title": "Security & Privacy", + "desc": "Keep your data safe & your life private" + }, + "updates-button": "Updates", + "about-button": "About Berty", + "account-button": "Account & Berty ID", + "contact-button": "Contacts & Requests", + "message-button": "Messages", + "group-button": "Groups", + "settings-button": "Settings", + "ask-button": "Ask a question", + "report-button": "Report a bug" + }, + "about": { + "title": "About Berty", + "top-left-button": "Private & Secure", + "top-right-button": "Peer to peer network", + "bottom-left-button": "No internet or data required", + "bottom-right-button": "No network trust required", + "terms-button": "Terms of use", + "privacy-button": "Privacy policy", + "software-button": "Software license", + "contact-button": "Contact us", + "website-button": "Website" + }, + "updates": { + "title": "App updates", + "up-to-date-desc": "Your app is up to date", + "version": "Version", + "current-tag": "Current", + "installed-tag": "Installed", + "initial-tag": "Initial install", + "not-installed-tag": "Not installed" + }, + "devtools": { + "title": "Dev tools", + "header-left-button": "Device infos", + "simulate-button": "Simulate stream error", + "tor-button": "Tor {{option}}", + "tor-optional-option": "optional", + "tor-required-option": "required", + "tor-disabled-option": "disabled", + "header-middle-button": "Generate fake data", + "header-right-button": "Restart daemon", + "system-info-button": "System info", + "debug-button": "Debug", + "add-dev-conversations-button": "Add dev conversations", + "share-button": { + "title": "Share ID on discord", + "alert-title": "Do you want to share your QR code to \"#dev-logs\" on Berty Discord?", + "alert-message": "This will allow other staff to scan your QR code or copy your contact link.", + "alert-accept-button": "Yep 👍", + "alert-cancel-button": "Nope" + }, + "native-bridge-button": "Test Native Bridge", + "dump-account-button": "Dump account", + "dump-contacts-button": "Dump contacts", + "dump-conversations-button": "Dump conversations", + "dump-interactions-button": "Dump interactions", + "dump-members-button": "Dump members", + "stop-node-button": "Stop node", + "bot-mode-button": "Bot mode", + "local-grpc-button": "local gRPC", + "console-logs-button": "Console logs", + "ipfs-webui-button": "IPFS WebUI", + "notifications-button": "Notifications", + "send-to-all-button": { + "title": "Send messages to all contacts", + "sending": "Sending...", + "test": "Test, ", + "tried": "✔ Tried sending to {{length}} contacts" + }, + "footer-left-button": "Device infos", + "footer-middle-button": "List events", + "footer-right-button": "Restart daemon" + }, + "system-info": { + "title": "System info" + }, + "fake-data": { + "title": "Generate fake data", + "contacts-button": "Gen fake contacts", + "multi-members-button": "Gen fake multi-members", + "messages-button": "Gen fake messages", + "delete-button": "Delete fake data" + }, + "add-dev-conversations": { + "title": "Add dev conversations", + "add": "Add {{name}}", + "tag-bot": "Bot", + "tag-contact": "Contact", + "tag-conversation": "Group" + }, + "ipfs-webui": { + "title": "IPFS WebUI" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "Invalid link!", + "invalid-qr": "Invalid QR code!", + "error": "Error!" + }, + "invalid-scan": { + "dismiss-button": "DISMISS" + }, + "add-this-contact": { + "fingerprint": "Fingerprint", + "info": "Info", + "devices": "Devices" + }, + "group-invitation": { + "fingerprint": "Fingerprint", + "info": "Infos", + "devices": "Devices" + } + }, + "chat": { + "contact-settings": { + "mark-button": "Mark as verified", + "block-button": "Block contact", + "delete-button": "Delete contact", + "fingerprint": "Fingerprint", + "info": "Infos", + "devices": "Devices" + }, + "multi-member": { + "input-placeholder": "Write a secure message..." + }, + "multi-member-settings": { + "header-left-button": "Search", + "header-middle-button": "Call", + "header-right-button": "Share", + "media-button": "Medias, links & docs", + "notifications-button": "Receive notifications", + "members-button": { + "title": "Members", + "unknown": "Unknown" + }, + "add-member-button": "Add member", + "invite-button": "Invite by link", + "save-button": "Save conversation on server", + "erase-button": "Erase conversation", + "leave-button": "Leave group" + }, + "multi-member-qr": { + "title": "QR Group" + }, + "one-to-one": { + "contact-request-box": { + "title": "CONTACT REQUEST", + "refuse-button": "REFUSE", + "accept-button": "ACCEPT", + "accepted-button": "ACCEPTED" + }, + "betabot-box": { + "title": "ADD BETA BOT?", + "desc": "You don't have any contacts yet would you like to add the Beta Bot to discover and test conversations?", + "skip-button": "SKIP", + "add-button": "ADD !" + }, + "infos-chat": { + "connection-confirmed": "👋 Berty connection confirmed! 🎉", + "request-sent": "Request Sent ✈", + "incoming": "Accept this request to reply!", + "outgoing": "Waiting for your contact reply to connect!" + }, + "betabot-input-placeholder": "Add betabot to write here...", + "incoming-input-placeholder": "Accept the request to write here...", + "input-placeholder": "Write a secure message..." + }, + "one-to-one-settings": { + "header-left-button": "Search", + "header-middle-button": "Call", + "header-right-button": "Share", + "media-button": "Medias, links & docs", + "notifications-button": "Receive notifications", + "mutual-button": "Mutual groups", + "save-button": "Save conversation on server", + "erase-button": "Erase conversation" + }, + "replicate-group-settings": { + "title": "Register conversation on server", + "no-registered-button": "No replication service registered", + "connect-button": "Connect to Berty operated services", + "manage-add-button": "Manage or add services" + }, + "files": { + "record-sound": "Record a sound message", + "recording": "Recording...", + "gallery": "Gallery", + "camera": "Camera", + "record": "Record", + "files": "Files", + "microphone": "Microphone", + "gif": "GIF", + "search-gif": "Search for a gif", + "security-access": "Security Access", + "security-access-desc": "Tap here to open setting to allow access to your", + "save-to-gallery": "Save this file in Gallery", + "share": "Share", + "forward-berty": "Forward to Berty contact", + "forward": "Forward", + "image-saved": "Image saved in Gallery" + } + } +} diff --git a/js/packages/berty-i18n/locale/en/messages.json b/js/packages/berty-i18n/locale/en/messages.json deleted file mode 100644 index fd836e4c64..0000000000 --- a/js/packages/berty-i18n/locale/en/messages.json +++ /dev/null @@ -1,413 +0,0 @@ -{ - "time": { - "fuzzy-time": "hh:mm", - "fuzzy-month-day": "dd/MM", - "fuzzy-year-month": "MM/YY", - "datetime": "MMM Do YYYY hh:mm", - "started-ago": "Started {{date}} ago" - }, - "onboarding": { - "getstarted": { - "desc": "The secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network", - "open-registered-account": "Open a registered account", - "import-button": "Import data from an existing account", - "account-selector-create-button": "Create a new account", - "more-options": "More options", - "button": "GET STARTED" - }, - "select-mode": { - "performance": { - "title": "Performance", - "desc": "Easy to use - All the features", - "push-notif": "Receive push notifications", - "offline-message": "Offline messaging", - "add-contact": "Add contacts easily", - "fast-message": "Fastest message delivery" - }, - "high-level": { - "title": "Highest level of privacy", - "desc": "For advanced users - Less metadatas", - "disable-push-notif": "Push notifications disabled", - "disable-local-peer-discovery": "Local peer discovery disabled", - "disable-contact-request": "Contact requests disabled" - } - }, - "create-account": { - "title": "Create your account", - "desc": "A name is the only information required", - "required": "Required", - "placeholder": "Name", - "button": "CREATE MY ACCOUNT" - }, - "services-auth": { - "header": "Authenticate to services", - "title": "Services", - "recommended": "Recommended", - "desc": "This will automatically replicate your conversations on a server", - "button": "Use Berty operated services", - "skip": "SKIP AND DO THIS LATER" - }, - "generate-key": { - "title": "Starting the Berty node…", - "desc": "This might take a few seconds" - }, - "notifications": { - "header": "Don't miss any new message or contact request", - "recommended": "Recommended", - "title": "Notifications", - "desc": "You need to authorize push notifications from Berty on your phone", - "button": "AUTHORIZE NOTIFICATIONS", - "skip": "SKIP AND DO THIS LATER" - }, - "bluetooth": { - "header": "Communicate without an internet connection (wifi or data) by connecting your phone directly with peers nearby", - "optional": "Optional", - "title": "Bluetooth", - "desc": "To use this feature you need to authorize the use of Bluetooth on your phone", - "button": "AUTHORIZE BLUETOOTH", - "skip": "SKIP AND DO THIS LATER" - }, - "setup-finished": { - "title": "Setup finished!", - "desc": "You can now use the app, start adding contacts and talk freely and privately with them", - "button": "START USING BERTY" - } - }, - "main": { - "home": { - "requests": { - "title": "Requests", - "received-at": "Received", - "accept": "Accept", - "card-title": "Contact request!" - }, - "messages": { - "title": "Messages" - }, - "input-placeholder": "Search keyword", - "no-contacts": "You don't have any contacts or chat yet", - "search": { - "no-results": "No results found" - } - }, - "home-modal": { - "left-button": "Scan", - "right-button": "Group" - } - }, - "settings": { - "home": { - "header-left-button": "Help", - "header-center-button": "Devtools", - "header-right-button": "Settings", - "network-button": "Network List", - "switch-accounts": "Use another account" - }, - "network-map": { - "title": "Network List", - "online-peers": "Online Peers" - }, - "mode": { - "title": "Settings", - "desc": "Customize everything to get the app that fits your needs", - "notifications-button": { - "title": "Notifications", - "tag-enabled": "Enabled", - "tag-disabled": "Disabled" - }, - "bluetooth-button": { - "title": "Bluetooth", - "tag-enabled": "Enabled", - "tag-disabled": "Disabled" - }, - "app-mode-button": { - "title": "App mode", - "performance-tag": "Performance", - "privacy-tag": "Privacy", - "description-tag": "Easy to use - All the features", - "first-bullet-point": "Receive push notifications", - "second-bullet-point": "Receive contact requests", - "third-bullet-point": "Local peer discovery (BLE & Multicast DNS)" - }, - "dark-mode-button": "Dark mode", - "receive-contact-requests-button": "Receive contact requests", - "external-services-button": "External services", - "auto-replicate-button": "Auto replicate", - "multicast-dns-button": { - "title": "Multicast DNS", - "desc": "Local Peer discovery" - }, - "blocked-contacts-button": { - "title": "Blocked contacts", - "tag": "blocked" - }, - "delete-account-button": "Delete my account", - "backup-account-button": "Backup my account" - }, - "edit-profile": { - "title": "Edit my profile", - "qr-will-update": "Your Berty ID (QR code) will be updated", - "ocr-wont-update": "Your pending contact requests won’t be updated", - "save": "Save changes", - "cancel": "Cancel", - "name-input-placeholder": "Name...", - "name-input-label": "Name" - }, - "notifications": { - "title": "Notifications", - "enabled-desc": "You have activated notifications!", - "disabled-desc": "You have not activated notifications for this app", - "activate-button": "Activate notifications", - "contact-request-button": { - "title": "Contact request", - "desc": "Receive a notification everytime someone sends you a contact request" - }, - "messages-notifications-button": { - "title": "Messages notifications", - "display-button": "Display notifications", - "preview-button": "Messages preview", - "sound-button": "Sound", - "exceptions-button": { - "title": "Exceptions", - "preview-value": "Add", - "tag": "{{count}} exception", - "tag_plural": "{{count}} exceptions" - } - }, - "group-notifications-button": { - "title": "Groups notifications", - "display-button": "Display notifications", - "preview-button": "Messages preview", - "sound-button": "Sound", - "exceptions-button": { - "title": "Exceptions", - "preview-value": "Add", - "tag": "{{count}} exception", - "tag_plural": "{{count}} exceptions" - } - } - }, - "bluetooth": { - "title": "Bluetooth", - "desc": "Bluetooth allows you top use the Berty app when you don't have a network connection (wifi or data) by connecting your phone directly with peers nearby", - "activate-button": "Activate bluetooth" - }, - "mc": { - "activate-button": "Activate Multipeer Connectivity" - }, - "services-auth": { - "title": "External services", - "operated-services-button": "Use Berty operated services", - "register-service-button": { - "title": "Register a custom service provider", - "input-placeholder": "Service URL", - "action": "Add" - }, - "registered-services-button": { - "title": "Currently registered services", - "sample-no-services": "No services registered", - "sample-unknown-service": "Unknown service" - } - }, - "delete-account": { - "title": "Delete account!", - "first-desc": "Are you sure you want to delete your account?", - "desc": "Please type delete to confirm", - "cancel-button": "CANCEL", - "delete-button": "DELETE" - }, - "help": { - "title": "Help", - "security-privacy-button": { - "title": "Security & Privacy", - "desc": "Keep your data safe & your life private" - }, - "updates-button": "Updates", - "about-button": "About Berty", - "account-button": "Account & Berty ID", - "contact-button": "Contacts & Requests", - "message-button": "Messages", - "group-button": "Groups", - "settings-button": "Settings", - "ask-button": "Ask a question", - "report-button": "Report a bug" - }, - "about": { - "title": "About Berty", - "top-left-button": "Private & Secure", - "top-right-button": "Peer to peer network", - "bottom-left-button": "No internet or data required", - "bottom-right-button": "No network trust required", - "terms-button": "Terms of use", - "privacy-button": "Privacy policy", - "software-button": "Software license", - "contact-button": "Contact us", - "website-button": "Website" - }, - "updates": { - "title": "App updates", - "up-to-date-desc": "Your app is up to date", - "version": "Version", - "current-tag": "Current", - "installed-tag": "Installed", - "initial-tag": "Initial install", - "not-installed-tag": "Not installed" - }, - "devtools": { - "title": "Dev tools", - "header-left-button": "Device infos", - "simulate-button": "Simulate stream error", - "header-middle-button": "Generate fake data", - "header-right-button": "Restart daemon", - "system-info-button": "System info", - "debug-button": "Debug", - "add-dev-conversations-button": "Add dev conversations", - "share-button": { - "title": "Share ID on discord", - "alert-title": "Do you want to share your QR code to \"#dev-logs\" on Berty Discord?", - "alert-message": "This will allow other staff to scan your QR code or copy your contact link.", - "alert-accept-button": "Yep 👍", - "alert-cancel-button": "Nope" - }, - "native-bridge-button": "Test Native Bridge", - "dump-account-button": "Dump account", - "dump-contacts-button": "Dump contacts", - "dump-conversations-button": "Dump conversations", - "dump-interactions-button": "Dump interactions", - "dump-members-button": "Dump members", - "stop-node-button": "Stop node", - "bot-mode-button": "Bot mode", - "local-grpc-button": "local gRPC", - "console-logs-button": "Console logs", - "ipfs-webui-button": "IPFS WebUI", - "notifications-button": "Notifications", - "send-to-all-button": { - "title": "Send messages to all contacts", - "sending": "Sending...", - "test": "Test, ", - "tried": "✔ Tried sending to {{length}} contacts" - }, - "footer-left-button": "Device infos", - "footer-middle-button": "List events", - "footer-right-button": "Restart daemon" - }, - "system-info": { - "title": "System info" - }, - "fake-data": { - "title": "Generate fake data", - "contacts-button": "Gen fake contacts", - "multi-members-button": "Gen fake multi-members", - "messages-button": "Gen fake messages", - "delete-button": "Delete fake data" - }, - "add-dev-conversations": { - "title": "Add dev conversations", - "add": "Add {{name}}", - "tag-bot": "Bot", - "tag-contact": "Contact", - "tag-conversation": "Group" - }, - "ipfs-webui": { - "title": "IPFS WebUI" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "Invalid link!", - "invalid-qr": "Invalid QR code!", - "error": "Error!" - }, - "invalid-scan": { - "dismiss-button": "DISMISS" - }, - "add-this-contact": { - "fingerprint": "Fingerprint", - "info": "Info", - "devices": "Devices" - }, - "group-invitation": { - "fingerprint": "Fingerprint", - "info": "Infos", - "devices": "Devices" - } - }, - "chat": { - "contact-settings": { - "mark-button": "Mark as verified", - "block-button": "Block contact", - "delete-button": "Delete contact", - "fingerprint": "Fingerprint", - "info": "Infos", - "devices": "Devices" - }, - "multi-member": { - "input-placeholder": "Write a secure message..." - }, - "multi-member-settings": { - "header-left-button": "Search", - "header-middle-button": "Call", - "header-right-button": "Share", - "media-button": "Medias, links & docs", - "notifications-button": "Receive notifications", - "members-button": { - "title": "Members", - "unknown": "Unknown" - }, - "add-member-button": "Add member", - "invite-button": "Invite by link", - "save-button": "Save conversation on server", - "erase-button": "Erase conversation", - "leave-button": "Leave group" - }, - "multi-member-qr": { - "title": "QR Group" - }, - "one-to-one": { - "contact-request-box": { - "title": "CONTACT REQUEST", - "refuse-button": "REFUSE", - "accept-button": "ACCEPT", - "accepted-button": "ACCEPTED" - }, - "betabot-box": { - "title": "ADD BETA BOT?", - "desc": "You don't have any contacts yet would you like to add the Beta Bot to discover and test conversations?", - "skip-button": "SKIP", - "add-button": "ADD !" - }, - "infos-chat": { - "connection-confirmed": "👋 Berty connection confirmed! 🎉", - "request-sent": "Request Sent ✈", - "incoming": "Accept this request to reply!", - "outgoing": "Waiting for your contact reply to connect!" - }, - "betabot-input-placeholder": "Add betabot to write here...", - "incoming-input-placeholder": "Accept the request to write here...", - "input-placeholder": "Write a secure message..." - }, - "one-to-one-settings": { - "header-left-button": "Search", - "header-middle-button": "Call", - "header-right-button": "Share", - "media-button": "Medias, links & docs", - "notifications-button": "Receive notifications", - "mutual-button": "Mutual groups", - "save-button": "Save conversation on server", - "erase-button": "Erase conversation" - }, - "replicate-group-settings": { - "title": "Register conversation on server", - "no-registered-button": "No replication service registered", - "connect-button": "Connect to Berty operated services", - "manage-add-button": "Manage or add services" - }, - "files": { - "record-sound":"Record a sound message", - "recording":"Recording...", - "media":"Access to Media Gallery", - "emojis":"Emojis & Bertyzzz !" - - } - } -} diff --git a/js/packages/berty-i18n/locale/es/messages.json b/js/packages/berty-i18n/locale/es-ES/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/es/messages.json rename to js/packages/berty-i18n/locale/es-ES/messages.json index 80b59f7b5b..cfd5e65020 100644 --- a/js/packages/berty-i18n/locale/es/messages.json +++ b/js/packages/berty-i18n/locale/es-ES/messages.json @@ -81,9 +81,6 @@ "accept": "Aceptar", "card-title": "" }, - "messages": { - "title": "Mensajes" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "requerido", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/fi/messages.json b/js/packages/berty-i18n/locale/fi-FI/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/fi/messages.json rename to js/packages/berty-i18n/locale/fi-FI/messages.json index caadbe81ff..349528ce19 100644 --- a/js/packages/berty-i18n/locale/fi/messages.json +++ b/js/packages/berty-i18n/locale/fi-FI/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/fr/messages.json b/js/packages/berty-i18n/locale/fr-FR/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/fr/messages.json rename to js/packages/berty-i18n/locale/fr-FR/messages.json index 9e0405d47a..3e336e770a 100644 --- a/js/packages/berty-i18n/locale/fr/messages.json +++ b/js/packages/berty-i18n/locale/fr-FR/messages.json @@ -81,9 +81,6 @@ "accept": "Accepter", "card-title": "Demande de contact !" }, - "messages": { - "title": "Messages" - }, "input-placeholder": "Mots-clés de recherche", "no-contacts": "Vous n'avez pas encore de contact ou de conversation", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "Scanner", - "right-button": "Groupe" + "top-button": "Créer un nouveau groupe", + "bottom-button": "Scanner le contact ou le groupe" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "Outils Dev", "header-left-button": "Infos sur l'appareil", + "simulate-button": "Simuler une erreur de stream", + "tor-button": "Tor {{option}}", + "tor-optional-option": "optionnel", + "tor-required-option": "requis", + "tor-disabled-option": "désactivé", "header-middle-button": "Générer de fausses données", "header-right-button": "Redémarrer le démon", "system-info-button": "Infos système", @@ -400,6 +402,11 @@ "no-registered-button": "Aucun service de réplication enregistré", "connect-button": "Se connecter aux services opérés par Berty", "manage-add-button": "Gérer ou ajouter des services" + }, + "files": { + "record-sound": "Enregistrer un message sonore", + "media": "Accès à la galerie de médias", + "emojis": "Emojis & Bertyzzz!" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/he-IL/messages.json b/js/packages/berty-i18n/locale/he-IL/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/he-IL/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/he/messages.json b/js/packages/berty-i18n/locale/he/messages.json deleted file mode 100644 index 25fb4fb3f8..0000000000 --- a/js/packages/berty-i18n/locale/he/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/hu-HU/messages.json b/js/packages/berty-i18n/locale/hu-HU/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/hu-HU/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/hu/messages.json b/js/packages/berty-i18n/locale/hu/messages.json deleted file mode 100644 index 25fb4fb3f8..0000000000 --- a/js/packages/berty-i18n/locale/hu/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/id-ID/messages.json b/js/packages/berty-i18n/locale/id-ID/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/id-ID/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/it/messages.json b/js/packages/berty-i18n/locale/it-IT/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/it/messages.json rename to js/packages/berty-i18n/locale/it-IT/messages.json index caadbe81ff..349528ce19 100644 --- a/js/packages/berty-i18n/locale/it/messages.json +++ b/js/packages/berty-i18n/locale/it-IT/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/ja/messages.json b/js/packages/berty-i18n/locale/ja-JP/messages.json similarity index 96% rename from js/packages/berty-i18n/locale/ja/messages.json rename to js/packages/berty-i18n/locale/ja-JP/messages.json index b17db43879..5ef18cd85b 100644 --- a/js/packages/berty-i18n/locale/ja/messages.json +++ b/js/packages/berty-i18n/locale/ja-JP/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "メッセージ" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/ko-KR/messages.json b/js/packages/berty-i18n/locale/ko-KR/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/ko-KR/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/ko/messages.json b/js/packages/berty-i18n/locale/ko/messages.json deleted file mode 100644 index 25fb4fb3f8..0000000000 --- a/js/packages/berty-i18n/locale/ko/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/languages.js b/js/packages/berty-i18n/locale/languages.js index d5275b1e0a..98a644e9db 100644 --- a/js/packages/berty-i18n/locale/languages.js +++ b/js/packages/berty-i18n/locale/languages.js @@ -1,59 +1,71 @@ -import af from './af/messages.json' -import ar from './ar/messages.json' -import ca from './ca/messages.json' -import cs from './cs/messages.json' -import da from './da/messages.json' -import de from './de/messages.json' -import el from './el/messages.json' -import en from './en/messages.json' -import es from './es/messages.json' -import fi from './fi/messages.json' -import fr from './fr/messages.json' -import he from './he/messages.json' -import hu from './hu/messages.json' -import it from './it/messages.json' -import ja from './ja/messages.json' -import ko from './ko/messages.json' -import nl from './nl/messages.json' -import no from './no/messages.json' -import pl from './pl/messages.json' -import pt from './pt/messages.json' -import ro from './ro/messages.json' -import ru from './ru/messages.json' -import sr from './sr/messages.json' -import sv from './sv/messages.json' -import tr from './tr/messages.json' -import uk from './uk/messages.json' -import vi from './vi/messages.json' -import zh from './zh/messages.json' +import afZA from './af-ZA/messages.json' +import arSA from './ar-SA/messages.json' +import bgBG from './bg-BG/messages.json' +import caES from './ca-ES/messages.json' +import csCZ from './cs-CZ/messages.json' +import daDK from './da-DK/messages.json' +import deDE from './de-DE/messages.json' +import elGR from './el-GR/messages.json' +import enUS from './en-US/messages.json' +import esES from './es-ES/messages.json' +import fiFI from './fi-FI/messages.json' +import frFR from './fr-FR/messages.json' +import heIL from './he-IL/messages.json' +import huHU from './hu-HU/messages.json' +import idID from './id-ID/messages.json' +import itIT from './it-IT/messages.json' +import jaJP from './ja-JP/messages.json' +import koKR from './ko-KR/messages.json' +import nlNL from './nl-NL/messages.json' +import noNO from './no-NO/messages.json' +import plPL from './pl-PL/messages.json' +import ptBR from './pt-BR/messages.json' +import ptPT from './pt-PT/messages.json' +import roRO from './ro-RO/messages.json' +import ruRU from './ru-RU/messages.json' +import srCyrl from './sr-Cyrl/messages.json' +import svSE from './sv-SE/messages.json' +import trTR from './tr-TR/messages.json' +import ukUA from './uk-UA/messages.json' +import viVN from './vi-VN/messages.json' +import zhCN from './zh-CN/messages.json' +import zhTW from './zh-TW/messages.json' export const languages = { - af: { englishName: 'Afrikaans', localName: 'Afrikaans', translation: af }, - ar: { englishName: 'Arabic', localName: 'عربى', translation: ar }, - ca: { englishName: 'Catalan', localName: 'Català', translation: ca }, - cs: { englishName: 'Czech', localName: 'čeština', translation: cs }, - da: { englishName: 'Danish', localName: 'Dansk', translation: da }, - de: { englishName: 'German', localName: 'Deutsche', translation: de }, - el: { englishName: 'Greek', localName: 'Ελληνικά', translation: el }, - en: { englishName: 'English', localName: 'English', translation: en }, - es: { englishName: 'Spanish', localName: 'Español', translation: es }, - fi: { englishName: 'Finnish', localName: 'Suomalainen', translation: fi }, - fr: { englishName: 'French', localName: 'Français', translation: fr }, - he: { englishName: 'Hebrew', localName: 'עברית', translation: he }, - hu: { englishName: 'Hungarian', localName: 'Magyar', translation: hu }, - it: { englishName: 'Italian', localName: 'Italiano', translation: it }, - ja: { englishName: 'Japanese', localName: 'ja', translation: ja }, - ko: { englishName: 'Korean', localName: '한국어', translation: ko }, - nl: { englishName: 'Dutch', localName: 'Nederlands', translation: nl }, - no: { englishName: 'Norwegian', localName: 'Norsk', translation: no }, - pl: { englishName: 'Polish', localName: 'Polskie', translation: pl }, - pt: { englishName: 'Portuguese', localName: 'Português', translation: pt }, - ro: { englishName: 'Romanian', localName: 'Română', translation: ro }, - ru: { englishName: 'Russian', localName: 'русский', translation: ru }, - sr: { englishName: 'Serbian', localName: 'Српски', translation: sr }, - sv: { englishName: 'Swedish', localName: 'svenska', translation: sv }, - tr: { englishName: 'Turkish', localName: 'Türk', translation: tr }, - uk: { englishName: 'Ukrainian', localName: 'Українська', translation: uk }, - vi: { englishName: 'Vietnamese', localName: 'Tiếng Việt', translation: vi }, - zh: { englishName: 'Chinese', localName: '简体中文', translation: zh }, + afZA: { englishName: 'Afrikaans', localName: 'Afrikaans', translation: afZA }, + arSA: { englishName: 'Arabic', localName: 'عربى', translation: arSA }, + bgBG: { englishName: 'Bulgarian', localName: 'Bǎlgarski', translation: bgBG }, + caES: { englishName: 'Catalan', localName: 'Català', translation: caES }, + csCZ: { englishName: 'Czech', localName: 'čeština', translation: csCZ }, + daDK: { englishName: 'Danish', localName: 'Dansk', translation: daDK }, + deDE: { englishName: 'German', localName: 'Deutsche', translation: deDE }, + elGR: { englishName: 'Greek', localName: 'Ελληνικά', translation: elGR }, + enUS: { englishName: 'English', localName: 'English', translation: enUS }, + esES: { englishName: 'Spanish', localName: 'Español', translation: esES }, + fiFI: { englishName: 'Finnish', localName: 'Suomalainen', translation: fiFI }, + frFR: { englishName: 'French', localName: 'Français', translation: frFR }, + heIL: { englishName: 'Hebrew', localName: 'עברית', translation: heIL }, + huHU: { englishName: 'Hungarian', localName: 'Magyar', translation: huHU }, + idID: { englishName: 'Indonesian', localName: 'Bahasa Indonesia', translation: idID }, + itIT: { englishName: 'Italian', localName: 'Italiano', translation: itIT }, + jaJP: { englishName: 'Japanese', localName: 'ja', translation: jaJP }, + koKR: { englishName: 'Korean', localName: '한국어', translation: koKR }, + nlNL: { englishName: 'Dutch', localName: 'Nederlands', translation: nlNL }, + noNO: { englishName: 'Norwegian', localName: 'Norsk', translation: noNO }, + plPL: { englishName: 'Polish', localName: 'Polskie', translation: plPL }, + ptBR: { + englishName: 'Portuguese, Brazilian', + localName: 'Português do Brasil', + translation: ptBR, + }, + ptPT: { englishName: 'Portuguese', localName: 'Português', translation: ptPT }, + roRO: { englishName: 'Romanian', localName: 'Română', translation: roRO }, + ruRU: { englishName: 'Russian', localName: 'русский', translation: ruRU }, + srCyrl: { englishName: 'Serbian (Cyrillic)', localName: 'Српски', translation: srCyrl }, + svSE: { englishName: 'Swedish', localName: 'svenska', translation: svSE }, + trTR: { englishName: 'Turkish', localName: 'Türk', translation: trTR }, + ukUA: { englishName: 'Ukrainian', localName: 'Українська', translation: ukUA }, + viVN: { englishName: 'Vietnamese', localName: 'Tiếng Việt', translation: viVN }, + zhCN: { englishName: 'Chinese Simplified', localName: '简体中文', translation: zhCN }, + zhTW: { englishName: 'Chinese Traditional', localName: '简体中文', translation: zhTW }, } diff --git a/js/packages/berty-i18n/locale/nl-NL/messages.json b/js/packages/berty-i18n/locale/nl-NL/messages.json new file mode 100644 index 0000000000..349528ce19 --- /dev/null +++ b/js/packages/berty-i18n/locale/nl-NL/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "Bluetooth", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/nl/messages.json b/js/packages/berty-i18n/locale/nl/messages.json deleted file mode 100644 index caadbe81ff..0000000000 --- a/js/packages/berty-i18n/locale/nl/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "Bluetooth", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "Bluetooth", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "Bluetooth", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/no-NO/messages.json b/js/packages/berty-i18n/locale/no-NO/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/no-NO/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/no/messages.json b/js/packages/berty-i18n/locale/no/messages.json deleted file mode 100644 index 25fb4fb3f8..0000000000 --- a/js/packages/berty-i18n/locale/no/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/pl-PL/messages.json b/js/packages/berty-i18n/locale/pl-PL/messages.json new file mode 100644 index 0000000000..b2372a5752 --- /dev/null +++ b/js/packages/berty-i18n/locale/pl-PL/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "Bluetooth", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "Szukaj", + "header-middle-button": "Połączenie", + "header-right-button": "Udostępnij", + "media-button": "Multimedia, linki i dokumenty", + "notifications-button": "Otrzymuj powiadomienia", + "mutual-button": "", + "save-button": "Zapisz konwersację na serwerze", + "erase-button": "Usuń konwersację" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "Nagraj wiadomość dźwiękową", + "media": "Wyświetlaj zdjęcia i filmy", + "emojis": "Emojis & Bertyzzz!" + } + } +} diff --git a/js/packages/berty-i18n/locale/pl/messages.json b/js/packages/berty-i18n/locale/pl/messages.json deleted file mode 100644 index caadbe81ff..0000000000 --- a/js/packages/berty-i18n/locale/pl/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "Bluetooth", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "Bluetooth", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "Bluetooth", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/pt-BR/messages.json b/js/packages/berty-i18n/locale/pt-BR/messages.json new file mode 100644 index 0000000000..e16aec72ea --- /dev/null +++ b/js/packages/berty-i18n/locale/pt-BR/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "hh:mm", + "fuzzy-month-day": "dd/MM", + "fuzzy-year-month": "MM/AA", + "datetime": "MMM Do YYYY hh:mm", + "started-ago": "Started {{date}} ago" + }, + "onboarding": { + "getstarted": { + "desc": "O aplicativo seguro de mensagens ponto a ponto que funciona com ou sem acesso à internet, dados móveis ou confiando na rede", + "open-registered-account": "Abrir uma conta registrada", + "import-button": "Importar dados de uma conta existente", + "account-selector-create-button": "Criar uma nova conta", + "more-options": "Mais opções", + "button": "PRIMEIROS PASSOS" + }, + "select-mode": { + "performance": { + "title": "Desempenho", + "desc": "Fácil de usar - Todas as funcionalidades", + "push-notif": "Receber notificações por push", + "offline-message": "Mensagens offline", + "add-contact": "Adicione contatos facilmente", + "fast-message": "Entrega de mensagem mais rápida" + }, + "high-level": { + "title": "Maior nível de privacidade", + "desc": "Para usuários avançados - Menos metadados", + "disable-push-notif": "Push notification desativado", + "disable-local-peer-discovery": "Descoberta de par local desativada", + "disable-contact-request": "Solicitações de contato desativadas" + } + }, + "create-account": { + "title": "Criar sua conta", + "desc": "O nome é a única informação obrigatória", + "required": "Obrigatório", + "placeholder": "Nome", + "button": "CRIAR MINHA CONTA" + }, + "services-auth": { + "header": "Autenticar-se em serviços", + "title": "Serviços", + "recommended": "Recomendado", + "desc": "Isto irá replicar automaticamente as suas conversas em um servidor", + "button": "Usar serviços operados pelo Berty", + "skip": "PULAR E FAZER MAIS TARDE" + }, + "generate-key": { + "title": "Iniciando o nó do Berty…", + "desc": "Isto pode levar alguns segundos" + }, + "notifications": { + "header": "Não perca nenhuma nova mensagem ou solicitação de contato", + "recommended": "Recomendado", + "title": "Notificações", + "desc": "Você precisa autorizar as notificações por push do \"Berty\" no seu telefone", + "button": "AUTORIZAR NOTIFICAÇÕES", + "skip": "PULAR E FAZER MAIS TARDE" + }, + "bluetooth": { + "header": "Comunique-se sem uma conexão com a internet (wifi ou dados) conectando o seu telefone diretamente com pares próximos", + "optional": "Opcional", + "title": "Bluetooth", + "desc": "Para usar este recurso, você precisa autorizar o uso de Bluetooth no seu telefone", + "button": "AUTORIZAR BLUETOOTH", + "skip": "PULAR E FAZER MAIS TARDE" + }, + "setup-finished": { + "title": "Configuração finalizada!", + "desc": "Agora você pode usar o aplicativo, comece a adicionar contatos e conversar de forma livre e privada com eles", + "button": "COMECE A USAR O BERTY" + } + }, + "main": { + "home": { + "requests": { + "title": "Solicitações", + "received-at": "Recebido", + "accept": "Aceitar", + "card-title": "Solicitação de contato!" + }, + "input-placeholder": "Pesquisar palavra-chave", + "no-contacts": "Você não tem nenhum contato ou conversa ainda", + "search": { + "no-results": "Nenhum resultado encontrado" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "Ajuda", + "header-center-button": "Ferramentas do desenvolvedor", + "header-right-button": "Configurações", + "network-button": "Lista de Redes", + "switch-accounts": "Usar outra conta" + }, + "network-map": { + "title": "Lista de Redes", + "online-peers": "Pares Online" + }, + "mode": { + "title": "Configurações", + "desc": "Personalize tudo para ter o app que se adapte às suas necessidades", + "notifications-button": { + "title": "Notificações", + "tag-enabled": "Ativado", + "tag-disabled": "Desativado" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "Ativado", + "tag-disabled": "Desativado" + }, + "app-mode-button": { + "title": "", + "performance-tag": "Desempenho", + "privacy-tag": "Privacidade", + "description-tag": "Fácil de usar - Todas as funcionalidades", + "first-bullet-point": "Receber notificações por push", + "second-bullet-point": "Receber solicitações de contato", + "third-bullet-point": "Descoberta local de pares (BLE e DNS Multicast)" + }, + "dark-mode-button": "Modo escuro", + "receive-contact-requests-button": "Receber solicitações de contato", + "external-services-button": "Serviços externos", + "auto-replicate-button": "Replicar automaticamente", + "multicast-dns-button": { + "title": "DNS Multicast", + "desc": "Descoberta local de Pares" + }, + "blocked-contacts-button": { + "title": "Contatos bloqueados", + "tag": "bloqueado" + }, + "delete-account-button": "Apagar minha conta", + "backup-account-button": "Fazer backup da minha conta" + }, + "edit-profile": { + "title": "Editar meu perfil", + "qr-will-update": "Seu ID Berty (código QR) será atualizado", + "ocr-wont-update": "As suas solicitações de contato pendentes não serão atualizadas", + "save": "Salvar alterações", + "cancel": "Cancelar", + "name-input-placeholder": "Nome...", + "name-input-label": "Nome" + }, + "notifications": { + "title": "Notificações", + "enabled-desc": "Você ativou as notificações!", + "disabled-desc": "Você não ativou as notificações para este app", + "activate-button": "Ativar notificações", + "contact-request-button": { + "title": "Solicitação de contato", + "desc": "Receber uma notificação toda vez que alguém lhe enviar uma solicitação de contato" + }, + "messages-notifications-button": { + "title": "Notificações de mensagens", + "display-button": "Exibir notificações", + "preview-button": "Pré-visualização de mensagens", + "sound-button": "Som", + "exceptions-button": { + "title": "Exceções", + "preview-value": "Adicionar", + "tag": "{{count}} exceção", + "tag_plural": "{{count}} exceções" + } + }, + "group-notifications-button": { + "title": "Notificações de grupos", + "display-button": "Exibir notificações", + "preview-button": "Pré-visualização de mensagens", + "sound-button": "Som", + "exceptions-button": { + "title": "Exceções", + "preview-value": "Adicionar", + "tag": "{{count}} exceção", + "tag_plural": "{{count}} exceções" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "O Bluetooth permite que você use o aplicativo Berty quando você não está conectado (wifi ou dados) ao conectar seu telefone diretamente com pares próximos", + "activate-button": "Ativar bluetooth" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "Serviços externos", + "operated-services-button": "Usar serviços operados pelo Berty", + "register-service-button": { + "title": "Registrar um provedor de serviço personalizado", + "input-placeholder": "URL do Serviço", + "action": "Adicionar" + }, + "registered-services-button": { + "title": "Serviços atualmente registrados", + "sample-no-services": "Nenhum serviço registrado", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "Contatos e Solicitações", + "message-button": "Mensagens", + "group-button": "Grupos", + "settings-button": "Configurações", + "ask-button": "Fazer uma pergunta", + "report-button": "Reportar um bug" + }, + "about": { + "title": "Sobre o Berty", + "top-left-button": "Privado e Seguro", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "Não é necessário confiar na rede", + "terms-button": "Termos de uso", + "privacy-button": "Política de privacidade", + "software-button": "Licença de software", + "contact-button": "Fale conosco", + "website-button": "Site" + }, + "updates": { + "title": "Atualizações do aplicativo", + "up-to-date-desc": "Seu aplicativo está atualizado", + "version": "Versão", + "current-tag": "Atual", + "installed-tag": "Instalado", + "initial-tag": "Instalação inicial", + "not-installed-tag": "Não instalado" + }, + "devtools": { + "title": "Ferramentas do desenvolvedor", + "header-left-button": "Informações do dispositivo", + "simulate-button": "", + "tor-button": "Tor {{option}}", + "tor-optional-option": "opcional", + "tor-required-option": "obrigatório", + "tor-disabled-option": "desativado", + "header-middle-button": "Gerar dados falsos", + "header-right-button": "", + "system-info-button": "Informações do sistema", + "debug-button": "Debug", + "add-dev-conversations-button": "", + "share-button": { + "title": "Compartilhar ID no Discord", + "alert-title": "Você deseja compartilhar seu código QR com \"#dev-logs\" no Discord do Berty?", + "alert-message": "", + "alert-accept-button": "Sim 👍", + "alert-cancel-button": "Não" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "Modo bot", + "local-grpc-button": "gRPC local", + "console-logs-button": "Registros de console", + "ipfs-webui-button": "WebUI do IPFS", + "notifications-button": "Notificações", + "send-to-all-button": { + "title": "Enviar mensagens para todos os contatos", + "sending": "Enviando...", + "test": "Teste, ", + "tried": "" + }, + "footer-left-button": "Informações do dispositivo", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "Bot", + "tag-contact": "Contato", + "tag-conversation": "Grupo" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "Link inválido!", + "invalid-qr": "Código QR inválido!", + "error": "Erro!" + }, + "invalid-scan": { + "dismiss-button": "DISPENSAR" + }, + "add-this-contact": { + "fingerprint": "Impressão digital", + "info": "Informações", + "devices": "Dispositivos" + }, + "group-invitation": { + "fingerprint": "Impressão digital", + "info": "Informações", + "devices": "Dispositivos" + } + }, + "chat": { + "contact-settings": { + "mark-button": "Marcar como verificado", + "block-button": "Bloquear contato", + "delete-button": "Apagar contato", + "fingerprint": "Impressão digital", + "info": "Informações", + "devices": "Dispositivos" + }, + "multi-member": { + "input-placeholder": "Escrever uma mensagem segura..." + }, + "multi-member-settings": { + "header-left-button": "Pesquisar", + "header-middle-button": "", + "header-right-button": "Compartilhar", + "media-button": "Mídias, links e documentos", + "notifications-button": "Receber notificações", + "members-button": { + "title": "Membros", + "unknown": "Desconhecido" + }, + "add-member-button": "Adicionar membro", + "invite-button": "Convidar por link", + "save-button": "Salvar conversa no servidor", + "erase-button": "Limpar conversa", + "leave-button": "Sair do grupo" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "SOLICITAÇÃO DE CONTATO", + "refuse-button": "RECUSAR", + "accept-button": "ACEITAR", + "accepted-button": "ACEITO" + }, + "betabot-box": { + "title": "ADICIONAR BOT BETA?", + "desc": "", + "skip-button": "PULAR", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "Solicitação Enviada ✈", + "incoming": "Aceite esta solicitação para responder!", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "Pesquisar", + "header-middle-button": "", + "header-right-button": "Compartilhar", + "media-button": "Mídias, links e documentos", + "notifications-button": "Receber notificações", + "mutual-button": "Grupos em comum", + "save-button": "Salvar conversa no servidor", + "erase-button": "Limpar conversa" + }, + "replicate-group-settings": { + "title": "Registrar conversa no servidor", + "no-registered-button": "Nenhum serviço de replicação registrado", + "connect-button": "Conectar-se a serviços operados pelo Berty", + "manage-add-button": "Gerenciar ou adicionar serviços" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/pt-PT/messages.json b/js/packages/berty-i18n/locale/pt-PT/messages.json new file mode 100644 index 0000000000..349528ce19 --- /dev/null +++ b/js/packages/berty-i18n/locale/pt-PT/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "Bluetooth", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/pt/messages.json b/js/packages/berty-i18n/locale/pt/messages.json deleted file mode 100644 index caadbe81ff..0000000000 --- a/js/packages/berty-i18n/locale/pt/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "Bluetooth", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "Bluetooth", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "Bluetooth", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/ro-RO/messages.json b/js/packages/berty-i18n/locale/ro-RO/messages.json new file mode 100644 index 0000000000..349528ce19 --- /dev/null +++ b/js/packages/berty-i18n/locale/ro-RO/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "Bluetooth", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/ro/messages.json b/js/packages/berty-i18n/locale/ro/messages.json deleted file mode 100644 index caadbe81ff..0000000000 --- a/js/packages/berty-i18n/locale/ro/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "Bluetooth", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "Bluetooth", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "Bluetooth", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/ru-RU/messages.json b/js/packages/berty-i18n/locale/ru-RU/messages.json new file mode 100644 index 0000000000..7ab24807fc --- /dev/null +++ b/js/packages/berty-i18n/locale/ru-RU/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "чч:мм", + "fuzzy-month-day": "дд/ММ", + "fuzzy-year-month": "ММ/ГГ", + "datetime": "", + "started-ago": "Начато {{date}} назад" + }, + "onboarding": { + "getstarted": { + "desc": "Защищённый peer-to-peer мессенджер, работающий как с наличием, так и без доступа в интернет, сотовой связи или доверия в сети", + "open-registered-account": "Открыть зарегистрированный аккаунт", + "import-button": "Импортировать данные из существующего аккаунта", + "account-selector-create-button": "Создать новый аккаунт", + "more-options": "Больше опций", + "button": "НАЧАТЬ" + }, + "select-mode": { + "performance": { + "title": "Производительность", + "desc": "Простой в использовании - Все функции", + "push-notif": "Получать push-уведомления", + "offline-message": "Сообщения в оффлайне", + "add-contact": "Простое добавление контактов", + "fast-message": "Самая быстрая доставка сообщений" + }, + "high-level": { + "title": "Высочайший уровень приватности", + "desc": "Для продвинутых пользователей - меньше метаданных", + "disable-push-notif": "Push-уведомления отключены", + "disable-local-peer-discovery": "Обнаружение локальных пиров отключено", + "disable-contact-request": "Запросы в контакты отключены" + } + }, + "create-account": { + "title": "Создайте свой аккаунт", + "desc": "Имя - единственная необходимая информация", + "required": "Обязательно", + "placeholder": "Имя", + "button": "СОЗДАТЬ МОЙ АККАУНТ" + }, + "services-auth": { + "header": "Аутентифицироваться в сервисы", + "title": "Сервисы", + "recommended": "Рекомендовано", + "desc": "Это будет автоматически копировать ваши беседы на сервер", + "button": "Использовать сервис управляемый Berty", + "skip": "ПРОПУСТИТЬ И СДЕЛАТЬ ПОЗЖЕ" + }, + "generate-key": { + "title": "Запуск узла Berty…", + "desc": "Это может занять несколько секунд" + }, + "notifications": { + "header": "Не пропускайте все новые сообщения и запросы в контакты", + "recommended": "Рекомендуется", + "title": "Уведомления", + "desc": "Вам необходимо разрешить push-уведомления от Berty на вашем устройстве", + "button": "РАЗРЕШИТЬ УВЕДОМЛЕНИЯ", + "skip": "ПРОПУСТИТЬ И НАСТРОИТЬ ПОЗЖЕ" + }, + "bluetooth": { + "header": "Общайтесь без подключения к Интернету (wifi или сотовой связи), подключив ваше устройство непосредственно к пирам рядом", + "optional": "Необязательно", + "title": "Bluetooth", + "desc": "Чтобы использовать эту функцию, вам нужно разрешить использование Bluetooth на вашем устройстве", + "button": "РАЗРЕШИТЬ BLUETOOTH", + "skip": "ПРОПУСТИТЬ И СДЕЛАТЬ ПОЗЖЕ" + }, + "setup-finished": { + "title": "Настройка завершена!", + "desc": "Теперь вы можете использовать приложение, начать добавлять контакты и общаться с ними свободно и приватно", + "button": "НАЧАТЬ ИСПОЛЬЗОВАТЬ BERTY" + } + }, + "main": { + "home": { + "requests": { + "title": "Запросы", + "received-at": "Получено", + "accept": "Принять", + "card-title": "Запрос в контакты!" + }, + "input-placeholder": "Поиск ключевого слова", + "no-contacts": "У вас пока нет контактов или чатов", + "search": { + "no-results": "Ничего не найдено" + } + }, + "home-modal": { + "top-button": "Создать новую группу", + "bottom-button": "Сканировать контакт или группу" + } + }, + "settings": { + "home": { + "header-left-button": "Справка", + "header-center-button": "Инструменты для разработки", + "header-right-button": "Настройки", + "network-button": "Список сетей", + "switch-accounts": "Использовать другой аккаунт" + }, + "network-map": { + "title": "Список сетей", + "online-peers": "Пиры онлайн" + }, + "mode": { + "title": "Настройки", + "desc": "Просигнализируйте всё, чтобы приложение подходило под ваши нужды", + "notifications-button": { + "title": "Уведомления", + "tag-enabled": "Включены", + "tag-disabled": "Отключены" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "Включено", + "tag-disabled": "Отключено" + }, + "app-mode-button": { + "title": "Режим приложения", + "performance-tag": "Производительность", + "privacy-tag": "Конфиденциальность", + "description-tag": "Простой в использовании - Все функции", + "first-bullet-point": "Получать push-уведомления", + "second-bullet-point": "Получать запросы в контакты", + "third-bullet-point": "Обнаружение локальных пиров (BLE & Multicast DNS)" + }, + "dark-mode-button": "Тёмная тема", + "receive-contact-requests-button": "Получать запросы в контакты", + "external-services-button": "Внешние сервисы", + "auto-replicate-button": "Автоматическое копирование", + "multicast-dns-button": { + "title": "Multicast DNS", + "desc": "Обнаружение локальных пиров" + }, + "blocked-contacts-button": { + "title": "Заблокированные контакты", + "tag": "заблокировано" + }, + "delete-account-button": "Удалить мой аккаунт", + "backup-account-button": "Резервное копирование моего аккаунта" + }, + "edit-profile": { + "title": "Редактировать мой профиль", + "qr-will-update": "Ваш Berty ID (QR-код) будет обновлен", + "ocr-wont-update": "Ваши ожидающие запросы в контакты не будут обновляться", + "save": "Сохранить изменения", + "cancel": "Отменить", + "name-input-placeholder": "Имя...", + "name-input-label": "Имя" + }, + "notifications": { + "title": "Уведомления", + "enabled-desc": "Вы активировали уведомления!", + "disabled-desc": "Вы не активировали уведомления для этого приложения", + "activate-button": "Активировать уведомления", + "contact-request-button": { + "title": "Запрос в контакты", + "desc": "Получать уведомление каждый раз, когда кто-то посылает вам запрос в контакты" + }, + "messages-notifications-button": { + "title": "Уведомления о сообщениях", + "display-button": "Показывать уведомления", + "preview-button": "Предпросмотр сообщений", + "sound-button": "Звук", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "Веб-сайт" + }, + "updates": { + "title": "Обновления приложения", + "up-to-date-desc": "Приложение последней версии", + "version": "Версия", + "current-tag": "Текущая", + "installed-tag": "Установлено", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/ru/messages.json b/js/packages/berty-i18n/locale/ru/messages.json deleted file mode 100644 index caadbe81ff..0000000000 --- a/js/packages/berty-i18n/locale/ru/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "Bluetooth", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "Bluetooth", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "Bluetooth", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/sr-Cyrl/messages.json b/js/packages/berty-i18n/locale/sr-Cyrl/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/sr-Cyrl/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/sr/messages.json b/js/packages/berty-i18n/locale/sr/messages.json deleted file mode 100644 index 25fb4fb3f8..0000000000 --- a/js/packages/berty-i18n/locale/sr/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/sv/messages.json b/js/packages/berty-i18n/locale/sv-SE/messages.json similarity index 97% rename from js/packages/berty-i18n/locale/sv/messages.json rename to js/packages/berty-i18n/locale/sv-SE/messages.json index 615598cc20..adbc90d2fe 100644 --- a/js/packages/berty-i18n/locale/sv/messages.json +++ b/js/packages/berty-i18n/locale/sv-SE/messages.json @@ -81,9 +81,6 @@ "accept": "", "card-title": "" }, - "messages": { - "title": "" - }, "input-placeholder": "", "no-contacts": "", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "valfritt", + "tor-required-option": "obligatorisk", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "Ingen replikeringstjänst registrerad", "connect-button": "Anslut till Berty-drivna tjänster", "manage-add-button": "Hantera eller lägga till tjänster" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/tr-TR/messages.json b/js/packages/berty-i18n/locale/tr-TR/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/tr-TR/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/tr/messages.json b/js/packages/berty-i18n/locale/tr/messages.json deleted file mode 100644 index 25fb4fb3f8..0000000000 --- a/js/packages/berty-i18n/locale/tr/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/uk-UA/messages.json b/js/packages/berty-i18n/locale/uk-UA/messages.json new file mode 100644 index 0000000000..349528ce19 --- /dev/null +++ b/js/packages/berty-i18n/locale/uk-UA/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "Bluetooth", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "Bluetooth", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "Bluetooth", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/uk/messages.json b/js/packages/berty-i18n/locale/uk/messages.json deleted file mode 100644 index caadbe81ff..0000000000 --- a/js/packages/berty-i18n/locale/uk/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "Bluetooth", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "Bluetooth", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "Bluetooth", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/vi-VN/messages.json b/js/packages/berty-i18n/locale/vi-VN/messages.json new file mode 100644 index 0000000000..68964413f2 --- /dev/null +++ b/js/packages/berty-i18n/locale/vi-VN/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "", + "fuzzy-month-day": "", + "fuzzy-year-month": "", + "datetime": "", + "started-ago": "" + }, + "onboarding": { + "getstarted": { + "desc": "", + "open-registered-account": "", + "import-button": "", + "account-selector-create-button": "", + "more-options": "", + "button": "" + }, + "select-mode": { + "performance": { + "title": "", + "desc": "", + "push-notif": "", + "offline-message": "", + "add-contact": "", + "fast-message": "" + }, + "high-level": { + "title": "", + "desc": "", + "disable-push-notif": "", + "disable-local-peer-discovery": "", + "disable-contact-request": "" + } + }, + "create-account": { + "title": "", + "desc": "", + "required": "", + "placeholder": "", + "button": "" + }, + "services-auth": { + "header": "", + "title": "", + "recommended": "", + "desc": "", + "button": "", + "skip": "" + }, + "generate-key": { + "title": "", + "desc": "" + }, + "notifications": { + "header": "", + "recommended": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "bluetooth": { + "header": "", + "optional": "", + "title": "", + "desc": "", + "button": "", + "skip": "" + }, + "setup-finished": { + "title": "", + "desc": "", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "", + "received-at": "", + "accept": "", + "card-title": "" + }, + "input-placeholder": "", + "no-contacts": "", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "", + "privacy-tag": "", + "description-tag": "", + "first-bullet-point": "", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "" + }, + "notifications": { + "title": "", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "", + "tor-required-option": "", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/berty-i18n/locale/vi/messages.json b/js/packages/berty-i18n/locale/vi/messages.json deleted file mode 100644 index 25fb4fb3f8..0000000000 --- a/js/packages/berty-i18n/locale/vi/messages.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "time": { - "fuzzy-time": "", - "fuzzy-month-day": "", - "fuzzy-year-month": "", - "datetime": "", - "started-ago": "" - }, - "onboarding": { - "getstarted": { - "desc": "", - "open-registered-account": "", - "import-button": "", - "account-selector-create-button": "", - "more-options": "", - "button": "" - }, - "select-mode": { - "performance": { - "title": "", - "desc": "", - "push-notif": "", - "offline-message": "", - "add-contact": "", - "fast-message": "" - }, - "high-level": { - "title": "", - "desc": "", - "disable-push-notif": "", - "disable-local-peer-discovery": "", - "disable-contact-request": "" - } - }, - "create-account": { - "title": "", - "desc": "", - "required": "", - "placeholder": "", - "button": "" - }, - "services-auth": { - "header": "", - "title": "", - "recommended": "", - "desc": "", - "button": "", - "skip": "" - }, - "generate-key": { - "title": "", - "desc": "" - }, - "notifications": { - "header": "", - "recommended": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "bluetooth": { - "header": "", - "optional": "", - "title": "", - "desc": "", - "button": "", - "skip": "" - }, - "setup-finished": { - "title": "", - "desc": "", - "button": "" - } - }, - "main": { - "home": { - "requests": { - "title": "", - "received-at": "", - "accept": "", - "card-title": "" - }, - "messages": { - "title": "" - }, - "input-placeholder": "", - "no-contacts": "", - "search": { - "no-results": "" - } - }, - "home-modal": { - "left-button": "", - "right-button": "" - } - }, - "settings": { - "home": { - "header-left-button": "", - "header-center-button": "", - "header-right-button": "", - "network-button": "", - "switch-accounts": "" - }, - "network-map": { - "title": "", - "online-peers": "" - }, - "mode": { - "title": "", - "desc": "", - "notifications-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "bluetooth-button": { - "title": "", - "tag-enabled": "", - "tag-disabled": "" - }, - "app-mode-button": { - "title": "", - "performance-tag": "", - "privacy-tag": "", - "description-tag": "", - "first-bullet-point": "", - "second-bullet-point": "", - "third-bullet-point": "" - }, - "dark-mode-button": "", - "receive-contact-requests-button": "", - "external-services-button": "", - "auto-replicate-button": "", - "multicast-dns-button": { - "title": "", - "desc": "" - }, - "blocked-contacts-button": { - "title": "", - "tag": "" - }, - "delete-account-button": "", - "backup-account-button": "" - }, - "edit-profile": { - "title": "", - "qr-will-update": "", - "ocr-wont-update": "", - "save": "", - "cancel": "", - "name-input-placeholder": "", - "name-input-label": "" - }, - "notifications": { - "title": "", - "enabled-desc": "", - "disabled-desc": "", - "activate-button": "", - "contact-request-button": { - "title": "", - "desc": "" - }, - "messages-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - }, - "group-notifications-button": { - "title": "", - "display-button": "", - "preview-button": "", - "sound-button": "", - "exceptions-button": { - "title": "", - "preview-value": "", - "tag": "", - "tag_plural": "" - } - } - }, - "bluetooth": { - "title": "", - "desc": "", - "activate-button": "" - }, - "mc": { - "activate-button": "" - }, - "services-auth": { - "title": "", - "operated-services-button": "", - "register-service-button": { - "title": "", - "input-placeholder": "", - "action": "" - }, - "registered-services-button": { - "title": "", - "sample-no-services": "", - "sample-unknown-service": "" - } - }, - "delete-account": { - "title": "", - "first-desc": "", - "desc": "", - "cancel-button": "", - "delete-button": "" - }, - "help": { - "title": "", - "security-privacy-button": { - "title": "", - "desc": "" - }, - "updates-button": "", - "about-button": "", - "account-button": "", - "contact-button": "", - "message-button": "", - "group-button": "", - "settings-button": "", - "ask-button": "", - "report-button": "" - }, - "about": { - "title": "", - "top-left-button": "", - "top-right-button": "", - "bottom-left-button": "", - "bottom-right-button": "", - "terms-button": "", - "privacy-button": "", - "software-button": "", - "contact-button": "", - "website-button": "" - }, - "updates": { - "title": "", - "up-to-date-desc": "", - "version": "", - "current-tag": "", - "installed-tag": "", - "initial-tag": "", - "not-installed-tag": "" - }, - "devtools": { - "title": "", - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "system-info-button": "", - "debug-button": "", - "add-dev-conversations-button": "", - "share-button": { - "title": "", - "alert-title": "", - "alert-message": "", - "alert-accept-button": "", - "alert-cancel-button": "" - }, - "native-bridge-button": "", - "dump-account-button": "", - "dump-contacts-button": "", - "dump-conversations-button": "", - "dump-interactions-button": "", - "dump-members-button": "", - "stop-node-button": "", - "bot-mode-button": "", - "local-grpc-button": "", - "console-logs-button": "", - "ipfs-webui-button": "", - "notifications-button": "", - "send-to-all-button": { - "title": "", - "sending": "", - "test": "", - "tried": "" - }, - "footer-left-button": "", - "footer-middle-button": "", - "footer-right-button": "" - }, - "system-info": { - "title": "" - }, - "fake-data": { - "title": "", - "contacts-button": "", - "multi-members-button": "", - "messages-button": "", - "delete-button": "" - }, - "add-dev-conversations": { - "title": "", - "add": "", - "tag-bot": "", - "tag-contact": "", - "tag-conversation": "" - }, - "ipfs-webui": { - "title": "" - } - }, - "modals": { - "manage-deep-link": { - "invalid-link": "", - "invalid-qr": "", - "error": "" - }, - "invalid-scan": { - "dismiss-button": "" - }, - "add-this-contact": { - "fingerprint": "", - "info": "", - "devices": "" - }, - "group-invitation": { - "fingerprint": "", - "info": "", - "devices": "" - } - }, - "chat": { - "contact-settings": { - "mark-button": "", - "block-button": "", - "delete-button": "", - "fingerprint": "", - "info": "", - "devices": "" - }, - "multi-member": { - "input-placeholder": "" - }, - "multi-member-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "members-button": { - "title": "", - "unknown": "" - }, - "add-member-button": "", - "invite-button": "", - "save-button": "", - "erase-button": "", - "leave-button": "" - }, - "multi-member-qr": { - "title": "" - }, - "one-to-one": { - "contact-request-box": { - "title": "", - "refuse-button": "", - "accept-button": "", - "accepted-button": "" - }, - "betabot-box": { - "title": "", - "desc": "", - "skip-button": "", - "add-button": "" - }, - "infos-chat": { - "connection-confirmed": "", - "request-sent": "", - "incoming": "", - "outgoing": "" - }, - "betabot-input-placeholder": "", - "incoming-input-placeholder": "", - "input-placeholder": "" - }, - "one-to-one-settings": { - "header-left-button": "", - "header-middle-button": "", - "header-right-button": "", - "media-button": "", - "notifications-button": "", - "mutual-button": "", - "save-button": "", - "erase-button": "" - }, - "replicate-group-settings": { - "title": "", - "no-registered-button": "", - "connect-button": "", - "manage-add-button": "" - } - } -} \ No newline at end of file diff --git a/js/packages/berty-i18n/locale/zh/messages.json b/js/packages/berty-i18n/locale/zh-CN/messages.json similarity index 97% rename from js/packages/berty-i18n/locale/zh/messages.json rename to js/packages/berty-i18n/locale/zh-CN/messages.json index 096b03f044..6d7a17736e 100644 --- a/js/packages/berty-i18n/locale/zh/messages.json +++ b/js/packages/berty-i18n/locale/zh-CN/messages.json @@ -81,9 +81,6 @@ "accept": "同意", "card-title": "联系请求!" }, - "messages": { - "title": "消息" - }, "input-placeholder": "搜索关键词", "no-contacts": "您还没有任何联系人或聊天", "search": { @@ -91,8 +88,8 @@ } }, "home-modal": { - "left-button": "", - "right-button": "" + "top-button": "", + "bottom-button": "" } }, "settings": { @@ -256,6 +253,11 @@ "devtools": { "title": "", "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "可选", + "tor-required-option": "必需的", + "tor-disabled-option": "", "header-middle-button": "", "header-right-button": "", "system-info-button": "", @@ -400,6 +402,11 @@ "no-registered-button": "", "connect-button": "", "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" } } -} \ No newline at end of file +} diff --git a/js/packages/berty-i18n/locale/zh-TW/messages.json b/js/packages/berty-i18n/locale/zh-TW/messages.json new file mode 100644 index 0000000000..d02b8823c9 --- /dev/null +++ b/js/packages/berty-i18n/locale/zh-TW/messages.json @@ -0,0 +1,412 @@ +{ + "time": { + "fuzzy-time": "时:分", + "fuzzy-month-day": "月/日", + "fuzzy-year-month": "年/月", + "datetime": "年-月-时:分", + "started-ago": "开始于 {{date}} 之前" + }, + "onboarding": { + "getstarted": { + "desc": "安全的点对点消息应用程序,无论是否有互联网接入、蜂窝数据或网络信任", + "open-registered-account": "打开注册账户", + "import-button": "从现有帐户导入数据", + "account-selector-create-button": "创建新账户", + "more-options": "更多选项", + "button": "开始" + }, + "select-mode": { + "performance": { + "title": "性能", + "desc": "简单使用 - 所有功能", + "push-notif": "接收新消息通知", + "offline-message": "离线消息", + "add-contact": "添加联系人", + "fast-message": "快速发送消息" + }, + "high-level": { + "title": "高级隐私", + "desc": "对于高级用户-更少的元数据", + "disable-push-notif": "已禁用新消息通知", + "disable-local-peer-discovery": "本地对等用户发现已禁用", + "disable-contact-request": "已禁用联系人请求" + } + }, + "create-account": { + "title": "创建您的帐户", + "desc": "名称是唯一需要的信息", + "required": "必需的", + "placeholder": "名称", + "button": "创建我的帐户" + }, + "services-auth": { + "header": "认证服务", + "title": "服务", + "recommended": "推荐", + "desc": "这将自动复制您的会话到服务器", + "button": "使用 Berty 运营的服务", + "skip": "跳过并稍后再做" + }, + "generate-key": { + "title": "正在启动 Berty 节点…", + "desc": "这可能需要几秒钟" + }, + "notifications": { + "header": "不错过任何新消息或联系请求", + "recommended": "推荐", + "title": "消息通知", + "desc": "您需要在您的手机上授权Berty 消息通知", + "button": "授权通知", + "skip": "跳过并稍后再做" + }, + "bluetooth": { + "header": "无需互联网连接 (wifi或数据) 即可直接将手机与附近的对等设备连接起来进行通信", + "optional": "可选", + "title": "蓝牙", + "desc": "", + "button": "授权蓝牙", + "skip": "跳过并稍后再做" + }, + "setup-finished": { + "title": "设置完成!", + "desc": "您现在可以使用该应用,开始添加联系人以及与他们自由私下聊天", + "button": "" + } + }, + "main": { + "home": { + "requests": { + "title": "请求", + "received-at": "接收", + "accept": "同意", + "card-title": "联系请求!" + }, + "input-placeholder": "搜索关键词", + "no-contacts": "您还没有任何联系人或聊天", + "search": { + "no-results": "" + } + }, + "home-modal": { + "top-button": "", + "bottom-button": "" + } + }, + "settings": { + "home": { + "header-left-button": "", + "header-center-button": "", + "header-right-button": "", + "network-button": "", + "switch-accounts": "" + }, + "network-map": { + "title": "", + "online-peers": "" + }, + "mode": { + "title": "", + "desc": "", + "notifications-button": { + "title": "消息通知", + "tag-enabled": "", + "tag-disabled": "" + }, + "bluetooth-button": { + "title": "蓝牙", + "tag-enabled": "", + "tag-disabled": "" + }, + "app-mode-button": { + "title": "", + "performance-tag": "性能", + "privacy-tag": "", + "description-tag": "简单使用 - 所有功能", + "first-bullet-point": "接收新消息通知", + "second-bullet-point": "", + "third-bullet-point": "" + }, + "dark-mode-button": "", + "receive-contact-requests-button": "", + "external-services-button": "", + "auto-replicate-button": "", + "multicast-dns-button": { + "title": "", + "desc": "" + }, + "blocked-contacts-button": { + "title": "", + "tag": "" + }, + "delete-account-button": "", + "backup-account-button": "" + }, + "edit-profile": { + "title": "", + "qr-will-update": "", + "ocr-wont-update": "", + "save": "", + "cancel": "", + "name-input-placeholder": "", + "name-input-label": "名称" + }, + "notifications": { + "title": "消息通知", + "enabled-desc": "", + "disabled-desc": "", + "activate-button": "", + "contact-request-button": { + "title": "", + "desc": "" + }, + "messages-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + }, + "group-notifications-button": { + "title": "", + "display-button": "", + "preview-button": "", + "sound-button": "", + "exceptions-button": { + "title": "", + "preview-value": "", + "tag": "", + "tag_plural": "" + } + } + }, + "bluetooth": { + "title": "蓝牙", + "desc": "", + "activate-button": "" + }, + "mc": { + "activate-button": "" + }, + "services-auth": { + "title": "", + "operated-services-button": "", + "register-service-button": { + "title": "", + "input-placeholder": "", + "action": "" + }, + "registered-services-button": { + "title": "", + "sample-no-services": "", + "sample-unknown-service": "" + } + }, + "delete-account": { + "title": "", + "first-desc": "", + "desc": "", + "cancel-button": "", + "delete-button": "" + }, + "help": { + "title": "", + "security-privacy-button": { + "title": "", + "desc": "" + }, + "updates-button": "", + "about-button": "", + "account-button": "", + "contact-button": "", + "message-button": "消息", + "group-button": "", + "settings-button": "", + "ask-button": "", + "report-button": "" + }, + "about": { + "title": "", + "top-left-button": "", + "top-right-button": "", + "bottom-left-button": "", + "bottom-right-button": "", + "terms-button": "", + "privacy-button": "", + "software-button": "", + "contact-button": "", + "website-button": "" + }, + "updates": { + "title": "", + "up-to-date-desc": "", + "version": "", + "current-tag": "", + "installed-tag": "", + "initial-tag": "", + "not-installed-tag": "" + }, + "devtools": { + "title": "", + "header-left-button": "", + "simulate-button": "", + "tor-button": "", + "tor-optional-option": "可选", + "tor-required-option": "必需的", + "tor-disabled-option": "", + "header-middle-button": "", + "header-right-button": "", + "system-info-button": "", + "debug-button": "", + "add-dev-conversations-button": "", + "share-button": { + "title": "", + "alert-title": "", + "alert-message": "", + "alert-accept-button": "", + "alert-cancel-button": "" + }, + "native-bridge-button": "", + "dump-account-button": "", + "dump-contacts-button": "", + "dump-conversations-button": "", + "dump-interactions-button": "", + "dump-members-button": "", + "stop-node-button": "", + "bot-mode-button": "", + "local-grpc-button": "", + "console-logs-button": "", + "ipfs-webui-button": "", + "notifications-button": "消息通知", + "send-to-all-button": { + "title": "", + "sending": "", + "test": "", + "tried": "" + }, + "footer-left-button": "", + "footer-middle-button": "", + "footer-right-button": "" + }, + "system-info": { + "title": "" + }, + "fake-data": { + "title": "", + "contacts-button": "", + "multi-members-button": "", + "messages-button": "", + "delete-button": "" + }, + "add-dev-conversations": { + "title": "", + "add": "", + "tag-bot": "", + "tag-contact": "", + "tag-conversation": "" + }, + "ipfs-webui": { + "title": "" + } + }, + "modals": { + "manage-deep-link": { + "invalid-link": "", + "invalid-qr": "", + "error": "" + }, + "invalid-scan": { + "dismiss-button": "" + }, + "add-this-contact": { + "fingerprint": "", + "info": "", + "devices": "" + }, + "group-invitation": { + "fingerprint": "", + "info": "", + "devices": "" + } + }, + "chat": { + "contact-settings": { + "mark-button": "", + "block-button": "", + "delete-button": "", + "fingerprint": "", + "info": "", + "devices": "" + }, + "multi-member": { + "input-placeholder": "" + }, + "multi-member-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "members-button": { + "title": "", + "unknown": "" + }, + "add-member-button": "", + "invite-button": "", + "save-button": "", + "erase-button": "", + "leave-button": "" + }, + "multi-member-qr": { + "title": "" + }, + "one-to-one": { + "contact-request-box": { + "title": "", + "refuse-button": "", + "accept-button": "", + "accepted-button": "" + }, + "betabot-box": { + "title": "", + "desc": "", + "skip-button": "", + "add-button": "" + }, + "infos-chat": { + "connection-confirmed": "", + "request-sent": "", + "incoming": "", + "outgoing": "" + }, + "betabot-input-placeholder": "", + "incoming-input-placeholder": "", + "input-placeholder": "" + }, + "one-to-one-settings": { + "header-left-button": "", + "header-middle-button": "", + "header-right-button": "", + "media-button": "", + "notifications-button": "", + "mutual-button": "", + "save-button": "", + "erase-button": "" + }, + "replicate-group-settings": { + "title": "", + "no-registered-button": "", + "connect-button": "", + "manage-add-button": "" + }, + "files": { + "record-sound": "", + "media": "", + "emojis": "" + } + } +} diff --git a/js/packages/components/AttachmentImage.tsx b/js/packages/components/AttachmentImage.tsx index d826646dda..690c02b440 100644 --- a/js/packages/components/AttachmentImage.tsx +++ b/js/packages/components/AttachmentImage.tsx @@ -1,54 +1,17 @@ import React, { useState, useEffect } from 'react' -import { Image, ImageProps, ActivityIndicator, View } from 'react-native' -import { Buffer } from 'buffer' +import { Image, ImageProps, ActivityIndicator, View, TouchableOpacity } from 'react-native' import { useMsgrContext } from '@berty-tech/store/hooks' -import { EOF } from '@berty-tech/grpc-bridge' -import { WelshProtocolServiceClient } from '@berty-tech/grpc-bridge/welsh-clients.gen' +import { navigate } from '@berty-tech/navigation' +import { getSource } from './utils' -let cache: { [key: string]: Promise } = {} - -const fetchSource = async ( - protocolClient: WelshProtocolServiceClient, - cid: string, -): Promise => { - const stream = await protocolClient.attachmentRetrieve({ - attachmentCid: Buffer.from(cid, 'base64'), - }) - const data = await new Promise((resolve, reject) => { - let buf = Buffer.from('') - stream.onMessage((msg, err) => { - if (err === EOF) { - resolve(buf) - return - } - if (err) { - reject(err) - return - } - if (msg?.block) { - buf = Buffer.concat([buf, msg.block]) - } - }) - stream.start() - }) - return 'data:image/jpeg;base64,' + data.toString('base64') -} - -const getSource = async ( - protocolClient: WelshProtocolServiceClient, - cid: string, -): Promise => { - if (!cache[cid]) { - cache[cid] = fetchSource(protocolClient, cid) - } - return cache[cid] -} - -const AttachmentImage: React.FC<{ cid: string } & Omit> = (props) => { - const { protocolClient } = useMsgrContext() +const AttachmentImage: React.FC< + { cid: string; notPressable?: boolean } & Omit +> = (props) => { + const { protocolClient, medias } = useMsgrContext() const [source, setSource] = useState('') const { cid, ...imageProps } = props + const mimeType = medias[cid]?.mimeType || 'image/jpeg' useEffect(() => { if (!protocolClient) { @@ -58,14 +21,14 @@ const AttachmentImage: React.FC<{ cid: string } & Omit> = getSource(protocolClient, cid) .then((src) => { if (!cancel) { - setSource(src) + setSource(`data:${mimeType};base64,${src}`) } }) .catch((e) => console.error('failed to get attachment image:', e)) return () => { cancel = true } - }, [protocolClient, cid]) + }, [protocolClient, cid, mimeType]) if (!source) { return ( @@ -75,7 +38,13 @@ const AttachmentImage: React.FC<{ cid: string } & Omit> = ) } - return + return props.notPressable ? ( + + ) : ( + navigate('Image', { cid })}> + + + ) } export default AttachmentImage diff --git a/js/packages/components/avatars.tsx b/js/packages/components/avatars.tsx index d54bb97f39..4f03166aee 100644 --- a/js/packages/components/avatars.tsx +++ b/js/packages/components/avatars.tsx @@ -29,7 +29,7 @@ const GenericAvatar: React.FC<{ style?: AvatarStyle }> = ({ cid, size, fallbackSeed, style }) => { const [{ border, background }] = useStyles() - const padding = Math.round(size / 15) + const padding = Math.round(size / 10) let innerSize = Math.round(size - 2 * padding) let content: JSX.Element if (cid) { @@ -40,6 +40,7 @@ const GenericAvatar: React.FC<{ ) } else { diff --git a/js/packages/components/chat/ImageCounter.tsx b/js/packages/components/chat/ImageCounter.tsx new file mode 100644 index 0000000000..ea80d895bd --- /dev/null +++ b/js/packages/components/chat/ImageCounter.tsx @@ -0,0 +1,33 @@ +import React from 'react' +import { useStyles } from '@berty-tech/styles' +import { View } from 'react-native' +import { Text, Icon } from '@ui-kitten/components' + +export const ImageCounter: React.FC<{ count: number }> = ({ count }) => { + const [{ color, border, padding }] = useStyles() + + return ( + + + + {count} + + + ) +} diff --git a/js/packages/components/chat/MultiMember.tsx b/js/packages/components/chat/MultiMember.tsx index 30391a439b..c86d1339ec 100644 --- a/js/packages/components/chat/MultiMember.tsx +++ b/js/packages/components/chat/MultiMember.tsx @@ -28,7 +28,7 @@ import { } from '@berty-tech/store/hooks' import beapi from '@berty-tech/api' -import { ChatFooter, ChatDate } from './shared-components/Chat' +import { ChatFooter, ChatDate } from './common' import { Message } from './message' import { MessageSystemWrapper } from './message/MessageSystemWrapper' import BlurView from '../shared-components/BlurView' @@ -36,7 +36,7 @@ import { SwipeNavRecognizer } from '../shared-components/SwipeNavRecognizer' import { useLayout } from '../hooks' import { pbDateToNum } from '../helpers' import { MultiMemberAvatar } from '../avatars' -import { AddFileMenu } from './file-uploads/AddFileMenu' +import { ParsedInteraction } from '@berty-tech/store/types.gen' // // MultiMember @@ -168,8 +168,8 @@ const MessageList: React.FC<{ msg.type === beapi.messenger.AppMessage.Type.TypeMonitorMetadata, ) - if (conversation?.replyOptions !== null && conversation?.replyOptions !== undefined) { - interactions.push(conversation.replyOptions) + if (conversation?.replyOptions) { + interactions.push(conversation.replyOptions as ParsedInteraction) } const initialScrollIndex = React.useMemo(() => { if (scrollToMessage) { @@ -260,10 +260,8 @@ const NT = beapi.messenger.StreamEvent.Notified.Type export const MultiMember: React.FC = ({ route: { params } }) => { useNotificationsInhibitor((_ctx, notif) => { if ( - (notif.type === NT.TypeContactRequestSent && - (notif.payload as any)?.payload?.contact?.conversationPublicKey === params?.convId) || - (notif.type === NT.TypeMessageReceived && - (notif.payload as any)?.payload?.interaction?.conversationPublicKey === params?.convId) + notif.type === NT.TypeMessageReceived && + (notif.payload as any)?.payload?.interaction?.conversationPublicKey === params?.convId ) { return 'sound-only' } @@ -281,13 +279,14 @@ export const MultiMember: React.FC = ({ route: { params const lastUpdate = conv?.lastUpdate || lastInte?.sentDate || conv?.createdDate || null const [stickyDate, setStickyDate] = useState(lastUpdate || null) const [showStickyDate, setShowStickyDate] = useState(false) - const [showAddFileMenu, setShowAddFileMenu] = useState(false) + + const [isSwipe, setSwipe] = useState(true) return ( - {showAddFileMenu && setShowAddFileMenu(false)} />} + isSwipe && dispatch( CommonActions.navigate({ name: Routes.Chat.MultiMemberSettings, @@ -304,7 +303,7 @@ export const MultiMember: React.FC = ({ route: { params isFocused={inputIsFocused} setFocus={setInputFocus} placeholder={t('chat.multi-member.input-placeholder')} - onFileMenuPress={() => setShowAddFileMenu(true)} + setSwipe={setSwipe} /> diff --git a/js/packages/components/chat/OneToOne.tsx b/js/packages/components/chat/OneToOne.tsx index 202923451e..effd74a147 100644 --- a/js/packages/components/chat/OneToOne.tsx +++ b/js/packages/components/chat/OneToOne.tsx @@ -40,11 +40,10 @@ import { ContactAvatar } from '../avatars' import { pbDateToNum, timeFormat } from '../helpers' import { useLayout } from '../hooks' import { playSound } from '../sounds' -import { ChatDate, ChatFooter } from './shared-components/Chat' +import { ChatDate, ChatFooter } from './common' import { SwipeNavRecognizer } from '../shared-components/SwipeNavRecognizer' import Logo from '../main/1_berty_picto.svg' import Avatar from '../modals/Buck_Berty_Icon_Card.svg' -import { AddFileMenu } from './file-uploads/AddFileMenu' // // Chat @@ -699,13 +698,13 @@ export const OneToOne: React.FC = ({ route: { params const [stickyDate, setStickyDate] = useState(conv?.lastUpdate || null) const [showStickyDate, setShowStickyDate] = useState(false) - const [showAddFileMenu, setShowAddFileMenu] = useState(false) + const [isSwipe, setSwipe] = useState(true) return ( - {showAddFileMenu && setShowAddFileMenu(false)} />} + isSwipe && dispatch( CommonActions.navigate({ name: Routes.Chat.OneToOneSettings, @@ -729,7 +728,7 @@ export const OneToOne: React.FC = ({ route: { params setFocus={setInputFocus} disabled={isFooterDisable} placeholder={placeholder} - onFileMenuPress={() => setShowAddFileMenu(true)} + setSwipe={setSwipe} /> diff --git a/js/packages/components/chat/OneToOneSettings.tsx b/js/packages/components/chat/OneToOneSettings.tsx index 88cef75aeb..d7eda70e01 100644 --- a/js/packages/components/chat/OneToOneSettings.tsx +++ b/js/packages/components/chat/OneToOneSettings.tsx @@ -133,7 +133,7 @@ export const OneToOneSettings: React.FC = ({ const [{ flex, background, padding }] = useStyles() const { convId } = params const conv = useConversation(convId) - const contact = useContact(conv.contactPublicKey) + const contact = useContact(conv?.contactPublicKey) if (!(conv && conv.type === beapi.messenger.Conversation.Type.ContactType && contact)) { goBack() return null @@ -148,7 +148,7 @@ export const OneToOneSettings: React.FC = ({ > navigate.chat.contactSettings({ contactId: conv.contactPublicKey })} + action={() => navigate.chat.contactSettings({ contactId: conv.contactPublicKey || '' })} actionIcon='more-horizontal-outline' undo={goBack} > diff --git a/js/packages/components/chat/ReplicateGroupSettings.tsx b/js/packages/components/chat/ReplicateGroupSettings.tsx index b6506c51d6..8baab3d1e3 100644 --- a/js/packages/components/chat/ReplicateGroupSettings.tsx +++ b/js/packages/components/chat/ReplicateGroupSettings.tsx @@ -2,12 +2,11 @@ import React from 'react' import { ScrollView, View } from 'react-native' import { useNavigation } from '@react-navigation/native' import { useTranslation } from 'react-i18next' -import { useStyles } from '@berty-tech/styles' -import { useConversation, useMsgrContext } from '@berty-tech/store/hooks' -import HeaderSettings from '../shared-components/Header' -import { ButtonSetting, FactionButtonSetting } from '../shared-components' import { Layout } from '@ui-kitten/components' -import { SwipeNavRecognizer } from '../shared-components/SwipeNavRecognizer' +import { colors } from 'react-native-elements' + +import { useStyles } from '@berty-tech/styles' +import { useConversation, useMsgrContext, Maybe } from '@berty-tech/store/hooks' import { ScreenProps } from '@berty-tech/navigation' import { servicesAuthViaDefault, @@ -16,7 +15,10 @@ import { replicateGroup, } from '@berty-tech/store/services' import beapi from '@berty-tech/api' -import { colors } from 'react-native-elements' + +import HeaderSettings from '../shared-components/Header' +import { ButtonSetting, FactionButtonSetting } from '../shared-components' +import { SwipeNavRecognizer } from '../shared-components/SwipeNavRecognizer' enum replicationServerStatus { KnownServerEnabled, @@ -30,26 +32,27 @@ type TokenUsageStatus = { } const getAllReplicationStatusForConversation = ( - conversation: beapi.messenger.Conversation, + conversation: beapi.messenger.IConversation | undefined, services: Array, ): Array => { - const allServers = conversation.replicationInfo.reduce<{ - [key: string]: { service: beapi.messenger.IServiceToken; status: replicationServerStatus } - }>((servers, r) => { - if (typeof r.authenticationUrl !== 'string') { - return servers - } - - return { - ...servers, - [r.authenticationUrl]: { - service: { - authenticationUrl: r.authenticationUrl, + const allServers = + conversation?.replicationInfo?.reduce<{ + [key: string]: { service: beapi.messenger.IServiceToken; status: replicationServerStatus } + }>((servers, r) => { + if (typeof r.authenticationUrl !== 'string') { + return servers + } + + return { + ...servers, + [r.authenticationUrl]: { + service: { + authenticationUrl: r.authenticationUrl, + }, + status: replicationServerStatus.UnknownServerEnabled, }, - status: replicationServerStatus.UnknownServerEnabled, - }, - } - }, {}) + } + }, {}) || {} for (const s of services.filter((t) => t.serviceType === serviceTypes.Replication)) { if (typeof s.authenticationUrl !== 'string') { @@ -95,10 +98,10 @@ const getReplicationStatusColor = (status: replicationServerStatus): string => { } const ReplicateGroupContent: React.FC<{ - conversationPublicKey: string + conversationPublicKey?: Maybe }> = ({ conversationPublicKey }) => { const ctx = useMsgrContext() - const conversation: beapi.messenger.Conversation = ctx.conversations[conversationPublicKey] + const conversation = ctx.conversations[conversationPublicKey as string] const services = useAccountServices() const navigation = useNavigation() const [{ margin, color, flex, padding }] = useStyles() @@ -122,7 +125,7 @@ const ReplicateGroupContent: React.FC<{ return } - return replicateGroup(ctx, conversationPublicKey, t.service.tokenId || '') + return replicateGroup(ctx, conversationPublicKey || '', t.service.tokenId || '') }} /> ))} diff --git a/js/packages/components/chat/shared-components/Chat.tsx b/js/packages/components/chat/common.tsx similarity index 66% rename from js/packages/components/chat/shared-components/Chat.tsx rename to js/packages/components/chat/common.tsx index e37caf787f..9fadb40f52 100644 --- a/js/packages/components/chat/shared-components/Chat.tsx +++ b/js/packages/components/chat/common.tsx @@ -1,4 +1,4 @@ -import React, { useRef, useState } from 'react' +import React, { useCallback, useRef, useState } from 'react' import { TouchableOpacity, SafeAreaView, View, TextInput } from 'react-native' import { Icon, Text } from '@ui-kitten/components' @@ -6,9 +6,10 @@ import { useStyles } from '@berty-tech/styles' import beapi from '@berty-tech/api' import { useMsgrContext } from '@berty-tech/store/hooks' -import { timeFormat } from '../../helpers' -import { playSound } from '../../sounds' -import BlurView from '../../shared-components/BlurView' +import { AddFileMenu } from './file-uploads/AddFileMenu' +import { timeFormat } from '../helpers' +import { playSound } from '../sounds' +import BlurView from '../shared-components/BlurView' // import { SafeAreaView } from 'react-native-safe-area-context' // @@ -31,44 +32,71 @@ export const ChatFooter: React.FC<{ convPk: string disabled?: boolean placeholder: string - onFileMenuPress: () => void -}> = ({ isFocused, setFocus, convPk, disabled = false, placeholder, onFileMenuPress }) => { - const ctx: any = useMsgrContext() + setSwipe: (val: boolean) => void +}> = ({ isFocused, setFocus, convPk, disabled = false, placeholder, setSwipe }) => { + const ctx = useMsgrContext() const [message, setMessage] = useState('') + const [showAddFileMenu, setShowAddFileMenu] = useState(false) const inputRef = useRef(null) const _isFocused = isFocused || inputRef?.current?.isFocused() || false const _styles = useStylesChatFooter() const [{ row, padding, flex, border, color, text, margin }] = useStyles() + const [mediaCids, setMediaCids] = useState([]) - const usermsg = { body: message, sentDate: Date.now() } - const buf = beapi.messenger.AppMessage.UserMessage.encode(usermsg).finish() + const buf = beapi.messenger.AppMessage.UserMessage.encode({ body: message }).finish() const conversation = ctx.conversations[convPk] + const isFake = (conversation as { fake: boolean }).fake + const sendEnabled = !!(!isFake && (message || mediaCids.length > 0)) + + const sendMessage = useCallback( + (medias: string[] = []) => { + ctx.client + ?.interact({ + conversationPublicKey: convPk, + type: beapi.messenger.AppMessage.Type.TypeUserMessage, + payload: buf, + mediaCids: medias, + }) + .then(() => { + setMessage('') + setMediaCids([]) + playSound('messageSent') + }) + .catch((e) => { + console.warn('e sending message:', e) + }) + }, + [buf, convPk, ctx.client], + ) + // TODO: Debug, error on restarting node - const handleSend = React.useCallback(() => { - ctx.client - ?.interact({ - conversationPublicKey: convPk, - type: beapi.messenger.AppMessage.Type.TypeUserMessage, - payload: buf, - }) - .then(() => { - playSound('messageSent') - }) - .catch((e: any) => { - console.warn('e sending message:', e) - }) - }, [convPk, ctx.client, buf]) + const handlePressSend = React.useCallback(() => { + console.log('recompute handleSend', mediaCids) + if (!sendEnabled) { + return + } + sendMessage() + }, [mediaCids, sendEnabled, sendMessage]) + + const handleCloseFileMenu = (newMedias: string[] | undefined) => { + if (newMedias) { + sendMessage([...mediaCids, ...newMedias]) + } + setShowAddFileMenu(false) + setSwipe(true) + } if (!conversation) { return null } - const isFake = conversation.fake + return ( + {showAddFileMenu && } { + setSwipe(false) + setShowAddFileMenu(true) + }} > + {mediaCids.length > 0 && {mediaCids.length}} setFocus(true)} onBlur={() => setFocus(false)} onChange={({ nativeEvent }) => setMessage(nativeEvent.text)} - autoCorrect={false} + autoCorrect style={[ _styles.textInput, _isFocused && { color: color.blue } && _styles.focusTextInput, @@ -127,22 +159,14 @@ export const ChatFooter: React.FC<{ /> { - if (isFake) { - return - } - if (message) { - handleSend() - } - setMessage('') - }} + disabled={!sendEnabled} + onPress={handlePressSend} > = 1 ? color.blue : '#AFB1C0'} + fill={sendEnabled ? color.blue : '#AFB1C0'} /> diff --git a/js/packages/components/chat/file-uploads/AddFileMenu.tsx b/js/packages/components/chat/file-uploads/AddFileMenu.tsx index 3c6421d911..dd201e7823 100644 --- a/js/packages/components/chat/file-uploads/AddFileMenu.tsx +++ b/js/packages/components/chat/file-uploads/AddFileMenu.tsx @@ -1,10 +1,11 @@ import React, { useEffect, useState } from 'react' import { - TouchableOpacity, - TouchableWithoutFeedback, View, - StyleSheet, Animated, + Modal, + KeyboardAvoidingView, + Platform, + TouchableOpacity, } from 'react-native' import { useStyles } from '@berty-tech/styles' import { useTranslation } from 'react-i18next' @@ -12,108 +13,201 @@ import { Text, Icon } from '@ui-kitten/components' import DocumentPicker from 'react-native-document-picker' import { Player, Recorder } from '@react-native-community/audio-toolkit' import moment from 'moment' +import ImagePicker from 'react-native-image-crop-picker' +import { request, check, RESULTS, PERMISSIONS } from 'react-native-permissions' +import beapi from '@berty-tech/api' -enum RecorderState { - Default, - Recording, - Recorded, -} - -const ListItem: React.FC<{ - title: string - onPress: () => void - iconProps: { - name: string - fill: string - height: number - width: number - pack?: string - } -}> = ({ title, iconProps, onPress }) => { - const [{ padding, text }] = useStyles() - - return ( - - - {title} - - ) -} - -let player = new Player('tempVoiceClip.aac') +import { MenuListItem } from './MenuListItem' +import { GallerySection } from './GallerySection' +import { GifSection } from './GifSection' +import { RecorderState, TabItems } from './types' +import { SecurityAccess } from './SecurityAccess' +let audioFilename = 'tempVoiceClip.aac' +let player = new Player(audioFilename) let recorder: Recorder +import { useClient } from '@berty-tech/store/hooks' + +const amap = async any>(arr: T[], cb: C) => + Promise.all(arr.map(cb)) -export const AddFileMenu: React.FC<{ close: () => void }> = ({ close }) => { - const [{ color, border, padding, text, margin }, { windowWidth }] = useStyles() +export const AddFileMenu: React.FC<{ onClose: (medias?: string[]) => void }> = ({ onClose }) => { + const [{ color, border, padding, margin }, { windowWidth }] = useStyles() const { t }: { t: any } = useTranslation() - // const [recorderFilePath, setRecorderFilePath] = useState('') + const [recorderFilePath, setRecorderFilePath] = useState('') const [recorderState, setRecorderState] = useState(RecorderState.Default) const [recordStartTime, setRecordStartTime] = useState(moment()) const [recordStopTime, setRecordStopTime] = useState(moment()) const [refresh, setRefresh] = useState(0) const [intervalId, setIntervalId] = useState() const [animatedWidth] = useState(new Animated.Value(0)) - - const startTimer = () => { - setIntervalId(setInterval(() => setRefresh((timer) => timer + 1), 500)) - } + const [activeTab, setActiveTab] = useState(TabItems.Default) + const [isSecurityAccessVisible, setSecurityAccessVisibility] = useState(false) + const client = useClient() useEffect(() => { if (player?.isPlaying) { Animated.timing(animatedWidth, { toValue: ((player.currentTime === -1 ? player.duration : player.currentTime) / player.duration) * - windowWidth, - duration: 200, + windowWidth * + 1.1, + duration: 100, useNativeDriver: false, }).start() } else if (!recorder?.isRecording && player?.isStopped) { Animated.timing(animatedWidth, { - toValue: windowWidth, + toValue: 0, duration: 100, useNativeDriver: false, - }).start(() => { - Animated.timing(animatedWidth, { - toValue: 0, - duration: 100, - useNativeDriver: false, - }).start() - }) - console.log('[l;ayer stopped') + }).start() + intervalId && clearInterval(intervalId) } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [refresh]) + }, [animatedWidth, intervalId, refresh, windowWidth]) const recordingDuration = recordStartTime && (recordStopTime || moment()).diff(recordStartTime) const LIST_CONFIG = [ { iconProps: { - name: 'add-picture', - fill: '#C7C8D8', - height: 40, - width: 40, + name: 'gallery', + fill: activeTab === TabItems.Gallery ? '#383B63' : '#C7C8D8', + pack: 'custom', + }, + title: t('chat.files.gallery'), + onPress: async () => { + if (Platform.OS === 'ios') { + try { + const status = await check(PERMISSIONS.IOS.PHOTO_LIBRARY) + if (status !== RESULTS.GRANTED) { + try { + const status = await request(PERMISSIONS.IOS.PHOTO_LIBRARY) + if (status !== RESULTS.GRANTED) { + setSecurityAccessVisibility(true) + return + } + } catch (err) { + console.log(err) + } + } + } catch (err) { + console.log(err) + } + } + setActiveTab(TabItems.Gallery) + }, + }, + { + iconProps: { + name: 'camera', + fill: activeTab === TabItems.Camera ? '#383B63' : '#C7C8D8', + pack: 'custom', + }, + title: t('chat.files.camera'), + onPress: async () => { + setActiveTab(TabItems.Camera) + try { + const status = await check( + Platform.OS === 'ios' ? PERMISSIONS.IOS.CAMERA : PERMISSIONS.ANDROID.CAMERA, + ) + if (status !== RESULTS.GRANTED) { + try { + const status = await request( + Platform.OS === 'ios' ? PERMISSIONS.IOS.CAMERA : PERMISSIONS.ANDROID.CAMERA, + ) + if (status !== RESULTS.GRANTED) { + setSecurityAccessVisibility(true) + return + } + } catch (err) { + console.log(err) + } + } + } catch (err) { + console.log(err) + } + try { + await ImagePicker.clean() + } catch (err) {} + try { + const image = await ImagePicker.openCamera({ + cropping: false, + }) + + prepareMediaAndSend([ + { + filename: '', + uri: image.path || image.sourceURL || '', + mimeType: image.mime, + }, + ]) + } catch (err) { + console.log(err) + } + }, + }, + { + iconProps: { + name: 'microphone', + fill: recorderState === RecorderState.Recording ? '#F65B77' : '#C7C8D8', pack: 'custom', }, - title: t('chat.files.media'), + title: t('chat.files.record'), onPress: async () => { + setActiveTab(TabItems.Record) try { - const res = await DocumentPicker.pickMultiple({ - type: ['*/*'], + const status = await check( + Platform.OS === 'ios' ? PERMISSIONS.IOS.MICROPHONE : PERMISSIONS.ANDROID.RECORD_AUDIO, + ) + if (status !== RESULTS.GRANTED) { + try { + const status = await request( + Platform.OS === 'ios' + ? PERMISSIONS.IOS.MICROPHONE + : PERMISSIONS.ANDROID.RECORD_AUDIO, + ) + if (status !== RESULTS.GRANTED) { + setSecurityAccessVisibility(true) + return + } + } catch (err) { + console.log(err) + } + } + } catch (err) { + console.log(err) + } + + if (recorderState === RecorderState.Recording) { + stopRecording() + } else if (recorderState === RecorderState.Default) { + startRecording() + } + }, + }, + { + iconProps: { + name: 'files', + fill: activeTab === TabItems.Files ? '#383B63' : '#C7C8D8', + pack: 'custom', + }, + title: t('chat.files.files'), + onPress: async () => { + setActiveTab(TabItems.Files) + try { + const res = await DocumentPicker.pick({ + type: [DocumentPicker.types.allFiles], }) - console.log(res) + prepareMediaAndSend([ + { + filename: res.name, + uri: res.uri, + mimeType: res.type, + }, + ]) } catch (err) { if (DocumentPicker.isCancel(err)) { - } else { - console.error(err) + // ignore } } }, @@ -122,199 +216,180 @@ export const AddFileMenu: React.FC<{ close: () => void }> = ({ close }) => { iconProps: { name: 'bertyzzz', fill: 'white', - height: 40, - width: 40, pack: 'custom', }, - title: t('chat.files.emojis'), - onPress: () => {}, - }, - ] - - let RECORD_CONFIG = { - backgroundColor: 'white', - iconProps: { - name: 'microphone', - pack: 'custom', - fill: '#C7C8D8', + title: 'Bertyzz!', + onPress: () => { + // setActiveTab(TabItems.Bertyzz) + }, }, - } - - if (recorderState === RecorderState.Recording) { - RECORD_CONFIG = { - backgroundColor: '#F89A9A', + { iconProps: { - name: 'microphone', + name: 'gif', + fill: activeTab === TabItems.GIF ? '#383B63' : '#C7C8D8', pack: 'custom', - fill: '#F65B77', }, - } - } else if (recorderState === RecorderState.Recorded) { - RECORD_CONFIG = { - backgroundColor: '#6B80FF', - iconProps: { - name: 'paper-plane-outline', - fill: '#5360CC', - pack: '', + title: t('chat.files.gif'), + onPress: async () => { + setActiveTab(TabItems.GIF) }, - } - } + }, + ] let duration = '00:00' - - if (recorderState === RecorderState.Recorded && !player.isStopped) { - duration = moment.utc(player.currentTime).format('mm:ss') + if (recorderState === RecorderState.Recorded && !player?.isStopped) { + duration = moment.utc(player?.currentTime).format('mm:ss') } else if (recordingDuration) { duration = moment.utc(recordingDuration).format('mm:ss') } + const startTimer = () => { + setIntervalId(setInterval(() => setRefresh((timer) => timer + 1), 100)) + } + const startRecording = () => { + recorder = new Recorder('tempVoiceClip.aac').prepare((err, filePath) => { + if (err) { + console.log('recorder prepare error', err?.message) + } + setRecorderFilePath(filePath) + }) + recorder.record((err) => { + if (err) { + console.log('recorder record error', err?.message) + } else { + setRecorderState(RecorderState.Recording) + setRecordStartTime(moment()) + setRecordStopTime(null) + startTimer() + } + }) + } + + const stopRecording = () => { + recorder?.stop(() => { + player.prepare() + recorder?.destroy() + }) + setRecorderState( + recorderState === RecorderState.Recording ? RecorderState.Recorded : RecorderState.Default, + ) + setRecordStopTime(moment()) + intervalId && clearInterval(intervalId) + } + + const prepareMediaAndSend = async (res: beapi.messenger.IMedia[]) => { + const mediaCids = ( + await amap(res, async (doc) => { + const stream = await client?.mediaPrepare({}) + await stream?.emit({ + info: { filename: doc.filename, mimeType: doc.mimeType, displayName: doc.filename }, + uri: doc.uri, + }) + const reply = await stream?.stopAndRecv() + return reply?.cid + }) + ).filter((cid) => !!cid) + onClose(mediaCids) + } return ( - - - - - { + player?.stop() + recorder?.destroy() + onClose() + }} + /> + - { - if (recorderState !== RecorderState.Default) { - return - } - - recorder = new Recorder('tempVoiceClip.aac').prepare((err, filePath) => { - if (err) { - console.log('recorder prepare error', err?.message) - } - console.log(filePath) - // setRecorderFilePath(filePath) - }) - recorder.record((err) => { - if (err) { - err && console.log('record err', err?.message) - } else { - setRecorderState(RecorderState.Recording) - setRecordStartTime(moment()) - setRecordStopTime(null) - startTimer() - } - }) - }} - onPressOut={() => { - if (recorderState !== RecorderState.Recording) { - return - } - recorder.stop(() => { - player.prepare() - recorder?.destroy() - }) - setRecorderState( - recorderState === RecorderState.Recording - ? RecorderState.Recorded - : RecorderState.Default, - ) - setRecordStopTime(moment()) - clearInterval(intervalId) - }} + + {isSecurityAccessVisible && ( + setSecurityAccessVisibility(false)} + /> + )} - - - - - {recorderState !== RecorderState.Recorded && ( + {activeTab === TabItems.Record && recorderState === RecorderState.Recorded && ( - { + if (recorderState === RecorderState.Recorded) { + prepareMediaAndSend([ + { + filename: audioFilename, + mimeType: 'audio/aac', + uri: recorderFilePath, + }, + ]) + } + }} > - {recorderState === RecorderState.Recording - ? t('chat.files.recording') - : t('chat.files.record-sound')} - - - )} + + - {recorderState === RecorderState.Recorded && ( - { if (player?.isPlaying) { player.pause() } else if (player?.isPaused) { - player.seek(player.currentTime, (err) => { - if (err) { - console.log(err?.message) - } - player.playPause() - }) + player.playPause() } else { + player = new Player('tempVoiceClip.aac') player.play((err) => { if (err) { + console.log('player play', err?.message) } else { startTimer() } @@ -322,14 +397,13 @@ export const AddFileMenu: React.FC<{ close: () => void }> = ({ close }) => { } }} style={[ - padding.vertical.tiny, - padding.horizontal.big, border.radius.small, { backgroundColor: '#4F58C0', - alignSelf: 'center', alignItems: 'center', justifyContent: 'center', + height: 40, + width: 100, }, ]} > @@ -341,80 +415,91 @@ export const AddFileMenu: React.FC<{ close: () => void }> = ({ close }) => { pack='custom' /> + + + + {duration} + + + { + setRecorderState(RecorderState.Default) + recorder?.destroy() + setRecordStartTime(null) + setRecordStopTime(null) + player?.stop() + }} + style={[padding.tiny, margin.left.small]} + > + + + + + + + )} + - {recorderState !== RecorderState.Default && ( - - {duration} - - )} - {recorderState === RecorderState.Recorded && ( - { - setRecorderState(RecorderState.Default) - recorder?.destroy() - setRecordStartTime(null) - setRecordStopTime(null) - player?.stop() - }} - style={[padding.tiny, margin.left.small]} - > - - - )} + {LIST_CONFIG.map((listItem) => ( + + ))} - {recorderState === RecorderState.Recorded && ( - - - + + {activeTab === TabItems.Gallery && ( + )} + {activeTab === TabItems.GIF && } - - {LIST_CONFIG.map((listItem) => ( - - ))} - - + + + ) } diff --git a/js/packages/components/chat/file-uploads/GallerySection.tsx b/js/packages/components/chat/file-uploads/GallerySection.tsx new file mode 100644 index 0000000000..e9eb1f938c --- /dev/null +++ b/js/packages/components/chat/file-uploads/GallerySection.tsx @@ -0,0 +1,226 @@ +import React, { useEffect, useState } from 'react' +import { TouchableOpacity, View, ScrollView, Image, Platform } from 'react-native' +import { useStyles } from '@berty-tech/styles' +import { Icon } from '@ui-kitten/components' +import CameraRoll from '@react-native-community/cameraroll' +import RNFS from 'react-native-fs' +import beapi from '@berty-tech/api' + +import { ImageCounter } from '../ImageCounter' +const GALLERY_IMAGE_PER_PAGE = 30 + +export const GallerySection: React.FC<{ + prepareMediaAndSend: (media: beapi.messenger.IMedia[]) => void +}> = ({ prepareMediaAndSend }) => { + const [{ color, border, padding, margin }] = useStyles() + + const [selectedImages, setSelectedImages] = useState([]) + const [galleryImageEndCursor, setGalleryImageEndCursor] = useState( + null, + ) + + const [galleryContents, setGalleryContents] = useState([]) + + async function getInitalGalleryContents() { + try { + const photos = await CameraRoll.getPhotos({ + first: GALLERY_IMAGE_PER_PAGE, + }) + + setGalleryContents( + photos.edges.map(({ node: { image: { filename, uri }, type: mime } }) => ({ + filename: filename || '', + uri, + mimeType: mime, + })), + ) + + setGalleryImageEndCursor(photos.page_info.has_next_page ? photos.page_info.end_cursor : null) + } catch (err) { + console.log('getPhotos err', err) + } + } + + useEffect(() => { + getInitalGalleryContents() + }, []) + + const getUploadableURI = async (item: beapi.messenger.IMedia) => { + if (Platform.OS === 'android') { + return item.uri + } + // Workaround to get uploadable uri from ios + const destination = `${RNFS.TemporaryDirectoryPath}${item.filename}` + try { + let absolutePath = item.uri && (await RNFS.copyAssetsFileIOS(item.uri, destination, 0, 0)) + setTimeout(() => RNFS.unlink(destination), 10000) + return absolutePath + } catch (error) { + console.log(error) + } + } + + const handleSend = async () => { + try { + let selectedImageWithUplodableURI = await Promise.all( + selectedImages.map(async (item) => ({ + ...item, + uri: (await getUploadableURI(item)) || '', + })), + ) + + selectedImageWithUplodableURI.length && prepareMediaAndSend(selectedImageWithUplodableURI) + } catch (e) { + console.log('image path error', e) + } + } + + return ( + <> + {galleryContents.length > 0 && ( + { + if ( + galleryImageEndCursor && + layoutMeasurement.height + contentOffset.y >= contentSize.height - 20 + ) { + try { + const photos = await CameraRoll.getPhotos({ + first: GALLERY_IMAGE_PER_PAGE, + after: galleryImageEndCursor, + }) + + setGalleryContents((prev) => [ + ...prev, + ...photos.edges.map(({ node: { image: { filename, uri }, type: mime } }) => ({ + filename: filename || '', + uri, + mime, + })), + ]) + + setGalleryImageEndCursor( + photos.page_info.has_next_page ? photos.page_info.end_cursor : null, + ) + } catch (err) { + console.log('getPhotos err', err) + } + } + }} + scrollEventThrottle={400} + style={[ + { + height: 300, + }, + padding.medium, + ]} + contentContainerStyle={{ + flexDirection: 'row', + flexWrap: 'wrap', + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#FEFEFF', + }} + > + {galleryContents.map((content) => ( + { + setSelectedImages((prevImages) => { + if (prevImages.find((prevImage) => prevImage.filename === content.filename)) { + return prevImages.filter((image) => image.filename !== content.filename) + } else { + return [...prevImages, content] + } + }) + }} + > + + + {selectedImages.find((image) => image.filename === content.filename) && ( + + + + )} + + ))} + + )} + {selectedImages.length > 0 && ( + + + {selectedImages.slice(0, 2).map((image) => ( + + ))} + {selectedImages.length > 2 && } + + + + + + + )} + + ) +} diff --git a/js/packages/components/chat/file-uploads/GifSection.tsx b/js/packages/components/chat/file-uploads/GifSection.tsx new file mode 100644 index 0000000000..e848beb0c1 --- /dev/null +++ b/js/packages/components/chat/file-uploads/GifSection.tsx @@ -0,0 +1,195 @@ +import React, { useEffect, useState } from 'react' +import { TouchableOpacity, View, ScrollView, Image, TextInput } from 'react-native' +import { useStyles } from '@berty-tech/styles' +import { Icon } from '@ui-kitten/components' +import { useTranslation } from 'react-i18next' +import beapi from '@berty-tech/api' +import RNFS from 'react-native-fs' + +const GIF_IMAGE_PER_PAGE = 10 + +export const GifSection: React.FC<{ + prepareMediaAndSend: (media: beapi.messenger.IMedia[]) => void +}> = ({ prepareMediaAndSend }) => { + const [{ color, border, padding, margin }] = useStyles() + const { t }: { t: any } = useTranslation() + + const [searchQuery, setSearchQuery] = useState('') + const [GIFTotalCount, setGIFTotalCount] = useState(0) + + const [GIFs, setGIFs] = useState< + { + url: string + stillURL: string + }[] + >([]) + + function handleSearchQueryChange(query = '') { + setSearchQuery(query) + fetchGIFs(query) + } + + async function fetchGIFs(query = '', offset = 0) { + const GIPHY_API_KEY = '0Tjt245wq9x0QO9L2DRy2hV6Q5sw7ZDf' + const URL = query + ? `https://api.giphy.com/v1/gifs/search?api_key=${GIPHY_API_KEY}&q=${query}&limit=${GIF_IMAGE_PER_PAGE}&offset=${offset}` + : `https://api.giphy.com/v1/gifs/trending?api_key=${GIPHY_API_KEY}&limit=${GIF_IMAGE_PER_PAGE}&offset=${offset}` + fetch(URL) + .then((response) => response.json()) + .then((response) => { + response?.data?.length && + setGIFs((prevGIFs) => [ + ...(offset ? prevGIFs : []), + ...response.data.map( + ({ + images: { + fixed_width_downsampled: { url }, + fixed_width_small_still: { url: stillURL }, + }, + }: { + images: { + fixed_width_downsampled: { url: string } + fixed_width_small_still: { url: string } + } + }) => ({ url, stillURL }), + ), + ]) + setGIFTotalCount(response?.pagination?.total_count || 0) + }) + .catch((error) => { + console.error(error) + }) + } + + useEffect(() => { + fetchGIFs() + }, []) + + return ( + <> + + + handleSearchQueryChange(query)} + /> + {searchQuery.length > 0 && ( + handleSearchQueryChange('')} style={[padding.tiny]}> + + + )} + + {GIFs.length > 0 && ( + { + if ( + GIFTotalCount > GIFs.length && + layoutMeasurement.height + contentOffset.y >= contentSize.height - 20 + ) { + fetchGIFs(searchQuery, GIFs.length) + } + }} + scrollEventThrottle={400} + style={[ + { + height: 300, + }, + padding.medium, + ]} + contentContainerStyle={{ + flexDirection: 'row', + flexWrap: 'wrap', + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#FEFEFF', + }} + > + {GIFs.map(({ url, stillURL }) => ( + { + const destination = `${RNFS.TemporaryDirectoryPath}${Math.random() + .toString(36) + .substring(7)}.gif` + + RNFS.downloadFile({ + fromUrl: url, + toFile: destination, + }) + .promise.then(() => { + prepareMediaAndSend([ + { + uri: destination, + mimeType: 'image/gif', + filename: `${Math.random().toString(36).substring(7)}.gif`, + }, + ]) + + setTimeout(() => { + RNFS.unlink(destination) + }, 5000) + }) + .catch((err) => console.log(err)) + }} + > + + + + ))} + + )} + + ) +} diff --git a/js/packages/components/chat/file-uploads/MenuListItem.tsx b/js/packages/components/chat/file-uploads/MenuListItem.tsx new file mode 100644 index 0000000000..2f09b7f132 --- /dev/null +++ b/js/packages/components/chat/file-uploads/MenuListItem.tsx @@ -0,0 +1,28 @@ +import React from 'react' +import { useStyles } from '@berty-tech/styles' +import { TouchableOpacity } from 'react-native' +import { Text, Icon } from '@ui-kitten/components' + +export const MenuListItem: React.FC<{ + title: string + onPress: () => void + iconProps: { + name: string + fill: string + height?: number + width?: number + pack?: string + } +}> = ({ title, iconProps, onPress }) => { + const [{ padding, text, margin }] = useStyles() + + return ( + + + {title} + + ) +} diff --git a/js/packages/components/chat/file-uploads/SecurityAccess.tsx b/js/packages/components/chat/file-uploads/SecurityAccess.tsx new file mode 100644 index 0000000000..eee45c3969 --- /dev/null +++ b/js/packages/components/chat/file-uploads/SecurityAccess.tsx @@ -0,0 +1,160 @@ +import React, { useEffect, useCallback } from 'react' +import { View, TouchableOpacity, AppState, Platform } from 'react-native' +import { check, RESULTS, PERMISSIONS, openSettings } from 'react-native-permissions' +import { useStyles } from '@berty-tech/styles' +import { useTranslation } from 'react-i18next' +import { Text, Icon } from '@ui-kitten/components' +import { TabItems } from './types' + +export const SecurityAccess: React.FC<{ close: () => void; activeTab: TabItems }> = ({ + activeTab, + close, +}) => { + const [{ color, border, padding, margin }] = useStyles() + const { t }: { t: any } = useTranslation() + + const handleAppStateChange = useCallback( + async (state: string) => { + if (state === 'active') { + if (activeTab === TabItems.Camera) { + try { + const status = await check( + Platform.OS === 'android' ? PERMISSIONS.ANDROID.CAMERA : PERMISSIONS.IOS.CAMERA, + ) + if (status === RESULTS.GRANTED) { + close() + } + } catch (err) {} + } else if (activeTab === TabItems.Gallery && Platform.OS === 'ios') { + try { + const status = await check(PERMISSIONS.IOS.PHOTO_LIBRARY) + + if (status === RESULTS.GRANTED) { + close() + } + } catch (err) {} + } else if (activeTab === TabItems.Record) { + try { + const status = await check( + Platform.OS === 'ios' ? PERMISSIONS.IOS.MICROPHONE : PERMISSIONS.ANDROID.RECORD_AUDIO, + ) + + if (status === RESULTS.GRANTED) { + close() + } + } catch (err) {} + } + } + }, + [activeTab, close], + ) + + useEffect(() => { + AppState.addEventListener('change', handleAppStateChange) + return () => { + AppState.removeEventListener('change', handleAppStateChange) + } + }, [handleAppStateChange]) + + const CONFIG = [ + { + tab: TabItems.Gallery, + iconName: 'gallery', + title: t('chat.files.gallery'), + onPress: async () => { + try { + await openSettings() + } catch (err) {} + }, + }, + { + tab: TabItems.Camera, + iconName: 'camera', + title: t('chat.files.camera'), + onPress: async () => { + try { + await openSettings() + } catch (err) {} + }, + }, + { + tab: TabItems.Record, + iconName: 'microphone', + title: t('chat.files.microphone'), + onPress: async () => { + try { + await openSettings() + } catch (err) {} + }, + }, + ] + + const activeTabConfig = CONFIG.find((config) => activeTab === config.tab) + + if (!activeTabConfig) { + return null + } + + return ( + + + + {t('chat.files.security-access')} + + + + + + + + + {t('chat.files.security-access-desc')} {t(activeTabConfig.title)} + + + + ) +} diff --git a/js/packages/components/chat/file-uploads/types.tsx b/js/packages/components/chat/file-uploads/types.tsx new file mode 100644 index 0000000000..1dacb7df0c --- /dev/null +++ b/js/packages/components/chat/file-uploads/types.tsx @@ -0,0 +1,15 @@ +export enum RecorderState { + Default, + Recording, + Recorded, +} + +export enum TabItems { + Default, + Gallery, + Camera, + Record, + Files, + Bertyzz, + GIF, +} diff --git a/js/packages/components/chat/message/AudioMessage.tsx b/js/packages/components/chat/message/AudioMessage.tsx new file mode 100644 index 0000000000..2bbd7a5c17 --- /dev/null +++ b/js/packages/components/chat/message/AudioMessage.tsx @@ -0,0 +1,162 @@ +import React, { useEffect, useState } from 'react' +import { View, TouchableOpacity } from 'react-native' +import { Text, Icon } from '@ui-kitten/components' +import { useMsgrContext } from '@berty-tech/store/hooks' + +import { useStyles } from '@berty-tech/styles' +import { Player } from '@react-native-community/audio-toolkit' +import WaveForm from 'react-native-audiowaveform' +import { getSource } from '../../utils' +import moment from 'moment' +import { useMusicPlayer } from '@berty-tech/music-player' + +export const AudioMessage: React.FC<{ medias: any }> = ({ medias }) => { + const { protocolClient } = useMsgrContext() + const [{ padding, color, border, margin }, { windowWidth }] = useStyles() + const [source, setSource] = useState('') + const mimeType = medias[0].mimeType + const { player: globalPlayer, setPlayer: setGlobalPlayer, handlePlayPause } = useMusicPlayer() + const [player, setPlayer] = useState() + useEffect(() => { + if (!protocolClient) { + return + } + let cancel = false + getSource(protocolClient, medias[0].cid) + .then((src) => { + if (!cancel) { + let base64 = `data:${mimeType};base64,${src}` + setSource(base64) + setPlayer(new Player(base64).prepare()) + } + }) + .catch((e) => console.error('failed to get attachment image:', e)) + return () => { + cancel = true + } + }, [protocolClient, mimeType, medias]) + + let currentTime = + globalPlayer.id === medias[0].cid ? globalPlayer.player?.currentTime : player?.currentTime + + return ( + + + {!!source && ( + + )} + + { + if (globalPlayer.id === medias[0].cid) { + handlePlayPause() + } else { + setGlobalPlayer(source, medias[0].cid) + } + }} + style={[ + padding.vertical.tiny, + padding.horizontal.big, + border.radius.small, + { + backgroundColor: '#4F58C0', + alignSelf: 'center', + alignItems: 'center', + justifyContent: 'center', + }, + ]} + > + + + + + + {moment.utc(Number((currentTime || 0) > 0 ? currentTime : 0)).format('mm:ss')} + + + + {moment.utc(Number(player?.duration) > 0 ? player?.duration : 0).format('mm:ss')} + + + + ) +} diff --git a/js/packages/components/chat/message/FileMessage.tsx b/js/packages/components/chat/message/FileMessage.tsx new file mode 100644 index 0000000000..49d80f2c0c --- /dev/null +++ b/js/packages/components/chat/message/FileMessage.tsx @@ -0,0 +1,56 @@ +import React, { useEffect, useState } from 'react' +import { TouchableOpacity } from 'react-native' +import { Text, Icon } from '@ui-kitten/components' +import RNFS from 'react-native-fs' +import { useMsgrContext } from '@berty-tech/store/hooks' +import { useStyles } from '@berty-tech/styles' +import { getSource } from '../../utils' + +export const FileMessage: React.FC<{ medias: any }> = ({ medias }) => { + const { protocolClient } = useMsgrContext() + const [source, setSource] = useState('') + const [isLoading, setLoading] = useState(false) + const [isDownloaded, setDownloaded] = useState(false) + const [{ margin }] = useStyles() + + useEffect(() => { + if (!protocolClient) { + return + } + getSource(protocolClient, medias[0].cid) + .then((src) => { + setSource(src) + }) + .catch((e) => console.error('failed to get picture message image:', e)) + }, [protocolClient, medias]) + + return ( + { + setLoading(true) + RNFS.writeFile(`${RNFS.DocumentDirectoryPath}/${medias[0].filename}`, source, 'base64') + .then(() => { + setDownloaded(true) + setLoading(false) + }) + .catch((err) => console.log(err)) + }} + > + + + {medias[0].filename} + + {(isDownloaded || isLoading) && ( + ({isDownloaded ? 'Downloaded' : 'Downloading'}) + )} + + ) +} diff --git a/js/packages/components/chat/message/MessageInvitation.tsx b/js/packages/components/chat/message/MessageInvitation.tsx index aacbe4eabf..f23f7e8a30 100644 --- a/js/packages/components/chat/message/MessageInvitation.tsx +++ b/js/packages/components/chat/message/MessageInvitation.tsx @@ -1,16 +1,15 @@ -import React, { useMemo, useState } from 'react' +import React, { useState } from 'react' import { Text as TextNative, TouchableOpacity, View } from 'react-native' import { Icon, Text } from '@ui-kitten/components' import { Buffer } from 'buffer' import { useClient, useConversation, useOneToOneContact } from '@berty-tech/store/hooks' import { useStyles } from '@berty-tech/styles' +import { InteractionGroupInvitation } from '@berty-tech/store/types.gen' -import { ProceduralCircleAvatar } from '../../shared-components/ProceduralCircleAvatar' import { MessageSystemWrapper } from './MessageSystemWrapper' - -const base64ToURLBase64 = (str: string) => - str.replace(/\+/, '-').replace(/\//, '_').replace(/\=/, '') +import { ConversationAvatar } from '../../avatars' +import { base64ToURLBase64 } from '../../utils' export const MessageInvitationButton: React.FC<{ onPress?: any @@ -68,7 +67,7 @@ export const MessageInvitationButton: React.FC<{ ) } -const MessageInvitationSent: React.FC<{ message: any }> = ({ message }) => { +const MessageInvitationSent: React.FC<{ message: InteractionGroupInvitation }> = ({ message }) => { const [{ text }] = useStyles() const conversationContact = useOneToOneContact(message.conversationPublicKey) return ( @@ -78,38 +77,35 @@ const MessageInvitationSent: React.FC<{ message: any }> = ({ message }) => { ) } -const MessageInvitationReceived: React.FC<{ message: any }> = ({ message }) => { +const MessageInvitationReceived: React.FC<{ message: InteractionGroupInvitation }> = ({ + message, +}) => { const [{ row, flex, text, margin, color }] = useStyles() - const client: any = useClient() + const client = useClient() const [error, setError] = useState(false) const [{ convPk, displayName }, setPdlInfo] = useState({ convPk: '', displayName: '' }) const [accepting, setAccepting] = useState(false) const conv = useConversation(convPk) const { link } = message.payload || {} - const acceptDisabled = useMemo(() => accepting || conv || !convPk || error, [ - accepting, - conv, - convPk, - error, - ]) + const acceptDisabled = !!(accepting || conv || !convPk || error) // Parse deep link React.useEffect(() => { - if (!convPk && link && !conv) { + if (client && !convPk && link && !conv) { setError(false) client .parseDeepLink({ link, }) - .then((reply: any) => { + .then((reply) => { setPdlInfo({ - displayName: reply.bertyGroup.displayName, + displayName: reply.link?.bertyGroup?.displayName || '', convPk: base64ToURLBase64( - new Buffer(reply?.bertyGroup?.group?.publicKey || '').toString('base64'), + Buffer.from(reply.link?.bertyGroup?.group?.publicKey || '').toString('base64'), ), }) }) - .catch((err: any) => { + .catch((err) => { console.warn(err) setError(true) }) @@ -117,11 +113,11 @@ const MessageInvitationReceived: React.FC<{ message: any }> = ({ message }) => { }, [convPk, conv, link, client]) const handleAccept = React.useCallback(() => { - if (convPk && !conv && !accepting && !error) { + if (client && convPk && !conv && !accepting && !error) { setAccepting(true) client .conversationJoin({ link }) - .catch((err: any) => { + .catch((err) => { console.warn(err) setError(true) }) @@ -132,7 +128,7 @@ const MessageInvitationReceived: React.FC<{ message: any }> = ({ message }) => { }, [client, link, conv, convPk, accepting, error]) return ( - + <> = ({ message }) => { - + = ({ message }) => { Error adding you to the group ☹️ Our bad! )} - + ) } -export const MessageInvitation: React.FC<{ message: any }> = ({ message }) => { +export const MessageInvitation: React.FC<{ message: InteractionGroupInvitation }> = ({ + message, +}) => { const [{ row, padding, margin }] = useStyles() return ( diff --git a/js/packages/components/chat/message/MessageMonitorMetadata.tsx b/js/packages/components/chat/message/MessageMonitorMetadata.tsx index d32287e9c3..7fd29bcd25 100644 --- a/js/packages/components/chat/message/MessageMonitorMetadata.tsx +++ b/js/packages/components/chat/message/MessageMonitorMetadata.tsx @@ -3,62 +3,61 @@ import { View } from 'react-native' import { Icon, Text } from '@ui-kitten/components' import { useStyles } from '@berty-tech/styles' -import { pbDateToNum, timeFormat } from '../../helpers' import beapi from '@berty-tech/api' -const getMonitorEventKeys = () => { - return ['undefined', 'advertiseGroup', 'peerFound', 'peerJoin', 'peerLeave'] -} +import { pbDateToNum, timeFormat } from '../../helpers' +import { InteractionMonitorMetadata } from '@berty-tech/store/types.gen' -const eventMonitorTypes = beapi.types.MonitorGroup.TypeEventMonitor +const eventMonitorTypes = beapi.protocol.MonitorGroup.TypeEventMonitor -export const MessageMonitorMetadata: React.FC<{ inte: beapi.messenger.IInteraction }> = ({ +export const MessageMonitorMetadata: React.FC<{ inte: InteractionMonitorMetadata }> = ({ inte, }) => { const [{ padding, text, margin }] = useStyles() const sentDate = pbDateToNum(inte?.sentDate) - /* beapi.types.MonitorGroup.TypeEventMonitor */ - const monitorEvent = (inte.payload as any)?.event - const monitorEventKeys = getMonitorEventKeys() - const { peerId, driverName, maddrs, isSelf } = monitorEvent[monitorEventKeys[monitorEvent.type]] + const me = inte.payload.event - let monitorPayloadTitle - let monitorPayloadSubtitle - switch (monitorEvent.type) { + let monitorPayloadTitle: string + let monitorPayloadSubtitle: string[] | undefined + switch (me?.type) { case eventMonitorTypes.TypeEventMonitorAdvertiseGroup: - const msgAdvertise = `local peer advertised ${peerId.substr( - peerId.length - 10, - )} on ${driverName}, with ${maddrs.length} maddrs:` - monitorPayloadSubtitle = maddrs.map((addr: string) => `--${addr}`) + const msgAdvertise = `local peer advertised ${me.advertiseGroup?.peerId?.substr( + me.advertiseGroup.peerId.length - 10, + )} on ${me.advertiseGroup?.driverName}, with ${me.advertiseGroup?.maddrs?.length} maddrs:` + monitorPayloadSubtitle = me.advertiseGroup?.maddrs?.map((addr: string) => `--${addr}`) monitorPayloadTitle = msgAdvertise break case eventMonitorTypes.TypeEventMonitorPeerFound: - monitorPayloadTitle = `new peer found ${peerId.substr( - peerId.length - 10, - )} on ${driverName}, with ${maddrs.length} maddrs:` - monitorPayloadSubtitle = maddrs.map((addr: string) => `--${addr}`) + monitorPayloadTitle = `new peer found ${me.peerFound?.peerId?.substr( + me.peerFound.peerId.length - 10, + )} on ${me.peerFound?.driverName}, with ${me.peerFound?.maddrs?.length} maddrs:` + monitorPayloadSubtitle = me.peerFound?.maddrs?.map((addr: string) => `--${addr}`) break case eventMonitorTypes.TypeEventMonitorPeerJoin: - if (isSelf) { + if (me.peerJoin?.isSelf) { monitorPayloadTitle = 'you just joined this group' } else { let activeAddr = '' - if (maddrs.length) { - activeAddr = maddrs[0] + if (me.peerJoin?.maddrs?.length) { + activeAddr = me.peerJoin?.maddrs[0] } - monitorPayloadTitle = `peer joined ${peerId.substr(peerId.length - 10)} on: ${activeAddr}` + monitorPayloadTitle = `peer joined ${me.peerJoin?.peerId?.substr( + me.peerJoin.peerId.length - 10, + )} on: ${activeAddr}` } break case eventMonitorTypes.TypeEventMonitorPeerLeave: - if (isSelf) { + if (me.peerLeave?.isSelf) { monitorPayloadTitle = 'you just leaved this group' } else { - monitorPayloadTitle = `peer leaved ${peerId.substr(peerId.length - 10)}` + monitorPayloadTitle = `peer leaved ${me.peerLeave?.peerId?.substr( + me.peerLeave.peerId.length - 10, + )}` } break default: - console.log('undefined event type', monitorEvent) + console.log('undefined event type', me) monitorPayloadTitle = 'undefined' } return ( diff --git a/js/packages/components/chat/message/PictureMessage.tsx b/js/packages/components/chat/message/PictureMessage.tsx new file mode 100644 index 0000000000..cb47759768 --- /dev/null +++ b/js/packages/components/chat/message/PictureMessage.tsx @@ -0,0 +1,130 @@ +import React, { useState, useEffect } from 'react' +import { View, TouchableOpacity, Image, ActivityIndicator } from 'react-native' +import { useMsgrContext } from '@berty-tech/store/hooks' +import { useStyles } from '@berty-tech/styles' +import { getSource } from '../../utils' +import { ImageCounter } from '../ImageCounter' + +import { useNavigation } from '@berty-tech/navigation' + +export const PictureMessage: React.FC<{ medias: any }> = ({ medias }) => { + const [{ padding, border }] = useStyles() + const { protocolClient } = useMsgrContext() + const [images, setImages] = useState([]) + const navigation = useNavigation() + useEffect(() => { + if (!protocolClient) { + return + } + + Promise.all( + medias.map((media: any) => { + return getSource(protocolClient, media.cid) + .then((src) => { + return { ...media, uri: `data:${media.mimeType};base64,${src}` } + }) + .catch((e) => console.error('failed to get picture message image:', e)) + }), + ).then((images: any) => setImages(images.filter(Boolean))) + }, [protocolClient, medias]) + + return ( + + + 4 ? 4 : medias.length) * 15, + width: 150 + (medias.length > 4 ? 7 : medias.length) * 18, + position: 'relative', + }} + > + {medias + .slice(0, medias.length > 4 ? 4 : medias.length) + .map((media: any, index: number) => ( + { + navigation.navigate.modals.imageView({ images }) + }} + activeOpacity={1} + style={{ + position: 'absolute', + zIndex: 5 - index, + elevation: 5 - index, + left: index * 18, + bottom: index * 15, + }} + > + + + + {!images[index] && ( + + )} + + + ))} + + + {medias.length > 4 && ( + + + + )} + + + ) +} diff --git a/js/packages/components/chat/message/QuickReplyOptions.tsx b/js/packages/components/chat/message/QuickReplyOptions.tsx index 7d31fca281..731da6950c 100644 --- a/js/packages/components/chat/message/QuickReplyOptions.tsx +++ b/js/packages/components/chat/message/QuickReplyOptions.tsx @@ -8,7 +8,7 @@ import { useStyles } from '@berty-tech/styles' const QuickReplyOption: React.FC<{ convPk: string - option: { display: string; payload: string } + option: beapi.messenger.IReplyOption }> = ({ convPk, option }) => { const ctx: any = useMsgrContext() const [{ padding, border, margin }] = useStyles() @@ -42,7 +42,7 @@ const QuickReplyOption: React.FC<{ padding.vertical.scale(4), ]} > - {option.display} + {option.display || ''} ) @@ -50,7 +50,7 @@ const QuickReplyOption: React.FC<{ export const QuickReplyOptions: React.FC<{ convPk: string - options: Array<{ display: string; payload: string }> + options: beapi.messenger.IReplyOption[] }> = ({ convPk, options }) => { const [{ flex }] = useStyles() diff --git a/js/packages/components/chat/message/UserMessage.tsx b/js/packages/components/chat/message/UserMessage.tsx index 3985364af7..d2d4d30b26 100644 --- a/js/packages/components/chat/message/UserMessage.tsx +++ b/js/packages/components/chat/message/UserMessage.tsx @@ -12,6 +12,10 @@ import { useStyles } from '@berty-tech/styles' import { MemberAvatar } from '../../avatars' import { HyperlinkUserMessage, TimestampStatusUserMessage } from './UserMessageComponents' import { pbDateToNum } from '../../helpers' +import { InteractionUserMessage } from '@berty-tech/store/types.gen' +import { PictureMessage } from './PictureMessage' +import { AudioMessage } from './AudioMessage' +import { FileMessage } from './FileMessage' const pal = palette('tol-rainbow', 256) @@ -117,7 +121,7 @@ const getUserMessageState = ( } export const UserMessage: React.FC<{ - inte: any + inte: InteractionUserMessage members?: { [key: string]: any } convPK: string convKind: any @@ -171,7 +175,18 @@ export const UserMessage: React.FC<{ /> )} + + {(inte.medias?.length || 0) > 0 && + (() => { + if (inte?.medias?.[0]?.mimeType?.startsWith('image')) { + return + } else if (inte?.medias?.[0]?.mimeType?.startsWith('audio')) { + return + } else { + return + } + })()} {!inte.isMe && isGroup && !isFollowupMessage && ( @@ -179,13 +194,19 @@ export const UserMessage: React.FC<{ )} - + {inte.payload.body ? ( + + ) : ( + (inte.medias?.length || 0) === 0 && ( + - + ) + )} {!isWithinCollapseDuration && ( { } } -async function isBertyDeepLink(client: any, url: String): Promise { +async function isBertyDeepLink(client: WelshMessengerServiceClient, url: string): Promise { return new Promise((resolve) => { client .parseDeepLink({ @@ -36,7 +38,7 @@ async function isBertyDeepLink(client: any, url: String): Promise { } export const HyperlinkUserMessage: React.FC<{ - inte: any + inte: InteractionUserMessage msgBorderColor: any isFollowedMessage: boolean | undefined msgBackgroundColor: any @@ -46,13 +48,13 @@ export const HyperlinkUserMessage: React.FC<{ payload: { body: message }, } = inte - const client: any = useClient() + const client = useClient() const navigation = useNativeNavigation() const [{ margin, padding, column, border }] = useStyles() const [isReadMore, setReadMore] = useState(false) useEffect(() => { - setReadMore(message.length > READ_MORE_MESSAGE_LENGTH) + message && setReadMore(message.length > READ_MORE_MESSAGE_LENGTH) }, [message]) return ( @@ -73,7 +75,7 @@ export const HyperlinkUserMessage: React.FC<{ > { - if (await isBertyDeepLink(client, url)) { + if (client && (await isBertyDeepLink(client, url))) { navigation.navigate('Modals', { screen: 'ManageDeepLink', params: { type: 'link', value: url }, @@ -110,12 +112,12 @@ export const HyperlinkUserMessage: React.FC<{ } export const TimestampStatusUserMessage: React.FC<{ - inte: any - lastInte: any + inte: ParsedInteraction + lastInte: Maybe isFollowedMessage: boolean | undefined cmd: any }> = ({ inte, lastInte, isFollowedMessage, cmd }) => { - const sentDate = pbDateToNum(inte?.sentDate) + const sentDate = pbDateToNum(inte.sentDate) const [{ row, margin, padding, color, flex }, { scaleSize }] = useStyles() const _styles = useStylesMessage() @@ -132,7 +134,7 @@ export const TimestampStatusUserMessage: React.FC<{ {sentDate > 0 ? timeFormat.fmtTimestamp3(sentDate) : ''} - {!cmd && lastInte?.cid?.toString() === inte?.cid.toString() && ( + {!cmd && lastInte?.cid?.toString() === inte.cid?.toString() && ( <> {inte.isMe && ( - + ) diff --git a/js/packages/components/main/CreateGroupAddMembers.tsx b/js/packages/components/main/CreateGroupAddMembers.tsx index 63667a0d2a..91704e8756 100644 --- a/js/packages/components/main/CreateGroupAddMembers.tsx +++ b/js/packages/components/main/CreateGroupAddMembers.tsx @@ -138,8 +138,8 @@ const AddMembersItem: React.FC = ({ return ( - - + + {contact.displayName} @@ -288,7 +288,7 @@ export const MemberList: React.FC<{ const [{ height, padding }] = useStyles() return ( - + navigate('Main.HomeModal')} - onSwipeDown={() => navigate('Main.HomeModal')} - onSwipeLeft={() => navigate('Main.HomeModal')} - onSwipeRight={() => navigate('Main.HomeModal')} + onSwipeUp={() => navigate('Main.Home')} + onSwipeDown={() => navigate('Main.Home')} + onSwipeLeft={() => navigate('Main.Home')} + onSwipeRight={() => navigate('Main.Home')} > setLayout(e.nativeEvent.layout.height)}> diff --git a/js/packages/components/main/Footer.tsx b/js/packages/components/main/Footer.tsx index 8876de5c7e..66ccf0ad2f 100644 --- a/js/packages/components/main/Footer.tsx +++ b/js/packages/components/main/Footer.tsx @@ -1,10 +1,8 @@ -import React from 'react' -import { TouchableOpacity, View } from 'react-native' -import { useIsFocused } from '@react-navigation/native' +import React, { useEffect, useMemo } from 'react' +import { TouchableOpacity, View, Animated, Easing } from 'react-native' import { Icon } from '@ui-kitten/components' import LinearGradient from 'react-native-linear-gradient' import { useStyles } from '@berty-tech/styles' -import { useNavigation } from '@berty-tech/navigation' import { SafeAreaConsumer } from 'react-native-safe-area-context' type ButtonFooterProps = { @@ -14,6 +12,7 @@ type ButtonFooterProps = { selected: boolean disabled?: boolean selectedElemSize?: number + isModalVisible: boolean } const ButtonFooter: React.FC = ({ @@ -22,6 +21,7 @@ const ButtonFooter: React.FC = ({ onPress, selected, disabled = false, + isModalVisible, }) => { const [{ border, column, color, opacity }] = useStyles() const selectedSize = 59 @@ -35,6 +35,20 @@ const ButtonFooter: React.FC = ({ const elemColor = selected ? selectedElemColor : color.blue const selectedBackgroundColor = color.blue const backgroundColor = selected ? selectedBackgroundColor : backgroundColorProp + let rotateValue = useMemo(() => new Animated.Value(0), []) + useEffect(() => { + Animated.timing(rotateValue, { + toValue: isModalVisible ? 1 : 0, + duration: 300, + easing: Easing.linear, + useNativeDriver: false, + }).start() + }, [isModalVisible, rotateValue]) + + const rotateAnimation = rotateValue.interpolate({ + inputRange: [0, 1], + outputRange: ['0deg', '45deg'], + }) return ( = ({ }, ]} > - @@ -73,7 +96,7 @@ const ButtonFooter: React.FC = ({ height={elemSize} fill={elemColor} /> - + ) @@ -81,20 +104,22 @@ const ButtonFooter: React.FC = ({ const max = (a: number, b: number) => (a >= b ? a : b) -export const Footer: React.FC<{}> = () => { +export const Footer: React.FC<{ + isModalVisible: boolean + openModal: () => void +}> = ({ isModalVisible, openModal }) => { const [{ absolute }] = useStyles() - const { navigate } = useNavigation() - const isFocused = useIsFocused() const props = { icon: 'plus-outline', - onPress: () => navigate.main.listModal(), + onPress: openModal, selected: true, + isModalVisible, } return ( <> - {!isFocused && ( + {isModalVisible && ( = (props) => { } } + let messageType: 'picture' | 'audio' = '' + + const userDisplayName = + type === beapi.messenger.Conversation.Type.MultiMemberType + ? displayName + : contact?.displayName || '' + + if (lastInte?.medias?.length) { + if (lastInte.medias[0].mimeType?.startsWith('image')) { + messageType = 'audio' + description = `${lastInte.isMe ? 'You' : userDisplayName} sent ${ + lastInte.isMe ? userDisplayName : 'you' + } ${lastInte.medias.length > 1 ? lastInte.medias.length : 'a'} pic` + } else if (lastInte.medias[0].mimeType?.startsWith('audio')) { + messageType = 'audio' + description = `${lastInte.isMe ? 'You' : userDisplayName} sent ${ + lastInte.isMe ? userDisplayName : 'you' + } ${lastInte.medias.length > 1 ? lastInte.medias.length : 'an'} audio` + } + } + return !isIncoming ? ( = (props) => { }} > - {(fake && 'FAKE - ') || ''} - {type === beapi.messenger.Conversation.Type.MultiMemberType - ? displayName - : contact?.displayName || ''} + {(fake && 'FAKE - ') || ''} {userDisplayName} {/* Timestamp and unread count */} @@ -503,6 +523,15 @@ const ConversationsItem: React.FC = (props) => { }, ]} > + {!!messageType && ( + + )} = () => { const [isOnTop, setIsOnTop] = useState(false) const [searchText, setSearchText] = useState('') const [refresh, setRefresh] = useState(false) + const [isModalVisible, setModalVisibility] = useState(false) const { navigate } = useNativeNavigation() @@ -978,7 +1008,7 @@ export const Home: React.FC = () => { {(t: any): React.ReactNode => ( - navigate('Settings.Home')}> + !isModalVisible && navigate('Settings.Home')}> {(insets: EdgeInsets | null) => ( <> @@ -1071,7 +1101,30 @@ export const Home: React.FC = () => { )} - {!searchText?.length &&